Subversion Repositories SmartDukaan

Rev

Rev 23118 | 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
 */
package in.shop2020.model.v1.inventory;

import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
import java.util.EnumMap;
import java.util.Set;
import java.util.HashSet;
import java.util.EnumSet;
import java.util.Collections;
import java.util.BitSet;
import java.nio.ByteBuffer;
import java.util.Arrays;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class InventoryService {

  public interface Iface extends in.shop2020.generic.GenericService.Iface {

    public long addWarehouse(Warehouse warehouse) throws InventoryServiceException, org.apache.thrift.TException;

    /**
     * add a new vendor
     * 
     * @param vendor
     */
    public long addVendor(Vendor vendor) throws InventoryServiceException, org.apache.thrift.TException;

    /**
     * Stores the incremental warehouse updates of items.
     * 
     * @param warehouse_id
     * @param timestamp
     * @param availability
     */
    public void updateInventoryHistory(long warehouse_id, String timestamp, Map<String,Long> availability) throws InventoryServiceException, org.apache.thrift.TException;

    /**
     * Stores the final inventory stocks of items.
     * 
     * @param warehouse_id
     * @param timestamp
     * @param availability
     */
    public void updateInventory(long warehouse_id, String timestamp, Map<String,Long> availability) throws InventoryServiceException, org.apache.thrift.TException;

    /**
     * Add the inventory to existing stock.
     * 
     * @param itemId
     * @param warehouseId
     * @param quantity
     */
    public void addInventory(long itemId, long warehouseId, long quantity) throws InventoryServiceException, org.apache.thrift.TException;

    public void retireWarehouse(long warehouse_id) throws InventoryServiceException, org.apache.thrift.TException;

    public ItemInventory getItemInventoryByItemId(long item_id) throws InventoryServiceException, org.apache.thrift.TException;

    public long getItemAvailibilityAtWarehouse(long warehouse_id, long item_id) throws InventoryServiceException, org.apache.thrift.TException;

    /**
     * Determines the warehouse that should be used to fulfil an order for the given item.
     * It first checks all the warehouses which are in the logistics location given by the
     * warehouse_loc parameter. If none of the warehouses there have any inventory, then the
     * preferred warehouse for the item is used.
     * 
     * Returns an ordered list of size 4 with following elements in the given order:
     * 1. Id of the fulfillment warehouse which was finally picked up.
     * 2. Expected delay added by the category manager.
     * 3. Id of the billing warehouse which was finally picked up.
     * 
     * @param itemId
     * @param sourceId
     * @param stateId
     */
    public List<Long> getItemAvailabilityAtLocation(long itemId, long sourceId, long stateId) throws InventoryServiceException, org.apache.thrift.TException;

    public List<Warehouse> getAllWarehouses(boolean isActive) throws InventoryServiceException, org.apache.thrift.TException;

    /**
     * Returns the warehouse with the given id.
     * 
     * @param warehouse_id
     */
    public Warehouse getWarehouse(long warehouse_id) throws InventoryServiceException, org.apache.thrift.TException;

    public List<Long> getAllItemsForWarehouse(long warehouse_id) throws InventoryServiceException, org.apache.thrift.TException;

    /**
     * Depending on reservation in the table, verify if we can bill this order or not.
     * 
     * @param itemId
     * @param warehouseId
     * @param sourceId
     * @param orderId
     */
    public boolean isOrderBillable(long itemId, long warehouseId, long sourceId, long orderId) throws org.apache.thrift.TException;

    /**
     * Increases the reservation count for an item in a warehouse. Should always succeed normally.
     * 
     * @param itemId
     * @param warehouseId
     * @param sourceId
     * @param orderId
     * @param createdTimestamp
     * @param promisedShippingTimestamp
     * @param quantity
     */
    public boolean reserveItemInWarehouse(long itemId, long warehouseId, long sourceId, long orderId, long createdTimestamp, long promisedShippingTimestamp, double quantity) throws InventoryServiceException, org.apache.thrift.TException;

    /**
     * Updates the reservation for Order
     * 
     * @param itemId
     * @param warehouseId
     * @param sourceId
     * @param orderId
     * @param createdTimestamp
     * @param promisedShippingTimestamp
     * @param quantity
     */
    public boolean updateReservationForOrder(long itemId, long warehouseId, long sourceId, long orderId, long createdTimestamp, long promisedShippingTimestamp, double quantity) throws InventoryServiceException, org.apache.thrift.TException;

    /**
     * Decreases the reservation count for an item in a warehouse. Should always succeed normally.
     * 
     * @param itemId
     * @param warehouseId
     * @param sourceId
     * @param orderId
     * @param quantity
     */
    public boolean reduceReservationCount(long itemId, long warehouseId, long sourceId, long orderId, double quantity) throws InventoryServiceException, org.apache.thrift.TException;

    /**
     * Returns the pricing information of an item associated with the vendor of the given warehouse.
     * Raises an exception if either the item, vendor or the associated pricing information can't be found.
     * 
     * @param itemId
     * @param vendorId
     */
    public VendorItemPricing getItemPricing(long itemId, long vendorId) throws InventoryServiceException, org.apache.thrift.TException;

    /**
     * Returns the list of vendor pricing information of an item.
     * Raises an exception if item not found corresponding to itemId
     * 
     * @param itemId
     */
    public List<VendorItemPricing> getAllItemPricing(long itemId) throws InventoryServiceException, org.apache.thrift.TException;

    /**
     * Adds vendor prices corresponding to the item. If pricing already exists then updates the prices.
     * Raises an exception if either the item or vendor can't be found corresponding to their ids.
     * 
     * @param vendorItemPricing
     */
    public void addVendorItemPricing(VendorItemPricing vendorItemPricing) throws InventoryServiceException, org.apache.thrift.TException;

    /**
     * Returns a vendor given its id
     * 
     * @param vendorId
     */
    public Vendor getVendor(long vendorId) throws org.apache.thrift.TException;

    /**
     * Return list of all vendors
     */
    public List<Vendor> getAllVendors() throws org.apache.thrift.TException;

    /**
     * Adds VendorItemMapping. Updates VendorItemMapping if exists corresponding to the item key.
     * 
     * @param key
     * @param vendorItemMapping
     */
    public void addVendorItemMapping(String key, VendorItemMapping vendorItemMapping) throws InventoryServiceException, org.apache.thrift.TException;

    /**
     * Returns the list of vendor item mapping corresponding to itemId passed as parameter.
     * Raises an exception if item not found corresponding to itemId
     * 
     * @param itemId
     */
    public List<VendorItemMapping> getVendorItemMappings(long itemId) throws InventoryServiceException, org.apache.thrift.TException;

    /**
     * Returns a list of inventory stock for items for which there are pending orders for the given vendor.
     * 
     * @param vendorid
     */
    public List<AvailableAndReservedStock> getPendingOrdersInventory(long vendorid) throws org.apache.thrift.TException;

    /**
     * This method returns all warehouses for a given warehosueType, inventoryType, vendor, billingWarehouse and shippingWarehouse.
     * getWarehouses(WarehouseType.OURS, InventoryType.GOOD, 3, 7, 7) would return ours warehouse with GOOD type inventory for vendor 1 for billing warehouse 7 and shipping warehouse 7
     * getWarehouses(WarehouseType.OURS, InventoryType.GOOD, 3, 7, 7) would return ours warehouse with GOOD type inventory for vendor 3 for billing warehouse 7 and shipping warehouse 7
     *    getWarehouses(null, null, 3, 7, 7) would return all type warehouses with all type inventory for vendor 3 for billing warehouse 7 and shipping warehouse 7
     *    getWarehouses(null, null, 0, 0, 7) would return all type warehouses with all type inventory for all vendors for all billing warehouses at shipping warehouse 7
     * 
     * @param warehouseType
     * @param inventoryType
     * @param vendorId
     * @param billingWarehouseId
     * @param shippingWarehouseId
     */
    public List<Warehouse> getWarehouses(WarehouseType warehouseType, InventoryType inventoryType, long vendorId, long billingWarehouseId, long shippingWarehouseId) throws org.apache.thrift.TException;

    /**
     * Resets availability of an item to the quantity mentioned in a warehouse.
     * 
     * @param itemKey
     * @param vendorId
     * @param quantity
     * @param warehouseId
     */
    public void resetAvailability(String itemKey, long vendorId, long quantity, long warehouseId) throws InventoryServiceException, org.apache.thrift.TException;

    /**
     * Resets availability of a warehouse to zero.
     * 
     * @param warehouseId
     */
    public void resetAvailabilityForWarehouse(long warehouseId) throws InventoryServiceException, org.apache.thrift.TException;

    /**
     * Returns the list of item keys which need to be processed for a given warehouse.
     * This is currently used by Support application to send item keys whose inventory needs
     * to be updated from PLB
     * 
     * @param warehouseId
     */
    public List<String> getItemKeysToBeProcessed(long warehouseId) throws org.apache.thrift.TException;

    /**
     * Marks/Deletes missed inventory updates for a given key and warehouse.
     * This generally happens when updates from PLB are applied on the currentinventorysnapshot for an item
     * 
     * @param itemKey
     * @param warehouseId
     */
    public void markMissedInventoryUpdatesAsProcessed(String itemKey, long warehouseId) throws org.apache.thrift.TException;

    /**
     * Returns all the item key mappings that have been ignored until date. Value of map has the warehouse id
     * and the timestamp from where alert was raised.
     */
    public Map<String,Map<Long,Long>> getIgnoredItemKeys() throws org.apache.thrift.TException;

    /**
     * Add the BAD type inventory to existing stock.
     * 
     * @param itemId
     * @param warehouseId
     * @param quantity
     */
    public void addBadInventory(long itemId, long warehouseId, long quantity) throws InventoryServiceException, org.apache.thrift.TException;

    /**
     * Returns all shipping locations
     */
    public List<Warehouse> getShippingLocations() throws org.apache.thrift.TException;

    /**
     * Fetches all the vendor item mappings present.
     */
    public List<VendorItemMapping> getAllVendorItemMappings() throws org.apache.thrift.TException;

    /**
     * Gets items' inventory for a warehouse
     * If warehouse is passed as zero, items' inventory across all warehouses is sent
     * 
     * @param warehouseId
     */
    public Map<Long,ItemInventory> getInventorySnapshot(long warehouseId) throws org.apache.thrift.TException;

    /**
     * Clear item availability cache.
     */
    public void clearItemAvailabilityCache() throws org.apache.thrift.TException;

    public void updateVendorString(long warehouseId, String vendorString) throws org.apache.thrift.TException;

    public void clearItemAvailabilityCacheForItem(long item_id) throws org.apache.thrift.TException;

    public long getOurWarehouseIdForVendor(long vendorId, long billingWarehouseId) throws org.apache.thrift.TException;

    public Map<Long,Long> getItemAvailabilitiesAtOurWarehouses(List<Long> item_ids) throws org.apache.thrift.TException;

    public List<Long> getMonitoredWarehouseForVendors(List<Long> vendorIds) throws org.apache.thrift.TException;

    public List<IgnoredInventoryUpdateItems> getIgnoredWarehouseidsAndItemids() throws org.apache.thrift.TException;

    public boolean insertItemtoIgnoreInventoryUpdatelist(long item_id, long warehouse_id) throws org.apache.thrift.TException;

    public boolean deleteItemFromIgnoredInventoryUpdateList(long item_id, long warehouse_id) throws org.apache.thrift.TException;

    public int getAllIgnoredInventoryupdateItemsCount() throws org.apache.thrift.TException;

    public List<Long> getIgnoredInventoryUpdateItemids(int offset, int limit) throws org.apache.thrift.TException;

    public void updateItemStockPurchaseParams(long item_id, int numOfDaysStock, long minStockLevel) throws org.apache.thrift.TException;

    public ItemStockPurchaseParams getItemStockPurchaseParams(long itemId) throws org.apache.thrift.TException;

    public void addOosStatusForItem(Map<Long,Boolean> oosStatusMap, long date) throws org.apache.thrift.TException;

    public List<OOSStatus> getOosStatusesForXDaysForItem(long itemId, int sourceId, int days) throws org.apache.thrift.TException;

    public List<OOSStatus> getOosStatusesForXDays(int sourceId, int days) throws org.apache.thrift.TException;

    public List<VendorItemPricing> getAllVendorItemPricing(long itemId, long vendorId) throws org.apache.thrift.TException;

    public List<ItemStockPurchaseParams> getNonZeroItemStockPurchaseParams() throws org.apache.thrift.TException;

    /**
     * Returns a list of inventory stock for items for which there are pending orders or have billable inventory.
     */
    public List<AvailableAndReservedStock> getBillableInventoryAndPendingOrders() throws org.apache.thrift.TException;

    public String getWarehouseName(long warehouse_id) throws org.apache.thrift.TException;

    public AmazonInventorySnapshot getAmazonInventoryForItem(long item_id) throws org.apache.thrift.TException;

    public List<AmazonInventorySnapshot> getAllAmazonInventory() throws org.apache.thrift.TException;

    public void addOrUpdateAmazonInventoryForItem(AmazonInventorySnapshot amazonInventorySnapshot, long time) throws org.apache.thrift.TException;

    public String getLastNdaySaleForItem(long itemId, long numberOfDays) throws org.apache.thrift.TException;

    public void addOrUpdateAmazonFbaInventory(AmazonFbaInventorySnapshot amazonfbainventorysnapshot) throws org.apache.thrift.TException;

    public void addUpdateHoldInventory(long itemId, long warehouseId, long holdQuantity, long source) throws InventoryServiceException, org.apache.thrift.TException;

    public List<AmazonFbaInventorySnapshot> getAmazonFbaItemInventory(long itemId) throws org.apache.thrift.TException;

    public List<AmazonFbaInventorySnapshot> getAllAmazonFbaItemInventory() throws org.apache.thrift.TException;

    public List<Long> getOursGoodWarehouseIdsForLocation(long state_id) throws org.apache.thrift.TException;

    public long getHoldInventoryDetailForItemForWarehouseIdExceptSource(long id, long warehouse_id, long source) throws org.apache.thrift.TException;

    public SnapdealInventoryItem getSnapdealInventoryForItem(long item_id) throws org.apache.thrift.TException;

    public void addOrUpdateSnapdealInventoryForItem(SnapdealInventoryItem snapdealinventoryitem) throws org.apache.thrift.TException;

    public double getNlcForWarehouse(long warehouse_id, long item_id) throws org.apache.thrift.TException;

    public Map<Integer,Long> getHeldInventoryMapForItem(long item_id, long warehouse_id) throws org.apache.thrift.TException;

    public void addOrUpdateAllAmazonFbaInventory(List<AmazonFbaInventorySnapshot> allamazonfbainventorysnapshot) throws org.apache.thrift.TException;

    public void addOrUpdateAllSnapdealInventory(List<SnapdealInventoryItem> allsnapdealinventorysnapshot) throws org.apache.thrift.TException;

    public List<SnapdealInventoryItem> getSnapdealInventorySnapshot() throws org.apache.thrift.TException;

    public List<HoldInventoryDetail> getHoldInventoryDetails(long itemId, long warehouseId, long source) throws org.apache.thrift.TException;

    public void addOrUpdateFlipkartInventorySnapshot(List<FlipkartInventorySnapshot> flipkartInventorySnapshot, long time) throws org.apache.thrift.TException;

    public List<FlipkartInventorySnapshot> getFlipkartInventorySnapshot() throws org.apache.thrift.TException;

    public FlipkartInventorySnapshot getFlipkartlInventoryForItem(long item_id) throws org.apache.thrift.TException;

    public Map<Long,StateInfo> getStateMaster() throws org.apache.thrift.TException;

    public void updateSnapdealStockAtEOD(List<SnapdealStockAtEOD> allsnapdealstock) throws org.apache.thrift.TException;

    public void updateFlipkartStockAtEOD(List<FlipkartStockAtEOD> allflipkartstock) throws org.apache.thrift.TException;

    public double getWanNlcForSource(long item_id, long source) throws org.apache.thrift.TException;

    public List<AmazonFbaInventorySnapshot> getAllAvailableAmazonFbaItemInventory() throws org.apache.thrift.TException;

    public boolean updateItemAvailabilityForItemIds(List<Long> itemIds) throws org.apache.thrift.TException;

    public List<Long> addVendorItemPricingInBulk(List<VendorItemPricing> vendorItemPricingList) throws org.apache.thrift.TException;

    public void addInventoryInBulk(List<BulkAddInventory> bulkInventoryList) throws InventoryServiceException, org.apache.thrift.TException;

    public Map<Long,Long> getFofoAvailability(List<Long> itemIds) throws org.apache.thrift.TException;

    public Map<Long,Warehouse> getFofoFulFillmentWarehouseMap(List<Long> itemIds) throws org.apache.thrift.TException;

    public List<ItemLocationAvailability> getItemLocationAvailabilityCache(List<ItemLocationAvailability> itemLocations) throws org.apache.thrift.TException;

    public List<ItemLocationAvailability> getItemLocationAvailabilityCacheByItemId(List<Long> itemIds) throws org.apache.thrift.TException;

    public String getItemPincodeAvailability(Map<Long,Long> itempricing, String pincode) throws org.apache.thrift.TException;

  }

  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {

    public void addWarehouse(Warehouse warehouse, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addWarehouse_call> resultHandler) throws org.apache.thrift.TException;

    public void addVendor(Vendor vendor, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addVendor_call> resultHandler) throws org.apache.thrift.TException;

    public void updateInventoryHistory(long warehouse_id, String timestamp, Map<String,Long> availability, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateInventoryHistory_call> resultHandler) throws org.apache.thrift.TException;

    public void updateInventory(long warehouse_id, String timestamp, Map<String,Long> availability, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateInventory_call> resultHandler) throws org.apache.thrift.TException;

    public void addInventory(long itemId, long warehouseId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addInventory_call> resultHandler) throws org.apache.thrift.TException;

    public void retireWarehouse(long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.retireWarehouse_call> resultHandler) throws org.apache.thrift.TException;

    public void getItemInventoryByItemId(long item_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemInventoryByItemId_call> resultHandler) throws org.apache.thrift.TException;

    public void getItemAvailibilityAtWarehouse(long warehouse_id, long item_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemAvailibilityAtWarehouse_call> resultHandler) throws org.apache.thrift.TException;

    public void getItemAvailabilityAtLocation(long itemId, long sourceId, long stateId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemAvailabilityAtLocation_call> resultHandler) throws org.apache.thrift.TException;

    public void getAllWarehouses(boolean isActive, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllWarehouses_call> resultHandler) throws org.apache.thrift.TException;

    public void getWarehouse(long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getWarehouse_call> resultHandler) throws org.apache.thrift.TException;

    public void getAllItemsForWarehouse(long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllItemsForWarehouse_call> resultHandler) throws org.apache.thrift.TException;

    public void isOrderBillable(long itemId, long warehouseId, long sourceId, long orderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.isOrderBillable_call> resultHandler) throws org.apache.thrift.TException;

    public void reserveItemInWarehouse(long itemId, long warehouseId, long sourceId, long orderId, long createdTimestamp, long promisedShippingTimestamp, double quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.reserveItemInWarehouse_call> resultHandler) throws org.apache.thrift.TException;

    public void updateReservationForOrder(long itemId, long warehouseId, long sourceId, long orderId, long createdTimestamp, long promisedShippingTimestamp, double quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateReservationForOrder_call> resultHandler) throws org.apache.thrift.TException;

    public void reduceReservationCount(long itemId, long warehouseId, long sourceId, long orderId, double quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.reduceReservationCount_call> resultHandler) throws org.apache.thrift.TException;

    public void getItemPricing(long itemId, long vendorId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemPricing_call> resultHandler) throws org.apache.thrift.TException;

    public void getAllItemPricing(long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllItemPricing_call> resultHandler) throws org.apache.thrift.TException;

    public void addVendorItemPricing(VendorItemPricing vendorItemPricing, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addVendorItemPricing_call> resultHandler) throws org.apache.thrift.TException;

    public void getVendor(long vendorId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getVendor_call> resultHandler) throws org.apache.thrift.TException;

    public void getAllVendors(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllVendors_call> resultHandler) throws org.apache.thrift.TException;

    public void addVendorItemMapping(String key, VendorItemMapping vendorItemMapping, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addVendorItemMapping_call> resultHandler) throws org.apache.thrift.TException;

    public void getVendorItemMappings(long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getVendorItemMappings_call> resultHandler) throws org.apache.thrift.TException;

    public void getPendingOrdersInventory(long vendorid, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPendingOrdersInventory_call> resultHandler) throws org.apache.thrift.TException;

    public void getWarehouses(WarehouseType warehouseType, InventoryType inventoryType, long vendorId, long billingWarehouseId, long shippingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getWarehouses_call> resultHandler) throws org.apache.thrift.TException;

    public void resetAvailability(String itemKey, long vendorId, long quantity, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.resetAvailability_call> resultHandler) throws org.apache.thrift.TException;

    public void resetAvailabilityForWarehouse(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.resetAvailabilityForWarehouse_call> resultHandler) throws org.apache.thrift.TException;

    public void getItemKeysToBeProcessed(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemKeysToBeProcessed_call> resultHandler) throws org.apache.thrift.TException;

    public void markMissedInventoryUpdatesAsProcessed(String itemKey, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.markMissedInventoryUpdatesAsProcessed_call> resultHandler) throws org.apache.thrift.TException;

    public void getIgnoredItemKeys(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getIgnoredItemKeys_call> resultHandler) throws org.apache.thrift.TException;

    public void addBadInventory(long itemId, long warehouseId, long quantity, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addBadInventory_call> resultHandler) throws org.apache.thrift.TException;

    public void getShippingLocations(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getShippingLocations_call> resultHandler) throws org.apache.thrift.TException;

    public void getAllVendorItemMappings(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllVendorItemMappings_call> resultHandler) throws org.apache.thrift.TException;

    public void getInventorySnapshot(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventorySnapshot_call> resultHandler) throws org.apache.thrift.TException;

    public void clearItemAvailabilityCache(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.clearItemAvailabilityCache_call> resultHandler) throws org.apache.thrift.TException;

    public void updateVendorString(long warehouseId, String vendorString, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateVendorString_call> resultHandler) throws org.apache.thrift.TException;

    public void clearItemAvailabilityCacheForItem(long item_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.clearItemAvailabilityCacheForItem_call> resultHandler) throws org.apache.thrift.TException;

    public void getOurWarehouseIdForVendor(long vendorId, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getOurWarehouseIdForVendor_call> resultHandler) throws org.apache.thrift.TException;

    public void getItemAvailabilitiesAtOurWarehouses(List<Long> item_ids, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemAvailabilitiesAtOurWarehouses_call> resultHandler) throws org.apache.thrift.TException;

    public void getMonitoredWarehouseForVendors(List<Long> vendorIds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getMonitoredWarehouseForVendors_call> resultHandler) throws org.apache.thrift.TException;

    public void getIgnoredWarehouseidsAndItemids(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getIgnoredWarehouseidsAndItemids_call> resultHandler) throws org.apache.thrift.TException;

    public void insertItemtoIgnoreInventoryUpdatelist(long item_id, long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.insertItemtoIgnoreInventoryUpdatelist_call> resultHandler) throws org.apache.thrift.TException;

    public void deleteItemFromIgnoredInventoryUpdateList(long item_id, long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.deleteItemFromIgnoredInventoryUpdateList_call> resultHandler) throws org.apache.thrift.TException;

    public void getAllIgnoredInventoryupdateItemsCount(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllIgnoredInventoryupdateItemsCount_call> resultHandler) throws org.apache.thrift.TException;

    public void getIgnoredInventoryUpdateItemids(int offset, int limit, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getIgnoredInventoryUpdateItemids_call> resultHandler) throws org.apache.thrift.TException;

    public void updateItemStockPurchaseParams(long item_id, int numOfDaysStock, long minStockLevel, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateItemStockPurchaseParams_call> resultHandler) throws org.apache.thrift.TException;

    public void getItemStockPurchaseParams(long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemStockPurchaseParams_call> resultHandler) throws org.apache.thrift.TException;

    public void addOosStatusForItem(Map<Long,Boolean> oosStatusMap, long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addOosStatusForItem_call> resultHandler) throws org.apache.thrift.TException;

    public void getOosStatusesForXDaysForItem(long itemId, int sourceId, int days, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getOosStatusesForXDaysForItem_call> resultHandler) throws org.apache.thrift.TException;

    public void getOosStatusesForXDays(int sourceId, int days, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getOosStatusesForXDays_call> resultHandler) throws org.apache.thrift.TException;

    public void getAllVendorItemPricing(long itemId, long vendorId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllVendorItemPricing_call> resultHandler) throws org.apache.thrift.TException;

    public void getNonZeroItemStockPurchaseParams(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getNonZeroItemStockPurchaseParams_call> resultHandler) throws org.apache.thrift.TException;

    public void getBillableInventoryAndPendingOrders(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getBillableInventoryAndPendingOrders_call> resultHandler) throws org.apache.thrift.TException;

    public void getWarehouseName(long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getWarehouseName_call> resultHandler) throws org.apache.thrift.TException;

    public void getAmazonInventoryForItem(long item_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAmazonInventoryForItem_call> resultHandler) throws org.apache.thrift.TException;

    public void getAllAmazonInventory(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllAmazonInventory_call> resultHandler) throws org.apache.thrift.TException;

    public void addOrUpdateAmazonInventoryForItem(AmazonInventorySnapshot amazonInventorySnapshot, long time, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addOrUpdateAmazonInventoryForItem_call> resultHandler) throws org.apache.thrift.TException;

    public void getLastNdaySaleForItem(long itemId, long numberOfDays, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getLastNdaySaleForItem_call> resultHandler) throws org.apache.thrift.TException;

    public void addOrUpdateAmazonFbaInventory(AmazonFbaInventorySnapshot amazonfbainventorysnapshot, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addOrUpdateAmazonFbaInventory_call> resultHandler) throws org.apache.thrift.TException;

    public void addUpdateHoldInventory(long itemId, long warehouseId, long holdQuantity, long source, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addUpdateHoldInventory_call> resultHandler) throws org.apache.thrift.TException;

    public void getAmazonFbaItemInventory(long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAmazonFbaItemInventory_call> resultHandler) throws org.apache.thrift.TException;

    public void getAllAmazonFbaItemInventory(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllAmazonFbaItemInventory_call> resultHandler) throws org.apache.thrift.TException;

    public void getOursGoodWarehouseIdsForLocation(long state_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getOursGoodWarehouseIdsForLocation_call> resultHandler) throws org.apache.thrift.TException;

    public void getHoldInventoryDetailForItemForWarehouseIdExceptSource(long id, long warehouse_id, long source, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getHoldInventoryDetailForItemForWarehouseIdExceptSource_call> resultHandler) throws org.apache.thrift.TException;

    public void getSnapdealInventoryForItem(long item_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSnapdealInventoryForItem_call> resultHandler) throws org.apache.thrift.TException;

    public void addOrUpdateSnapdealInventoryForItem(SnapdealInventoryItem snapdealinventoryitem, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addOrUpdateSnapdealInventoryForItem_call> resultHandler) throws org.apache.thrift.TException;

    public void getNlcForWarehouse(long warehouse_id, long item_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getNlcForWarehouse_call> resultHandler) throws org.apache.thrift.TException;

    public void getHeldInventoryMapForItem(long item_id, long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getHeldInventoryMapForItem_call> resultHandler) throws org.apache.thrift.TException;

    public void addOrUpdateAllAmazonFbaInventory(List<AmazonFbaInventorySnapshot> allamazonfbainventorysnapshot, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addOrUpdateAllAmazonFbaInventory_call> resultHandler) throws org.apache.thrift.TException;

    public void addOrUpdateAllSnapdealInventory(List<SnapdealInventoryItem> allsnapdealinventorysnapshot, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addOrUpdateAllSnapdealInventory_call> resultHandler) throws org.apache.thrift.TException;

    public void getSnapdealInventorySnapshot(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSnapdealInventorySnapshot_call> resultHandler) throws org.apache.thrift.TException;

    public void getHoldInventoryDetails(long itemId, long warehouseId, long source, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getHoldInventoryDetails_call> resultHandler) throws org.apache.thrift.TException;

    public void addOrUpdateFlipkartInventorySnapshot(List<FlipkartInventorySnapshot> flipkartInventorySnapshot, long time, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addOrUpdateFlipkartInventorySnapshot_call> resultHandler) throws org.apache.thrift.TException;

    public void getFlipkartInventorySnapshot(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getFlipkartInventorySnapshot_call> resultHandler) throws org.apache.thrift.TException;

    public void getFlipkartlInventoryForItem(long item_id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getFlipkartlInventoryForItem_call> resultHandler) throws org.apache.thrift.TException;

    public void getStateMaster(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getStateMaster_call> resultHandler) throws org.apache.thrift.TException;

    public void updateSnapdealStockAtEOD(List<SnapdealStockAtEOD> allsnapdealstock, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateSnapdealStockAtEOD_call> resultHandler) throws org.apache.thrift.TException;

    public void updateFlipkartStockAtEOD(List<FlipkartStockAtEOD> allflipkartstock, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateFlipkartStockAtEOD_call> resultHandler) throws org.apache.thrift.TException;

    public void getWanNlcForSource(long item_id, long source, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getWanNlcForSource_call> resultHandler) throws org.apache.thrift.TException;

    public void getAllAvailableAmazonFbaItemInventory(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getAllAvailableAmazonFbaItemInventory_call> resultHandler) throws org.apache.thrift.TException;

    public void updateItemAvailabilityForItemIds(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.updateItemAvailabilityForItemIds_call> resultHandler) throws org.apache.thrift.TException;

    public void addVendorItemPricingInBulk(List<VendorItemPricing> vendorItemPricingList, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addVendorItemPricingInBulk_call> resultHandler) throws org.apache.thrift.TException;

    public void addInventoryInBulk(List<BulkAddInventory> bulkInventoryList, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.addInventoryInBulk_call> resultHandler) throws org.apache.thrift.TException;

    public void getFofoAvailability(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getFofoAvailability_call> resultHandler) throws org.apache.thrift.TException;

    public void getFofoFulFillmentWarehouseMap(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getFofoFulFillmentWarehouseMap_call> resultHandler) throws org.apache.thrift.TException;

    public void getItemLocationAvailabilityCache(List<ItemLocationAvailability> itemLocations, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemLocationAvailabilityCache_call> resultHandler) throws org.apache.thrift.TException;

    public void getItemLocationAvailabilityCacheByItemId(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemLocationAvailabilityCacheByItemId_call> resultHandler) throws org.apache.thrift.TException;

    public void getItemPincodeAvailability(Map<Long,Long> itempricing, String pincode, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemPincodeAvailability_call> resultHandler) throws org.apache.thrift.TException;

  }

  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
      public Factory() {}
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
        return new Client(prot);
      }
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
        return new Client(iprot, oprot);
      }
    }

    public Client(org.apache.thrift.protocol.TProtocol prot)
    {
      super(prot, prot);
    }

    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
      super(iprot, oprot);
    }

    public long addWarehouse(Warehouse warehouse) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_addWarehouse(warehouse);
      return recv_addWarehouse();
    }

    public void send_addWarehouse(Warehouse warehouse) throws org.apache.thrift.TException
    {
      addWarehouse_args args = new addWarehouse_args();
      args.setWarehouse(warehouse);
      sendBase("addWarehouse", args);
    }

    public long recv_addWarehouse() throws InventoryServiceException, org.apache.thrift.TException
    {
      addWarehouse_result result = new addWarehouse_result();
      receiveBase(result, "addWarehouse");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.cex != null) {
        throw result.cex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addWarehouse failed: unknown result");
    }

    public long addVendor(Vendor vendor) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_addVendor(vendor);
      return recv_addVendor();
    }

    public void send_addVendor(Vendor vendor) throws org.apache.thrift.TException
    {
      addVendor_args args = new addVendor_args();
      args.setVendor(vendor);
      sendBase("addVendor", args);
    }

    public long recv_addVendor() throws InventoryServiceException, org.apache.thrift.TException
    {
      addVendor_result result = new addVendor_result();
      receiveBase(result, "addVendor");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.cex != null) {
        throw result.cex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addVendor failed: unknown result");
    }

    public void updateInventoryHistory(long warehouse_id, String timestamp, Map<String,Long> availability) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_updateInventoryHistory(warehouse_id, timestamp, availability);
      recv_updateInventoryHistory();
    }

    public void send_updateInventoryHistory(long warehouse_id, String timestamp, Map<String,Long> availability) throws org.apache.thrift.TException
    {
      updateInventoryHistory_args args = new updateInventoryHistory_args();
      args.setWarehouse_id(warehouse_id);
      args.setTimestamp(timestamp);
      args.setAvailability(availability);
      sendBase("updateInventoryHistory", args);
    }

    public void recv_updateInventoryHistory() throws InventoryServiceException, org.apache.thrift.TException
    {
      updateInventoryHistory_result result = new updateInventoryHistory_result();
      receiveBase(result, "updateInventoryHistory");
      if (result.cex != null) {
        throw result.cex;
      }
      return;
    }

    public void updateInventory(long warehouse_id, String timestamp, Map<String,Long> availability) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_updateInventory(warehouse_id, timestamp, availability);
      recv_updateInventory();
    }

    public void send_updateInventory(long warehouse_id, String timestamp, Map<String,Long> availability) throws org.apache.thrift.TException
    {
      updateInventory_args args = new updateInventory_args();
      args.setWarehouse_id(warehouse_id);
      args.setTimestamp(timestamp);
      args.setAvailability(availability);
      sendBase("updateInventory", args);
    }

    public void recv_updateInventory() throws InventoryServiceException, org.apache.thrift.TException
    {
      updateInventory_result result = new updateInventory_result();
      receiveBase(result, "updateInventory");
      if (result.cex != null) {
        throw result.cex;
      }
      return;
    }

    public void addInventory(long itemId, long warehouseId, long quantity) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_addInventory(itemId, warehouseId, quantity);
      recv_addInventory();
    }

    public void send_addInventory(long itemId, long warehouseId, long quantity) throws org.apache.thrift.TException
    {
      addInventory_args args = new addInventory_args();
      args.setItemId(itemId);
      args.setWarehouseId(warehouseId);
      args.setQuantity(quantity);
      sendBase("addInventory", args);
    }

    public void recv_addInventory() throws InventoryServiceException, org.apache.thrift.TException
    {
      addInventory_result result = new addInventory_result();
      receiveBase(result, "addInventory");
      if (result.cex != null) {
        throw result.cex;
      }
      return;
    }

    public void retireWarehouse(long warehouse_id) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_retireWarehouse(warehouse_id);
      recv_retireWarehouse();
    }

    public void send_retireWarehouse(long warehouse_id) throws org.apache.thrift.TException
    {
      retireWarehouse_args args = new retireWarehouse_args();
      args.setWarehouse_id(warehouse_id);
      sendBase("retireWarehouse", args);
    }

    public void recv_retireWarehouse() throws InventoryServiceException, org.apache.thrift.TException
    {
      retireWarehouse_result result = new retireWarehouse_result();
      receiveBase(result, "retireWarehouse");
      if (result.cex != null) {
        throw result.cex;
      }
      return;
    }

    public ItemInventory getItemInventoryByItemId(long item_id) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_getItemInventoryByItemId(item_id);
      return recv_getItemInventoryByItemId();
    }

    public void send_getItemInventoryByItemId(long item_id) throws org.apache.thrift.TException
    {
      getItemInventoryByItemId_args args = new getItemInventoryByItemId_args();
      args.setItem_id(item_id);
      sendBase("getItemInventoryByItemId", args);
    }

    public ItemInventory recv_getItemInventoryByItemId() throws InventoryServiceException, org.apache.thrift.TException
    {
      getItemInventoryByItemId_result result = new getItemInventoryByItemId_result();
      receiveBase(result, "getItemInventoryByItemId");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.cex != null) {
        throw result.cex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemInventoryByItemId failed: unknown result");
    }

    public long getItemAvailibilityAtWarehouse(long warehouse_id, long item_id) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_getItemAvailibilityAtWarehouse(warehouse_id, item_id);
      return recv_getItemAvailibilityAtWarehouse();
    }

    public void send_getItemAvailibilityAtWarehouse(long warehouse_id, long item_id) throws org.apache.thrift.TException
    {
      getItemAvailibilityAtWarehouse_args args = new getItemAvailibilityAtWarehouse_args();
      args.setWarehouse_id(warehouse_id);
      args.setItem_id(item_id);
      sendBase("getItemAvailibilityAtWarehouse", args);
    }

    public long recv_getItemAvailibilityAtWarehouse() throws InventoryServiceException, org.apache.thrift.TException
    {
      getItemAvailibilityAtWarehouse_result result = new getItemAvailibilityAtWarehouse_result();
      receiveBase(result, "getItemAvailibilityAtWarehouse");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.cex != null) {
        throw result.cex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemAvailibilityAtWarehouse failed: unknown result");
    }

    public List<Long> getItemAvailabilityAtLocation(long itemId, long sourceId, long stateId) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_getItemAvailabilityAtLocation(itemId, sourceId, stateId);
      return recv_getItemAvailabilityAtLocation();
    }

    public void send_getItemAvailabilityAtLocation(long itemId, long sourceId, long stateId) throws org.apache.thrift.TException
    {
      getItemAvailabilityAtLocation_args args = new getItemAvailabilityAtLocation_args();
      args.setItemId(itemId);
      args.setSourceId(sourceId);
      args.setStateId(stateId);
      sendBase("getItemAvailabilityAtLocation", args);
    }

    public List<Long> recv_getItemAvailabilityAtLocation() throws InventoryServiceException, org.apache.thrift.TException
    {
      getItemAvailabilityAtLocation_result result = new getItemAvailabilityAtLocation_result();
      receiveBase(result, "getItemAvailabilityAtLocation");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.isex != null) {
        throw result.isex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemAvailabilityAtLocation failed: unknown result");
    }

    public List<Warehouse> getAllWarehouses(boolean isActive) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_getAllWarehouses(isActive);
      return recv_getAllWarehouses();
    }

    public void send_getAllWarehouses(boolean isActive) throws org.apache.thrift.TException
    {
      getAllWarehouses_args args = new getAllWarehouses_args();
      args.setIsActive(isActive);
      sendBase("getAllWarehouses", args);
    }

    public List<Warehouse> recv_getAllWarehouses() throws InventoryServiceException, org.apache.thrift.TException
    {
      getAllWarehouses_result result = new getAllWarehouses_result();
      receiveBase(result, "getAllWarehouses");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.cex != null) {
        throw result.cex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllWarehouses failed: unknown result");
    }

    public Warehouse getWarehouse(long warehouse_id) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_getWarehouse(warehouse_id);
      return recv_getWarehouse();
    }

    public void send_getWarehouse(long warehouse_id) throws org.apache.thrift.TException
    {
      getWarehouse_args args = new getWarehouse_args();
      args.setWarehouse_id(warehouse_id);
      sendBase("getWarehouse", args);
    }

    public Warehouse recv_getWarehouse() throws InventoryServiceException, org.apache.thrift.TException
    {
      getWarehouse_result result = new getWarehouse_result();
      receiveBase(result, "getWarehouse");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.cex != null) {
        throw result.cex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getWarehouse failed: unknown result");
    }

    public List<Long> getAllItemsForWarehouse(long warehouse_id) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_getAllItemsForWarehouse(warehouse_id);
      return recv_getAllItemsForWarehouse();
    }

    public void send_getAllItemsForWarehouse(long warehouse_id) throws org.apache.thrift.TException
    {
      getAllItemsForWarehouse_args args = new getAllItemsForWarehouse_args();
      args.setWarehouse_id(warehouse_id);
      sendBase("getAllItemsForWarehouse", args);
    }

    public List<Long> recv_getAllItemsForWarehouse() throws InventoryServiceException, org.apache.thrift.TException
    {
      getAllItemsForWarehouse_result result = new getAllItemsForWarehouse_result();
      receiveBase(result, "getAllItemsForWarehouse");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.cex != null) {
        throw result.cex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllItemsForWarehouse failed: unknown result");
    }

    public boolean isOrderBillable(long itemId, long warehouseId, long sourceId, long orderId) throws org.apache.thrift.TException
    {
      send_isOrderBillable(itemId, warehouseId, sourceId, orderId);
      return recv_isOrderBillable();
    }

    public void send_isOrderBillable(long itemId, long warehouseId, long sourceId, long orderId) throws org.apache.thrift.TException
    {
      isOrderBillable_args args = new isOrderBillable_args();
      args.setItemId(itemId);
      args.setWarehouseId(warehouseId);
      args.setSourceId(sourceId);
      args.setOrderId(orderId);
      sendBase("isOrderBillable", args);
    }

    public boolean recv_isOrderBillable() throws org.apache.thrift.TException
    {
      isOrderBillable_result result = new isOrderBillable_result();
      receiveBase(result, "isOrderBillable");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isOrderBillable failed: unknown result");
    }

    public boolean reserveItemInWarehouse(long itemId, long warehouseId, long sourceId, long orderId, long createdTimestamp, long promisedShippingTimestamp, double quantity) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_reserveItemInWarehouse(itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity);
      return recv_reserveItemInWarehouse();
    }

    public void send_reserveItemInWarehouse(long itemId, long warehouseId, long sourceId, long orderId, long createdTimestamp, long promisedShippingTimestamp, double quantity) throws org.apache.thrift.TException
    {
      reserveItemInWarehouse_args args = new reserveItemInWarehouse_args();
      args.setItemId(itemId);
      args.setWarehouseId(warehouseId);
      args.setSourceId(sourceId);
      args.setOrderId(orderId);
      args.setCreatedTimestamp(createdTimestamp);
      args.setPromisedShippingTimestamp(promisedShippingTimestamp);
      args.setQuantity(quantity);
      sendBase("reserveItemInWarehouse", args);
    }

    public boolean recv_reserveItemInWarehouse() throws InventoryServiceException, org.apache.thrift.TException
    {
      reserveItemInWarehouse_result result = new reserveItemInWarehouse_result();
      receiveBase(result, "reserveItemInWarehouse");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.cex != null) {
        throw result.cex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "reserveItemInWarehouse failed: unknown result");
    }

    public boolean updateReservationForOrder(long itemId, long warehouseId, long sourceId, long orderId, long createdTimestamp, long promisedShippingTimestamp, double quantity) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_updateReservationForOrder(itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity);
      return recv_updateReservationForOrder();
    }

    public void send_updateReservationForOrder(long itemId, long warehouseId, long sourceId, long orderId, long createdTimestamp, long promisedShippingTimestamp, double quantity) throws org.apache.thrift.TException
    {
      updateReservationForOrder_args args = new updateReservationForOrder_args();
      args.setItemId(itemId);
      args.setWarehouseId(warehouseId);
      args.setSourceId(sourceId);
      args.setOrderId(orderId);
      args.setCreatedTimestamp(createdTimestamp);
      args.setPromisedShippingTimestamp(promisedShippingTimestamp);
      args.setQuantity(quantity);
      sendBase("updateReservationForOrder", args);
    }

    public boolean recv_updateReservationForOrder() throws InventoryServiceException, org.apache.thrift.TException
    {
      updateReservationForOrder_result result = new updateReservationForOrder_result();
      receiveBase(result, "updateReservationForOrder");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.cex != null) {
        throw result.cex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateReservationForOrder failed: unknown result");
    }

    public boolean reduceReservationCount(long itemId, long warehouseId, long sourceId, long orderId, double quantity) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_reduceReservationCount(itemId, warehouseId, sourceId, orderId, quantity);
      return recv_reduceReservationCount();
    }

    public void send_reduceReservationCount(long itemId, long warehouseId, long sourceId, long orderId, double quantity) throws org.apache.thrift.TException
    {
      reduceReservationCount_args args = new reduceReservationCount_args();
      args.setItemId(itemId);
      args.setWarehouseId(warehouseId);
      args.setSourceId(sourceId);
      args.setOrderId(orderId);
      args.setQuantity(quantity);
      sendBase("reduceReservationCount", args);
    }

    public boolean recv_reduceReservationCount() throws InventoryServiceException, org.apache.thrift.TException
    {
      reduceReservationCount_result result = new reduceReservationCount_result();
      receiveBase(result, "reduceReservationCount");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.cex != null) {
        throw result.cex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "reduceReservationCount failed: unknown result");
    }

    public VendorItemPricing getItemPricing(long itemId, long vendorId) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_getItemPricing(itemId, vendorId);
      return recv_getItemPricing();
    }

    public void send_getItemPricing(long itemId, long vendorId) throws org.apache.thrift.TException
    {
      getItemPricing_args args = new getItemPricing_args();
      args.setItemId(itemId);
      args.setVendorId(vendorId);
      sendBase("getItemPricing", args);
    }

    public VendorItemPricing recv_getItemPricing() throws InventoryServiceException, org.apache.thrift.TException
    {
      getItemPricing_result result = new getItemPricing_result();
      receiveBase(result, "getItemPricing");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.cex != null) {
        throw result.cex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemPricing failed: unknown result");
    }

    public List<VendorItemPricing> getAllItemPricing(long itemId) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_getAllItemPricing(itemId);
      return recv_getAllItemPricing();
    }

    public void send_getAllItemPricing(long itemId) throws org.apache.thrift.TException
    {
      getAllItemPricing_args args = new getAllItemPricing_args();
      args.setItemId(itemId);
      sendBase("getAllItemPricing", args);
    }

    public List<VendorItemPricing> recv_getAllItemPricing() throws InventoryServiceException, org.apache.thrift.TException
    {
      getAllItemPricing_result result = new getAllItemPricing_result();
      receiveBase(result, "getAllItemPricing");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.cex != null) {
        throw result.cex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllItemPricing failed: unknown result");
    }

    public void addVendorItemPricing(VendorItemPricing vendorItemPricing) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_addVendorItemPricing(vendorItemPricing);
      recv_addVendorItemPricing();
    }

    public void send_addVendorItemPricing(VendorItemPricing vendorItemPricing) throws org.apache.thrift.TException
    {
      addVendorItemPricing_args args = new addVendorItemPricing_args();
      args.setVendorItemPricing(vendorItemPricing);
      sendBase("addVendorItemPricing", args);
    }

    public void recv_addVendorItemPricing() throws InventoryServiceException, org.apache.thrift.TException
    {
      addVendorItemPricing_result result = new addVendorItemPricing_result();
      receiveBase(result, "addVendorItemPricing");
      if (result.cex != null) {
        throw result.cex;
      }
      return;
    }

    public Vendor getVendor(long vendorId) throws org.apache.thrift.TException
    {
      send_getVendor(vendorId);
      return recv_getVendor();
    }

    public void send_getVendor(long vendorId) throws org.apache.thrift.TException
    {
      getVendor_args args = new getVendor_args();
      args.setVendorId(vendorId);
      sendBase("getVendor", args);
    }

    public Vendor recv_getVendor() throws org.apache.thrift.TException
    {
      getVendor_result result = new getVendor_result();
      receiveBase(result, "getVendor");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVendor failed: unknown result");
    }

    public List<Vendor> getAllVendors() throws org.apache.thrift.TException
    {
      send_getAllVendors();
      return recv_getAllVendors();
    }

    public void send_getAllVendors() throws org.apache.thrift.TException
    {
      getAllVendors_args args = new getAllVendors_args();
      sendBase("getAllVendors", args);
    }

    public List<Vendor> recv_getAllVendors() throws org.apache.thrift.TException
    {
      getAllVendors_result result = new getAllVendors_result();
      receiveBase(result, "getAllVendors");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllVendors failed: unknown result");
    }

    public void addVendorItemMapping(String key, VendorItemMapping vendorItemMapping) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_addVendorItemMapping(key, vendorItemMapping);
      recv_addVendorItemMapping();
    }

    public void send_addVendorItemMapping(String key, VendorItemMapping vendorItemMapping) throws org.apache.thrift.TException
    {
      addVendorItemMapping_args args = new addVendorItemMapping_args();
      args.setKey(key);
      args.setVendorItemMapping(vendorItemMapping);
      sendBase("addVendorItemMapping", args);
    }

    public void recv_addVendorItemMapping() throws InventoryServiceException, org.apache.thrift.TException
    {
      addVendorItemMapping_result result = new addVendorItemMapping_result();
      receiveBase(result, "addVendorItemMapping");
      if (result.cex != null) {
        throw result.cex;
      }
      return;
    }

    public List<VendorItemMapping> getVendorItemMappings(long itemId) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_getVendorItemMappings(itemId);
      return recv_getVendorItemMappings();
    }

    public void send_getVendorItemMappings(long itemId) throws org.apache.thrift.TException
    {
      getVendorItemMappings_args args = new getVendorItemMappings_args();
      args.setItemId(itemId);
      sendBase("getVendorItemMappings", args);
    }

    public List<VendorItemMapping> recv_getVendorItemMappings() throws InventoryServiceException, org.apache.thrift.TException
    {
      getVendorItemMappings_result result = new getVendorItemMappings_result();
      receiveBase(result, "getVendorItemMappings");
      if (result.isSetSuccess()) {
        return result.success;
      }
      if (result.cex != null) {
        throw result.cex;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getVendorItemMappings failed: unknown result");
    }

    public List<AvailableAndReservedStock> getPendingOrdersInventory(long vendorid) throws org.apache.thrift.TException
    {
      send_getPendingOrdersInventory(vendorid);
      return recv_getPendingOrdersInventory();
    }

    public void send_getPendingOrdersInventory(long vendorid) throws org.apache.thrift.TException
    {
      getPendingOrdersInventory_args args = new getPendingOrdersInventory_args();
      args.setVendorid(vendorid);
      sendBase("getPendingOrdersInventory", args);
    }

    public List<AvailableAndReservedStock> recv_getPendingOrdersInventory() throws org.apache.thrift.TException
    {
      getPendingOrdersInventory_result result = new getPendingOrdersInventory_result();
      receiveBase(result, "getPendingOrdersInventory");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPendingOrdersInventory failed: unknown result");
    }

    public List<Warehouse> getWarehouses(WarehouseType warehouseType, InventoryType inventoryType, long vendorId, long billingWarehouseId, long shippingWarehouseId) throws org.apache.thrift.TException
    {
      send_getWarehouses(warehouseType, inventoryType, vendorId, billingWarehouseId, shippingWarehouseId);
      return recv_getWarehouses();
    }

    public void send_getWarehouses(WarehouseType warehouseType, InventoryType inventoryType, long vendorId, long billingWarehouseId, long shippingWarehouseId) throws org.apache.thrift.TException
    {
      getWarehouses_args args = new getWarehouses_args();
      args.setWarehouseType(warehouseType);
      args.setInventoryType(inventoryType);
      args.setVendorId(vendorId);
      args.setBillingWarehouseId(billingWarehouseId);
      args.setShippingWarehouseId(shippingWarehouseId);
      sendBase("getWarehouses", args);
    }

    public List<Warehouse> recv_getWarehouses() throws org.apache.thrift.TException
    {
      getWarehouses_result result = new getWarehouses_result();
      receiveBase(result, "getWarehouses");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getWarehouses failed: unknown result");
    }

    public void resetAvailability(String itemKey, long vendorId, long quantity, long warehouseId) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_resetAvailability(itemKey, vendorId, quantity, warehouseId);
      recv_resetAvailability();
    }

    public void send_resetAvailability(String itemKey, long vendorId, long quantity, long warehouseId) throws org.apache.thrift.TException
    {
      resetAvailability_args args = new resetAvailability_args();
      args.setItemKey(itemKey);
      args.setVendorId(vendorId);
      args.setQuantity(quantity);
      args.setWarehouseId(warehouseId);
      sendBase("resetAvailability", args);
    }

    public void recv_resetAvailability() throws InventoryServiceException, org.apache.thrift.TException
    {
      resetAvailability_result result = new resetAvailability_result();
      receiveBase(result, "resetAvailability");
      if (result.cex != null) {
        throw result.cex;
      }
      return;
    }

    public void resetAvailabilityForWarehouse(long warehouseId) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_resetAvailabilityForWarehouse(warehouseId);
      recv_resetAvailabilityForWarehouse();
    }

    public void send_resetAvailabilityForWarehouse(long warehouseId) throws org.apache.thrift.TException
    {
      resetAvailabilityForWarehouse_args args = new resetAvailabilityForWarehouse_args();
      args.setWarehouseId(warehouseId);
      sendBase("resetAvailabilityForWarehouse", args);
    }

    public void recv_resetAvailabilityForWarehouse() throws InventoryServiceException, org.apache.thrift.TException
    {
      resetAvailabilityForWarehouse_result result = new resetAvailabilityForWarehouse_result();
      receiveBase(result, "resetAvailabilityForWarehouse");
      if (result.cex != null) {
        throw result.cex;
      }
      return;
    }

    public List<String> getItemKeysToBeProcessed(long warehouseId) throws org.apache.thrift.TException
    {
      send_getItemKeysToBeProcessed(warehouseId);
      return recv_getItemKeysToBeProcessed();
    }

    public void send_getItemKeysToBeProcessed(long warehouseId) throws org.apache.thrift.TException
    {
      getItemKeysToBeProcessed_args args = new getItemKeysToBeProcessed_args();
      args.setWarehouseId(warehouseId);
      sendBase("getItemKeysToBeProcessed", args);
    }

    public List<String> recv_getItemKeysToBeProcessed() throws org.apache.thrift.TException
    {
      getItemKeysToBeProcessed_result result = new getItemKeysToBeProcessed_result();
      receiveBase(result, "getItemKeysToBeProcessed");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemKeysToBeProcessed failed: unknown result");
    }

    public void markMissedInventoryUpdatesAsProcessed(String itemKey, long warehouseId) throws org.apache.thrift.TException
    {
      send_markMissedInventoryUpdatesAsProcessed(itemKey, warehouseId);
      recv_markMissedInventoryUpdatesAsProcessed();
    }

    public void send_markMissedInventoryUpdatesAsProcessed(String itemKey, long warehouseId) throws org.apache.thrift.TException
    {
      markMissedInventoryUpdatesAsProcessed_args args = new markMissedInventoryUpdatesAsProcessed_args();
      args.setItemKey(itemKey);
      args.setWarehouseId(warehouseId);
      sendBase("markMissedInventoryUpdatesAsProcessed", args);
    }

    public void recv_markMissedInventoryUpdatesAsProcessed() throws org.apache.thrift.TException
    {
      markMissedInventoryUpdatesAsProcessed_result result = new markMissedInventoryUpdatesAsProcessed_result();
      receiveBase(result, "markMissedInventoryUpdatesAsProcessed");
      return;
    }

    public Map<String,Map<Long,Long>> getIgnoredItemKeys() throws org.apache.thrift.TException
    {
      send_getIgnoredItemKeys();
      return recv_getIgnoredItemKeys();
    }

    public void send_getIgnoredItemKeys() throws org.apache.thrift.TException
    {
      getIgnoredItemKeys_args args = new getIgnoredItemKeys_args();
      sendBase("getIgnoredItemKeys", args);
    }

    public Map<String,Map<Long,Long>> recv_getIgnoredItemKeys() throws org.apache.thrift.TException
    {
      getIgnoredItemKeys_result result = new getIgnoredItemKeys_result();
      receiveBase(result, "getIgnoredItemKeys");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getIgnoredItemKeys failed: unknown result");
    }

    public void addBadInventory(long itemId, long warehouseId, long quantity) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_addBadInventory(itemId, warehouseId, quantity);
      recv_addBadInventory();
    }

    public void send_addBadInventory(long itemId, long warehouseId, long quantity) throws org.apache.thrift.TException
    {
      addBadInventory_args args = new addBadInventory_args();
      args.setItemId(itemId);
      args.setWarehouseId(warehouseId);
      args.setQuantity(quantity);
      sendBase("addBadInventory", args);
    }

    public void recv_addBadInventory() throws InventoryServiceException, org.apache.thrift.TException
    {
      addBadInventory_result result = new addBadInventory_result();
      receiveBase(result, "addBadInventory");
      if (result.cex != null) {
        throw result.cex;
      }
      return;
    }

    public List<Warehouse> getShippingLocations() throws org.apache.thrift.TException
    {
      send_getShippingLocations();
      return recv_getShippingLocations();
    }

    public void send_getShippingLocations() throws org.apache.thrift.TException
    {
      getShippingLocations_args args = new getShippingLocations_args();
      sendBase("getShippingLocations", args);
    }

    public List<Warehouse> recv_getShippingLocations() throws org.apache.thrift.TException
    {
      getShippingLocations_result result = new getShippingLocations_result();
      receiveBase(result, "getShippingLocations");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getShippingLocations failed: unknown result");
    }

    public List<VendorItemMapping> getAllVendorItemMappings() throws org.apache.thrift.TException
    {
      send_getAllVendorItemMappings();
      return recv_getAllVendorItemMappings();
    }

    public void send_getAllVendorItemMappings() throws org.apache.thrift.TException
    {
      getAllVendorItemMappings_args args = new getAllVendorItemMappings_args();
      sendBase("getAllVendorItemMappings", args);
    }

    public List<VendorItemMapping> recv_getAllVendorItemMappings() throws org.apache.thrift.TException
    {
      getAllVendorItemMappings_result result = new getAllVendorItemMappings_result();
      receiveBase(result, "getAllVendorItemMappings");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllVendorItemMappings failed: unknown result");
    }

    public Map<Long,ItemInventory> getInventorySnapshot(long warehouseId) throws org.apache.thrift.TException
    {
      send_getInventorySnapshot(warehouseId);
      return recv_getInventorySnapshot();
    }

    public void send_getInventorySnapshot(long warehouseId) throws org.apache.thrift.TException
    {
      getInventorySnapshot_args args = new getInventorySnapshot_args();
      args.setWarehouseId(warehouseId);
      sendBase("getInventorySnapshot", args);
    }

    public Map<Long,ItemInventory> recv_getInventorySnapshot() throws org.apache.thrift.TException
    {
      getInventorySnapshot_result result = new getInventorySnapshot_result();
      receiveBase(result, "getInventorySnapshot");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventorySnapshot failed: unknown result");
    }

    public void clearItemAvailabilityCache() throws org.apache.thrift.TException
    {
      send_clearItemAvailabilityCache();
      recv_clearItemAvailabilityCache();
    }

    public void send_clearItemAvailabilityCache() throws org.apache.thrift.TException
    {
      clearItemAvailabilityCache_args args = new clearItemAvailabilityCache_args();
      sendBase("clearItemAvailabilityCache", args);
    }

    public void recv_clearItemAvailabilityCache() throws org.apache.thrift.TException
    {
      clearItemAvailabilityCache_result result = new clearItemAvailabilityCache_result();
      receiveBase(result, "clearItemAvailabilityCache");
      return;
    }

    public void updateVendorString(long warehouseId, String vendorString) throws org.apache.thrift.TException
    {
      send_updateVendorString(warehouseId, vendorString);
      recv_updateVendorString();
    }

    public void send_updateVendorString(long warehouseId, String vendorString) throws org.apache.thrift.TException
    {
      updateVendorString_args args = new updateVendorString_args();
      args.setWarehouseId(warehouseId);
      args.setVendorString(vendorString);
      sendBase("updateVendorString", args);
    }

    public void recv_updateVendorString() throws org.apache.thrift.TException
    {
      updateVendorString_result result = new updateVendorString_result();
      receiveBase(result, "updateVendorString");
      return;
    }

    public void clearItemAvailabilityCacheForItem(long item_id) throws org.apache.thrift.TException
    {
      send_clearItemAvailabilityCacheForItem(item_id);
      recv_clearItemAvailabilityCacheForItem();
    }

    public void send_clearItemAvailabilityCacheForItem(long item_id) throws org.apache.thrift.TException
    {
      clearItemAvailabilityCacheForItem_args args = new clearItemAvailabilityCacheForItem_args();
      args.setItem_id(item_id);
      sendBase("clearItemAvailabilityCacheForItem", args);
    }

    public void recv_clearItemAvailabilityCacheForItem() throws org.apache.thrift.TException
    {
      clearItemAvailabilityCacheForItem_result result = new clearItemAvailabilityCacheForItem_result();
      receiveBase(result, "clearItemAvailabilityCacheForItem");
      return;
    }

    public long getOurWarehouseIdForVendor(long vendorId, long billingWarehouseId) throws org.apache.thrift.TException
    {
      send_getOurWarehouseIdForVendor(vendorId, billingWarehouseId);
      return recv_getOurWarehouseIdForVendor();
    }

    public void send_getOurWarehouseIdForVendor(long vendorId, long billingWarehouseId) throws org.apache.thrift.TException
    {
      getOurWarehouseIdForVendor_args args = new getOurWarehouseIdForVendor_args();
      args.setVendorId(vendorId);
      args.setBillingWarehouseId(billingWarehouseId);
      sendBase("getOurWarehouseIdForVendor", args);
    }

    public long recv_getOurWarehouseIdForVendor() throws org.apache.thrift.TException
    {
      getOurWarehouseIdForVendor_result result = new getOurWarehouseIdForVendor_result();
      receiveBase(result, "getOurWarehouseIdForVendor");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOurWarehouseIdForVendor failed: unknown result");
    }

    public Map<Long,Long> getItemAvailabilitiesAtOurWarehouses(List<Long> item_ids) throws org.apache.thrift.TException
    {
      send_getItemAvailabilitiesAtOurWarehouses(item_ids);
      return recv_getItemAvailabilitiesAtOurWarehouses();
    }

    public void send_getItemAvailabilitiesAtOurWarehouses(List<Long> item_ids) throws org.apache.thrift.TException
    {
      getItemAvailabilitiesAtOurWarehouses_args args = new getItemAvailabilitiesAtOurWarehouses_args();
      args.setItem_ids(item_ids);
      sendBase("getItemAvailabilitiesAtOurWarehouses", args);
    }

    public Map<Long,Long> recv_getItemAvailabilitiesAtOurWarehouses() throws org.apache.thrift.TException
    {
      getItemAvailabilitiesAtOurWarehouses_result result = new getItemAvailabilitiesAtOurWarehouses_result();
      receiveBase(result, "getItemAvailabilitiesAtOurWarehouses");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemAvailabilitiesAtOurWarehouses failed: unknown result");
    }

    public List<Long> getMonitoredWarehouseForVendors(List<Long> vendorIds) throws org.apache.thrift.TException
    {
      send_getMonitoredWarehouseForVendors(vendorIds);
      return recv_getMonitoredWarehouseForVendors();
    }

    public void send_getMonitoredWarehouseForVendors(List<Long> vendorIds) throws org.apache.thrift.TException
    {
      getMonitoredWarehouseForVendors_args args = new getMonitoredWarehouseForVendors_args();
      args.setVendorIds(vendorIds);
      sendBase("getMonitoredWarehouseForVendors", args);
    }

    public List<Long> recv_getMonitoredWarehouseForVendors() throws org.apache.thrift.TException
    {
      getMonitoredWarehouseForVendors_result result = new getMonitoredWarehouseForVendors_result();
      receiveBase(result, "getMonitoredWarehouseForVendors");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getMonitoredWarehouseForVendors failed: unknown result");
    }

    public List<IgnoredInventoryUpdateItems> getIgnoredWarehouseidsAndItemids() throws org.apache.thrift.TException
    {
      send_getIgnoredWarehouseidsAndItemids();
      return recv_getIgnoredWarehouseidsAndItemids();
    }

    public void send_getIgnoredWarehouseidsAndItemids() throws org.apache.thrift.TException
    {
      getIgnoredWarehouseidsAndItemids_args args = new getIgnoredWarehouseidsAndItemids_args();
      sendBase("getIgnoredWarehouseidsAndItemids", args);
    }

    public List<IgnoredInventoryUpdateItems> recv_getIgnoredWarehouseidsAndItemids() throws org.apache.thrift.TException
    {
      getIgnoredWarehouseidsAndItemids_result result = new getIgnoredWarehouseidsAndItemids_result();
      receiveBase(result, "getIgnoredWarehouseidsAndItemids");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getIgnoredWarehouseidsAndItemids failed: unknown result");
    }

    public boolean insertItemtoIgnoreInventoryUpdatelist(long item_id, long warehouse_id) throws org.apache.thrift.TException
    {
      send_insertItemtoIgnoreInventoryUpdatelist(item_id, warehouse_id);
      return recv_insertItemtoIgnoreInventoryUpdatelist();
    }

    public void send_insertItemtoIgnoreInventoryUpdatelist(long item_id, long warehouse_id) throws org.apache.thrift.TException
    {
      insertItemtoIgnoreInventoryUpdatelist_args args = new insertItemtoIgnoreInventoryUpdatelist_args();
      args.setItem_id(item_id);
      args.setWarehouse_id(warehouse_id);
      sendBase("insertItemtoIgnoreInventoryUpdatelist", args);
    }

    public boolean recv_insertItemtoIgnoreInventoryUpdatelist() throws org.apache.thrift.TException
    {
      insertItemtoIgnoreInventoryUpdatelist_result result = new insertItemtoIgnoreInventoryUpdatelist_result();
      receiveBase(result, "insertItemtoIgnoreInventoryUpdatelist");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "insertItemtoIgnoreInventoryUpdatelist failed: unknown result");
    }

    public boolean deleteItemFromIgnoredInventoryUpdateList(long item_id, long warehouse_id) throws org.apache.thrift.TException
    {
      send_deleteItemFromIgnoredInventoryUpdateList(item_id, warehouse_id);
      return recv_deleteItemFromIgnoredInventoryUpdateList();
    }

    public void send_deleteItemFromIgnoredInventoryUpdateList(long item_id, long warehouse_id) throws org.apache.thrift.TException
    {
      deleteItemFromIgnoredInventoryUpdateList_args args = new deleteItemFromIgnoredInventoryUpdateList_args();
      args.setItem_id(item_id);
      args.setWarehouse_id(warehouse_id);
      sendBase("deleteItemFromIgnoredInventoryUpdateList", args);
    }

    public boolean recv_deleteItemFromIgnoredInventoryUpdateList() throws org.apache.thrift.TException
    {
      deleteItemFromIgnoredInventoryUpdateList_result result = new deleteItemFromIgnoredInventoryUpdateList_result();
      receiveBase(result, "deleteItemFromIgnoredInventoryUpdateList");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "deleteItemFromIgnoredInventoryUpdateList failed: unknown result");
    }

    public int getAllIgnoredInventoryupdateItemsCount() throws org.apache.thrift.TException
    {
      send_getAllIgnoredInventoryupdateItemsCount();
      return recv_getAllIgnoredInventoryupdateItemsCount();
    }

    public void send_getAllIgnoredInventoryupdateItemsCount() throws org.apache.thrift.TException
    {
      getAllIgnoredInventoryupdateItemsCount_args args = new getAllIgnoredInventoryupdateItemsCount_args();
      sendBase("getAllIgnoredInventoryupdateItemsCount", args);
    }

    public int recv_getAllIgnoredInventoryupdateItemsCount() throws org.apache.thrift.TException
    {
      getAllIgnoredInventoryupdateItemsCount_result result = new getAllIgnoredInventoryupdateItemsCount_result();
      receiveBase(result, "getAllIgnoredInventoryupdateItemsCount");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllIgnoredInventoryupdateItemsCount failed: unknown result");
    }

    public List<Long> getIgnoredInventoryUpdateItemids(int offset, int limit) throws org.apache.thrift.TException
    {
      send_getIgnoredInventoryUpdateItemids(offset, limit);
      return recv_getIgnoredInventoryUpdateItemids();
    }

    public void send_getIgnoredInventoryUpdateItemids(int offset, int limit) throws org.apache.thrift.TException
    {
      getIgnoredInventoryUpdateItemids_args args = new getIgnoredInventoryUpdateItemids_args();
      args.setOffset(offset);
      args.setLimit(limit);
      sendBase("getIgnoredInventoryUpdateItemids", args);
    }

    public List<Long> recv_getIgnoredInventoryUpdateItemids() throws org.apache.thrift.TException
    {
      getIgnoredInventoryUpdateItemids_result result = new getIgnoredInventoryUpdateItemids_result();
      receiveBase(result, "getIgnoredInventoryUpdateItemids");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getIgnoredInventoryUpdateItemids failed: unknown result");
    }

    public void updateItemStockPurchaseParams(long item_id, int numOfDaysStock, long minStockLevel) throws org.apache.thrift.TException
    {
      send_updateItemStockPurchaseParams(item_id, numOfDaysStock, minStockLevel);
      recv_updateItemStockPurchaseParams();
    }

    public void send_updateItemStockPurchaseParams(long item_id, int numOfDaysStock, long minStockLevel) throws org.apache.thrift.TException
    {
      updateItemStockPurchaseParams_args args = new updateItemStockPurchaseParams_args();
      args.setItem_id(item_id);
      args.setNumOfDaysStock(numOfDaysStock);
      args.setMinStockLevel(minStockLevel);
      sendBase("updateItemStockPurchaseParams", args);
    }

    public void recv_updateItemStockPurchaseParams() throws org.apache.thrift.TException
    {
      updateItemStockPurchaseParams_result result = new updateItemStockPurchaseParams_result();
      receiveBase(result, "updateItemStockPurchaseParams");
      return;
    }

    public ItemStockPurchaseParams getItemStockPurchaseParams(long itemId) throws org.apache.thrift.TException
    {
      send_getItemStockPurchaseParams(itemId);
      return recv_getItemStockPurchaseParams();
    }

    public void send_getItemStockPurchaseParams(long itemId) throws org.apache.thrift.TException
    {
      getItemStockPurchaseParams_args args = new getItemStockPurchaseParams_args();
      args.setItemId(itemId);
      sendBase("getItemStockPurchaseParams", args);
    }

    public ItemStockPurchaseParams recv_getItemStockPurchaseParams() throws org.apache.thrift.TException
    {
      getItemStockPurchaseParams_result result = new getItemStockPurchaseParams_result();
      receiveBase(result, "getItemStockPurchaseParams");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemStockPurchaseParams failed: unknown result");
    }

    public void addOosStatusForItem(Map<Long,Boolean> oosStatusMap, long date) throws org.apache.thrift.TException
    {
      send_addOosStatusForItem(oosStatusMap, date);
      recv_addOosStatusForItem();
    }

    public void send_addOosStatusForItem(Map<Long,Boolean> oosStatusMap, long date) throws org.apache.thrift.TException
    {
      addOosStatusForItem_args args = new addOosStatusForItem_args();
      args.setOosStatusMap(oosStatusMap);
      args.setDate(date);
      sendBase("addOosStatusForItem", args);
    }

    public void recv_addOosStatusForItem() throws org.apache.thrift.TException
    {
      addOosStatusForItem_result result = new addOosStatusForItem_result();
      receiveBase(result, "addOosStatusForItem");
      return;
    }

    public List<OOSStatus> getOosStatusesForXDaysForItem(long itemId, int sourceId, int days) throws org.apache.thrift.TException
    {
      send_getOosStatusesForXDaysForItem(itemId, sourceId, days);
      return recv_getOosStatusesForXDaysForItem();
    }

    public void send_getOosStatusesForXDaysForItem(long itemId, int sourceId, int days) throws org.apache.thrift.TException
    {
      getOosStatusesForXDaysForItem_args args = new getOosStatusesForXDaysForItem_args();
      args.setItemId(itemId);
      args.setSourceId(sourceId);
      args.setDays(days);
      sendBase("getOosStatusesForXDaysForItem", args);
    }

    public List<OOSStatus> recv_getOosStatusesForXDaysForItem() throws org.apache.thrift.TException
    {
      getOosStatusesForXDaysForItem_result result = new getOosStatusesForXDaysForItem_result();
      receiveBase(result, "getOosStatusesForXDaysForItem");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOosStatusesForXDaysForItem failed: unknown result");
    }

    public List<OOSStatus> getOosStatusesForXDays(int sourceId, int days) throws org.apache.thrift.TException
    {
      send_getOosStatusesForXDays(sourceId, days);
      return recv_getOosStatusesForXDays();
    }

    public void send_getOosStatusesForXDays(int sourceId, int days) throws org.apache.thrift.TException
    {
      getOosStatusesForXDays_args args = new getOosStatusesForXDays_args();
      args.setSourceId(sourceId);
      args.setDays(days);
      sendBase("getOosStatusesForXDays", args);
    }

    public List<OOSStatus> recv_getOosStatusesForXDays() throws org.apache.thrift.TException
    {
      getOosStatusesForXDays_result result = new getOosStatusesForXDays_result();
      receiveBase(result, "getOosStatusesForXDays");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOosStatusesForXDays failed: unknown result");
    }

    public List<VendorItemPricing> getAllVendorItemPricing(long itemId, long vendorId) throws org.apache.thrift.TException
    {
      send_getAllVendorItemPricing(itemId, vendorId);
      return recv_getAllVendorItemPricing();
    }

    public void send_getAllVendorItemPricing(long itemId, long vendorId) throws org.apache.thrift.TException
    {
      getAllVendorItemPricing_args args = new getAllVendorItemPricing_args();
      args.setItemId(itemId);
      args.setVendorId(vendorId);
      sendBase("getAllVendorItemPricing", args);
    }

    public List<VendorItemPricing> recv_getAllVendorItemPricing() throws org.apache.thrift.TException
    {
      getAllVendorItemPricing_result result = new getAllVendorItemPricing_result();
      receiveBase(result, "getAllVendorItemPricing");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllVendorItemPricing failed: unknown result");
    }

    public List<ItemStockPurchaseParams> getNonZeroItemStockPurchaseParams() throws org.apache.thrift.TException
    {
      send_getNonZeroItemStockPurchaseParams();
      return recv_getNonZeroItemStockPurchaseParams();
    }

    public void send_getNonZeroItemStockPurchaseParams() throws org.apache.thrift.TException
    {
      getNonZeroItemStockPurchaseParams_args args = new getNonZeroItemStockPurchaseParams_args();
      sendBase("getNonZeroItemStockPurchaseParams", args);
    }

    public List<ItemStockPurchaseParams> recv_getNonZeroItemStockPurchaseParams() throws org.apache.thrift.TException
    {
      getNonZeroItemStockPurchaseParams_result result = new getNonZeroItemStockPurchaseParams_result();
      receiveBase(result, "getNonZeroItemStockPurchaseParams");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNonZeroItemStockPurchaseParams failed: unknown result");
    }

    public List<AvailableAndReservedStock> getBillableInventoryAndPendingOrders() throws org.apache.thrift.TException
    {
      send_getBillableInventoryAndPendingOrders();
      return recv_getBillableInventoryAndPendingOrders();
    }

    public void send_getBillableInventoryAndPendingOrders() throws org.apache.thrift.TException
    {
      getBillableInventoryAndPendingOrders_args args = new getBillableInventoryAndPendingOrders_args();
      sendBase("getBillableInventoryAndPendingOrders", args);
    }

    public List<AvailableAndReservedStock> recv_getBillableInventoryAndPendingOrders() throws org.apache.thrift.TException
    {
      getBillableInventoryAndPendingOrders_result result = new getBillableInventoryAndPendingOrders_result();
      receiveBase(result, "getBillableInventoryAndPendingOrders");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getBillableInventoryAndPendingOrders failed: unknown result");
    }

    public String getWarehouseName(long warehouse_id) throws org.apache.thrift.TException
    {
      send_getWarehouseName(warehouse_id);
      return recv_getWarehouseName();
    }

    public void send_getWarehouseName(long warehouse_id) throws org.apache.thrift.TException
    {
      getWarehouseName_args args = new getWarehouseName_args();
      args.setWarehouse_id(warehouse_id);
      sendBase("getWarehouseName", args);
    }

    public String recv_getWarehouseName() throws org.apache.thrift.TException
    {
      getWarehouseName_result result = new getWarehouseName_result();
      receiveBase(result, "getWarehouseName");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getWarehouseName failed: unknown result");
    }

    public AmazonInventorySnapshot getAmazonInventoryForItem(long item_id) throws org.apache.thrift.TException
    {
      send_getAmazonInventoryForItem(item_id);
      return recv_getAmazonInventoryForItem();
    }

    public void send_getAmazonInventoryForItem(long item_id) throws org.apache.thrift.TException
    {
      getAmazonInventoryForItem_args args = new getAmazonInventoryForItem_args();
      args.setItem_id(item_id);
      sendBase("getAmazonInventoryForItem", args);
    }

    public AmazonInventorySnapshot recv_getAmazonInventoryForItem() throws org.apache.thrift.TException
    {
      getAmazonInventoryForItem_result result = new getAmazonInventoryForItem_result();
      receiveBase(result, "getAmazonInventoryForItem");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAmazonInventoryForItem failed: unknown result");
    }

    public List<AmazonInventorySnapshot> getAllAmazonInventory() throws org.apache.thrift.TException
    {
      send_getAllAmazonInventory();
      return recv_getAllAmazonInventory();
    }

    public void send_getAllAmazonInventory() throws org.apache.thrift.TException
    {
      getAllAmazonInventory_args args = new getAllAmazonInventory_args();
      sendBase("getAllAmazonInventory", args);
    }

    public List<AmazonInventorySnapshot> recv_getAllAmazonInventory() throws org.apache.thrift.TException
    {
      getAllAmazonInventory_result result = new getAllAmazonInventory_result();
      receiveBase(result, "getAllAmazonInventory");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllAmazonInventory failed: unknown result");
    }

    public void addOrUpdateAmazonInventoryForItem(AmazonInventorySnapshot amazonInventorySnapshot, long time) throws org.apache.thrift.TException
    {
      send_addOrUpdateAmazonInventoryForItem(amazonInventorySnapshot, time);
      recv_addOrUpdateAmazonInventoryForItem();
    }

    public void send_addOrUpdateAmazonInventoryForItem(AmazonInventorySnapshot amazonInventorySnapshot, long time) throws org.apache.thrift.TException
    {
      addOrUpdateAmazonInventoryForItem_args args = new addOrUpdateAmazonInventoryForItem_args();
      args.setAmazonInventorySnapshot(amazonInventorySnapshot);
      args.setTime(time);
      sendBase("addOrUpdateAmazonInventoryForItem", args);
    }

    public void recv_addOrUpdateAmazonInventoryForItem() throws org.apache.thrift.TException
    {
      addOrUpdateAmazonInventoryForItem_result result = new addOrUpdateAmazonInventoryForItem_result();
      receiveBase(result, "addOrUpdateAmazonInventoryForItem");
      return;
    }

    public String getLastNdaySaleForItem(long itemId, long numberOfDays) throws org.apache.thrift.TException
    {
      send_getLastNdaySaleForItem(itemId, numberOfDays);
      return recv_getLastNdaySaleForItem();
    }

    public void send_getLastNdaySaleForItem(long itemId, long numberOfDays) throws org.apache.thrift.TException
    {
      getLastNdaySaleForItem_args args = new getLastNdaySaleForItem_args();
      args.setItemId(itemId);
      args.setNumberOfDays(numberOfDays);
      sendBase("getLastNdaySaleForItem", args);
    }

    public String recv_getLastNdaySaleForItem() throws org.apache.thrift.TException
    {
      getLastNdaySaleForItem_result result = new getLastNdaySaleForItem_result();
      receiveBase(result, "getLastNdaySaleForItem");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getLastNdaySaleForItem failed: unknown result");
    }

    public void addOrUpdateAmazonFbaInventory(AmazonFbaInventorySnapshot amazonfbainventorysnapshot) throws org.apache.thrift.TException
    {
      send_addOrUpdateAmazonFbaInventory(amazonfbainventorysnapshot);
      recv_addOrUpdateAmazonFbaInventory();
    }

    public void send_addOrUpdateAmazonFbaInventory(AmazonFbaInventorySnapshot amazonfbainventorysnapshot) throws org.apache.thrift.TException
    {
      addOrUpdateAmazonFbaInventory_args args = new addOrUpdateAmazonFbaInventory_args();
      args.setAmazonfbainventorysnapshot(amazonfbainventorysnapshot);
      sendBase("addOrUpdateAmazonFbaInventory", args);
    }

    public void recv_addOrUpdateAmazonFbaInventory() throws org.apache.thrift.TException
    {
      addOrUpdateAmazonFbaInventory_result result = new addOrUpdateAmazonFbaInventory_result();
      receiveBase(result, "addOrUpdateAmazonFbaInventory");
      return;
    }

    public void addUpdateHoldInventory(long itemId, long warehouseId, long holdQuantity, long source) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_addUpdateHoldInventory(itemId, warehouseId, holdQuantity, source);
      recv_addUpdateHoldInventory();
    }

    public void send_addUpdateHoldInventory(long itemId, long warehouseId, long holdQuantity, long source) throws org.apache.thrift.TException
    {
      addUpdateHoldInventory_args args = new addUpdateHoldInventory_args();
      args.setItemId(itemId);
      args.setWarehouseId(warehouseId);
      args.setHoldQuantity(holdQuantity);
      args.setSource(source);
      sendBase("addUpdateHoldInventory", args);
    }

    public void recv_addUpdateHoldInventory() throws InventoryServiceException, org.apache.thrift.TException
    {
      addUpdateHoldInventory_result result = new addUpdateHoldInventory_result();
      receiveBase(result, "addUpdateHoldInventory");
      if (result.cex != null) {
        throw result.cex;
      }
      return;
    }

    public List<AmazonFbaInventorySnapshot> getAmazonFbaItemInventory(long itemId) throws org.apache.thrift.TException
    {
      send_getAmazonFbaItemInventory(itemId);
      return recv_getAmazonFbaItemInventory();
    }

    public void send_getAmazonFbaItemInventory(long itemId) throws org.apache.thrift.TException
    {
      getAmazonFbaItemInventory_args args = new getAmazonFbaItemInventory_args();
      args.setItemId(itemId);
      sendBase("getAmazonFbaItemInventory", args);
    }

    public List<AmazonFbaInventorySnapshot> recv_getAmazonFbaItemInventory() throws org.apache.thrift.TException
    {
      getAmazonFbaItemInventory_result result = new getAmazonFbaItemInventory_result();
      receiveBase(result, "getAmazonFbaItemInventory");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAmazonFbaItemInventory failed: unknown result");
    }

    public List<AmazonFbaInventorySnapshot> getAllAmazonFbaItemInventory() throws org.apache.thrift.TException
    {
      send_getAllAmazonFbaItemInventory();
      return recv_getAllAmazonFbaItemInventory();
    }

    public void send_getAllAmazonFbaItemInventory() throws org.apache.thrift.TException
    {
      getAllAmazonFbaItemInventory_args args = new getAllAmazonFbaItemInventory_args();
      sendBase("getAllAmazonFbaItemInventory", args);
    }

    public List<AmazonFbaInventorySnapshot> recv_getAllAmazonFbaItemInventory() throws org.apache.thrift.TException
    {
      getAllAmazonFbaItemInventory_result result = new getAllAmazonFbaItemInventory_result();
      receiveBase(result, "getAllAmazonFbaItemInventory");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllAmazonFbaItemInventory failed: unknown result");
    }

    public List<Long> getOursGoodWarehouseIdsForLocation(long state_id) throws org.apache.thrift.TException
    {
      send_getOursGoodWarehouseIdsForLocation(state_id);
      return recv_getOursGoodWarehouseIdsForLocation();
    }

    public void send_getOursGoodWarehouseIdsForLocation(long state_id) throws org.apache.thrift.TException
    {
      getOursGoodWarehouseIdsForLocation_args args = new getOursGoodWarehouseIdsForLocation_args();
      args.setState_id(state_id);
      sendBase("getOursGoodWarehouseIdsForLocation", args);
    }

    public List<Long> recv_getOursGoodWarehouseIdsForLocation() throws org.apache.thrift.TException
    {
      getOursGoodWarehouseIdsForLocation_result result = new getOursGoodWarehouseIdsForLocation_result();
      receiveBase(result, "getOursGoodWarehouseIdsForLocation");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getOursGoodWarehouseIdsForLocation failed: unknown result");
    }

    public long getHoldInventoryDetailForItemForWarehouseIdExceptSource(long id, long warehouse_id, long source) throws org.apache.thrift.TException
    {
      send_getHoldInventoryDetailForItemForWarehouseIdExceptSource(id, warehouse_id, source);
      return recv_getHoldInventoryDetailForItemForWarehouseIdExceptSource();
    }

    public void send_getHoldInventoryDetailForItemForWarehouseIdExceptSource(long id, long warehouse_id, long source) throws org.apache.thrift.TException
    {
      getHoldInventoryDetailForItemForWarehouseIdExceptSource_args args = new getHoldInventoryDetailForItemForWarehouseIdExceptSource_args();
      args.setId(id);
      args.setWarehouse_id(warehouse_id);
      args.setSource(source);
      sendBase("getHoldInventoryDetailForItemForWarehouseIdExceptSource", args);
    }

    public long recv_getHoldInventoryDetailForItemForWarehouseIdExceptSource() throws org.apache.thrift.TException
    {
      getHoldInventoryDetailForItemForWarehouseIdExceptSource_result result = new getHoldInventoryDetailForItemForWarehouseIdExceptSource_result();
      receiveBase(result, "getHoldInventoryDetailForItemForWarehouseIdExceptSource");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getHoldInventoryDetailForItemForWarehouseIdExceptSource failed: unknown result");
    }

    public SnapdealInventoryItem getSnapdealInventoryForItem(long item_id) throws org.apache.thrift.TException
    {
      send_getSnapdealInventoryForItem(item_id);
      return recv_getSnapdealInventoryForItem();
    }

    public void send_getSnapdealInventoryForItem(long item_id) throws org.apache.thrift.TException
    {
      getSnapdealInventoryForItem_args args = new getSnapdealInventoryForItem_args();
      args.setItem_id(item_id);
      sendBase("getSnapdealInventoryForItem", args);
    }

    public SnapdealInventoryItem recv_getSnapdealInventoryForItem() throws org.apache.thrift.TException
    {
      getSnapdealInventoryForItem_result result = new getSnapdealInventoryForItem_result();
      receiveBase(result, "getSnapdealInventoryForItem");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSnapdealInventoryForItem failed: unknown result");
    }

    public void addOrUpdateSnapdealInventoryForItem(SnapdealInventoryItem snapdealinventoryitem) throws org.apache.thrift.TException
    {
      send_addOrUpdateSnapdealInventoryForItem(snapdealinventoryitem);
      recv_addOrUpdateSnapdealInventoryForItem();
    }

    public void send_addOrUpdateSnapdealInventoryForItem(SnapdealInventoryItem snapdealinventoryitem) throws org.apache.thrift.TException
    {
      addOrUpdateSnapdealInventoryForItem_args args = new addOrUpdateSnapdealInventoryForItem_args();
      args.setSnapdealinventoryitem(snapdealinventoryitem);
      sendBase("addOrUpdateSnapdealInventoryForItem", args);
    }

    public void recv_addOrUpdateSnapdealInventoryForItem() throws org.apache.thrift.TException
    {
      addOrUpdateSnapdealInventoryForItem_result result = new addOrUpdateSnapdealInventoryForItem_result();
      receiveBase(result, "addOrUpdateSnapdealInventoryForItem");
      return;
    }

    public double getNlcForWarehouse(long warehouse_id, long item_id) throws org.apache.thrift.TException
    {
      send_getNlcForWarehouse(warehouse_id, item_id);
      return recv_getNlcForWarehouse();
    }

    public void send_getNlcForWarehouse(long warehouse_id, long item_id) throws org.apache.thrift.TException
    {
      getNlcForWarehouse_args args = new getNlcForWarehouse_args();
      args.setWarehouse_id(warehouse_id);
      args.setItem_id(item_id);
      sendBase("getNlcForWarehouse", args);
    }

    public double recv_getNlcForWarehouse() throws org.apache.thrift.TException
    {
      getNlcForWarehouse_result result = new getNlcForWarehouse_result();
      receiveBase(result, "getNlcForWarehouse");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNlcForWarehouse failed: unknown result");
    }

    public Map<Integer,Long> getHeldInventoryMapForItem(long item_id, long warehouse_id) throws org.apache.thrift.TException
    {
      send_getHeldInventoryMapForItem(item_id, warehouse_id);
      return recv_getHeldInventoryMapForItem();
    }

    public void send_getHeldInventoryMapForItem(long item_id, long warehouse_id) throws org.apache.thrift.TException
    {
      getHeldInventoryMapForItem_args args = new getHeldInventoryMapForItem_args();
      args.setItem_id(item_id);
      args.setWarehouse_id(warehouse_id);
      sendBase("getHeldInventoryMapForItem", args);
    }

    public Map<Integer,Long> recv_getHeldInventoryMapForItem() throws org.apache.thrift.TException
    {
      getHeldInventoryMapForItem_result result = new getHeldInventoryMapForItem_result();
      receiveBase(result, "getHeldInventoryMapForItem");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getHeldInventoryMapForItem failed: unknown result");
    }

    public void addOrUpdateAllAmazonFbaInventory(List<AmazonFbaInventorySnapshot> allamazonfbainventorysnapshot) throws org.apache.thrift.TException
    {
      send_addOrUpdateAllAmazonFbaInventory(allamazonfbainventorysnapshot);
      recv_addOrUpdateAllAmazonFbaInventory();
    }

    public void send_addOrUpdateAllAmazonFbaInventory(List<AmazonFbaInventorySnapshot> allamazonfbainventorysnapshot) throws org.apache.thrift.TException
    {
      addOrUpdateAllAmazonFbaInventory_args args = new addOrUpdateAllAmazonFbaInventory_args();
      args.setAllamazonfbainventorysnapshot(allamazonfbainventorysnapshot);
      sendBase("addOrUpdateAllAmazonFbaInventory", args);
    }

    public void recv_addOrUpdateAllAmazonFbaInventory() throws org.apache.thrift.TException
    {
      addOrUpdateAllAmazonFbaInventory_result result = new addOrUpdateAllAmazonFbaInventory_result();
      receiveBase(result, "addOrUpdateAllAmazonFbaInventory");
      return;
    }

    public void addOrUpdateAllSnapdealInventory(List<SnapdealInventoryItem> allsnapdealinventorysnapshot) throws org.apache.thrift.TException
    {
      send_addOrUpdateAllSnapdealInventory(allsnapdealinventorysnapshot);
      recv_addOrUpdateAllSnapdealInventory();
    }

    public void send_addOrUpdateAllSnapdealInventory(List<SnapdealInventoryItem> allsnapdealinventorysnapshot) throws org.apache.thrift.TException
    {
      addOrUpdateAllSnapdealInventory_args args = new addOrUpdateAllSnapdealInventory_args();
      args.setAllsnapdealinventorysnapshot(allsnapdealinventorysnapshot);
      sendBase("addOrUpdateAllSnapdealInventory", args);
    }

    public void recv_addOrUpdateAllSnapdealInventory() throws org.apache.thrift.TException
    {
      addOrUpdateAllSnapdealInventory_result result = new addOrUpdateAllSnapdealInventory_result();
      receiveBase(result, "addOrUpdateAllSnapdealInventory");
      return;
    }

    public List<SnapdealInventoryItem> getSnapdealInventorySnapshot() throws org.apache.thrift.TException
    {
      send_getSnapdealInventorySnapshot();
      return recv_getSnapdealInventorySnapshot();
    }

    public void send_getSnapdealInventorySnapshot() throws org.apache.thrift.TException
    {
      getSnapdealInventorySnapshot_args args = new getSnapdealInventorySnapshot_args();
      sendBase("getSnapdealInventorySnapshot", args);
    }

    public List<SnapdealInventoryItem> recv_getSnapdealInventorySnapshot() throws org.apache.thrift.TException
    {
      getSnapdealInventorySnapshot_result result = new getSnapdealInventorySnapshot_result();
      receiveBase(result, "getSnapdealInventorySnapshot");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSnapdealInventorySnapshot failed: unknown result");
    }

    public List<HoldInventoryDetail> getHoldInventoryDetails(long itemId, long warehouseId, long source) throws org.apache.thrift.TException
    {
      send_getHoldInventoryDetails(itemId, warehouseId, source);
      return recv_getHoldInventoryDetails();
    }

    public void send_getHoldInventoryDetails(long itemId, long warehouseId, long source) throws org.apache.thrift.TException
    {
      getHoldInventoryDetails_args args = new getHoldInventoryDetails_args();
      args.setItemId(itemId);
      args.setWarehouseId(warehouseId);
      args.setSource(source);
      sendBase("getHoldInventoryDetails", args);
    }

    public List<HoldInventoryDetail> recv_getHoldInventoryDetails() throws org.apache.thrift.TException
    {
      getHoldInventoryDetails_result result = new getHoldInventoryDetails_result();
      receiveBase(result, "getHoldInventoryDetails");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getHoldInventoryDetails failed: unknown result");
    }

    public void addOrUpdateFlipkartInventorySnapshot(List<FlipkartInventorySnapshot> flipkartInventorySnapshot, long time) throws org.apache.thrift.TException
    {
      send_addOrUpdateFlipkartInventorySnapshot(flipkartInventorySnapshot, time);
      recv_addOrUpdateFlipkartInventorySnapshot();
    }

    public void send_addOrUpdateFlipkartInventorySnapshot(List<FlipkartInventorySnapshot> flipkartInventorySnapshot, long time) throws org.apache.thrift.TException
    {
      addOrUpdateFlipkartInventorySnapshot_args args = new addOrUpdateFlipkartInventorySnapshot_args();
      args.setFlipkartInventorySnapshot(flipkartInventorySnapshot);
      args.setTime(time);
      sendBase("addOrUpdateFlipkartInventorySnapshot", args);
    }

    public void recv_addOrUpdateFlipkartInventorySnapshot() throws org.apache.thrift.TException
    {
      addOrUpdateFlipkartInventorySnapshot_result result = new addOrUpdateFlipkartInventorySnapshot_result();
      receiveBase(result, "addOrUpdateFlipkartInventorySnapshot");
      return;
    }

    public List<FlipkartInventorySnapshot> getFlipkartInventorySnapshot() throws org.apache.thrift.TException
    {
      send_getFlipkartInventorySnapshot();
      return recv_getFlipkartInventorySnapshot();
    }

    public void send_getFlipkartInventorySnapshot() throws org.apache.thrift.TException
    {
      getFlipkartInventorySnapshot_args args = new getFlipkartInventorySnapshot_args();
      sendBase("getFlipkartInventorySnapshot", args);
    }

    public List<FlipkartInventorySnapshot> recv_getFlipkartInventorySnapshot() throws org.apache.thrift.TException
    {
      getFlipkartInventorySnapshot_result result = new getFlipkartInventorySnapshot_result();
      receiveBase(result, "getFlipkartInventorySnapshot");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getFlipkartInventorySnapshot failed: unknown result");
    }

    public FlipkartInventorySnapshot getFlipkartlInventoryForItem(long item_id) throws org.apache.thrift.TException
    {
      send_getFlipkartlInventoryForItem(item_id);
      return recv_getFlipkartlInventoryForItem();
    }

    public void send_getFlipkartlInventoryForItem(long item_id) throws org.apache.thrift.TException
    {
      getFlipkartlInventoryForItem_args args = new getFlipkartlInventoryForItem_args();
      args.setItem_id(item_id);
      sendBase("getFlipkartlInventoryForItem", args);
    }

    public FlipkartInventorySnapshot recv_getFlipkartlInventoryForItem() throws org.apache.thrift.TException
    {
      getFlipkartlInventoryForItem_result result = new getFlipkartlInventoryForItem_result();
      receiveBase(result, "getFlipkartlInventoryForItem");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getFlipkartlInventoryForItem failed: unknown result");
    }

    public Map<Long,StateInfo> getStateMaster() throws org.apache.thrift.TException
    {
      send_getStateMaster();
      return recv_getStateMaster();
    }

    public void send_getStateMaster() throws org.apache.thrift.TException
    {
      getStateMaster_args args = new getStateMaster_args();
      sendBase("getStateMaster", args);
    }

    public Map<Long,StateInfo> recv_getStateMaster() throws org.apache.thrift.TException
    {
      getStateMaster_result result = new getStateMaster_result();
      receiveBase(result, "getStateMaster");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getStateMaster failed: unknown result");
    }

    public void updateSnapdealStockAtEOD(List<SnapdealStockAtEOD> allsnapdealstock) throws org.apache.thrift.TException
    {
      send_updateSnapdealStockAtEOD(allsnapdealstock);
      recv_updateSnapdealStockAtEOD();
    }

    public void send_updateSnapdealStockAtEOD(List<SnapdealStockAtEOD> allsnapdealstock) throws org.apache.thrift.TException
    {
      updateSnapdealStockAtEOD_args args = new updateSnapdealStockAtEOD_args();
      args.setAllsnapdealstock(allsnapdealstock);
      sendBase("updateSnapdealStockAtEOD", args);
    }

    public void recv_updateSnapdealStockAtEOD() throws org.apache.thrift.TException
    {
      updateSnapdealStockAtEOD_result result = new updateSnapdealStockAtEOD_result();
      receiveBase(result, "updateSnapdealStockAtEOD");
      return;
    }

    public void updateFlipkartStockAtEOD(List<FlipkartStockAtEOD> allflipkartstock) throws org.apache.thrift.TException
    {
      send_updateFlipkartStockAtEOD(allflipkartstock);
      recv_updateFlipkartStockAtEOD();
    }

    public void send_updateFlipkartStockAtEOD(List<FlipkartStockAtEOD> allflipkartstock) throws org.apache.thrift.TException
    {
      updateFlipkartStockAtEOD_args args = new updateFlipkartStockAtEOD_args();
      args.setAllflipkartstock(allflipkartstock);
      sendBase("updateFlipkartStockAtEOD", args);
    }

    public void recv_updateFlipkartStockAtEOD() throws org.apache.thrift.TException
    {
      updateFlipkartStockAtEOD_result result = new updateFlipkartStockAtEOD_result();
      receiveBase(result, "updateFlipkartStockAtEOD");
      return;
    }

    public double getWanNlcForSource(long item_id, long source) throws org.apache.thrift.TException
    {
      send_getWanNlcForSource(item_id, source);
      return recv_getWanNlcForSource();
    }

    public void send_getWanNlcForSource(long item_id, long source) throws org.apache.thrift.TException
    {
      getWanNlcForSource_args args = new getWanNlcForSource_args();
      args.setItem_id(item_id);
      args.setSource(source);
      sendBase("getWanNlcForSource", args);
    }

    public double recv_getWanNlcForSource() throws org.apache.thrift.TException
    {
      getWanNlcForSource_result result = new getWanNlcForSource_result();
      receiveBase(result, "getWanNlcForSource");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getWanNlcForSource failed: unknown result");
    }

    public List<AmazonFbaInventorySnapshot> getAllAvailableAmazonFbaItemInventory() throws org.apache.thrift.TException
    {
      send_getAllAvailableAmazonFbaItemInventory();
      return recv_getAllAvailableAmazonFbaItemInventory();
    }

    public void send_getAllAvailableAmazonFbaItemInventory() throws org.apache.thrift.TException
    {
      getAllAvailableAmazonFbaItemInventory_args args = new getAllAvailableAmazonFbaItemInventory_args();
      sendBase("getAllAvailableAmazonFbaItemInventory", args);
    }

    public List<AmazonFbaInventorySnapshot> recv_getAllAvailableAmazonFbaItemInventory() throws org.apache.thrift.TException
    {
      getAllAvailableAmazonFbaItemInventory_result result = new getAllAvailableAmazonFbaItemInventory_result();
      receiveBase(result, "getAllAvailableAmazonFbaItemInventory");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAllAvailableAmazonFbaItemInventory failed: unknown result");
    }

    public boolean updateItemAvailabilityForItemIds(List<Long> itemIds) throws org.apache.thrift.TException
    {
      send_updateItemAvailabilityForItemIds(itemIds);
      return recv_updateItemAvailabilityForItemIds();
    }

    public void send_updateItemAvailabilityForItemIds(List<Long> itemIds) throws org.apache.thrift.TException
    {
      updateItemAvailabilityForItemIds_args args = new updateItemAvailabilityForItemIds_args();
      args.setItemIds(itemIds);
      sendBase("updateItemAvailabilityForItemIds", args);
    }

    public boolean recv_updateItemAvailabilityForItemIds() throws org.apache.thrift.TException
    {
      updateItemAvailabilityForItemIds_result result = new updateItemAvailabilityForItemIds_result();
      receiveBase(result, "updateItemAvailabilityForItemIds");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updateItemAvailabilityForItemIds failed: unknown result");
    }

    public List<Long> addVendorItemPricingInBulk(List<VendorItemPricing> vendorItemPricingList) throws org.apache.thrift.TException
    {
      send_addVendorItemPricingInBulk(vendorItemPricingList);
      return recv_addVendorItemPricingInBulk();
    }

    public void send_addVendorItemPricingInBulk(List<VendorItemPricing> vendorItemPricingList) throws org.apache.thrift.TException
    {
      addVendorItemPricingInBulk_args args = new addVendorItemPricingInBulk_args();
      args.setVendorItemPricingList(vendorItemPricingList);
      sendBase("addVendorItemPricingInBulk", args);
    }

    public List<Long> recv_addVendorItemPricingInBulk() throws org.apache.thrift.TException
    {
      addVendorItemPricingInBulk_result result = new addVendorItemPricingInBulk_result();
      receiveBase(result, "addVendorItemPricingInBulk");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addVendorItemPricingInBulk failed: unknown result");
    }

    public void addInventoryInBulk(List<BulkAddInventory> bulkInventoryList) throws InventoryServiceException, org.apache.thrift.TException
    {
      send_addInventoryInBulk(bulkInventoryList);
      recv_addInventoryInBulk();
    }

    public void send_addInventoryInBulk(List<BulkAddInventory> bulkInventoryList) throws org.apache.thrift.TException
    {
      addInventoryInBulk_args args = new addInventoryInBulk_args();
      args.setBulkInventoryList(bulkInventoryList);
      sendBase("addInventoryInBulk", args);
    }

    public void recv_addInventoryInBulk() throws InventoryServiceException, org.apache.thrift.TException
    {
      addInventoryInBulk_result result = new addInventoryInBulk_result();
      receiveBase(result, "addInventoryInBulk");
      if (result.cex != null) {
        throw result.cex;
      }
      return;
    }

    public Map<Long,Long> getFofoAvailability(List<Long> itemIds) throws org.apache.thrift.TException
    {
      send_getFofoAvailability(itemIds);
      return recv_getFofoAvailability();
    }

    public void send_getFofoAvailability(List<Long> itemIds) throws org.apache.thrift.TException
    {
      getFofoAvailability_args args = new getFofoAvailability_args();
      args.setItemIds(itemIds);
      sendBase("getFofoAvailability", args);
    }

    public Map<Long,Long> recv_getFofoAvailability() throws org.apache.thrift.TException
    {
      getFofoAvailability_result result = new getFofoAvailability_result();
      receiveBase(result, "getFofoAvailability");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getFofoAvailability failed: unknown result");
    }

    public Map<Long,Warehouse> getFofoFulFillmentWarehouseMap(List<Long> itemIds) throws org.apache.thrift.TException
    {
      send_getFofoFulFillmentWarehouseMap(itemIds);
      return recv_getFofoFulFillmentWarehouseMap();
    }

    public void send_getFofoFulFillmentWarehouseMap(List<Long> itemIds) throws org.apache.thrift.TException
    {
      getFofoFulFillmentWarehouseMap_args args = new getFofoFulFillmentWarehouseMap_args();
      args.setItemIds(itemIds);
      sendBase("getFofoFulFillmentWarehouseMap", args);
    }

    public Map<Long,Warehouse> recv_getFofoFulFillmentWarehouseMap() throws org.apache.thrift.TException
    {
      getFofoFulFillmentWarehouseMap_result result = new getFofoFulFillmentWarehouseMap_result();
      receiveBase(result, "getFofoFulFillmentWarehouseMap");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getFofoFulFillmentWarehouseMap failed: unknown result");
    }

    public List<ItemLocationAvailability> getItemLocationAvailabilityCache(List<ItemLocationAvailability> itemLocations) throws org.apache.thrift.TException
    {
      send_getItemLocationAvailabilityCache(itemLocations);
      return recv_getItemLocationAvailabilityCache();
    }

    public void send_getItemLocationAvailabilityCache(List<ItemLocationAvailability> itemLocations) throws org.apache.thrift.TException
    {
      getItemLocationAvailabilityCache_args args = new getItemLocationAvailabilityCache_args();
      args.setItemLocations(itemLocations);
      sendBase("getItemLocationAvailabilityCache", args);
    }

    public List<ItemLocationAvailability> recv_getItemLocationAvailabilityCache() throws org.apache.thrift.TException
    {
      getItemLocationAvailabilityCache_result result = new getItemLocationAvailabilityCache_result();
      receiveBase(result, "getItemLocationAvailabilityCache");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemLocationAvailabilityCache failed: unknown result");
    }

    public List<ItemLocationAvailability> getItemLocationAvailabilityCacheByItemId(List<Long> itemIds) throws org.apache.thrift.TException
    {
      send_getItemLocationAvailabilityCacheByItemId(itemIds);
      return recv_getItemLocationAvailabilityCacheByItemId();
    }

    public void send_getItemLocationAvailabilityCacheByItemId(List<Long> itemIds) throws org.apache.thrift.TException
    {
      getItemLocationAvailabilityCacheByItemId_args args = new getItemLocationAvailabilityCacheByItemId_args();
      args.setItemIds(itemIds);
      sendBase("getItemLocationAvailabilityCacheByItemId", args);
    }

    public List<ItemLocationAvailability> recv_getItemLocationAvailabilityCacheByItemId() throws org.apache.thrift.TException
    {
      getItemLocationAvailabilityCacheByItemId_result result = new getItemLocationAvailabilityCacheByItemId_result();
      receiveBase(result, "getItemLocationAvailabilityCacheByItemId");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemLocationAvailabilityCacheByItemId failed: unknown result");
    }

    public String getItemPincodeAvailability(Map<Long,Long> itempricing, String pincode) throws org.apache.thrift.TException
    {
      send_getItemPincodeAvailability(itempricing, pincode);
      return recv_getItemPincodeAvailability();
    }

    public void send_getItemPincodeAvailability(Map<Long,Long> itempricing, String pincode) throws org.apache.thrift.TException
    {
      getItemPincodeAvailability_args args = new getItemPincodeAvailability_args();
      args.setItempricing(itempricing);
      args.setPincode(pincode);
      sendBase("getItemPincodeAvailability", args);
    }

    public String recv_getItemPincodeAvailability() throws org.apache.thrift.TException
    {
      getItemPincodeAvailability_result result = new getItemPincodeAvailability_result();
      receiveBase(result, "getItemPincodeAvailability");
      if (result.isSetSuccess()) {
        return result.success;
      }
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemPincodeAvailability failed: unknown result");
    }

  }
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
      private org.apache.thrift.async.TAsyncClientManager clientManager;
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
        this.clientManager = clientManager;
        this.protocolFactory = protocolFactory;
      }
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
        return new AsyncClient(protocolFactory, clientManager, transport);
      }
    }

    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
      super(protocolFactory, clientManager, transport);
    }

    public void addWarehouse(Warehouse warehouse, org.apache.thrift.async.AsyncMethodCallback<addWarehouse_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addWarehouse_call method_call = new addWarehouse_call(warehouse, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addWarehouse_call extends org.apache.thrift.async.TAsyncMethodCall {
      private Warehouse warehouse;
      public addWarehouse_call(Warehouse warehouse, org.apache.thrift.async.AsyncMethodCallback<addWarehouse_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.warehouse = warehouse;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addWarehouse", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addWarehouse_args args = new addWarehouse_args();
        args.setWarehouse(warehouse);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public long getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_addWarehouse();
      }
    }

    public void addVendor(Vendor vendor, org.apache.thrift.async.AsyncMethodCallback<addVendor_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addVendor_call method_call = new addVendor_call(vendor, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addVendor_call extends org.apache.thrift.async.TAsyncMethodCall {
      private Vendor vendor;
      public addVendor_call(Vendor vendor, org.apache.thrift.async.AsyncMethodCallback<addVendor_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.vendor = vendor;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addVendor", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addVendor_args args = new addVendor_args();
        args.setVendor(vendor);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public long getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_addVendor();
      }
    }

    public void updateInventoryHistory(long warehouse_id, String timestamp, Map<String,Long> availability, org.apache.thrift.async.AsyncMethodCallback<updateInventoryHistory_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateInventoryHistory_call method_call = new updateInventoryHistory_call(warehouse_id, timestamp, availability, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateInventoryHistory_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long warehouse_id;
      private String timestamp;
      private Map<String,Long> availability;
      public updateInventoryHistory_call(long warehouse_id, String timestamp, Map<String,Long> availability, org.apache.thrift.async.AsyncMethodCallback<updateInventoryHistory_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.warehouse_id = warehouse_id;
        this.timestamp = timestamp;
        this.availability = availability;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateInventoryHistory", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateInventoryHistory_args args = new updateInventoryHistory_args();
        args.setWarehouse_id(warehouse_id);
        args.setTimestamp(timestamp);
        args.setAvailability(availability);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_updateInventoryHistory();
      }
    }

    public void updateInventory(long warehouse_id, String timestamp, Map<String,Long> availability, org.apache.thrift.async.AsyncMethodCallback<updateInventory_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateInventory_call method_call = new updateInventory_call(warehouse_id, timestamp, availability, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateInventory_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long warehouse_id;
      private String timestamp;
      private Map<String,Long> availability;
      public updateInventory_call(long warehouse_id, String timestamp, Map<String,Long> availability, org.apache.thrift.async.AsyncMethodCallback<updateInventory_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.warehouse_id = warehouse_id;
        this.timestamp = timestamp;
        this.availability = availability;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateInventory", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateInventory_args args = new updateInventory_args();
        args.setWarehouse_id(warehouse_id);
        args.setTimestamp(timestamp);
        args.setAvailability(availability);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_updateInventory();
      }
    }

    public void addInventory(long itemId, long warehouseId, long quantity, org.apache.thrift.async.AsyncMethodCallback<addInventory_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addInventory_call method_call = new addInventory_call(itemId, warehouseId, quantity, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addInventory_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      private long warehouseId;
      private long quantity;
      public addInventory_call(long itemId, long warehouseId, long quantity, org.apache.thrift.async.AsyncMethodCallback<addInventory_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemId = itemId;
        this.warehouseId = warehouseId;
        this.quantity = quantity;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addInventory", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addInventory_args args = new addInventory_args();
        args.setItemId(itemId);
        args.setWarehouseId(warehouseId);
        args.setQuantity(quantity);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_addInventory();
      }
    }

    public void retireWarehouse(long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<retireWarehouse_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      retireWarehouse_call method_call = new retireWarehouse_call(warehouse_id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class retireWarehouse_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long warehouse_id;
      public retireWarehouse_call(long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<retireWarehouse_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.warehouse_id = warehouse_id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("retireWarehouse", org.apache.thrift.protocol.TMessageType.CALL, 0));
        retireWarehouse_args args = new retireWarehouse_args();
        args.setWarehouse_id(warehouse_id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_retireWarehouse();
      }
    }

    public void getItemInventoryByItemId(long item_id, org.apache.thrift.async.AsyncMethodCallback<getItemInventoryByItemId_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getItemInventoryByItemId_call method_call = new getItemInventoryByItemId_call(item_id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getItemInventoryByItemId_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long item_id;
      public getItemInventoryByItemId_call(long item_id, org.apache.thrift.async.AsyncMethodCallback<getItemInventoryByItemId_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.item_id = item_id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemInventoryByItemId", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getItemInventoryByItemId_args args = new getItemInventoryByItemId_args();
        args.setItem_id(item_id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ItemInventory getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getItemInventoryByItemId();
      }
    }

    public void getItemAvailibilityAtWarehouse(long warehouse_id, long item_id, org.apache.thrift.async.AsyncMethodCallback<getItemAvailibilityAtWarehouse_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getItemAvailibilityAtWarehouse_call method_call = new getItemAvailibilityAtWarehouse_call(warehouse_id, item_id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getItemAvailibilityAtWarehouse_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long warehouse_id;
      private long item_id;
      public getItemAvailibilityAtWarehouse_call(long warehouse_id, long item_id, org.apache.thrift.async.AsyncMethodCallback<getItemAvailibilityAtWarehouse_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.warehouse_id = warehouse_id;
        this.item_id = item_id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemAvailibilityAtWarehouse", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getItemAvailibilityAtWarehouse_args args = new getItemAvailibilityAtWarehouse_args();
        args.setWarehouse_id(warehouse_id);
        args.setItem_id(item_id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public long getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getItemAvailibilityAtWarehouse();
      }
    }

    public void getItemAvailabilityAtLocation(long itemId, long sourceId, long stateId, org.apache.thrift.async.AsyncMethodCallback<getItemAvailabilityAtLocation_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getItemAvailabilityAtLocation_call method_call = new getItemAvailabilityAtLocation_call(itemId, sourceId, stateId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getItemAvailabilityAtLocation_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      private long sourceId;
      private long stateId;
      public getItemAvailabilityAtLocation_call(long itemId, long sourceId, long stateId, org.apache.thrift.async.AsyncMethodCallback<getItemAvailabilityAtLocation_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemId = itemId;
        this.sourceId = sourceId;
        this.stateId = stateId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemAvailabilityAtLocation", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getItemAvailabilityAtLocation_args args = new getItemAvailabilityAtLocation_args();
        args.setItemId(itemId);
        args.setSourceId(sourceId);
        args.setStateId(stateId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Long> getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getItemAvailabilityAtLocation();
      }
    }

    public void getAllWarehouses(boolean isActive, org.apache.thrift.async.AsyncMethodCallback<getAllWarehouses_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAllWarehouses_call method_call = new getAllWarehouses_call(isActive, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAllWarehouses_call extends org.apache.thrift.async.TAsyncMethodCall {
      private boolean isActive;
      public getAllWarehouses_call(boolean isActive, org.apache.thrift.async.AsyncMethodCallback<getAllWarehouses_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.isActive = isActive;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllWarehouses", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAllWarehouses_args args = new getAllWarehouses_args();
        args.setIsActive(isActive);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Warehouse> getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getAllWarehouses();
      }
    }

    public void getWarehouse(long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<getWarehouse_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getWarehouse_call method_call = new getWarehouse_call(warehouse_id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getWarehouse_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long warehouse_id;
      public getWarehouse_call(long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<getWarehouse_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.warehouse_id = warehouse_id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getWarehouse", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getWarehouse_args args = new getWarehouse_args();
        args.setWarehouse_id(warehouse_id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Warehouse getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getWarehouse();
      }
    }

    public void getAllItemsForWarehouse(long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<getAllItemsForWarehouse_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAllItemsForWarehouse_call method_call = new getAllItemsForWarehouse_call(warehouse_id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAllItemsForWarehouse_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long warehouse_id;
      public getAllItemsForWarehouse_call(long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<getAllItemsForWarehouse_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.warehouse_id = warehouse_id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllItemsForWarehouse", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAllItemsForWarehouse_args args = new getAllItemsForWarehouse_args();
        args.setWarehouse_id(warehouse_id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Long> getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getAllItemsForWarehouse();
      }
    }

    public void isOrderBillable(long itemId, long warehouseId, long sourceId, long orderId, org.apache.thrift.async.AsyncMethodCallback<isOrderBillable_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      isOrderBillable_call method_call = new isOrderBillable_call(itemId, warehouseId, sourceId, orderId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class isOrderBillable_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      private long warehouseId;
      private long sourceId;
      private long orderId;
      public isOrderBillable_call(long itemId, long warehouseId, long sourceId, long orderId, org.apache.thrift.async.AsyncMethodCallback<isOrderBillable_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemId = itemId;
        this.warehouseId = warehouseId;
        this.sourceId = sourceId;
        this.orderId = orderId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("isOrderBillable", org.apache.thrift.protocol.TMessageType.CALL, 0));
        isOrderBillable_args args = new isOrderBillable_args();
        args.setItemId(itemId);
        args.setWarehouseId(warehouseId);
        args.setSourceId(sourceId);
        args.setOrderId(orderId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_isOrderBillable();
      }
    }

    public void reserveItemInWarehouse(long itemId, long warehouseId, long sourceId, long orderId, long createdTimestamp, long promisedShippingTimestamp, double quantity, org.apache.thrift.async.AsyncMethodCallback<reserveItemInWarehouse_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      reserveItemInWarehouse_call method_call = new reserveItemInWarehouse_call(itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class reserveItemInWarehouse_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      private long warehouseId;
      private long sourceId;
      private long orderId;
      private long createdTimestamp;
      private long promisedShippingTimestamp;
      private double quantity;
      public reserveItemInWarehouse_call(long itemId, long warehouseId, long sourceId, long orderId, long createdTimestamp, long promisedShippingTimestamp, double quantity, org.apache.thrift.async.AsyncMethodCallback<reserveItemInWarehouse_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemId = itemId;
        this.warehouseId = warehouseId;
        this.sourceId = sourceId;
        this.orderId = orderId;
        this.createdTimestamp = createdTimestamp;
        this.promisedShippingTimestamp = promisedShippingTimestamp;
        this.quantity = quantity;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("reserveItemInWarehouse", org.apache.thrift.protocol.TMessageType.CALL, 0));
        reserveItemInWarehouse_args args = new reserveItemInWarehouse_args();
        args.setItemId(itemId);
        args.setWarehouseId(warehouseId);
        args.setSourceId(sourceId);
        args.setOrderId(orderId);
        args.setCreatedTimestamp(createdTimestamp);
        args.setPromisedShippingTimestamp(promisedShippingTimestamp);
        args.setQuantity(quantity);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_reserveItemInWarehouse();
      }
    }

    public void updateReservationForOrder(long itemId, long warehouseId, long sourceId, long orderId, long createdTimestamp, long promisedShippingTimestamp, double quantity, org.apache.thrift.async.AsyncMethodCallback<updateReservationForOrder_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateReservationForOrder_call method_call = new updateReservationForOrder_call(itemId, warehouseId, sourceId, orderId, createdTimestamp, promisedShippingTimestamp, quantity, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateReservationForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      private long warehouseId;
      private long sourceId;
      private long orderId;
      private long createdTimestamp;
      private long promisedShippingTimestamp;
      private double quantity;
      public updateReservationForOrder_call(long itemId, long warehouseId, long sourceId, long orderId, long createdTimestamp, long promisedShippingTimestamp, double quantity, org.apache.thrift.async.AsyncMethodCallback<updateReservationForOrder_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemId = itemId;
        this.warehouseId = warehouseId;
        this.sourceId = sourceId;
        this.orderId = orderId;
        this.createdTimestamp = createdTimestamp;
        this.promisedShippingTimestamp = promisedShippingTimestamp;
        this.quantity = quantity;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateReservationForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateReservationForOrder_args args = new updateReservationForOrder_args();
        args.setItemId(itemId);
        args.setWarehouseId(warehouseId);
        args.setSourceId(sourceId);
        args.setOrderId(orderId);
        args.setCreatedTimestamp(createdTimestamp);
        args.setPromisedShippingTimestamp(promisedShippingTimestamp);
        args.setQuantity(quantity);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_updateReservationForOrder();
      }
    }

    public void reduceReservationCount(long itemId, long warehouseId, long sourceId, long orderId, double quantity, org.apache.thrift.async.AsyncMethodCallback<reduceReservationCount_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      reduceReservationCount_call method_call = new reduceReservationCount_call(itemId, warehouseId, sourceId, orderId, quantity, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class reduceReservationCount_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      private long warehouseId;
      private long sourceId;
      private long orderId;
      private double quantity;
      public reduceReservationCount_call(long itemId, long warehouseId, long sourceId, long orderId, double quantity, org.apache.thrift.async.AsyncMethodCallback<reduceReservationCount_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemId = itemId;
        this.warehouseId = warehouseId;
        this.sourceId = sourceId;
        this.orderId = orderId;
        this.quantity = quantity;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("reduceReservationCount", org.apache.thrift.protocol.TMessageType.CALL, 0));
        reduceReservationCount_args args = new reduceReservationCount_args();
        args.setItemId(itemId);
        args.setWarehouseId(warehouseId);
        args.setSourceId(sourceId);
        args.setOrderId(orderId);
        args.setQuantity(quantity);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_reduceReservationCount();
      }
    }

    public void getItemPricing(long itemId, long vendorId, org.apache.thrift.async.AsyncMethodCallback<getItemPricing_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getItemPricing_call method_call = new getItemPricing_call(itemId, vendorId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getItemPricing_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      private long vendorId;
      public getItemPricing_call(long itemId, long vendorId, org.apache.thrift.async.AsyncMethodCallback<getItemPricing_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemId = itemId;
        this.vendorId = vendorId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemPricing", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getItemPricing_args args = new getItemPricing_args();
        args.setItemId(itemId);
        args.setVendorId(vendorId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public VendorItemPricing getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getItemPricing();
      }
    }

    public void getAllItemPricing(long itemId, org.apache.thrift.async.AsyncMethodCallback<getAllItemPricing_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAllItemPricing_call method_call = new getAllItemPricing_call(itemId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAllItemPricing_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      public getAllItemPricing_call(long itemId, org.apache.thrift.async.AsyncMethodCallback<getAllItemPricing_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemId = itemId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllItemPricing", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAllItemPricing_args args = new getAllItemPricing_args();
        args.setItemId(itemId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<VendorItemPricing> getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getAllItemPricing();
      }
    }

    public void addVendorItemPricing(VendorItemPricing vendorItemPricing, org.apache.thrift.async.AsyncMethodCallback<addVendorItemPricing_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addVendorItemPricing_call method_call = new addVendorItemPricing_call(vendorItemPricing, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addVendorItemPricing_call extends org.apache.thrift.async.TAsyncMethodCall {
      private VendorItemPricing vendorItemPricing;
      public addVendorItemPricing_call(VendorItemPricing vendorItemPricing, org.apache.thrift.async.AsyncMethodCallback<addVendorItemPricing_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.vendorItemPricing = vendorItemPricing;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addVendorItemPricing", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addVendorItemPricing_args args = new addVendorItemPricing_args();
        args.setVendorItemPricing(vendorItemPricing);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_addVendorItemPricing();
      }
    }

    public void getVendor(long vendorId, org.apache.thrift.async.AsyncMethodCallback<getVendor_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getVendor_call method_call = new getVendor_call(vendorId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getVendor_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long vendorId;
      public getVendor_call(long vendorId, org.apache.thrift.async.AsyncMethodCallback<getVendor_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.vendorId = vendorId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getVendor", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getVendor_args args = new getVendor_args();
        args.setVendorId(vendorId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Vendor getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getVendor();
      }
    }

    public void getAllVendors(org.apache.thrift.async.AsyncMethodCallback<getAllVendors_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAllVendors_call method_call = new getAllVendors_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAllVendors_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getAllVendors_call(org.apache.thrift.async.AsyncMethodCallback<getAllVendors_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllVendors", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAllVendors_args args = new getAllVendors_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Vendor> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getAllVendors();
      }
    }

    public void addVendorItemMapping(String key, VendorItemMapping vendorItemMapping, org.apache.thrift.async.AsyncMethodCallback<addVendorItemMapping_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addVendorItemMapping_call method_call = new addVendorItemMapping_call(key, vendorItemMapping, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addVendorItemMapping_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String key;
      private VendorItemMapping vendorItemMapping;
      public addVendorItemMapping_call(String key, VendorItemMapping vendorItemMapping, org.apache.thrift.async.AsyncMethodCallback<addVendorItemMapping_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.key = key;
        this.vendorItemMapping = vendorItemMapping;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addVendorItemMapping", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addVendorItemMapping_args args = new addVendorItemMapping_args();
        args.setKey(key);
        args.setVendorItemMapping(vendorItemMapping);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_addVendorItemMapping();
      }
    }

    public void getVendorItemMappings(long itemId, org.apache.thrift.async.AsyncMethodCallback<getVendorItemMappings_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getVendorItemMappings_call method_call = new getVendorItemMappings_call(itemId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getVendorItemMappings_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      public getVendorItemMappings_call(long itemId, org.apache.thrift.async.AsyncMethodCallback<getVendorItemMappings_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemId = itemId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getVendorItemMappings", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getVendorItemMappings_args args = new getVendorItemMappings_args();
        args.setItemId(itemId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<VendorItemMapping> getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getVendorItemMappings();
      }
    }

    public void getPendingOrdersInventory(long vendorid, org.apache.thrift.async.AsyncMethodCallback<getPendingOrdersInventory_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getPendingOrdersInventory_call method_call = new getPendingOrdersInventory_call(vendorid, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getPendingOrdersInventory_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long vendorid;
      public getPendingOrdersInventory_call(long vendorid, org.apache.thrift.async.AsyncMethodCallback<getPendingOrdersInventory_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.vendorid = vendorid;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPendingOrdersInventory", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getPendingOrdersInventory_args args = new getPendingOrdersInventory_args();
        args.setVendorid(vendorid);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<AvailableAndReservedStock> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getPendingOrdersInventory();
      }
    }

    public void getWarehouses(WarehouseType warehouseType, InventoryType inventoryType, long vendorId, long billingWarehouseId, long shippingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<getWarehouses_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getWarehouses_call method_call = new getWarehouses_call(warehouseType, inventoryType, vendorId, billingWarehouseId, shippingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getWarehouses_call extends org.apache.thrift.async.TAsyncMethodCall {
      private WarehouseType warehouseType;
      private InventoryType inventoryType;
      private long vendorId;
      private long billingWarehouseId;
      private long shippingWarehouseId;
      public getWarehouses_call(WarehouseType warehouseType, InventoryType inventoryType, long vendorId, long billingWarehouseId, long shippingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<getWarehouses_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.warehouseType = warehouseType;
        this.inventoryType = inventoryType;
        this.vendorId = vendorId;
        this.billingWarehouseId = billingWarehouseId;
        this.shippingWarehouseId = shippingWarehouseId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getWarehouses", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getWarehouses_args args = new getWarehouses_args();
        args.setWarehouseType(warehouseType);
        args.setInventoryType(inventoryType);
        args.setVendorId(vendorId);
        args.setBillingWarehouseId(billingWarehouseId);
        args.setShippingWarehouseId(shippingWarehouseId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Warehouse> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getWarehouses();
      }
    }

    public void resetAvailability(String itemKey, long vendorId, long quantity, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<resetAvailability_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      resetAvailability_call method_call = new resetAvailability_call(itemKey, vendorId, quantity, warehouseId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class resetAvailability_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String itemKey;
      private long vendorId;
      private long quantity;
      private long warehouseId;
      public resetAvailability_call(String itemKey, long vendorId, long quantity, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<resetAvailability_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemKey = itemKey;
        this.vendorId = vendorId;
        this.quantity = quantity;
        this.warehouseId = warehouseId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("resetAvailability", org.apache.thrift.protocol.TMessageType.CALL, 0));
        resetAvailability_args args = new resetAvailability_args();
        args.setItemKey(itemKey);
        args.setVendorId(vendorId);
        args.setQuantity(quantity);
        args.setWarehouseId(warehouseId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_resetAvailability();
      }
    }

    public void resetAvailabilityForWarehouse(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<resetAvailabilityForWarehouse_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      resetAvailabilityForWarehouse_call method_call = new resetAvailabilityForWarehouse_call(warehouseId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class resetAvailabilityForWarehouse_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long warehouseId;
      public resetAvailabilityForWarehouse_call(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<resetAvailabilityForWarehouse_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.warehouseId = warehouseId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("resetAvailabilityForWarehouse", org.apache.thrift.protocol.TMessageType.CALL, 0));
        resetAvailabilityForWarehouse_args args = new resetAvailabilityForWarehouse_args();
        args.setWarehouseId(warehouseId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_resetAvailabilityForWarehouse();
      }
    }

    public void getItemKeysToBeProcessed(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getItemKeysToBeProcessed_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getItemKeysToBeProcessed_call method_call = new getItemKeysToBeProcessed_call(warehouseId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getItemKeysToBeProcessed_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long warehouseId;
      public getItemKeysToBeProcessed_call(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getItemKeysToBeProcessed_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.warehouseId = warehouseId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemKeysToBeProcessed", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getItemKeysToBeProcessed_args args = new getItemKeysToBeProcessed_args();
        args.setWarehouseId(warehouseId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<String> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getItemKeysToBeProcessed();
      }
    }

    public void markMissedInventoryUpdatesAsProcessed(String itemKey, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<markMissedInventoryUpdatesAsProcessed_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      markMissedInventoryUpdatesAsProcessed_call method_call = new markMissedInventoryUpdatesAsProcessed_call(itemKey, warehouseId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class markMissedInventoryUpdatesAsProcessed_call extends org.apache.thrift.async.TAsyncMethodCall {
      private String itemKey;
      private long warehouseId;
      public markMissedInventoryUpdatesAsProcessed_call(String itemKey, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<markMissedInventoryUpdatesAsProcessed_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemKey = itemKey;
        this.warehouseId = warehouseId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("markMissedInventoryUpdatesAsProcessed", org.apache.thrift.protocol.TMessageType.CALL, 0));
        markMissedInventoryUpdatesAsProcessed_args args = new markMissedInventoryUpdatesAsProcessed_args();
        args.setItemKey(itemKey);
        args.setWarehouseId(warehouseId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_markMissedInventoryUpdatesAsProcessed();
      }
    }

    public void getIgnoredItemKeys(org.apache.thrift.async.AsyncMethodCallback<getIgnoredItemKeys_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getIgnoredItemKeys_call method_call = new getIgnoredItemKeys_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getIgnoredItemKeys_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getIgnoredItemKeys_call(org.apache.thrift.async.AsyncMethodCallback<getIgnoredItemKeys_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getIgnoredItemKeys", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getIgnoredItemKeys_args args = new getIgnoredItemKeys_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Map<String,Map<Long,Long>> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getIgnoredItemKeys();
      }
    }

    public void addBadInventory(long itemId, long warehouseId, long quantity, org.apache.thrift.async.AsyncMethodCallback<addBadInventory_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addBadInventory_call method_call = new addBadInventory_call(itemId, warehouseId, quantity, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addBadInventory_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      private long warehouseId;
      private long quantity;
      public addBadInventory_call(long itemId, long warehouseId, long quantity, org.apache.thrift.async.AsyncMethodCallback<addBadInventory_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemId = itemId;
        this.warehouseId = warehouseId;
        this.quantity = quantity;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addBadInventory", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addBadInventory_args args = new addBadInventory_args();
        args.setItemId(itemId);
        args.setWarehouseId(warehouseId);
        args.setQuantity(quantity);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_addBadInventory();
      }
    }

    public void getShippingLocations(org.apache.thrift.async.AsyncMethodCallback<getShippingLocations_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getShippingLocations_call method_call = new getShippingLocations_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getShippingLocations_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getShippingLocations_call(org.apache.thrift.async.AsyncMethodCallback<getShippingLocations_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getShippingLocations", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getShippingLocations_args args = new getShippingLocations_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Warehouse> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getShippingLocations();
      }
    }

    public void getAllVendorItemMappings(org.apache.thrift.async.AsyncMethodCallback<getAllVendorItemMappings_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAllVendorItemMappings_call method_call = new getAllVendorItemMappings_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAllVendorItemMappings_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getAllVendorItemMappings_call(org.apache.thrift.async.AsyncMethodCallback<getAllVendorItemMappings_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllVendorItemMappings", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAllVendorItemMappings_args args = new getAllVendorItemMappings_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<VendorItemMapping> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getAllVendorItemMappings();
      }
    }

    public void getInventorySnapshot(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getInventorySnapshot_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getInventorySnapshot_call method_call = new getInventorySnapshot_call(warehouseId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getInventorySnapshot_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long warehouseId;
      public getInventorySnapshot_call(long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getInventorySnapshot_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.warehouseId = warehouseId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventorySnapshot", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getInventorySnapshot_args args = new getInventorySnapshot_args();
        args.setWarehouseId(warehouseId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Map<Long,ItemInventory> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getInventorySnapshot();
      }
    }

    public void clearItemAvailabilityCache(org.apache.thrift.async.AsyncMethodCallback<clearItemAvailabilityCache_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      clearItemAvailabilityCache_call method_call = new clearItemAvailabilityCache_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class clearItemAvailabilityCache_call extends org.apache.thrift.async.TAsyncMethodCall {
      public clearItemAvailabilityCache_call(org.apache.thrift.async.AsyncMethodCallback<clearItemAvailabilityCache_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("clearItemAvailabilityCache", org.apache.thrift.protocol.TMessageType.CALL, 0));
        clearItemAvailabilityCache_args args = new clearItemAvailabilityCache_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_clearItemAvailabilityCache();
      }
    }

    public void updateVendorString(long warehouseId, String vendorString, org.apache.thrift.async.AsyncMethodCallback<updateVendorString_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateVendorString_call method_call = new updateVendorString_call(warehouseId, vendorString, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateVendorString_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long warehouseId;
      private String vendorString;
      public updateVendorString_call(long warehouseId, String vendorString, org.apache.thrift.async.AsyncMethodCallback<updateVendorString_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.warehouseId = warehouseId;
        this.vendorString = vendorString;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateVendorString", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateVendorString_args args = new updateVendorString_args();
        args.setWarehouseId(warehouseId);
        args.setVendorString(vendorString);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_updateVendorString();
      }
    }

    public void clearItemAvailabilityCacheForItem(long item_id, org.apache.thrift.async.AsyncMethodCallback<clearItemAvailabilityCacheForItem_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      clearItemAvailabilityCacheForItem_call method_call = new clearItemAvailabilityCacheForItem_call(item_id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class clearItemAvailabilityCacheForItem_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long item_id;
      public clearItemAvailabilityCacheForItem_call(long item_id, org.apache.thrift.async.AsyncMethodCallback<clearItemAvailabilityCacheForItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.item_id = item_id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("clearItemAvailabilityCacheForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
        clearItemAvailabilityCacheForItem_args args = new clearItemAvailabilityCacheForItem_args();
        args.setItem_id(item_id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_clearItemAvailabilityCacheForItem();
      }
    }

    public void getOurWarehouseIdForVendor(long vendorId, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<getOurWarehouseIdForVendor_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getOurWarehouseIdForVendor_call method_call = new getOurWarehouseIdForVendor_call(vendorId, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getOurWarehouseIdForVendor_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long vendorId;
      private long billingWarehouseId;
      public getOurWarehouseIdForVendor_call(long vendorId, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<getOurWarehouseIdForVendor_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.vendorId = vendorId;
        this.billingWarehouseId = billingWarehouseId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getOurWarehouseIdForVendor", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getOurWarehouseIdForVendor_args args = new getOurWarehouseIdForVendor_args();
        args.setVendorId(vendorId);
        args.setBillingWarehouseId(billingWarehouseId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public long getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getOurWarehouseIdForVendor();
      }
    }

    public void getItemAvailabilitiesAtOurWarehouses(List<Long> item_ids, org.apache.thrift.async.AsyncMethodCallback<getItemAvailabilitiesAtOurWarehouses_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getItemAvailabilitiesAtOurWarehouses_call method_call = new getItemAvailabilitiesAtOurWarehouses_call(item_ids, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getItemAvailabilitiesAtOurWarehouses_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<Long> item_ids;
      public getItemAvailabilitiesAtOurWarehouses_call(List<Long> item_ids, org.apache.thrift.async.AsyncMethodCallback<getItemAvailabilitiesAtOurWarehouses_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.item_ids = item_ids;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemAvailabilitiesAtOurWarehouses", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getItemAvailabilitiesAtOurWarehouses_args args = new getItemAvailabilitiesAtOurWarehouses_args();
        args.setItem_ids(item_ids);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Map<Long,Long> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getItemAvailabilitiesAtOurWarehouses();
      }
    }

    public void getMonitoredWarehouseForVendors(List<Long> vendorIds, org.apache.thrift.async.AsyncMethodCallback<getMonitoredWarehouseForVendors_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getMonitoredWarehouseForVendors_call method_call = new getMonitoredWarehouseForVendors_call(vendorIds, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getMonitoredWarehouseForVendors_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<Long> vendorIds;
      public getMonitoredWarehouseForVendors_call(List<Long> vendorIds, org.apache.thrift.async.AsyncMethodCallback<getMonitoredWarehouseForVendors_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.vendorIds = vendorIds;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getMonitoredWarehouseForVendors", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getMonitoredWarehouseForVendors_args args = new getMonitoredWarehouseForVendors_args();
        args.setVendorIds(vendorIds);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Long> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getMonitoredWarehouseForVendors();
      }
    }

    public void getIgnoredWarehouseidsAndItemids(org.apache.thrift.async.AsyncMethodCallback<getIgnoredWarehouseidsAndItemids_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getIgnoredWarehouseidsAndItemids_call method_call = new getIgnoredWarehouseidsAndItemids_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getIgnoredWarehouseidsAndItemids_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getIgnoredWarehouseidsAndItemids_call(org.apache.thrift.async.AsyncMethodCallback<getIgnoredWarehouseidsAndItemids_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getIgnoredWarehouseidsAndItemids", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getIgnoredWarehouseidsAndItemids_args args = new getIgnoredWarehouseidsAndItemids_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<IgnoredInventoryUpdateItems> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getIgnoredWarehouseidsAndItemids();
      }
    }

    public void insertItemtoIgnoreInventoryUpdatelist(long item_id, long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<insertItemtoIgnoreInventoryUpdatelist_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      insertItemtoIgnoreInventoryUpdatelist_call method_call = new insertItemtoIgnoreInventoryUpdatelist_call(item_id, warehouse_id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class insertItemtoIgnoreInventoryUpdatelist_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long item_id;
      private long warehouse_id;
      public insertItemtoIgnoreInventoryUpdatelist_call(long item_id, long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<insertItemtoIgnoreInventoryUpdatelist_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.item_id = item_id;
        this.warehouse_id = warehouse_id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("insertItemtoIgnoreInventoryUpdatelist", org.apache.thrift.protocol.TMessageType.CALL, 0));
        insertItemtoIgnoreInventoryUpdatelist_args args = new insertItemtoIgnoreInventoryUpdatelist_args();
        args.setItem_id(item_id);
        args.setWarehouse_id(warehouse_id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_insertItemtoIgnoreInventoryUpdatelist();
      }
    }

    public void deleteItemFromIgnoredInventoryUpdateList(long item_id, long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<deleteItemFromIgnoredInventoryUpdateList_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      deleteItemFromIgnoredInventoryUpdateList_call method_call = new deleteItemFromIgnoredInventoryUpdateList_call(item_id, warehouse_id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class deleteItemFromIgnoredInventoryUpdateList_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long item_id;
      private long warehouse_id;
      public deleteItemFromIgnoredInventoryUpdateList_call(long item_id, long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<deleteItemFromIgnoredInventoryUpdateList_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.item_id = item_id;
        this.warehouse_id = warehouse_id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("deleteItemFromIgnoredInventoryUpdateList", org.apache.thrift.protocol.TMessageType.CALL, 0));
        deleteItemFromIgnoredInventoryUpdateList_args args = new deleteItemFromIgnoredInventoryUpdateList_args();
        args.setItem_id(item_id);
        args.setWarehouse_id(warehouse_id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_deleteItemFromIgnoredInventoryUpdateList();
      }
    }

    public void getAllIgnoredInventoryupdateItemsCount(org.apache.thrift.async.AsyncMethodCallback<getAllIgnoredInventoryupdateItemsCount_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAllIgnoredInventoryupdateItemsCount_call method_call = new getAllIgnoredInventoryupdateItemsCount_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAllIgnoredInventoryupdateItemsCount_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getAllIgnoredInventoryupdateItemsCount_call(org.apache.thrift.async.AsyncMethodCallback<getAllIgnoredInventoryupdateItemsCount_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllIgnoredInventoryupdateItemsCount", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAllIgnoredInventoryupdateItemsCount_args args = new getAllIgnoredInventoryupdateItemsCount_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public int getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getAllIgnoredInventoryupdateItemsCount();
      }
    }

    public void getIgnoredInventoryUpdateItemids(int offset, int limit, org.apache.thrift.async.AsyncMethodCallback<getIgnoredInventoryUpdateItemids_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getIgnoredInventoryUpdateItemids_call method_call = new getIgnoredInventoryUpdateItemids_call(offset, limit, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getIgnoredInventoryUpdateItemids_call extends org.apache.thrift.async.TAsyncMethodCall {
      private int offset;
      private int limit;
      public getIgnoredInventoryUpdateItemids_call(int offset, int limit, org.apache.thrift.async.AsyncMethodCallback<getIgnoredInventoryUpdateItemids_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.offset = offset;
        this.limit = limit;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getIgnoredInventoryUpdateItemids", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getIgnoredInventoryUpdateItemids_args args = new getIgnoredInventoryUpdateItemids_args();
        args.setOffset(offset);
        args.setLimit(limit);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Long> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getIgnoredInventoryUpdateItemids();
      }
    }

    public void updateItemStockPurchaseParams(long item_id, int numOfDaysStock, long minStockLevel, org.apache.thrift.async.AsyncMethodCallback<updateItemStockPurchaseParams_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateItemStockPurchaseParams_call method_call = new updateItemStockPurchaseParams_call(item_id, numOfDaysStock, minStockLevel, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateItemStockPurchaseParams_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long item_id;
      private int numOfDaysStock;
      private long minStockLevel;
      public updateItemStockPurchaseParams_call(long item_id, int numOfDaysStock, long minStockLevel, org.apache.thrift.async.AsyncMethodCallback<updateItemStockPurchaseParams_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.item_id = item_id;
        this.numOfDaysStock = numOfDaysStock;
        this.minStockLevel = minStockLevel;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateItemStockPurchaseParams", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateItemStockPurchaseParams_args args = new updateItemStockPurchaseParams_args();
        args.setItem_id(item_id);
        args.setNumOfDaysStock(numOfDaysStock);
        args.setMinStockLevel(minStockLevel);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_updateItemStockPurchaseParams();
      }
    }

    public void getItemStockPurchaseParams(long itemId, org.apache.thrift.async.AsyncMethodCallback<getItemStockPurchaseParams_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getItemStockPurchaseParams_call method_call = new getItemStockPurchaseParams_call(itemId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getItemStockPurchaseParams_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      public getItemStockPurchaseParams_call(long itemId, org.apache.thrift.async.AsyncMethodCallback<getItemStockPurchaseParams_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemId = itemId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemStockPurchaseParams", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getItemStockPurchaseParams_args args = new getItemStockPurchaseParams_args();
        args.setItemId(itemId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public ItemStockPurchaseParams getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getItemStockPurchaseParams();
      }
    }

    public void addOosStatusForItem(Map<Long,Boolean> oosStatusMap, long date, org.apache.thrift.async.AsyncMethodCallback<addOosStatusForItem_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addOosStatusForItem_call method_call = new addOosStatusForItem_call(oosStatusMap, date, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addOosStatusForItem_call extends org.apache.thrift.async.TAsyncMethodCall {
      private Map<Long,Boolean> oosStatusMap;
      private long date;
      public addOosStatusForItem_call(Map<Long,Boolean> oosStatusMap, long date, org.apache.thrift.async.AsyncMethodCallback<addOosStatusForItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.oosStatusMap = oosStatusMap;
        this.date = date;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addOosStatusForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addOosStatusForItem_args args = new addOosStatusForItem_args();
        args.setOosStatusMap(oosStatusMap);
        args.setDate(date);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_addOosStatusForItem();
      }
    }

    public void getOosStatusesForXDaysForItem(long itemId, int sourceId, int days, org.apache.thrift.async.AsyncMethodCallback<getOosStatusesForXDaysForItem_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getOosStatusesForXDaysForItem_call method_call = new getOosStatusesForXDaysForItem_call(itemId, sourceId, days, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getOosStatusesForXDaysForItem_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      private int sourceId;
      private int days;
      public getOosStatusesForXDaysForItem_call(long itemId, int sourceId, int days, org.apache.thrift.async.AsyncMethodCallback<getOosStatusesForXDaysForItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemId = itemId;
        this.sourceId = sourceId;
        this.days = days;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getOosStatusesForXDaysForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getOosStatusesForXDaysForItem_args args = new getOosStatusesForXDaysForItem_args();
        args.setItemId(itemId);
        args.setSourceId(sourceId);
        args.setDays(days);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<OOSStatus> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getOosStatusesForXDaysForItem();
      }
    }

    public void getOosStatusesForXDays(int sourceId, int days, org.apache.thrift.async.AsyncMethodCallback<getOosStatusesForXDays_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getOosStatusesForXDays_call method_call = new getOosStatusesForXDays_call(sourceId, days, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getOosStatusesForXDays_call extends org.apache.thrift.async.TAsyncMethodCall {
      private int sourceId;
      private int days;
      public getOosStatusesForXDays_call(int sourceId, int days, org.apache.thrift.async.AsyncMethodCallback<getOosStatusesForXDays_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.sourceId = sourceId;
        this.days = days;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getOosStatusesForXDays", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getOosStatusesForXDays_args args = new getOosStatusesForXDays_args();
        args.setSourceId(sourceId);
        args.setDays(days);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<OOSStatus> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getOosStatusesForXDays();
      }
    }

    public void getAllVendorItemPricing(long itemId, long vendorId, org.apache.thrift.async.AsyncMethodCallback<getAllVendorItemPricing_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAllVendorItemPricing_call method_call = new getAllVendorItemPricing_call(itemId, vendorId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAllVendorItemPricing_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      private long vendorId;
      public getAllVendorItemPricing_call(long itemId, long vendorId, org.apache.thrift.async.AsyncMethodCallback<getAllVendorItemPricing_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemId = itemId;
        this.vendorId = vendorId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllVendorItemPricing", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAllVendorItemPricing_args args = new getAllVendorItemPricing_args();
        args.setItemId(itemId);
        args.setVendorId(vendorId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<VendorItemPricing> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getAllVendorItemPricing();
      }
    }

    public void getNonZeroItemStockPurchaseParams(org.apache.thrift.async.AsyncMethodCallback<getNonZeroItemStockPurchaseParams_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getNonZeroItemStockPurchaseParams_call method_call = new getNonZeroItemStockPurchaseParams_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getNonZeroItemStockPurchaseParams_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getNonZeroItemStockPurchaseParams_call(org.apache.thrift.async.AsyncMethodCallback<getNonZeroItemStockPurchaseParams_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNonZeroItemStockPurchaseParams", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getNonZeroItemStockPurchaseParams_args args = new getNonZeroItemStockPurchaseParams_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<ItemStockPurchaseParams> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getNonZeroItemStockPurchaseParams();
      }
    }

    public void getBillableInventoryAndPendingOrders(org.apache.thrift.async.AsyncMethodCallback<getBillableInventoryAndPendingOrders_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getBillableInventoryAndPendingOrders_call method_call = new getBillableInventoryAndPendingOrders_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getBillableInventoryAndPendingOrders_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getBillableInventoryAndPendingOrders_call(org.apache.thrift.async.AsyncMethodCallback<getBillableInventoryAndPendingOrders_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getBillableInventoryAndPendingOrders", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getBillableInventoryAndPendingOrders_args args = new getBillableInventoryAndPendingOrders_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<AvailableAndReservedStock> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getBillableInventoryAndPendingOrders();
      }
    }

    public void getWarehouseName(long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<getWarehouseName_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getWarehouseName_call method_call = new getWarehouseName_call(warehouse_id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getWarehouseName_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long warehouse_id;
      public getWarehouseName_call(long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<getWarehouseName_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.warehouse_id = warehouse_id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getWarehouseName", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getWarehouseName_args args = new getWarehouseName_args();
        args.setWarehouse_id(warehouse_id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getWarehouseName();
      }
    }

    public void getAmazonInventoryForItem(long item_id, org.apache.thrift.async.AsyncMethodCallback<getAmazonInventoryForItem_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAmazonInventoryForItem_call method_call = new getAmazonInventoryForItem_call(item_id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAmazonInventoryForItem_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long item_id;
      public getAmazonInventoryForItem_call(long item_id, org.apache.thrift.async.AsyncMethodCallback<getAmazonInventoryForItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.item_id = item_id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAmazonInventoryForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAmazonInventoryForItem_args args = new getAmazonInventoryForItem_args();
        args.setItem_id(item_id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public AmazonInventorySnapshot getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getAmazonInventoryForItem();
      }
    }

    public void getAllAmazonInventory(org.apache.thrift.async.AsyncMethodCallback<getAllAmazonInventory_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAllAmazonInventory_call method_call = new getAllAmazonInventory_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAllAmazonInventory_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getAllAmazonInventory_call(org.apache.thrift.async.AsyncMethodCallback<getAllAmazonInventory_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllAmazonInventory", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAllAmazonInventory_args args = new getAllAmazonInventory_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<AmazonInventorySnapshot> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getAllAmazonInventory();
      }
    }

    public void addOrUpdateAmazonInventoryForItem(AmazonInventorySnapshot amazonInventorySnapshot, long time, org.apache.thrift.async.AsyncMethodCallback<addOrUpdateAmazonInventoryForItem_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addOrUpdateAmazonInventoryForItem_call method_call = new addOrUpdateAmazonInventoryForItem_call(amazonInventorySnapshot, time, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addOrUpdateAmazonInventoryForItem_call extends org.apache.thrift.async.TAsyncMethodCall {
      private AmazonInventorySnapshot amazonInventorySnapshot;
      private long time;
      public addOrUpdateAmazonInventoryForItem_call(AmazonInventorySnapshot amazonInventorySnapshot, long time, org.apache.thrift.async.AsyncMethodCallback<addOrUpdateAmazonInventoryForItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.amazonInventorySnapshot = amazonInventorySnapshot;
        this.time = time;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addOrUpdateAmazonInventoryForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addOrUpdateAmazonInventoryForItem_args args = new addOrUpdateAmazonInventoryForItem_args();
        args.setAmazonInventorySnapshot(amazonInventorySnapshot);
        args.setTime(time);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_addOrUpdateAmazonInventoryForItem();
      }
    }

    public void getLastNdaySaleForItem(long itemId, long numberOfDays, org.apache.thrift.async.AsyncMethodCallback<getLastNdaySaleForItem_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getLastNdaySaleForItem_call method_call = new getLastNdaySaleForItem_call(itemId, numberOfDays, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getLastNdaySaleForItem_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      private long numberOfDays;
      public getLastNdaySaleForItem_call(long itemId, long numberOfDays, org.apache.thrift.async.AsyncMethodCallback<getLastNdaySaleForItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemId = itemId;
        this.numberOfDays = numberOfDays;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getLastNdaySaleForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getLastNdaySaleForItem_args args = new getLastNdaySaleForItem_args();
        args.setItemId(itemId);
        args.setNumberOfDays(numberOfDays);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getLastNdaySaleForItem();
      }
    }

    public void addOrUpdateAmazonFbaInventory(AmazonFbaInventorySnapshot amazonfbainventorysnapshot, org.apache.thrift.async.AsyncMethodCallback<addOrUpdateAmazonFbaInventory_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addOrUpdateAmazonFbaInventory_call method_call = new addOrUpdateAmazonFbaInventory_call(amazonfbainventorysnapshot, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addOrUpdateAmazonFbaInventory_call extends org.apache.thrift.async.TAsyncMethodCall {
      private AmazonFbaInventorySnapshot amazonfbainventorysnapshot;
      public addOrUpdateAmazonFbaInventory_call(AmazonFbaInventorySnapshot amazonfbainventorysnapshot, org.apache.thrift.async.AsyncMethodCallback<addOrUpdateAmazonFbaInventory_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.amazonfbainventorysnapshot = amazonfbainventorysnapshot;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addOrUpdateAmazonFbaInventory", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addOrUpdateAmazonFbaInventory_args args = new addOrUpdateAmazonFbaInventory_args();
        args.setAmazonfbainventorysnapshot(amazonfbainventorysnapshot);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_addOrUpdateAmazonFbaInventory();
      }
    }

    public void addUpdateHoldInventory(long itemId, long warehouseId, long holdQuantity, long source, org.apache.thrift.async.AsyncMethodCallback<addUpdateHoldInventory_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addUpdateHoldInventory_call method_call = new addUpdateHoldInventory_call(itemId, warehouseId, holdQuantity, source, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addUpdateHoldInventory_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      private long warehouseId;
      private long holdQuantity;
      private long source;
      public addUpdateHoldInventory_call(long itemId, long warehouseId, long holdQuantity, long source, org.apache.thrift.async.AsyncMethodCallback<addUpdateHoldInventory_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemId = itemId;
        this.warehouseId = warehouseId;
        this.holdQuantity = holdQuantity;
        this.source = source;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addUpdateHoldInventory", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addUpdateHoldInventory_args args = new addUpdateHoldInventory_args();
        args.setItemId(itemId);
        args.setWarehouseId(warehouseId);
        args.setHoldQuantity(holdQuantity);
        args.setSource(source);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_addUpdateHoldInventory();
      }
    }

    public void getAmazonFbaItemInventory(long itemId, org.apache.thrift.async.AsyncMethodCallback<getAmazonFbaItemInventory_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAmazonFbaItemInventory_call method_call = new getAmazonFbaItemInventory_call(itemId, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAmazonFbaItemInventory_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      public getAmazonFbaItemInventory_call(long itemId, org.apache.thrift.async.AsyncMethodCallback<getAmazonFbaItemInventory_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemId = itemId;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAmazonFbaItemInventory", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAmazonFbaItemInventory_args args = new getAmazonFbaItemInventory_args();
        args.setItemId(itemId);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<AmazonFbaInventorySnapshot> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getAmazonFbaItemInventory();
      }
    }

    public void getAllAmazonFbaItemInventory(org.apache.thrift.async.AsyncMethodCallback<getAllAmazonFbaItemInventory_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAllAmazonFbaItemInventory_call method_call = new getAllAmazonFbaItemInventory_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAllAmazonFbaItemInventory_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getAllAmazonFbaItemInventory_call(org.apache.thrift.async.AsyncMethodCallback<getAllAmazonFbaItemInventory_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllAmazonFbaItemInventory", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAllAmazonFbaItemInventory_args args = new getAllAmazonFbaItemInventory_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<AmazonFbaInventorySnapshot> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getAllAmazonFbaItemInventory();
      }
    }

    public void getOursGoodWarehouseIdsForLocation(long state_id, org.apache.thrift.async.AsyncMethodCallback<getOursGoodWarehouseIdsForLocation_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getOursGoodWarehouseIdsForLocation_call method_call = new getOursGoodWarehouseIdsForLocation_call(state_id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getOursGoodWarehouseIdsForLocation_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long state_id;
      public getOursGoodWarehouseIdsForLocation_call(long state_id, org.apache.thrift.async.AsyncMethodCallback<getOursGoodWarehouseIdsForLocation_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.state_id = state_id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getOursGoodWarehouseIdsForLocation", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getOursGoodWarehouseIdsForLocation_args args = new getOursGoodWarehouseIdsForLocation_args();
        args.setState_id(state_id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Long> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getOursGoodWarehouseIdsForLocation();
      }
    }

    public void getHoldInventoryDetailForItemForWarehouseIdExceptSource(long id, long warehouse_id, long source, org.apache.thrift.async.AsyncMethodCallback<getHoldInventoryDetailForItemForWarehouseIdExceptSource_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getHoldInventoryDetailForItemForWarehouseIdExceptSource_call method_call = new getHoldInventoryDetailForItemForWarehouseIdExceptSource_call(id, warehouse_id, source, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getHoldInventoryDetailForItemForWarehouseIdExceptSource_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long id;
      private long warehouse_id;
      private long source;
      public getHoldInventoryDetailForItemForWarehouseIdExceptSource_call(long id, long warehouse_id, long source, org.apache.thrift.async.AsyncMethodCallback<getHoldInventoryDetailForItemForWarehouseIdExceptSource_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.id = id;
        this.warehouse_id = warehouse_id;
        this.source = source;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getHoldInventoryDetailForItemForWarehouseIdExceptSource", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getHoldInventoryDetailForItemForWarehouseIdExceptSource_args args = new getHoldInventoryDetailForItemForWarehouseIdExceptSource_args();
        args.setId(id);
        args.setWarehouse_id(warehouse_id);
        args.setSource(source);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public long getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getHoldInventoryDetailForItemForWarehouseIdExceptSource();
      }
    }

    public void getSnapdealInventoryForItem(long item_id, org.apache.thrift.async.AsyncMethodCallback<getSnapdealInventoryForItem_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getSnapdealInventoryForItem_call method_call = new getSnapdealInventoryForItem_call(item_id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getSnapdealInventoryForItem_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long item_id;
      public getSnapdealInventoryForItem_call(long item_id, org.apache.thrift.async.AsyncMethodCallback<getSnapdealInventoryForItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.item_id = item_id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSnapdealInventoryForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getSnapdealInventoryForItem_args args = new getSnapdealInventoryForItem_args();
        args.setItem_id(item_id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public SnapdealInventoryItem getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getSnapdealInventoryForItem();
      }
    }

    public void addOrUpdateSnapdealInventoryForItem(SnapdealInventoryItem snapdealinventoryitem, org.apache.thrift.async.AsyncMethodCallback<addOrUpdateSnapdealInventoryForItem_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addOrUpdateSnapdealInventoryForItem_call method_call = new addOrUpdateSnapdealInventoryForItem_call(snapdealinventoryitem, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addOrUpdateSnapdealInventoryForItem_call extends org.apache.thrift.async.TAsyncMethodCall {
      private SnapdealInventoryItem snapdealinventoryitem;
      public addOrUpdateSnapdealInventoryForItem_call(SnapdealInventoryItem snapdealinventoryitem, org.apache.thrift.async.AsyncMethodCallback<addOrUpdateSnapdealInventoryForItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.snapdealinventoryitem = snapdealinventoryitem;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addOrUpdateSnapdealInventoryForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addOrUpdateSnapdealInventoryForItem_args args = new addOrUpdateSnapdealInventoryForItem_args();
        args.setSnapdealinventoryitem(snapdealinventoryitem);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_addOrUpdateSnapdealInventoryForItem();
      }
    }

    public void getNlcForWarehouse(long warehouse_id, long item_id, org.apache.thrift.async.AsyncMethodCallback<getNlcForWarehouse_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getNlcForWarehouse_call method_call = new getNlcForWarehouse_call(warehouse_id, item_id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getNlcForWarehouse_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long warehouse_id;
      private long item_id;
      public getNlcForWarehouse_call(long warehouse_id, long item_id, org.apache.thrift.async.AsyncMethodCallback<getNlcForWarehouse_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.warehouse_id = warehouse_id;
        this.item_id = item_id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNlcForWarehouse", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getNlcForWarehouse_args args = new getNlcForWarehouse_args();
        args.setWarehouse_id(warehouse_id);
        args.setItem_id(item_id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public double getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getNlcForWarehouse();
      }
    }

    public void getHeldInventoryMapForItem(long item_id, long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<getHeldInventoryMapForItem_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getHeldInventoryMapForItem_call method_call = new getHeldInventoryMapForItem_call(item_id, warehouse_id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getHeldInventoryMapForItem_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long item_id;
      private long warehouse_id;
      public getHeldInventoryMapForItem_call(long item_id, long warehouse_id, org.apache.thrift.async.AsyncMethodCallback<getHeldInventoryMapForItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.item_id = item_id;
        this.warehouse_id = warehouse_id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getHeldInventoryMapForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getHeldInventoryMapForItem_args args = new getHeldInventoryMapForItem_args();
        args.setItem_id(item_id);
        args.setWarehouse_id(warehouse_id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Map<Integer,Long> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getHeldInventoryMapForItem();
      }
    }

    public void addOrUpdateAllAmazonFbaInventory(List<AmazonFbaInventorySnapshot> allamazonfbainventorysnapshot, org.apache.thrift.async.AsyncMethodCallback<addOrUpdateAllAmazonFbaInventory_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addOrUpdateAllAmazonFbaInventory_call method_call = new addOrUpdateAllAmazonFbaInventory_call(allamazonfbainventorysnapshot, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addOrUpdateAllAmazonFbaInventory_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<AmazonFbaInventorySnapshot> allamazonfbainventorysnapshot;
      public addOrUpdateAllAmazonFbaInventory_call(List<AmazonFbaInventorySnapshot> allamazonfbainventorysnapshot, org.apache.thrift.async.AsyncMethodCallback<addOrUpdateAllAmazonFbaInventory_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.allamazonfbainventorysnapshot = allamazonfbainventorysnapshot;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addOrUpdateAllAmazonFbaInventory", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addOrUpdateAllAmazonFbaInventory_args args = new addOrUpdateAllAmazonFbaInventory_args();
        args.setAllamazonfbainventorysnapshot(allamazonfbainventorysnapshot);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_addOrUpdateAllAmazonFbaInventory();
      }
    }

    public void addOrUpdateAllSnapdealInventory(List<SnapdealInventoryItem> allsnapdealinventorysnapshot, org.apache.thrift.async.AsyncMethodCallback<addOrUpdateAllSnapdealInventory_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addOrUpdateAllSnapdealInventory_call method_call = new addOrUpdateAllSnapdealInventory_call(allsnapdealinventorysnapshot, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addOrUpdateAllSnapdealInventory_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<SnapdealInventoryItem> allsnapdealinventorysnapshot;
      public addOrUpdateAllSnapdealInventory_call(List<SnapdealInventoryItem> allsnapdealinventorysnapshot, org.apache.thrift.async.AsyncMethodCallback<addOrUpdateAllSnapdealInventory_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.allsnapdealinventorysnapshot = allsnapdealinventorysnapshot;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addOrUpdateAllSnapdealInventory", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addOrUpdateAllSnapdealInventory_args args = new addOrUpdateAllSnapdealInventory_args();
        args.setAllsnapdealinventorysnapshot(allsnapdealinventorysnapshot);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_addOrUpdateAllSnapdealInventory();
      }
    }

    public void getSnapdealInventorySnapshot(org.apache.thrift.async.AsyncMethodCallback<getSnapdealInventorySnapshot_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getSnapdealInventorySnapshot_call method_call = new getSnapdealInventorySnapshot_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getSnapdealInventorySnapshot_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getSnapdealInventorySnapshot_call(org.apache.thrift.async.AsyncMethodCallback<getSnapdealInventorySnapshot_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSnapdealInventorySnapshot", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getSnapdealInventorySnapshot_args args = new getSnapdealInventorySnapshot_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<SnapdealInventoryItem> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getSnapdealInventorySnapshot();
      }
    }

    public void getHoldInventoryDetails(long itemId, long warehouseId, long source, org.apache.thrift.async.AsyncMethodCallback<getHoldInventoryDetails_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getHoldInventoryDetails_call method_call = new getHoldInventoryDetails_call(itemId, warehouseId, source, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getHoldInventoryDetails_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long itemId;
      private long warehouseId;
      private long source;
      public getHoldInventoryDetails_call(long itemId, long warehouseId, long source, org.apache.thrift.async.AsyncMethodCallback<getHoldInventoryDetails_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemId = itemId;
        this.warehouseId = warehouseId;
        this.source = source;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getHoldInventoryDetails", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getHoldInventoryDetails_args args = new getHoldInventoryDetails_args();
        args.setItemId(itemId);
        args.setWarehouseId(warehouseId);
        args.setSource(source);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<HoldInventoryDetail> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getHoldInventoryDetails();
      }
    }

    public void addOrUpdateFlipkartInventorySnapshot(List<FlipkartInventorySnapshot> flipkartInventorySnapshot, long time, org.apache.thrift.async.AsyncMethodCallback<addOrUpdateFlipkartInventorySnapshot_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addOrUpdateFlipkartInventorySnapshot_call method_call = new addOrUpdateFlipkartInventorySnapshot_call(flipkartInventorySnapshot, time, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addOrUpdateFlipkartInventorySnapshot_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<FlipkartInventorySnapshot> flipkartInventorySnapshot;
      private long time;
      public addOrUpdateFlipkartInventorySnapshot_call(List<FlipkartInventorySnapshot> flipkartInventorySnapshot, long time, org.apache.thrift.async.AsyncMethodCallback<addOrUpdateFlipkartInventorySnapshot_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.flipkartInventorySnapshot = flipkartInventorySnapshot;
        this.time = time;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addOrUpdateFlipkartInventorySnapshot", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addOrUpdateFlipkartInventorySnapshot_args args = new addOrUpdateFlipkartInventorySnapshot_args();
        args.setFlipkartInventorySnapshot(flipkartInventorySnapshot);
        args.setTime(time);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_addOrUpdateFlipkartInventorySnapshot();
      }
    }

    public void getFlipkartInventorySnapshot(org.apache.thrift.async.AsyncMethodCallback<getFlipkartInventorySnapshot_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getFlipkartInventorySnapshot_call method_call = new getFlipkartInventorySnapshot_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getFlipkartInventorySnapshot_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getFlipkartInventorySnapshot_call(org.apache.thrift.async.AsyncMethodCallback<getFlipkartInventorySnapshot_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFlipkartInventorySnapshot", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getFlipkartInventorySnapshot_args args = new getFlipkartInventorySnapshot_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<FlipkartInventorySnapshot> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getFlipkartInventorySnapshot();
      }
    }

    public void getFlipkartlInventoryForItem(long item_id, org.apache.thrift.async.AsyncMethodCallback<getFlipkartlInventoryForItem_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getFlipkartlInventoryForItem_call method_call = new getFlipkartlInventoryForItem_call(item_id, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getFlipkartlInventoryForItem_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long item_id;
      public getFlipkartlInventoryForItem_call(long item_id, org.apache.thrift.async.AsyncMethodCallback<getFlipkartlInventoryForItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.item_id = item_id;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFlipkartlInventoryForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getFlipkartlInventoryForItem_args args = new getFlipkartlInventoryForItem_args();
        args.setItem_id(item_id);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public FlipkartInventorySnapshot getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getFlipkartlInventoryForItem();
      }
    }

    public void getStateMaster(org.apache.thrift.async.AsyncMethodCallback<getStateMaster_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getStateMaster_call method_call = new getStateMaster_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getStateMaster_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getStateMaster_call(org.apache.thrift.async.AsyncMethodCallback<getStateMaster_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getStateMaster", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getStateMaster_args args = new getStateMaster_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Map<Long,StateInfo> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getStateMaster();
      }
    }

    public void updateSnapdealStockAtEOD(List<SnapdealStockAtEOD> allsnapdealstock, org.apache.thrift.async.AsyncMethodCallback<updateSnapdealStockAtEOD_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateSnapdealStockAtEOD_call method_call = new updateSnapdealStockAtEOD_call(allsnapdealstock, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateSnapdealStockAtEOD_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<SnapdealStockAtEOD> allsnapdealstock;
      public updateSnapdealStockAtEOD_call(List<SnapdealStockAtEOD> allsnapdealstock, org.apache.thrift.async.AsyncMethodCallback<updateSnapdealStockAtEOD_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.allsnapdealstock = allsnapdealstock;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateSnapdealStockAtEOD", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateSnapdealStockAtEOD_args args = new updateSnapdealStockAtEOD_args();
        args.setAllsnapdealstock(allsnapdealstock);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_updateSnapdealStockAtEOD();
      }
    }

    public void updateFlipkartStockAtEOD(List<FlipkartStockAtEOD> allflipkartstock, org.apache.thrift.async.AsyncMethodCallback<updateFlipkartStockAtEOD_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateFlipkartStockAtEOD_call method_call = new updateFlipkartStockAtEOD_call(allflipkartstock, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateFlipkartStockAtEOD_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<FlipkartStockAtEOD> allflipkartstock;
      public updateFlipkartStockAtEOD_call(List<FlipkartStockAtEOD> allflipkartstock, org.apache.thrift.async.AsyncMethodCallback<updateFlipkartStockAtEOD_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.allflipkartstock = allflipkartstock;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateFlipkartStockAtEOD", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateFlipkartStockAtEOD_args args = new updateFlipkartStockAtEOD_args();
        args.setAllflipkartstock(allflipkartstock);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_updateFlipkartStockAtEOD();
      }
    }

    public void getWanNlcForSource(long item_id, long source, org.apache.thrift.async.AsyncMethodCallback<getWanNlcForSource_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getWanNlcForSource_call method_call = new getWanNlcForSource_call(item_id, source, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getWanNlcForSource_call extends org.apache.thrift.async.TAsyncMethodCall {
      private long item_id;
      private long source;
      public getWanNlcForSource_call(long item_id, long source, org.apache.thrift.async.AsyncMethodCallback<getWanNlcForSource_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.item_id = item_id;
        this.source = source;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getWanNlcForSource", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getWanNlcForSource_args args = new getWanNlcForSource_args();
        args.setItem_id(item_id);
        args.setSource(source);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public double getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getWanNlcForSource();
      }
    }

    public void getAllAvailableAmazonFbaItemInventory(org.apache.thrift.async.AsyncMethodCallback<getAllAvailableAmazonFbaItemInventory_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getAllAvailableAmazonFbaItemInventory_call method_call = new getAllAvailableAmazonFbaItemInventory_call(resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getAllAvailableAmazonFbaItemInventory_call extends org.apache.thrift.async.TAsyncMethodCall {
      public getAllAvailableAmazonFbaItemInventory_call(org.apache.thrift.async.AsyncMethodCallback<getAllAvailableAmazonFbaItemInventory_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getAllAvailableAmazonFbaItemInventory", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getAllAvailableAmazonFbaItemInventory_args args = new getAllAvailableAmazonFbaItemInventory_args();
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<AmazonFbaInventorySnapshot> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getAllAvailableAmazonFbaItemInventory();
      }
    }

    public void updateItemAvailabilityForItemIds(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<updateItemAvailabilityForItemIds_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      updateItemAvailabilityForItemIds_call method_call = new updateItemAvailabilityForItemIds_call(itemIds, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class updateItemAvailabilityForItemIds_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<Long> itemIds;
      public updateItemAvailabilityForItemIds_call(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<updateItemAvailabilityForItemIds_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemIds = itemIds;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updateItemAvailabilityForItemIds", org.apache.thrift.protocol.TMessageType.CALL, 0));
        updateItemAvailabilityForItemIds_args args = new updateItemAvailabilityForItemIds_args();
        args.setItemIds(itemIds);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public boolean getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_updateItemAvailabilityForItemIds();
      }
    }

    public void addVendorItemPricingInBulk(List<VendorItemPricing> vendorItemPricingList, org.apache.thrift.async.AsyncMethodCallback<addVendorItemPricingInBulk_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addVendorItemPricingInBulk_call method_call = new addVendorItemPricingInBulk_call(vendorItemPricingList, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addVendorItemPricingInBulk_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<VendorItemPricing> vendorItemPricingList;
      public addVendorItemPricingInBulk_call(List<VendorItemPricing> vendorItemPricingList, org.apache.thrift.async.AsyncMethodCallback<addVendorItemPricingInBulk_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.vendorItemPricingList = vendorItemPricingList;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addVendorItemPricingInBulk", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addVendorItemPricingInBulk_args args = new addVendorItemPricingInBulk_args();
        args.setVendorItemPricingList(vendorItemPricingList);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<Long> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_addVendorItemPricingInBulk();
      }
    }

    public void addInventoryInBulk(List<BulkAddInventory> bulkInventoryList, org.apache.thrift.async.AsyncMethodCallback<addInventoryInBulk_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      addInventoryInBulk_call method_call = new addInventoryInBulk_call(bulkInventoryList, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class addInventoryInBulk_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<BulkAddInventory> bulkInventoryList;
      public addInventoryInBulk_call(List<BulkAddInventory> bulkInventoryList, org.apache.thrift.async.AsyncMethodCallback<addInventoryInBulk_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.bulkInventoryList = bulkInventoryList;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("addInventoryInBulk", org.apache.thrift.protocol.TMessageType.CALL, 0));
        addInventoryInBulk_args args = new addInventoryInBulk_args();
        args.setBulkInventoryList(bulkInventoryList);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public void getResult() throws InventoryServiceException, org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        (new Client(prot)).recv_addInventoryInBulk();
      }
    }

    public void getFofoAvailability(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<getFofoAvailability_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getFofoAvailability_call method_call = new getFofoAvailability_call(itemIds, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getFofoAvailability_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<Long> itemIds;
      public getFofoAvailability_call(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<getFofoAvailability_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemIds = itemIds;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFofoAvailability", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getFofoAvailability_args args = new getFofoAvailability_args();
        args.setItemIds(itemIds);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Map<Long,Long> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getFofoAvailability();
      }
    }

    public void getFofoFulFillmentWarehouseMap(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<getFofoFulFillmentWarehouseMap_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getFofoFulFillmentWarehouseMap_call method_call = new getFofoFulFillmentWarehouseMap_call(itemIds, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getFofoFulFillmentWarehouseMap_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<Long> itemIds;
      public getFofoFulFillmentWarehouseMap_call(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<getFofoFulFillmentWarehouseMap_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemIds = itemIds;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getFofoFulFillmentWarehouseMap", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getFofoFulFillmentWarehouseMap_args args = new getFofoFulFillmentWarehouseMap_args();
        args.setItemIds(itemIds);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public Map<Long,Warehouse> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getFofoFulFillmentWarehouseMap();
      }
    }

    public void getItemLocationAvailabilityCache(List<ItemLocationAvailability> itemLocations, org.apache.thrift.async.AsyncMethodCallback<getItemLocationAvailabilityCache_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getItemLocationAvailabilityCache_call method_call = new getItemLocationAvailabilityCache_call(itemLocations, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getItemLocationAvailabilityCache_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<ItemLocationAvailability> itemLocations;
      public getItemLocationAvailabilityCache_call(List<ItemLocationAvailability> itemLocations, org.apache.thrift.async.AsyncMethodCallback<getItemLocationAvailabilityCache_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemLocations = itemLocations;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemLocationAvailabilityCache", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getItemLocationAvailabilityCache_args args = new getItemLocationAvailabilityCache_args();
        args.setItemLocations(itemLocations);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<ItemLocationAvailability> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getItemLocationAvailabilityCache();
      }
    }

    public void getItemLocationAvailabilityCacheByItemId(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<getItemLocationAvailabilityCacheByItemId_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getItemLocationAvailabilityCacheByItemId_call method_call = new getItemLocationAvailabilityCacheByItemId_call(itemIds, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getItemLocationAvailabilityCacheByItemId_call extends org.apache.thrift.async.TAsyncMethodCall {
      private List<Long> itemIds;
      public getItemLocationAvailabilityCacheByItemId_call(List<Long> itemIds, org.apache.thrift.async.AsyncMethodCallback<getItemLocationAvailabilityCacheByItemId_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itemIds = itemIds;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemLocationAvailabilityCacheByItemId", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getItemLocationAvailabilityCacheByItemId_args args = new getItemLocationAvailabilityCacheByItemId_args();
        args.setItemIds(itemIds);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public List<ItemLocationAvailability> getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getItemLocationAvailabilityCacheByItemId();
      }
    }

    public void getItemPincodeAvailability(Map<Long,Long> itempricing, String pincode, org.apache.thrift.async.AsyncMethodCallback<getItemPincodeAvailability_call> resultHandler) throws org.apache.thrift.TException {
      checkReady();
      getItemPincodeAvailability_call method_call = new getItemPincodeAvailability_call(itempricing, pincode, resultHandler, this, ___protocolFactory, ___transport);
      this.___currentMethod = method_call;
      ___manager.call(method_call);
    }

    public static class getItemPincodeAvailability_call extends org.apache.thrift.async.TAsyncMethodCall {
      private Map<Long,Long> itempricing;
      private String pincode;
      public getItemPincodeAvailability_call(Map<Long,Long> itempricing, String pincode, org.apache.thrift.async.AsyncMethodCallback<getItemPincodeAvailability_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
        super(client, protocolFactory, transport, resultHandler, false);
        this.itempricing = itempricing;
        this.pincode = pincode;
      }

      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemPincodeAvailability", org.apache.thrift.protocol.TMessageType.CALL, 0));
        getItemPincodeAvailability_args args = new getItemPincodeAvailability_args();
        args.setItempricing(itempricing);
        args.setPincode(pincode);
        args.write(prot);
        prot.writeMessageEnd();
      }

      public String getResult() throws org.apache.thrift.TException {
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
          throw new IllegalStateException("Method call not finished!");
        }
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
        return (new Client(prot)).recv_getItemPincodeAvailability();
      }
    }

  }

  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
    public Processor(I iface) {
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
    }

    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
      super(iface, getProcessMap(processMap));
    }

    private static <I extends Iface> Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> getProcessMap(Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
      processMap.put("addWarehouse", new addWarehouse());
      processMap.put("addVendor", new addVendor());
      processMap.put("updateInventoryHistory", new updateInventoryHistory());
      processMap.put("updateInventory", new updateInventory());
      processMap.put("addInventory", new addInventory());
      processMap.put("retireWarehouse", new retireWarehouse());
      processMap.put("getItemInventoryByItemId", new getItemInventoryByItemId());
      processMap.put("getItemAvailibilityAtWarehouse", new getItemAvailibilityAtWarehouse());
      processMap.put("getItemAvailabilityAtLocation", new getItemAvailabilityAtLocation());
      processMap.put("getAllWarehouses", new getAllWarehouses());
      processMap.put("getWarehouse", new getWarehouse());
      processMap.put("getAllItemsForWarehouse", new getAllItemsForWarehouse());
      processMap.put("isOrderBillable", new isOrderBillable());
      processMap.put("reserveItemInWarehouse", new reserveItemInWarehouse());
      processMap.put("updateReservationForOrder", new updateReservationForOrder());
      processMap.put("reduceReservationCount", new reduceReservationCount());
      processMap.put("getItemPricing", new getItemPricing());
      processMap.put("getAllItemPricing", new getAllItemPricing());
      processMap.put("addVendorItemPricing", new addVendorItemPricing());
      processMap.put("getVendor", new getVendor());
      processMap.put("getAllVendors", new getAllVendors());
      processMap.put("addVendorItemMapping", new addVendorItemMapping());
      processMap.put("getVendorItemMappings", new getVendorItemMappings());
      processMap.put("getPendingOrdersInventory", new getPendingOrdersInventory());
      processMap.put("getWarehouses", new getWarehouses());
      processMap.put("resetAvailability", new resetAvailability());
      processMap.put("resetAvailabilityForWarehouse", new resetAvailabilityForWarehouse());
      processMap.put("getItemKeysToBeProcessed", new getItemKeysToBeProcessed());
      processMap.put("markMissedInventoryUpdatesAsProcessed", new markMissedInventoryUpdatesAsProcessed());
      processMap.put("getIgnoredItemKeys", new getIgnoredItemKeys());
      processMap.put("addBadInventory", new addBadInventory());
      processMap.put("getShippingLocations", new getShippingLocations());
      processMap.put("getAllVendorItemMappings", new getAllVendorItemMappings());
      processMap.put("getInventorySnapshot", new getInventorySnapshot());
      processMap.put("clearItemAvailabilityCache", new clearItemAvailabilityCache());
      processMap.put("updateVendorString", new updateVendorString());
      processMap.put("clearItemAvailabilityCacheForItem", new clearItemAvailabilityCacheForItem());
      processMap.put("getOurWarehouseIdForVendor", new getOurWarehouseIdForVendor());
      processMap.put("getItemAvailabilitiesAtOurWarehouses", new getItemAvailabilitiesAtOurWarehouses());
      processMap.put("getMonitoredWarehouseForVendors", new getMonitoredWarehouseForVendors());
      processMap.put("getIgnoredWarehouseidsAndItemids", new getIgnoredWarehouseidsAndItemids());
      processMap.put("insertItemtoIgnoreInventoryUpdatelist", new insertItemtoIgnoreInventoryUpdatelist());
      processMap.put("deleteItemFromIgnoredInventoryUpdateList", new deleteItemFromIgnoredInventoryUpdateList());
      processMap.put("getAllIgnoredInventoryupdateItemsCount", new getAllIgnoredInventoryupdateItemsCount());
      processMap.put("getIgnoredInventoryUpdateItemids", new getIgnoredInventoryUpdateItemids());
      processMap.put("updateItemStockPurchaseParams", new updateItemStockPurchaseParams());
      processMap.put("getItemStockPurchaseParams", new getItemStockPurchaseParams());
      processMap.put("addOosStatusForItem", new addOosStatusForItem());
      processMap.put("getOosStatusesForXDaysForItem", new getOosStatusesForXDaysForItem());
      processMap.put("getOosStatusesForXDays", new getOosStatusesForXDays());
      processMap.put("getAllVendorItemPricing", new getAllVendorItemPricing());
      processMap.put("getNonZeroItemStockPurchaseParams", new getNonZeroItemStockPurchaseParams());
      processMap.put("getBillableInventoryAndPendingOrders", new getBillableInventoryAndPendingOrders());
      processMap.put("getWarehouseName", new getWarehouseName());
      processMap.put("getAmazonInventoryForItem", new getAmazonInventoryForItem());
      processMap.put("getAllAmazonInventory", new getAllAmazonInventory());
      processMap.put("addOrUpdateAmazonInventoryForItem", new addOrUpdateAmazonInventoryForItem());
      processMap.put("getLastNdaySaleForItem", new getLastNdaySaleForItem());
      processMap.put("addOrUpdateAmazonFbaInventory", new addOrUpdateAmazonFbaInventory());
      processMap.put("addUpdateHoldInventory", new addUpdateHoldInventory());
      processMap.put("getAmazonFbaItemInventory", new getAmazonFbaItemInventory());
      processMap.put("getAllAmazonFbaItemInventory", new getAllAmazonFbaItemInventory());
      processMap.put("getOursGoodWarehouseIdsForLocation", new getOursGoodWarehouseIdsForLocation());
      processMap.put("getHoldInventoryDetailForItemForWarehouseIdExceptSource", new getHoldInventoryDetailForItemForWarehouseIdExceptSource());
      processMap.put("getSnapdealInventoryForItem", new getSnapdealInventoryForItem());
      processMap.put("addOrUpdateSnapdealInventoryForItem", new addOrUpdateSnapdealInventoryForItem());
      processMap.put("getNlcForWarehouse", new getNlcForWarehouse());
      processMap.put("getHeldInventoryMapForItem", new getHeldInventoryMapForItem());
      processMap.put("addOrUpdateAllAmazonFbaInventory", new addOrUpdateAllAmazonFbaInventory());
      processMap.put("addOrUpdateAllSnapdealInventory", new addOrUpdateAllSnapdealInventory());
      processMap.put("getSnapdealInventorySnapshot", new getSnapdealInventorySnapshot());
      processMap.put("getHoldInventoryDetails", new getHoldInventoryDetails());
      processMap.put("addOrUpdateFlipkartInventorySnapshot", new addOrUpdateFlipkartInventorySnapshot());
      processMap.put("getFlipkartInventorySnapshot", new getFlipkartInventorySnapshot());
      processMap.put("getFlipkartlInventoryForItem", new getFlipkartlInventoryForItem());
      processMap.put("getStateMaster", new getStateMaster());
      processMap.put("updateSnapdealStockAtEOD", new updateSnapdealStockAtEOD());
      processMap.put("updateFlipkartStockAtEOD", new updateFlipkartStockAtEOD());
      processMap.put("getWanNlcForSource", new getWanNlcForSource());
      processMap.put("getAllAvailableAmazonFbaItemInventory", new getAllAvailableAmazonFbaItemInventory());
      processMap.put("updateItemAvailabilityForItemIds", new updateItemAvailabilityForItemIds());
      processMap.put("addVendorItemPricingInBulk", new addVendorItemPricingInBulk());
      processMap.put("addInventoryInBulk", new addInventoryInBulk());
      processMap.put("getFofoAvailability", new getFofoAvailability());
      processMap.put("getFofoFulFillmentWarehouseMap", new getFofoFulFillmentWarehouseMap());
      processMap.put("getItemLocationAvailabilityCache", new getItemLocationAvailabilityCache());
      processMap.put("getItemLocationAvailabilityCacheByItemId", new getItemLocationAvailabilityCacheByItemId());
      processMap.put("getItemPincodeAvailability", new getItemPincodeAvailability());
      return processMap;
    }

    private static class addWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addWarehouse_args> {
      public addWarehouse() {
        super("addWarehouse");
      }

      protected addWarehouse_args getEmptyArgsInstance() {
        return new addWarehouse_args();
      }

      protected addWarehouse_result getResult(I iface, addWarehouse_args args) throws org.apache.thrift.TException {
        addWarehouse_result result = new addWarehouse_result();
        try {
          result.success = iface.addWarehouse(args.warehouse);
          result.setSuccessIsSet(true);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class addVendor<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addVendor_args> {
      public addVendor() {
        super("addVendor");
      }

      protected addVendor_args getEmptyArgsInstance() {
        return new addVendor_args();
      }

      protected addVendor_result getResult(I iface, addVendor_args args) throws org.apache.thrift.TException {
        addVendor_result result = new addVendor_result();
        try {
          result.success = iface.addVendor(args.vendor);
          result.setSuccessIsSet(true);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class updateInventoryHistory<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateInventoryHistory_args> {
      public updateInventoryHistory() {
        super("updateInventoryHistory");
      }

      protected updateInventoryHistory_args getEmptyArgsInstance() {
        return new updateInventoryHistory_args();
      }

      protected updateInventoryHistory_result getResult(I iface, updateInventoryHistory_args args) throws org.apache.thrift.TException {
        updateInventoryHistory_result result = new updateInventoryHistory_result();
        try {
          iface.updateInventoryHistory(args.warehouse_id, args.timestamp, args.availability);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class updateInventory<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateInventory_args> {
      public updateInventory() {
        super("updateInventory");
      }

      protected updateInventory_args getEmptyArgsInstance() {
        return new updateInventory_args();
      }

      protected updateInventory_result getResult(I iface, updateInventory_args args) throws org.apache.thrift.TException {
        updateInventory_result result = new updateInventory_result();
        try {
          iface.updateInventory(args.warehouse_id, args.timestamp, args.availability);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class addInventory<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addInventory_args> {
      public addInventory() {
        super("addInventory");
      }

      protected addInventory_args getEmptyArgsInstance() {
        return new addInventory_args();
      }

      protected addInventory_result getResult(I iface, addInventory_args args) throws org.apache.thrift.TException {
        addInventory_result result = new addInventory_result();
        try {
          iface.addInventory(args.itemId, args.warehouseId, args.quantity);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class retireWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, retireWarehouse_args> {
      public retireWarehouse() {
        super("retireWarehouse");
      }

      protected retireWarehouse_args getEmptyArgsInstance() {
        return new retireWarehouse_args();
      }

      protected retireWarehouse_result getResult(I iface, retireWarehouse_args args) throws org.apache.thrift.TException {
        retireWarehouse_result result = new retireWarehouse_result();
        try {
          iface.retireWarehouse(args.warehouse_id);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class getItemInventoryByItemId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemInventoryByItemId_args> {
      public getItemInventoryByItemId() {
        super("getItemInventoryByItemId");
      }

      protected getItemInventoryByItemId_args getEmptyArgsInstance() {
        return new getItemInventoryByItemId_args();
      }

      protected getItemInventoryByItemId_result getResult(I iface, getItemInventoryByItemId_args args) throws org.apache.thrift.TException {
        getItemInventoryByItemId_result result = new getItemInventoryByItemId_result();
        try {
          result.success = iface.getItemInventoryByItemId(args.item_id);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class getItemAvailibilityAtWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemAvailibilityAtWarehouse_args> {
      public getItemAvailibilityAtWarehouse() {
        super("getItemAvailibilityAtWarehouse");
      }

      protected getItemAvailibilityAtWarehouse_args getEmptyArgsInstance() {
        return new getItemAvailibilityAtWarehouse_args();
      }

      protected getItemAvailibilityAtWarehouse_result getResult(I iface, getItemAvailibilityAtWarehouse_args args) throws org.apache.thrift.TException {
        getItemAvailibilityAtWarehouse_result result = new getItemAvailibilityAtWarehouse_result();
        try {
          result.success = iface.getItemAvailibilityAtWarehouse(args.warehouse_id, args.item_id);
          result.setSuccessIsSet(true);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class getItemAvailabilityAtLocation<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemAvailabilityAtLocation_args> {
      public getItemAvailabilityAtLocation() {
        super("getItemAvailabilityAtLocation");
      }

      protected getItemAvailabilityAtLocation_args getEmptyArgsInstance() {
        return new getItemAvailabilityAtLocation_args();
      }

      protected getItemAvailabilityAtLocation_result getResult(I iface, getItemAvailabilityAtLocation_args args) throws org.apache.thrift.TException {
        getItemAvailabilityAtLocation_result result = new getItemAvailabilityAtLocation_result();
        try {
          result.success = iface.getItemAvailabilityAtLocation(args.itemId, args.sourceId, args.stateId);
        } catch (InventoryServiceException isex) {
          result.isex = isex;
        }
        return result;
      }
    }

    private static class getAllWarehouses<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllWarehouses_args> {
      public getAllWarehouses() {
        super("getAllWarehouses");
      }

      protected getAllWarehouses_args getEmptyArgsInstance() {
        return new getAllWarehouses_args();
      }

      protected getAllWarehouses_result getResult(I iface, getAllWarehouses_args args) throws org.apache.thrift.TException {
        getAllWarehouses_result result = new getAllWarehouses_result();
        try {
          result.success = iface.getAllWarehouses(args.isActive);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class getWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getWarehouse_args> {
      public getWarehouse() {
        super("getWarehouse");
      }

      protected getWarehouse_args getEmptyArgsInstance() {
        return new getWarehouse_args();
      }

      protected getWarehouse_result getResult(I iface, getWarehouse_args args) throws org.apache.thrift.TException {
        getWarehouse_result result = new getWarehouse_result();
        try {
          result.success = iface.getWarehouse(args.warehouse_id);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class getAllItemsForWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllItemsForWarehouse_args> {
      public getAllItemsForWarehouse() {
        super("getAllItemsForWarehouse");
      }

      protected getAllItemsForWarehouse_args getEmptyArgsInstance() {
        return new getAllItemsForWarehouse_args();
      }

      protected getAllItemsForWarehouse_result getResult(I iface, getAllItemsForWarehouse_args args) throws org.apache.thrift.TException {
        getAllItemsForWarehouse_result result = new getAllItemsForWarehouse_result();
        try {
          result.success = iface.getAllItemsForWarehouse(args.warehouse_id);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class isOrderBillable<I extends Iface> extends org.apache.thrift.ProcessFunction<I, isOrderBillable_args> {
      public isOrderBillable() {
        super("isOrderBillable");
      }

      protected isOrderBillable_args getEmptyArgsInstance() {
        return new isOrderBillable_args();
      }

      protected isOrderBillable_result getResult(I iface, isOrderBillable_args args) throws org.apache.thrift.TException {
        isOrderBillable_result result = new isOrderBillable_result();
        result.success = iface.isOrderBillable(args.itemId, args.warehouseId, args.sourceId, args.orderId);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class reserveItemInWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, reserveItemInWarehouse_args> {
      public reserveItemInWarehouse() {
        super("reserveItemInWarehouse");
      }

      protected reserveItemInWarehouse_args getEmptyArgsInstance() {
        return new reserveItemInWarehouse_args();
      }

      protected reserveItemInWarehouse_result getResult(I iface, reserveItemInWarehouse_args args) throws org.apache.thrift.TException {
        reserveItemInWarehouse_result result = new reserveItemInWarehouse_result();
        try {
          result.success = iface.reserveItemInWarehouse(args.itemId, args.warehouseId, args.sourceId, args.orderId, args.createdTimestamp, args.promisedShippingTimestamp, args.quantity);
          result.setSuccessIsSet(true);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class updateReservationForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateReservationForOrder_args> {
      public updateReservationForOrder() {
        super("updateReservationForOrder");
      }

      protected updateReservationForOrder_args getEmptyArgsInstance() {
        return new updateReservationForOrder_args();
      }

      protected updateReservationForOrder_result getResult(I iface, updateReservationForOrder_args args) throws org.apache.thrift.TException {
        updateReservationForOrder_result result = new updateReservationForOrder_result();
        try {
          result.success = iface.updateReservationForOrder(args.itemId, args.warehouseId, args.sourceId, args.orderId, args.createdTimestamp, args.promisedShippingTimestamp, args.quantity);
          result.setSuccessIsSet(true);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class reduceReservationCount<I extends Iface> extends org.apache.thrift.ProcessFunction<I, reduceReservationCount_args> {
      public reduceReservationCount() {
        super("reduceReservationCount");
      }

      protected reduceReservationCount_args getEmptyArgsInstance() {
        return new reduceReservationCount_args();
      }

      protected reduceReservationCount_result getResult(I iface, reduceReservationCount_args args) throws org.apache.thrift.TException {
        reduceReservationCount_result result = new reduceReservationCount_result();
        try {
          result.success = iface.reduceReservationCount(args.itemId, args.warehouseId, args.sourceId, args.orderId, args.quantity);
          result.setSuccessIsSet(true);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class getItemPricing<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemPricing_args> {
      public getItemPricing() {
        super("getItemPricing");
      }

      protected getItemPricing_args getEmptyArgsInstance() {
        return new getItemPricing_args();
      }

      protected getItemPricing_result getResult(I iface, getItemPricing_args args) throws org.apache.thrift.TException {
        getItemPricing_result result = new getItemPricing_result();
        try {
          result.success = iface.getItemPricing(args.itemId, args.vendorId);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class getAllItemPricing<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllItemPricing_args> {
      public getAllItemPricing() {
        super("getAllItemPricing");
      }

      protected getAllItemPricing_args getEmptyArgsInstance() {
        return new getAllItemPricing_args();
      }

      protected getAllItemPricing_result getResult(I iface, getAllItemPricing_args args) throws org.apache.thrift.TException {
        getAllItemPricing_result result = new getAllItemPricing_result();
        try {
          result.success = iface.getAllItemPricing(args.itemId);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class addVendorItemPricing<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addVendorItemPricing_args> {
      public addVendorItemPricing() {
        super("addVendorItemPricing");
      }

      protected addVendorItemPricing_args getEmptyArgsInstance() {
        return new addVendorItemPricing_args();
      }

      protected addVendorItemPricing_result getResult(I iface, addVendorItemPricing_args args) throws org.apache.thrift.TException {
        addVendorItemPricing_result result = new addVendorItemPricing_result();
        try {
          iface.addVendorItemPricing(args.vendorItemPricing);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class getVendor<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getVendor_args> {
      public getVendor() {
        super("getVendor");
      }

      protected getVendor_args getEmptyArgsInstance() {
        return new getVendor_args();
      }

      protected getVendor_result getResult(I iface, getVendor_args args) throws org.apache.thrift.TException {
        getVendor_result result = new getVendor_result();
        result.success = iface.getVendor(args.vendorId);
        return result;
      }
    }

    private static class getAllVendors<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllVendors_args> {
      public getAllVendors() {
        super("getAllVendors");
      }

      protected getAllVendors_args getEmptyArgsInstance() {
        return new getAllVendors_args();
      }

      protected getAllVendors_result getResult(I iface, getAllVendors_args args) throws org.apache.thrift.TException {
        getAllVendors_result result = new getAllVendors_result();
        result.success = iface.getAllVendors();
        return result;
      }
    }

    private static class addVendorItemMapping<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addVendorItemMapping_args> {
      public addVendorItemMapping() {
        super("addVendorItemMapping");
      }

      protected addVendorItemMapping_args getEmptyArgsInstance() {
        return new addVendorItemMapping_args();
      }

      protected addVendorItemMapping_result getResult(I iface, addVendorItemMapping_args args) throws org.apache.thrift.TException {
        addVendorItemMapping_result result = new addVendorItemMapping_result();
        try {
          iface.addVendorItemMapping(args.key, args.vendorItemMapping);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class getVendorItemMappings<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getVendorItemMappings_args> {
      public getVendorItemMappings() {
        super("getVendorItemMappings");
      }

      protected getVendorItemMappings_args getEmptyArgsInstance() {
        return new getVendorItemMappings_args();
      }

      protected getVendorItemMappings_result getResult(I iface, getVendorItemMappings_args args) throws org.apache.thrift.TException {
        getVendorItemMappings_result result = new getVendorItemMappings_result();
        try {
          result.success = iface.getVendorItemMappings(args.itemId);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class getPendingOrdersInventory<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPendingOrdersInventory_args> {
      public getPendingOrdersInventory() {
        super("getPendingOrdersInventory");
      }

      protected getPendingOrdersInventory_args getEmptyArgsInstance() {
        return new getPendingOrdersInventory_args();
      }

      protected getPendingOrdersInventory_result getResult(I iface, getPendingOrdersInventory_args args) throws org.apache.thrift.TException {
        getPendingOrdersInventory_result result = new getPendingOrdersInventory_result();
        result.success = iface.getPendingOrdersInventory(args.vendorid);
        return result;
      }
    }

    private static class getWarehouses<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getWarehouses_args> {
      public getWarehouses() {
        super("getWarehouses");
      }

      protected getWarehouses_args getEmptyArgsInstance() {
        return new getWarehouses_args();
      }

      protected getWarehouses_result getResult(I iface, getWarehouses_args args) throws org.apache.thrift.TException {
        getWarehouses_result result = new getWarehouses_result();
        result.success = iface.getWarehouses(args.warehouseType, args.inventoryType, args.vendorId, args.billingWarehouseId, args.shippingWarehouseId);
        return result;
      }
    }

    private static class resetAvailability<I extends Iface> extends org.apache.thrift.ProcessFunction<I, resetAvailability_args> {
      public resetAvailability() {
        super("resetAvailability");
      }

      protected resetAvailability_args getEmptyArgsInstance() {
        return new resetAvailability_args();
      }

      protected resetAvailability_result getResult(I iface, resetAvailability_args args) throws org.apache.thrift.TException {
        resetAvailability_result result = new resetAvailability_result();
        try {
          iface.resetAvailability(args.itemKey, args.vendorId, args.quantity, args.warehouseId);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class resetAvailabilityForWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, resetAvailabilityForWarehouse_args> {
      public resetAvailabilityForWarehouse() {
        super("resetAvailabilityForWarehouse");
      }

      protected resetAvailabilityForWarehouse_args getEmptyArgsInstance() {
        return new resetAvailabilityForWarehouse_args();
      }

      protected resetAvailabilityForWarehouse_result getResult(I iface, resetAvailabilityForWarehouse_args args) throws org.apache.thrift.TException {
        resetAvailabilityForWarehouse_result result = new resetAvailabilityForWarehouse_result();
        try {
          iface.resetAvailabilityForWarehouse(args.warehouseId);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class getItemKeysToBeProcessed<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemKeysToBeProcessed_args> {
      public getItemKeysToBeProcessed() {
        super("getItemKeysToBeProcessed");
      }

      protected getItemKeysToBeProcessed_args getEmptyArgsInstance() {
        return new getItemKeysToBeProcessed_args();
      }

      protected getItemKeysToBeProcessed_result getResult(I iface, getItemKeysToBeProcessed_args args) throws org.apache.thrift.TException {
        getItemKeysToBeProcessed_result result = new getItemKeysToBeProcessed_result();
        result.success = iface.getItemKeysToBeProcessed(args.warehouseId);
        return result;
      }
    }

    private static class markMissedInventoryUpdatesAsProcessed<I extends Iface> extends org.apache.thrift.ProcessFunction<I, markMissedInventoryUpdatesAsProcessed_args> {
      public markMissedInventoryUpdatesAsProcessed() {
        super("markMissedInventoryUpdatesAsProcessed");
      }

      protected markMissedInventoryUpdatesAsProcessed_args getEmptyArgsInstance() {
        return new markMissedInventoryUpdatesAsProcessed_args();
      }

      protected markMissedInventoryUpdatesAsProcessed_result getResult(I iface, markMissedInventoryUpdatesAsProcessed_args args) throws org.apache.thrift.TException {
        markMissedInventoryUpdatesAsProcessed_result result = new markMissedInventoryUpdatesAsProcessed_result();
        iface.markMissedInventoryUpdatesAsProcessed(args.itemKey, args.warehouseId);
        return result;
      }
    }

    private static class getIgnoredItemKeys<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getIgnoredItemKeys_args> {
      public getIgnoredItemKeys() {
        super("getIgnoredItemKeys");
      }

      protected getIgnoredItemKeys_args getEmptyArgsInstance() {
        return new getIgnoredItemKeys_args();
      }

      protected getIgnoredItemKeys_result getResult(I iface, getIgnoredItemKeys_args args) throws org.apache.thrift.TException {
        getIgnoredItemKeys_result result = new getIgnoredItemKeys_result();
        result.success = iface.getIgnoredItemKeys();
        return result;
      }
    }

    private static class addBadInventory<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addBadInventory_args> {
      public addBadInventory() {
        super("addBadInventory");
      }

      protected addBadInventory_args getEmptyArgsInstance() {
        return new addBadInventory_args();
      }

      protected addBadInventory_result getResult(I iface, addBadInventory_args args) throws org.apache.thrift.TException {
        addBadInventory_result result = new addBadInventory_result();
        try {
          iface.addBadInventory(args.itemId, args.warehouseId, args.quantity);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class getShippingLocations<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getShippingLocations_args> {
      public getShippingLocations() {
        super("getShippingLocations");
      }

      protected getShippingLocations_args getEmptyArgsInstance() {
        return new getShippingLocations_args();
      }

      protected getShippingLocations_result getResult(I iface, getShippingLocations_args args) throws org.apache.thrift.TException {
        getShippingLocations_result result = new getShippingLocations_result();
        result.success = iface.getShippingLocations();
        return result;
      }
    }

    private static class getAllVendorItemMappings<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllVendorItemMappings_args> {
      public getAllVendorItemMappings() {
        super("getAllVendorItemMappings");
      }

      protected getAllVendorItemMappings_args getEmptyArgsInstance() {
        return new getAllVendorItemMappings_args();
      }

      protected getAllVendorItemMappings_result getResult(I iface, getAllVendorItemMappings_args args) throws org.apache.thrift.TException {
        getAllVendorItemMappings_result result = new getAllVendorItemMappings_result();
        result.success = iface.getAllVendorItemMappings();
        return result;
      }
    }

    private static class getInventorySnapshot<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventorySnapshot_args> {
      public getInventorySnapshot() {
        super("getInventorySnapshot");
      }

      protected getInventorySnapshot_args getEmptyArgsInstance() {
        return new getInventorySnapshot_args();
      }

      protected getInventorySnapshot_result getResult(I iface, getInventorySnapshot_args args) throws org.apache.thrift.TException {
        getInventorySnapshot_result result = new getInventorySnapshot_result();
        result.success = iface.getInventorySnapshot(args.warehouseId);
        return result;
      }
    }

    private static class clearItemAvailabilityCache<I extends Iface> extends org.apache.thrift.ProcessFunction<I, clearItemAvailabilityCache_args> {
      public clearItemAvailabilityCache() {
        super("clearItemAvailabilityCache");
      }

      protected clearItemAvailabilityCache_args getEmptyArgsInstance() {
        return new clearItemAvailabilityCache_args();
      }

      protected clearItemAvailabilityCache_result getResult(I iface, clearItemAvailabilityCache_args args) throws org.apache.thrift.TException {
        clearItemAvailabilityCache_result result = new clearItemAvailabilityCache_result();
        iface.clearItemAvailabilityCache();
        return result;
      }
    }

    private static class updateVendorString<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateVendorString_args> {
      public updateVendorString() {
        super("updateVendorString");
      }

      protected updateVendorString_args getEmptyArgsInstance() {
        return new updateVendorString_args();
      }

      protected updateVendorString_result getResult(I iface, updateVendorString_args args) throws org.apache.thrift.TException {
        updateVendorString_result result = new updateVendorString_result();
        iface.updateVendorString(args.warehouseId, args.vendorString);
        return result;
      }
    }

    private static class clearItemAvailabilityCacheForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, clearItemAvailabilityCacheForItem_args> {
      public clearItemAvailabilityCacheForItem() {
        super("clearItemAvailabilityCacheForItem");
      }

      protected clearItemAvailabilityCacheForItem_args getEmptyArgsInstance() {
        return new clearItemAvailabilityCacheForItem_args();
      }

      protected clearItemAvailabilityCacheForItem_result getResult(I iface, clearItemAvailabilityCacheForItem_args args) throws org.apache.thrift.TException {
        clearItemAvailabilityCacheForItem_result result = new clearItemAvailabilityCacheForItem_result();
        iface.clearItemAvailabilityCacheForItem(args.item_id);
        return result;
      }
    }

    private static class getOurWarehouseIdForVendor<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getOurWarehouseIdForVendor_args> {
      public getOurWarehouseIdForVendor() {
        super("getOurWarehouseIdForVendor");
      }

      protected getOurWarehouseIdForVendor_args getEmptyArgsInstance() {
        return new getOurWarehouseIdForVendor_args();
      }

      protected getOurWarehouseIdForVendor_result getResult(I iface, getOurWarehouseIdForVendor_args args) throws org.apache.thrift.TException {
        getOurWarehouseIdForVendor_result result = new getOurWarehouseIdForVendor_result();
        result.success = iface.getOurWarehouseIdForVendor(args.vendorId, args.billingWarehouseId);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class getItemAvailabilitiesAtOurWarehouses<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemAvailabilitiesAtOurWarehouses_args> {
      public getItemAvailabilitiesAtOurWarehouses() {
        super("getItemAvailabilitiesAtOurWarehouses");
      }

      protected getItemAvailabilitiesAtOurWarehouses_args getEmptyArgsInstance() {
        return new getItemAvailabilitiesAtOurWarehouses_args();
      }

      protected getItemAvailabilitiesAtOurWarehouses_result getResult(I iface, getItemAvailabilitiesAtOurWarehouses_args args) throws org.apache.thrift.TException {
        getItemAvailabilitiesAtOurWarehouses_result result = new getItemAvailabilitiesAtOurWarehouses_result();
        result.success = iface.getItemAvailabilitiesAtOurWarehouses(args.item_ids);
        return result;
      }
    }

    private static class getMonitoredWarehouseForVendors<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getMonitoredWarehouseForVendors_args> {
      public getMonitoredWarehouseForVendors() {
        super("getMonitoredWarehouseForVendors");
      }

      protected getMonitoredWarehouseForVendors_args getEmptyArgsInstance() {
        return new getMonitoredWarehouseForVendors_args();
      }

      protected getMonitoredWarehouseForVendors_result getResult(I iface, getMonitoredWarehouseForVendors_args args) throws org.apache.thrift.TException {
        getMonitoredWarehouseForVendors_result result = new getMonitoredWarehouseForVendors_result();
        result.success = iface.getMonitoredWarehouseForVendors(args.vendorIds);
        return result;
      }
    }

    private static class getIgnoredWarehouseidsAndItemids<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getIgnoredWarehouseidsAndItemids_args> {
      public getIgnoredWarehouseidsAndItemids() {
        super("getIgnoredWarehouseidsAndItemids");
      }

      protected getIgnoredWarehouseidsAndItemids_args getEmptyArgsInstance() {
        return new getIgnoredWarehouseidsAndItemids_args();
      }

      protected getIgnoredWarehouseidsAndItemids_result getResult(I iface, getIgnoredWarehouseidsAndItemids_args args) throws org.apache.thrift.TException {
        getIgnoredWarehouseidsAndItemids_result result = new getIgnoredWarehouseidsAndItemids_result();
        result.success = iface.getIgnoredWarehouseidsAndItemids();
        return result;
      }
    }

    private static class insertItemtoIgnoreInventoryUpdatelist<I extends Iface> extends org.apache.thrift.ProcessFunction<I, insertItemtoIgnoreInventoryUpdatelist_args> {
      public insertItemtoIgnoreInventoryUpdatelist() {
        super("insertItemtoIgnoreInventoryUpdatelist");
      }

      protected insertItemtoIgnoreInventoryUpdatelist_args getEmptyArgsInstance() {
        return new insertItemtoIgnoreInventoryUpdatelist_args();
      }

      protected insertItemtoIgnoreInventoryUpdatelist_result getResult(I iface, insertItemtoIgnoreInventoryUpdatelist_args args) throws org.apache.thrift.TException {
        insertItemtoIgnoreInventoryUpdatelist_result result = new insertItemtoIgnoreInventoryUpdatelist_result();
        result.success = iface.insertItemtoIgnoreInventoryUpdatelist(args.item_id, args.warehouse_id);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class deleteItemFromIgnoredInventoryUpdateList<I extends Iface> extends org.apache.thrift.ProcessFunction<I, deleteItemFromIgnoredInventoryUpdateList_args> {
      public deleteItemFromIgnoredInventoryUpdateList() {
        super("deleteItemFromIgnoredInventoryUpdateList");
      }

      protected deleteItemFromIgnoredInventoryUpdateList_args getEmptyArgsInstance() {
        return new deleteItemFromIgnoredInventoryUpdateList_args();
      }

      protected deleteItemFromIgnoredInventoryUpdateList_result getResult(I iface, deleteItemFromIgnoredInventoryUpdateList_args args) throws org.apache.thrift.TException {
        deleteItemFromIgnoredInventoryUpdateList_result result = new deleteItemFromIgnoredInventoryUpdateList_result();
        result.success = iface.deleteItemFromIgnoredInventoryUpdateList(args.item_id, args.warehouse_id);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class getAllIgnoredInventoryupdateItemsCount<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllIgnoredInventoryupdateItemsCount_args> {
      public getAllIgnoredInventoryupdateItemsCount() {
        super("getAllIgnoredInventoryupdateItemsCount");
      }

      protected getAllIgnoredInventoryupdateItemsCount_args getEmptyArgsInstance() {
        return new getAllIgnoredInventoryupdateItemsCount_args();
      }

      protected getAllIgnoredInventoryupdateItemsCount_result getResult(I iface, getAllIgnoredInventoryupdateItemsCount_args args) throws org.apache.thrift.TException {
        getAllIgnoredInventoryupdateItemsCount_result result = new getAllIgnoredInventoryupdateItemsCount_result();
        result.success = iface.getAllIgnoredInventoryupdateItemsCount();
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class getIgnoredInventoryUpdateItemids<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getIgnoredInventoryUpdateItemids_args> {
      public getIgnoredInventoryUpdateItemids() {
        super("getIgnoredInventoryUpdateItemids");
      }

      protected getIgnoredInventoryUpdateItemids_args getEmptyArgsInstance() {
        return new getIgnoredInventoryUpdateItemids_args();
      }

      protected getIgnoredInventoryUpdateItemids_result getResult(I iface, getIgnoredInventoryUpdateItemids_args args) throws org.apache.thrift.TException {
        getIgnoredInventoryUpdateItemids_result result = new getIgnoredInventoryUpdateItemids_result();
        result.success = iface.getIgnoredInventoryUpdateItemids(args.offset, args.limit);
        return result;
      }
    }

    private static class updateItemStockPurchaseParams<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateItemStockPurchaseParams_args> {
      public updateItemStockPurchaseParams() {
        super("updateItemStockPurchaseParams");
      }

      protected updateItemStockPurchaseParams_args getEmptyArgsInstance() {
        return new updateItemStockPurchaseParams_args();
      }

      protected updateItemStockPurchaseParams_result getResult(I iface, updateItemStockPurchaseParams_args args) throws org.apache.thrift.TException {
        updateItemStockPurchaseParams_result result = new updateItemStockPurchaseParams_result();
        iface.updateItemStockPurchaseParams(args.item_id, args.numOfDaysStock, args.minStockLevel);
        return result;
      }
    }

    private static class getItemStockPurchaseParams<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemStockPurchaseParams_args> {
      public getItemStockPurchaseParams() {
        super("getItemStockPurchaseParams");
      }

      protected getItemStockPurchaseParams_args getEmptyArgsInstance() {
        return new getItemStockPurchaseParams_args();
      }

      protected getItemStockPurchaseParams_result getResult(I iface, getItemStockPurchaseParams_args args) throws org.apache.thrift.TException {
        getItemStockPurchaseParams_result result = new getItemStockPurchaseParams_result();
        result.success = iface.getItemStockPurchaseParams(args.itemId);
        return result;
      }
    }

    private static class addOosStatusForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addOosStatusForItem_args> {
      public addOosStatusForItem() {
        super("addOosStatusForItem");
      }

      protected addOosStatusForItem_args getEmptyArgsInstance() {
        return new addOosStatusForItem_args();
      }

      protected addOosStatusForItem_result getResult(I iface, addOosStatusForItem_args args) throws org.apache.thrift.TException {
        addOosStatusForItem_result result = new addOosStatusForItem_result();
        iface.addOosStatusForItem(args.oosStatusMap, args.date);
        return result;
      }
    }

    private static class getOosStatusesForXDaysForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getOosStatusesForXDaysForItem_args> {
      public getOosStatusesForXDaysForItem() {
        super("getOosStatusesForXDaysForItem");
      }

      protected getOosStatusesForXDaysForItem_args getEmptyArgsInstance() {
        return new getOosStatusesForXDaysForItem_args();
      }

      protected getOosStatusesForXDaysForItem_result getResult(I iface, getOosStatusesForXDaysForItem_args args) throws org.apache.thrift.TException {
        getOosStatusesForXDaysForItem_result result = new getOosStatusesForXDaysForItem_result();
        result.success = iface.getOosStatusesForXDaysForItem(args.itemId, args.sourceId, args.days);
        return result;
      }
    }

    private static class getOosStatusesForXDays<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getOosStatusesForXDays_args> {
      public getOosStatusesForXDays() {
        super("getOosStatusesForXDays");
      }

      protected getOosStatusesForXDays_args getEmptyArgsInstance() {
        return new getOosStatusesForXDays_args();
      }

      protected getOosStatusesForXDays_result getResult(I iface, getOosStatusesForXDays_args args) throws org.apache.thrift.TException {
        getOosStatusesForXDays_result result = new getOosStatusesForXDays_result();
        result.success = iface.getOosStatusesForXDays(args.sourceId, args.days);
        return result;
      }
    }

    private static class getAllVendorItemPricing<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllVendorItemPricing_args> {
      public getAllVendorItemPricing() {
        super("getAllVendorItemPricing");
      }

      protected getAllVendorItemPricing_args getEmptyArgsInstance() {
        return new getAllVendorItemPricing_args();
      }

      protected getAllVendorItemPricing_result getResult(I iface, getAllVendorItemPricing_args args) throws org.apache.thrift.TException {
        getAllVendorItemPricing_result result = new getAllVendorItemPricing_result();
        result.success = iface.getAllVendorItemPricing(args.itemId, args.vendorId);
        return result;
      }
    }

    private static class getNonZeroItemStockPurchaseParams<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getNonZeroItemStockPurchaseParams_args> {
      public getNonZeroItemStockPurchaseParams() {
        super("getNonZeroItemStockPurchaseParams");
      }

      protected getNonZeroItemStockPurchaseParams_args getEmptyArgsInstance() {
        return new getNonZeroItemStockPurchaseParams_args();
      }

      protected getNonZeroItemStockPurchaseParams_result getResult(I iface, getNonZeroItemStockPurchaseParams_args args) throws org.apache.thrift.TException {
        getNonZeroItemStockPurchaseParams_result result = new getNonZeroItemStockPurchaseParams_result();
        result.success = iface.getNonZeroItemStockPurchaseParams();
        return result;
      }
    }

    private static class getBillableInventoryAndPendingOrders<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getBillableInventoryAndPendingOrders_args> {
      public getBillableInventoryAndPendingOrders() {
        super("getBillableInventoryAndPendingOrders");
      }

      protected getBillableInventoryAndPendingOrders_args getEmptyArgsInstance() {
        return new getBillableInventoryAndPendingOrders_args();
      }

      protected getBillableInventoryAndPendingOrders_result getResult(I iface, getBillableInventoryAndPendingOrders_args args) throws org.apache.thrift.TException {
        getBillableInventoryAndPendingOrders_result result = new getBillableInventoryAndPendingOrders_result();
        result.success = iface.getBillableInventoryAndPendingOrders();
        return result;
      }
    }

    private static class getWarehouseName<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getWarehouseName_args> {
      public getWarehouseName() {
        super("getWarehouseName");
      }

      protected getWarehouseName_args getEmptyArgsInstance() {
        return new getWarehouseName_args();
      }

      protected getWarehouseName_result getResult(I iface, getWarehouseName_args args) throws org.apache.thrift.TException {
        getWarehouseName_result result = new getWarehouseName_result();
        result.success = iface.getWarehouseName(args.warehouse_id);
        return result;
      }
    }

    private static class getAmazonInventoryForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAmazonInventoryForItem_args> {
      public getAmazonInventoryForItem() {
        super("getAmazonInventoryForItem");
      }

      protected getAmazonInventoryForItem_args getEmptyArgsInstance() {
        return new getAmazonInventoryForItem_args();
      }

      protected getAmazonInventoryForItem_result getResult(I iface, getAmazonInventoryForItem_args args) throws org.apache.thrift.TException {
        getAmazonInventoryForItem_result result = new getAmazonInventoryForItem_result();
        result.success = iface.getAmazonInventoryForItem(args.item_id);
        return result;
      }
    }

    private static class getAllAmazonInventory<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllAmazonInventory_args> {
      public getAllAmazonInventory() {
        super("getAllAmazonInventory");
      }

      protected getAllAmazonInventory_args getEmptyArgsInstance() {
        return new getAllAmazonInventory_args();
      }

      protected getAllAmazonInventory_result getResult(I iface, getAllAmazonInventory_args args) throws org.apache.thrift.TException {
        getAllAmazonInventory_result result = new getAllAmazonInventory_result();
        result.success = iface.getAllAmazonInventory();
        return result;
      }
    }

    private static class addOrUpdateAmazonInventoryForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addOrUpdateAmazonInventoryForItem_args> {
      public addOrUpdateAmazonInventoryForItem() {
        super("addOrUpdateAmazonInventoryForItem");
      }

      protected addOrUpdateAmazonInventoryForItem_args getEmptyArgsInstance() {
        return new addOrUpdateAmazonInventoryForItem_args();
      }

      protected addOrUpdateAmazonInventoryForItem_result getResult(I iface, addOrUpdateAmazonInventoryForItem_args args) throws org.apache.thrift.TException {
        addOrUpdateAmazonInventoryForItem_result result = new addOrUpdateAmazonInventoryForItem_result();
        iface.addOrUpdateAmazonInventoryForItem(args.amazonInventorySnapshot, args.time);
        return result;
      }
    }

    private static class getLastNdaySaleForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getLastNdaySaleForItem_args> {
      public getLastNdaySaleForItem() {
        super("getLastNdaySaleForItem");
      }

      protected getLastNdaySaleForItem_args getEmptyArgsInstance() {
        return new getLastNdaySaleForItem_args();
      }

      protected getLastNdaySaleForItem_result getResult(I iface, getLastNdaySaleForItem_args args) throws org.apache.thrift.TException {
        getLastNdaySaleForItem_result result = new getLastNdaySaleForItem_result();
        result.success = iface.getLastNdaySaleForItem(args.itemId, args.numberOfDays);
        return result;
      }
    }

    private static class addOrUpdateAmazonFbaInventory<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addOrUpdateAmazonFbaInventory_args> {
      public addOrUpdateAmazonFbaInventory() {
        super("addOrUpdateAmazonFbaInventory");
      }

      protected addOrUpdateAmazonFbaInventory_args getEmptyArgsInstance() {
        return new addOrUpdateAmazonFbaInventory_args();
      }

      protected addOrUpdateAmazonFbaInventory_result getResult(I iface, addOrUpdateAmazonFbaInventory_args args) throws org.apache.thrift.TException {
        addOrUpdateAmazonFbaInventory_result result = new addOrUpdateAmazonFbaInventory_result();
        iface.addOrUpdateAmazonFbaInventory(args.amazonfbainventorysnapshot);
        return result;
      }
    }

    private static class addUpdateHoldInventory<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addUpdateHoldInventory_args> {
      public addUpdateHoldInventory() {
        super("addUpdateHoldInventory");
      }

      protected addUpdateHoldInventory_args getEmptyArgsInstance() {
        return new addUpdateHoldInventory_args();
      }

      protected addUpdateHoldInventory_result getResult(I iface, addUpdateHoldInventory_args args) throws org.apache.thrift.TException {
        addUpdateHoldInventory_result result = new addUpdateHoldInventory_result();
        try {
          iface.addUpdateHoldInventory(args.itemId, args.warehouseId, args.holdQuantity, args.source);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class getAmazonFbaItemInventory<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAmazonFbaItemInventory_args> {
      public getAmazonFbaItemInventory() {
        super("getAmazonFbaItemInventory");
      }

      protected getAmazonFbaItemInventory_args getEmptyArgsInstance() {
        return new getAmazonFbaItemInventory_args();
      }

      protected getAmazonFbaItemInventory_result getResult(I iface, getAmazonFbaItemInventory_args args) throws org.apache.thrift.TException {
        getAmazonFbaItemInventory_result result = new getAmazonFbaItemInventory_result();
        result.success = iface.getAmazonFbaItemInventory(args.itemId);
        return result;
      }
    }

    private static class getAllAmazonFbaItemInventory<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllAmazonFbaItemInventory_args> {
      public getAllAmazonFbaItemInventory() {
        super("getAllAmazonFbaItemInventory");
      }

      protected getAllAmazonFbaItemInventory_args getEmptyArgsInstance() {
        return new getAllAmazonFbaItemInventory_args();
      }

      protected getAllAmazonFbaItemInventory_result getResult(I iface, getAllAmazonFbaItemInventory_args args) throws org.apache.thrift.TException {
        getAllAmazonFbaItemInventory_result result = new getAllAmazonFbaItemInventory_result();
        result.success = iface.getAllAmazonFbaItemInventory();
        return result;
      }
    }

    private static class getOursGoodWarehouseIdsForLocation<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getOursGoodWarehouseIdsForLocation_args> {
      public getOursGoodWarehouseIdsForLocation() {
        super("getOursGoodWarehouseIdsForLocation");
      }

      protected getOursGoodWarehouseIdsForLocation_args getEmptyArgsInstance() {
        return new getOursGoodWarehouseIdsForLocation_args();
      }

      protected getOursGoodWarehouseIdsForLocation_result getResult(I iface, getOursGoodWarehouseIdsForLocation_args args) throws org.apache.thrift.TException {
        getOursGoodWarehouseIdsForLocation_result result = new getOursGoodWarehouseIdsForLocation_result();
        result.success = iface.getOursGoodWarehouseIdsForLocation(args.state_id);
        return result;
      }
    }

    private static class getHoldInventoryDetailForItemForWarehouseIdExceptSource<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getHoldInventoryDetailForItemForWarehouseIdExceptSource_args> {
      public getHoldInventoryDetailForItemForWarehouseIdExceptSource() {
        super("getHoldInventoryDetailForItemForWarehouseIdExceptSource");
      }

      protected getHoldInventoryDetailForItemForWarehouseIdExceptSource_args getEmptyArgsInstance() {
        return new getHoldInventoryDetailForItemForWarehouseIdExceptSource_args();
      }

      protected getHoldInventoryDetailForItemForWarehouseIdExceptSource_result getResult(I iface, getHoldInventoryDetailForItemForWarehouseIdExceptSource_args args) throws org.apache.thrift.TException {
        getHoldInventoryDetailForItemForWarehouseIdExceptSource_result result = new getHoldInventoryDetailForItemForWarehouseIdExceptSource_result();
        result.success = iface.getHoldInventoryDetailForItemForWarehouseIdExceptSource(args.id, args.warehouse_id, args.source);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class getSnapdealInventoryForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSnapdealInventoryForItem_args> {
      public getSnapdealInventoryForItem() {
        super("getSnapdealInventoryForItem");
      }

      protected getSnapdealInventoryForItem_args getEmptyArgsInstance() {
        return new getSnapdealInventoryForItem_args();
      }

      protected getSnapdealInventoryForItem_result getResult(I iface, getSnapdealInventoryForItem_args args) throws org.apache.thrift.TException {
        getSnapdealInventoryForItem_result result = new getSnapdealInventoryForItem_result();
        result.success = iface.getSnapdealInventoryForItem(args.item_id);
        return result;
      }
    }

    private static class addOrUpdateSnapdealInventoryForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addOrUpdateSnapdealInventoryForItem_args> {
      public addOrUpdateSnapdealInventoryForItem() {
        super("addOrUpdateSnapdealInventoryForItem");
      }

      protected addOrUpdateSnapdealInventoryForItem_args getEmptyArgsInstance() {
        return new addOrUpdateSnapdealInventoryForItem_args();
      }

      protected addOrUpdateSnapdealInventoryForItem_result getResult(I iface, addOrUpdateSnapdealInventoryForItem_args args) throws org.apache.thrift.TException {
        addOrUpdateSnapdealInventoryForItem_result result = new addOrUpdateSnapdealInventoryForItem_result();
        iface.addOrUpdateSnapdealInventoryForItem(args.snapdealinventoryitem);
        return result;
      }
    }

    private static class getNlcForWarehouse<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getNlcForWarehouse_args> {
      public getNlcForWarehouse() {
        super("getNlcForWarehouse");
      }

      protected getNlcForWarehouse_args getEmptyArgsInstance() {
        return new getNlcForWarehouse_args();
      }

      protected getNlcForWarehouse_result getResult(I iface, getNlcForWarehouse_args args) throws org.apache.thrift.TException {
        getNlcForWarehouse_result result = new getNlcForWarehouse_result();
        result.success = iface.getNlcForWarehouse(args.warehouse_id, args.item_id);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class getHeldInventoryMapForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getHeldInventoryMapForItem_args> {
      public getHeldInventoryMapForItem() {
        super("getHeldInventoryMapForItem");
      }

      protected getHeldInventoryMapForItem_args getEmptyArgsInstance() {
        return new getHeldInventoryMapForItem_args();
      }

      protected getHeldInventoryMapForItem_result getResult(I iface, getHeldInventoryMapForItem_args args) throws org.apache.thrift.TException {
        getHeldInventoryMapForItem_result result = new getHeldInventoryMapForItem_result();
        result.success = iface.getHeldInventoryMapForItem(args.item_id, args.warehouse_id);
        return result;
      }
    }

    private static class addOrUpdateAllAmazonFbaInventory<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addOrUpdateAllAmazonFbaInventory_args> {
      public addOrUpdateAllAmazonFbaInventory() {
        super("addOrUpdateAllAmazonFbaInventory");
      }

      protected addOrUpdateAllAmazonFbaInventory_args getEmptyArgsInstance() {
        return new addOrUpdateAllAmazonFbaInventory_args();
      }

      protected addOrUpdateAllAmazonFbaInventory_result getResult(I iface, addOrUpdateAllAmazonFbaInventory_args args) throws org.apache.thrift.TException {
        addOrUpdateAllAmazonFbaInventory_result result = new addOrUpdateAllAmazonFbaInventory_result();
        iface.addOrUpdateAllAmazonFbaInventory(args.allamazonfbainventorysnapshot);
        return result;
      }
    }

    private static class addOrUpdateAllSnapdealInventory<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addOrUpdateAllSnapdealInventory_args> {
      public addOrUpdateAllSnapdealInventory() {
        super("addOrUpdateAllSnapdealInventory");
      }

      protected addOrUpdateAllSnapdealInventory_args getEmptyArgsInstance() {
        return new addOrUpdateAllSnapdealInventory_args();
      }

      protected addOrUpdateAllSnapdealInventory_result getResult(I iface, addOrUpdateAllSnapdealInventory_args args) throws org.apache.thrift.TException {
        addOrUpdateAllSnapdealInventory_result result = new addOrUpdateAllSnapdealInventory_result();
        iface.addOrUpdateAllSnapdealInventory(args.allsnapdealinventorysnapshot);
        return result;
      }
    }

    private static class getSnapdealInventorySnapshot<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSnapdealInventorySnapshot_args> {
      public getSnapdealInventorySnapshot() {
        super("getSnapdealInventorySnapshot");
      }

      protected getSnapdealInventorySnapshot_args getEmptyArgsInstance() {
        return new getSnapdealInventorySnapshot_args();
      }

      protected getSnapdealInventorySnapshot_result getResult(I iface, getSnapdealInventorySnapshot_args args) throws org.apache.thrift.TException {
        getSnapdealInventorySnapshot_result result = new getSnapdealInventorySnapshot_result();
        result.success = iface.getSnapdealInventorySnapshot();
        return result;
      }
    }

    private static class getHoldInventoryDetails<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getHoldInventoryDetails_args> {
      public getHoldInventoryDetails() {
        super("getHoldInventoryDetails");
      }

      protected getHoldInventoryDetails_args getEmptyArgsInstance() {
        return new getHoldInventoryDetails_args();
      }

      protected getHoldInventoryDetails_result getResult(I iface, getHoldInventoryDetails_args args) throws org.apache.thrift.TException {
        getHoldInventoryDetails_result result = new getHoldInventoryDetails_result();
        result.success = iface.getHoldInventoryDetails(args.itemId, args.warehouseId, args.source);
        return result;
      }
    }

    private static class addOrUpdateFlipkartInventorySnapshot<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addOrUpdateFlipkartInventorySnapshot_args> {
      public addOrUpdateFlipkartInventorySnapshot() {
        super("addOrUpdateFlipkartInventorySnapshot");
      }

      protected addOrUpdateFlipkartInventorySnapshot_args getEmptyArgsInstance() {
        return new addOrUpdateFlipkartInventorySnapshot_args();
      }

      protected addOrUpdateFlipkartInventorySnapshot_result getResult(I iface, addOrUpdateFlipkartInventorySnapshot_args args) throws org.apache.thrift.TException {
        addOrUpdateFlipkartInventorySnapshot_result result = new addOrUpdateFlipkartInventorySnapshot_result();
        iface.addOrUpdateFlipkartInventorySnapshot(args.flipkartInventorySnapshot, args.time);
        return result;
      }
    }

    private static class getFlipkartInventorySnapshot<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getFlipkartInventorySnapshot_args> {
      public getFlipkartInventorySnapshot() {
        super("getFlipkartInventorySnapshot");
      }

      protected getFlipkartInventorySnapshot_args getEmptyArgsInstance() {
        return new getFlipkartInventorySnapshot_args();
      }

      protected getFlipkartInventorySnapshot_result getResult(I iface, getFlipkartInventorySnapshot_args args) throws org.apache.thrift.TException {
        getFlipkartInventorySnapshot_result result = new getFlipkartInventorySnapshot_result();
        result.success = iface.getFlipkartInventorySnapshot();
        return result;
      }
    }

    private static class getFlipkartlInventoryForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getFlipkartlInventoryForItem_args> {
      public getFlipkartlInventoryForItem() {
        super("getFlipkartlInventoryForItem");
      }

      protected getFlipkartlInventoryForItem_args getEmptyArgsInstance() {
        return new getFlipkartlInventoryForItem_args();
      }

      protected getFlipkartlInventoryForItem_result getResult(I iface, getFlipkartlInventoryForItem_args args) throws org.apache.thrift.TException {
        getFlipkartlInventoryForItem_result result = new getFlipkartlInventoryForItem_result();
        result.success = iface.getFlipkartlInventoryForItem(args.item_id);
        return result;
      }
    }

    private static class getStateMaster<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getStateMaster_args> {
      public getStateMaster() {
        super("getStateMaster");
      }

      protected getStateMaster_args getEmptyArgsInstance() {
        return new getStateMaster_args();
      }

      protected getStateMaster_result getResult(I iface, getStateMaster_args args) throws org.apache.thrift.TException {
        getStateMaster_result result = new getStateMaster_result();
        result.success = iface.getStateMaster();
        return result;
      }
    }

    private static class updateSnapdealStockAtEOD<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateSnapdealStockAtEOD_args> {
      public updateSnapdealStockAtEOD() {
        super("updateSnapdealStockAtEOD");
      }

      protected updateSnapdealStockAtEOD_args getEmptyArgsInstance() {
        return new updateSnapdealStockAtEOD_args();
      }

      protected updateSnapdealStockAtEOD_result getResult(I iface, updateSnapdealStockAtEOD_args args) throws org.apache.thrift.TException {
        updateSnapdealStockAtEOD_result result = new updateSnapdealStockAtEOD_result();
        iface.updateSnapdealStockAtEOD(args.allsnapdealstock);
        return result;
      }
    }

    private static class updateFlipkartStockAtEOD<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateFlipkartStockAtEOD_args> {
      public updateFlipkartStockAtEOD() {
        super("updateFlipkartStockAtEOD");
      }

      protected updateFlipkartStockAtEOD_args getEmptyArgsInstance() {
        return new updateFlipkartStockAtEOD_args();
      }

      protected updateFlipkartStockAtEOD_result getResult(I iface, updateFlipkartStockAtEOD_args args) throws org.apache.thrift.TException {
        updateFlipkartStockAtEOD_result result = new updateFlipkartStockAtEOD_result();
        iface.updateFlipkartStockAtEOD(args.allflipkartstock);
        return result;
      }
    }

    private static class getWanNlcForSource<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getWanNlcForSource_args> {
      public getWanNlcForSource() {
        super("getWanNlcForSource");
      }

      protected getWanNlcForSource_args getEmptyArgsInstance() {
        return new getWanNlcForSource_args();
      }

      protected getWanNlcForSource_result getResult(I iface, getWanNlcForSource_args args) throws org.apache.thrift.TException {
        getWanNlcForSource_result result = new getWanNlcForSource_result();
        result.success = iface.getWanNlcForSource(args.item_id, args.source);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class getAllAvailableAmazonFbaItemInventory<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getAllAvailableAmazonFbaItemInventory_args> {
      public getAllAvailableAmazonFbaItemInventory() {
        super("getAllAvailableAmazonFbaItemInventory");
      }

      protected getAllAvailableAmazonFbaItemInventory_args getEmptyArgsInstance() {
        return new getAllAvailableAmazonFbaItemInventory_args();
      }

      protected getAllAvailableAmazonFbaItemInventory_result getResult(I iface, getAllAvailableAmazonFbaItemInventory_args args) throws org.apache.thrift.TException {
        getAllAvailableAmazonFbaItemInventory_result result = new getAllAvailableAmazonFbaItemInventory_result();
        result.success = iface.getAllAvailableAmazonFbaItemInventory();
        return result;
      }
    }

    private static class updateItemAvailabilityForItemIds<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updateItemAvailabilityForItemIds_args> {
      public updateItemAvailabilityForItemIds() {
        super("updateItemAvailabilityForItemIds");
      }

      protected updateItemAvailabilityForItemIds_args getEmptyArgsInstance() {
        return new updateItemAvailabilityForItemIds_args();
      }

      protected updateItemAvailabilityForItemIds_result getResult(I iface, updateItemAvailabilityForItemIds_args args) throws org.apache.thrift.TException {
        updateItemAvailabilityForItemIds_result result = new updateItemAvailabilityForItemIds_result();
        result.success = iface.updateItemAvailabilityForItemIds(args.itemIds);
        result.setSuccessIsSet(true);
        return result;
      }
    }

    private static class addVendorItemPricingInBulk<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addVendorItemPricingInBulk_args> {
      public addVendorItemPricingInBulk() {
        super("addVendorItemPricingInBulk");
      }

      protected addVendorItemPricingInBulk_args getEmptyArgsInstance() {
        return new addVendorItemPricingInBulk_args();
      }

      protected addVendorItemPricingInBulk_result getResult(I iface, addVendorItemPricingInBulk_args args) throws org.apache.thrift.TException {
        addVendorItemPricingInBulk_result result = new addVendorItemPricingInBulk_result();
        result.success = iface.addVendorItemPricingInBulk(args.vendorItemPricingList);
        return result;
      }
    }

    private static class addInventoryInBulk<I extends Iface> extends org.apache.thrift.ProcessFunction<I, addInventoryInBulk_args> {
      public addInventoryInBulk() {
        super("addInventoryInBulk");
      }

      protected addInventoryInBulk_args getEmptyArgsInstance() {
        return new addInventoryInBulk_args();
      }

      protected addInventoryInBulk_result getResult(I iface, addInventoryInBulk_args args) throws org.apache.thrift.TException {
        addInventoryInBulk_result result = new addInventoryInBulk_result();
        try {
          iface.addInventoryInBulk(args.bulkInventoryList);
        } catch (InventoryServiceException cex) {
          result.cex = cex;
        }
        return result;
      }
    }

    private static class getFofoAvailability<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getFofoAvailability_args> {
      public getFofoAvailability() {
        super("getFofoAvailability");
      }

      protected getFofoAvailability_args getEmptyArgsInstance() {
        return new getFofoAvailability_args();
      }

      protected getFofoAvailability_result getResult(I iface, getFofoAvailability_args args) throws org.apache.thrift.TException {
        getFofoAvailability_result result = new getFofoAvailability_result();
        result.success = iface.getFofoAvailability(args.itemIds);
        return result;
      }
    }

    private static class getFofoFulFillmentWarehouseMap<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getFofoFulFillmentWarehouseMap_args> {
      public getFofoFulFillmentWarehouseMap() {
        super("getFofoFulFillmentWarehouseMap");
      }

      protected getFofoFulFillmentWarehouseMap_args getEmptyArgsInstance() {
        return new getFofoFulFillmentWarehouseMap_args();
      }

      protected getFofoFulFillmentWarehouseMap_result getResult(I iface, getFofoFulFillmentWarehouseMap_args args) throws org.apache.thrift.TException {
        getFofoFulFillmentWarehouseMap_result result = new getFofoFulFillmentWarehouseMap_result();
        result.success = iface.getFofoFulFillmentWarehouseMap(args.itemIds);
        return result;
      }
    }

    private static class getItemLocationAvailabilityCache<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemLocationAvailabilityCache_args> {
      public getItemLocationAvailabilityCache() {
        super("getItemLocationAvailabilityCache");
      }

      protected getItemLocationAvailabilityCache_args getEmptyArgsInstance() {
        return new getItemLocationAvailabilityCache_args();
      }

      protected getItemLocationAvailabilityCache_result getResult(I iface, getItemLocationAvailabilityCache_args args) throws org.apache.thrift.TException {
        getItemLocationAvailabilityCache_result result = new getItemLocationAvailabilityCache_result();
        result.success = iface.getItemLocationAvailabilityCache(args.itemLocations);
        return result;
      }
    }

    private static class getItemLocationAvailabilityCacheByItemId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemLocationAvailabilityCacheByItemId_args> {
      public getItemLocationAvailabilityCacheByItemId() {
        super("getItemLocationAvailabilityCacheByItemId");
      }

      protected getItemLocationAvailabilityCacheByItemId_args getEmptyArgsInstance() {
        return new getItemLocationAvailabilityCacheByItemId_args();
      }

      protected getItemLocationAvailabilityCacheByItemId_result getResult(I iface, getItemLocationAvailabilityCacheByItemId_args args) throws org.apache.thrift.TException {
        getItemLocationAvailabilityCacheByItemId_result result = new getItemLocationAvailabilityCacheByItemId_result();
        result.success = iface.getItemLocationAvailabilityCacheByItemId(args.itemIds);
        return result;
      }
    }

    private static class getItemPincodeAvailability<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemPincodeAvailability_args> {
      public getItemPincodeAvailability() {
        super("getItemPincodeAvailability");
      }

      protected getItemPincodeAvailability_args getEmptyArgsInstance() {
        return new getItemPincodeAvailability_args();
      }

      protected getItemPincodeAvailability_result getResult(I iface, getItemPincodeAvailability_args args) throws org.apache.thrift.TException {
        getItemPincodeAvailability_result result = new getItemPincodeAvailability_result();
        result.success = iface.getItemPincodeAvailability(args.itempricing, args.pincode);
        return result;
      }
    }

  }

  public static class addWarehouse_args implements org.apache.thrift.TBase<addWarehouse_args, addWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addWarehouse_args");

    private static final org.apache.thrift.protocol.TField WAREHOUSE_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouse", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private Warehouse warehouse; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      WAREHOUSE((short)1, "warehouse");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // WAREHOUSE
            return WAREHOUSE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.WAREHOUSE, new org.apache.thrift.meta_data.FieldMetaData("warehouse", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Warehouse.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addWarehouse_args.class, metaDataMap);
    }

    public addWarehouse_args() {
    }

    public addWarehouse_args(
      Warehouse warehouse)
    {
      this();
      this.warehouse = warehouse;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addWarehouse_args(addWarehouse_args other) {
      if (other.isSetWarehouse()) {
        this.warehouse = new Warehouse(other.warehouse);
      }
    }

    public addWarehouse_args deepCopy() {
      return new addWarehouse_args(this);
    }

    @Override
    public void clear() {
      this.warehouse = null;
    }

    public Warehouse getWarehouse() {
      return this.warehouse;
    }

    public void setWarehouse(Warehouse warehouse) {
      this.warehouse = warehouse;
    }

    public void unsetWarehouse() {
      this.warehouse = null;
    }

    /** Returns true if field warehouse is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouse() {
      return this.warehouse != null;
    }

    public void setWarehouseIsSet(boolean value) {
      if (!value) {
        this.warehouse = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case WAREHOUSE:
        if (value == null) {
          unsetWarehouse();
        } else {
          setWarehouse((Warehouse)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case WAREHOUSE:
        return getWarehouse();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case WAREHOUSE:
        return isSetWarehouse();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addWarehouse_args)
        return this.equals((addWarehouse_args)that);
      return false;
    }

    public boolean equals(addWarehouse_args that) {
      if (that == null)
        return false;

      boolean this_present_warehouse = true && this.isSetWarehouse();
      boolean that_present_warehouse = true && that.isSetWarehouse();
      if (this_present_warehouse || that_present_warehouse) {
        if (!(this_present_warehouse && that_present_warehouse))
          return false;
        if (!this.warehouse.equals(that.warehouse))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addWarehouse_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addWarehouse_args typedOther = (addWarehouse_args)other;

      lastComparison = Boolean.valueOf(isSetWarehouse()).compareTo(typedOther.isSetWarehouse());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouse()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouse, typedOther.warehouse);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // WAREHOUSE
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.warehouse = new Warehouse();
              this.warehouse.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.warehouse != null) {
        oprot.writeFieldBegin(WAREHOUSE_FIELD_DESC);
        this.warehouse.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addWarehouse_args(");
      boolean first = true;

      sb.append("warehouse:");
      if (this.warehouse == null) {
        sb.append("null");
      } else {
        sb.append(this.warehouse);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addWarehouse_result implements org.apache.thrift.TBase<addWarehouse_result, addWarehouse_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addWarehouse_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private long success; // required
    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addWarehouse_result.class, metaDataMap);
    }

    public addWarehouse_result() {
    }

    public addWarehouse_result(
      long success,
      InventoryServiceException cex)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addWarehouse_result(addWarehouse_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public addWarehouse_result deepCopy() {
      return new addWarehouse_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.cex = null;
    }

    public long getSuccess() {
      return this.success;
    }

    public void setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Long)value);
        }
        break;

      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Long.valueOf(getSuccess());

      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addWarehouse_result)
        return this.equals((addWarehouse_result)that);
      return false;
    }

    public boolean equals(addWarehouse_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addWarehouse_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addWarehouse_result typedOther = (addWarehouse_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.success = iprot.readI64();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI64(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addWarehouse_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addVendor_args implements org.apache.thrift.TBase<addVendor_args, addVendor_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVendor_args");

    private static final org.apache.thrift.protocol.TField VENDOR_FIELD_DESC = new org.apache.thrift.protocol.TField("vendor", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private Vendor vendor; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      VENDOR((short)1, "vendor");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // VENDOR
            return VENDOR;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.VENDOR, new org.apache.thrift.meta_data.FieldMetaData("vendor", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Vendor.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVendor_args.class, metaDataMap);
    }

    public addVendor_args() {
    }

    public addVendor_args(
      Vendor vendor)
    {
      this();
      this.vendor = vendor;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addVendor_args(addVendor_args other) {
      if (other.isSetVendor()) {
        this.vendor = new Vendor(other.vendor);
      }
    }

    public addVendor_args deepCopy() {
      return new addVendor_args(this);
    }

    @Override
    public void clear() {
      this.vendor = null;
    }

    public Vendor getVendor() {
      return this.vendor;
    }

    public void setVendor(Vendor vendor) {
      this.vendor = vendor;
    }

    public void unsetVendor() {
      this.vendor = null;
    }

    /** Returns true if field vendor is set (has been assigned a value) and false otherwise */
    public boolean isSetVendor() {
      return this.vendor != null;
    }

    public void setVendorIsSet(boolean value) {
      if (!value) {
        this.vendor = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case VENDOR:
        if (value == null) {
          unsetVendor();
        } else {
          setVendor((Vendor)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case VENDOR:
        return getVendor();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case VENDOR:
        return isSetVendor();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addVendor_args)
        return this.equals((addVendor_args)that);
      return false;
    }

    public boolean equals(addVendor_args that) {
      if (that == null)
        return false;

      boolean this_present_vendor = true && this.isSetVendor();
      boolean that_present_vendor = true && that.isSetVendor();
      if (this_present_vendor || that_present_vendor) {
        if (!(this_present_vendor && that_present_vendor))
          return false;
        if (!this.vendor.equals(that.vendor))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addVendor_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addVendor_args typedOther = (addVendor_args)other;

      lastComparison = Boolean.valueOf(isSetVendor()).compareTo(typedOther.isSetVendor());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetVendor()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendor, typedOther.vendor);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // VENDOR
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.vendor = new Vendor();
              this.vendor.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.vendor != null) {
        oprot.writeFieldBegin(VENDOR_FIELD_DESC);
        this.vendor.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addVendor_args(");
      boolean first = true;

      sb.append("vendor:");
      if (this.vendor == null) {
        sb.append("null");
      } else {
        sb.append(this.vendor);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addVendor_result implements org.apache.thrift.TBase<addVendor_result, addVendor_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVendor_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private long success; // required
    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVendor_result.class, metaDataMap);
    }

    public addVendor_result() {
    }

    public addVendor_result(
      long success,
      InventoryServiceException cex)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addVendor_result(addVendor_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public addVendor_result deepCopy() {
      return new addVendor_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.cex = null;
    }

    public long getSuccess() {
      return this.success;
    }

    public void setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Long)value);
        }
        break;

      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Long.valueOf(getSuccess());

      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addVendor_result)
        return this.equals((addVendor_result)that);
      return false;
    }

    public boolean equals(addVendor_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addVendor_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addVendor_result typedOther = (addVendor_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.success = iprot.readI64();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI64(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addVendor_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateInventoryHistory_args implements org.apache.thrift.TBase<updateInventoryHistory_args, updateInventoryHistory_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateInventoryHistory_args");

    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouse_id", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField AVAILABILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("availability", org.apache.thrift.protocol.TType.MAP, (short)3);

    private long warehouse_id; // required
    private String timestamp; // required
    private Map<String,Long> availability; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      WAREHOUSE_ID((short)1, "warehouse_id"),
      TIMESTAMP((short)2, "timestamp"),
      AVAILABILITY((short)3, "availability");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          case 2: // TIMESTAMP
            return TIMESTAMP;
          case 3: // AVAILABILITY
            return AVAILABILITY;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __WAREHOUSE_ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouse_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.AVAILABILITY, new org.apache.thrift.meta_data.FieldMetaData("availability", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateInventoryHistory_args.class, metaDataMap);
    }

    public updateInventoryHistory_args() {
    }

    public updateInventoryHistory_args(
      long warehouse_id,
      String timestamp,
      Map<String,Long> availability)
    {
      this();
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
      this.timestamp = timestamp;
      this.availability = availability;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateInventoryHistory_args(updateInventoryHistory_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.warehouse_id = other.warehouse_id;
      if (other.isSetTimestamp()) {
        this.timestamp = other.timestamp;
      }
      if (other.isSetAvailability()) {
        Map<String,Long> __this__availability = new HashMap<String,Long>();
        for (Map.Entry<String, Long> other_element : other.availability.entrySet()) {

          String other_element_key = other_element.getKey();
          Long other_element_value = other_element.getValue();

          String __this__availability_copy_key = other_element_key;

          Long __this__availability_copy_value = other_element_value;

          __this__availability.put(__this__availability_copy_key, __this__availability_copy_value);
        }
        this.availability = __this__availability;
      }
    }

    public updateInventoryHistory_args deepCopy() {
      return new updateInventoryHistory_args(this);
    }

    @Override
    public void clear() {
      setWarehouse_idIsSet(false);
      this.warehouse_id = 0;
      this.timestamp = null;
      this.availability = null;
    }

    public long getWarehouse_id() {
      return this.warehouse_id;
    }

    public void setWarehouse_id(long warehouse_id) {
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    public void unsetWarehouse_id() {
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
    }

    /** Returns true if field warehouse_id is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouse_id() {
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
    }

    public void setWarehouse_idIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
    }

    public String getTimestamp() {
      return this.timestamp;
    }

    public void setTimestamp(String timestamp) {
      this.timestamp = timestamp;
    }

    public void unsetTimestamp() {
      this.timestamp = null;
    }

    /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
    public boolean isSetTimestamp() {
      return this.timestamp != null;
    }

    public void setTimestampIsSet(boolean value) {
      if (!value) {
        this.timestamp = null;
      }
    }

    public int getAvailabilitySize() {
      return (this.availability == null) ? 0 : this.availability.size();
    }

    public void putToAvailability(String key, long val) {
      if (this.availability == null) {
        this.availability = new HashMap<String,Long>();
      }
      this.availability.put(key, val);
    }

    public Map<String,Long> getAvailability() {
      return this.availability;
    }

    public void setAvailability(Map<String,Long> availability) {
      this.availability = availability;
    }

    public void unsetAvailability() {
      this.availability = null;
    }

    /** Returns true if field availability is set (has been assigned a value) and false otherwise */
    public boolean isSetAvailability() {
      return this.availability != null;
    }

    public void setAvailabilityIsSet(boolean value) {
      if (!value) {
        this.availability = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouse_id();
        } else {
          setWarehouse_id((Long)value);
        }
        break;

      case TIMESTAMP:
        if (value == null) {
          unsetTimestamp();
        } else {
          setTimestamp((String)value);
        }
        break;

      case AVAILABILITY:
        if (value == null) {
          unsetAvailability();
        } else {
          setAvailability((Map<String,Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouse_id());

      case TIMESTAMP:
        return getTimestamp();

      case AVAILABILITY:
        return getAvailability();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case WAREHOUSE_ID:
        return isSetWarehouse_id();
      case TIMESTAMP:
        return isSetTimestamp();
      case AVAILABILITY:
        return isSetAvailability();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateInventoryHistory_args)
        return this.equals((updateInventoryHistory_args)that);
      return false;
    }

    public boolean equals(updateInventoryHistory_args that) {
      if (that == null)
        return false;

      boolean this_present_warehouse_id = true;
      boolean that_present_warehouse_id = true;
      if (this_present_warehouse_id || that_present_warehouse_id) {
        if (!(this_present_warehouse_id && that_present_warehouse_id))
          return false;
        if (this.warehouse_id != that.warehouse_id)
          return false;
      }

      boolean this_present_timestamp = true && this.isSetTimestamp();
      boolean that_present_timestamp = true && that.isSetTimestamp();
      if (this_present_timestamp || that_present_timestamp) {
        if (!(this_present_timestamp && that_present_timestamp))
          return false;
        if (!this.timestamp.equals(that.timestamp))
          return false;
      }

      boolean this_present_availability = true && this.isSetAvailability();
      boolean that_present_availability = true && that.isSetAvailability();
      if (this_present_availability || that_present_availability) {
        if (!(this_present_availability && that_present_availability))
          return false;
        if (!this.availability.equals(that.availability))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateInventoryHistory_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateInventoryHistory_args typedOther = (updateInventoryHistory_args)other;

      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(typedOther.isSetWarehouse_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouse_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouse_id, typedOther.warehouse_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTimestamp()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAvailability()).compareTo(typedOther.isSetAvailability());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAvailability()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.availability, typedOther.availability);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouse_id = iprot.readI64();
              setWarehouse_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // TIMESTAMP
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.timestamp = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // AVAILABILITY
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map15 = iprot.readMapBegin();
                this.availability = new HashMap<String,Long>(2*_map15.size);
                for (int _i16 = 0; _i16 < _map15.size; ++_i16)
                {
                  String _key17; // required
                  long _val18; // required
                  _key17 = iprot.readString();
                  _val18 = iprot.readI64();
                  this.availability.put(_key17, _val18);
                }
                iprot.readMapEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouse_id);
      oprot.writeFieldEnd();
      if (this.timestamp != null) {
        oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
        oprot.writeString(this.timestamp);
        oprot.writeFieldEnd();
      }
      if (this.availability != null) {
        oprot.writeFieldBegin(AVAILABILITY_FIELD_DESC);
        {
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, this.availability.size()));
          for (Map.Entry<String, Long> _iter19 : this.availability.entrySet())
          {
            oprot.writeString(_iter19.getKey());
            oprot.writeI64(_iter19.getValue());
          }
          oprot.writeMapEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateInventoryHistory_args(");
      boolean first = true;

      sb.append("warehouse_id:");
      sb.append(this.warehouse_id);
      first = false;
      if (!first) sb.append(", ");
      sb.append("timestamp:");
      if (this.timestamp == null) {
        sb.append("null");
      } else {
        sb.append(this.timestamp);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("availability:");
      if (this.availability == null) {
        sb.append("null");
      } else {
        sb.append(this.availability);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateInventoryHistory_result implements org.apache.thrift.TBase<updateInventoryHistory_result, updateInventoryHistory_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateInventoryHistory_result");

    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateInventoryHistory_result.class, metaDataMap);
    }

    public updateInventoryHistory_result() {
    }

    public updateInventoryHistory_result(
      InventoryServiceException cex)
    {
      this();
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateInventoryHistory_result(updateInventoryHistory_result other) {
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public updateInventoryHistory_result deepCopy() {
      return new updateInventoryHistory_result(this);
    }

    @Override
    public void clear() {
      this.cex = null;
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateInventoryHistory_result)
        return this.equals((updateInventoryHistory_result)that);
      return false;
    }

    public boolean equals(updateInventoryHistory_result that) {
      if (that == null)
        return false;

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateInventoryHistory_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateInventoryHistory_result typedOther = (updateInventoryHistory_result)other;

      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateInventoryHistory_result(");
      boolean first = true;

      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateInventory_args implements org.apache.thrift.TBase<updateInventory_args, updateInventory_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateInventory_args");

    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouse_id", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("timestamp", org.apache.thrift.protocol.TType.STRING, (short)2);
    private static final org.apache.thrift.protocol.TField AVAILABILITY_FIELD_DESC = new org.apache.thrift.protocol.TField("availability", org.apache.thrift.protocol.TType.MAP, (short)3);

    private long warehouse_id; // required
    private String timestamp; // required
    private Map<String,Long> availability; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      WAREHOUSE_ID((short)1, "warehouse_id"),
      TIMESTAMP((short)2, "timestamp"),
      AVAILABILITY((short)3, "availability");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          case 2: // TIMESTAMP
            return TIMESTAMP;
          case 3: // AVAILABILITY
            return AVAILABILITY;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __WAREHOUSE_ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouse_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("timestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.AVAILABILITY, new org.apache.thrift.meta_data.FieldMetaData("availability", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateInventory_args.class, metaDataMap);
    }

    public updateInventory_args() {
    }

    public updateInventory_args(
      long warehouse_id,
      String timestamp,
      Map<String,Long> availability)
    {
      this();
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
      this.timestamp = timestamp;
      this.availability = availability;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateInventory_args(updateInventory_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.warehouse_id = other.warehouse_id;
      if (other.isSetTimestamp()) {
        this.timestamp = other.timestamp;
      }
      if (other.isSetAvailability()) {
        Map<String,Long> __this__availability = new HashMap<String,Long>();
        for (Map.Entry<String, Long> other_element : other.availability.entrySet()) {

          String other_element_key = other_element.getKey();
          Long other_element_value = other_element.getValue();

          String __this__availability_copy_key = other_element_key;

          Long __this__availability_copy_value = other_element_value;

          __this__availability.put(__this__availability_copy_key, __this__availability_copy_value);
        }
        this.availability = __this__availability;
      }
    }

    public updateInventory_args deepCopy() {
      return new updateInventory_args(this);
    }

    @Override
    public void clear() {
      setWarehouse_idIsSet(false);
      this.warehouse_id = 0;
      this.timestamp = null;
      this.availability = null;
    }

    public long getWarehouse_id() {
      return this.warehouse_id;
    }

    public void setWarehouse_id(long warehouse_id) {
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    public void unsetWarehouse_id() {
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
    }

    /** Returns true if field warehouse_id is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouse_id() {
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
    }

    public void setWarehouse_idIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
    }

    public String getTimestamp() {
      return this.timestamp;
    }

    public void setTimestamp(String timestamp) {
      this.timestamp = timestamp;
    }

    public void unsetTimestamp() {
      this.timestamp = null;
    }

    /** Returns true if field timestamp is set (has been assigned a value) and false otherwise */
    public boolean isSetTimestamp() {
      return this.timestamp != null;
    }

    public void setTimestampIsSet(boolean value) {
      if (!value) {
        this.timestamp = null;
      }
    }

    public int getAvailabilitySize() {
      return (this.availability == null) ? 0 : this.availability.size();
    }

    public void putToAvailability(String key, long val) {
      if (this.availability == null) {
        this.availability = new HashMap<String,Long>();
      }
      this.availability.put(key, val);
    }

    public Map<String,Long> getAvailability() {
      return this.availability;
    }

    public void setAvailability(Map<String,Long> availability) {
      this.availability = availability;
    }

    public void unsetAvailability() {
      this.availability = null;
    }

    /** Returns true if field availability is set (has been assigned a value) and false otherwise */
    public boolean isSetAvailability() {
      return this.availability != null;
    }

    public void setAvailabilityIsSet(boolean value) {
      if (!value) {
        this.availability = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouse_id();
        } else {
          setWarehouse_id((Long)value);
        }
        break;

      case TIMESTAMP:
        if (value == null) {
          unsetTimestamp();
        } else {
          setTimestamp((String)value);
        }
        break;

      case AVAILABILITY:
        if (value == null) {
          unsetAvailability();
        } else {
          setAvailability((Map<String,Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouse_id());

      case TIMESTAMP:
        return getTimestamp();

      case AVAILABILITY:
        return getAvailability();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case WAREHOUSE_ID:
        return isSetWarehouse_id();
      case TIMESTAMP:
        return isSetTimestamp();
      case AVAILABILITY:
        return isSetAvailability();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateInventory_args)
        return this.equals((updateInventory_args)that);
      return false;
    }

    public boolean equals(updateInventory_args that) {
      if (that == null)
        return false;

      boolean this_present_warehouse_id = true;
      boolean that_present_warehouse_id = true;
      if (this_present_warehouse_id || that_present_warehouse_id) {
        if (!(this_present_warehouse_id && that_present_warehouse_id))
          return false;
        if (this.warehouse_id != that.warehouse_id)
          return false;
      }

      boolean this_present_timestamp = true && this.isSetTimestamp();
      boolean that_present_timestamp = true && that.isSetTimestamp();
      if (this_present_timestamp || that_present_timestamp) {
        if (!(this_present_timestamp && that_present_timestamp))
          return false;
        if (!this.timestamp.equals(that.timestamp))
          return false;
      }

      boolean this_present_availability = true && this.isSetAvailability();
      boolean that_present_availability = true && that.isSetAvailability();
      if (this_present_availability || that_present_availability) {
        if (!(this_present_availability && that_present_availability))
          return false;
        if (!this.availability.equals(that.availability))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateInventory_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateInventory_args typedOther = (updateInventory_args)other;

      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(typedOther.isSetWarehouse_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouse_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouse_id, typedOther.warehouse_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(typedOther.isSetTimestamp());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTimestamp()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, typedOther.timestamp);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetAvailability()).compareTo(typedOther.isSetAvailability());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAvailability()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.availability, typedOther.availability);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouse_id = iprot.readI64();
              setWarehouse_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // TIMESTAMP
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.timestamp = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // AVAILABILITY
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map20 = iprot.readMapBegin();
                this.availability = new HashMap<String,Long>(2*_map20.size);
                for (int _i21 = 0; _i21 < _map20.size; ++_i21)
                {
                  String _key22; // required
                  long _val23; // required
                  _key22 = iprot.readString();
                  _val23 = iprot.readI64();
                  this.availability.put(_key22, _val23);
                }
                iprot.readMapEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouse_id);
      oprot.writeFieldEnd();
      if (this.timestamp != null) {
        oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
        oprot.writeString(this.timestamp);
        oprot.writeFieldEnd();
      }
      if (this.availability != null) {
        oprot.writeFieldBegin(AVAILABILITY_FIELD_DESC);
        {
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.I64, this.availability.size()));
          for (Map.Entry<String, Long> _iter24 : this.availability.entrySet())
          {
            oprot.writeString(_iter24.getKey());
            oprot.writeI64(_iter24.getValue());
          }
          oprot.writeMapEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateInventory_args(");
      boolean first = true;

      sb.append("warehouse_id:");
      sb.append(this.warehouse_id);
      first = false;
      if (!first) sb.append(", ");
      sb.append("timestamp:");
      if (this.timestamp == null) {
        sb.append("null");
      } else {
        sb.append(this.timestamp);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("availability:");
      if (this.availability == null) {
        sb.append("null");
      } else {
        sb.append(this.availability);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateInventory_result implements org.apache.thrift.TBase<updateInventory_result, updateInventory_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateInventory_result");

    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateInventory_result.class, metaDataMap);
    }

    public updateInventory_result() {
    }

    public updateInventory_result(
      InventoryServiceException cex)
    {
      this();
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateInventory_result(updateInventory_result other) {
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public updateInventory_result deepCopy() {
      return new updateInventory_result(this);
    }

    @Override
    public void clear() {
      this.cex = null;
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateInventory_result)
        return this.equals((updateInventory_result)that);
      return false;
    }

    public boolean equals(updateInventory_result that) {
      if (that == null)
        return false;

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateInventory_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateInventory_result typedOther = (updateInventory_result)other;

      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateInventory_result(");
      boolean first = true;

      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addInventory_args implements org.apache.thrift.TBase<addInventory_args, addInventory_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addInventory_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.I64, (short)3);

    private long itemId; // required
    private long warehouseId; // required
    private long quantity; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "itemId"),
      WAREHOUSE_ID((short)2, "warehouseId"),
      QUANTITY((short)3, "quantity");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          case 3: // QUANTITY
            return QUANTITY;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEMID_ISSET_ID = 0;
    private static final int __WAREHOUSEID_ISSET_ID = 1;
    private static final int __QUANTITY_ISSET_ID = 2;
    private BitSet __isset_bit_vector = new BitSet(3);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addInventory_args.class, metaDataMap);
    }

    public addInventory_args() {
    }

    public addInventory_args(
      long itemId,
      long warehouseId,
      long quantity)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
      this.quantity = quantity;
      setQuantityIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addInventory_args(addInventory_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
      this.warehouseId = other.warehouseId;
      this.quantity = other.quantity;
    }

    public addInventory_args deepCopy() {
      return new addInventory_args(this);
    }

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
      setWarehouseIdIsSet(false);
      this.warehouseId = 0;
      setQuantityIsSet(false);
      this.quantity = 0;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public long getWarehouseId() {
      return this.warehouseId;
    }

    public void setWarehouseId(long warehouseId) {
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    public void unsetWarehouseId() {
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
    }

    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouseId() {
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
    }

    public void setWarehouseIdIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
    }

    public long getQuantity() {
      return this.quantity;
    }

    public void setQuantity(long quantity) {
      this.quantity = quantity;
      setQuantityIsSet(true);
    }

    public void unsetQuantity() {
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
    }

    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
    public boolean isSetQuantity() {
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
    }

    public void setQuantityIsSet(boolean value) {
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouseId();
        } else {
          setWarehouseId((Long)value);
        }
        break;

      case QUANTITY:
        if (value == null) {
          unsetQuantity();
        } else {
          setQuantity((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItemId());

      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouseId());

      case QUANTITY:
        return Long.valueOf(getQuantity());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItemId();
      case WAREHOUSE_ID:
        return isSetWarehouseId();
      case QUANTITY:
        return isSetQuantity();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addInventory_args)
        return this.equals((addInventory_args)that);
      return false;
    }

    public boolean equals(addInventory_args that) {
      if (that == null)
        return false;

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      boolean this_present_warehouseId = true;
      boolean that_present_warehouseId = true;
      if (this_present_warehouseId || that_present_warehouseId) {
        if (!(this_present_warehouseId && that_present_warehouseId))
          return false;
        if (this.warehouseId != that.warehouseId)
          return false;
      }

      boolean this_present_quantity = true;
      boolean that_present_quantity = true;
      if (this_present_quantity || that_present_quantity) {
        if (!(this_present_quantity && that_present_quantity))
          return false;
        if (this.quantity != that.quantity)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addInventory_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addInventory_args typedOther = (addInventory_args)other;

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQuantity()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouseId = iprot.readI64();
              setWarehouseIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // QUANTITY
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.quantity = iprot.readI64();
              setQuantityIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouseId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
      oprot.writeI64(this.quantity);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addInventory_args(");
      boolean first = true;

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("warehouseId:");
      sb.append(this.warehouseId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("quantity:");
      sb.append(this.quantity);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addInventory_result implements org.apache.thrift.TBase<addInventory_result, addInventory_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addInventory_result");

    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addInventory_result.class, metaDataMap);
    }

    public addInventory_result() {
    }

    public addInventory_result(
      InventoryServiceException cex)
    {
      this();
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addInventory_result(addInventory_result other) {
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public addInventory_result deepCopy() {
      return new addInventory_result(this);
    }

    @Override
    public void clear() {
      this.cex = null;
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addInventory_result)
        return this.equals((addInventory_result)that);
      return false;
    }

    public boolean equals(addInventory_result that) {
      if (that == null)
        return false;

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addInventory_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addInventory_result typedOther = (addInventory_result)other;

      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addInventory_result(");
      boolean first = true;

      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class retireWarehouse_args implements org.apache.thrift.TBase<retireWarehouse_args, retireWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("retireWarehouse_args");

    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouse_id", org.apache.thrift.protocol.TType.I64, (short)1);

    private long warehouse_id; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      WAREHOUSE_ID((short)1, "warehouse_id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __WAREHOUSE_ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouse_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(retireWarehouse_args.class, metaDataMap);
    }

    public retireWarehouse_args() {
    }

    public retireWarehouse_args(
      long warehouse_id)
    {
      this();
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public retireWarehouse_args(retireWarehouse_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.warehouse_id = other.warehouse_id;
    }

    public retireWarehouse_args deepCopy() {
      return new retireWarehouse_args(this);
    }

    @Override
    public void clear() {
      setWarehouse_idIsSet(false);
      this.warehouse_id = 0;
    }

    public long getWarehouse_id() {
      return this.warehouse_id;
    }

    public void setWarehouse_id(long warehouse_id) {
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    public void unsetWarehouse_id() {
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
    }

    /** Returns true if field warehouse_id is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouse_id() {
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
    }

    public void setWarehouse_idIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouse_id();
        } else {
          setWarehouse_id((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouse_id());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case WAREHOUSE_ID:
        return isSetWarehouse_id();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof retireWarehouse_args)
        return this.equals((retireWarehouse_args)that);
      return false;
    }

    public boolean equals(retireWarehouse_args that) {
      if (that == null)
        return false;

      boolean this_present_warehouse_id = true;
      boolean that_present_warehouse_id = true;
      if (this_present_warehouse_id || that_present_warehouse_id) {
        if (!(this_present_warehouse_id && that_present_warehouse_id))
          return false;
        if (this.warehouse_id != that.warehouse_id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(retireWarehouse_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      retireWarehouse_args typedOther = (retireWarehouse_args)other;

      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(typedOther.isSetWarehouse_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouse_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouse_id, typedOther.warehouse_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouse_id = iprot.readI64();
              setWarehouse_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouse_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("retireWarehouse_args(");
      boolean first = true;

      sb.append("warehouse_id:");
      sb.append(this.warehouse_id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class retireWarehouse_result implements org.apache.thrift.TBase<retireWarehouse_result, retireWarehouse_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("retireWarehouse_result");

    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(retireWarehouse_result.class, metaDataMap);
    }

    public retireWarehouse_result() {
    }

    public retireWarehouse_result(
      InventoryServiceException cex)
    {
      this();
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public retireWarehouse_result(retireWarehouse_result other) {
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public retireWarehouse_result deepCopy() {
      return new retireWarehouse_result(this);
    }

    @Override
    public void clear() {
      this.cex = null;
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof retireWarehouse_result)
        return this.equals((retireWarehouse_result)that);
      return false;
    }

    public boolean equals(retireWarehouse_result that) {
      if (that == null)
        return false;

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(retireWarehouse_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      retireWarehouse_result typedOther = (retireWarehouse_result)other;

      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("retireWarehouse_result(");
      boolean first = true;

      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemInventoryByItemId_args implements org.apache.thrift.TBase<getItemInventoryByItemId_args, getItemInventoryByItemId_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemInventoryByItemId_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)1);

    private long item_id; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "item_id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEM_ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemInventoryByItemId_args.class, metaDataMap);
    }

    public getItemInventoryByItemId_args() {
    }

    public getItemInventoryByItemId_args(
      long item_id)
    {
      this();
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemInventoryByItemId_args(getItemInventoryByItemId_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.item_id = other.item_id;
    }

    public getItemInventoryByItemId_args deepCopy() {
      return new getItemInventoryByItemId_args(this);
    }

    @Override
    public void clear() {
      setItem_idIsSet(false);
      this.item_id = 0;
    }

    public long getItem_id() {
      return this.item_id;
    }

    public void setItem_id(long item_id) {
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    public void unsetItem_id() {
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
    }

    /** Returns true if field item_id is set (has been assigned a value) and false otherwise */
    public boolean isSetItem_id() {
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
    }

    public void setItem_idIsSet(boolean value) {
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItem_id();
        } else {
          setItem_id((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItem_id());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItem_id();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemInventoryByItemId_args)
        return this.equals((getItemInventoryByItemId_args)that);
      return false;
    }

    public boolean equals(getItemInventoryByItemId_args that) {
      if (that == null)
        return false;

      boolean this_present_item_id = true;
      boolean that_present_item_id = true;
      if (this_present_item_id || that_present_item_id) {
        if (!(this_present_item_id && that_present_item_id))
          return false;
        if (this.item_id != that.item_id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemInventoryByItemId_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemInventoryByItemId_args typedOther = (getItemInventoryByItemId_args)other;

      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItem_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.item_id = iprot.readI64();
              setItem_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.item_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemInventoryByItemId_args(");
      boolean first = true;

      sb.append("item_id:");
      sb.append(this.item_id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemInventoryByItemId_result implements org.apache.thrift.TBase<getItemInventoryByItemId_result, getItemInventoryByItemId_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemInventoryByItemId_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private ItemInventory success; // required
    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ItemInventory.class)));
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemInventoryByItemId_result.class, metaDataMap);
    }

    public getItemInventoryByItemId_result() {
    }

    public getItemInventoryByItemId_result(
      ItemInventory success,
      InventoryServiceException cex)
    {
      this();
      this.success = success;
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemInventoryByItemId_result(getItemInventoryByItemId_result other) {
      if (other.isSetSuccess()) {
        this.success = new ItemInventory(other.success);
      }
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public getItemInventoryByItemId_result deepCopy() {
      return new getItemInventoryByItemId_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.cex = null;
    }

    public ItemInventory getSuccess() {
      return this.success;
    }

    public void setSuccess(ItemInventory success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((ItemInventory)value);
        }
        break;

      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemInventoryByItemId_result)
        return this.equals((getItemInventoryByItemId_result)that);
      return false;
    }

    public boolean equals(getItemInventoryByItemId_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemInventoryByItemId_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemInventoryByItemId_result typedOther = (getItemInventoryByItemId_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new ItemInventory();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemInventoryByItemId_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemAvailibilityAtWarehouse_args implements org.apache.thrift.TBase<getItemAvailibilityAtWarehouse_args, getItemAvailibilityAtWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemAvailibilityAtWarehouse_args");

    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouse_id", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)2);

    private long warehouse_id; // required
    private long item_id; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      WAREHOUSE_ID((short)1, "warehouse_id"),
      ITEM_ID((short)2, "item_id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          case 2: // ITEM_ID
            return ITEM_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __WAREHOUSE_ID_ISSET_ID = 0;
    private static final int __ITEM_ID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouse_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemAvailibilityAtWarehouse_args.class, metaDataMap);
    }

    public getItemAvailibilityAtWarehouse_args() {
    }

    public getItemAvailibilityAtWarehouse_args(
      long warehouse_id,
      long item_id)
    {
      this();
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemAvailibilityAtWarehouse_args(getItemAvailibilityAtWarehouse_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.warehouse_id = other.warehouse_id;
      this.item_id = other.item_id;
    }

    public getItemAvailibilityAtWarehouse_args deepCopy() {
      return new getItemAvailibilityAtWarehouse_args(this);
    }

    @Override
    public void clear() {
      setWarehouse_idIsSet(false);
      this.warehouse_id = 0;
      setItem_idIsSet(false);
      this.item_id = 0;
    }

    public long getWarehouse_id() {
      return this.warehouse_id;
    }

    public void setWarehouse_id(long warehouse_id) {
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    public void unsetWarehouse_id() {
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
    }

    /** Returns true if field warehouse_id is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouse_id() {
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
    }

    public void setWarehouse_idIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
    }

    public long getItem_id() {
      return this.item_id;
    }

    public void setItem_id(long item_id) {
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    public void unsetItem_id() {
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
    }

    /** Returns true if field item_id is set (has been assigned a value) and false otherwise */
    public boolean isSetItem_id() {
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
    }

    public void setItem_idIsSet(boolean value) {
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouse_id();
        } else {
          setWarehouse_id((Long)value);
        }
        break;

      case ITEM_ID:
        if (value == null) {
          unsetItem_id();
        } else {
          setItem_id((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouse_id());

      case ITEM_ID:
        return Long.valueOf(getItem_id());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case WAREHOUSE_ID:
        return isSetWarehouse_id();
      case ITEM_ID:
        return isSetItem_id();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemAvailibilityAtWarehouse_args)
        return this.equals((getItemAvailibilityAtWarehouse_args)that);
      return false;
    }

    public boolean equals(getItemAvailibilityAtWarehouse_args that) {
      if (that == null)
        return false;

      boolean this_present_warehouse_id = true;
      boolean that_present_warehouse_id = true;
      if (this_present_warehouse_id || that_present_warehouse_id) {
        if (!(this_present_warehouse_id && that_present_warehouse_id))
          return false;
        if (this.warehouse_id != that.warehouse_id)
          return false;
      }

      boolean this_present_item_id = true;
      boolean that_present_item_id = true;
      if (this_present_item_id || that_present_item_id) {
        if (!(this_present_item_id && that_present_item_id))
          return false;
        if (this.item_id != that.item_id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemAvailibilityAtWarehouse_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemAvailibilityAtWarehouse_args typedOther = (getItemAvailibilityAtWarehouse_args)other;

      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(typedOther.isSetWarehouse_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouse_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouse_id, typedOther.warehouse_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItem_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouse_id = iprot.readI64();
              setWarehouse_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.item_id = iprot.readI64();
              setItem_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouse_id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.item_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemAvailibilityAtWarehouse_args(");
      boolean first = true;

      sb.append("warehouse_id:");
      sb.append(this.warehouse_id);
      first = false;
      if (!first) sb.append(", ");
      sb.append("item_id:");
      sb.append(this.item_id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemAvailibilityAtWarehouse_result implements org.apache.thrift.TBase<getItemAvailibilityAtWarehouse_result, getItemAvailibilityAtWarehouse_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemAvailibilityAtWarehouse_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);
    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private long success; // required
    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemAvailibilityAtWarehouse_result.class, metaDataMap);
    }

    public getItemAvailibilityAtWarehouse_result() {
    }

    public getItemAvailibilityAtWarehouse_result(
      long success,
      InventoryServiceException cex)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemAvailibilityAtWarehouse_result(getItemAvailibilityAtWarehouse_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public getItemAvailibilityAtWarehouse_result deepCopy() {
      return new getItemAvailibilityAtWarehouse_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
      this.cex = null;
    }

    public long getSuccess() {
      return this.success;
    }

    public void setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Long)value);
        }
        break;

      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Long.valueOf(getSuccess());

      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemAvailibilityAtWarehouse_result)
        return this.equals((getItemAvailibilityAtWarehouse_result)that);
      return false;
    }

    public boolean equals(getItemAvailibilityAtWarehouse_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemAvailibilityAtWarehouse_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemAvailibilityAtWarehouse_result typedOther = (getItemAvailibilityAtWarehouse_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.success = iprot.readI64();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI64(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemAvailibilityAtWarehouse_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemAvailabilityAtLocation_args implements org.apache.thrift.TBase<getItemAvailabilityAtLocation_args, getItemAvailabilityAtLocation_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemAvailabilityAtLocation_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField SOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sourceId", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField STATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("stateId", org.apache.thrift.protocol.TType.I64, (short)3);

    private long itemId; // required
    private long sourceId; // required
    private long stateId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "itemId"),
      SOURCE_ID((short)2, "sourceId"),
      STATE_ID((short)3, "stateId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // SOURCE_ID
            return SOURCE_ID;
          case 3: // STATE_ID
            return STATE_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEMID_ISSET_ID = 0;
    private static final int __SOURCEID_ISSET_ID = 1;
    private static final int __STATEID_ISSET_ID = 2;
    private BitSet __isset_bit_vector = new BitSet(3);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("sourceId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.STATE_ID, new org.apache.thrift.meta_data.FieldMetaData("stateId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemAvailabilityAtLocation_args.class, metaDataMap);
    }

    public getItemAvailabilityAtLocation_args() {
    }

    public getItemAvailabilityAtLocation_args(
      long itemId,
      long sourceId,
      long stateId)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
      this.stateId = stateId;
      setStateIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemAvailabilityAtLocation_args(getItemAvailabilityAtLocation_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
      this.sourceId = other.sourceId;
      this.stateId = other.stateId;
    }

    public getItemAvailabilityAtLocation_args deepCopy() {
      return new getItemAvailabilityAtLocation_args(this);
    }

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
      setSourceIdIsSet(false);
      this.sourceId = 0;
      setStateIdIsSet(false);
      this.stateId = 0;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public long getSourceId() {
      return this.sourceId;
    }

    public void setSourceId(long sourceId) {
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
    }

    public void unsetSourceId() {
      __isset_bit_vector.clear(__SOURCEID_ISSET_ID);
    }

    /** Returns true if field sourceId is set (has been assigned a value) and false otherwise */
    public boolean isSetSourceId() {
      return __isset_bit_vector.get(__SOURCEID_ISSET_ID);
    }

    public void setSourceIdIsSet(boolean value) {
      __isset_bit_vector.set(__SOURCEID_ISSET_ID, value);
    }

    public long getStateId() {
      return this.stateId;
    }

    public void setStateId(long stateId) {
      this.stateId = stateId;
      setStateIdIsSet(true);
    }

    public void unsetStateId() {
      __isset_bit_vector.clear(__STATEID_ISSET_ID);
    }

    /** Returns true if field stateId is set (has been assigned a value) and false otherwise */
    public boolean isSetStateId() {
      return __isset_bit_vector.get(__STATEID_ISSET_ID);
    }

    public void setStateIdIsSet(boolean value) {
      __isset_bit_vector.set(__STATEID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      case SOURCE_ID:
        if (value == null) {
          unsetSourceId();
        } else {
          setSourceId((Long)value);
        }
        break;

      case STATE_ID:
        if (value == null) {
          unsetStateId();
        } else {
          setStateId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItemId());

      case SOURCE_ID:
        return Long.valueOf(getSourceId());

      case STATE_ID:
        return Long.valueOf(getStateId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItemId();
      case SOURCE_ID:
        return isSetSourceId();
      case STATE_ID:
        return isSetStateId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemAvailabilityAtLocation_args)
        return this.equals((getItemAvailabilityAtLocation_args)that);
      return false;
    }

    public boolean equals(getItemAvailabilityAtLocation_args that) {
      if (that == null)
        return false;

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      boolean this_present_sourceId = true;
      boolean that_present_sourceId = true;
      if (this_present_sourceId || that_present_sourceId) {
        if (!(this_present_sourceId && that_present_sourceId))
          return false;
        if (this.sourceId != that.sourceId)
          return false;
      }

      boolean this_present_stateId = true;
      boolean that_present_stateId = true;
      if (this_present_stateId || that_present_stateId) {
        if (!(this_present_stateId && that_present_stateId))
          return false;
        if (this.stateId != that.stateId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemAvailabilityAtLocation_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemAvailabilityAtLocation_args typedOther = (getItemAvailabilityAtLocation_args)other;

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSourceId()).compareTo(typedOther.isSetSourceId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSourceId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sourceId, typedOther.sourceId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetStateId()).compareTo(typedOther.isSetStateId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetStateId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.stateId, typedOther.stateId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SOURCE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.sourceId = iprot.readI64();
              setSourceIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // STATE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.stateId = iprot.readI64();
              setStateIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SOURCE_ID_FIELD_DESC);
      oprot.writeI64(this.sourceId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(STATE_ID_FIELD_DESC);
      oprot.writeI64(this.stateId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemAvailabilityAtLocation_args(");
      boolean first = true;

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("sourceId:");
      sb.append(this.sourceId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("stateId:");
      sb.append(this.stateId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemAvailabilityAtLocation_result implements org.apache.thrift.TBase<getItemAvailabilityAtLocation_result, getItemAvailabilityAtLocation_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemAvailabilityAtLocation_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField ISEX_FIELD_DESC = new org.apache.thrift.protocol.TField("isex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<Long> success; // required
    private InventoryServiceException isex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      ISEX((short)1, "isex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // ISEX
            return ISEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      tmpMap.put(_Fields.ISEX, new org.apache.thrift.meta_data.FieldMetaData("isex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemAvailabilityAtLocation_result.class, metaDataMap);
    }

    public getItemAvailabilityAtLocation_result() {
    }

    public getItemAvailabilityAtLocation_result(
      List<Long> success,
      InventoryServiceException isex)
    {
      this();
      this.success = success;
      this.isex = isex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemAvailabilityAtLocation_result(getItemAvailabilityAtLocation_result other) {
      if (other.isSetSuccess()) {
        List<Long> __this__success = new ArrayList<Long>();
        for (Long other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
      if (other.isSetIsex()) {
        this.isex = new InventoryServiceException(other.isex);
      }
    }

    public getItemAvailabilityAtLocation_result deepCopy() {
      return new getItemAvailabilityAtLocation_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.isex = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Long> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(long elem) {
      if (this.success == null) {
        this.success = new ArrayList<Long>();
      }
      this.success.add(elem);
    }

    public List<Long> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Long> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public InventoryServiceException getIsex() {
      return this.isex;
    }

    public void setIsex(InventoryServiceException isex) {
      this.isex = isex;
    }

    public void unsetIsex() {
      this.isex = null;
    }

    /** Returns true if field isex is set (has been assigned a value) and false otherwise */
    public boolean isSetIsex() {
      return this.isex != null;
    }

    public void setIsexIsSet(boolean value) {
      if (!value) {
        this.isex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Long>)value);
        }
        break;

      case ISEX:
        if (value == null) {
          unsetIsex();
        } else {
          setIsex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case ISEX:
        return getIsex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case ISEX:
        return isSetIsex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemAvailabilityAtLocation_result)
        return this.equals((getItemAvailabilityAtLocation_result)that);
      return false;
    }

    public boolean equals(getItemAvailabilityAtLocation_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_isex = true && this.isSetIsex();
      boolean that_present_isex = true && that.isSetIsex();
      if (this_present_isex || that_present_isex) {
        if (!(this_present_isex && that_present_isex))
          return false;
        if (!this.isex.equals(that.isex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemAvailabilityAtLocation_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemAvailabilityAtLocation_result typedOther = (getItemAvailabilityAtLocation_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetIsex()).compareTo(typedOther.isSetIsex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetIsex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isex, typedOther.isex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list25 = iprot.readListBegin();
                this.success = new ArrayList<Long>(_list25.size);
                for (int _i26 = 0; _i26 < _list25.size; ++_i26)
                {
                  long _elem27; // required
                  _elem27 = iprot.readI64();
                  this.success.add(_elem27);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // ISEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.isex = new InventoryServiceException();
              this.isex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
          for (long _iter28 : this.success)
          {
            oprot.writeI64(_iter28);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetIsex()) {
        oprot.writeFieldBegin(ISEX_FIELD_DESC);
        this.isex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemAvailabilityAtLocation_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("isex:");
      if (this.isex == null) {
        sb.append("null");
      } else {
        sb.append(this.isex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllWarehouses_args implements org.apache.thrift.TBase<getAllWarehouses_args, getAllWarehouses_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllWarehouses_args");

    private static final org.apache.thrift.protocol.TField IS_ACTIVE_FIELD_DESC = new org.apache.thrift.protocol.TField("isActive", org.apache.thrift.protocol.TType.BOOL, (short)1);

    private boolean isActive; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      IS_ACTIVE((short)1, "isActive");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // IS_ACTIVE
            return IS_ACTIVE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ISACTIVE_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.IS_ACTIVE, new org.apache.thrift.meta_data.FieldMetaData("isActive", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllWarehouses_args.class, metaDataMap);
    }

    public getAllWarehouses_args() {
    }

    public getAllWarehouses_args(
      boolean isActive)
    {
      this();
      this.isActive = isActive;
      setIsActiveIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllWarehouses_args(getAllWarehouses_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.isActive = other.isActive;
    }

    public getAllWarehouses_args deepCopy() {
      return new getAllWarehouses_args(this);
    }

    @Override
    public void clear() {
      setIsActiveIsSet(false);
      this.isActive = false;
    }

    public boolean isIsActive() {
      return this.isActive;
    }

    public void setIsActive(boolean isActive) {
      this.isActive = isActive;
      setIsActiveIsSet(true);
    }

    public void unsetIsActive() {
      __isset_bit_vector.clear(__ISACTIVE_ISSET_ID);
    }

    /** Returns true if field isActive is set (has been assigned a value) and false otherwise */
    public boolean isSetIsActive() {
      return __isset_bit_vector.get(__ISACTIVE_ISSET_ID);
    }

    public void setIsActiveIsSet(boolean value) {
      __isset_bit_vector.set(__ISACTIVE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case IS_ACTIVE:
        if (value == null) {
          unsetIsActive();
        } else {
          setIsActive((Boolean)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case IS_ACTIVE:
        return Boolean.valueOf(isIsActive());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case IS_ACTIVE:
        return isSetIsActive();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllWarehouses_args)
        return this.equals((getAllWarehouses_args)that);
      return false;
    }

    public boolean equals(getAllWarehouses_args that) {
      if (that == null)
        return false;

      boolean this_present_isActive = true;
      boolean that_present_isActive = true;
      if (this_present_isActive || that_present_isActive) {
        if (!(this_present_isActive && that_present_isActive))
          return false;
        if (this.isActive != that.isActive)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllWarehouses_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllWarehouses_args typedOther = (getAllWarehouses_args)other;

      lastComparison = Boolean.valueOf(isSetIsActive()).compareTo(typedOther.isSetIsActive());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetIsActive()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isActive, typedOther.isActive);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // IS_ACTIVE
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.isActive = iprot.readBool();
              setIsActiveIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(IS_ACTIVE_FIELD_DESC);
      oprot.writeBool(this.isActive);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllWarehouses_args(");
      boolean first = true;

      sb.append("isActive:");
      sb.append(this.isActive);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllWarehouses_result implements org.apache.thrift.TBase<getAllWarehouses_result, getAllWarehouses_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllWarehouses_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<Warehouse> success; // required
    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Warehouse.class))));
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllWarehouses_result.class, metaDataMap);
    }

    public getAllWarehouses_result() {
    }

    public getAllWarehouses_result(
      List<Warehouse> success,
      InventoryServiceException cex)
    {
      this();
      this.success = success;
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllWarehouses_result(getAllWarehouses_result other) {
      if (other.isSetSuccess()) {
        List<Warehouse> __this__success = new ArrayList<Warehouse>();
        for (Warehouse other_element : other.success) {
          __this__success.add(new Warehouse(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public getAllWarehouses_result deepCopy() {
      return new getAllWarehouses_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.cex = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Warehouse> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(Warehouse elem) {
      if (this.success == null) {
        this.success = new ArrayList<Warehouse>();
      }
      this.success.add(elem);
    }

    public List<Warehouse> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Warehouse> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Warehouse>)value);
        }
        break;

      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllWarehouses_result)
        return this.equals((getAllWarehouses_result)that);
      return false;
    }

    public boolean equals(getAllWarehouses_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllWarehouses_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllWarehouses_result typedOther = (getAllWarehouses_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list29 = iprot.readListBegin();
                this.success = new ArrayList<Warehouse>(_list29.size);
                for (int _i30 = 0; _i30 < _list29.size; ++_i30)
                {
                  Warehouse _elem31; // required
                  _elem31 = new Warehouse();
                  _elem31.read(iprot);
                  this.success.add(_elem31);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (Warehouse _iter32 : this.success)
          {
            _iter32.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllWarehouses_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getWarehouse_args implements org.apache.thrift.TBase<getWarehouse_args, getWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getWarehouse_args");

    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouse_id", org.apache.thrift.protocol.TType.I64, (short)1);

    private long warehouse_id; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      WAREHOUSE_ID((short)1, "warehouse_id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __WAREHOUSE_ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouse_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getWarehouse_args.class, metaDataMap);
    }

    public getWarehouse_args() {
    }

    public getWarehouse_args(
      long warehouse_id)
    {
      this();
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getWarehouse_args(getWarehouse_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.warehouse_id = other.warehouse_id;
    }

    public getWarehouse_args deepCopy() {
      return new getWarehouse_args(this);
    }

    @Override
    public void clear() {
      setWarehouse_idIsSet(false);
      this.warehouse_id = 0;
    }

    public long getWarehouse_id() {
      return this.warehouse_id;
    }

    public void setWarehouse_id(long warehouse_id) {
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    public void unsetWarehouse_id() {
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
    }

    /** Returns true if field warehouse_id is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouse_id() {
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
    }

    public void setWarehouse_idIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouse_id();
        } else {
          setWarehouse_id((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouse_id());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case WAREHOUSE_ID:
        return isSetWarehouse_id();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getWarehouse_args)
        return this.equals((getWarehouse_args)that);
      return false;
    }

    public boolean equals(getWarehouse_args that) {
      if (that == null)
        return false;

      boolean this_present_warehouse_id = true;
      boolean that_present_warehouse_id = true;
      if (this_present_warehouse_id || that_present_warehouse_id) {
        if (!(this_present_warehouse_id && that_present_warehouse_id))
          return false;
        if (this.warehouse_id != that.warehouse_id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getWarehouse_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getWarehouse_args typedOther = (getWarehouse_args)other;

      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(typedOther.isSetWarehouse_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouse_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouse_id, typedOther.warehouse_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouse_id = iprot.readI64();
              setWarehouse_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouse_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getWarehouse_args(");
      boolean first = true;

      sb.append("warehouse_id:");
      sb.append(this.warehouse_id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getWarehouse_result implements org.apache.thrift.TBase<getWarehouse_result, getWarehouse_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getWarehouse_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private Warehouse success; // required
    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Warehouse.class)));
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getWarehouse_result.class, metaDataMap);
    }

    public getWarehouse_result() {
    }

    public getWarehouse_result(
      Warehouse success,
      InventoryServiceException cex)
    {
      this();
      this.success = success;
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getWarehouse_result(getWarehouse_result other) {
      if (other.isSetSuccess()) {
        this.success = new Warehouse(other.success);
      }
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public getWarehouse_result deepCopy() {
      return new getWarehouse_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.cex = null;
    }

    public Warehouse getSuccess() {
      return this.success;
    }

    public void setSuccess(Warehouse success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Warehouse)value);
        }
        break;

      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getWarehouse_result)
        return this.equals((getWarehouse_result)that);
      return false;
    }

    public boolean equals(getWarehouse_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getWarehouse_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getWarehouse_result typedOther = (getWarehouse_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new Warehouse();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getWarehouse_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllItemsForWarehouse_args implements org.apache.thrift.TBase<getAllItemsForWarehouse_args, getAllItemsForWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllItemsForWarehouse_args");

    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouse_id", org.apache.thrift.protocol.TType.I64, (short)1);

    private long warehouse_id; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      WAREHOUSE_ID((short)1, "warehouse_id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __WAREHOUSE_ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouse_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllItemsForWarehouse_args.class, metaDataMap);
    }

    public getAllItemsForWarehouse_args() {
    }

    public getAllItemsForWarehouse_args(
      long warehouse_id)
    {
      this();
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllItemsForWarehouse_args(getAllItemsForWarehouse_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.warehouse_id = other.warehouse_id;
    }

    public getAllItemsForWarehouse_args deepCopy() {
      return new getAllItemsForWarehouse_args(this);
    }

    @Override
    public void clear() {
      setWarehouse_idIsSet(false);
      this.warehouse_id = 0;
    }

    public long getWarehouse_id() {
      return this.warehouse_id;
    }

    public void setWarehouse_id(long warehouse_id) {
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    public void unsetWarehouse_id() {
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
    }

    /** Returns true if field warehouse_id is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouse_id() {
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
    }

    public void setWarehouse_idIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouse_id();
        } else {
          setWarehouse_id((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouse_id());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case WAREHOUSE_ID:
        return isSetWarehouse_id();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllItemsForWarehouse_args)
        return this.equals((getAllItemsForWarehouse_args)that);
      return false;
    }

    public boolean equals(getAllItemsForWarehouse_args that) {
      if (that == null)
        return false;

      boolean this_present_warehouse_id = true;
      boolean that_present_warehouse_id = true;
      if (this_present_warehouse_id || that_present_warehouse_id) {
        if (!(this_present_warehouse_id && that_present_warehouse_id))
          return false;
        if (this.warehouse_id != that.warehouse_id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllItemsForWarehouse_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllItemsForWarehouse_args typedOther = (getAllItemsForWarehouse_args)other;

      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(typedOther.isSetWarehouse_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouse_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouse_id, typedOther.warehouse_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouse_id = iprot.readI64();
              setWarehouse_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouse_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllItemsForWarehouse_args(");
      boolean first = true;

      sb.append("warehouse_id:");
      sb.append(this.warehouse_id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllItemsForWarehouse_result implements org.apache.thrift.TBase<getAllItemsForWarehouse_result, getAllItemsForWarehouse_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllItemsForWarehouse_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<Long> success; // required
    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllItemsForWarehouse_result.class, metaDataMap);
    }

    public getAllItemsForWarehouse_result() {
    }

    public getAllItemsForWarehouse_result(
      List<Long> success,
      InventoryServiceException cex)
    {
      this();
      this.success = success;
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllItemsForWarehouse_result(getAllItemsForWarehouse_result other) {
      if (other.isSetSuccess()) {
        List<Long> __this__success = new ArrayList<Long>();
        for (Long other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public getAllItemsForWarehouse_result deepCopy() {
      return new getAllItemsForWarehouse_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.cex = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Long> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(long elem) {
      if (this.success == null) {
        this.success = new ArrayList<Long>();
      }
      this.success.add(elem);
    }

    public List<Long> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Long> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Long>)value);
        }
        break;

      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllItemsForWarehouse_result)
        return this.equals((getAllItemsForWarehouse_result)that);
      return false;
    }

    public boolean equals(getAllItemsForWarehouse_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllItemsForWarehouse_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllItemsForWarehouse_result typedOther = (getAllItemsForWarehouse_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list33 = iprot.readListBegin();
                this.success = new ArrayList<Long>(_list33.size);
                for (int _i34 = 0; _i34 < _list33.size; ++_i34)
                {
                  long _elem35; // required
                  _elem35 = iprot.readI64();
                  this.success.add(_elem35);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
          for (long _iter36 : this.success)
          {
            oprot.writeI64(_iter36);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllItemsForWarehouse_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class isOrderBillable_args implements org.apache.thrift.TBase<isOrderBillable_args, isOrderBillable_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isOrderBillable_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField SOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sourceId", org.apache.thrift.protocol.TType.I64, (short)3);
    private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.I64, (short)4);

    private long itemId; // required
    private long warehouseId; // required
    private long sourceId; // required
    private long orderId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "itemId"),
      WAREHOUSE_ID((short)2, "warehouseId"),
      SOURCE_ID((short)3, "sourceId"),
      ORDER_ID((short)4, "orderId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          case 3: // SOURCE_ID
            return SOURCE_ID;
          case 4: // ORDER_ID
            return ORDER_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEMID_ISSET_ID = 0;
    private static final int __WAREHOUSEID_ISSET_ID = 1;
    private static final int __SOURCEID_ISSET_ID = 2;
    private static final int __ORDERID_ISSET_ID = 3;
    private BitSet __isset_bit_vector = new BitSet(4);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("sourceId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isOrderBillable_args.class, metaDataMap);
    }

    public isOrderBillable_args() {
    }

    public isOrderBillable_args(
      long itemId,
      long warehouseId,
      long sourceId,
      long orderId)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
      this.orderId = orderId;
      setOrderIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isOrderBillable_args(isOrderBillable_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
      this.warehouseId = other.warehouseId;
      this.sourceId = other.sourceId;
      this.orderId = other.orderId;
    }

    public isOrderBillable_args deepCopy() {
      return new isOrderBillable_args(this);
    }

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
      setWarehouseIdIsSet(false);
      this.warehouseId = 0;
      setSourceIdIsSet(false);
      this.sourceId = 0;
      setOrderIdIsSet(false);
      this.orderId = 0;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public long getWarehouseId() {
      return this.warehouseId;
    }

    public void setWarehouseId(long warehouseId) {
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    public void unsetWarehouseId() {
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
    }

    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouseId() {
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
    }

    public void setWarehouseIdIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
    }

    public long getSourceId() {
      return this.sourceId;
    }

    public void setSourceId(long sourceId) {
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
    }

    public void unsetSourceId() {
      __isset_bit_vector.clear(__SOURCEID_ISSET_ID);
    }

    /** Returns true if field sourceId is set (has been assigned a value) and false otherwise */
    public boolean isSetSourceId() {
      return __isset_bit_vector.get(__SOURCEID_ISSET_ID);
    }

    public void setSourceIdIsSet(boolean value) {
      __isset_bit_vector.set(__SOURCEID_ISSET_ID, value);
    }

    public long getOrderId() {
      return this.orderId;
    }

    public void setOrderId(long orderId) {
      this.orderId = orderId;
      setOrderIdIsSet(true);
    }

    public void unsetOrderId() {
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
    }

    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
    public boolean isSetOrderId() {
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
    }

    public void setOrderIdIsSet(boolean value) {
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouseId();
        } else {
          setWarehouseId((Long)value);
        }
        break;

      case SOURCE_ID:
        if (value == null) {
          unsetSourceId();
        } else {
          setSourceId((Long)value);
        }
        break;

      case ORDER_ID:
        if (value == null) {
          unsetOrderId();
        } else {
          setOrderId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItemId());

      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouseId());

      case SOURCE_ID:
        return Long.valueOf(getSourceId());

      case ORDER_ID:
        return Long.valueOf(getOrderId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItemId();
      case WAREHOUSE_ID:
        return isSetWarehouseId();
      case SOURCE_ID:
        return isSetSourceId();
      case ORDER_ID:
        return isSetOrderId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof isOrderBillable_args)
        return this.equals((isOrderBillable_args)that);
      return false;
    }

    public boolean equals(isOrderBillable_args that) {
      if (that == null)
        return false;

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      boolean this_present_warehouseId = true;
      boolean that_present_warehouseId = true;
      if (this_present_warehouseId || that_present_warehouseId) {
        if (!(this_present_warehouseId && that_present_warehouseId))
          return false;
        if (this.warehouseId != that.warehouseId)
          return false;
      }

      boolean this_present_sourceId = true;
      boolean that_present_sourceId = true;
      if (this_present_sourceId || that_present_sourceId) {
        if (!(this_present_sourceId && that_present_sourceId))
          return false;
        if (this.sourceId != that.sourceId)
          return false;
      }

      boolean this_present_orderId = true;
      boolean that_present_orderId = true;
      if (this_present_orderId || that_present_orderId) {
        if (!(this_present_orderId && that_present_orderId))
          return false;
        if (this.orderId != that.orderId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(isOrderBillable_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      isOrderBillable_args typedOther = (isOrderBillable_args)other;

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSourceId()).compareTo(typedOther.isSetSourceId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSourceId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sourceId, typedOther.sourceId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOrderId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouseId = iprot.readI64();
              setWarehouseIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SOURCE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.sourceId = iprot.readI64();
              setSourceIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // ORDER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.orderId = iprot.readI64();
              setOrderIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouseId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SOURCE_ID_FIELD_DESC);
      oprot.writeI64(this.sourceId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
      oprot.writeI64(this.orderId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("isOrderBillable_args(");
      boolean first = true;

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("warehouseId:");
      sb.append(this.warehouseId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("sourceId:");
      sb.append(this.sourceId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("orderId:");
      sb.append(this.orderId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class isOrderBillable_result implements org.apache.thrift.TBase<isOrderBillable_result, isOrderBillable_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("isOrderBillable_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);

    private boolean success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isOrderBillable_result.class, metaDataMap);
    }

    public isOrderBillable_result() {
    }

    public isOrderBillable_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public isOrderBillable_result(isOrderBillable_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public isOrderBillable_result deepCopy() {
      return new isOrderBillable_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof isOrderBillable_result)
        return this.equals((isOrderBillable_result)that);
      return false;
    }

    public boolean equals(isOrderBillable_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(isOrderBillable_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      isOrderBillable_result typedOther = (isOrderBillable_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("isOrderBillable_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class reserveItemInWarehouse_args implements org.apache.thrift.TBase<reserveItemInWarehouse_args, reserveItemInWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("reserveItemInWarehouse_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField SOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sourceId", org.apache.thrift.protocol.TType.I64, (short)3);
    private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.I64, (short)4);
    private static final org.apache.thrift.protocol.TField CREATED_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTimestamp", org.apache.thrift.protocol.TType.I64, (short)5);
    private static final org.apache.thrift.protocol.TField PROMISED_SHIPPING_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("promisedShippingTimestamp", org.apache.thrift.protocol.TType.I64, (short)6);
    private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.DOUBLE, (short)7);

    private long itemId; // required
    private long warehouseId; // required
    private long sourceId; // required
    private long orderId; // required
    private long createdTimestamp; // required
    private long promisedShippingTimestamp; // required
    private double quantity; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "itemId"),
      WAREHOUSE_ID((short)2, "warehouseId"),
      SOURCE_ID((short)3, "sourceId"),
      ORDER_ID((short)4, "orderId"),
      CREATED_TIMESTAMP((short)5, "createdTimestamp"),
      PROMISED_SHIPPING_TIMESTAMP((short)6, "promisedShippingTimestamp"),
      QUANTITY((short)7, "quantity");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          case 3: // SOURCE_ID
            return SOURCE_ID;
          case 4: // ORDER_ID
            return ORDER_ID;
          case 5: // CREATED_TIMESTAMP
            return CREATED_TIMESTAMP;
          case 6: // PROMISED_SHIPPING_TIMESTAMP
            return PROMISED_SHIPPING_TIMESTAMP;
          case 7: // QUANTITY
            return QUANTITY;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEMID_ISSET_ID = 0;
    private static final int __WAREHOUSEID_ISSET_ID = 1;
    private static final int __SOURCEID_ISSET_ID = 2;
    private static final int __ORDERID_ISSET_ID = 3;
    private static final int __CREATEDTIMESTAMP_ISSET_ID = 4;
    private static final int __PROMISEDSHIPPINGTIMESTAMP_ISSET_ID = 5;
    private static final int __QUANTITY_ISSET_ID = 6;
    private BitSet __isset_bit_vector = new BitSet(7);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("sourceId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.CREATED_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("createdTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.PROMISED_SHIPPING_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("promisedShippingTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(reserveItemInWarehouse_args.class, metaDataMap);
    }

    public reserveItemInWarehouse_args() {
    }

    public reserveItemInWarehouse_args(
      long itemId,
      long warehouseId,
      long sourceId,
      long orderId,
      long createdTimestamp,
      long promisedShippingTimestamp,
      double quantity)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
      this.orderId = orderId;
      setOrderIdIsSet(true);
      this.createdTimestamp = createdTimestamp;
      setCreatedTimestampIsSet(true);
      this.promisedShippingTimestamp = promisedShippingTimestamp;
      setPromisedShippingTimestampIsSet(true);
      this.quantity = quantity;
      setQuantityIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public reserveItemInWarehouse_args(reserveItemInWarehouse_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
      this.warehouseId = other.warehouseId;
      this.sourceId = other.sourceId;
      this.orderId = other.orderId;
      this.createdTimestamp = other.createdTimestamp;
      this.promisedShippingTimestamp = other.promisedShippingTimestamp;
      this.quantity = other.quantity;
    }

    public reserveItemInWarehouse_args deepCopy() {
      return new reserveItemInWarehouse_args(this);
    }

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
      setWarehouseIdIsSet(false);
      this.warehouseId = 0;
      setSourceIdIsSet(false);
      this.sourceId = 0;
      setOrderIdIsSet(false);
      this.orderId = 0;
      setCreatedTimestampIsSet(false);
      this.createdTimestamp = 0;
      setPromisedShippingTimestampIsSet(false);
      this.promisedShippingTimestamp = 0;
      setQuantityIsSet(false);
      this.quantity = 0.0;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public long getWarehouseId() {
      return this.warehouseId;
    }

    public void setWarehouseId(long warehouseId) {
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    public void unsetWarehouseId() {
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
    }

    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouseId() {
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
    }

    public void setWarehouseIdIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
    }

    public long getSourceId() {
      return this.sourceId;
    }

    public void setSourceId(long sourceId) {
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
    }

    public void unsetSourceId() {
      __isset_bit_vector.clear(__SOURCEID_ISSET_ID);
    }

    /** Returns true if field sourceId is set (has been assigned a value) and false otherwise */
    public boolean isSetSourceId() {
      return __isset_bit_vector.get(__SOURCEID_ISSET_ID);
    }

    public void setSourceIdIsSet(boolean value) {
      __isset_bit_vector.set(__SOURCEID_ISSET_ID, value);
    }

    public long getOrderId() {
      return this.orderId;
    }

    public void setOrderId(long orderId) {
      this.orderId = orderId;
      setOrderIdIsSet(true);
    }

    public void unsetOrderId() {
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
    }

    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
    public boolean isSetOrderId() {
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
    }

    public void setOrderIdIsSet(boolean value) {
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
    }

    public long getCreatedTimestamp() {
      return this.createdTimestamp;
    }

    public void setCreatedTimestamp(long createdTimestamp) {
      this.createdTimestamp = createdTimestamp;
      setCreatedTimestampIsSet(true);
    }

    public void unsetCreatedTimestamp() {
      __isset_bit_vector.clear(__CREATEDTIMESTAMP_ISSET_ID);
    }

    /** Returns true if field createdTimestamp is set (has been assigned a value) and false otherwise */
    public boolean isSetCreatedTimestamp() {
      return __isset_bit_vector.get(__CREATEDTIMESTAMP_ISSET_ID);
    }

    public void setCreatedTimestampIsSet(boolean value) {
      __isset_bit_vector.set(__CREATEDTIMESTAMP_ISSET_ID, value);
    }

    public long getPromisedShippingTimestamp() {
      return this.promisedShippingTimestamp;
    }

    public void setPromisedShippingTimestamp(long promisedShippingTimestamp) {
      this.promisedShippingTimestamp = promisedShippingTimestamp;
      setPromisedShippingTimestampIsSet(true);
    }

    public void unsetPromisedShippingTimestamp() {
      __isset_bit_vector.clear(__PROMISEDSHIPPINGTIMESTAMP_ISSET_ID);
    }

    /** Returns true if field promisedShippingTimestamp is set (has been assigned a value) and false otherwise */
    public boolean isSetPromisedShippingTimestamp() {
      return __isset_bit_vector.get(__PROMISEDSHIPPINGTIMESTAMP_ISSET_ID);
    }

    public void setPromisedShippingTimestampIsSet(boolean value) {
      __isset_bit_vector.set(__PROMISEDSHIPPINGTIMESTAMP_ISSET_ID, value);
    }

    public double getQuantity() {
      return this.quantity;
    }

    public void setQuantity(double quantity) {
      this.quantity = quantity;
      setQuantityIsSet(true);
    }

    public void unsetQuantity() {
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
    }

    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
    public boolean isSetQuantity() {
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
    }

    public void setQuantityIsSet(boolean value) {
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouseId();
        } else {
          setWarehouseId((Long)value);
        }
        break;

      case SOURCE_ID:
        if (value == null) {
          unsetSourceId();
        } else {
          setSourceId((Long)value);
        }
        break;

      case ORDER_ID:
        if (value == null) {
          unsetOrderId();
        } else {
          setOrderId((Long)value);
        }
        break;

      case CREATED_TIMESTAMP:
        if (value == null) {
          unsetCreatedTimestamp();
        } else {
          setCreatedTimestamp((Long)value);
        }
        break;

      case PROMISED_SHIPPING_TIMESTAMP:
        if (value == null) {
          unsetPromisedShippingTimestamp();
        } else {
          setPromisedShippingTimestamp((Long)value);
        }
        break;

      case QUANTITY:
        if (value == null) {
          unsetQuantity();
        } else {
          setQuantity((Double)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItemId());

      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouseId());

      case SOURCE_ID:
        return Long.valueOf(getSourceId());

      case ORDER_ID:
        return Long.valueOf(getOrderId());

      case CREATED_TIMESTAMP:
        return Long.valueOf(getCreatedTimestamp());

      case PROMISED_SHIPPING_TIMESTAMP:
        return Long.valueOf(getPromisedShippingTimestamp());

      case QUANTITY:
        return Double.valueOf(getQuantity());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItemId();
      case WAREHOUSE_ID:
        return isSetWarehouseId();
      case SOURCE_ID:
        return isSetSourceId();
      case ORDER_ID:
        return isSetOrderId();
      case CREATED_TIMESTAMP:
        return isSetCreatedTimestamp();
      case PROMISED_SHIPPING_TIMESTAMP:
        return isSetPromisedShippingTimestamp();
      case QUANTITY:
        return isSetQuantity();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof reserveItemInWarehouse_args)
        return this.equals((reserveItemInWarehouse_args)that);
      return false;
    }

    public boolean equals(reserveItemInWarehouse_args that) {
      if (that == null)
        return false;

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      boolean this_present_warehouseId = true;
      boolean that_present_warehouseId = true;
      if (this_present_warehouseId || that_present_warehouseId) {
        if (!(this_present_warehouseId && that_present_warehouseId))
          return false;
        if (this.warehouseId != that.warehouseId)
          return false;
      }

      boolean this_present_sourceId = true;
      boolean that_present_sourceId = true;
      if (this_present_sourceId || that_present_sourceId) {
        if (!(this_present_sourceId && that_present_sourceId))
          return false;
        if (this.sourceId != that.sourceId)
          return false;
      }

      boolean this_present_orderId = true;
      boolean that_present_orderId = true;
      if (this_present_orderId || that_present_orderId) {
        if (!(this_present_orderId && that_present_orderId))
          return false;
        if (this.orderId != that.orderId)
          return false;
      }

      boolean this_present_createdTimestamp = true;
      boolean that_present_createdTimestamp = true;
      if (this_present_createdTimestamp || that_present_createdTimestamp) {
        if (!(this_present_createdTimestamp && that_present_createdTimestamp))
          return false;
        if (this.createdTimestamp != that.createdTimestamp)
          return false;
      }

      boolean this_present_promisedShippingTimestamp = true;
      boolean that_present_promisedShippingTimestamp = true;
      if (this_present_promisedShippingTimestamp || that_present_promisedShippingTimestamp) {
        if (!(this_present_promisedShippingTimestamp && that_present_promisedShippingTimestamp))
          return false;
        if (this.promisedShippingTimestamp != that.promisedShippingTimestamp)
          return false;
      }

      boolean this_present_quantity = true;
      boolean that_present_quantity = true;
      if (this_present_quantity || that_present_quantity) {
        if (!(this_present_quantity && that_present_quantity))
          return false;
        if (this.quantity != that.quantity)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(reserveItemInWarehouse_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      reserveItemInWarehouse_args typedOther = (reserveItemInWarehouse_args)other;

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSourceId()).compareTo(typedOther.isSetSourceId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSourceId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sourceId, typedOther.sourceId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOrderId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCreatedTimestamp()).compareTo(typedOther.isSetCreatedTimestamp());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCreatedTimestamp()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTimestamp, typedOther.createdTimestamp);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPromisedShippingTimestamp()).compareTo(typedOther.isSetPromisedShippingTimestamp());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPromisedShippingTimestamp()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.promisedShippingTimestamp, typedOther.promisedShippingTimestamp);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQuantity()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouseId = iprot.readI64();
              setWarehouseIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SOURCE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.sourceId = iprot.readI64();
              setSourceIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // ORDER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.orderId = iprot.readI64();
              setOrderIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 5: // CREATED_TIMESTAMP
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.createdTimestamp = iprot.readI64();
              setCreatedTimestampIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 6: // PROMISED_SHIPPING_TIMESTAMP
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.promisedShippingTimestamp = iprot.readI64();
              setPromisedShippingTimestampIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 7: // QUANTITY
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
              this.quantity = iprot.readDouble();
              setQuantityIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouseId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SOURCE_ID_FIELD_DESC);
      oprot.writeI64(this.sourceId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
      oprot.writeI64(this.orderId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(CREATED_TIMESTAMP_FIELD_DESC);
      oprot.writeI64(this.createdTimestamp);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(PROMISED_SHIPPING_TIMESTAMP_FIELD_DESC);
      oprot.writeI64(this.promisedShippingTimestamp);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
      oprot.writeDouble(this.quantity);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("reserveItemInWarehouse_args(");
      boolean first = true;

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("warehouseId:");
      sb.append(this.warehouseId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("sourceId:");
      sb.append(this.sourceId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("orderId:");
      sb.append(this.orderId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("createdTimestamp:");
      sb.append(this.createdTimestamp);
      first = false;
      if (!first) sb.append(", ");
      sb.append("promisedShippingTimestamp:");
      sb.append(this.promisedShippingTimestamp);
      first = false;
      if (!first) sb.append(", ");
      sb.append("quantity:");
      sb.append(this.quantity);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class reserveItemInWarehouse_result implements org.apache.thrift.TBase<reserveItemInWarehouse_result, reserveItemInWarehouse_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("reserveItemInWarehouse_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private boolean success; // required
    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(reserveItemInWarehouse_result.class, metaDataMap);
    }

    public reserveItemInWarehouse_result() {
    }

    public reserveItemInWarehouse_result(
      boolean success,
      InventoryServiceException cex)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public reserveItemInWarehouse_result(reserveItemInWarehouse_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public reserveItemInWarehouse_result deepCopy() {
      return new reserveItemInWarehouse_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.cex = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof reserveItemInWarehouse_result)
        return this.equals((reserveItemInWarehouse_result)that);
      return false;
    }

    public boolean equals(reserveItemInWarehouse_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(reserveItemInWarehouse_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      reserveItemInWarehouse_result typedOther = (reserveItemInWarehouse_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("reserveItemInWarehouse_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateReservationForOrder_args implements org.apache.thrift.TBase<updateReservationForOrder_args, updateReservationForOrder_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateReservationForOrder_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField SOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sourceId", org.apache.thrift.protocol.TType.I64, (short)3);
    private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.I64, (short)4);
    private static final org.apache.thrift.protocol.TField CREATED_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("createdTimestamp", org.apache.thrift.protocol.TType.I64, (short)5);
    private static final org.apache.thrift.protocol.TField PROMISED_SHIPPING_TIMESTAMP_FIELD_DESC = new org.apache.thrift.protocol.TField("promisedShippingTimestamp", org.apache.thrift.protocol.TType.I64, (short)6);
    private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.DOUBLE, (short)7);

    private long itemId; // required
    private long warehouseId; // required
    private long sourceId; // required
    private long orderId; // required
    private long createdTimestamp; // required
    private long promisedShippingTimestamp; // required
    private double quantity; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "itemId"),
      WAREHOUSE_ID((short)2, "warehouseId"),
      SOURCE_ID((short)3, "sourceId"),
      ORDER_ID((short)4, "orderId"),
      CREATED_TIMESTAMP((short)5, "createdTimestamp"),
      PROMISED_SHIPPING_TIMESTAMP((short)6, "promisedShippingTimestamp"),
      QUANTITY((short)7, "quantity");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          case 3: // SOURCE_ID
            return SOURCE_ID;
          case 4: // ORDER_ID
            return ORDER_ID;
          case 5: // CREATED_TIMESTAMP
            return CREATED_TIMESTAMP;
          case 6: // PROMISED_SHIPPING_TIMESTAMP
            return PROMISED_SHIPPING_TIMESTAMP;
          case 7: // QUANTITY
            return QUANTITY;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEMID_ISSET_ID = 0;
    private static final int __WAREHOUSEID_ISSET_ID = 1;
    private static final int __SOURCEID_ISSET_ID = 2;
    private static final int __ORDERID_ISSET_ID = 3;
    private static final int __CREATEDTIMESTAMP_ISSET_ID = 4;
    private static final int __PROMISEDSHIPPINGTIMESTAMP_ISSET_ID = 5;
    private static final int __QUANTITY_ISSET_ID = 6;
    private BitSet __isset_bit_vector = new BitSet(7);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("sourceId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.CREATED_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("createdTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.PROMISED_SHIPPING_TIMESTAMP, new org.apache.thrift.meta_data.FieldMetaData("promisedShippingTimestamp", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateReservationForOrder_args.class, metaDataMap);
    }

    public updateReservationForOrder_args() {
    }

    public updateReservationForOrder_args(
      long itemId,
      long warehouseId,
      long sourceId,
      long orderId,
      long createdTimestamp,
      long promisedShippingTimestamp,
      double quantity)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
      this.orderId = orderId;
      setOrderIdIsSet(true);
      this.createdTimestamp = createdTimestamp;
      setCreatedTimestampIsSet(true);
      this.promisedShippingTimestamp = promisedShippingTimestamp;
      setPromisedShippingTimestampIsSet(true);
      this.quantity = quantity;
      setQuantityIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateReservationForOrder_args(updateReservationForOrder_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
      this.warehouseId = other.warehouseId;
      this.sourceId = other.sourceId;
      this.orderId = other.orderId;
      this.createdTimestamp = other.createdTimestamp;
      this.promisedShippingTimestamp = other.promisedShippingTimestamp;
      this.quantity = other.quantity;
    }

    public updateReservationForOrder_args deepCopy() {
      return new updateReservationForOrder_args(this);
    }

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
      setWarehouseIdIsSet(false);
      this.warehouseId = 0;
      setSourceIdIsSet(false);
      this.sourceId = 0;
      setOrderIdIsSet(false);
      this.orderId = 0;
      setCreatedTimestampIsSet(false);
      this.createdTimestamp = 0;
      setPromisedShippingTimestampIsSet(false);
      this.promisedShippingTimestamp = 0;
      setQuantityIsSet(false);
      this.quantity = 0.0;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public long getWarehouseId() {
      return this.warehouseId;
    }

    public void setWarehouseId(long warehouseId) {
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    public void unsetWarehouseId() {
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
    }

    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouseId() {
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
    }

    public void setWarehouseIdIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
    }

    public long getSourceId() {
      return this.sourceId;
    }

    public void setSourceId(long sourceId) {
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
    }

    public void unsetSourceId() {
      __isset_bit_vector.clear(__SOURCEID_ISSET_ID);
    }

    /** Returns true if field sourceId is set (has been assigned a value) and false otherwise */
    public boolean isSetSourceId() {
      return __isset_bit_vector.get(__SOURCEID_ISSET_ID);
    }

    public void setSourceIdIsSet(boolean value) {
      __isset_bit_vector.set(__SOURCEID_ISSET_ID, value);
    }

    public long getOrderId() {
      return this.orderId;
    }

    public void setOrderId(long orderId) {
      this.orderId = orderId;
      setOrderIdIsSet(true);
    }

    public void unsetOrderId() {
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
    }

    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
    public boolean isSetOrderId() {
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
    }

    public void setOrderIdIsSet(boolean value) {
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
    }

    public long getCreatedTimestamp() {
      return this.createdTimestamp;
    }

    public void setCreatedTimestamp(long createdTimestamp) {
      this.createdTimestamp = createdTimestamp;
      setCreatedTimestampIsSet(true);
    }

    public void unsetCreatedTimestamp() {
      __isset_bit_vector.clear(__CREATEDTIMESTAMP_ISSET_ID);
    }

    /** Returns true if field createdTimestamp is set (has been assigned a value) and false otherwise */
    public boolean isSetCreatedTimestamp() {
      return __isset_bit_vector.get(__CREATEDTIMESTAMP_ISSET_ID);
    }

    public void setCreatedTimestampIsSet(boolean value) {
      __isset_bit_vector.set(__CREATEDTIMESTAMP_ISSET_ID, value);
    }

    public long getPromisedShippingTimestamp() {
      return this.promisedShippingTimestamp;
    }

    public void setPromisedShippingTimestamp(long promisedShippingTimestamp) {
      this.promisedShippingTimestamp = promisedShippingTimestamp;
      setPromisedShippingTimestampIsSet(true);
    }

    public void unsetPromisedShippingTimestamp() {
      __isset_bit_vector.clear(__PROMISEDSHIPPINGTIMESTAMP_ISSET_ID);
    }

    /** Returns true if field promisedShippingTimestamp is set (has been assigned a value) and false otherwise */
    public boolean isSetPromisedShippingTimestamp() {
      return __isset_bit_vector.get(__PROMISEDSHIPPINGTIMESTAMP_ISSET_ID);
    }

    public void setPromisedShippingTimestampIsSet(boolean value) {
      __isset_bit_vector.set(__PROMISEDSHIPPINGTIMESTAMP_ISSET_ID, value);
    }

    public double getQuantity() {
      return this.quantity;
    }

    public void setQuantity(double quantity) {
      this.quantity = quantity;
      setQuantityIsSet(true);
    }

    public void unsetQuantity() {
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
    }

    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
    public boolean isSetQuantity() {
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
    }

    public void setQuantityIsSet(boolean value) {
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouseId();
        } else {
          setWarehouseId((Long)value);
        }
        break;

      case SOURCE_ID:
        if (value == null) {
          unsetSourceId();
        } else {
          setSourceId((Long)value);
        }
        break;

      case ORDER_ID:
        if (value == null) {
          unsetOrderId();
        } else {
          setOrderId((Long)value);
        }
        break;

      case CREATED_TIMESTAMP:
        if (value == null) {
          unsetCreatedTimestamp();
        } else {
          setCreatedTimestamp((Long)value);
        }
        break;

      case PROMISED_SHIPPING_TIMESTAMP:
        if (value == null) {
          unsetPromisedShippingTimestamp();
        } else {
          setPromisedShippingTimestamp((Long)value);
        }
        break;

      case QUANTITY:
        if (value == null) {
          unsetQuantity();
        } else {
          setQuantity((Double)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItemId());

      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouseId());

      case SOURCE_ID:
        return Long.valueOf(getSourceId());

      case ORDER_ID:
        return Long.valueOf(getOrderId());

      case CREATED_TIMESTAMP:
        return Long.valueOf(getCreatedTimestamp());

      case PROMISED_SHIPPING_TIMESTAMP:
        return Long.valueOf(getPromisedShippingTimestamp());

      case QUANTITY:
        return Double.valueOf(getQuantity());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItemId();
      case WAREHOUSE_ID:
        return isSetWarehouseId();
      case SOURCE_ID:
        return isSetSourceId();
      case ORDER_ID:
        return isSetOrderId();
      case CREATED_TIMESTAMP:
        return isSetCreatedTimestamp();
      case PROMISED_SHIPPING_TIMESTAMP:
        return isSetPromisedShippingTimestamp();
      case QUANTITY:
        return isSetQuantity();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateReservationForOrder_args)
        return this.equals((updateReservationForOrder_args)that);
      return false;
    }

    public boolean equals(updateReservationForOrder_args that) {
      if (that == null)
        return false;

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      boolean this_present_warehouseId = true;
      boolean that_present_warehouseId = true;
      if (this_present_warehouseId || that_present_warehouseId) {
        if (!(this_present_warehouseId && that_present_warehouseId))
          return false;
        if (this.warehouseId != that.warehouseId)
          return false;
      }

      boolean this_present_sourceId = true;
      boolean that_present_sourceId = true;
      if (this_present_sourceId || that_present_sourceId) {
        if (!(this_present_sourceId && that_present_sourceId))
          return false;
        if (this.sourceId != that.sourceId)
          return false;
      }

      boolean this_present_orderId = true;
      boolean that_present_orderId = true;
      if (this_present_orderId || that_present_orderId) {
        if (!(this_present_orderId && that_present_orderId))
          return false;
        if (this.orderId != that.orderId)
          return false;
      }

      boolean this_present_createdTimestamp = true;
      boolean that_present_createdTimestamp = true;
      if (this_present_createdTimestamp || that_present_createdTimestamp) {
        if (!(this_present_createdTimestamp && that_present_createdTimestamp))
          return false;
        if (this.createdTimestamp != that.createdTimestamp)
          return false;
      }

      boolean this_present_promisedShippingTimestamp = true;
      boolean that_present_promisedShippingTimestamp = true;
      if (this_present_promisedShippingTimestamp || that_present_promisedShippingTimestamp) {
        if (!(this_present_promisedShippingTimestamp && that_present_promisedShippingTimestamp))
          return false;
        if (this.promisedShippingTimestamp != that.promisedShippingTimestamp)
          return false;
      }

      boolean this_present_quantity = true;
      boolean that_present_quantity = true;
      if (this_present_quantity || that_present_quantity) {
        if (!(this_present_quantity && that_present_quantity))
          return false;
        if (this.quantity != that.quantity)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateReservationForOrder_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateReservationForOrder_args typedOther = (updateReservationForOrder_args)other;

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSourceId()).compareTo(typedOther.isSetSourceId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSourceId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sourceId, typedOther.sourceId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOrderId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCreatedTimestamp()).compareTo(typedOther.isSetCreatedTimestamp());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCreatedTimestamp()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.createdTimestamp, typedOther.createdTimestamp);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPromisedShippingTimestamp()).compareTo(typedOther.isSetPromisedShippingTimestamp());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPromisedShippingTimestamp()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.promisedShippingTimestamp, typedOther.promisedShippingTimestamp);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQuantity()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouseId = iprot.readI64();
              setWarehouseIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SOURCE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.sourceId = iprot.readI64();
              setSourceIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // ORDER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.orderId = iprot.readI64();
              setOrderIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 5: // CREATED_TIMESTAMP
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.createdTimestamp = iprot.readI64();
              setCreatedTimestampIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 6: // PROMISED_SHIPPING_TIMESTAMP
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.promisedShippingTimestamp = iprot.readI64();
              setPromisedShippingTimestampIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 7: // QUANTITY
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
              this.quantity = iprot.readDouble();
              setQuantityIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouseId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SOURCE_ID_FIELD_DESC);
      oprot.writeI64(this.sourceId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
      oprot.writeI64(this.orderId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(CREATED_TIMESTAMP_FIELD_DESC);
      oprot.writeI64(this.createdTimestamp);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(PROMISED_SHIPPING_TIMESTAMP_FIELD_DESC);
      oprot.writeI64(this.promisedShippingTimestamp);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
      oprot.writeDouble(this.quantity);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateReservationForOrder_args(");
      boolean first = true;

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("warehouseId:");
      sb.append(this.warehouseId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("sourceId:");
      sb.append(this.sourceId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("orderId:");
      sb.append(this.orderId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("createdTimestamp:");
      sb.append(this.createdTimestamp);
      first = false;
      if (!first) sb.append(", ");
      sb.append("promisedShippingTimestamp:");
      sb.append(this.promisedShippingTimestamp);
      first = false;
      if (!first) sb.append(", ");
      sb.append("quantity:");
      sb.append(this.quantity);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateReservationForOrder_result implements org.apache.thrift.TBase<updateReservationForOrder_result, updateReservationForOrder_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateReservationForOrder_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private boolean success; // required
    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateReservationForOrder_result.class, metaDataMap);
    }

    public updateReservationForOrder_result() {
    }

    public updateReservationForOrder_result(
      boolean success,
      InventoryServiceException cex)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateReservationForOrder_result(updateReservationForOrder_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public updateReservationForOrder_result deepCopy() {
      return new updateReservationForOrder_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.cex = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateReservationForOrder_result)
        return this.equals((updateReservationForOrder_result)that);
      return false;
    }

    public boolean equals(updateReservationForOrder_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateReservationForOrder_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateReservationForOrder_result typedOther = (updateReservationForOrder_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateReservationForOrder_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class reduceReservationCount_args implements org.apache.thrift.TBase<reduceReservationCount_args, reduceReservationCount_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("reduceReservationCount_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField SOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sourceId", org.apache.thrift.protocol.TType.I64, (short)3);
    private static final org.apache.thrift.protocol.TField ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("orderId", org.apache.thrift.protocol.TType.I64, (short)4);
    private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.DOUBLE, (short)5);

    private long itemId; // required
    private long warehouseId; // required
    private long sourceId; // required
    private long orderId; // required
    private double quantity; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "itemId"),
      WAREHOUSE_ID((short)2, "warehouseId"),
      SOURCE_ID((short)3, "sourceId"),
      ORDER_ID((short)4, "orderId"),
      QUANTITY((short)5, "quantity");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          case 3: // SOURCE_ID
            return SOURCE_ID;
          case 4: // ORDER_ID
            return ORDER_ID;
          case 5: // QUANTITY
            return QUANTITY;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEMID_ISSET_ID = 0;
    private static final int __WAREHOUSEID_ISSET_ID = 1;
    private static final int __SOURCEID_ISSET_ID = 2;
    private static final int __ORDERID_ISSET_ID = 3;
    private static final int __QUANTITY_ISSET_ID = 4;
    private BitSet __isset_bit_vector = new BitSet(5);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("sourceId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(reduceReservationCount_args.class, metaDataMap);
    }

    public reduceReservationCount_args() {
    }

    public reduceReservationCount_args(
      long itemId,
      long warehouseId,
      long sourceId,
      long orderId,
      double quantity)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
      this.orderId = orderId;
      setOrderIdIsSet(true);
      this.quantity = quantity;
      setQuantityIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public reduceReservationCount_args(reduceReservationCount_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
      this.warehouseId = other.warehouseId;
      this.sourceId = other.sourceId;
      this.orderId = other.orderId;
      this.quantity = other.quantity;
    }

    public reduceReservationCount_args deepCopy() {
      return new reduceReservationCount_args(this);
    }

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
      setWarehouseIdIsSet(false);
      this.warehouseId = 0;
      setSourceIdIsSet(false);
      this.sourceId = 0;
      setOrderIdIsSet(false);
      this.orderId = 0;
      setQuantityIsSet(false);
      this.quantity = 0.0;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public long getWarehouseId() {
      return this.warehouseId;
    }

    public void setWarehouseId(long warehouseId) {
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    public void unsetWarehouseId() {
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
    }

    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouseId() {
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
    }

    public void setWarehouseIdIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
    }

    public long getSourceId() {
      return this.sourceId;
    }

    public void setSourceId(long sourceId) {
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
    }

    public void unsetSourceId() {
      __isset_bit_vector.clear(__SOURCEID_ISSET_ID);
    }

    /** Returns true if field sourceId is set (has been assigned a value) and false otherwise */
    public boolean isSetSourceId() {
      return __isset_bit_vector.get(__SOURCEID_ISSET_ID);
    }

    public void setSourceIdIsSet(boolean value) {
      __isset_bit_vector.set(__SOURCEID_ISSET_ID, value);
    }

    public long getOrderId() {
      return this.orderId;
    }

    public void setOrderId(long orderId) {
      this.orderId = orderId;
      setOrderIdIsSet(true);
    }

    public void unsetOrderId() {
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
    }

    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
    public boolean isSetOrderId() {
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
    }

    public void setOrderIdIsSet(boolean value) {
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
    }

    public double getQuantity() {
      return this.quantity;
    }

    public void setQuantity(double quantity) {
      this.quantity = quantity;
      setQuantityIsSet(true);
    }

    public void unsetQuantity() {
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
    }

    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
    public boolean isSetQuantity() {
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
    }

    public void setQuantityIsSet(boolean value) {
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouseId();
        } else {
          setWarehouseId((Long)value);
        }
        break;

      case SOURCE_ID:
        if (value == null) {
          unsetSourceId();
        } else {
          setSourceId((Long)value);
        }
        break;

      case ORDER_ID:
        if (value == null) {
          unsetOrderId();
        } else {
          setOrderId((Long)value);
        }
        break;

      case QUANTITY:
        if (value == null) {
          unsetQuantity();
        } else {
          setQuantity((Double)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItemId());

      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouseId());

      case SOURCE_ID:
        return Long.valueOf(getSourceId());

      case ORDER_ID:
        return Long.valueOf(getOrderId());

      case QUANTITY:
        return Double.valueOf(getQuantity());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItemId();
      case WAREHOUSE_ID:
        return isSetWarehouseId();
      case SOURCE_ID:
        return isSetSourceId();
      case ORDER_ID:
        return isSetOrderId();
      case QUANTITY:
        return isSetQuantity();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof reduceReservationCount_args)
        return this.equals((reduceReservationCount_args)that);
      return false;
    }

    public boolean equals(reduceReservationCount_args that) {
      if (that == null)
        return false;

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      boolean this_present_warehouseId = true;
      boolean that_present_warehouseId = true;
      if (this_present_warehouseId || that_present_warehouseId) {
        if (!(this_present_warehouseId && that_present_warehouseId))
          return false;
        if (this.warehouseId != that.warehouseId)
          return false;
      }

      boolean this_present_sourceId = true;
      boolean that_present_sourceId = true;
      if (this_present_sourceId || that_present_sourceId) {
        if (!(this_present_sourceId && that_present_sourceId))
          return false;
        if (this.sourceId != that.sourceId)
          return false;
      }

      boolean this_present_orderId = true;
      boolean that_present_orderId = true;
      if (this_present_orderId || that_present_orderId) {
        if (!(this_present_orderId && that_present_orderId))
          return false;
        if (this.orderId != that.orderId)
          return false;
      }

      boolean this_present_quantity = true;
      boolean that_present_quantity = true;
      if (this_present_quantity || that_present_quantity) {
        if (!(this_present_quantity && that_present_quantity))
          return false;
        if (this.quantity != that.quantity)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(reduceReservationCount_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      reduceReservationCount_args typedOther = (reduceReservationCount_args)other;

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSourceId()).compareTo(typedOther.isSetSourceId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSourceId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sourceId, typedOther.sourceId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOrderId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQuantity()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouseId = iprot.readI64();
              setWarehouseIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SOURCE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.sourceId = iprot.readI64();
              setSourceIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // ORDER_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.orderId = iprot.readI64();
              setOrderIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 5: // QUANTITY
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
              this.quantity = iprot.readDouble();
              setQuantityIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouseId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SOURCE_ID_FIELD_DESC);
      oprot.writeI64(this.sourceId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
      oprot.writeI64(this.orderId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
      oprot.writeDouble(this.quantity);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("reduceReservationCount_args(");
      boolean first = true;

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("warehouseId:");
      sb.append(this.warehouseId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("sourceId:");
      sb.append(this.sourceId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("orderId:");
      sb.append(this.orderId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("quantity:");
      sb.append(this.quantity);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class reduceReservationCount_result implements org.apache.thrift.TBase<reduceReservationCount_result, reduceReservationCount_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("reduceReservationCount_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);
    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private boolean success; // required
    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(reduceReservationCount_result.class, metaDataMap);
    }

    public reduceReservationCount_result() {
    }

    public reduceReservationCount_result(
      boolean success,
      InventoryServiceException cex)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public reduceReservationCount_result(reduceReservationCount_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public reduceReservationCount_result deepCopy() {
      return new reduceReservationCount_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
      this.cex = null;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof reduceReservationCount_result)
        return this.equals((reduceReservationCount_result)that);
      return false;
    }

    public boolean equals(reduceReservationCount_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(reduceReservationCount_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      reduceReservationCount_result typedOther = (reduceReservationCount_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      } else if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("reduceReservationCount_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      if (!first) sb.append(", ");
      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemPricing_args implements org.apache.thrift.TBase<getItemPricing_args, getItemPricing_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemPricing_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField VENDOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorId", org.apache.thrift.protocol.TType.I64, (short)2);

    private long itemId; // required
    private long vendorId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "itemId"),
      VENDOR_ID((short)2, "vendorId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // VENDOR_ID
            return VENDOR_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEMID_ISSET_ID = 0;
    private static final int __VENDORID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.VENDOR_ID, new org.apache.thrift.meta_data.FieldMetaData("vendorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemPricing_args.class, metaDataMap);
    }

    public getItemPricing_args() {
    }

    public getItemPricing_args(
      long itemId,
      long vendorId)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
      this.vendorId = vendorId;
      setVendorIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemPricing_args(getItemPricing_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
      this.vendorId = other.vendorId;
    }

    public getItemPricing_args deepCopy() {
      return new getItemPricing_args(this);
    }

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
      setVendorIdIsSet(false);
      this.vendorId = 0;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public long getVendorId() {
      return this.vendorId;
    }

    public void setVendorId(long vendorId) {
      this.vendorId = vendorId;
      setVendorIdIsSet(true);
    }

    public void unsetVendorId() {
      __isset_bit_vector.clear(__VENDORID_ISSET_ID);
    }

    /** Returns true if field vendorId is set (has been assigned a value) and false otherwise */
    public boolean isSetVendorId() {
      return __isset_bit_vector.get(__VENDORID_ISSET_ID);
    }

    public void setVendorIdIsSet(boolean value) {
      __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      case VENDOR_ID:
        if (value == null) {
          unsetVendorId();
        } else {
          setVendorId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItemId());

      case VENDOR_ID:
        return Long.valueOf(getVendorId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItemId();
      case VENDOR_ID:
        return isSetVendorId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemPricing_args)
        return this.equals((getItemPricing_args)that);
      return false;
    }

    public boolean equals(getItemPricing_args that) {
      if (that == null)
        return false;

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      boolean this_present_vendorId = true;
      boolean that_present_vendorId = true;
      if (this_present_vendorId || that_present_vendorId) {
        if (!(this_present_vendorId && that_present_vendorId))
          return false;
        if (this.vendorId != that.vendorId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemPricing_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemPricing_args typedOther = (getItemPricing_args)other;

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetVendorId()).compareTo(typedOther.isSetVendorId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetVendorId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorId, typedOther.vendorId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // VENDOR_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.vendorId = iprot.readI64();
              setVendorIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
      oprot.writeI64(this.vendorId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemPricing_args(");
      boolean first = true;

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("vendorId:");
      sb.append(this.vendorId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemPricing_result implements org.apache.thrift.TBase<getItemPricing_result, getItemPricing_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemPricing_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);
    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private VendorItemPricing success; // required
    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, VendorItemPricing.class)));
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemPricing_result.class, metaDataMap);
    }

    public getItemPricing_result() {
    }

    public getItemPricing_result(
      VendorItemPricing success,
      InventoryServiceException cex)
    {
      this();
      this.success = success;
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemPricing_result(getItemPricing_result other) {
      if (other.isSetSuccess()) {
        this.success = new VendorItemPricing(other.success);
      }
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public getItemPricing_result deepCopy() {
      return new getItemPricing_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.cex = null;
    }

    public VendorItemPricing getSuccess() {
      return this.success;
    }

    public void setSuccess(VendorItemPricing success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((VendorItemPricing)value);
        }
        break;

      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemPricing_result)
        return this.equals((getItemPricing_result)that);
      return false;
    }

    public boolean equals(getItemPricing_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemPricing_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemPricing_result typedOther = (getItemPricing_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new VendorItemPricing();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      } else if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemPricing_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllItemPricing_args implements org.apache.thrift.TBase<getAllItemPricing_args, getAllItemPricing_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllItemPricing_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long itemId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "itemId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEMID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllItemPricing_args.class, metaDataMap);
    }

    public getAllItemPricing_args() {
    }

    public getAllItemPricing_args(
      long itemId)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllItemPricing_args(getAllItemPricing_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
    }

    public getAllItemPricing_args deepCopy() {
      return new getAllItemPricing_args(this);
    }

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItemId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItemId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllItemPricing_args)
        return this.equals((getAllItemPricing_args)that);
      return false;
    }

    public boolean equals(getAllItemPricing_args that) {
      if (that == null)
        return false;

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllItemPricing_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllItemPricing_args typedOther = (getAllItemPricing_args)other;

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllItemPricing_args(");
      boolean first = true;

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllItemPricing_result implements org.apache.thrift.TBase<getAllItemPricing_result, getAllItemPricing_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllItemPricing_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<VendorItemPricing> success; // required
    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, VendorItemPricing.class))));
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllItemPricing_result.class, metaDataMap);
    }

    public getAllItemPricing_result() {
    }

    public getAllItemPricing_result(
      List<VendorItemPricing> success,
      InventoryServiceException cex)
    {
      this();
      this.success = success;
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllItemPricing_result(getAllItemPricing_result other) {
      if (other.isSetSuccess()) {
        List<VendorItemPricing> __this__success = new ArrayList<VendorItemPricing>();
        for (VendorItemPricing other_element : other.success) {
          __this__success.add(new VendorItemPricing(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public getAllItemPricing_result deepCopy() {
      return new getAllItemPricing_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.cex = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<VendorItemPricing> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(VendorItemPricing elem) {
      if (this.success == null) {
        this.success = new ArrayList<VendorItemPricing>();
      }
      this.success.add(elem);
    }

    public List<VendorItemPricing> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<VendorItemPricing> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<VendorItemPricing>)value);
        }
        break;

      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllItemPricing_result)
        return this.equals((getAllItemPricing_result)that);
      return false;
    }

    public boolean equals(getAllItemPricing_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllItemPricing_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllItemPricing_result typedOther = (getAllItemPricing_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list37 = iprot.readListBegin();
                this.success = new ArrayList<VendorItemPricing>(_list37.size);
                for (int _i38 = 0; _i38 < _list37.size; ++_i38)
                {
                  VendorItemPricing _elem39; // required
                  _elem39 = new VendorItemPricing();
                  _elem39.read(iprot);
                  this.success.add(_elem39);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (VendorItemPricing _iter40 : this.success)
          {
            _iter40.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllItemPricing_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addVendorItemPricing_args implements org.apache.thrift.TBase<addVendorItemPricing_args, addVendorItemPricing_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVendorItemPricing_args");

    private static final org.apache.thrift.protocol.TField VENDOR_ITEM_PRICING_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorItemPricing", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private VendorItemPricing vendorItemPricing; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      VENDOR_ITEM_PRICING((short)1, "vendorItemPricing");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // VENDOR_ITEM_PRICING
            return VENDOR_ITEM_PRICING;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.VENDOR_ITEM_PRICING, new org.apache.thrift.meta_data.FieldMetaData("vendorItemPricing", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, VendorItemPricing.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVendorItemPricing_args.class, metaDataMap);
    }

    public addVendorItemPricing_args() {
    }

    public addVendorItemPricing_args(
      VendorItemPricing vendorItemPricing)
    {
      this();
      this.vendorItemPricing = vendorItemPricing;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addVendorItemPricing_args(addVendorItemPricing_args other) {
      if (other.isSetVendorItemPricing()) {
        this.vendorItemPricing = new VendorItemPricing(other.vendorItemPricing);
      }
    }

    public addVendorItemPricing_args deepCopy() {
      return new addVendorItemPricing_args(this);
    }

    @Override
    public void clear() {
      this.vendorItemPricing = null;
    }

    public VendorItemPricing getVendorItemPricing() {
      return this.vendorItemPricing;
    }

    public void setVendorItemPricing(VendorItemPricing vendorItemPricing) {
      this.vendorItemPricing = vendorItemPricing;
    }

    public void unsetVendorItemPricing() {
      this.vendorItemPricing = null;
    }

    /** Returns true if field vendorItemPricing is set (has been assigned a value) and false otherwise */
    public boolean isSetVendorItemPricing() {
      return this.vendorItemPricing != null;
    }

    public void setVendorItemPricingIsSet(boolean value) {
      if (!value) {
        this.vendorItemPricing = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case VENDOR_ITEM_PRICING:
        if (value == null) {
          unsetVendorItemPricing();
        } else {
          setVendorItemPricing((VendorItemPricing)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case VENDOR_ITEM_PRICING:
        return getVendorItemPricing();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case VENDOR_ITEM_PRICING:
        return isSetVendorItemPricing();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addVendorItemPricing_args)
        return this.equals((addVendorItemPricing_args)that);
      return false;
    }

    public boolean equals(addVendorItemPricing_args that) {
      if (that == null)
        return false;

      boolean this_present_vendorItemPricing = true && this.isSetVendorItemPricing();
      boolean that_present_vendorItemPricing = true && that.isSetVendorItemPricing();
      if (this_present_vendorItemPricing || that_present_vendorItemPricing) {
        if (!(this_present_vendorItemPricing && that_present_vendorItemPricing))
          return false;
        if (!this.vendorItemPricing.equals(that.vendorItemPricing))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addVendorItemPricing_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addVendorItemPricing_args typedOther = (addVendorItemPricing_args)other;

      lastComparison = Boolean.valueOf(isSetVendorItemPricing()).compareTo(typedOther.isSetVendorItemPricing());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetVendorItemPricing()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorItemPricing, typedOther.vendorItemPricing);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // VENDOR_ITEM_PRICING
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.vendorItemPricing = new VendorItemPricing();
              this.vendorItemPricing.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.vendorItemPricing != null) {
        oprot.writeFieldBegin(VENDOR_ITEM_PRICING_FIELD_DESC);
        this.vendorItemPricing.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addVendorItemPricing_args(");
      boolean first = true;

      sb.append("vendorItemPricing:");
      if (this.vendorItemPricing == null) {
        sb.append("null");
      } else {
        sb.append(this.vendorItemPricing);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addVendorItemPricing_result implements org.apache.thrift.TBase<addVendorItemPricing_result, addVendorItemPricing_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVendorItemPricing_result");

    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVendorItemPricing_result.class, metaDataMap);
    }

    public addVendorItemPricing_result() {
    }

    public addVendorItemPricing_result(
      InventoryServiceException cex)
    {
      this();
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addVendorItemPricing_result(addVendorItemPricing_result other) {
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public addVendorItemPricing_result deepCopy() {
      return new addVendorItemPricing_result(this);
    }

    @Override
    public void clear() {
      this.cex = null;
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addVendorItemPricing_result)
        return this.equals((addVendorItemPricing_result)that);
      return false;
    }

    public boolean equals(addVendorItemPricing_result that) {
      if (that == null)
        return false;

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addVendorItemPricing_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addVendorItemPricing_result typedOther = (addVendorItemPricing_result)other;

      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addVendorItemPricing_result(");
      boolean first = true;

      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getVendor_args implements org.apache.thrift.TBase<getVendor_args, getVendor_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVendor_args");

    private static final org.apache.thrift.protocol.TField VENDOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long vendorId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      VENDOR_ID((short)1, "vendorId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // VENDOR_ID
            return VENDOR_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __VENDORID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.VENDOR_ID, new org.apache.thrift.meta_data.FieldMetaData("vendorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVendor_args.class, metaDataMap);
    }

    public getVendor_args() {
    }

    public getVendor_args(
      long vendorId)
    {
      this();
      this.vendorId = vendorId;
      setVendorIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getVendor_args(getVendor_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.vendorId = other.vendorId;
    }

    public getVendor_args deepCopy() {
      return new getVendor_args(this);
    }

    @Override
    public void clear() {
      setVendorIdIsSet(false);
      this.vendorId = 0;
    }

    public long getVendorId() {
      return this.vendorId;
    }

    public void setVendorId(long vendorId) {
      this.vendorId = vendorId;
      setVendorIdIsSet(true);
    }

    public void unsetVendorId() {
      __isset_bit_vector.clear(__VENDORID_ISSET_ID);
    }

    /** Returns true if field vendorId is set (has been assigned a value) and false otherwise */
    public boolean isSetVendorId() {
      return __isset_bit_vector.get(__VENDORID_ISSET_ID);
    }

    public void setVendorIdIsSet(boolean value) {
      __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case VENDOR_ID:
        if (value == null) {
          unsetVendorId();
        } else {
          setVendorId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case VENDOR_ID:
        return Long.valueOf(getVendorId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case VENDOR_ID:
        return isSetVendorId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getVendor_args)
        return this.equals((getVendor_args)that);
      return false;
    }

    public boolean equals(getVendor_args that) {
      if (that == null)
        return false;

      boolean this_present_vendorId = true;
      boolean that_present_vendorId = true;
      if (this_present_vendorId || that_present_vendorId) {
        if (!(this_present_vendorId && that_present_vendorId))
          return false;
        if (this.vendorId != that.vendorId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getVendor_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getVendor_args typedOther = (getVendor_args)other;

      lastComparison = Boolean.valueOf(isSetVendorId()).compareTo(typedOther.isSetVendorId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetVendorId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorId, typedOther.vendorId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // VENDOR_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.vendorId = iprot.readI64();
              setVendorIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
      oprot.writeI64(this.vendorId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getVendor_args(");
      boolean first = true;

      sb.append("vendorId:");
      sb.append(this.vendorId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getVendor_result implements org.apache.thrift.TBase<getVendor_result, getVendor_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVendor_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);

    private Vendor success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Vendor.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVendor_result.class, metaDataMap);
    }

    public getVendor_result() {
    }

    public getVendor_result(
      Vendor success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getVendor_result(getVendor_result other) {
      if (other.isSetSuccess()) {
        this.success = new Vendor(other.success);
      }
    }

    public getVendor_result deepCopy() {
      return new getVendor_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public Vendor getSuccess() {
      return this.success;
    }

    public void setSuccess(Vendor success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Vendor)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getVendor_result)
        return this.equals((getVendor_result)that);
      return false;
    }

    public boolean equals(getVendor_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getVendor_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getVendor_result typedOther = (getVendor_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new Vendor();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getVendor_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllVendors_args implements org.apache.thrift.TBase<getAllVendors_args, getAllVendors_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllVendors_args");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllVendors_args.class, metaDataMap);
    }

    public getAllVendors_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllVendors_args(getAllVendors_args other) {
    }

    public getAllVendors_args deepCopy() {
      return new getAllVendors_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllVendors_args)
        return this.equals((getAllVendors_args)that);
      return false;
    }

    public boolean equals(getAllVendors_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllVendors_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllVendors_args typedOther = (getAllVendors_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllVendors_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllVendors_result implements org.apache.thrift.TBase<getAllVendors_result, getAllVendors_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllVendors_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<Vendor> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Vendor.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllVendors_result.class, metaDataMap);
    }

    public getAllVendors_result() {
    }

    public getAllVendors_result(
      List<Vendor> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllVendors_result(getAllVendors_result other) {
      if (other.isSetSuccess()) {
        List<Vendor> __this__success = new ArrayList<Vendor>();
        for (Vendor other_element : other.success) {
          __this__success.add(new Vendor(other_element));
        }
        this.success = __this__success;
      }
    }

    public getAllVendors_result deepCopy() {
      return new getAllVendors_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Vendor> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(Vendor elem) {
      if (this.success == null) {
        this.success = new ArrayList<Vendor>();
      }
      this.success.add(elem);
    }

    public List<Vendor> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Vendor> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Vendor>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllVendors_result)
        return this.equals((getAllVendors_result)that);
      return false;
    }

    public boolean equals(getAllVendors_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllVendors_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllVendors_result typedOther = (getAllVendors_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list41 = iprot.readListBegin();
                this.success = new ArrayList<Vendor>(_list41.size);
                for (int _i42 = 0; _i42 < _list41.size; ++_i42)
                {
                  Vendor _elem43; // required
                  _elem43 = new Vendor();
                  _elem43.read(iprot);
                  this.success.add(_elem43);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (Vendor _iter44 : this.success)
          {
            _iter44.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllVendors_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addVendorItemMapping_args implements org.apache.thrift.TBase<addVendorItemMapping_args, addVendorItemMapping_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVendorItemMapping_args");

    private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField VENDOR_ITEM_MAPPING_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorItemMapping", org.apache.thrift.protocol.TType.STRUCT, (short)2);

    private String key; // required
    private VendorItemMapping vendorItemMapping; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      KEY((short)1, "key"),
      VENDOR_ITEM_MAPPING((short)2, "vendorItemMapping");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // KEY
            return KEY;
          case 2: // VENDOR_ITEM_MAPPING
            return VENDOR_ITEM_MAPPING;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.VENDOR_ITEM_MAPPING, new org.apache.thrift.meta_data.FieldMetaData("vendorItemMapping", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, VendorItemMapping.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVendorItemMapping_args.class, metaDataMap);
    }

    public addVendorItemMapping_args() {
    }

    public addVendorItemMapping_args(
      String key,
      VendorItemMapping vendorItemMapping)
    {
      this();
      this.key = key;
      this.vendorItemMapping = vendorItemMapping;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addVendorItemMapping_args(addVendorItemMapping_args other) {
      if (other.isSetKey()) {
        this.key = other.key;
      }
      if (other.isSetVendorItemMapping()) {
        this.vendorItemMapping = new VendorItemMapping(other.vendorItemMapping);
      }
    }

    public addVendorItemMapping_args deepCopy() {
      return new addVendorItemMapping_args(this);
    }

    @Override
    public void clear() {
      this.key = null;
      this.vendorItemMapping = null;
    }

    public String getKey() {
      return this.key;
    }

    public void setKey(String key) {
      this.key = key;
    }

    public void unsetKey() {
      this.key = null;
    }

    /** Returns true if field key is set (has been assigned a value) and false otherwise */
    public boolean isSetKey() {
      return this.key != null;
    }

    public void setKeyIsSet(boolean value) {
      if (!value) {
        this.key = null;
      }
    }

    public VendorItemMapping getVendorItemMapping() {
      return this.vendorItemMapping;
    }

    public void setVendorItemMapping(VendorItemMapping vendorItemMapping) {
      this.vendorItemMapping = vendorItemMapping;
    }

    public void unsetVendorItemMapping() {
      this.vendorItemMapping = null;
    }

    /** Returns true if field vendorItemMapping is set (has been assigned a value) and false otherwise */
    public boolean isSetVendorItemMapping() {
      return this.vendorItemMapping != null;
    }

    public void setVendorItemMappingIsSet(boolean value) {
      if (!value) {
        this.vendorItemMapping = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case KEY:
        if (value == null) {
          unsetKey();
        } else {
          setKey((String)value);
        }
        break;

      case VENDOR_ITEM_MAPPING:
        if (value == null) {
          unsetVendorItemMapping();
        } else {
          setVendorItemMapping((VendorItemMapping)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case KEY:
        return getKey();

      case VENDOR_ITEM_MAPPING:
        return getVendorItemMapping();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case KEY:
        return isSetKey();
      case VENDOR_ITEM_MAPPING:
        return isSetVendorItemMapping();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addVendorItemMapping_args)
        return this.equals((addVendorItemMapping_args)that);
      return false;
    }

    public boolean equals(addVendorItemMapping_args that) {
      if (that == null)
        return false;

      boolean this_present_key = true && this.isSetKey();
      boolean that_present_key = true && that.isSetKey();
      if (this_present_key || that_present_key) {
        if (!(this_present_key && that_present_key))
          return false;
        if (!this.key.equals(that.key))
          return false;
      }

      boolean this_present_vendorItemMapping = true && this.isSetVendorItemMapping();
      boolean that_present_vendorItemMapping = true && that.isSetVendorItemMapping();
      if (this_present_vendorItemMapping || that_present_vendorItemMapping) {
        if (!(this_present_vendorItemMapping && that_present_vendorItemMapping))
          return false;
        if (!this.vendorItemMapping.equals(that.vendorItemMapping))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addVendorItemMapping_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addVendorItemMapping_args typedOther = (addVendorItemMapping_args)other;

      lastComparison = Boolean.valueOf(isSetKey()).compareTo(typedOther.isSetKey());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetKey()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, typedOther.key);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetVendorItemMapping()).compareTo(typedOther.isSetVendorItemMapping());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetVendorItemMapping()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorItemMapping, typedOther.vendorItemMapping);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // KEY
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.key = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // VENDOR_ITEM_MAPPING
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.vendorItemMapping = new VendorItemMapping();
              this.vendorItemMapping.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.key != null) {
        oprot.writeFieldBegin(KEY_FIELD_DESC);
        oprot.writeString(this.key);
        oprot.writeFieldEnd();
      }
      if (this.vendorItemMapping != null) {
        oprot.writeFieldBegin(VENDOR_ITEM_MAPPING_FIELD_DESC);
        this.vendorItemMapping.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addVendorItemMapping_args(");
      boolean first = true;

      sb.append("key:");
      if (this.key == null) {
        sb.append("null");
      } else {
        sb.append(this.key);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("vendorItemMapping:");
      if (this.vendorItemMapping == null) {
        sb.append("null");
      } else {
        sb.append(this.vendorItemMapping);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addVendorItemMapping_result implements org.apache.thrift.TBase<addVendorItemMapping_result, addVendorItemMapping_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVendorItemMapping_result");

    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVendorItemMapping_result.class, metaDataMap);
    }

    public addVendorItemMapping_result() {
    }

    public addVendorItemMapping_result(
      InventoryServiceException cex)
    {
      this();
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addVendorItemMapping_result(addVendorItemMapping_result other) {
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public addVendorItemMapping_result deepCopy() {
      return new addVendorItemMapping_result(this);
    }

    @Override
    public void clear() {
      this.cex = null;
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addVendorItemMapping_result)
        return this.equals((addVendorItemMapping_result)that);
      return false;
    }

    public boolean equals(addVendorItemMapping_result that) {
      if (that == null)
        return false;

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addVendorItemMapping_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addVendorItemMapping_result typedOther = (addVendorItemMapping_result)other;

      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addVendorItemMapping_result(");
      boolean first = true;

      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getVendorItemMappings_args implements org.apache.thrift.TBase<getVendorItemMappings_args, getVendorItemMappings_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVendorItemMappings_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long itemId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "itemId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEMID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVendorItemMappings_args.class, metaDataMap);
    }

    public getVendorItemMappings_args() {
    }

    public getVendorItemMappings_args(
      long itemId)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getVendorItemMappings_args(getVendorItemMappings_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
    }

    public getVendorItemMappings_args deepCopy() {
      return new getVendorItemMappings_args(this);
    }

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItemId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItemId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getVendorItemMappings_args)
        return this.equals((getVendorItemMappings_args)that);
      return false;
    }

    public boolean equals(getVendorItemMappings_args that) {
      if (that == null)
        return false;

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getVendorItemMappings_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getVendorItemMappings_args typedOther = (getVendorItemMappings_args)other;

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getVendorItemMappings_args(");
      boolean first = true;

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getVendorItemMappings_result implements org.apache.thrift.TBase<getVendorItemMappings_result, getVendorItemMappings_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getVendorItemMappings_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);
    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private List<VendorItemMapping> success; // required
    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success"),
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, VendorItemMapping.class))));
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getVendorItemMappings_result.class, metaDataMap);
    }

    public getVendorItemMappings_result() {
    }

    public getVendorItemMappings_result(
      List<VendorItemMapping> success,
      InventoryServiceException cex)
    {
      this();
      this.success = success;
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getVendorItemMappings_result(getVendorItemMappings_result other) {
      if (other.isSetSuccess()) {
        List<VendorItemMapping> __this__success = new ArrayList<VendorItemMapping>();
        for (VendorItemMapping other_element : other.success) {
          __this__success.add(new VendorItemMapping(other_element));
        }
        this.success = __this__success;
      }
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public getVendorItemMappings_result deepCopy() {
      return new getVendorItemMappings_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
      this.cex = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<VendorItemMapping> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(VendorItemMapping elem) {
      if (this.success == null) {
        this.success = new ArrayList<VendorItemMapping>();
      }
      this.success.add(elem);
    }

    public List<VendorItemMapping> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<VendorItemMapping> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<VendorItemMapping>)value);
        }
        break;

      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getVendorItemMappings_result)
        return this.equals((getVendorItemMappings_result)that);
      return false;
    }

    public boolean equals(getVendorItemMappings_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getVendorItemMappings_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getVendorItemMappings_result typedOther = (getVendorItemMappings_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list45 = iprot.readListBegin();
                this.success = new ArrayList<VendorItemMapping>(_list45.size);
                for (int _i46 = 0; _i46 < _list45.size; ++_i46)
                {
                  VendorItemMapping _elem47; // required
                  _elem47 = new VendorItemMapping();
                  _elem47.read(iprot);
                  this.success.add(_elem47);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (VendorItemMapping _iter48 : this.success)
          {
            _iter48.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      } else if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getVendorItemMappings_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getPendingOrdersInventory_args implements org.apache.thrift.TBase<getPendingOrdersInventory_args, getPendingOrdersInventory_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingOrdersInventory_args");

    private static final org.apache.thrift.protocol.TField VENDORID_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorid", org.apache.thrift.protocol.TType.I64, (short)1);

    private long vendorid; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      VENDORID((short)1, "vendorid");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // VENDORID
            return VENDORID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __VENDORID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.VENDORID, new org.apache.thrift.meta_data.FieldMetaData("vendorid", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingOrdersInventory_args.class, metaDataMap);
    }

    public getPendingOrdersInventory_args() {
    }

    public getPendingOrdersInventory_args(
      long vendorid)
    {
      this();
      this.vendorid = vendorid;
      setVendoridIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getPendingOrdersInventory_args(getPendingOrdersInventory_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.vendorid = other.vendorid;
    }

    public getPendingOrdersInventory_args deepCopy() {
      return new getPendingOrdersInventory_args(this);
    }

    @Override
    public void clear() {
      setVendoridIsSet(false);
      this.vendorid = 0;
    }

    public long getVendorid() {
      return this.vendorid;
    }

    public void setVendorid(long vendorid) {
      this.vendorid = vendorid;
      setVendoridIsSet(true);
    }

    public void unsetVendorid() {
      __isset_bit_vector.clear(__VENDORID_ISSET_ID);
    }

    /** Returns true if field vendorid is set (has been assigned a value) and false otherwise */
    public boolean isSetVendorid() {
      return __isset_bit_vector.get(__VENDORID_ISSET_ID);
    }

    public void setVendoridIsSet(boolean value) {
      __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case VENDORID:
        if (value == null) {
          unsetVendorid();
        } else {
          setVendorid((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case VENDORID:
        return Long.valueOf(getVendorid());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case VENDORID:
        return isSetVendorid();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getPendingOrdersInventory_args)
        return this.equals((getPendingOrdersInventory_args)that);
      return false;
    }

    public boolean equals(getPendingOrdersInventory_args that) {
      if (that == null)
        return false;

      boolean this_present_vendorid = true;
      boolean that_present_vendorid = true;
      if (this_present_vendorid || that_present_vendorid) {
        if (!(this_present_vendorid && that_present_vendorid))
          return false;
        if (this.vendorid != that.vendorid)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getPendingOrdersInventory_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getPendingOrdersInventory_args typedOther = (getPendingOrdersInventory_args)other;

      lastComparison = Boolean.valueOf(isSetVendorid()).compareTo(typedOther.isSetVendorid());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetVendorid()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorid, typedOther.vendorid);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // VENDORID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.vendorid = iprot.readI64();
              setVendoridIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(VENDORID_FIELD_DESC);
      oprot.writeI64(this.vendorid);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getPendingOrdersInventory_args(");
      boolean first = true;

      sb.append("vendorid:");
      sb.append(this.vendorid);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getPendingOrdersInventory_result implements org.apache.thrift.TBase<getPendingOrdersInventory_result, getPendingOrdersInventory_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPendingOrdersInventory_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<AvailableAndReservedStock> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AvailableAndReservedStock.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPendingOrdersInventory_result.class, metaDataMap);
    }

    public getPendingOrdersInventory_result() {
    }

    public getPendingOrdersInventory_result(
      List<AvailableAndReservedStock> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getPendingOrdersInventory_result(getPendingOrdersInventory_result other) {
      if (other.isSetSuccess()) {
        List<AvailableAndReservedStock> __this__success = new ArrayList<AvailableAndReservedStock>();
        for (AvailableAndReservedStock other_element : other.success) {
          __this__success.add(new AvailableAndReservedStock(other_element));
        }
        this.success = __this__success;
      }
    }

    public getPendingOrdersInventory_result deepCopy() {
      return new getPendingOrdersInventory_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<AvailableAndReservedStock> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(AvailableAndReservedStock elem) {
      if (this.success == null) {
        this.success = new ArrayList<AvailableAndReservedStock>();
      }
      this.success.add(elem);
    }

    public List<AvailableAndReservedStock> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<AvailableAndReservedStock> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<AvailableAndReservedStock>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getPendingOrdersInventory_result)
        return this.equals((getPendingOrdersInventory_result)that);
      return false;
    }

    public boolean equals(getPendingOrdersInventory_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getPendingOrdersInventory_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getPendingOrdersInventory_result typedOther = (getPendingOrdersInventory_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list49 = iprot.readListBegin();
                this.success = new ArrayList<AvailableAndReservedStock>(_list49.size);
                for (int _i50 = 0; _i50 < _list49.size; ++_i50)
                {
                  AvailableAndReservedStock _elem51; // required
                  _elem51 = new AvailableAndReservedStock();
                  _elem51.read(iprot);
                  this.success.add(_elem51);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (AvailableAndReservedStock _iter52 : this.success)
          {
            _iter52.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getPendingOrdersInventory_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getWarehouses_args implements org.apache.thrift.TBase<getWarehouses_args, getWarehouses_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getWarehouses_args");

    private static final org.apache.thrift.protocol.TField WAREHOUSE_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseType", org.apache.thrift.protocol.TType.I32, (short)1);
    private static final org.apache.thrift.protocol.TField INVENTORY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("inventoryType", org.apache.thrift.protocol.TType.I32, (short)2);
    private static final org.apache.thrift.protocol.TField VENDOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorId", org.apache.thrift.protocol.TType.I64, (short)3);
    private static final org.apache.thrift.protocol.TField BILLING_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("billingWarehouseId", org.apache.thrift.protocol.TType.I64, (short)4);
    private static final org.apache.thrift.protocol.TField SHIPPING_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("shippingWarehouseId", org.apache.thrift.protocol.TType.I64, (short)5);

    private WarehouseType warehouseType; // required
    private InventoryType inventoryType; // required
    private long vendorId; // required
    private long billingWarehouseId; // required
    private long shippingWarehouseId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      /**
       * 
       * @see WarehouseType
       */
      WAREHOUSE_TYPE((short)1, "warehouseType"),
      /**
       * 
       * @see InventoryType
       */
      INVENTORY_TYPE((short)2, "inventoryType"),
      VENDOR_ID((short)3, "vendorId"),
      BILLING_WAREHOUSE_ID((short)4, "billingWarehouseId"),
      SHIPPING_WAREHOUSE_ID((short)5, "shippingWarehouseId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // WAREHOUSE_TYPE
            return WAREHOUSE_TYPE;
          case 2: // INVENTORY_TYPE
            return INVENTORY_TYPE;
          case 3: // VENDOR_ID
            return VENDOR_ID;
          case 4: // BILLING_WAREHOUSE_ID
            return BILLING_WAREHOUSE_ID;
          case 5: // SHIPPING_WAREHOUSE_ID
            return SHIPPING_WAREHOUSE_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __VENDORID_ISSET_ID = 0;
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 1;
    private static final int __SHIPPINGWAREHOUSEID_ISSET_ID = 2;
    private BitSet __isset_bit_vector = new BitSet(3);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.WAREHOUSE_TYPE, new org.apache.thrift.meta_data.FieldMetaData("warehouseType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, WarehouseType.class)));
      tmpMap.put(_Fields.INVENTORY_TYPE, new org.apache.thrift.meta_data.FieldMetaData("inventoryType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, InventoryType.class)));
      tmpMap.put(_Fields.VENDOR_ID, new org.apache.thrift.meta_data.FieldMetaData("vendorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SHIPPING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("shippingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getWarehouses_args.class, metaDataMap);
    }

    public getWarehouses_args() {
    }

    public getWarehouses_args(
      WarehouseType warehouseType,
      InventoryType inventoryType,
      long vendorId,
      long billingWarehouseId,
      long shippingWarehouseId)
    {
      this();
      this.warehouseType = warehouseType;
      this.inventoryType = inventoryType;
      this.vendorId = vendorId;
      setVendorIdIsSet(true);
      this.billingWarehouseId = billingWarehouseId;
      setBillingWarehouseIdIsSet(true);
      this.shippingWarehouseId = shippingWarehouseId;
      setShippingWarehouseIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getWarehouses_args(getWarehouses_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      if (other.isSetWarehouseType()) {
        this.warehouseType = other.warehouseType;
      }
      if (other.isSetInventoryType()) {
        this.inventoryType = other.inventoryType;
      }
      this.vendorId = other.vendorId;
      this.billingWarehouseId = other.billingWarehouseId;
      this.shippingWarehouseId = other.shippingWarehouseId;
    }

    public getWarehouses_args deepCopy() {
      return new getWarehouses_args(this);
    }

    @Override
    public void clear() {
      this.warehouseType = null;
      this.inventoryType = null;
      setVendorIdIsSet(false);
      this.vendorId = 0;
      setBillingWarehouseIdIsSet(false);
      this.billingWarehouseId = 0;
      setShippingWarehouseIdIsSet(false);
      this.shippingWarehouseId = 0;
    }

    /**
     * 
     * @see WarehouseType
     */
    public WarehouseType getWarehouseType() {
      return this.warehouseType;
    }

    /**
     * 
     * @see WarehouseType
     */
    public void setWarehouseType(WarehouseType warehouseType) {
      this.warehouseType = warehouseType;
    }

    public void unsetWarehouseType() {
      this.warehouseType = null;
    }

    /** Returns true if field warehouseType is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouseType() {
      return this.warehouseType != null;
    }

    public void setWarehouseTypeIsSet(boolean value) {
      if (!value) {
        this.warehouseType = null;
      }
    }

    /**
     * 
     * @see InventoryType
     */
    public InventoryType getInventoryType() {
      return this.inventoryType;
    }

    /**
     * 
     * @see InventoryType
     */
    public void setInventoryType(InventoryType inventoryType) {
      this.inventoryType = inventoryType;
    }

    public void unsetInventoryType() {
      this.inventoryType = null;
    }

    /** Returns true if field inventoryType is set (has been assigned a value) and false otherwise */
    public boolean isSetInventoryType() {
      return this.inventoryType != null;
    }

    public void setInventoryTypeIsSet(boolean value) {
      if (!value) {
        this.inventoryType = null;
      }
    }

    public long getVendorId() {
      return this.vendorId;
    }

    public void setVendorId(long vendorId) {
      this.vendorId = vendorId;
      setVendorIdIsSet(true);
    }

    public void unsetVendorId() {
      __isset_bit_vector.clear(__VENDORID_ISSET_ID);
    }

    /** Returns true if field vendorId is set (has been assigned a value) and false otherwise */
    public boolean isSetVendorId() {
      return __isset_bit_vector.get(__VENDORID_ISSET_ID);
    }

    public void setVendorIdIsSet(boolean value) {
      __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
    }

    public long getBillingWarehouseId() {
      return this.billingWarehouseId;
    }

    public void setBillingWarehouseId(long billingWarehouseId) {
      this.billingWarehouseId = billingWarehouseId;
      setBillingWarehouseIdIsSet(true);
    }

    public void unsetBillingWarehouseId() {
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
    }

    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
    public boolean isSetBillingWarehouseId() {
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
    }

    public void setBillingWarehouseIdIsSet(boolean value) {
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
    }

    public long getShippingWarehouseId() {
      return this.shippingWarehouseId;
    }

    public void setShippingWarehouseId(long shippingWarehouseId) {
      this.shippingWarehouseId = shippingWarehouseId;
      setShippingWarehouseIdIsSet(true);
    }

    public void unsetShippingWarehouseId() {
      __isset_bit_vector.clear(__SHIPPINGWAREHOUSEID_ISSET_ID);
    }

    /** Returns true if field shippingWarehouseId is set (has been assigned a value) and false otherwise */
    public boolean isSetShippingWarehouseId() {
      return __isset_bit_vector.get(__SHIPPINGWAREHOUSEID_ISSET_ID);
    }

    public void setShippingWarehouseIdIsSet(boolean value) {
      __isset_bit_vector.set(__SHIPPINGWAREHOUSEID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case WAREHOUSE_TYPE:
        if (value == null) {
          unsetWarehouseType();
        } else {
          setWarehouseType((WarehouseType)value);
        }
        break;

      case INVENTORY_TYPE:
        if (value == null) {
          unsetInventoryType();
        } else {
          setInventoryType((InventoryType)value);
        }
        break;

      case VENDOR_ID:
        if (value == null) {
          unsetVendorId();
        } else {
          setVendorId((Long)value);
        }
        break;

      case BILLING_WAREHOUSE_ID:
        if (value == null) {
          unsetBillingWarehouseId();
        } else {
          setBillingWarehouseId((Long)value);
        }
        break;

      case SHIPPING_WAREHOUSE_ID:
        if (value == null) {
          unsetShippingWarehouseId();
        } else {
          setShippingWarehouseId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case WAREHOUSE_TYPE:
        return getWarehouseType();

      case INVENTORY_TYPE:
        return getInventoryType();

      case VENDOR_ID:
        return Long.valueOf(getVendorId());

      case BILLING_WAREHOUSE_ID:
        return Long.valueOf(getBillingWarehouseId());

      case SHIPPING_WAREHOUSE_ID:
        return Long.valueOf(getShippingWarehouseId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case WAREHOUSE_TYPE:
        return isSetWarehouseType();
      case INVENTORY_TYPE:
        return isSetInventoryType();
      case VENDOR_ID:
        return isSetVendorId();
      case BILLING_WAREHOUSE_ID:
        return isSetBillingWarehouseId();
      case SHIPPING_WAREHOUSE_ID:
        return isSetShippingWarehouseId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getWarehouses_args)
        return this.equals((getWarehouses_args)that);
      return false;
    }

    public boolean equals(getWarehouses_args that) {
      if (that == null)
        return false;

      boolean this_present_warehouseType = true && this.isSetWarehouseType();
      boolean that_present_warehouseType = true && that.isSetWarehouseType();
      if (this_present_warehouseType || that_present_warehouseType) {
        if (!(this_present_warehouseType && that_present_warehouseType))
          return false;
        if (!this.warehouseType.equals(that.warehouseType))
          return false;
      }

      boolean this_present_inventoryType = true && this.isSetInventoryType();
      boolean that_present_inventoryType = true && that.isSetInventoryType();
      if (this_present_inventoryType || that_present_inventoryType) {
        if (!(this_present_inventoryType && that_present_inventoryType))
          return false;
        if (!this.inventoryType.equals(that.inventoryType))
          return false;
      }

      boolean this_present_vendorId = true;
      boolean that_present_vendorId = true;
      if (this_present_vendorId || that_present_vendorId) {
        if (!(this_present_vendorId && that_present_vendorId))
          return false;
        if (this.vendorId != that.vendorId)
          return false;
      }

      boolean this_present_billingWarehouseId = true;
      boolean that_present_billingWarehouseId = true;
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
          return false;
        if (this.billingWarehouseId != that.billingWarehouseId)
          return false;
      }

      boolean this_present_shippingWarehouseId = true;
      boolean that_present_shippingWarehouseId = true;
      if (this_present_shippingWarehouseId || that_present_shippingWarehouseId) {
        if (!(this_present_shippingWarehouseId && that_present_shippingWarehouseId))
          return false;
        if (this.shippingWarehouseId != that.shippingWarehouseId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getWarehouses_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getWarehouses_args typedOther = (getWarehouses_args)other;

      lastComparison = Boolean.valueOf(isSetWarehouseType()).compareTo(typedOther.isSetWarehouseType());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouseType()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseType, typedOther.warehouseType);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetInventoryType()).compareTo(typedOther.isSetInventoryType());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetInventoryType()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryType, typedOther.inventoryType);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetVendorId()).compareTo(typedOther.isSetVendorId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetVendorId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorId, typedOther.vendorId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBillingWarehouseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetShippingWarehouseId()).compareTo(typedOther.isSetShippingWarehouseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetShippingWarehouseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.shippingWarehouseId, typedOther.shippingWarehouseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // WAREHOUSE_TYPE
            if (field.type == org.apache.thrift.protocol.TType.I32) {
              this.warehouseType = WarehouseType.findByValue(iprot.readI32());
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // INVENTORY_TYPE
            if (field.type == org.apache.thrift.protocol.TType.I32) {
              this.inventoryType = InventoryType.findByValue(iprot.readI32());
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // VENDOR_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.vendorId = iprot.readI64();
              setVendorIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // BILLING_WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.billingWarehouseId = iprot.readI64();
              setBillingWarehouseIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 5: // SHIPPING_WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.shippingWarehouseId = iprot.readI64();
              setShippingWarehouseIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.warehouseType != null) {
        oprot.writeFieldBegin(WAREHOUSE_TYPE_FIELD_DESC);
        oprot.writeI32(this.warehouseType.getValue());
        oprot.writeFieldEnd();
      }
      if (this.inventoryType != null) {
        oprot.writeFieldBegin(INVENTORY_TYPE_FIELD_DESC);
        oprot.writeI32(this.inventoryType.getValue());
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
      oprot.writeI64(this.vendorId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.billingWarehouseId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SHIPPING_WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.shippingWarehouseId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getWarehouses_args(");
      boolean first = true;

      sb.append("warehouseType:");
      if (this.warehouseType == null) {
        sb.append("null");
      } else {
        sb.append(this.warehouseType);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("inventoryType:");
      if (this.inventoryType == null) {
        sb.append("null");
      } else {
        sb.append(this.inventoryType);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("vendorId:");
      sb.append(this.vendorId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("billingWarehouseId:");
      sb.append(this.billingWarehouseId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("shippingWarehouseId:");
      sb.append(this.shippingWarehouseId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getWarehouses_result implements org.apache.thrift.TBase<getWarehouses_result, getWarehouses_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getWarehouses_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<Warehouse> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Warehouse.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getWarehouses_result.class, metaDataMap);
    }

    public getWarehouses_result() {
    }

    public getWarehouses_result(
      List<Warehouse> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getWarehouses_result(getWarehouses_result other) {
      if (other.isSetSuccess()) {
        List<Warehouse> __this__success = new ArrayList<Warehouse>();
        for (Warehouse other_element : other.success) {
          __this__success.add(new Warehouse(other_element));
        }
        this.success = __this__success;
      }
    }

    public getWarehouses_result deepCopy() {
      return new getWarehouses_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Warehouse> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(Warehouse elem) {
      if (this.success == null) {
        this.success = new ArrayList<Warehouse>();
      }
      this.success.add(elem);
    }

    public List<Warehouse> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Warehouse> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Warehouse>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getWarehouses_result)
        return this.equals((getWarehouses_result)that);
      return false;
    }

    public boolean equals(getWarehouses_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getWarehouses_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getWarehouses_result typedOther = (getWarehouses_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list53 = iprot.readListBegin();
                this.success = new ArrayList<Warehouse>(_list53.size);
                for (int _i54 = 0; _i54 < _list53.size; ++_i54)
                {
                  Warehouse _elem55; // required
                  _elem55 = new Warehouse();
                  _elem55.read(iprot);
                  this.success.add(_elem55);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (Warehouse _iter56 : this.success)
          {
            _iter56.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getWarehouses_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class resetAvailability_args implements org.apache.thrift.TBase<resetAvailability_args, resetAvailability_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("resetAvailability_args");

    private static final org.apache.thrift.protocol.TField ITEM_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("itemKey", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField VENDOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorId", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.I64, (short)3);
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)4);

    private String itemKey; // required
    private long vendorId; // required
    private long quantity; // required
    private long warehouseId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_KEY((short)1, "itemKey"),
      VENDOR_ID((short)2, "vendorId"),
      QUANTITY((short)3, "quantity"),
      WAREHOUSE_ID((short)4, "warehouseId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_KEY
            return ITEM_KEY;
          case 2: // VENDOR_ID
            return VENDOR_ID;
          case 3: // QUANTITY
            return QUANTITY;
          case 4: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __VENDORID_ISSET_ID = 0;
    private static final int __QUANTITY_ISSET_ID = 1;
    private static final int __WAREHOUSEID_ISSET_ID = 2;
    private BitSet __isset_bit_vector = new BitSet(3);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_KEY, new org.apache.thrift.meta_data.FieldMetaData("itemKey", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.VENDOR_ID, new org.apache.thrift.meta_data.FieldMetaData("vendorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(resetAvailability_args.class, metaDataMap);
    }

    public resetAvailability_args() {
    }

    public resetAvailability_args(
      String itemKey,
      long vendorId,
      long quantity,
      long warehouseId)
    {
      this();
      this.itemKey = itemKey;
      this.vendorId = vendorId;
      setVendorIdIsSet(true);
      this.quantity = quantity;
      setQuantityIsSet(true);
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public resetAvailability_args(resetAvailability_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      if (other.isSetItemKey()) {
        this.itemKey = other.itemKey;
      }
      this.vendorId = other.vendorId;
      this.quantity = other.quantity;
      this.warehouseId = other.warehouseId;
    }

    public resetAvailability_args deepCopy() {
      return new resetAvailability_args(this);
    }

    @Override
    public void clear() {
      this.itemKey = null;
      setVendorIdIsSet(false);
      this.vendorId = 0;
      setQuantityIsSet(false);
      this.quantity = 0;
      setWarehouseIdIsSet(false);
      this.warehouseId = 0;
    }

    public String getItemKey() {
      return this.itemKey;
    }

    public void setItemKey(String itemKey) {
      this.itemKey = itemKey;
    }

    public void unsetItemKey() {
      this.itemKey = null;
    }

    /** Returns true if field itemKey is set (has been assigned a value) and false otherwise */
    public boolean isSetItemKey() {
      return this.itemKey != null;
    }

    public void setItemKeyIsSet(boolean value) {
      if (!value) {
        this.itemKey = null;
      }
    }

    public long getVendorId() {
      return this.vendorId;
    }

    public void setVendorId(long vendorId) {
      this.vendorId = vendorId;
      setVendorIdIsSet(true);
    }

    public void unsetVendorId() {
      __isset_bit_vector.clear(__VENDORID_ISSET_ID);
    }

    /** Returns true if field vendorId is set (has been assigned a value) and false otherwise */
    public boolean isSetVendorId() {
      return __isset_bit_vector.get(__VENDORID_ISSET_ID);
    }

    public void setVendorIdIsSet(boolean value) {
      __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
    }

    public long getQuantity() {
      return this.quantity;
    }

    public void setQuantity(long quantity) {
      this.quantity = quantity;
      setQuantityIsSet(true);
    }

    public void unsetQuantity() {
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
    }

    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
    public boolean isSetQuantity() {
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
    }

    public void setQuantityIsSet(boolean value) {
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
    }

    public long getWarehouseId() {
      return this.warehouseId;
    }

    public void setWarehouseId(long warehouseId) {
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    public void unsetWarehouseId() {
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
    }

    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouseId() {
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
    }

    public void setWarehouseIdIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_KEY:
        if (value == null) {
          unsetItemKey();
        } else {
          setItemKey((String)value);
        }
        break;

      case VENDOR_ID:
        if (value == null) {
          unsetVendorId();
        } else {
          setVendorId((Long)value);
        }
        break;

      case QUANTITY:
        if (value == null) {
          unsetQuantity();
        } else {
          setQuantity((Long)value);
        }
        break;

      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouseId();
        } else {
          setWarehouseId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_KEY:
        return getItemKey();

      case VENDOR_ID:
        return Long.valueOf(getVendorId());

      case QUANTITY:
        return Long.valueOf(getQuantity());

      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouseId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_KEY:
        return isSetItemKey();
      case VENDOR_ID:
        return isSetVendorId();
      case QUANTITY:
        return isSetQuantity();
      case WAREHOUSE_ID:
        return isSetWarehouseId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof resetAvailability_args)
        return this.equals((resetAvailability_args)that);
      return false;
    }

    public boolean equals(resetAvailability_args that) {
      if (that == null)
        return false;

      boolean this_present_itemKey = true && this.isSetItemKey();
      boolean that_present_itemKey = true && that.isSetItemKey();
      if (this_present_itemKey || that_present_itemKey) {
        if (!(this_present_itemKey && that_present_itemKey))
          return false;
        if (!this.itemKey.equals(that.itemKey))
          return false;
      }

      boolean this_present_vendorId = true;
      boolean that_present_vendorId = true;
      if (this_present_vendorId || that_present_vendorId) {
        if (!(this_present_vendorId && that_present_vendorId))
          return false;
        if (this.vendorId != that.vendorId)
          return false;
      }

      boolean this_present_quantity = true;
      boolean that_present_quantity = true;
      if (this_present_quantity || that_present_quantity) {
        if (!(this_present_quantity && that_present_quantity))
          return false;
        if (this.quantity != that.quantity)
          return false;
      }

      boolean this_present_warehouseId = true;
      boolean that_present_warehouseId = true;
      if (this_present_warehouseId || that_present_warehouseId) {
        if (!(this_present_warehouseId && that_present_warehouseId))
          return false;
        if (this.warehouseId != that.warehouseId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(resetAvailability_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      resetAvailability_args typedOther = (resetAvailability_args)other;

      lastComparison = Boolean.valueOf(isSetItemKey()).compareTo(typedOther.isSetItemKey());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemKey()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemKey, typedOther.itemKey);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetVendorId()).compareTo(typedOther.isSetVendorId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetVendorId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorId, typedOther.vendorId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQuantity()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_KEY
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.itemKey = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // VENDOR_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.vendorId = iprot.readI64();
              setVendorIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // QUANTITY
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.quantity = iprot.readI64();
              setQuantityIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouseId = iprot.readI64();
              setWarehouseIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.itemKey != null) {
        oprot.writeFieldBegin(ITEM_KEY_FIELD_DESC);
        oprot.writeString(this.itemKey);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
      oprot.writeI64(this.vendorId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
      oprot.writeI64(this.quantity);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouseId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("resetAvailability_args(");
      boolean first = true;

      sb.append("itemKey:");
      if (this.itemKey == null) {
        sb.append("null");
      } else {
        sb.append(this.itemKey);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("vendorId:");
      sb.append(this.vendorId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("quantity:");
      sb.append(this.quantity);
      first = false;
      if (!first) sb.append(", ");
      sb.append("warehouseId:");
      sb.append(this.warehouseId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class resetAvailability_result implements org.apache.thrift.TBase<resetAvailability_result, resetAvailability_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("resetAvailability_result");

    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(resetAvailability_result.class, metaDataMap);
    }

    public resetAvailability_result() {
    }

    public resetAvailability_result(
      InventoryServiceException cex)
    {
      this();
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public resetAvailability_result(resetAvailability_result other) {
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public resetAvailability_result deepCopy() {
      return new resetAvailability_result(this);
    }

    @Override
    public void clear() {
      this.cex = null;
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof resetAvailability_result)
        return this.equals((resetAvailability_result)that);
      return false;
    }

    public boolean equals(resetAvailability_result that) {
      if (that == null)
        return false;

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(resetAvailability_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      resetAvailability_result typedOther = (resetAvailability_result)other;

      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("resetAvailability_result(");
      boolean first = true;

      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class resetAvailabilityForWarehouse_args implements org.apache.thrift.TBase<resetAvailabilityForWarehouse_args, resetAvailabilityForWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("resetAvailabilityForWarehouse_args");

    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long warehouseId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      WAREHOUSE_ID((short)1, "warehouseId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __WAREHOUSEID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(resetAvailabilityForWarehouse_args.class, metaDataMap);
    }

    public resetAvailabilityForWarehouse_args() {
    }

    public resetAvailabilityForWarehouse_args(
      long warehouseId)
    {
      this();
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public resetAvailabilityForWarehouse_args(resetAvailabilityForWarehouse_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.warehouseId = other.warehouseId;
    }

    public resetAvailabilityForWarehouse_args deepCopy() {
      return new resetAvailabilityForWarehouse_args(this);
    }

    @Override
    public void clear() {
      setWarehouseIdIsSet(false);
      this.warehouseId = 0;
    }

    public long getWarehouseId() {
      return this.warehouseId;
    }

    public void setWarehouseId(long warehouseId) {
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    public void unsetWarehouseId() {
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
    }

    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouseId() {
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
    }

    public void setWarehouseIdIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouseId();
        } else {
          setWarehouseId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouseId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case WAREHOUSE_ID:
        return isSetWarehouseId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof resetAvailabilityForWarehouse_args)
        return this.equals((resetAvailabilityForWarehouse_args)that);
      return false;
    }

    public boolean equals(resetAvailabilityForWarehouse_args that) {
      if (that == null)
        return false;

      boolean this_present_warehouseId = true;
      boolean that_present_warehouseId = true;
      if (this_present_warehouseId || that_present_warehouseId) {
        if (!(this_present_warehouseId && that_present_warehouseId))
          return false;
        if (this.warehouseId != that.warehouseId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(resetAvailabilityForWarehouse_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      resetAvailabilityForWarehouse_args typedOther = (resetAvailabilityForWarehouse_args)other;

      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouseId = iprot.readI64();
              setWarehouseIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouseId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("resetAvailabilityForWarehouse_args(");
      boolean first = true;

      sb.append("warehouseId:");
      sb.append(this.warehouseId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class resetAvailabilityForWarehouse_result implements org.apache.thrift.TBase<resetAvailabilityForWarehouse_result, resetAvailabilityForWarehouse_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("resetAvailabilityForWarehouse_result");

    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(resetAvailabilityForWarehouse_result.class, metaDataMap);
    }

    public resetAvailabilityForWarehouse_result() {
    }

    public resetAvailabilityForWarehouse_result(
      InventoryServiceException cex)
    {
      this();
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public resetAvailabilityForWarehouse_result(resetAvailabilityForWarehouse_result other) {
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public resetAvailabilityForWarehouse_result deepCopy() {
      return new resetAvailabilityForWarehouse_result(this);
    }

    @Override
    public void clear() {
      this.cex = null;
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof resetAvailabilityForWarehouse_result)
        return this.equals((resetAvailabilityForWarehouse_result)that);
      return false;
    }

    public boolean equals(resetAvailabilityForWarehouse_result that) {
      if (that == null)
        return false;

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(resetAvailabilityForWarehouse_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      resetAvailabilityForWarehouse_result typedOther = (resetAvailabilityForWarehouse_result)other;

      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("resetAvailabilityForWarehouse_result(");
      boolean first = true;

      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemKeysToBeProcessed_args implements org.apache.thrift.TBase<getItemKeysToBeProcessed_args, getItemKeysToBeProcessed_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemKeysToBeProcessed_args");

    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long warehouseId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      WAREHOUSE_ID((short)1, "warehouseId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __WAREHOUSEID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemKeysToBeProcessed_args.class, metaDataMap);
    }

    public getItemKeysToBeProcessed_args() {
    }

    public getItemKeysToBeProcessed_args(
      long warehouseId)
    {
      this();
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemKeysToBeProcessed_args(getItemKeysToBeProcessed_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.warehouseId = other.warehouseId;
    }

    public getItemKeysToBeProcessed_args deepCopy() {
      return new getItemKeysToBeProcessed_args(this);
    }

    @Override
    public void clear() {
      setWarehouseIdIsSet(false);
      this.warehouseId = 0;
    }

    public long getWarehouseId() {
      return this.warehouseId;
    }

    public void setWarehouseId(long warehouseId) {
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    public void unsetWarehouseId() {
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
    }

    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouseId() {
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
    }

    public void setWarehouseIdIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouseId();
        } else {
          setWarehouseId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouseId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case WAREHOUSE_ID:
        return isSetWarehouseId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemKeysToBeProcessed_args)
        return this.equals((getItemKeysToBeProcessed_args)that);
      return false;
    }

    public boolean equals(getItemKeysToBeProcessed_args that) {
      if (that == null)
        return false;

      boolean this_present_warehouseId = true;
      boolean that_present_warehouseId = true;
      if (this_present_warehouseId || that_present_warehouseId) {
        if (!(this_present_warehouseId && that_present_warehouseId))
          return false;
        if (this.warehouseId != that.warehouseId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemKeysToBeProcessed_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemKeysToBeProcessed_args typedOther = (getItemKeysToBeProcessed_args)other;

      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouseId = iprot.readI64();
              setWarehouseIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouseId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemKeysToBeProcessed_args(");
      boolean first = true;

      sb.append("warehouseId:");
      sb.append(this.warehouseId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemKeysToBeProcessed_result implements org.apache.thrift.TBase<getItemKeysToBeProcessed_result, getItemKeysToBeProcessed_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemKeysToBeProcessed_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<String> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemKeysToBeProcessed_result.class, metaDataMap);
    }

    public getItemKeysToBeProcessed_result() {
    }

    public getItemKeysToBeProcessed_result(
      List<String> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemKeysToBeProcessed_result(getItemKeysToBeProcessed_result other) {
      if (other.isSetSuccess()) {
        List<String> __this__success = new ArrayList<String>();
        for (String other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
    }

    public getItemKeysToBeProcessed_result deepCopy() {
      return new getItemKeysToBeProcessed_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<String> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(String elem) {
      if (this.success == null) {
        this.success = new ArrayList<String>();
      }
      this.success.add(elem);
    }

    public List<String> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<String> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<String>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemKeysToBeProcessed_result)
        return this.equals((getItemKeysToBeProcessed_result)that);
      return false;
    }

    public boolean equals(getItemKeysToBeProcessed_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemKeysToBeProcessed_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemKeysToBeProcessed_result typedOther = (getItemKeysToBeProcessed_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list57 = iprot.readListBegin();
                this.success = new ArrayList<String>(_list57.size);
                for (int _i58 = 0; _i58 < _list57.size; ++_i58)
                {
                  String _elem59; // required
                  _elem59 = iprot.readString();
                  this.success.add(_elem59);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
          for (String _iter60 : this.success)
          {
            oprot.writeString(_iter60);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemKeysToBeProcessed_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class markMissedInventoryUpdatesAsProcessed_args implements org.apache.thrift.TBase<markMissedInventoryUpdatesAsProcessed_args, markMissedInventoryUpdatesAsProcessed_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markMissedInventoryUpdatesAsProcessed_args");

    private static final org.apache.thrift.protocol.TField ITEM_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("itemKey", org.apache.thrift.protocol.TType.STRING, (short)1);
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)2);

    private String itemKey; // required
    private long warehouseId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_KEY((short)1, "itemKey"),
      WAREHOUSE_ID((short)2, "warehouseId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_KEY
            return ITEM_KEY;
          case 2: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __WAREHOUSEID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_KEY, new org.apache.thrift.meta_data.FieldMetaData("itemKey", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markMissedInventoryUpdatesAsProcessed_args.class, metaDataMap);
    }

    public markMissedInventoryUpdatesAsProcessed_args() {
    }

    public markMissedInventoryUpdatesAsProcessed_args(
      String itemKey,
      long warehouseId)
    {
      this();
      this.itemKey = itemKey;
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public markMissedInventoryUpdatesAsProcessed_args(markMissedInventoryUpdatesAsProcessed_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      if (other.isSetItemKey()) {
        this.itemKey = other.itemKey;
      }
      this.warehouseId = other.warehouseId;
    }

    public markMissedInventoryUpdatesAsProcessed_args deepCopy() {
      return new markMissedInventoryUpdatesAsProcessed_args(this);
    }

    @Override
    public void clear() {
      this.itemKey = null;
      setWarehouseIdIsSet(false);
      this.warehouseId = 0;
    }

    public String getItemKey() {
      return this.itemKey;
    }

    public void setItemKey(String itemKey) {
      this.itemKey = itemKey;
    }

    public void unsetItemKey() {
      this.itemKey = null;
    }

    /** Returns true if field itemKey is set (has been assigned a value) and false otherwise */
    public boolean isSetItemKey() {
      return this.itemKey != null;
    }

    public void setItemKeyIsSet(boolean value) {
      if (!value) {
        this.itemKey = null;
      }
    }

    public long getWarehouseId() {
      return this.warehouseId;
    }

    public void setWarehouseId(long warehouseId) {
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    public void unsetWarehouseId() {
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
    }

    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouseId() {
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
    }

    public void setWarehouseIdIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_KEY:
        if (value == null) {
          unsetItemKey();
        } else {
          setItemKey((String)value);
        }
        break;

      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouseId();
        } else {
          setWarehouseId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_KEY:
        return getItemKey();

      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouseId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_KEY:
        return isSetItemKey();
      case WAREHOUSE_ID:
        return isSetWarehouseId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof markMissedInventoryUpdatesAsProcessed_args)
        return this.equals((markMissedInventoryUpdatesAsProcessed_args)that);
      return false;
    }

    public boolean equals(markMissedInventoryUpdatesAsProcessed_args that) {
      if (that == null)
        return false;

      boolean this_present_itemKey = true && this.isSetItemKey();
      boolean that_present_itemKey = true && that.isSetItemKey();
      if (this_present_itemKey || that_present_itemKey) {
        if (!(this_present_itemKey && that_present_itemKey))
          return false;
        if (!this.itemKey.equals(that.itemKey))
          return false;
      }

      boolean this_present_warehouseId = true;
      boolean that_present_warehouseId = true;
      if (this_present_warehouseId || that_present_warehouseId) {
        if (!(this_present_warehouseId && that_present_warehouseId))
          return false;
        if (this.warehouseId != that.warehouseId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(markMissedInventoryUpdatesAsProcessed_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      markMissedInventoryUpdatesAsProcessed_args typedOther = (markMissedInventoryUpdatesAsProcessed_args)other;

      lastComparison = Boolean.valueOf(isSetItemKey()).compareTo(typedOther.isSetItemKey());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemKey()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemKey, typedOther.itemKey);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_KEY
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.itemKey = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouseId = iprot.readI64();
              setWarehouseIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.itemKey != null) {
        oprot.writeFieldBegin(ITEM_KEY_FIELD_DESC);
        oprot.writeString(this.itemKey);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouseId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("markMissedInventoryUpdatesAsProcessed_args(");
      boolean first = true;

      sb.append("itemKey:");
      if (this.itemKey == null) {
        sb.append("null");
      } else {
        sb.append(this.itemKey);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("warehouseId:");
      sb.append(this.warehouseId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class markMissedInventoryUpdatesAsProcessed_result implements org.apache.thrift.TBase<markMissedInventoryUpdatesAsProcessed_result, markMissedInventoryUpdatesAsProcessed_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markMissedInventoryUpdatesAsProcessed_result");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markMissedInventoryUpdatesAsProcessed_result.class, metaDataMap);
    }

    public markMissedInventoryUpdatesAsProcessed_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public markMissedInventoryUpdatesAsProcessed_result(markMissedInventoryUpdatesAsProcessed_result other) {
    }

    public markMissedInventoryUpdatesAsProcessed_result deepCopy() {
      return new markMissedInventoryUpdatesAsProcessed_result(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof markMissedInventoryUpdatesAsProcessed_result)
        return this.equals((markMissedInventoryUpdatesAsProcessed_result)that);
      return false;
    }

    public boolean equals(markMissedInventoryUpdatesAsProcessed_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(markMissedInventoryUpdatesAsProcessed_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      markMissedInventoryUpdatesAsProcessed_result typedOther = (markMissedInventoryUpdatesAsProcessed_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("markMissedInventoryUpdatesAsProcessed_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getIgnoredItemKeys_args implements org.apache.thrift.TBase<getIgnoredItemKeys_args, getIgnoredItemKeys_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getIgnoredItemKeys_args");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getIgnoredItemKeys_args.class, metaDataMap);
    }

    public getIgnoredItemKeys_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getIgnoredItemKeys_args(getIgnoredItemKeys_args other) {
    }

    public getIgnoredItemKeys_args deepCopy() {
      return new getIgnoredItemKeys_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getIgnoredItemKeys_args)
        return this.equals((getIgnoredItemKeys_args)that);
      return false;
    }

    public boolean equals(getIgnoredItemKeys_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getIgnoredItemKeys_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getIgnoredItemKeys_args typedOther = (getIgnoredItemKeys_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getIgnoredItemKeys_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getIgnoredItemKeys_result implements org.apache.thrift.TBase<getIgnoredItemKeys_result, getIgnoredItemKeys_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getIgnoredItemKeys_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);

    private Map<String,Map<Long,Long>> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING), 
              new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
                  new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), 
                  new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getIgnoredItemKeys_result.class, metaDataMap);
    }

    public getIgnoredItemKeys_result() {
    }

    public getIgnoredItemKeys_result(
      Map<String,Map<Long,Long>> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getIgnoredItemKeys_result(getIgnoredItemKeys_result other) {
      if (other.isSetSuccess()) {
        Map<String,Map<Long,Long>> __this__success = new HashMap<String,Map<Long,Long>>();
        for (Map.Entry<String, Map<Long,Long>> other_element : other.success.entrySet()) {

          String other_element_key = other_element.getKey();
          Map<Long,Long> other_element_value = other_element.getValue();

          String __this__success_copy_key = other_element_key;

          Map<Long,Long> __this__success_copy_value = new HashMap<Long,Long>();
          for (Map.Entry<Long, Long> other_element_value_element : other_element_value.entrySet()) {

            Long other_element_value_element_key = other_element_value_element.getKey();
            Long other_element_value_element_value = other_element_value_element.getValue();

            Long __this__success_copy_value_copy_key = other_element_value_element_key;

            Long __this__success_copy_value_copy_value = other_element_value_element_value;

            __this__success_copy_value.put(__this__success_copy_value_copy_key, __this__success_copy_value_copy_value);
          }

          __this__success.put(__this__success_copy_key, __this__success_copy_value);
        }
        this.success = __this__success;
      }
    }

    public getIgnoredItemKeys_result deepCopy() {
      return new getIgnoredItemKeys_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public void putToSuccess(String key, Map<Long,Long> val) {
      if (this.success == null) {
        this.success = new HashMap<String,Map<Long,Long>>();
      }
      this.success.put(key, val);
    }

    public Map<String,Map<Long,Long>> getSuccess() {
      return this.success;
    }

    public void setSuccess(Map<String,Map<Long,Long>> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Map<String,Map<Long,Long>>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getIgnoredItemKeys_result)
        return this.equals((getIgnoredItemKeys_result)that);
      return false;
    }

    public boolean equals(getIgnoredItemKeys_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getIgnoredItemKeys_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getIgnoredItemKeys_result typedOther = (getIgnoredItemKeys_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map61 = iprot.readMapBegin();
                this.success = new HashMap<String,Map<Long,Long>>(2*_map61.size);
                for (int _i62 = 0; _i62 < _map61.size; ++_i62)
                {
                  String _key63; // required
                  Map<Long,Long> _val64; // required
                  _key63 = iprot.readString();
                  {
                    org.apache.thrift.protocol.TMap _map65 = iprot.readMapBegin();
                    _val64 = new HashMap<Long,Long>(2*_map65.size);
                    for (int _i66 = 0; _i66 < _map65.size; ++_i66)
                    {
                      long _key67; // required
                      long _val68; // required
                      _key67 = iprot.readI64();
                      _val68 = iprot.readI64();
                      _val64.put(_key67, _val68);
                    }
                    iprot.readMapEnd();
                  }
                  this.success.put(_key63, _val64);
                }
                iprot.readMapEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.MAP, this.success.size()));
          for (Map.Entry<String, Map<Long,Long>> _iter69 : this.success.entrySet())
          {
            oprot.writeString(_iter69.getKey());
            {
              oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.I64, _iter69.getValue().size()));
              for (Map.Entry<Long, Long> _iter70 : _iter69.getValue().entrySet())
              {
                oprot.writeI64(_iter70.getKey());
                oprot.writeI64(_iter70.getValue());
              }
              oprot.writeMapEnd();
            }
          }
          oprot.writeMapEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getIgnoredItemKeys_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addBadInventory_args implements org.apache.thrift.TBase<addBadInventory_args, addBadInventory_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addBadInventory_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.I64, (short)3);

    private long itemId; // required
    private long warehouseId; // required
    private long quantity; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "itemId"),
      WAREHOUSE_ID((short)2, "warehouseId"),
      QUANTITY((short)3, "quantity");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          case 3: // QUANTITY
            return QUANTITY;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEMID_ISSET_ID = 0;
    private static final int __WAREHOUSEID_ISSET_ID = 1;
    private static final int __QUANTITY_ISSET_ID = 2;
    private BitSet __isset_bit_vector = new BitSet(3);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addBadInventory_args.class, metaDataMap);
    }

    public addBadInventory_args() {
    }

    public addBadInventory_args(
      long itemId,
      long warehouseId,
      long quantity)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
      this.quantity = quantity;
      setQuantityIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addBadInventory_args(addBadInventory_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
      this.warehouseId = other.warehouseId;
      this.quantity = other.quantity;
    }

    public addBadInventory_args deepCopy() {
      return new addBadInventory_args(this);
    }

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
      setWarehouseIdIsSet(false);
      this.warehouseId = 0;
      setQuantityIsSet(false);
      this.quantity = 0;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public long getWarehouseId() {
      return this.warehouseId;
    }

    public void setWarehouseId(long warehouseId) {
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    public void unsetWarehouseId() {
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
    }

    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouseId() {
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
    }

    public void setWarehouseIdIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
    }

    public long getQuantity() {
      return this.quantity;
    }

    public void setQuantity(long quantity) {
      this.quantity = quantity;
      setQuantityIsSet(true);
    }

    public void unsetQuantity() {
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
    }

    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
    public boolean isSetQuantity() {
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
    }

    public void setQuantityIsSet(boolean value) {
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouseId();
        } else {
          setWarehouseId((Long)value);
        }
        break;

      case QUANTITY:
        if (value == null) {
          unsetQuantity();
        } else {
          setQuantity((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItemId());

      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouseId());

      case QUANTITY:
        return Long.valueOf(getQuantity());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItemId();
      case WAREHOUSE_ID:
        return isSetWarehouseId();
      case QUANTITY:
        return isSetQuantity();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addBadInventory_args)
        return this.equals((addBadInventory_args)that);
      return false;
    }

    public boolean equals(addBadInventory_args that) {
      if (that == null)
        return false;

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      boolean this_present_warehouseId = true;
      boolean that_present_warehouseId = true;
      if (this_present_warehouseId || that_present_warehouseId) {
        if (!(this_present_warehouseId && that_present_warehouseId))
          return false;
        if (this.warehouseId != that.warehouseId)
          return false;
      }

      boolean this_present_quantity = true;
      boolean that_present_quantity = true;
      if (this_present_quantity || that_present_quantity) {
        if (!(this_present_quantity && that_present_quantity))
          return false;
        if (this.quantity != that.quantity)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addBadInventory_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addBadInventory_args typedOther = (addBadInventory_args)other;

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetQuantity()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouseId = iprot.readI64();
              setWarehouseIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // QUANTITY
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.quantity = iprot.readI64();
              setQuantityIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouseId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
      oprot.writeI64(this.quantity);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addBadInventory_args(");
      boolean first = true;

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("warehouseId:");
      sb.append(this.warehouseId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("quantity:");
      sb.append(this.quantity);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addBadInventory_result implements org.apache.thrift.TBase<addBadInventory_result, addBadInventory_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addBadInventory_result");

    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addBadInventory_result.class, metaDataMap);
    }

    public addBadInventory_result() {
    }

    public addBadInventory_result(
      InventoryServiceException cex)
    {
      this();
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addBadInventory_result(addBadInventory_result other) {
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public addBadInventory_result deepCopy() {
      return new addBadInventory_result(this);
    }

    @Override
    public void clear() {
      this.cex = null;
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addBadInventory_result)
        return this.equals((addBadInventory_result)that);
      return false;
    }

    public boolean equals(addBadInventory_result that) {
      if (that == null)
        return false;

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addBadInventory_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addBadInventory_result typedOther = (addBadInventory_result)other;

      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addBadInventory_result(");
      boolean first = true;

      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getShippingLocations_args implements org.apache.thrift.TBase<getShippingLocations_args, getShippingLocations_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getShippingLocations_args");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getShippingLocations_args.class, metaDataMap);
    }

    public getShippingLocations_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getShippingLocations_args(getShippingLocations_args other) {
    }

    public getShippingLocations_args deepCopy() {
      return new getShippingLocations_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getShippingLocations_args)
        return this.equals((getShippingLocations_args)that);
      return false;
    }

    public boolean equals(getShippingLocations_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getShippingLocations_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getShippingLocations_args typedOther = (getShippingLocations_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getShippingLocations_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getShippingLocations_result implements org.apache.thrift.TBase<getShippingLocations_result, getShippingLocations_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getShippingLocations_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<Warehouse> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Warehouse.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getShippingLocations_result.class, metaDataMap);
    }

    public getShippingLocations_result() {
    }

    public getShippingLocations_result(
      List<Warehouse> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getShippingLocations_result(getShippingLocations_result other) {
      if (other.isSetSuccess()) {
        List<Warehouse> __this__success = new ArrayList<Warehouse>();
        for (Warehouse other_element : other.success) {
          __this__success.add(new Warehouse(other_element));
        }
        this.success = __this__success;
      }
    }

    public getShippingLocations_result deepCopy() {
      return new getShippingLocations_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Warehouse> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(Warehouse elem) {
      if (this.success == null) {
        this.success = new ArrayList<Warehouse>();
      }
      this.success.add(elem);
    }

    public List<Warehouse> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Warehouse> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Warehouse>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getShippingLocations_result)
        return this.equals((getShippingLocations_result)that);
      return false;
    }

    public boolean equals(getShippingLocations_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getShippingLocations_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getShippingLocations_result typedOther = (getShippingLocations_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list71 = iprot.readListBegin();
                this.success = new ArrayList<Warehouse>(_list71.size);
                for (int _i72 = 0; _i72 < _list71.size; ++_i72)
                {
                  Warehouse _elem73; // required
                  _elem73 = new Warehouse();
                  _elem73.read(iprot);
                  this.success.add(_elem73);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (Warehouse _iter74 : this.success)
          {
            _iter74.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getShippingLocations_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllVendorItemMappings_args implements org.apache.thrift.TBase<getAllVendorItemMappings_args, getAllVendorItemMappings_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllVendorItemMappings_args");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllVendorItemMappings_args.class, metaDataMap);
    }

    public getAllVendorItemMappings_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllVendorItemMappings_args(getAllVendorItemMappings_args other) {
    }

    public getAllVendorItemMappings_args deepCopy() {
      return new getAllVendorItemMappings_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllVendorItemMappings_args)
        return this.equals((getAllVendorItemMappings_args)that);
      return false;
    }

    public boolean equals(getAllVendorItemMappings_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllVendorItemMappings_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllVendorItemMappings_args typedOther = (getAllVendorItemMappings_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllVendorItemMappings_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllVendorItemMappings_result implements org.apache.thrift.TBase<getAllVendorItemMappings_result, getAllVendorItemMappings_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllVendorItemMappings_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<VendorItemMapping> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, VendorItemMapping.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllVendorItemMappings_result.class, metaDataMap);
    }

    public getAllVendorItemMappings_result() {
    }

    public getAllVendorItemMappings_result(
      List<VendorItemMapping> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllVendorItemMappings_result(getAllVendorItemMappings_result other) {
      if (other.isSetSuccess()) {
        List<VendorItemMapping> __this__success = new ArrayList<VendorItemMapping>();
        for (VendorItemMapping other_element : other.success) {
          __this__success.add(new VendorItemMapping(other_element));
        }
        this.success = __this__success;
      }
    }

    public getAllVendorItemMappings_result deepCopy() {
      return new getAllVendorItemMappings_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<VendorItemMapping> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(VendorItemMapping elem) {
      if (this.success == null) {
        this.success = new ArrayList<VendorItemMapping>();
      }
      this.success.add(elem);
    }

    public List<VendorItemMapping> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<VendorItemMapping> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<VendorItemMapping>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllVendorItemMappings_result)
        return this.equals((getAllVendorItemMappings_result)that);
      return false;
    }

    public boolean equals(getAllVendorItemMappings_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllVendorItemMappings_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllVendorItemMappings_result typedOther = (getAllVendorItemMappings_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list75 = iprot.readListBegin();
                this.success = new ArrayList<VendorItemMapping>(_list75.size);
                for (int _i76 = 0; _i76 < _list75.size; ++_i76)
                {
                  VendorItemMapping _elem77; // required
                  _elem77 = new VendorItemMapping();
                  _elem77.read(iprot);
                  this.success.add(_elem77);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (VendorItemMapping _iter78 : this.success)
          {
            _iter78.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllVendorItemMappings_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getInventorySnapshot_args implements org.apache.thrift.TBase<getInventorySnapshot_args, getInventorySnapshot_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventorySnapshot_args");

    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long warehouseId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      WAREHOUSE_ID((short)1, "warehouseId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __WAREHOUSEID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventorySnapshot_args.class, metaDataMap);
    }

    public getInventorySnapshot_args() {
    }

    public getInventorySnapshot_args(
      long warehouseId)
    {
      this();
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getInventorySnapshot_args(getInventorySnapshot_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.warehouseId = other.warehouseId;
    }

    public getInventorySnapshot_args deepCopy() {
      return new getInventorySnapshot_args(this);
    }

    @Override
    public void clear() {
      setWarehouseIdIsSet(false);
      this.warehouseId = 0;
    }

    public long getWarehouseId() {
      return this.warehouseId;
    }

    public void setWarehouseId(long warehouseId) {
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    public void unsetWarehouseId() {
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
    }

    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouseId() {
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
    }

    public void setWarehouseIdIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouseId();
        } else {
          setWarehouseId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouseId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case WAREHOUSE_ID:
        return isSetWarehouseId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getInventorySnapshot_args)
        return this.equals((getInventorySnapshot_args)that);
      return false;
    }

    public boolean equals(getInventorySnapshot_args that) {
      if (that == null)
        return false;

      boolean this_present_warehouseId = true;
      boolean that_present_warehouseId = true;
      if (this_present_warehouseId || that_present_warehouseId) {
        if (!(this_present_warehouseId && that_present_warehouseId))
          return false;
        if (this.warehouseId != that.warehouseId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getInventorySnapshot_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getInventorySnapshot_args typedOther = (getInventorySnapshot_args)other;

      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouseId = iprot.readI64();
              setWarehouseIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouseId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getInventorySnapshot_args(");
      boolean first = true;

      sb.append("warehouseId:");
      sb.append(this.warehouseId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getInventorySnapshot_result implements org.apache.thrift.TBase<getInventorySnapshot_result, getInventorySnapshot_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventorySnapshot_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);

    private Map<Long,ItemInventory> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ItemInventory.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventorySnapshot_result.class, metaDataMap);
    }

    public getInventorySnapshot_result() {
    }

    public getInventorySnapshot_result(
      Map<Long,ItemInventory> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getInventorySnapshot_result(getInventorySnapshot_result other) {
      if (other.isSetSuccess()) {
        Map<Long,ItemInventory> __this__success = new HashMap<Long,ItemInventory>();
        for (Map.Entry<Long, ItemInventory> other_element : other.success.entrySet()) {

          Long other_element_key = other_element.getKey();
          ItemInventory other_element_value = other_element.getValue();

          Long __this__success_copy_key = other_element_key;

          ItemInventory __this__success_copy_value = new ItemInventory(other_element_value);

          __this__success.put(__this__success_copy_key, __this__success_copy_value);
        }
        this.success = __this__success;
      }
    }

    public getInventorySnapshot_result deepCopy() {
      return new getInventorySnapshot_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public void putToSuccess(long key, ItemInventory val) {
      if (this.success == null) {
        this.success = new HashMap<Long,ItemInventory>();
      }
      this.success.put(key, val);
    }

    public Map<Long,ItemInventory> getSuccess() {
      return this.success;
    }

    public void setSuccess(Map<Long,ItemInventory> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Map<Long,ItemInventory>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getInventorySnapshot_result)
        return this.equals((getInventorySnapshot_result)that);
      return false;
    }

    public boolean equals(getInventorySnapshot_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getInventorySnapshot_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getInventorySnapshot_result typedOther = (getInventorySnapshot_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map79 = iprot.readMapBegin();
                this.success = new HashMap<Long,ItemInventory>(2*_map79.size);
                for (int _i80 = 0; _i80 < _map79.size; ++_i80)
                {
                  long _key81; // required
                  ItemInventory _val82; // required
                  _key81 = iprot.readI64();
                  _val82 = new ItemInventory();
                  _val82.read(iprot);
                  this.success.put(_key81, _val82);
                }
                iprot.readMapEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (Map.Entry<Long, ItemInventory> _iter83 : this.success.entrySet())
          {
            oprot.writeI64(_iter83.getKey());
            _iter83.getValue().write(oprot);
          }
          oprot.writeMapEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getInventorySnapshot_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class clearItemAvailabilityCache_args implements org.apache.thrift.TBase<clearItemAvailabilityCache_args, clearItemAvailabilityCache_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clearItemAvailabilityCache_args");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(clearItemAvailabilityCache_args.class, metaDataMap);
    }

    public clearItemAvailabilityCache_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public clearItemAvailabilityCache_args(clearItemAvailabilityCache_args other) {
    }

    public clearItemAvailabilityCache_args deepCopy() {
      return new clearItemAvailabilityCache_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof clearItemAvailabilityCache_args)
        return this.equals((clearItemAvailabilityCache_args)that);
      return false;
    }

    public boolean equals(clearItemAvailabilityCache_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(clearItemAvailabilityCache_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      clearItemAvailabilityCache_args typedOther = (clearItemAvailabilityCache_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("clearItemAvailabilityCache_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class clearItemAvailabilityCache_result implements org.apache.thrift.TBase<clearItemAvailabilityCache_result, clearItemAvailabilityCache_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clearItemAvailabilityCache_result");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(clearItemAvailabilityCache_result.class, metaDataMap);
    }

    public clearItemAvailabilityCache_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public clearItemAvailabilityCache_result(clearItemAvailabilityCache_result other) {
    }

    public clearItemAvailabilityCache_result deepCopy() {
      return new clearItemAvailabilityCache_result(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof clearItemAvailabilityCache_result)
        return this.equals((clearItemAvailabilityCache_result)that);
      return false;
    }

    public boolean equals(clearItemAvailabilityCache_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(clearItemAvailabilityCache_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      clearItemAvailabilityCache_result typedOther = (clearItemAvailabilityCache_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("clearItemAvailabilityCache_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateVendorString_args implements org.apache.thrift.TBase<updateVendorString_args, updateVendorString_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateVendorString_args");

    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField VENDOR_STRING_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorString", org.apache.thrift.protocol.TType.STRING, (short)2);

    private long warehouseId; // required
    private String vendorString; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      WAREHOUSE_ID((short)1, "warehouseId"),
      VENDOR_STRING((short)2, "vendorString");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          case 2: // VENDOR_STRING
            return VENDOR_STRING;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __WAREHOUSEID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.VENDOR_STRING, new org.apache.thrift.meta_data.FieldMetaData("vendorString", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateVendorString_args.class, metaDataMap);
    }

    public updateVendorString_args() {
    }

    public updateVendorString_args(
      long warehouseId,
      String vendorString)
    {
      this();
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
      this.vendorString = vendorString;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateVendorString_args(updateVendorString_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.warehouseId = other.warehouseId;
      if (other.isSetVendorString()) {
        this.vendorString = other.vendorString;
      }
    }

    public updateVendorString_args deepCopy() {
      return new updateVendorString_args(this);
    }

    @Override
    public void clear() {
      setWarehouseIdIsSet(false);
      this.warehouseId = 0;
      this.vendorString = null;
    }

    public long getWarehouseId() {
      return this.warehouseId;
    }

    public void setWarehouseId(long warehouseId) {
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    public void unsetWarehouseId() {
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
    }

    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouseId() {
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
    }

    public void setWarehouseIdIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
    }

    public String getVendorString() {
      return this.vendorString;
    }

    public void setVendorString(String vendorString) {
      this.vendorString = vendorString;
    }

    public void unsetVendorString() {
      this.vendorString = null;
    }

    /** Returns true if field vendorString is set (has been assigned a value) and false otherwise */
    public boolean isSetVendorString() {
      return this.vendorString != null;
    }

    public void setVendorStringIsSet(boolean value) {
      if (!value) {
        this.vendorString = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouseId();
        } else {
          setWarehouseId((Long)value);
        }
        break;

      case VENDOR_STRING:
        if (value == null) {
          unsetVendorString();
        } else {
          setVendorString((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouseId());

      case VENDOR_STRING:
        return getVendorString();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case WAREHOUSE_ID:
        return isSetWarehouseId();
      case VENDOR_STRING:
        return isSetVendorString();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateVendorString_args)
        return this.equals((updateVendorString_args)that);
      return false;
    }

    public boolean equals(updateVendorString_args that) {
      if (that == null)
        return false;

      boolean this_present_warehouseId = true;
      boolean that_present_warehouseId = true;
      if (this_present_warehouseId || that_present_warehouseId) {
        if (!(this_present_warehouseId && that_present_warehouseId))
          return false;
        if (this.warehouseId != that.warehouseId)
          return false;
      }

      boolean this_present_vendorString = true && this.isSetVendorString();
      boolean that_present_vendorString = true && that.isSetVendorString();
      if (this_present_vendorString || that_present_vendorString) {
        if (!(this_present_vendorString && that_present_vendorString))
          return false;
        if (!this.vendorString.equals(that.vendorString))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateVendorString_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateVendorString_args typedOther = (updateVendorString_args)other;

      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetVendorString()).compareTo(typedOther.isSetVendorString());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetVendorString()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorString, typedOther.vendorString);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouseId = iprot.readI64();
              setWarehouseIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // VENDOR_STRING
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.vendorString = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouseId);
      oprot.writeFieldEnd();
      if (this.vendorString != null) {
        oprot.writeFieldBegin(VENDOR_STRING_FIELD_DESC);
        oprot.writeString(this.vendorString);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateVendorString_args(");
      boolean first = true;

      sb.append("warehouseId:");
      sb.append(this.warehouseId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("vendorString:");
      if (this.vendorString == null) {
        sb.append("null");
      } else {
        sb.append(this.vendorString);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateVendorString_result implements org.apache.thrift.TBase<updateVendorString_result, updateVendorString_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateVendorString_result");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateVendorString_result.class, metaDataMap);
    }

    public updateVendorString_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateVendorString_result(updateVendorString_result other) {
    }

    public updateVendorString_result deepCopy() {
      return new updateVendorString_result(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateVendorString_result)
        return this.equals((updateVendorString_result)that);
      return false;
    }

    public boolean equals(updateVendorString_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateVendorString_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateVendorString_result typedOther = (updateVendorString_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateVendorString_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class clearItemAvailabilityCacheForItem_args implements org.apache.thrift.TBase<clearItemAvailabilityCacheForItem_args, clearItemAvailabilityCacheForItem_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clearItemAvailabilityCacheForItem_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)1);

    private long item_id; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "item_id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEM_ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(clearItemAvailabilityCacheForItem_args.class, metaDataMap);
    }

    public clearItemAvailabilityCacheForItem_args() {
    }

    public clearItemAvailabilityCacheForItem_args(
      long item_id)
    {
      this();
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public clearItemAvailabilityCacheForItem_args(clearItemAvailabilityCacheForItem_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.item_id = other.item_id;
    }

    public clearItemAvailabilityCacheForItem_args deepCopy() {
      return new clearItemAvailabilityCacheForItem_args(this);
    }

    @Override
    public void clear() {
      setItem_idIsSet(false);
      this.item_id = 0;
    }

    public long getItem_id() {
      return this.item_id;
    }

    public void setItem_id(long item_id) {
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    public void unsetItem_id() {
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
    }

    /** Returns true if field item_id is set (has been assigned a value) and false otherwise */
    public boolean isSetItem_id() {
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
    }

    public void setItem_idIsSet(boolean value) {
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItem_id();
        } else {
          setItem_id((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItem_id());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItem_id();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof clearItemAvailabilityCacheForItem_args)
        return this.equals((clearItemAvailabilityCacheForItem_args)that);
      return false;
    }

    public boolean equals(clearItemAvailabilityCacheForItem_args that) {
      if (that == null)
        return false;

      boolean this_present_item_id = true;
      boolean that_present_item_id = true;
      if (this_present_item_id || that_present_item_id) {
        if (!(this_present_item_id && that_present_item_id))
          return false;
        if (this.item_id != that.item_id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(clearItemAvailabilityCacheForItem_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      clearItemAvailabilityCacheForItem_args typedOther = (clearItemAvailabilityCacheForItem_args)other;

      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItem_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.item_id = iprot.readI64();
              setItem_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.item_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("clearItemAvailabilityCacheForItem_args(");
      boolean first = true;

      sb.append("item_id:");
      sb.append(this.item_id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class clearItemAvailabilityCacheForItem_result implements org.apache.thrift.TBase<clearItemAvailabilityCacheForItem_result, clearItemAvailabilityCacheForItem_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("clearItemAvailabilityCacheForItem_result");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(clearItemAvailabilityCacheForItem_result.class, metaDataMap);
    }

    public clearItemAvailabilityCacheForItem_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public clearItemAvailabilityCacheForItem_result(clearItemAvailabilityCacheForItem_result other) {
    }

    public clearItemAvailabilityCacheForItem_result deepCopy() {
      return new clearItemAvailabilityCacheForItem_result(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof clearItemAvailabilityCacheForItem_result)
        return this.equals((clearItemAvailabilityCacheForItem_result)that);
      return false;
    }

    public boolean equals(clearItemAvailabilityCacheForItem_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(clearItemAvailabilityCacheForItem_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      clearItemAvailabilityCacheForItem_result typedOther = (clearItemAvailabilityCacheForItem_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("clearItemAvailabilityCacheForItem_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getOurWarehouseIdForVendor_args implements org.apache.thrift.TBase<getOurWarehouseIdForVendor_args, getOurWarehouseIdForVendor_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOurWarehouseIdForVendor_args");

    private static final org.apache.thrift.protocol.TField VENDOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField BILLING_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("billingWarehouseId", org.apache.thrift.protocol.TType.I64, (short)2);

    private long vendorId; // required
    private long billingWarehouseId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      VENDOR_ID((short)1, "vendorId"),
      BILLING_WAREHOUSE_ID((short)2, "billingWarehouseId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // VENDOR_ID
            return VENDOR_ID;
          case 2: // BILLING_WAREHOUSE_ID
            return BILLING_WAREHOUSE_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __VENDORID_ISSET_ID = 0;
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.VENDOR_ID, new org.apache.thrift.meta_data.FieldMetaData("vendorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOurWarehouseIdForVendor_args.class, metaDataMap);
    }

    public getOurWarehouseIdForVendor_args() {
    }

    public getOurWarehouseIdForVendor_args(
      long vendorId,
      long billingWarehouseId)
    {
      this();
      this.vendorId = vendorId;
      setVendorIdIsSet(true);
      this.billingWarehouseId = billingWarehouseId;
      setBillingWarehouseIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getOurWarehouseIdForVendor_args(getOurWarehouseIdForVendor_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.vendorId = other.vendorId;
      this.billingWarehouseId = other.billingWarehouseId;
    }

    public getOurWarehouseIdForVendor_args deepCopy() {
      return new getOurWarehouseIdForVendor_args(this);
    }

    @Override
    public void clear() {
      setVendorIdIsSet(false);
      this.vendorId = 0;
      setBillingWarehouseIdIsSet(false);
      this.billingWarehouseId = 0;
    }

    public long getVendorId() {
      return this.vendorId;
    }

    public void setVendorId(long vendorId) {
      this.vendorId = vendorId;
      setVendorIdIsSet(true);
    }

    public void unsetVendorId() {
      __isset_bit_vector.clear(__VENDORID_ISSET_ID);
    }

    /** Returns true if field vendorId is set (has been assigned a value) and false otherwise */
    public boolean isSetVendorId() {
      return __isset_bit_vector.get(__VENDORID_ISSET_ID);
    }

    public void setVendorIdIsSet(boolean value) {
      __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
    }

    public long getBillingWarehouseId() {
      return this.billingWarehouseId;
    }

    public void setBillingWarehouseId(long billingWarehouseId) {
      this.billingWarehouseId = billingWarehouseId;
      setBillingWarehouseIdIsSet(true);
    }

    public void unsetBillingWarehouseId() {
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
    }

    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
    public boolean isSetBillingWarehouseId() {
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
    }

    public void setBillingWarehouseIdIsSet(boolean value) {
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case VENDOR_ID:
        if (value == null) {
          unsetVendorId();
        } else {
          setVendorId((Long)value);
        }
        break;

      case BILLING_WAREHOUSE_ID:
        if (value == null) {
          unsetBillingWarehouseId();
        } else {
          setBillingWarehouseId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case VENDOR_ID:
        return Long.valueOf(getVendorId());

      case BILLING_WAREHOUSE_ID:
        return Long.valueOf(getBillingWarehouseId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case VENDOR_ID:
        return isSetVendorId();
      case BILLING_WAREHOUSE_ID:
        return isSetBillingWarehouseId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getOurWarehouseIdForVendor_args)
        return this.equals((getOurWarehouseIdForVendor_args)that);
      return false;
    }

    public boolean equals(getOurWarehouseIdForVendor_args that) {
      if (that == null)
        return false;

      boolean this_present_vendorId = true;
      boolean that_present_vendorId = true;
      if (this_present_vendorId || that_present_vendorId) {
        if (!(this_present_vendorId && that_present_vendorId))
          return false;
        if (this.vendorId != that.vendorId)
          return false;
      }

      boolean this_present_billingWarehouseId = true;
      boolean that_present_billingWarehouseId = true;
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
          return false;
        if (this.billingWarehouseId != that.billingWarehouseId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getOurWarehouseIdForVendor_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getOurWarehouseIdForVendor_args typedOther = (getOurWarehouseIdForVendor_args)other;

      lastComparison = Boolean.valueOf(isSetVendorId()).compareTo(typedOther.isSetVendorId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetVendorId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorId, typedOther.vendorId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBillingWarehouseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // VENDOR_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.vendorId = iprot.readI64();
              setVendorIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // BILLING_WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.billingWarehouseId = iprot.readI64();
              setBillingWarehouseIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
      oprot.writeI64(this.vendorId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.billingWarehouseId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getOurWarehouseIdForVendor_args(");
      boolean first = true;

      sb.append("vendorId:");
      sb.append(this.vendorId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("billingWarehouseId:");
      sb.append(this.billingWarehouseId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getOurWarehouseIdForVendor_result implements org.apache.thrift.TBase<getOurWarehouseIdForVendor_result, getOurWarehouseIdForVendor_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOurWarehouseIdForVendor_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);

    private long success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOurWarehouseIdForVendor_result.class, metaDataMap);
    }

    public getOurWarehouseIdForVendor_result() {
    }

    public getOurWarehouseIdForVendor_result(
      long success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getOurWarehouseIdForVendor_result(getOurWarehouseIdForVendor_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public getOurWarehouseIdForVendor_result deepCopy() {
      return new getOurWarehouseIdForVendor_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
    }

    public long getSuccess() {
      return this.success;
    }

    public void setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Long.valueOf(getSuccess());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getOurWarehouseIdForVendor_result)
        return this.equals((getOurWarehouseIdForVendor_result)that);
      return false;
    }

    public boolean equals(getOurWarehouseIdForVendor_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getOurWarehouseIdForVendor_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getOurWarehouseIdForVendor_result typedOther = (getOurWarehouseIdForVendor_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.success = iprot.readI64();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI64(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getOurWarehouseIdForVendor_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemAvailabilitiesAtOurWarehouses_args implements org.apache.thrift.TBase<getItemAvailabilitiesAtOurWarehouses_args, getItemAvailabilitiesAtOurWarehouses_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemAvailabilitiesAtOurWarehouses_args");

    private static final org.apache.thrift.protocol.TField ITEM_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("item_ids", org.apache.thrift.protocol.TType.LIST, (short)1);

    private List<Long> item_ids; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_IDS((short)1, "item_ids");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_IDS
            return ITEM_IDS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_IDS, new org.apache.thrift.meta_data.FieldMetaData("item_ids", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemAvailabilitiesAtOurWarehouses_args.class, metaDataMap);
    }

    public getItemAvailabilitiesAtOurWarehouses_args() {
    }

    public getItemAvailabilitiesAtOurWarehouses_args(
      List<Long> item_ids)
    {
      this();
      this.item_ids = item_ids;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemAvailabilitiesAtOurWarehouses_args(getItemAvailabilitiesAtOurWarehouses_args other) {
      if (other.isSetItem_ids()) {
        List<Long> __this__item_ids = new ArrayList<Long>();
        for (Long other_element : other.item_ids) {
          __this__item_ids.add(other_element);
        }
        this.item_ids = __this__item_ids;
      }
    }

    public getItemAvailabilitiesAtOurWarehouses_args deepCopy() {
      return new getItemAvailabilitiesAtOurWarehouses_args(this);
    }

    @Override
    public void clear() {
      this.item_ids = null;
    }

    public int getItem_idsSize() {
      return (this.item_ids == null) ? 0 : this.item_ids.size();
    }

    public java.util.Iterator<Long> getItem_idsIterator() {
      return (this.item_ids == null) ? null : this.item_ids.iterator();
    }

    public void addToItem_ids(long elem) {
      if (this.item_ids == null) {
        this.item_ids = new ArrayList<Long>();
      }
      this.item_ids.add(elem);
    }

    public List<Long> getItem_ids() {
      return this.item_ids;
    }

    public void setItem_ids(List<Long> item_ids) {
      this.item_ids = item_ids;
    }

    public void unsetItem_ids() {
      this.item_ids = null;
    }

    /** Returns true if field item_ids is set (has been assigned a value) and false otherwise */
    public boolean isSetItem_ids() {
      return this.item_ids != null;
    }

    public void setItem_idsIsSet(boolean value) {
      if (!value) {
        this.item_ids = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_IDS:
        if (value == null) {
          unsetItem_ids();
        } else {
          setItem_ids((List<Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_IDS:
        return getItem_ids();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_IDS:
        return isSetItem_ids();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemAvailabilitiesAtOurWarehouses_args)
        return this.equals((getItemAvailabilitiesAtOurWarehouses_args)that);
      return false;
    }

    public boolean equals(getItemAvailabilitiesAtOurWarehouses_args that) {
      if (that == null)
        return false;

      boolean this_present_item_ids = true && this.isSetItem_ids();
      boolean that_present_item_ids = true && that.isSetItem_ids();
      if (this_present_item_ids || that_present_item_ids) {
        if (!(this_present_item_ids && that_present_item_ids))
          return false;
        if (!this.item_ids.equals(that.item_ids))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemAvailabilitiesAtOurWarehouses_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemAvailabilitiesAtOurWarehouses_args typedOther = (getItemAvailabilitiesAtOurWarehouses_args)other;

      lastComparison = Boolean.valueOf(isSetItem_ids()).compareTo(typedOther.isSetItem_ids());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItem_ids()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_ids, typedOther.item_ids);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_IDS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list84 = iprot.readListBegin();
                this.item_ids = new ArrayList<Long>(_list84.size);
                for (int _i85 = 0; _i85 < _list84.size; ++_i85)
                {
                  long _elem86; // required
                  _elem86 = iprot.readI64();
                  this.item_ids.add(_elem86);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.item_ids != null) {
        oprot.writeFieldBegin(ITEM_IDS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.item_ids.size()));
          for (long _iter87 : this.item_ids)
          {
            oprot.writeI64(_iter87);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemAvailabilitiesAtOurWarehouses_args(");
      boolean first = true;

      sb.append("item_ids:");
      if (this.item_ids == null) {
        sb.append("null");
      } else {
        sb.append(this.item_ids);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemAvailabilitiesAtOurWarehouses_result implements org.apache.thrift.TBase<getItemAvailabilitiesAtOurWarehouses_result, getItemAvailabilitiesAtOurWarehouses_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemAvailabilitiesAtOurWarehouses_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);

    private Map<Long,Long> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemAvailabilitiesAtOurWarehouses_result.class, metaDataMap);
    }

    public getItemAvailabilitiesAtOurWarehouses_result() {
    }

    public getItemAvailabilitiesAtOurWarehouses_result(
      Map<Long,Long> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemAvailabilitiesAtOurWarehouses_result(getItemAvailabilitiesAtOurWarehouses_result other) {
      if (other.isSetSuccess()) {
        Map<Long,Long> __this__success = new HashMap<Long,Long>();
        for (Map.Entry<Long, Long> other_element : other.success.entrySet()) {

          Long other_element_key = other_element.getKey();
          Long other_element_value = other_element.getValue();

          Long __this__success_copy_key = other_element_key;

          Long __this__success_copy_value = other_element_value;

          __this__success.put(__this__success_copy_key, __this__success_copy_value);
        }
        this.success = __this__success;
      }
    }

    public getItemAvailabilitiesAtOurWarehouses_result deepCopy() {
      return new getItemAvailabilitiesAtOurWarehouses_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public void putToSuccess(long key, long val) {
      if (this.success == null) {
        this.success = new HashMap<Long,Long>();
      }
      this.success.put(key, val);
    }

    public Map<Long,Long> getSuccess() {
      return this.success;
    }

    public void setSuccess(Map<Long,Long> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Map<Long,Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemAvailabilitiesAtOurWarehouses_result)
        return this.equals((getItemAvailabilitiesAtOurWarehouses_result)that);
      return false;
    }

    public boolean equals(getItemAvailabilitiesAtOurWarehouses_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemAvailabilitiesAtOurWarehouses_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemAvailabilitiesAtOurWarehouses_result typedOther = (getItemAvailabilitiesAtOurWarehouses_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map88 = iprot.readMapBegin();
                this.success = new HashMap<Long,Long>(2*_map88.size);
                for (int _i89 = 0; _i89 < _map88.size; ++_i89)
                {
                  long _key90; // required
                  long _val91; // required
                  _key90 = iprot.readI64();
                  _val91 = iprot.readI64();
                  this.success.put(_key90, _val91);
                }
                iprot.readMapEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.I64, this.success.size()));
          for (Map.Entry<Long, Long> _iter92 : this.success.entrySet())
          {
            oprot.writeI64(_iter92.getKey());
            oprot.writeI64(_iter92.getValue());
          }
          oprot.writeMapEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemAvailabilitiesAtOurWarehouses_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getMonitoredWarehouseForVendors_args implements org.apache.thrift.TBase<getMonitoredWarehouseForVendors_args, getMonitoredWarehouseForVendors_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMonitoredWarehouseForVendors_args");

    private static final org.apache.thrift.protocol.TField VENDOR_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorIds", org.apache.thrift.protocol.TType.LIST, (short)1);

    private List<Long> vendorIds; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      VENDOR_IDS((short)1, "vendorIds");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // VENDOR_IDS
            return VENDOR_IDS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.VENDOR_IDS, new org.apache.thrift.meta_data.FieldMetaData("vendorIds", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMonitoredWarehouseForVendors_args.class, metaDataMap);
    }

    public getMonitoredWarehouseForVendors_args() {
    }

    public getMonitoredWarehouseForVendors_args(
      List<Long> vendorIds)
    {
      this();
      this.vendorIds = vendorIds;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getMonitoredWarehouseForVendors_args(getMonitoredWarehouseForVendors_args other) {
      if (other.isSetVendorIds()) {
        List<Long> __this__vendorIds = new ArrayList<Long>();
        for (Long other_element : other.vendorIds) {
          __this__vendorIds.add(other_element);
        }
        this.vendorIds = __this__vendorIds;
      }
    }

    public getMonitoredWarehouseForVendors_args deepCopy() {
      return new getMonitoredWarehouseForVendors_args(this);
    }

    @Override
    public void clear() {
      this.vendorIds = null;
    }

    public int getVendorIdsSize() {
      return (this.vendorIds == null) ? 0 : this.vendorIds.size();
    }

    public java.util.Iterator<Long> getVendorIdsIterator() {
      return (this.vendorIds == null) ? null : this.vendorIds.iterator();
    }

    public void addToVendorIds(long elem) {
      if (this.vendorIds == null) {
        this.vendorIds = new ArrayList<Long>();
      }
      this.vendorIds.add(elem);
    }

    public List<Long> getVendorIds() {
      return this.vendorIds;
    }

    public void setVendorIds(List<Long> vendorIds) {
      this.vendorIds = vendorIds;
    }

    public void unsetVendorIds() {
      this.vendorIds = null;
    }

    /** Returns true if field vendorIds is set (has been assigned a value) and false otherwise */
    public boolean isSetVendorIds() {
      return this.vendorIds != null;
    }

    public void setVendorIdsIsSet(boolean value) {
      if (!value) {
        this.vendorIds = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case VENDOR_IDS:
        if (value == null) {
          unsetVendorIds();
        } else {
          setVendorIds((List<Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case VENDOR_IDS:
        return getVendorIds();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case VENDOR_IDS:
        return isSetVendorIds();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getMonitoredWarehouseForVendors_args)
        return this.equals((getMonitoredWarehouseForVendors_args)that);
      return false;
    }

    public boolean equals(getMonitoredWarehouseForVendors_args that) {
      if (that == null)
        return false;

      boolean this_present_vendorIds = true && this.isSetVendorIds();
      boolean that_present_vendorIds = true && that.isSetVendorIds();
      if (this_present_vendorIds || that_present_vendorIds) {
        if (!(this_present_vendorIds && that_present_vendorIds))
          return false;
        if (!this.vendorIds.equals(that.vendorIds))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getMonitoredWarehouseForVendors_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getMonitoredWarehouseForVendors_args typedOther = (getMonitoredWarehouseForVendors_args)other;

      lastComparison = Boolean.valueOf(isSetVendorIds()).compareTo(typedOther.isSetVendorIds());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetVendorIds()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorIds, typedOther.vendorIds);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // VENDOR_IDS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list93 = iprot.readListBegin();
                this.vendorIds = new ArrayList<Long>(_list93.size);
                for (int _i94 = 0; _i94 < _list93.size; ++_i94)
                {
                  long _elem95; // required
                  _elem95 = iprot.readI64();
                  this.vendorIds.add(_elem95);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.vendorIds != null) {
        oprot.writeFieldBegin(VENDOR_IDS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.vendorIds.size()));
          for (long _iter96 : this.vendorIds)
          {
            oprot.writeI64(_iter96);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getMonitoredWarehouseForVendors_args(");
      boolean first = true;

      sb.append("vendorIds:");
      if (this.vendorIds == null) {
        sb.append("null");
      } else {
        sb.append(this.vendorIds);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getMonitoredWarehouseForVendors_result implements org.apache.thrift.TBase<getMonitoredWarehouseForVendors_result, getMonitoredWarehouseForVendors_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMonitoredWarehouseForVendors_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<Long> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMonitoredWarehouseForVendors_result.class, metaDataMap);
    }

    public getMonitoredWarehouseForVendors_result() {
    }

    public getMonitoredWarehouseForVendors_result(
      List<Long> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getMonitoredWarehouseForVendors_result(getMonitoredWarehouseForVendors_result other) {
      if (other.isSetSuccess()) {
        List<Long> __this__success = new ArrayList<Long>();
        for (Long other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
    }

    public getMonitoredWarehouseForVendors_result deepCopy() {
      return new getMonitoredWarehouseForVendors_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Long> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(long elem) {
      if (this.success == null) {
        this.success = new ArrayList<Long>();
      }
      this.success.add(elem);
    }

    public List<Long> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Long> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getMonitoredWarehouseForVendors_result)
        return this.equals((getMonitoredWarehouseForVendors_result)that);
      return false;
    }

    public boolean equals(getMonitoredWarehouseForVendors_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getMonitoredWarehouseForVendors_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getMonitoredWarehouseForVendors_result typedOther = (getMonitoredWarehouseForVendors_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list97 = iprot.readListBegin();
                this.success = new ArrayList<Long>(_list97.size);
                for (int _i98 = 0; _i98 < _list97.size; ++_i98)
                {
                  long _elem99; // required
                  _elem99 = iprot.readI64();
                  this.success.add(_elem99);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
          for (long _iter100 : this.success)
          {
            oprot.writeI64(_iter100);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getMonitoredWarehouseForVendors_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getIgnoredWarehouseidsAndItemids_args implements org.apache.thrift.TBase<getIgnoredWarehouseidsAndItemids_args, getIgnoredWarehouseidsAndItemids_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getIgnoredWarehouseidsAndItemids_args");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getIgnoredWarehouseidsAndItemids_args.class, metaDataMap);
    }

    public getIgnoredWarehouseidsAndItemids_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getIgnoredWarehouseidsAndItemids_args(getIgnoredWarehouseidsAndItemids_args other) {
    }

    public getIgnoredWarehouseidsAndItemids_args deepCopy() {
      return new getIgnoredWarehouseidsAndItemids_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getIgnoredWarehouseidsAndItemids_args)
        return this.equals((getIgnoredWarehouseidsAndItemids_args)that);
      return false;
    }

    public boolean equals(getIgnoredWarehouseidsAndItemids_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getIgnoredWarehouseidsAndItemids_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getIgnoredWarehouseidsAndItemids_args typedOther = (getIgnoredWarehouseidsAndItemids_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getIgnoredWarehouseidsAndItemids_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getIgnoredWarehouseidsAndItemids_result implements org.apache.thrift.TBase<getIgnoredWarehouseidsAndItemids_result, getIgnoredWarehouseidsAndItemids_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getIgnoredWarehouseidsAndItemids_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<IgnoredInventoryUpdateItems> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, IgnoredInventoryUpdateItems.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getIgnoredWarehouseidsAndItemids_result.class, metaDataMap);
    }

    public getIgnoredWarehouseidsAndItemids_result() {
    }

    public getIgnoredWarehouseidsAndItemids_result(
      List<IgnoredInventoryUpdateItems> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getIgnoredWarehouseidsAndItemids_result(getIgnoredWarehouseidsAndItemids_result other) {
      if (other.isSetSuccess()) {
        List<IgnoredInventoryUpdateItems> __this__success = new ArrayList<IgnoredInventoryUpdateItems>();
        for (IgnoredInventoryUpdateItems other_element : other.success) {
          __this__success.add(new IgnoredInventoryUpdateItems(other_element));
        }
        this.success = __this__success;
      }
    }

    public getIgnoredWarehouseidsAndItemids_result deepCopy() {
      return new getIgnoredWarehouseidsAndItemids_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<IgnoredInventoryUpdateItems> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(IgnoredInventoryUpdateItems elem) {
      if (this.success == null) {
        this.success = new ArrayList<IgnoredInventoryUpdateItems>();
      }
      this.success.add(elem);
    }

    public List<IgnoredInventoryUpdateItems> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<IgnoredInventoryUpdateItems> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<IgnoredInventoryUpdateItems>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getIgnoredWarehouseidsAndItemids_result)
        return this.equals((getIgnoredWarehouseidsAndItemids_result)that);
      return false;
    }

    public boolean equals(getIgnoredWarehouseidsAndItemids_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getIgnoredWarehouseidsAndItemids_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getIgnoredWarehouseidsAndItemids_result typedOther = (getIgnoredWarehouseidsAndItemids_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list101 = iprot.readListBegin();
                this.success = new ArrayList<IgnoredInventoryUpdateItems>(_list101.size);
                for (int _i102 = 0; _i102 < _list101.size; ++_i102)
                {
                  IgnoredInventoryUpdateItems _elem103; // required
                  _elem103 = new IgnoredInventoryUpdateItems();
                  _elem103.read(iprot);
                  this.success.add(_elem103);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (IgnoredInventoryUpdateItems _iter104 : this.success)
          {
            _iter104.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getIgnoredWarehouseidsAndItemids_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class insertItemtoIgnoreInventoryUpdatelist_args implements org.apache.thrift.TBase<insertItemtoIgnoreInventoryUpdatelist_args, insertItemtoIgnoreInventoryUpdatelist_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertItemtoIgnoreInventoryUpdatelist_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouse_id", org.apache.thrift.protocol.TType.I64, (short)2);

    private long item_id; // required
    private long warehouse_id; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "item_id"),
      WAREHOUSE_ID((short)2, "warehouse_id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEM_ID_ISSET_ID = 0;
    private static final int __WAREHOUSE_ID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouse_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertItemtoIgnoreInventoryUpdatelist_args.class, metaDataMap);
    }

    public insertItemtoIgnoreInventoryUpdatelist_args() {
    }

    public insertItemtoIgnoreInventoryUpdatelist_args(
      long item_id,
      long warehouse_id)
    {
      this();
      this.item_id = item_id;
      setItem_idIsSet(true);
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public insertItemtoIgnoreInventoryUpdatelist_args(insertItemtoIgnoreInventoryUpdatelist_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.item_id = other.item_id;
      this.warehouse_id = other.warehouse_id;
    }

    public insertItemtoIgnoreInventoryUpdatelist_args deepCopy() {
      return new insertItemtoIgnoreInventoryUpdatelist_args(this);
    }

    @Override
    public void clear() {
      setItem_idIsSet(false);
      this.item_id = 0;
      setWarehouse_idIsSet(false);
      this.warehouse_id = 0;
    }

    public long getItem_id() {
      return this.item_id;
    }

    public void setItem_id(long item_id) {
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    public void unsetItem_id() {
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
    }

    /** Returns true if field item_id is set (has been assigned a value) and false otherwise */
    public boolean isSetItem_id() {
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
    }

    public void setItem_idIsSet(boolean value) {
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
    }

    public long getWarehouse_id() {
      return this.warehouse_id;
    }

    public void setWarehouse_id(long warehouse_id) {
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    public void unsetWarehouse_id() {
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
    }

    /** Returns true if field warehouse_id is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouse_id() {
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
    }

    public void setWarehouse_idIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItem_id();
        } else {
          setItem_id((Long)value);
        }
        break;

      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouse_id();
        } else {
          setWarehouse_id((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItem_id());

      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouse_id());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItem_id();
      case WAREHOUSE_ID:
        return isSetWarehouse_id();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof insertItemtoIgnoreInventoryUpdatelist_args)
        return this.equals((insertItemtoIgnoreInventoryUpdatelist_args)that);
      return false;
    }

    public boolean equals(insertItemtoIgnoreInventoryUpdatelist_args that) {
      if (that == null)
        return false;

      boolean this_present_item_id = true;
      boolean that_present_item_id = true;
      if (this_present_item_id || that_present_item_id) {
        if (!(this_present_item_id && that_present_item_id))
          return false;
        if (this.item_id != that.item_id)
          return false;
      }

      boolean this_present_warehouse_id = true;
      boolean that_present_warehouse_id = true;
      if (this_present_warehouse_id || that_present_warehouse_id) {
        if (!(this_present_warehouse_id && that_present_warehouse_id))
          return false;
        if (this.warehouse_id != that.warehouse_id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(insertItemtoIgnoreInventoryUpdatelist_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      insertItemtoIgnoreInventoryUpdatelist_args typedOther = (insertItemtoIgnoreInventoryUpdatelist_args)other;

      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItem_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(typedOther.isSetWarehouse_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouse_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouse_id, typedOther.warehouse_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.item_id = iprot.readI64();
              setItem_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouse_id = iprot.readI64();
              setWarehouse_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.item_id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouse_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("insertItemtoIgnoreInventoryUpdatelist_args(");
      boolean first = true;

      sb.append("item_id:");
      sb.append(this.item_id);
      first = false;
      if (!first) sb.append(", ");
      sb.append("warehouse_id:");
      sb.append(this.warehouse_id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class insertItemtoIgnoreInventoryUpdatelist_result implements org.apache.thrift.TBase<insertItemtoIgnoreInventoryUpdatelist_result, insertItemtoIgnoreInventoryUpdatelist_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("insertItemtoIgnoreInventoryUpdatelist_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);

    private boolean success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(insertItemtoIgnoreInventoryUpdatelist_result.class, metaDataMap);
    }

    public insertItemtoIgnoreInventoryUpdatelist_result() {
    }

    public insertItemtoIgnoreInventoryUpdatelist_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public insertItemtoIgnoreInventoryUpdatelist_result(insertItemtoIgnoreInventoryUpdatelist_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public insertItemtoIgnoreInventoryUpdatelist_result deepCopy() {
      return new insertItemtoIgnoreInventoryUpdatelist_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof insertItemtoIgnoreInventoryUpdatelist_result)
        return this.equals((insertItemtoIgnoreInventoryUpdatelist_result)that);
      return false;
    }

    public boolean equals(insertItemtoIgnoreInventoryUpdatelist_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(insertItemtoIgnoreInventoryUpdatelist_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      insertItemtoIgnoreInventoryUpdatelist_result typedOther = (insertItemtoIgnoreInventoryUpdatelist_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("insertItemtoIgnoreInventoryUpdatelist_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class deleteItemFromIgnoredInventoryUpdateList_args implements org.apache.thrift.TBase<deleteItemFromIgnoredInventoryUpdateList_args, deleteItemFromIgnoredInventoryUpdateList_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteItemFromIgnoredInventoryUpdateList_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouse_id", org.apache.thrift.protocol.TType.I64, (short)2);

    private long item_id; // required
    private long warehouse_id; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "item_id"),
      WAREHOUSE_ID((short)2, "warehouse_id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEM_ID_ISSET_ID = 0;
    private static final int __WAREHOUSE_ID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouse_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteItemFromIgnoredInventoryUpdateList_args.class, metaDataMap);
    }

    public deleteItemFromIgnoredInventoryUpdateList_args() {
    }

    public deleteItemFromIgnoredInventoryUpdateList_args(
      long item_id,
      long warehouse_id)
    {
      this();
      this.item_id = item_id;
      setItem_idIsSet(true);
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deleteItemFromIgnoredInventoryUpdateList_args(deleteItemFromIgnoredInventoryUpdateList_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.item_id = other.item_id;
      this.warehouse_id = other.warehouse_id;
    }

    public deleteItemFromIgnoredInventoryUpdateList_args deepCopy() {
      return new deleteItemFromIgnoredInventoryUpdateList_args(this);
    }

    @Override
    public void clear() {
      setItem_idIsSet(false);
      this.item_id = 0;
      setWarehouse_idIsSet(false);
      this.warehouse_id = 0;
    }

    public long getItem_id() {
      return this.item_id;
    }

    public void setItem_id(long item_id) {
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    public void unsetItem_id() {
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
    }

    /** Returns true if field item_id is set (has been assigned a value) and false otherwise */
    public boolean isSetItem_id() {
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
    }

    public void setItem_idIsSet(boolean value) {
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
    }

    public long getWarehouse_id() {
      return this.warehouse_id;
    }

    public void setWarehouse_id(long warehouse_id) {
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    public void unsetWarehouse_id() {
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
    }

    /** Returns true if field warehouse_id is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouse_id() {
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
    }

    public void setWarehouse_idIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItem_id();
        } else {
          setItem_id((Long)value);
        }
        break;

      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouse_id();
        } else {
          setWarehouse_id((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItem_id());

      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouse_id());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItem_id();
      case WAREHOUSE_ID:
        return isSetWarehouse_id();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof deleteItemFromIgnoredInventoryUpdateList_args)
        return this.equals((deleteItemFromIgnoredInventoryUpdateList_args)that);
      return false;
    }

    public boolean equals(deleteItemFromIgnoredInventoryUpdateList_args that) {
      if (that == null)
        return false;

      boolean this_present_item_id = true;
      boolean that_present_item_id = true;
      if (this_present_item_id || that_present_item_id) {
        if (!(this_present_item_id && that_present_item_id))
          return false;
        if (this.item_id != that.item_id)
          return false;
      }

      boolean this_present_warehouse_id = true;
      boolean that_present_warehouse_id = true;
      if (this_present_warehouse_id || that_present_warehouse_id) {
        if (!(this_present_warehouse_id && that_present_warehouse_id))
          return false;
        if (this.warehouse_id != that.warehouse_id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(deleteItemFromIgnoredInventoryUpdateList_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      deleteItemFromIgnoredInventoryUpdateList_args typedOther = (deleteItemFromIgnoredInventoryUpdateList_args)other;

      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItem_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(typedOther.isSetWarehouse_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouse_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouse_id, typedOther.warehouse_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.item_id = iprot.readI64();
              setItem_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouse_id = iprot.readI64();
              setWarehouse_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.item_id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouse_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("deleteItemFromIgnoredInventoryUpdateList_args(");
      boolean first = true;

      sb.append("item_id:");
      sb.append(this.item_id);
      first = false;
      if (!first) sb.append(", ");
      sb.append("warehouse_id:");
      sb.append(this.warehouse_id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class deleteItemFromIgnoredInventoryUpdateList_result implements org.apache.thrift.TBase<deleteItemFromIgnoredInventoryUpdateList_result, deleteItemFromIgnoredInventoryUpdateList_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("deleteItemFromIgnoredInventoryUpdateList_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);

    private boolean success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(deleteItemFromIgnoredInventoryUpdateList_result.class, metaDataMap);
    }

    public deleteItemFromIgnoredInventoryUpdateList_result() {
    }

    public deleteItemFromIgnoredInventoryUpdateList_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public deleteItemFromIgnoredInventoryUpdateList_result(deleteItemFromIgnoredInventoryUpdateList_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public deleteItemFromIgnoredInventoryUpdateList_result deepCopy() {
      return new deleteItemFromIgnoredInventoryUpdateList_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof deleteItemFromIgnoredInventoryUpdateList_result)
        return this.equals((deleteItemFromIgnoredInventoryUpdateList_result)that);
      return false;
    }

    public boolean equals(deleteItemFromIgnoredInventoryUpdateList_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(deleteItemFromIgnoredInventoryUpdateList_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      deleteItemFromIgnoredInventoryUpdateList_result typedOther = (deleteItemFromIgnoredInventoryUpdateList_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("deleteItemFromIgnoredInventoryUpdateList_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllIgnoredInventoryupdateItemsCount_args implements org.apache.thrift.TBase<getAllIgnoredInventoryupdateItemsCount_args, getAllIgnoredInventoryupdateItemsCount_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllIgnoredInventoryupdateItemsCount_args");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllIgnoredInventoryupdateItemsCount_args.class, metaDataMap);
    }

    public getAllIgnoredInventoryupdateItemsCount_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllIgnoredInventoryupdateItemsCount_args(getAllIgnoredInventoryupdateItemsCount_args other) {
    }

    public getAllIgnoredInventoryupdateItemsCount_args deepCopy() {
      return new getAllIgnoredInventoryupdateItemsCount_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllIgnoredInventoryupdateItemsCount_args)
        return this.equals((getAllIgnoredInventoryupdateItemsCount_args)that);
      return false;
    }

    public boolean equals(getAllIgnoredInventoryupdateItemsCount_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllIgnoredInventoryupdateItemsCount_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllIgnoredInventoryupdateItemsCount_args typedOther = (getAllIgnoredInventoryupdateItemsCount_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllIgnoredInventoryupdateItemsCount_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllIgnoredInventoryupdateItemsCount_result implements org.apache.thrift.TBase<getAllIgnoredInventoryupdateItemsCount_result, getAllIgnoredInventoryupdateItemsCount_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllIgnoredInventoryupdateItemsCount_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I32, (short)0);

    private int success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllIgnoredInventoryupdateItemsCount_result.class, metaDataMap);
    }

    public getAllIgnoredInventoryupdateItemsCount_result() {
    }

    public getAllIgnoredInventoryupdateItemsCount_result(
      int success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllIgnoredInventoryupdateItemsCount_result(getAllIgnoredInventoryupdateItemsCount_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public getAllIgnoredInventoryupdateItemsCount_result deepCopy() {
      return new getAllIgnoredInventoryupdateItemsCount_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
    }

    public int getSuccess() {
      return this.success;
    }

    public void setSuccess(int success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Integer.valueOf(getSuccess());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllIgnoredInventoryupdateItemsCount_result)
        return this.equals((getAllIgnoredInventoryupdateItemsCount_result)that);
      return false;
    }

    public boolean equals(getAllIgnoredInventoryupdateItemsCount_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllIgnoredInventoryupdateItemsCount_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllIgnoredInventoryupdateItemsCount_result typedOther = (getAllIgnoredInventoryupdateItemsCount_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.I32) {
              this.success = iprot.readI32();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI32(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllIgnoredInventoryupdateItemsCount_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getIgnoredInventoryUpdateItemids_args implements org.apache.thrift.TBase<getIgnoredInventoryUpdateItemids_args, getIgnoredInventoryUpdateItemids_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getIgnoredInventoryUpdateItemids_args");

    private static final org.apache.thrift.protocol.TField OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("offset", org.apache.thrift.protocol.TType.I32, (short)1);
    private static final org.apache.thrift.protocol.TField LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("limit", org.apache.thrift.protocol.TType.I32, (short)2);

    private int offset; // required
    private int limit; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      OFFSET((short)1, "offset"),
      LIMIT((short)2, "limit");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // OFFSET
            return OFFSET;
          case 2: // LIMIT
            return LIMIT;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __OFFSET_ISSET_ID = 0;
    private static final int __LIMIT_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.OFFSET, new org.apache.thrift.meta_data.FieldMetaData("offset", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      tmpMap.put(_Fields.LIMIT, new org.apache.thrift.meta_data.FieldMetaData("limit", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getIgnoredInventoryUpdateItemids_args.class, metaDataMap);
    }

    public getIgnoredInventoryUpdateItemids_args() {
    }

    public getIgnoredInventoryUpdateItemids_args(
      int offset,
      int limit)
    {
      this();
      this.offset = offset;
      setOffsetIsSet(true);
      this.limit = limit;
      setLimitIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getIgnoredInventoryUpdateItemids_args(getIgnoredInventoryUpdateItemids_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.offset = other.offset;
      this.limit = other.limit;
    }

    public getIgnoredInventoryUpdateItemids_args deepCopy() {
      return new getIgnoredInventoryUpdateItemids_args(this);
    }

    @Override
    public void clear() {
      setOffsetIsSet(false);
      this.offset = 0;
      setLimitIsSet(false);
      this.limit = 0;
    }

    public int getOffset() {
      return this.offset;
    }

    public void setOffset(int offset) {
      this.offset = offset;
      setOffsetIsSet(true);
    }

    public void unsetOffset() {
      __isset_bit_vector.clear(__OFFSET_ISSET_ID);
    }

    /** Returns true if field offset is set (has been assigned a value) and false otherwise */
    public boolean isSetOffset() {
      return __isset_bit_vector.get(__OFFSET_ISSET_ID);
    }

    public void setOffsetIsSet(boolean value) {
      __isset_bit_vector.set(__OFFSET_ISSET_ID, value);
    }

    public int getLimit() {
      return this.limit;
    }

    public void setLimit(int limit) {
      this.limit = limit;
      setLimitIsSet(true);
    }

    public void unsetLimit() {
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
    }

    /** Returns true if field limit is set (has been assigned a value) and false otherwise */
    public boolean isSetLimit() {
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
    }

    public void setLimitIsSet(boolean value) {
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case OFFSET:
        if (value == null) {
          unsetOffset();
        } else {
          setOffset((Integer)value);
        }
        break;

      case LIMIT:
        if (value == null) {
          unsetLimit();
        } else {
          setLimit((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case OFFSET:
        return Integer.valueOf(getOffset());

      case LIMIT:
        return Integer.valueOf(getLimit());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case OFFSET:
        return isSetOffset();
      case LIMIT:
        return isSetLimit();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getIgnoredInventoryUpdateItemids_args)
        return this.equals((getIgnoredInventoryUpdateItemids_args)that);
      return false;
    }

    public boolean equals(getIgnoredInventoryUpdateItemids_args that) {
      if (that == null)
        return false;

      boolean this_present_offset = true;
      boolean that_present_offset = true;
      if (this_present_offset || that_present_offset) {
        if (!(this_present_offset && that_present_offset))
          return false;
        if (this.offset != that.offset)
          return false;
      }

      boolean this_present_limit = true;
      boolean that_present_limit = true;
      if (this_present_limit || that_present_limit) {
        if (!(this_present_limit && that_present_limit))
          return false;
        if (this.limit != that.limit)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getIgnoredInventoryUpdateItemids_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getIgnoredInventoryUpdateItemids_args typedOther = (getIgnoredInventoryUpdateItemids_args)other;

      lastComparison = Boolean.valueOf(isSetOffset()).compareTo(typedOther.isSetOffset());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOffset()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.offset, typedOther.offset);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(typedOther.isSetLimit());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetLimit()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.limit, typedOther.limit);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // OFFSET
            if (field.type == org.apache.thrift.protocol.TType.I32) {
              this.offset = iprot.readI32();
              setOffsetIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // LIMIT
            if (field.type == org.apache.thrift.protocol.TType.I32) {
              this.limit = iprot.readI32();
              setLimitIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(OFFSET_FIELD_DESC);
      oprot.writeI32(this.offset);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
      oprot.writeI32(this.limit);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getIgnoredInventoryUpdateItemids_args(");
      boolean first = true;

      sb.append("offset:");
      sb.append(this.offset);
      first = false;
      if (!first) sb.append(", ");
      sb.append("limit:");
      sb.append(this.limit);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getIgnoredInventoryUpdateItemids_result implements org.apache.thrift.TBase<getIgnoredInventoryUpdateItemids_result, getIgnoredInventoryUpdateItemids_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getIgnoredInventoryUpdateItemids_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<Long> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getIgnoredInventoryUpdateItemids_result.class, metaDataMap);
    }

    public getIgnoredInventoryUpdateItemids_result() {
    }

    public getIgnoredInventoryUpdateItemids_result(
      List<Long> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getIgnoredInventoryUpdateItemids_result(getIgnoredInventoryUpdateItemids_result other) {
      if (other.isSetSuccess()) {
        List<Long> __this__success = new ArrayList<Long>();
        for (Long other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
    }

    public getIgnoredInventoryUpdateItemids_result deepCopy() {
      return new getIgnoredInventoryUpdateItemids_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Long> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(long elem) {
      if (this.success == null) {
        this.success = new ArrayList<Long>();
      }
      this.success.add(elem);
    }

    public List<Long> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Long> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getIgnoredInventoryUpdateItemids_result)
        return this.equals((getIgnoredInventoryUpdateItemids_result)that);
      return false;
    }

    public boolean equals(getIgnoredInventoryUpdateItemids_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getIgnoredInventoryUpdateItemids_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getIgnoredInventoryUpdateItemids_result typedOther = (getIgnoredInventoryUpdateItemids_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list105 = iprot.readListBegin();
                this.success = new ArrayList<Long>(_list105.size);
                for (int _i106 = 0; _i106 < _list105.size; ++_i106)
                {
                  long _elem107; // required
                  _elem107 = iprot.readI64();
                  this.success.add(_elem107);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
          for (long _iter108 : this.success)
          {
            oprot.writeI64(_iter108);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getIgnoredInventoryUpdateItemids_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateItemStockPurchaseParams_args implements org.apache.thrift.TBase<updateItemStockPurchaseParams_args, updateItemStockPurchaseParams_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateItemStockPurchaseParams_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField NUM_OF_DAYS_STOCK_FIELD_DESC = new org.apache.thrift.protocol.TField("numOfDaysStock", org.apache.thrift.protocol.TType.I32, (short)2);
    private static final org.apache.thrift.protocol.TField MIN_STOCK_LEVEL_FIELD_DESC = new org.apache.thrift.protocol.TField("minStockLevel", org.apache.thrift.protocol.TType.I64, (short)3);

    private long item_id; // required
    private int numOfDaysStock; // required
    private long minStockLevel; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "item_id"),
      NUM_OF_DAYS_STOCK((short)2, "numOfDaysStock"),
      MIN_STOCK_LEVEL((short)3, "minStockLevel");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // NUM_OF_DAYS_STOCK
            return NUM_OF_DAYS_STOCK;
          case 3: // MIN_STOCK_LEVEL
            return MIN_STOCK_LEVEL;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEM_ID_ISSET_ID = 0;
    private static final int __NUMOFDAYSSTOCK_ISSET_ID = 1;
    private static final int __MINSTOCKLEVEL_ISSET_ID = 2;
    private BitSet __isset_bit_vector = new BitSet(3);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.NUM_OF_DAYS_STOCK, new org.apache.thrift.meta_data.FieldMetaData("numOfDaysStock", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      tmpMap.put(_Fields.MIN_STOCK_LEVEL, new org.apache.thrift.meta_data.FieldMetaData("minStockLevel", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateItemStockPurchaseParams_args.class, metaDataMap);
    }

    public updateItemStockPurchaseParams_args() {
    }

    public updateItemStockPurchaseParams_args(
      long item_id,
      int numOfDaysStock,
      long minStockLevel)
    {
      this();
      this.item_id = item_id;
      setItem_idIsSet(true);
      this.numOfDaysStock = numOfDaysStock;
      setNumOfDaysStockIsSet(true);
      this.minStockLevel = minStockLevel;
      setMinStockLevelIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateItemStockPurchaseParams_args(updateItemStockPurchaseParams_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.item_id = other.item_id;
      this.numOfDaysStock = other.numOfDaysStock;
      this.minStockLevel = other.minStockLevel;
    }

    public updateItemStockPurchaseParams_args deepCopy() {
      return new updateItemStockPurchaseParams_args(this);
    }

    @Override
    public void clear() {
      setItem_idIsSet(false);
      this.item_id = 0;
      setNumOfDaysStockIsSet(false);
      this.numOfDaysStock = 0;
      setMinStockLevelIsSet(false);
      this.minStockLevel = 0;
    }

    public long getItem_id() {
      return this.item_id;
    }

    public void setItem_id(long item_id) {
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    public void unsetItem_id() {
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
    }

    /** Returns true if field item_id is set (has been assigned a value) and false otherwise */
    public boolean isSetItem_id() {
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
    }

    public void setItem_idIsSet(boolean value) {
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
    }

    public int getNumOfDaysStock() {
      return this.numOfDaysStock;
    }

    public void setNumOfDaysStock(int numOfDaysStock) {
      this.numOfDaysStock = numOfDaysStock;
      setNumOfDaysStockIsSet(true);
    }

    public void unsetNumOfDaysStock() {
      __isset_bit_vector.clear(__NUMOFDAYSSTOCK_ISSET_ID);
    }

    /** Returns true if field numOfDaysStock is set (has been assigned a value) and false otherwise */
    public boolean isSetNumOfDaysStock() {
      return __isset_bit_vector.get(__NUMOFDAYSSTOCK_ISSET_ID);
    }

    public void setNumOfDaysStockIsSet(boolean value) {
      __isset_bit_vector.set(__NUMOFDAYSSTOCK_ISSET_ID, value);
    }

    public long getMinStockLevel() {
      return this.minStockLevel;
    }

    public void setMinStockLevel(long minStockLevel) {
      this.minStockLevel = minStockLevel;
      setMinStockLevelIsSet(true);
    }

    public void unsetMinStockLevel() {
      __isset_bit_vector.clear(__MINSTOCKLEVEL_ISSET_ID);
    }

    /** Returns true if field minStockLevel is set (has been assigned a value) and false otherwise */
    public boolean isSetMinStockLevel() {
      return __isset_bit_vector.get(__MINSTOCKLEVEL_ISSET_ID);
    }

    public void setMinStockLevelIsSet(boolean value) {
      __isset_bit_vector.set(__MINSTOCKLEVEL_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItem_id();
        } else {
          setItem_id((Long)value);
        }
        break;

      case NUM_OF_DAYS_STOCK:
        if (value == null) {
          unsetNumOfDaysStock();
        } else {
          setNumOfDaysStock((Integer)value);
        }
        break;

      case MIN_STOCK_LEVEL:
        if (value == null) {
          unsetMinStockLevel();
        } else {
          setMinStockLevel((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItem_id());

      case NUM_OF_DAYS_STOCK:
        return Integer.valueOf(getNumOfDaysStock());

      case MIN_STOCK_LEVEL:
        return Long.valueOf(getMinStockLevel());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItem_id();
      case NUM_OF_DAYS_STOCK:
        return isSetNumOfDaysStock();
      case MIN_STOCK_LEVEL:
        return isSetMinStockLevel();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateItemStockPurchaseParams_args)
        return this.equals((updateItemStockPurchaseParams_args)that);
      return false;
    }

    public boolean equals(updateItemStockPurchaseParams_args that) {
      if (that == null)
        return false;

      boolean this_present_item_id = true;
      boolean that_present_item_id = true;
      if (this_present_item_id || that_present_item_id) {
        if (!(this_present_item_id && that_present_item_id))
          return false;
        if (this.item_id != that.item_id)
          return false;
      }

      boolean this_present_numOfDaysStock = true;
      boolean that_present_numOfDaysStock = true;
      if (this_present_numOfDaysStock || that_present_numOfDaysStock) {
        if (!(this_present_numOfDaysStock && that_present_numOfDaysStock))
          return false;
        if (this.numOfDaysStock != that.numOfDaysStock)
          return false;
      }

      boolean this_present_minStockLevel = true;
      boolean that_present_minStockLevel = true;
      if (this_present_minStockLevel || that_present_minStockLevel) {
        if (!(this_present_minStockLevel && that_present_minStockLevel))
          return false;
        if (this.minStockLevel != that.minStockLevel)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateItemStockPurchaseParams_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateItemStockPurchaseParams_args typedOther = (updateItemStockPurchaseParams_args)other;

      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItem_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNumOfDaysStock()).compareTo(typedOther.isSetNumOfDaysStock());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNumOfDaysStock()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numOfDaysStock, typedOther.numOfDaysStock);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetMinStockLevel()).compareTo(typedOther.isSetMinStockLevel());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetMinStockLevel()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.minStockLevel, typedOther.minStockLevel);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.item_id = iprot.readI64();
              setItem_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NUM_OF_DAYS_STOCK
            if (field.type == org.apache.thrift.protocol.TType.I32) {
              this.numOfDaysStock = iprot.readI32();
              setNumOfDaysStockIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // MIN_STOCK_LEVEL
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.minStockLevel = iprot.readI64();
              setMinStockLevelIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.item_id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(NUM_OF_DAYS_STOCK_FIELD_DESC);
      oprot.writeI32(this.numOfDaysStock);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(MIN_STOCK_LEVEL_FIELD_DESC);
      oprot.writeI64(this.minStockLevel);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateItemStockPurchaseParams_args(");
      boolean first = true;

      sb.append("item_id:");
      sb.append(this.item_id);
      first = false;
      if (!first) sb.append(", ");
      sb.append("numOfDaysStock:");
      sb.append(this.numOfDaysStock);
      first = false;
      if (!first) sb.append(", ");
      sb.append("minStockLevel:");
      sb.append(this.minStockLevel);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateItemStockPurchaseParams_result implements org.apache.thrift.TBase<updateItemStockPurchaseParams_result, updateItemStockPurchaseParams_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateItemStockPurchaseParams_result");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateItemStockPurchaseParams_result.class, metaDataMap);
    }

    public updateItemStockPurchaseParams_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateItemStockPurchaseParams_result(updateItemStockPurchaseParams_result other) {
    }

    public updateItemStockPurchaseParams_result deepCopy() {
      return new updateItemStockPurchaseParams_result(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateItemStockPurchaseParams_result)
        return this.equals((updateItemStockPurchaseParams_result)that);
      return false;
    }

    public boolean equals(updateItemStockPurchaseParams_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateItemStockPurchaseParams_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateItemStockPurchaseParams_result typedOther = (updateItemStockPurchaseParams_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateItemStockPurchaseParams_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemStockPurchaseParams_args implements org.apache.thrift.TBase<getItemStockPurchaseParams_args, getItemStockPurchaseParams_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemStockPurchaseParams_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long itemId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "itemId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEMID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemStockPurchaseParams_args.class, metaDataMap);
    }

    public getItemStockPurchaseParams_args() {
    }

    public getItemStockPurchaseParams_args(
      long itemId)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemStockPurchaseParams_args(getItemStockPurchaseParams_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
    }

    public getItemStockPurchaseParams_args deepCopy() {
      return new getItemStockPurchaseParams_args(this);
    }

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItemId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItemId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemStockPurchaseParams_args)
        return this.equals((getItemStockPurchaseParams_args)that);
      return false;
    }

    public boolean equals(getItemStockPurchaseParams_args that) {
      if (that == null)
        return false;

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemStockPurchaseParams_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemStockPurchaseParams_args typedOther = (getItemStockPurchaseParams_args)other;

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemStockPurchaseParams_args(");
      boolean first = true;

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemStockPurchaseParams_result implements org.apache.thrift.TBase<getItemStockPurchaseParams_result, getItemStockPurchaseParams_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemStockPurchaseParams_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);

    private ItemStockPurchaseParams success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ItemStockPurchaseParams.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemStockPurchaseParams_result.class, metaDataMap);
    }

    public getItemStockPurchaseParams_result() {
    }

    public getItemStockPurchaseParams_result(
      ItemStockPurchaseParams success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemStockPurchaseParams_result(getItemStockPurchaseParams_result other) {
      if (other.isSetSuccess()) {
        this.success = new ItemStockPurchaseParams(other.success);
      }
    }

    public getItemStockPurchaseParams_result deepCopy() {
      return new getItemStockPurchaseParams_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public ItemStockPurchaseParams getSuccess() {
      return this.success;
    }

    public void setSuccess(ItemStockPurchaseParams success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((ItemStockPurchaseParams)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemStockPurchaseParams_result)
        return this.equals((getItemStockPurchaseParams_result)that);
      return false;
    }

    public boolean equals(getItemStockPurchaseParams_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemStockPurchaseParams_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemStockPurchaseParams_result typedOther = (getItemStockPurchaseParams_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new ItemStockPurchaseParams();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemStockPurchaseParams_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addOosStatusForItem_args implements org.apache.thrift.TBase<addOosStatusForItem_args, addOosStatusForItem_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addOosStatusForItem_args");

    private static final org.apache.thrift.protocol.TField OOS_STATUS_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("oosStatusMap", org.apache.thrift.protocol.TType.MAP, (short)1);
    private static final org.apache.thrift.protocol.TField DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("date", org.apache.thrift.protocol.TType.I64, (short)2);

    private Map<Long,Boolean> oosStatusMap; // required
    private long date; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      OOS_STATUS_MAP((short)1, "oosStatusMap"),
      DATE((short)2, "date");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // OOS_STATUS_MAP
            return OOS_STATUS_MAP;
          case 2: // DATE
            return DATE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __DATE_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.OOS_STATUS_MAP, new org.apache.thrift.meta_data.FieldMetaData("oosStatusMap", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL))));
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addOosStatusForItem_args.class, metaDataMap);
    }

    public addOosStatusForItem_args() {
    }

    public addOosStatusForItem_args(
      Map<Long,Boolean> oosStatusMap,
      long date)
    {
      this();
      this.oosStatusMap = oosStatusMap;
      this.date = date;
      setDateIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addOosStatusForItem_args(addOosStatusForItem_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      if (other.isSetOosStatusMap()) {
        Map<Long,Boolean> __this__oosStatusMap = new HashMap<Long,Boolean>();
        for (Map.Entry<Long, Boolean> other_element : other.oosStatusMap.entrySet()) {

          Long other_element_key = other_element.getKey();
          Boolean other_element_value = other_element.getValue();

          Long __this__oosStatusMap_copy_key = other_element_key;

          Boolean __this__oosStatusMap_copy_value = other_element_value;

          __this__oosStatusMap.put(__this__oosStatusMap_copy_key, __this__oosStatusMap_copy_value);
        }
        this.oosStatusMap = __this__oosStatusMap;
      }
      this.date = other.date;
    }

    public addOosStatusForItem_args deepCopy() {
      return new addOosStatusForItem_args(this);
    }

    @Override
    public void clear() {
      this.oosStatusMap = null;
      setDateIsSet(false);
      this.date = 0;
    }

    public int getOosStatusMapSize() {
      return (this.oosStatusMap == null) ? 0 : this.oosStatusMap.size();
    }

    public void putToOosStatusMap(long key, boolean val) {
      if (this.oosStatusMap == null) {
        this.oosStatusMap = new HashMap<Long,Boolean>();
      }
      this.oosStatusMap.put(key, val);
    }

    public Map<Long,Boolean> getOosStatusMap() {
      return this.oosStatusMap;
    }

    public void setOosStatusMap(Map<Long,Boolean> oosStatusMap) {
      this.oosStatusMap = oosStatusMap;
    }

    public void unsetOosStatusMap() {
      this.oosStatusMap = null;
    }

    /** Returns true if field oosStatusMap is set (has been assigned a value) and false otherwise */
    public boolean isSetOosStatusMap() {
      return this.oosStatusMap != null;
    }

    public void setOosStatusMapIsSet(boolean value) {
      if (!value) {
        this.oosStatusMap = null;
      }
    }

    public long getDate() {
      return this.date;
    }

    public void setDate(long date) {
      this.date = date;
      setDateIsSet(true);
    }

    public void unsetDate() {
      __isset_bit_vector.clear(__DATE_ISSET_ID);
    }

    /** Returns true if field date is set (has been assigned a value) and false otherwise */
    public boolean isSetDate() {
      return __isset_bit_vector.get(__DATE_ISSET_ID);
    }

    public void setDateIsSet(boolean value) {
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case OOS_STATUS_MAP:
        if (value == null) {
          unsetOosStatusMap();
        } else {
          setOosStatusMap((Map<Long,Boolean>)value);
        }
        break;

      case DATE:
        if (value == null) {
          unsetDate();
        } else {
          setDate((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case OOS_STATUS_MAP:
        return getOosStatusMap();

      case DATE:
        return Long.valueOf(getDate());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case OOS_STATUS_MAP:
        return isSetOosStatusMap();
      case DATE:
        return isSetDate();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addOosStatusForItem_args)
        return this.equals((addOosStatusForItem_args)that);
      return false;
    }

    public boolean equals(addOosStatusForItem_args that) {
      if (that == null)
        return false;

      boolean this_present_oosStatusMap = true && this.isSetOosStatusMap();
      boolean that_present_oosStatusMap = true && that.isSetOosStatusMap();
      if (this_present_oosStatusMap || that_present_oosStatusMap) {
        if (!(this_present_oosStatusMap && that_present_oosStatusMap))
          return false;
        if (!this.oosStatusMap.equals(that.oosStatusMap))
          return false;
      }

      boolean this_present_date = true;
      boolean that_present_date = true;
      if (this_present_date || that_present_date) {
        if (!(this_present_date && that_present_date))
          return false;
        if (this.date != that.date)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addOosStatusForItem_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addOosStatusForItem_args typedOther = (addOosStatusForItem_args)other;

      lastComparison = Boolean.valueOf(isSetOosStatusMap()).compareTo(typedOther.isSetOosStatusMap());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetOosStatusMap()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.oosStatusMap, typedOther.oosStatusMap);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDate()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // OOS_STATUS_MAP
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map109 = iprot.readMapBegin();
                this.oosStatusMap = new HashMap<Long,Boolean>(2*_map109.size);
                for (int _i110 = 0; _i110 < _map109.size; ++_i110)
                {
                  long _key111; // required
                  boolean _val112; // required
                  _key111 = iprot.readI64();
                  _val112 = iprot.readBool();
                  this.oosStatusMap.put(_key111, _val112);
                }
                iprot.readMapEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // DATE
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.date = iprot.readI64();
              setDateIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.oosStatusMap != null) {
        oprot.writeFieldBegin(OOS_STATUS_MAP_FIELD_DESC);
        {
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.BOOL, this.oosStatusMap.size()));
          for (Map.Entry<Long, Boolean> _iter113 : this.oosStatusMap.entrySet())
          {
            oprot.writeI64(_iter113.getKey());
            oprot.writeBool(_iter113.getValue());
          }
          oprot.writeMapEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(DATE_FIELD_DESC);
      oprot.writeI64(this.date);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addOosStatusForItem_args(");
      boolean first = true;

      sb.append("oosStatusMap:");
      if (this.oosStatusMap == null) {
        sb.append("null");
      } else {
        sb.append(this.oosStatusMap);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("date:");
      sb.append(this.date);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addOosStatusForItem_result implements org.apache.thrift.TBase<addOosStatusForItem_result, addOosStatusForItem_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addOosStatusForItem_result");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addOosStatusForItem_result.class, metaDataMap);
    }

    public addOosStatusForItem_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addOosStatusForItem_result(addOosStatusForItem_result other) {
    }

    public addOosStatusForItem_result deepCopy() {
      return new addOosStatusForItem_result(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addOosStatusForItem_result)
        return this.equals((addOosStatusForItem_result)that);
      return false;
    }

    public boolean equals(addOosStatusForItem_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addOosStatusForItem_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addOosStatusForItem_result typedOther = (addOosStatusForItem_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addOosStatusForItem_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getOosStatusesForXDaysForItem_args implements org.apache.thrift.TBase<getOosStatusesForXDaysForItem_args, getOosStatusesForXDaysForItem_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOosStatusesForXDaysForItem_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField SOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sourceId", org.apache.thrift.protocol.TType.I32, (short)2);
    private static final org.apache.thrift.protocol.TField DAYS_FIELD_DESC = new org.apache.thrift.protocol.TField("days", org.apache.thrift.protocol.TType.I32, (short)3);

    private long itemId; // required
    private int sourceId; // required
    private int days; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "itemId"),
      SOURCE_ID((short)2, "sourceId"),
      DAYS((short)3, "days");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // SOURCE_ID
            return SOURCE_ID;
          case 3: // DAYS
            return DAYS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEMID_ISSET_ID = 0;
    private static final int __SOURCEID_ISSET_ID = 1;
    private static final int __DAYS_ISSET_ID = 2;
    private BitSet __isset_bit_vector = new BitSet(3);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("sourceId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      tmpMap.put(_Fields.DAYS, new org.apache.thrift.meta_data.FieldMetaData("days", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOosStatusesForXDaysForItem_args.class, metaDataMap);
    }

    public getOosStatusesForXDaysForItem_args() {
    }

    public getOosStatusesForXDaysForItem_args(
      long itemId,
      int sourceId,
      int days)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
      this.days = days;
      setDaysIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getOosStatusesForXDaysForItem_args(getOosStatusesForXDaysForItem_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
      this.sourceId = other.sourceId;
      this.days = other.days;
    }

    public getOosStatusesForXDaysForItem_args deepCopy() {
      return new getOosStatusesForXDaysForItem_args(this);
    }

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
      setSourceIdIsSet(false);
      this.sourceId = 0;
      setDaysIsSet(false);
      this.days = 0;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public int getSourceId() {
      return this.sourceId;
    }

    public void setSourceId(int sourceId) {
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
    }

    public void unsetSourceId() {
      __isset_bit_vector.clear(__SOURCEID_ISSET_ID);
    }

    /** Returns true if field sourceId is set (has been assigned a value) and false otherwise */
    public boolean isSetSourceId() {
      return __isset_bit_vector.get(__SOURCEID_ISSET_ID);
    }

    public void setSourceIdIsSet(boolean value) {
      __isset_bit_vector.set(__SOURCEID_ISSET_ID, value);
    }

    public int getDays() {
      return this.days;
    }

    public void setDays(int days) {
      this.days = days;
      setDaysIsSet(true);
    }

    public void unsetDays() {
      __isset_bit_vector.clear(__DAYS_ISSET_ID);
    }

    /** Returns true if field days is set (has been assigned a value) and false otherwise */
    public boolean isSetDays() {
      return __isset_bit_vector.get(__DAYS_ISSET_ID);
    }

    public void setDaysIsSet(boolean value) {
      __isset_bit_vector.set(__DAYS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      case SOURCE_ID:
        if (value == null) {
          unsetSourceId();
        } else {
          setSourceId((Integer)value);
        }
        break;

      case DAYS:
        if (value == null) {
          unsetDays();
        } else {
          setDays((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItemId());

      case SOURCE_ID:
        return Integer.valueOf(getSourceId());

      case DAYS:
        return Integer.valueOf(getDays());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItemId();
      case SOURCE_ID:
        return isSetSourceId();
      case DAYS:
        return isSetDays();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getOosStatusesForXDaysForItem_args)
        return this.equals((getOosStatusesForXDaysForItem_args)that);
      return false;
    }

    public boolean equals(getOosStatusesForXDaysForItem_args that) {
      if (that == null)
        return false;

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      boolean this_present_sourceId = true;
      boolean that_present_sourceId = true;
      if (this_present_sourceId || that_present_sourceId) {
        if (!(this_present_sourceId && that_present_sourceId))
          return false;
        if (this.sourceId != that.sourceId)
          return false;
      }

      boolean this_present_days = true;
      boolean that_present_days = true;
      if (this_present_days || that_present_days) {
        if (!(this_present_days && that_present_days))
          return false;
        if (this.days != that.days)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getOosStatusesForXDaysForItem_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getOosStatusesForXDaysForItem_args typedOther = (getOosStatusesForXDaysForItem_args)other;

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSourceId()).compareTo(typedOther.isSetSourceId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSourceId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sourceId, typedOther.sourceId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetDays()).compareTo(typedOther.isSetDays());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDays()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.days, typedOther.days);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SOURCE_ID
            if (field.type == org.apache.thrift.protocol.TType.I32) {
              this.sourceId = iprot.readI32();
              setSourceIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // DAYS
            if (field.type == org.apache.thrift.protocol.TType.I32) {
              this.days = iprot.readI32();
              setDaysIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SOURCE_ID_FIELD_DESC);
      oprot.writeI32(this.sourceId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(DAYS_FIELD_DESC);
      oprot.writeI32(this.days);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getOosStatusesForXDaysForItem_args(");
      boolean first = true;

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("sourceId:");
      sb.append(this.sourceId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("days:");
      sb.append(this.days);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getOosStatusesForXDaysForItem_result implements org.apache.thrift.TBase<getOosStatusesForXDaysForItem_result, getOosStatusesForXDaysForItem_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOosStatusesForXDaysForItem_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<OOSStatus> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OOSStatus.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOosStatusesForXDaysForItem_result.class, metaDataMap);
    }

    public getOosStatusesForXDaysForItem_result() {
    }

    public getOosStatusesForXDaysForItem_result(
      List<OOSStatus> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getOosStatusesForXDaysForItem_result(getOosStatusesForXDaysForItem_result other) {
      if (other.isSetSuccess()) {
        List<OOSStatus> __this__success = new ArrayList<OOSStatus>();
        for (OOSStatus other_element : other.success) {
          __this__success.add(new OOSStatus(other_element));
        }
        this.success = __this__success;
      }
    }

    public getOosStatusesForXDaysForItem_result deepCopy() {
      return new getOosStatusesForXDaysForItem_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<OOSStatus> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(OOSStatus elem) {
      if (this.success == null) {
        this.success = new ArrayList<OOSStatus>();
      }
      this.success.add(elem);
    }

    public List<OOSStatus> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<OOSStatus> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<OOSStatus>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getOosStatusesForXDaysForItem_result)
        return this.equals((getOosStatusesForXDaysForItem_result)that);
      return false;
    }

    public boolean equals(getOosStatusesForXDaysForItem_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getOosStatusesForXDaysForItem_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getOosStatusesForXDaysForItem_result typedOther = (getOosStatusesForXDaysForItem_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list114 = iprot.readListBegin();
                this.success = new ArrayList<OOSStatus>(_list114.size);
                for (int _i115 = 0; _i115 < _list114.size; ++_i115)
                {
                  OOSStatus _elem116; // required
                  _elem116 = new OOSStatus();
                  _elem116.read(iprot);
                  this.success.add(_elem116);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (OOSStatus _iter117 : this.success)
          {
            _iter117.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getOosStatusesForXDaysForItem_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getOosStatusesForXDays_args implements org.apache.thrift.TBase<getOosStatusesForXDays_args, getOosStatusesForXDays_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOosStatusesForXDays_args");

    private static final org.apache.thrift.protocol.TField SOURCE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("sourceId", org.apache.thrift.protocol.TType.I32, (short)1);
    private static final org.apache.thrift.protocol.TField DAYS_FIELD_DESC = new org.apache.thrift.protocol.TField("days", org.apache.thrift.protocol.TType.I32, (short)2);

    private int sourceId; // required
    private int days; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SOURCE_ID((short)1, "sourceId"),
      DAYS((short)2, "days");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SOURCE_ID
            return SOURCE_ID;
          case 2: // DAYS
            return DAYS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SOURCEID_ISSET_ID = 0;
    private static final int __DAYS_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SOURCE_ID, new org.apache.thrift.meta_data.FieldMetaData("sourceId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      tmpMap.put(_Fields.DAYS, new org.apache.thrift.meta_data.FieldMetaData("days", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOosStatusesForXDays_args.class, metaDataMap);
    }

    public getOosStatusesForXDays_args() {
    }

    public getOosStatusesForXDays_args(
      int sourceId,
      int days)
    {
      this();
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
      this.days = days;
      setDaysIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getOosStatusesForXDays_args(getOosStatusesForXDays_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.sourceId = other.sourceId;
      this.days = other.days;
    }

    public getOosStatusesForXDays_args deepCopy() {
      return new getOosStatusesForXDays_args(this);
    }

    @Override
    public void clear() {
      setSourceIdIsSet(false);
      this.sourceId = 0;
      setDaysIsSet(false);
      this.days = 0;
    }

    public int getSourceId() {
      return this.sourceId;
    }

    public void setSourceId(int sourceId) {
      this.sourceId = sourceId;
      setSourceIdIsSet(true);
    }

    public void unsetSourceId() {
      __isset_bit_vector.clear(__SOURCEID_ISSET_ID);
    }

    /** Returns true if field sourceId is set (has been assigned a value) and false otherwise */
    public boolean isSetSourceId() {
      return __isset_bit_vector.get(__SOURCEID_ISSET_ID);
    }

    public void setSourceIdIsSet(boolean value) {
      __isset_bit_vector.set(__SOURCEID_ISSET_ID, value);
    }

    public int getDays() {
      return this.days;
    }

    public void setDays(int days) {
      this.days = days;
      setDaysIsSet(true);
    }

    public void unsetDays() {
      __isset_bit_vector.clear(__DAYS_ISSET_ID);
    }

    /** Returns true if field days is set (has been assigned a value) and false otherwise */
    public boolean isSetDays() {
      return __isset_bit_vector.get(__DAYS_ISSET_ID);
    }

    public void setDaysIsSet(boolean value) {
      __isset_bit_vector.set(__DAYS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SOURCE_ID:
        if (value == null) {
          unsetSourceId();
        } else {
          setSourceId((Integer)value);
        }
        break;

      case DAYS:
        if (value == null) {
          unsetDays();
        } else {
          setDays((Integer)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SOURCE_ID:
        return Integer.valueOf(getSourceId());

      case DAYS:
        return Integer.valueOf(getDays());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SOURCE_ID:
        return isSetSourceId();
      case DAYS:
        return isSetDays();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getOosStatusesForXDays_args)
        return this.equals((getOosStatusesForXDays_args)that);
      return false;
    }

    public boolean equals(getOosStatusesForXDays_args that) {
      if (that == null)
        return false;

      boolean this_present_sourceId = true;
      boolean that_present_sourceId = true;
      if (this_present_sourceId || that_present_sourceId) {
        if (!(this_present_sourceId && that_present_sourceId))
          return false;
        if (this.sourceId != that.sourceId)
          return false;
      }

      boolean this_present_days = true;
      boolean that_present_days = true;
      if (this_present_days || that_present_days) {
        if (!(this_present_days && that_present_days))
          return false;
        if (this.days != that.days)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getOosStatusesForXDays_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getOosStatusesForXDays_args typedOther = (getOosStatusesForXDays_args)other;

      lastComparison = Boolean.valueOf(isSetSourceId()).compareTo(typedOther.isSetSourceId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSourceId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sourceId, typedOther.sourceId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetDays()).compareTo(typedOther.isSetDays());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetDays()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.days, typedOther.days);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // SOURCE_ID
            if (field.type == org.apache.thrift.protocol.TType.I32) {
              this.sourceId = iprot.readI32();
              setSourceIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // DAYS
            if (field.type == org.apache.thrift.protocol.TType.I32) {
              this.days = iprot.readI32();
              setDaysIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(SOURCE_ID_FIELD_DESC);
      oprot.writeI32(this.sourceId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(DAYS_FIELD_DESC);
      oprot.writeI32(this.days);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getOosStatusesForXDays_args(");
      boolean first = true;

      sb.append("sourceId:");
      sb.append(this.sourceId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("days:");
      sb.append(this.days);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getOosStatusesForXDays_result implements org.apache.thrift.TBase<getOosStatusesForXDays_result, getOosStatusesForXDays_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOosStatusesForXDays_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<OOSStatus> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, OOSStatus.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOosStatusesForXDays_result.class, metaDataMap);
    }

    public getOosStatusesForXDays_result() {
    }

    public getOosStatusesForXDays_result(
      List<OOSStatus> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getOosStatusesForXDays_result(getOosStatusesForXDays_result other) {
      if (other.isSetSuccess()) {
        List<OOSStatus> __this__success = new ArrayList<OOSStatus>();
        for (OOSStatus other_element : other.success) {
          __this__success.add(new OOSStatus(other_element));
        }
        this.success = __this__success;
      }
    }

    public getOosStatusesForXDays_result deepCopy() {
      return new getOosStatusesForXDays_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<OOSStatus> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(OOSStatus elem) {
      if (this.success == null) {
        this.success = new ArrayList<OOSStatus>();
      }
      this.success.add(elem);
    }

    public List<OOSStatus> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<OOSStatus> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<OOSStatus>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getOosStatusesForXDays_result)
        return this.equals((getOosStatusesForXDays_result)that);
      return false;
    }

    public boolean equals(getOosStatusesForXDays_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getOosStatusesForXDays_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getOosStatusesForXDays_result typedOther = (getOosStatusesForXDays_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list118 = iprot.readListBegin();
                this.success = new ArrayList<OOSStatus>(_list118.size);
                for (int _i119 = 0; _i119 < _list118.size; ++_i119)
                {
                  OOSStatus _elem120; // required
                  _elem120 = new OOSStatus();
                  _elem120.read(iprot);
                  this.success.add(_elem120);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (OOSStatus _iter121 : this.success)
          {
            _iter121.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getOosStatusesForXDays_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllVendorItemPricing_args implements org.apache.thrift.TBase<getAllVendorItemPricing_args, getAllVendorItemPricing_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllVendorItemPricing_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField VENDOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorId", org.apache.thrift.protocol.TType.I64, (short)2);

    private long itemId; // required
    private long vendorId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "itemId"),
      VENDOR_ID((short)2, "vendorId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // VENDOR_ID
            return VENDOR_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEMID_ISSET_ID = 0;
    private static final int __VENDORID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.VENDOR_ID, new org.apache.thrift.meta_data.FieldMetaData("vendorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllVendorItemPricing_args.class, metaDataMap);
    }

    public getAllVendorItemPricing_args() {
    }

    public getAllVendorItemPricing_args(
      long itemId,
      long vendorId)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
      this.vendorId = vendorId;
      setVendorIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllVendorItemPricing_args(getAllVendorItemPricing_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
      this.vendorId = other.vendorId;
    }

    public getAllVendorItemPricing_args deepCopy() {
      return new getAllVendorItemPricing_args(this);
    }

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
      setVendorIdIsSet(false);
      this.vendorId = 0;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public long getVendorId() {
      return this.vendorId;
    }

    public void setVendorId(long vendorId) {
      this.vendorId = vendorId;
      setVendorIdIsSet(true);
    }

    public void unsetVendorId() {
      __isset_bit_vector.clear(__VENDORID_ISSET_ID);
    }

    /** Returns true if field vendorId is set (has been assigned a value) and false otherwise */
    public boolean isSetVendorId() {
      return __isset_bit_vector.get(__VENDORID_ISSET_ID);
    }

    public void setVendorIdIsSet(boolean value) {
      __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      case VENDOR_ID:
        if (value == null) {
          unsetVendorId();
        } else {
          setVendorId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItemId());

      case VENDOR_ID:
        return Long.valueOf(getVendorId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItemId();
      case VENDOR_ID:
        return isSetVendorId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllVendorItemPricing_args)
        return this.equals((getAllVendorItemPricing_args)that);
      return false;
    }

    public boolean equals(getAllVendorItemPricing_args that) {
      if (that == null)
        return false;

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      boolean this_present_vendorId = true;
      boolean that_present_vendorId = true;
      if (this_present_vendorId || that_present_vendorId) {
        if (!(this_present_vendorId && that_present_vendorId))
          return false;
        if (this.vendorId != that.vendorId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllVendorItemPricing_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllVendorItemPricing_args typedOther = (getAllVendorItemPricing_args)other;

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetVendorId()).compareTo(typedOther.isSetVendorId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetVendorId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorId, typedOther.vendorId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // VENDOR_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.vendorId = iprot.readI64();
              setVendorIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
      oprot.writeI64(this.vendorId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllVendorItemPricing_args(");
      boolean first = true;

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("vendorId:");
      sb.append(this.vendorId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllVendorItemPricing_result implements org.apache.thrift.TBase<getAllVendorItemPricing_result, getAllVendorItemPricing_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllVendorItemPricing_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<VendorItemPricing> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, VendorItemPricing.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllVendorItemPricing_result.class, metaDataMap);
    }

    public getAllVendorItemPricing_result() {
    }

    public getAllVendorItemPricing_result(
      List<VendorItemPricing> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllVendorItemPricing_result(getAllVendorItemPricing_result other) {
      if (other.isSetSuccess()) {
        List<VendorItemPricing> __this__success = new ArrayList<VendorItemPricing>();
        for (VendorItemPricing other_element : other.success) {
          __this__success.add(new VendorItemPricing(other_element));
        }
        this.success = __this__success;
      }
    }

    public getAllVendorItemPricing_result deepCopy() {
      return new getAllVendorItemPricing_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<VendorItemPricing> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(VendorItemPricing elem) {
      if (this.success == null) {
        this.success = new ArrayList<VendorItemPricing>();
      }
      this.success.add(elem);
    }

    public List<VendorItemPricing> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<VendorItemPricing> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<VendorItemPricing>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllVendorItemPricing_result)
        return this.equals((getAllVendorItemPricing_result)that);
      return false;
    }

    public boolean equals(getAllVendorItemPricing_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllVendorItemPricing_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllVendorItemPricing_result typedOther = (getAllVendorItemPricing_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list122 = iprot.readListBegin();
                this.success = new ArrayList<VendorItemPricing>(_list122.size);
                for (int _i123 = 0; _i123 < _list122.size; ++_i123)
                {
                  VendorItemPricing _elem124; // required
                  _elem124 = new VendorItemPricing();
                  _elem124.read(iprot);
                  this.success.add(_elem124);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (VendorItemPricing _iter125 : this.success)
          {
            _iter125.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllVendorItemPricing_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getNonZeroItemStockPurchaseParams_args implements org.apache.thrift.TBase<getNonZeroItemStockPurchaseParams_args, getNonZeroItemStockPurchaseParams_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonZeroItemStockPurchaseParams_args");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonZeroItemStockPurchaseParams_args.class, metaDataMap);
    }

    public getNonZeroItemStockPurchaseParams_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getNonZeroItemStockPurchaseParams_args(getNonZeroItemStockPurchaseParams_args other) {
    }

    public getNonZeroItemStockPurchaseParams_args deepCopy() {
      return new getNonZeroItemStockPurchaseParams_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getNonZeroItemStockPurchaseParams_args)
        return this.equals((getNonZeroItemStockPurchaseParams_args)that);
      return false;
    }

    public boolean equals(getNonZeroItemStockPurchaseParams_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getNonZeroItemStockPurchaseParams_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getNonZeroItemStockPurchaseParams_args typedOther = (getNonZeroItemStockPurchaseParams_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getNonZeroItemStockPurchaseParams_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getNonZeroItemStockPurchaseParams_result implements org.apache.thrift.TBase<getNonZeroItemStockPurchaseParams_result, getNonZeroItemStockPurchaseParams_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonZeroItemStockPurchaseParams_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<ItemStockPurchaseParams> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ItemStockPurchaseParams.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonZeroItemStockPurchaseParams_result.class, metaDataMap);
    }

    public getNonZeroItemStockPurchaseParams_result() {
    }

    public getNonZeroItemStockPurchaseParams_result(
      List<ItemStockPurchaseParams> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getNonZeroItemStockPurchaseParams_result(getNonZeroItemStockPurchaseParams_result other) {
      if (other.isSetSuccess()) {
        List<ItemStockPurchaseParams> __this__success = new ArrayList<ItemStockPurchaseParams>();
        for (ItemStockPurchaseParams other_element : other.success) {
          __this__success.add(new ItemStockPurchaseParams(other_element));
        }
        this.success = __this__success;
      }
    }

    public getNonZeroItemStockPurchaseParams_result deepCopy() {
      return new getNonZeroItemStockPurchaseParams_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<ItemStockPurchaseParams> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(ItemStockPurchaseParams elem) {
      if (this.success == null) {
        this.success = new ArrayList<ItemStockPurchaseParams>();
      }
      this.success.add(elem);
    }

    public List<ItemStockPurchaseParams> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<ItemStockPurchaseParams> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<ItemStockPurchaseParams>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getNonZeroItemStockPurchaseParams_result)
        return this.equals((getNonZeroItemStockPurchaseParams_result)that);
      return false;
    }

    public boolean equals(getNonZeroItemStockPurchaseParams_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getNonZeroItemStockPurchaseParams_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getNonZeroItemStockPurchaseParams_result typedOther = (getNonZeroItemStockPurchaseParams_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list126 = iprot.readListBegin();
                this.success = new ArrayList<ItemStockPurchaseParams>(_list126.size);
                for (int _i127 = 0; _i127 < _list126.size; ++_i127)
                {
                  ItemStockPurchaseParams _elem128; // required
                  _elem128 = new ItemStockPurchaseParams();
                  _elem128.read(iprot);
                  this.success.add(_elem128);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (ItemStockPurchaseParams _iter129 : this.success)
          {
            _iter129.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getNonZeroItemStockPurchaseParams_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getBillableInventoryAndPendingOrders_args implements org.apache.thrift.TBase<getBillableInventoryAndPendingOrders_args, getBillableInventoryAndPendingOrders_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getBillableInventoryAndPendingOrders_args");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getBillableInventoryAndPendingOrders_args.class, metaDataMap);
    }

    public getBillableInventoryAndPendingOrders_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getBillableInventoryAndPendingOrders_args(getBillableInventoryAndPendingOrders_args other) {
    }

    public getBillableInventoryAndPendingOrders_args deepCopy() {
      return new getBillableInventoryAndPendingOrders_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getBillableInventoryAndPendingOrders_args)
        return this.equals((getBillableInventoryAndPendingOrders_args)that);
      return false;
    }

    public boolean equals(getBillableInventoryAndPendingOrders_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getBillableInventoryAndPendingOrders_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getBillableInventoryAndPendingOrders_args typedOther = (getBillableInventoryAndPendingOrders_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getBillableInventoryAndPendingOrders_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getBillableInventoryAndPendingOrders_result implements org.apache.thrift.TBase<getBillableInventoryAndPendingOrders_result, getBillableInventoryAndPendingOrders_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getBillableInventoryAndPendingOrders_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<AvailableAndReservedStock> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AvailableAndReservedStock.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getBillableInventoryAndPendingOrders_result.class, metaDataMap);
    }

    public getBillableInventoryAndPendingOrders_result() {
    }

    public getBillableInventoryAndPendingOrders_result(
      List<AvailableAndReservedStock> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getBillableInventoryAndPendingOrders_result(getBillableInventoryAndPendingOrders_result other) {
      if (other.isSetSuccess()) {
        List<AvailableAndReservedStock> __this__success = new ArrayList<AvailableAndReservedStock>();
        for (AvailableAndReservedStock other_element : other.success) {
          __this__success.add(new AvailableAndReservedStock(other_element));
        }
        this.success = __this__success;
      }
    }

    public getBillableInventoryAndPendingOrders_result deepCopy() {
      return new getBillableInventoryAndPendingOrders_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<AvailableAndReservedStock> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(AvailableAndReservedStock elem) {
      if (this.success == null) {
        this.success = new ArrayList<AvailableAndReservedStock>();
      }
      this.success.add(elem);
    }

    public List<AvailableAndReservedStock> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<AvailableAndReservedStock> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<AvailableAndReservedStock>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getBillableInventoryAndPendingOrders_result)
        return this.equals((getBillableInventoryAndPendingOrders_result)that);
      return false;
    }

    public boolean equals(getBillableInventoryAndPendingOrders_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getBillableInventoryAndPendingOrders_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getBillableInventoryAndPendingOrders_result typedOther = (getBillableInventoryAndPendingOrders_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list130 = iprot.readListBegin();
                this.success = new ArrayList<AvailableAndReservedStock>(_list130.size);
                for (int _i131 = 0; _i131 < _list130.size; ++_i131)
                {
                  AvailableAndReservedStock _elem132; // required
                  _elem132 = new AvailableAndReservedStock();
                  _elem132.read(iprot);
                  this.success.add(_elem132);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (AvailableAndReservedStock _iter133 : this.success)
          {
            _iter133.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getBillableInventoryAndPendingOrders_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getWarehouseName_args implements org.apache.thrift.TBase<getWarehouseName_args, getWarehouseName_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getWarehouseName_args");

    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouse_id", org.apache.thrift.protocol.TType.I64, (short)1);

    private long warehouse_id; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      WAREHOUSE_ID((short)1, "warehouse_id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __WAREHOUSE_ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouse_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getWarehouseName_args.class, metaDataMap);
    }

    public getWarehouseName_args() {
    }

    public getWarehouseName_args(
      long warehouse_id)
    {
      this();
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getWarehouseName_args(getWarehouseName_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.warehouse_id = other.warehouse_id;
    }

    public getWarehouseName_args deepCopy() {
      return new getWarehouseName_args(this);
    }

    @Override
    public void clear() {
      setWarehouse_idIsSet(false);
      this.warehouse_id = 0;
    }

    public long getWarehouse_id() {
      return this.warehouse_id;
    }

    public void setWarehouse_id(long warehouse_id) {
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    public void unsetWarehouse_id() {
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
    }

    /** Returns true if field warehouse_id is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouse_id() {
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
    }

    public void setWarehouse_idIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouse_id();
        } else {
          setWarehouse_id((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouse_id());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case WAREHOUSE_ID:
        return isSetWarehouse_id();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getWarehouseName_args)
        return this.equals((getWarehouseName_args)that);
      return false;
    }

    public boolean equals(getWarehouseName_args that) {
      if (that == null)
        return false;

      boolean this_present_warehouse_id = true;
      boolean that_present_warehouse_id = true;
      if (this_present_warehouse_id || that_present_warehouse_id) {
        if (!(this_present_warehouse_id && that_present_warehouse_id))
          return false;
        if (this.warehouse_id != that.warehouse_id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getWarehouseName_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getWarehouseName_args typedOther = (getWarehouseName_args)other;

      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(typedOther.isSetWarehouse_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouse_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouse_id, typedOther.warehouse_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouse_id = iprot.readI64();
              setWarehouse_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouse_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getWarehouseName_args(");
      boolean first = true;

      sb.append("warehouse_id:");
      sb.append(this.warehouse_id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getWarehouseName_result implements org.apache.thrift.TBase<getWarehouseName_result, getWarehouseName_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getWarehouseName_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);

    private String success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getWarehouseName_result.class, metaDataMap);
    }

    public getWarehouseName_result() {
    }

    public getWarehouseName_result(
      String success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getWarehouseName_result(getWarehouseName_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
    }

    public getWarehouseName_result deepCopy() {
      return new getWarehouseName_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public String getSuccess() {
      return this.success;
    }

    public void setSuccess(String success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getWarehouseName_result)
        return this.equals((getWarehouseName_result)that);
      return false;
    }

    public boolean equals(getWarehouseName_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getWarehouseName_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getWarehouseName_result typedOther = (getWarehouseName_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.success = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getWarehouseName_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAmazonInventoryForItem_args implements org.apache.thrift.TBase<getAmazonInventoryForItem_args, getAmazonInventoryForItem_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAmazonInventoryForItem_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)1);

    private long item_id; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "item_id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEM_ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAmazonInventoryForItem_args.class, metaDataMap);
    }

    public getAmazonInventoryForItem_args() {
    }

    public getAmazonInventoryForItem_args(
      long item_id)
    {
      this();
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAmazonInventoryForItem_args(getAmazonInventoryForItem_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.item_id = other.item_id;
    }

    public getAmazonInventoryForItem_args deepCopy() {
      return new getAmazonInventoryForItem_args(this);
    }

    @Override
    public void clear() {
      setItem_idIsSet(false);
      this.item_id = 0;
    }

    public long getItem_id() {
      return this.item_id;
    }

    public void setItem_id(long item_id) {
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    public void unsetItem_id() {
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
    }

    /** Returns true if field item_id is set (has been assigned a value) and false otherwise */
    public boolean isSetItem_id() {
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
    }

    public void setItem_idIsSet(boolean value) {
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItem_id();
        } else {
          setItem_id((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItem_id());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItem_id();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAmazonInventoryForItem_args)
        return this.equals((getAmazonInventoryForItem_args)that);
      return false;
    }

    public boolean equals(getAmazonInventoryForItem_args that) {
      if (that == null)
        return false;

      boolean this_present_item_id = true;
      boolean that_present_item_id = true;
      if (this_present_item_id || that_present_item_id) {
        if (!(this_present_item_id && that_present_item_id))
          return false;
        if (this.item_id != that.item_id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAmazonInventoryForItem_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAmazonInventoryForItem_args typedOther = (getAmazonInventoryForItem_args)other;

      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItem_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.item_id = iprot.readI64();
              setItem_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.item_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAmazonInventoryForItem_args(");
      boolean first = true;

      sb.append("item_id:");
      sb.append(this.item_id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAmazonInventoryForItem_result implements org.apache.thrift.TBase<getAmazonInventoryForItem_result, getAmazonInventoryForItem_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAmazonInventoryForItem_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);

    private AmazonInventorySnapshot success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AmazonInventorySnapshot.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAmazonInventoryForItem_result.class, metaDataMap);
    }

    public getAmazonInventoryForItem_result() {
    }

    public getAmazonInventoryForItem_result(
      AmazonInventorySnapshot success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAmazonInventoryForItem_result(getAmazonInventoryForItem_result other) {
      if (other.isSetSuccess()) {
        this.success = new AmazonInventorySnapshot(other.success);
      }
    }

    public getAmazonInventoryForItem_result deepCopy() {
      return new getAmazonInventoryForItem_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public AmazonInventorySnapshot getSuccess() {
      return this.success;
    }

    public void setSuccess(AmazonInventorySnapshot success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((AmazonInventorySnapshot)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAmazonInventoryForItem_result)
        return this.equals((getAmazonInventoryForItem_result)that);
      return false;
    }

    public boolean equals(getAmazonInventoryForItem_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAmazonInventoryForItem_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAmazonInventoryForItem_result typedOther = (getAmazonInventoryForItem_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new AmazonInventorySnapshot();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAmazonInventoryForItem_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllAmazonInventory_args implements org.apache.thrift.TBase<getAllAmazonInventory_args, getAllAmazonInventory_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllAmazonInventory_args");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllAmazonInventory_args.class, metaDataMap);
    }

    public getAllAmazonInventory_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllAmazonInventory_args(getAllAmazonInventory_args other) {
    }

    public getAllAmazonInventory_args deepCopy() {
      return new getAllAmazonInventory_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllAmazonInventory_args)
        return this.equals((getAllAmazonInventory_args)that);
      return false;
    }

    public boolean equals(getAllAmazonInventory_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllAmazonInventory_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllAmazonInventory_args typedOther = (getAllAmazonInventory_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllAmazonInventory_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllAmazonInventory_result implements org.apache.thrift.TBase<getAllAmazonInventory_result, getAllAmazonInventory_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllAmazonInventory_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<AmazonInventorySnapshot> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AmazonInventorySnapshot.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllAmazonInventory_result.class, metaDataMap);
    }

    public getAllAmazonInventory_result() {
    }

    public getAllAmazonInventory_result(
      List<AmazonInventorySnapshot> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllAmazonInventory_result(getAllAmazonInventory_result other) {
      if (other.isSetSuccess()) {
        List<AmazonInventorySnapshot> __this__success = new ArrayList<AmazonInventorySnapshot>();
        for (AmazonInventorySnapshot other_element : other.success) {
          __this__success.add(new AmazonInventorySnapshot(other_element));
        }
        this.success = __this__success;
      }
    }

    public getAllAmazonInventory_result deepCopy() {
      return new getAllAmazonInventory_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<AmazonInventorySnapshot> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(AmazonInventorySnapshot elem) {
      if (this.success == null) {
        this.success = new ArrayList<AmazonInventorySnapshot>();
      }
      this.success.add(elem);
    }

    public List<AmazonInventorySnapshot> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<AmazonInventorySnapshot> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<AmazonInventorySnapshot>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllAmazonInventory_result)
        return this.equals((getAllAmazonInventory_result)that);
      return false;
    }

    public boolean equals(getAllAmazonInventory_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllAmazonInventory_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllAmazonInventory_result typedOther = (getAllAmazonInventory_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list134 = iprot.readListBegin();
                this.success = new ArrayList<AmazonInventorySnapshot>(_list134.size);
                for (int _i135 = 0; _i135 < _list134.size; ++_i135)
                {
                  AmazonInventorySnapshot _elem136; // required
                  _elem136 = new AmazonInventorySnapshot();
                  _elem136.read(iprot);
                  this.success.add(_elem136);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (AmazonInventorySnapshot _iter137 : this.success)
          {
            _iter137.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllAmazonInventory_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addOrUpdateAmazonInventoryForItem_args implements org.apache.thrift.TBase<addOrUpdateAmazonInventoryForItem_args, addOrUpdateAmazonInventoryForItem_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addOrUpdateAmazonInventoryForItem_args");

    private static final org.apache.thrift.protocol.TField AMAZON_INVENTORY_SNAPSHOT_FIELD_DESC = new org.apache.thrift.protocol.TField("amazonInventorySnapshot", org.apache.thrift.protocol.TType.STRUCT, (short)1);
    private static final org.apache.thrift.protocol.TField TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("time", org.apache.thrift.protocol.TType.I64, (short)2);

    private AmazonInventorySnapshot amazonInventorySnapshot; // required
    private long time; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      AMAZON_INVENTORY_SNAPSHOT((short)1, "amazonInventorySnapshot"),
      TIME((short)2, "time");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // AMAZON_INVENTORY_SNAPSHOT
            return AMAZON_INVENTORY_SNAPSHOT;
          case 2: // TIME
            return TIME;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __TIME_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.AMAZON_INVENTORY_SNAPSHOT, new org.apache.thrift.meta_data.FieldMetaData("amazonInventorySnapshot", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AmazonInventorySnapshot.class)));
      tmpMap.put(_Fields.TIME, new org.apache.thrift.meta_data.FieldMetaData("time", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addOrUpdateAmazonInventoryForItem_args.class, metaDataMap);
    }

    public addOrUpdateAmazonInventoryForItem_args() {
    }

    public addOrUpdateAmazonInventoryForItem_args(
      AmazonInventorySnapshot amazonInventorySnapshot,
      long time)
    {
      this();
      this.amazonInventorySnapshot = amazonInventorySnapshot;
      this.time = time;
      setTimeIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addOrUpdateAmazonInventoryForItem_args(addOrUpdateAmazonInventoryForItem_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      if (other.isSetAmazonInventorySnapshot()) {
        this.amazonInventorySnapshot = new AmazonInventorySnapshot(other.amazonInventorySnapshot);
      }
      this.time = other.time;
    }

    public addOrUpdateAmazonInventoryForItem_args deepCopy() {
      return new addOrUpdateAmazonInventoryForItem_args(this);
    }

    @Override
    public void clear() {
      this.amazonInventorySnapshot = null;
      setTimeIsSet(false);
      this.time = 0;
    }

    public AmazonInventorySnapshot getAmazonInventorySnapshot() {
      return this.amazonInventorySnapshot;
    }

    public void setAmazonInventorySnapshot(AmazonInventorySnapshot amazonInventorySnapshot) {
      this.amazonInventorySnapshot = amazonInventorySnapshot;
    }

    public void unsetAmazonInventorySnapshot() {
      this.amazonInventorySnapshot = null;
    }

    /** Returns true if field amazonInventorySnapshot is set (has been assigned a value) and false otherwise */
    public boolean isSetAmazonInventorySnapshot() {
      return this.amazonInventorySnapshot != null;
    }

    public void setAmazonInventorySnapshotIsSet(boolean value) {
      if (!value) {
        this.amazonInventorySnapshot = null;
      }
    }

    public long getTime() {
      return this.time;
    }

    public void setTime(long time) {
      this.time = time;
      setTimeIsSet(true);
    }

    public void unsetTime() {
      __isset_bit_vector.clear(__TIME_ISSET_ID);
    }

    /** Returns true if field time is set (has been assigned a value) and false otherwise */
    public boolean isSetTime() {
      return __isset_bit_vector.get(__TIME_ISSET_ID);
    }

    public void setTimeIsSet(boolean value) {
      __isset_bit_vector.set(__TIME_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AMAZON_INVENTORY_SNAPSHOT:
        if (value == null) {
          unsetAmazonInventorySnapshot();
        } else {
          setAmazonInventorySnapshot((AmazonInventorySnapshot)value);
        }
        break;

      case TIME:
        if (value == null) {
          unsetTime();
        } else {
          setTime((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AMAZON_INVENTORY_SNAPSHOT:
        return getAmazonInventorySnapshot();

      case TIME:
        return Long.valueOf(getTime());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case AMAZON_INVENTORY_SNAPSHOT:
        return isSetAmazonInventorySnapshot();
      case TIME:
        return isSetTime();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addOrUpdateAmazonInventoryForItem_args)
        return this.equals((addOrUpdateAmazonInventoryForItem_args)that);
      return false;
    }

    public boolean equals(addOrUpdateAmazonInventoryForItem_args that) {
      if (that == null)
        return false;

      boolean this_present_amazonInventorySnapshot = true && this.isSetAmazonInventorySnapshot();
      boolean that_present_amazonInventorySnapshot = true && that.isSetAmazonInventorySnapshot();
      if (this_present_amazonInventorySnapshot || that_present_amazonInventorySnapshot) {
        if (!(this_present_amazonInventorySnapshot && that_present_amazonInventorySnapshot))
          return false;
        if (!this.amazonInventorySnapshot.equals(that.amazonInventorySnapshot))
          return false;
      }

      boolean this_present_time = true;
      boolean that_present_time = true;
      if (this_present_time || that_present_time) {
        if (!(this_present_time && that_present_time))
          return false;
        if (this.time != that.time)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addOrUpdateAmazonInventoryForItem_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addOrUpdateAmazonInventoryForItem_args typedOther = (addOrUpdateAmazonInventoryForItem_args)other;

      lastComparison = Boolean.valueOf(isSetAmazonInventorySnapshot()).compareTo(typedOther.isSetAmazonInventorySnapshot());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAmazonInventorySnapshot()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amazonInventorySnapshot, typedOther.amazonInventorySnapshot);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetTime()).compareTo(typedOther.isSetTime());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTime()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.time, typedOther.time);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AMAZON_INVENTORY_SNAPSHOT
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.amazonInventorySnapshot = new AmazonInventorySnapshot();
              this.amazonInventorySnapshot.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // TIME
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.time = iprot.readI64();
              setTimeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.amazonInventorySnapshot != null) {
        oprot.writeFieldBegin(AMAZON_INVENTORY_SNAPSHOT_FIELD_DESC);
        this.amazonInventorySnapshot.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(TIME_FIELD_DESC);
      oprot.writeI64(this.time);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addOrUpdateAmazonInventoryForItem_args(");
      boolean first = true;

      sb.append("amazonInventorySnapshot:");
      if (this.amazonInventorySnapshot == null) {
        sb.append("null");
      } else {
        sb.append(this.amazonInventorySnapshot);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("time:");
      sb.append(this.time);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addOrUpdateAmazonInventoryForItem_result implements org.apache.thrift.TBase<addOrUpdateAmazonInventoryForItem_result, addOrUpdateAmazonInventoryForItem_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addOrUpdateAmazonInventoryForItem_result");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addOrUpdateAmazonInventoryForItem_result.class, metaDataMap);
    }

    public addOrUpdateAmazonInventoryForItem_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addOrUpdateAmazonInventoryForItem_result(addOrUpdateAmazonInventoryForItem_result other) {
    }

    public addOrUpdateAmazonInventoryForItem_result deepCopy() {
      return new addOrUpdateAmazonInventoryForItem_result(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addOrUpdateAmazonInventoryForItem_result)
        return this.equals((addOrUpdateAmazonInventoryForItem_result)that);
      return false;
    }

    public boolean equals(addOrUpdateAmazonInventoryForItem_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addOrUpdateAmazonInventoryForItem_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addOrUpdateAmazonInventoryForItem_result typedOther = (addOrUpdateAmazonInventoryForItem_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addOrUpdateAmazonInventoryForItem_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getLastNdaySaleForItem_args implements org.apache.thrift.TBase<getLastNdaySaleForItem_args, getLastNdaySaleForItem_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLastNdaySaleForItem_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField NUMBER_OF_DAYS_FIELD_DESC = new org.apache.thrift.protocol.TField("numberOfDays", org.apache.thrift.protocol.TType.I64, (short)2);

    private long itemId; // required
    private long numberOfDays; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "itemId"),
      NUMBER_OF_DAYS((short)2, "numberOfDays");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // NUMBER_OF_DAYS
            return NUMBER_OF_DAYS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEMID_ISSET_ID = 0;
    private static final int __NUMBEROFDAYS_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.NUMBER_OF_DAYS, new org.apache.thrift.meta_data.FieldMetaData("numberOfDays", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLastNdaySaleForItem_args.class, metaDataMap);
    }

    public getLastNdaySaleForItem_args() {
    }

    public getLastNdaySaleForItem_args(
      long itemId,
      long numberOfDays)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
      this.numberOfDays = numberOfDays;
      setNumberOfDaysIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getLastNdaySaleForItem_args(getLastNdaySaleForItem_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
      this.numberOfDays = other.numberOfDays;
    }

    public getLastNdaySaleForItem_args deepCopy() {
      return new getLastNdaySaleForItem_args(this);
    }

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
      setNumberOfDaysIsSet(false);
      this.numberOfDays = 0;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public long getNumberOfDays() {
      return this.numberOfDays;
    }

    public void setNumberOfDays(long numberOfDays) {
      this.numberOfDays = numberOfDays;
      setNumberOfDaysIsSet(true);
    }

    public void unsetNumberOfDays() {
      __isset_bit_vector.clear(__NUMBEROFDAYS_ISSET_ID);
    }

    /** Returns true if field numberOfDays is set (has been assigned a value) and false otherwise */
    public boolean isSetNumberOfDays() {
      return __isset_bit_vector.get(__NUMBEROFDAYS_ISSET_ID);
    }

    public void setNumberOfDaysIsSet(boolean value) {
      __isset_bit_vector.set(__NUMBEROFDAYS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      case NUMBER_OF_DAYS:
        if (value == null) {
          unsetNumberOfDays();
        } else {
          setNumberOfDays((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItemId());

      case NUMBER_OF_DAYS:
        return Long.valueOf(getNumberOfDays());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItemId();
      case NUMBER_OF_DAYS:
        return isSetNumberOfDays();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getLastNdaySaleForItem_args)
        return this.equals((getLastNdaySaleForItem_args)that);
      return false;
    }

    public boolean equals(getLastNdaySaleForItem_args that) {
      if (that == null)
        return false;

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      boolean this_present_numberOfDays = true;
      boolean that_present_numberOfDays = true;
      if (this_present_numberOfDays || that_present_numberOfDays) {
        if (!(this_present_numberOfDays && that_present_numberOfDays))
          return false;
        if (this.numberOfDays != that.numberOfDays)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getLastNdaySaleForItem_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getLastNdaySaleForItem_args typedOther = (getLastNdaySaleForItem_args)other;

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetNumberOfDays()).compareTo(typedOther.isSetNumberOfDays());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetNumberOfDays()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.numberOfDays, typedOther.numberOfDays);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // NUMBER_OF_DAYS
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.numberOfDays = iprot.readI64();
              setNumberOfDaysIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(NUMBER_OF_DAYS_FIELD_DESC);
      oprot.writeI64(this.numberOfDays);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getLastNdaySaleForItem_args(");
      boolean first = true;

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("numberOfDays:");
      sb.append(this.numberOfDays);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getLastNdaySaleForItem_result implements org.apache.thrift.TBase<getLastNdaySaleForItem_result, getLastNdaySaleForItem_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getLastNdaySaleForItem_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);

    private String success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getLastNdaySaleForItem_result.class, metaDataMap);
    }

    public getLastNdaySaleForItem_result() {
    }

    public getLastNdaySaleForItem_result(
      String success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getLastNdaySaleForItem_result(getLastNdaySaleForItem_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
    }

    public getLastNdaySaleForItem_result deepCopy() {
      return new getLastNdaySaleForItem_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public String getSuccess() {
      return this.success;
    }

    public void setSuccess(String success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getLastNdaySaleForItem_result)
        return this.equals((getLastNdaySaleForItem_result)that);
      return false;
    }

    public boolean equals(getLastNdaySaleForItem_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getLastNdaySaleForItem_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getLastNdaySaleForItem_result typedOther = (getLastNdaySaleForItem_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.success = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getLastNdaySaleForItem_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addOrUpdateAmazonFbaInventory_args implements org.apache.thrift.TBase<addOrUpdateAmazonFbaInventory_args, addOrUpdateAmazonFbaInventory_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addOrUpdateAmazonFbaInventory_args");

    private static final org.apache.thrift.protocol.TField AMAZONFBAINVENTORYSNAPSHOT_FIELD_DESC = new org.apache.thrift.protocol.TField("amazonfbainventorysnapshot", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private AmazonFbaInventorySnapshot amazonfbainventorysnapshot; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      AMAZONFBAINVENTORYSNAPSHOT((short)1, "amazonfbainventorysnapshot");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // AMAZONFBAINVENTORYSNAPSHOT
            return AMAZONFBAINVENTORYSNAPSHOT;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.AMAZONFBAINVENTORYSNAPSHOT, new org.apache.thrift.meta_data.FieldMetaData("amazonfbainventorysnapshot", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AmazonFbaInventorySnapshot.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addOrUpdateAmazonFbaInventory_args.class, metaDataMap);
    }

    public addOrUpdateAmazonFbaInventory_args() {
    }

    public addOrUpdateAmazonFbaInventory_args(
      AmazonFbaInventorySnapshot amazonfbainventorysnapshot)
    {
      this();
      this.amazonfbainventorysnapshot = amazonfbainventorysnapshot;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addOrUpdateAmazonFbaInventory_args(addOrUpdateAmazonFbaInventory_args other) {
      if (other.isSetAmazonfbainventorysnapshot()) {
        this.amazonfbainventorysnapshot = new AmazonFbaInventorySnapshot(other.amazonfbainventorysnapshot);
      }
    }

    public addOrUpdateAmazonFbaInventory_args deepCopy() {
      return new addOrUpdateAmazonFbaInventory_args(this);
    }

    @Override
    public void clear() {
      this.amazonfbainventorysnapshot = null;
    }

    public AmazonFbaInventorySnapshot getAmazonfbainventorysnapshot() {
      return this.amazonfbainventorysnapshot;
    }

    public void setAmazonfbainventorysnapshot(AmazonFbaInventorySnapshot amazonfbainventorysnapshot) {
      this.amazonfbainventorysnapshot = amazonfbainventorysnapshot;
    }

    public void unsetAmazonfbainventorysnapshot() {
      this.amazonfbainventorysnapshot = null;
    }

    /** Returns true if field amazonfbainventorysnapshot is set (has been assigned a value) and false otherwise */
    public boolean isSetAmazonfbainventorysnapshot() {
      return this.amazonfbainventorysnapshot != null;
    }

    public void setAmazonfbainventorysnapshotIsSet(boolean value) {
      if (!value) {
        this.amazonfbainventorysnapshot = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case AMAZONFBAINVENTORYSNAPSHOT:
        if (value == null) {
          unsetAmazonfbainventorysnapshot();
        } else {
          setAmazonfbainventorysnapshot((AmazonFbaInventorySnapshot)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case AMAZONFBAINVENTORYSNAPSHOT:
        return getAmazonfbainventorysnapshot();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case AMAZONFBAINVENTORYSNAPSHOT:
        return isSetAmazonfbainventorysnapshot();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addOrUpdateAmazonFbaInventory_args)
        return this.equals((addOrUpdateAmazonFbaInventory_args)that);
      return false;
    }

    public boolean equals(addOrUpdateAmazonFbaInventory_args that) {
      if (that == null)
        return false;

      boolean this_present_amazonfbainventorysnapshot = true && this.isSetAmazonfbainventorysnapshot();
      boolean that_present_amazonfbainventorysnapshot = true && that.isSetAmazonfbainventorysnapshot();
      if (this_present_amazonfbainventorysnapshot || that_present_amazonfbainventorysnapshot) {
        if (!(this_present_amazonfbainventorysnapshot && that_present_amazonfbainventorysnapshot))
          return false;
        if (!this.amazonfbainventorysnapshot.equals(that.amazonfbainventorysnapshot))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addOrUpdateAmazonFbaInventory_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addOrUpdateAmazonFbaInventory_args typedOther = (addOrUpdateAmazonFbaInventory_args)other;

      lastComparison = Boolean.valueOf(isSetAmazonfbainventorysnapshot()).compareTo(typedOther.isSetAmazonfbainventorysnapshot());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAmazonfbainventorysnapshot()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amazonfbainventorysnapshot, typedOther.amazonfbainventorysnapshot);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // AMAZONFBAINVENTORYSNAPSHOT
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.amazonfbainventorysnapshot = new AmazonFbaInventorySnapshot();
              this.amazonfbainventorysnapshot.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.amazonfbainventorysnapshot != null) {
        oprot.writeFieldBegin(AMAZONFBAINVENTORYSNAPSHOT_FIELD_DESC);
        this.amazonfbainventorysnapshot.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addOrUpdateAmazonFbaInventory_args(");
      boolean first = true;

      sb.append("amazonfbainventorysnapshot:");
      if (this.amazonfbainventorysnapshot == null) {
        sb.append("null");
      } else {
        sb.append(this.amazonfbainventorysnapshot);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addOrUpdateAmazonFbaInventory_result implements org.apache.thrift.TBase<addOrUpdateAmazonFbaInventory_result, addOrUpdateAmazonFbaInventory_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addOrUpdateAmazonFbaInventory_result");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addOrUpdateAmazonFbaInventory_result.class, metaDataMap);
    }

    public addOrUpdateAmazonFbaInventory_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addOrUpdateAmazonFbaInventory_result(addOrUpdateAmazonFbaInventory_result other) {
    }

    public addOrUpdateAmazonFbaInventory_result deepCopy() {
      return new addOrUpdateAmazonFbaInventory_result(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addOrUpdateAmazonFbaInventory_result)
        return this.equals((addOrUpdateAmazonFbaInventory_result)that);
      return false;
    }

    public boolean equals(addOrUpdateAmazonFbaInventory_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addOrUpdateAmazonFbaInventory_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addOrUpdateAmazonFbaInventory_result typedOther = (addOrUpdateAmazonFbaInventory_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addOrUpdateAmazonFbaInventory_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addUpdateHoldInventory_args implements org.apache.thrift.TBase<addUpdateHoldInventory_args, addUpdateHoldInventory_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addUpdateHoldInventory_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField HOLD_QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("holdQuantity", org.apache.thrift.protocol.TType.I64, (short)3);
    private static final org.apache.thrift.protocol.TField SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("source", org.apache.thrift.protocol.TType.I64, (short)4);

    private long itemId; // required
    private long warehouseId; // required
    private long holdQuantity; // required
    private long source; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "itemId"),
      WAREHOUSE_ID((short)2, "warehouseId"),
      HOLD_QUANTITY((short)3, "holdQuantity"),
      SOURCE((short)4, "source");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          case 3: // HOLD_QUANTITY
            return HOLD_QUANTITY;
          case 4: // SOURCE
            return SOURCE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEMID_ISSET_ID = 0;
    private static final int __WAREHOUSEID_ISSET_ID = 1;
    private static final int __HOLDQUANTITY_ISSET_ID = 2;
    private static final int __SOURCE_ISSET_ID = 3;
    private BitSet __isset_bit_vector = new BitSet(4);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.HOLD_QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("holdQuantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SOURCE, new org.apache.thrift.meta_data.FieldMetaData("source", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addUpdateHoldInventory_args.class, metaDataMap);
    }

    public addUpdateHoldInventory_args() {
    }

    public addUpdateHoldInventory_args(
      long itemId,
      long warehouseId,
      long holdQuantity,
      long source)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
      this.holdQuantity = holdQuantity;
      setHoldQuantityIsSet(true);
      this.source = source;
      setSourceIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addUpdateHoldInventory_args(addUpdateHoldInventory_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
      this.warehouseId = other.warehouseId;
      this.holdQuantity = other.holdQuantity;
      this.source = other.source;
    }

    public addUpdateHoldInventory_args deepCopy() {
      return new addUpdateHoldInventory_args(this);
    }

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
      setWarehouseIdIsSet(false);
      this.warehouseId = 0;
      setHoldQuantityIsSet(false);
      this.holdQuantity = 0;
      setSourceIsSet(false);
      this.source = 0;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public long getWarehouseId() {
      return this.warehouseId;
    }

    public void setWarehouseId(long warehouseId) {
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    public void unsetWarehouseId() {
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
    }

    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouseId() {
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
    }

    public void setWarehouseIdIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
    }

    public long getHoldQuantity() {
      return this.holdQuantity;
    }

    public void setHoldQuantity(long holdQuantity) {
      this.holdQuantity = holdQuantity;
      setHoldQuantityIsSet(true);
    }

    public void unsetHoldQuantity() {
      __isset_bit_vector.clear(__HOLDQUANTITY_ISSET_ID);
    }

    /** Returns true if field holdQuantity is set (has been assigned a value) and false otherwise */
    public boolean isSetHoldQuantity() {
      return __isset_bit_vector.get(__HOLDQUANTITY_ISSET_ID);
    }

    public void setHoldQuantityIsSet(boolean value) {
      __isset_bit_vector.set(__HOLDQUANTITY_ISSET_ID, value);
    }

    public long getSource() {
      return this.source;
    }

    public void setSource(long source) {
      this.source = source;
      setSourceIsSet(true);
    }

    public void unsetSource() {
      __isset_bit_vector.clear(__SOURCE_ISSET_ID);
    }

    /** Returns true if field source is set (has been assigned a value) and false otherwise */
    public boolean isSetSource() {
      return __isset_bit_vector.get(__SOURCE_ISSET_ID);
    }

    public void setSourceIsSet(boolean value) {
      __isset_bit_vector.set(__SOURCE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouseId();
        } else {
          setWarehouseId((Long)value);
        }
        break;

      case HOLD_QUANTITY:
        if (value == null) {
          unsetHoldQuantity();
        } else {
          setHoldQuantity((Long)value);
        }
        break;

      case SOURCE:
        if (value == null) {
          unsetSource();
        } else {
          setSource((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItemId());

      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouseId());

      case HOLD_QUANTITY:
        return Long.valueOf(getHoldQuantity());

      case SOURCE:
        return Long.valueOf(getSource());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItemId();
      case WAREHOUSE_ID:
        return isSetWarehouseId();
      case HOLD_QUANTITY:
        return isSetHoldQuantity();
      case SOURCE:
        return isSetSource();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addUpdateHoldInventory_args)
        return this.equals((addUpdateHoldInventory_args)that);
      return false;
    }

    public boolean equals(addUpdateHoldInventory_args that) {
      if (that == null)
        return false;

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      boolean this_present_warehouseId = true;
      boolean that_present_warehouseId = true;
      if (this_present_warehouseId || that_present_warehouseId) {
        if (!(this_present_warehouseId && that_present_warehouseId))
          return false;
        if (this.warehouseId != that.warehouseId)
          return false;
      }

      boolean this_present_holdQuantity = true;
      boolean that_present_holdQuantity = true;
      if (this_present_holdQuantity || that_present_holdQuantity) {
        if (!(this_present_holdQuantity && that_present_holdQuantity))
          return false;
        if (this.holdQuantity != that.holdQuantity)
          return false;
      }

      boolean this_present_source = true;
      boolean that_present_source = true;
      if (this_present_source || that_present_source) {
        if (!(this_present_source && that_present_source))
          return false;
        if (this.source != that.source)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addUpdateHoldInventory_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addUpdateHoldInventory_args typedOther = (addUpdateHoldInventory_args)other;

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetHoldQuantity()).compareTo(typedOther.isSetHoldQuantity());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetHoldQuantity()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.holdQuantity, typedOther.holdQuantity);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSource()).compareTo(typedOther.isSetSource());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSource()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source, typedOther.source);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouseId = iprot.readI64();
              setWarehouseIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // HOLD_QUANTITY
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.holdQuantity = iprot.readI64();
              setHoldQuantityIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 4: // SOURCE
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.source = iprot.readI64();
              setSourceIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouseId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(HOLD_QUANTITY_FIELD_DESC);
      oprot.writeI64(this.holdQuantity);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SOURCE_FIELD_DESC);
      oprot.writeI64(this.source);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addUpdateHoldInventory_args(");
      boolean first = true;

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("warehouseId:");
      sb.append(this.warehouseId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("holdQuantity:");
      sb.append(this.holdQuantity);
      first = false;
      if (!first) sb.append(", ");
      sb.append("source:");
      sb.append(this.source);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addUpdateHoldInventory_result implements org.apache.thrift.TBase<addUpdateHoldInventory_result, addUpdateHoldInventory_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addUpdateHoldInventory_result");

    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addUpdateHoldInventory_result.class, metaDataMap);
    }

    public addUpdateHoldInventory_result() {
    }

    public addUpdateHoldInventory_result(
      InventoryServiceException cex)
    {
      this();
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addUpdateHoldInventory_result(addUpdateHoldInventory_result other) {
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public addUpdateHoldInventory_result deepCopy() {
      return new addUpdateHoldInventory_result(this);
    }

    @Override
    public void clear() {
      this.cex = null;
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addUpdateHoldInventory_result)
        return this.equals((addUpdateHoldInventory_result)that);
      return false;
    }

    public boolean equals(addUpdateHoldInventory_result that) {
      if (that == null)
        return false;

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addUpdateHoldInventory_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addUpdateHoldInventory_result typedOther = (addUpdateHoldInventory_result)other;

      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addUpdateHoldInventory_result(");
      boolean first = true;

      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAmazonFbaItemInventory_args implements org.apache.thrift.TBase<getAmazonFbaItemInventory_args, getAmazonFbaItemInventory_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAmazonFbaItemInventory_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);

    private long itemId; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "itemId");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEMID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAmazonFbaItemInventory_args.class, metaDataMap);
    }

    public getAmazonFbaItemInventory_args() {
    }

    public getAmazonFbaItemInventory_args(
      long itemId)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAmazonFbaItemInventory_args(getAmazonFbaItemInventory_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
    }

    public getAmazonFbaItemInventory_args deepCopy() {
      return new getAmazonFbaItemInventory_args(this);
    }

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItemId());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItemId();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAmazonFbaItemInventory_args)
        return this.equals((getAmazonFbaItemInventory_args)that);
      return false;
    }

    public boolean equals(getAmazonFbaItemInventory_args that) {
      if (that == null)
        return false;

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAmazonFbaItemInventory_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAmazonFbaItemInventory_args typedOther = (getAmazonFbaItemInventory_args)other;

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAmazonFbaItemInventory_args(");
      boolean first = true;

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAmazonFbaItemInventory_result implements org.apache.thrift.TBase<getAmazonFbaItemInventory_result, getAmazonFbaItemInventory_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAmazonFbaItemInventory_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<AmazonFbaInventorySnapshot> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AmazonFbaInventorySnapshot.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAmazonFbaItemInventory_result.class, metaDataMap);
    }

    public getAmazonFbaItemInventory_result() {
    }

    public getAmazonFbaItemInventory_result(
      List<AmazonFbaInventorySnapshot> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAmazonFbaItemInventory_result(getAmazonFbaItemInventory_result other) {
      if (other.isSetSuccess()) {
        List<AmazonFbaInventorySnapshot> __this__success = new ArrayList<AmazonFbaInventorySnapshot>();
        for (AmazonFbaInventorySnapshot other_element : other.success) {
          __this__success.add(new AmazonFbaInventorySnapshot(other_element));
        }
        this.success = __this__success;
      }
    }

    public getAmazonFbaItemInventory_result deepCopy() {
      return new getAmazonFbaItemInventory_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<AmazonFbaInventorySnapshot> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(AmazonFbaInventorySnapshot elem) {
      if (this.success == null) {
        this.success = new ArrayList<AmazonFbaInventorySnapshot>();
      }
      this.success.add(elem);
    }

    public List<AmazonFbaInventorySnapshot> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<AmazonFbaInventorySnapshot> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<AmazonFbaInventorySnapshot>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAmazonFbaItemInventory_result)
        return this.equals((getAmazonFbaItemInventory_result)that);
      return false;
    }

    public boolean equals(getAmazonFbaItemInventory_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAmazonFbaItemInventory_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAmazonFbaItemInventory_result typedOther = (getAmazonFbaItemInventory_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list138 = iprot.readListBegin();
                this.success = new ArrayList<AmazonFbaInventorySnapshot>(_list138.size);
                for (int _i139 = 0; _i139 < _list138.size; ++_i139)
                {
                  AmazonFbaInventorySnapshot _elem140; // required
                  _elem140 = new AmazonFbaInventorySnapshot();
                  _elem140.read(iprot);
                  this.success.add(_elem140);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (AmazonFbaInventorySnapshot _iter141 : this.success)
          {
            _iter141.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAmazonFbaItemInventory_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllAmazonFbaItemInventory_args implements org.apache.thrift.TBase<getAllAmazonFbaItemInventory_args, getAllAmazonFbaItemInventory_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllAmazonFbaItemInventory_args");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllAmazonFbaItemInventory_args.class, metaDataMap);
    }

    public getAllAmazonFbaItemInventory_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllAmazonFbaItemInventory_args(getAllAmazonFbaItemInventory_args other) {
    }

    public getAllAmazonFbaItemInventory_args deepCopy() {
      return new getAllAmazonFbaItemInventory_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllAmazonFbaItemInventory_args)
        return this.equals((getAllAmazonFbaItemInventory_args)that);
      return false;
    }

    public boolean equals(getAllAmazonFbaItemInventory_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllAmazonFbaItemInventory_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllAmazonFbaItemInventory_args typedOther = (getAllAmazonFbaItemInventory_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllAmazonFbaItemInventory_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllAmazonFbaItemInventory_result implements org.apache.thrift.TBase<getAllAmazonFbaItemInventory_result, getAllAmazonFbaItemInventory_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllAmazonFbaItemInventory_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<AmazonFbaInventorySnapshot> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AmazonFbaInventorySnapshot.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllAmazonFbaItemInventory_result.class, metaDataMap);
    }

    public getAllAmazonFbaItemInventory_result() {
    }

    public getAllAmazonFbaItemInventory_result(
      List<AmazonFbaInventorySnapshot> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllAmazonFbaItemInventory_result(getAllAmazonFbaItemInventory_result other) {
      if (other.isSetSuccess()) {
        List<AmazonFbaInventorySnapshot> __this__success = new ArrayList<AmazonFbaInventorySnapshot>();
        for (AmazonFbaInventorySnapshot other_element : other.success) {
          __this__success.add(new AmazonFbaInventorySnapshot(other_element));
        }
        this.success = __this__success;
      }
    }

    public getAllAmazonFbaItemInventory_result deepCopy() {
      return new getAllAmazonFbaItemInventory_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<AmazonFbaInventorySnapshot> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(AmazonFbaInventorySnapshot elem) {
      if (this.success == null) {
        this.success = new ArrayList<AmazonFbaInventorySnapshot>();
      }
      this.success.add(elem);
    }

    public List<AmazonFbaInventorySnapshot> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<AmazonFbaInventorySnapshot> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<AmazonFbaInventorySnapshot>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllAmazonFbaItemInventory_result)
        return this.equals((getAllAmazonFbaItemInventory_result)that);
      return false;
    }

    public boolean equals(getAllAmazonFbaItemInventory_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllAmazonFbaItemInventory_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllAmazonFbaItemInventory_result typedOther = (getAllAmazonFbaItemInventory_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list142 = iprot.readListBegin();
                this.success = new ArrayList<AmazonFbaInventorySnapshot>(_list142.size);
                for (int _i143 = 0; _i143 < _list142.size; ++_i143)
                {
                  AmazonFbaInventorySnapshot _elem144; // required
                  _elem144 = new AmazonFbaInventorySnapshot();
                  _elem144.read(iprot);
                  this.success.add(_elem144);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (AmazonFbaInventorySnapshot _iter145 : this.success)
          {
            _iter145.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllAmazonFbaItemInventory_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getOursGoodWarehouseIdsForLocation_args implements org.apache.thrift.TBase<getOursGoodWarehouseIdsForLocation_args, getOursGoodWarehouseIdsForLocation_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOursGoodWarehouseIdsForLocation_args");

    private static final org.apache.thrift.protocol.TField STATE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("state_id", org.apache.thrift.protocol.TType.I64, (short)1);

    private long state_id; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      STATE_ID((short)1, "state_id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // STATE_ID
            return STATE_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __STATE_ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.STATE_ID, new org.apache.thrift.meta_data.FieldMetaData("state_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOursGoodWarehouseIdsForLocation_args.class, metaDataMap);
    }

    public getOursGoodWarehouseIdsForLocation_args() {
    }

    public getOursGoodWarehouseIdsForLocation_args(
      long state_id)
    {
      this();
      this.state_id = state_id;
      setState_idIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getOursGoodWarehouseIdsForLocation_args(getOursGoodWarehouseIdsForLocation_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.state_id = other.state_id;
    }

    public getOursGoodWarehouseIdsForLocation_args deepCopy() {
      return new getOursGoodWarehouseIdsForLocation_args(this);
    }

    @Override
    public void clear() {
      setState_idIsSet(false);
      this.state_id = 0;
    }

    public long getState_id() {
      return this.state_id;
    }

    public void setState_id(long state_id) {
      this.state_id = state_id;
      setState_idIsSet(true);
    }

    public void unsetState_id() {
      __isset_bit_vector.clear(__STATE_ID_ISSET_ID);
    }

    /** Returns true if field state_id is set (has been assigned a value) and false otherwise */
    public boolean isSetState_id() {
      return __isset_bit_vector.get(__STATE_ID_ISSET_ID);
    }

    public void setState_idIsSet(boolean value) {
      __isset_bit_vector.set(__STATE_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case STATE_ID:
        if (value == null) {
          unsetState_id();
        } else {
          setState_id((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case STATE_ID:
        return Long.valueOf(getState_id());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case STATE_ID:
        return isSetState_id();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getOursGoodWarehouseIdsForLocation_args)
        return this.equals((getOursGoodWarehouseIdsForLocation_args)that);
      return false;
    }

    public boolean equals(getOursGoodWarehouseIdsForLocation_args that) {
      if (that == null)
        return false;

      boolean this_present_state_id = true;
      boolean that_present_state_id = true;
      if (this_present_state_id || that_present_state_id) {
        if (!(this_present_state_id && that_present_state_id))
          return false;
        if (this.state_id != that.state_id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getOursGoodWarehouseIdsForLocation_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getOursGoodWarehouseIdsForLocation_args typedOther = (getOursGoodWarehouseIdsForLocation_args)other;

      lastComparison = Boolean.valueOf(isSetState_id()).compareTo(typedOther.isSetState_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetState_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.state_id, typedOther.state_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // STATE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.state_id = iprot.readI64();
              setState_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(STATE_ID_FIELD_DESC);
      oprot.writeI64(this.state_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getOursGoodWarehouseIdsForLocation_args(");
      boolean first = true;

      sb.append("state_id:");
      sb.append(this.state_id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getOursGoodWarehouseIdsForLocation_result implements org.apache.thrift.TBase<getOursGoodWarehouseIdsForLocation_result, getOursGoodWarehouseIdsForLocation_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getOursGoodWarehouseIdsForLocation_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<Long> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getOursGoodWarehouseIdsForLocation_result.class, metaDataMap);
    }

    public getOursGoodWarehouseIdsForLocation_result() {
    }

    public getOursGoodWarehouseIdsForLocation_result(
      List<Long> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getOursGoodWarehouseIdsForLocation_result(getOursGoodWarehouseIdsForLocation_result other) {
      if (other.isSetSuccess()) {
        List<Long> __this__success = new ArrayList<Long>();
        for (Long other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
    }

    public getOursGoodWarehouseIdsForLocation_result deepCopy() {
      return new getOursGoodWarehouseIdsForLocation_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Long> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(long elem) {
      if (this.success == null) {
        this.success = new ArrayList<Long>();
      }
      this.success.add(elem);
    }

    public List<Long> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Long> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getOursGoodWarehouseIdsForLocation_result)
        return this.equals((getOursGoodWarehouseIdsForLocation_result)that);
      return false;
    }

    public boolean equals(getOursGoodWarehouseIdsForLocation_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getOursGoodWarehouseIdsForLocation_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getOursGoodWarehouseIdsForLocation_result typedOther = (getOursGoodWarehouseIdsForLocation_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list146 = iprot.readListBegin();
                this.success = new ArrayList<Long>(_list146.size);
                for (int _i147 = 0; _i147 < _list146.size; ++_i147)
                {
                  long _elem148; // required
                  _elem148 = iprot.readI64();
                  this.success.add(_elem148);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
          for (long _iter149 : this.success)
          {
            oprot.writeI64(_iter149);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getOursGoodWarehouseIdsForLocation_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getHoldInventoryDetailForItemForWarehouseIdExceptSource_args implements org.apache.thrift.TBase<getHoldInventoryDetailForItemForWarehouseIdExceptSource_args, getHoldInventoryDetailForItemForWarehouseIdExceptSource_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHoldInventoryDetailForItemForWarehouseIdExceptSource_args");

    private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouse_id", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("source", org.apache.thrift.protocol.TType.I64, (short)3);

    private long id; // required
    private long warehouse_id; // required
    private long source; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ID((short)1, "id"),
      WAREHOUSE_ID((short)2, "warehouse_id"),
      SOURCE((short)3, "source");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ID
            return ID;
          case 2: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          case 3: // SOURCE
            return SOURCE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ID_ISSET_ID = 0;
    private static final int __WAREHOUSE_ID_ISSET_ID = 1;
    private static final int __SOURCE_ISSET_ID = 2;
    private BitSet __isset_bit_vector = new BitSet(3);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouse_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SOURCE, new org.apache.thrift.meta_data.FieldMetaData("source", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHoldInventoryDetailForItemForWarehouseIdExceptSource_args.class, metaDataMap);
    }

    public getHoldInventoryDetailForItemForWarehouseIdExceptSource_args() {
    }

    public getHoldInventoryDetailForItemForWarehouseIdExceptSource_args(
      long id,
      long warehouse_id,
      long source)
    {
      this();
      this.id = id;
      setIdIsSet(true);
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
      this.source = source;
      setSourceIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getHoldInventoryDetailForItemForWarehouseIdExceptSource_args(getHoldInventoryDetailForItemForWarehouseIdExceptSource_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.id = other.id;
      this.warehouse_id = other.warehouse_id;
      this.source = other.source;
    }

    public getHoldInventoryDetailForItemForWarehouseIdExceptSource_args deepCopy() {
      return new getHoldInventoryDetailForItemForWarehouseIdExceptSource_args(this);
    }

    @Override
    public void clear() {
      setIdIsSet(false);
      this.id = 0;
      setWarehouse_idIsSet(false);
      this.warehouse_id = 0;
      setSourceIsSet(false);
      this.source = 0;
    }

    public long getId() {
      return this.id;
    }

    public void setId(long id) {
      this.id = id;
      setIdIsSet(true);
    }

    public void unsetId() {
      __isset_bit_vector.clear(__ID_ISSET_ID);
    }

    /** Returns true if field id is set (has been assigned a value) and false otherwise */
    public boolean isSetId() {
      return __isset_bit_vector.get(__ID_ISSET_ID);
    }

    public void setIdIsSet(boolean value) {
      __isset_bit_vector.set(__ID_ISSET_ID, value);
    }

    public long getWarehouse_id() {
      return this.warehouse_id;
    }

    public void setWarehouse_id(long warehouse_id) {
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    public void unsetWarehouse_id() {
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
    }

    /** Returns true if field warehouse_id is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouse_id() {
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
    }

    public void setWarehouse_idIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
    }

    public long getSource() {
      return this.source;
    }

    public void setSource(long source) {
      this.source = source;
      setSourceIsSet(true);
    }

    public void unsetSource() {
      __isset_bit_vector.clear(__SOURCE_ISSET_ID);
    }

    /** Returns true if field source is set (has been assigned a value) and false otherwise */
    public boolean isSetSource() {
      return __isset_bit_vector.get(__SOURCE_ISSET_ID);
    }

    public void setSourceIsSet(boolean value) {
      __isset_bit_vector.set(__SOURCE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ID:
        if (value == null) {
          unsetId();
        } else {
          setId((Long)value);
        }
        break;

      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouse_id();
        } else {
          setWarehouse_id((Long)value);
        }
        break;

      case SOURCE:
        if (value == null) {
          unsetSource();
        } else {
          setSource((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ID:
        return Long.valueOf(getId());

      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouse_id());

      case SOURCE:
        return Long.valueOf(getSource());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ID:
        return isSetId();
      case WAREHOUSE_ID:
        return isSetWarehouse_id();
      case SOURCE:
        return isSetSource();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getHoldInventoryDetailForItemForWarehouseIdExceptSource_args)
        return this.equals((getHoldInventoryDetailForItemForWarehouseIdExceptSource_args)that);
      return false;
    }

    public boolean equals(getHoldInventoryDetailForItemForWarehouseIdExceptSource_args that) {
      if (that == null)
        return false;

      boolean this_present_id = true;
      boolean that_present_id = true;
      if (this_present_id || that_present_id) {
        if (!(this_present_id && that_present_id))
          return false;
        if (this.id != that.id)
          return false;
      }

      boolean this_present_warehouse_id = true;
      boolean that_present_warehouse_id = true;
      if (this_present_warehouse_id || that_present_warehouse_id) {
        if (!(this_present_warehouse_id && that_present_warehouse_id))
          return false;
        if (this.warehouse_id != that.warehouse_id)
          return false;
      }

      boolean this_present_source = true;
      boolean that_present_source = true;
      if (this_present_source || that_present_source) {
        if (!(this_present_source && that_present_source))
          return false;
        if (this.source != that.source)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getHoldInventoryDetailForItemForWarehouseIdExceptSource_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getHoldInventoryDetailForItemForWarehouseIdExceptSource_args typedOther = (getHoldInventoryDetailForItemForWarehouseIdExceptSource_args)other;

      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(typedOther.isSetWarehouse_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouse_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouse_id, typedOther.warehouse_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSource()).compareTo(typedOther.isSetSource());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSource()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source, typedOther.source);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.id = iprot.readI64();
              setIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouse_id = iprot.readI64();
              setWarehouse_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SOURCE
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.source = iprot.readI64();
              setSourceIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ID_FIELD_DESC);
      oprot.writeI64(this.id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouse_id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SOURCE_FIELD_DESC);
      oprot.writeI64(this.source);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getHoldInventoryDetailForItemForWarehouseIdExceptSource_args(");
      boolean first = true;

      sb.append("id:");
      sb.append(this.id);
      first = false;
      if (!first) sb.append(", ");
      sb.append("warehouse_id:");
      sb.append(this.warehouse_id);
      first = false;
      if (!first) sb.append(", ");
      sb.append("source:");
      sb.append(this.source);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getHoldInventoryDetailForItemForWarehouseIdExceptSource_result implements org.apache.thrift.TBase<getHoldInventoryDetailForItemForWarehouseIdExceptSource_result, getHoldInventoryDetailForItemForWarehouseIdExceptSource_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHoldInventoryDetailForItemForWarehouseIdExceptSource_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.I64, (short)0);

    private long success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHoldInventoryDetailForItemForWarehouseIdExceptSource_result.class, metaDataMap);
    }

    public getHoldInventoryDetailForItemForWarehouseIdExceptSource_result() {
    }

    public getHoldInventoryDetailForItemForWarehouseIdExceptSource_result(
      long success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getHoldInventoryDetailForItemForWarehouseIdExceptSource_result(getHoldInventoryDetailForItemForWarehouseIdExceptSource_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public getHoldInventoryDetailForItemForWarehouseIdExceptSource_result deepCopy() {
      return new getHoldInventoryDetailForItemForWarehouseIdExceptSource_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0;
    }

    public long getSuccess() {
      return this.success;
    }

    public void setSuccess(long success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Long.valueOf(getSuccess());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getHoldInventoryDetailForItemForWarehouseIdExceptSource_result)
        return this.equals((getHoldInventoryDetailForItemForWarehouseIdExceptSource_result)that);
      return false;
    }

    public boolean equals(getHoldInventoryDetailForItemForWarehouseIdExceptSource_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getHoldInventoryDetailForItemForWarehouseIdExceptSource_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getHoldInventoryDetailForItemForWarehouseIdExceptSource_result typedOther = (getHoldInventoryDetailForItemForWarehouseIdExceptSource_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.success = iprot.readI64();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeI64(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getHoldInventoryDetailForItemForWarehouseIdExceptSource_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getSnapdealInventoryForItem_args implements org.apache.thrift.TBase<getSnapdealInventoryForItem_args, getSnapdealInventoryForItem_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSnapdealInventoryForItem_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)1);

    private long item_id; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "item_id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEM_ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSnapdealInventoryForItem_args.class, metaDataMap);
    }

    public getSnapdealInventoryForItem_args() {
    }

    public getSnapdealInventoryForItem_args(
      long item_id)
    {
      this();
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getSnapdealInventoryForItem_args(getSnapdealInventoryForItem_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.item_id = other.item_id;
    }

    public getSnapdealInventoryForItem_args deepCopy() {
      return new getSnapdealInventoryForItem_args(this);
    }

    @Override
    public void clear() {
      setItem_idIsSet(false);
      this.item_id = 0;
    }

    public long getItem_id() {
      return this.item_id;
    }

    public void setItem_id(long item_id) {
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    public void unsetItem_id() {
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
    }

    /** Returns true if field item_id is set (has been assigned a value) and false otherwise */
    public boolean isSetItem_id() {
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
    }

    public void setItem_idIsSet(boolean value) {
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItem_id();
        } else {
          setItem_id((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItem_id());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItem_id();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getSnapdealInventoryForItem_args)
        return this.equals((getSnapdealInventoryForItem_args)that);
      return false;
    }

    public boolean equals(getSnapdealInventoryForItem_args that) {
      if (that == null)
        return false;

      boolean this_present_item_id = true;
      boolean that_present_item_id = true;
      if (this_present_item_id || that_present_item_id) {
        if (!(this_present_item_id && that_present_item_id))
          return false;
        if (this.item_id != that.item_id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getSnapdealInventoryForItem_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getSnapdealInventoryForItem_args typedOther = (getSnapdealInventoryForItem_args)other;

      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItem_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.item_id = iprot.readI64();
              setItem_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.item_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getSnapdealInventoryForItem_args(");
      boolean first = true;

      sb.append("item_id:");
      sb.append(this.item_id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getSnapdealInventoryForItem_result implements org.apache.thrift.TBase<getSnapdealInventoryForItem_result, getSnapdealInventoryForItem_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSnapdealInventoryForItem_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);

    private SnapdealInventoryItem success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SnapdealInventoryItem.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSnapdealInventoryForItem_result.class, metaDataMap);
    }

    public getSnapdealInventoryForItem_result() {
    }

    public getSnapdealInventoryForItem_result(
      SnapdealInventoryItem success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getSnapdealInventoryForItem_result(getSnapdealInventoryForItem_result other) {
      if (other.isSetSuccess()) {
        this.success = new SnapdealInventoryItem(other.success);
      }
    }

    public getSnapdealInventoryForItem_result deepCopy() {
      return new getSnapdealInventoryForItem_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public SnapdealInventoryItem getSuccess() {
      return this.success;
    }

    public void setSuccess(SnapdealInventoryItem success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((SnapdealInventoryItem)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getSnapdealInventoryForItem_result)
        return this.equals((getSnapdealInventoryForItem_result)that);
      return false;
    }

    public boolean equals(getSnapdealInventoryForItem_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getSnapdealInventoryForItem_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getSnapdealInventoryForItem_result typedOther = (getSnapdealInventoryForItem_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new SnapdealInventoryItem();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getSnapdealInventoryForItem_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addOrUpdateSnapdealInventoryForItem_args implements org.apache.thrift.TBase<addOrUpdateSnapdealInventoryForItem_args, addOrUpdateSnapdealInventoryForItem_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addOrUpdateSnapdealInventoryForItem_args");

    private static final org.apache.thrift.protocol.TField SNAPDEALINVENTORYITEM_FIELD_DESC = new org.apache.thrift.protocol.TField("snapdealinventoryitem", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private SnapdealInventoryItem snapdealinventoryitem; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SNAPDEALINVENTORYITEM((short)1, "snapdealinventoryitem");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // SNAPDEALINVENTORYITEM
            return SNAPDEALINVENTORYITEM;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SNAPDEALINVENTORYITEM, new org.apache.thrift.meta_data.FieldMetaData("snapdealinventoryitem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SnapdealInventoryItem.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addOrUpdateSnapdealInventoryForItem_args.class, metaDataMap);
    }

    public addOrUpdateSnapdealInventoryForItem_args() {
    }

    public addOrUpdateSnapdealInventoryForItem_args(
      SnapdealInventoryItem snapdealinventoryitem)
    {
      this();
      this.snapdealinventoryitem = snapdealinventoryitem;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addOrUpdateSnapdealInventoryForItem_args(addOrUpdateSnapdealInventoryForItem_args other) {
      if (other.isSetSnapdealinventoryitem()) {
        this.snapdealinventoryitem = new SnapdealInventoryItem(other.snapdealinventoryitem);
      }
    }

    public addOrUpdateSnapdealInventoryForItem_args deepCopy() {
      return new addOrUpdateSnapdealInventoryForItem_args(this);
    }

    @Override
    public void clear() {
      this.snapdealinventoryitem = null;
    }

    public SnapdealInventoryItem getSnapdealinventoryitem() {
      return this.snapdealinventoryitem;
    }

    public void setSnapdealinventoryitem(SnapdealInventoryItem snapdealinventoryitem) {
      this.snapdealinventoryitem = snapdealinventoryitem;
    }

    public void unsetSnapdealinventoryitem() {
      this.snapdealinventoryitem = null;
    }

    /** Returns true if field snapdealinventoryitem is set (has been assigned a value) and false otherwise */
    public boolean isSetSnapdealinventoryitem() {
      return this.snapdealinventoryitem != null;
    }

    public void setSnapdealinventoryitemIsSet(boolean value) {
      if (!value) {
        this.snapdealinventoryitem = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SNAPDEALINVENTORYITEM:
        if (value == null) {
          unsetSnapdealinventoryitem();
        } else {
          setSnapdealinventoryitem((SnapdealInventoryItem)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SNAPDEALINVENTORYITEM:
        return getSnapdealinventoryitem();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SNAPDEALINVENTORYITEM:
        return isSetSnapdealinventoryitem();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addOrUpdateSnapdealInventoryForItem_args)
        return this.equals((addOrUpdateSnapdealInventoryForItem_args)that);
      return false;
    }

    public boolean equals(addOrUpdateSnapdealInventoryForItem_args that) {
      if (that == null)
        return false;

      boolean this_present_snapdealinventoryitem = true && this.isSetSnapdealinventoryitem();
      boolean that_present_snapdealinventoryitem = true && that.isSetSnapdealinventoryitem();
      if (this_present_snapdealinventoryitem || that_present_snapdealinventoryitem) {
        if (!(this_present_snapdealinventoryitem && that_present_snapdealinventoryitem))
          return false;
        if (!this.snapdealinventoryitem.equals(that.snapdealinventoryitem))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addOrUpdateSnapdealInventoryForItem_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addOrUpdateSnapdealInventoryForItem_args typedOther = (addOrUpdateSnapdealInventoryForItem_args)other;

      lastComparison = Boolean.valueOf(isSetSnapdealinventoryitem()).compareTo(typedOther.isSetSnapdealinventoryitem());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSnapdealinventoryitem()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.snapdealinventoryitem, typedOther.snapdealinventoryitem);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // SNAPDEALINVENTORYITEM
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.snapdealinventoryitem = new SnapdealInventoryItem();
              this.snapdealinventoryitem.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.snapdealinventoryitem != null) {
        oprot.writeFieldBegin(SNAPDEALINVENTORYITEM_FIELD_DESC);
        this.snapdealinventoryitem.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addOrUpdateSnapdealInventoryForItem_args(");
      boolean first = true;

      sb.append("snapdealinventoryitem:");
      if (this.snapdealinventoryitem == null) {
        sb.append("null");
      } else {
        sb.append(this.snapdealinventoryitem);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addOrUpdateSnapdealInventoryForItem_result implements org.apache.thrift.TBase<addOrUpdateSnapdealInventoryForItem_result, addOrUpdateSnapdealInventoryForItem_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addOrUpdateSnapdealInventoryForItem_result");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addOrUpdateSnapdealInventoryForItem_result.class, metaDataMap);
    }

    public addOrUpdateSnapdealInventoryForItem_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addOrUpdateSnapdealInventoryForItem_result(addOrUpdateSnapdealInventoryForItem_result other) {
    }

    public addOrUpdateSnapdealInventoryForItem_result deepCopy() {
      return new addOrUpdateSnapdealInventoryForItem_result(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addOrUpdateSnapdealInventoryForItem_result)
        return this.equals((addOrUpdateSnapdealInventoryForItem_result)that);
      return false;
    }

    public boolean equals(addOrUpdateSnapdealInventoryForItem_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addOrUpdateSnapdealInventoryForItem_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addOrUpdateSnapdealInventoryForItem_result typedOther = (addOrUpdateSnapdealInventoryForItem_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addOrUpdateSnapdealInventoryForItem_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getNlcForWarehouse_args implements org.apache.thrift.TBase<getNlcForWarehouse_args, getNlcForWarehouse_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNlcForWarehouse_args");

    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouse_id", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)2);

    private long warehouse_id; // required
    private long item_id; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      WAREHOUSE_ID((short)1, "warehouse_id"),
      ITEM_ID((short)2, "item_id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          case 2: // ITEM_ID
            return ITEM_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __WAREHOUSE_ID_ISSET_ID = 0;
    private static final int __ITEM_ID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouse_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNlcForWarehouse_args.class, metaDataMap);
    }

    public getNlcForWarehouse_args() {
    }

    public getNlcForWarehouse_args(
      long warehouse_id,
      long item_id)
    {
      this();
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getNlcForWarehouse_args(getNlcForWarehouse_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.warehouse_id = other.warehouse_id;
      this.item_id = other.item_id;
    }

    public getNlcForWarehouse_args deepCopy() {
      return new getNlcForWarehouse_args(this);
    }

    @Override
    public void clear() {
      setWarehouse_idIsSet(false);
      this.warehouse_id = 0;
      setItem_idIsSet(false);
      this.item_id = 0;
    }

    public long getWarehouse_id() {
      return this.warehouse_id;
    }

    public void setWarehouse_id(long warehouse_id) {
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    public void unsetWarehouse_id() {
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
    }

    /** Returns true if field warehouse_id is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouse_id() {
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
    }

    public void setWarehouse_idIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
    }

    public long getItem_id() {
      return this.item_id;
    }

    public void setItem_id(long item_id) {
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    public void unsetItem_id() {
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
    }

    /** Returns true if field item_id is set (has been assigned a value) and false otherwise */
    public boolean isSetItem_id() {
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
    }

    public void setItem_idIsSet(boolean value) {
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouse_id();
        } else {
          setWarehouse_id((Long)value);
        }
        break;

      case ITEM_ID:
        if (value == null) {
          unsetItem_id();
        } else {
          setItem_id((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouse_id());

      case ITEM_ID:
        return Long.valueOf(getItem_id());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case WAREHOUSE_ID:
        return isSetWarehouse_id();
      case ITEM_ID:
        return isSetItem_id();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getNlcForWarehouse_args)
        return this.equals((getNlcForWarehouse_args)that);
      return false;
    }

    public boolean equals(getNlcForWarehouse_args that) {
      if (that == null)
        return false;

      boolean this_present_warehouse_id = true;
      boolean that_present_warehouse_id = true;
      if (this_present_warehouse_id || that_present_warehouse_id) {
        if (!(this_present_warehouse_id && that_present_warehouse_id))
          return false;
        if (this.warehouse_id != that.warehouse_id)
          return false;
      }

      boolean this_present_item_id = true;
      boolean that_present_item_id = true;
      if (this_present_item_id || that_present_item_id) {
        if (!(this_present_item_id && that_present_item_id))
          return false;
        if (this.item_id != that.item_id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getNlcForWarehouse_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getNlcForWarehouse_args typedOther = (getNlcForWarehouse_args)other;

      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(typedOther.isSetWarehouse_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouse_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouse_id, typedOther.warehouse_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItem_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouse_id = iprot.readI64();
              setWarehouse_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.item_id = iprot.readI64();
              setItem_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouse_id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.item_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getNlcForWarehouse_args(");
      boolean first = true;

      sb.append("warehouse_id:");
      sb.append(this.warehouse_id);
      first = false;
      if (!first) sb.append(", ");
      sb.append("item_id:");
      sb.append(this.item_id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getNlcForWarehouse_result implements org.apache.thrift.TBase<getNlcForWarehouse_result, getNlcForWarehouse_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNlcForWarehouse_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.DOUBLE, (short)0);

    private double success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNlcForWarehouse_result.class, metaDataMap);
    }

    public getNlcForWarehouse_result() {
    }

    public getNlcForWarehouse_result(
      double success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getNlcForWarehouse_result(getNlcForWarehouse_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public getNlcForWarehouse_result deepCopy() {
      return new getNlcForWarehouse_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0.0;
    }

    public double getSuccess() {
      return this.success;
    }

    public void setSuccess(double success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Double)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Double.valueOf(getSuccess());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getNlcForWarehouse_result)
        return this.equals((getNlcForWarehouse_result)that);
      return false;
    }

    public boolean equals(getNlcForWarehouse_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getNlcForWarehouse_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getNlcForWarehouse_result typedOther = (getNlcForWarehouse_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
              this.success = iprot.readDouble();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeDouble(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getNlcForWarehouse_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getHeldInventoryMapForItem_args implements org.apache.thrift.TBase<getHeldInventoryMapForItem_args, getHeldInventoryMapForItem_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHeldInventoryMapForItem_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouse_id", org.apache.thrift.protocol.TType.I64, (short)2);

    private long item_id; // required
    private long warehouse_id; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "item_id"),
      WAREHOUSE_ID((short)2, "warehouse_id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEM_ID_ISSET_ID = 0;
    private static final int __WAREHOUSE_ID_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouse_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHeldInventoryMapForItem_args.class, metaDataMap);
    }

    public getHeldInventoryMapForItem_args() {
    }

    public getHeldInventoryMapForItem_args(
      long item_id,
      long warehouse_id)
    {
      this();
      this.item_id = item_id;
      setItem_idIsSet(true);
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getHeldInventoryMapForItem_args(getHeldInventoryMapForItem_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.item_id = other.item_id;
      this.warehouse_id = other.warehouse_id;
    }

    public getHeldInventoryMapForItem_args deepCopy() {
      return new getHeldInventoryMapForItem_args(this);
    }

    @Override
    public void clear() {
      setItem_idIsSet(false);
      this.item_id = 0;
      setWarehouse_idIsSet(false);
      this.warehouse_id = 0;
    }

    public long getItem_id() {
      return this.item_id;
    }

    public void setItem_id(long item_id) {
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    public void unsetItem_id() {
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
    }

    /** Returns true if field item_id is set (has been assigned a value) and false otherwise */
    public boolean isSetItem_id() {
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
    }

    public void setItem_idIsSet(boolean value) {
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
    }

    public long getWarehouse_id() {
      return this.warehouse_id;
    }

    public void setWarehouse_id(long warehouse_id) {
      this.warehouse_id = warehouse_id;
      setWarehouse_idIsSet(true);
    }

    public void unsetWarehouse_id() {
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
    }

    /** Returns true if field warehouse_id is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouse_id() {
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
    }

    public void setWarehouse_idIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItem_id();
        } else {
          setItem_id((Long)value);
        }
        break;

      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouse_id();
        } else {
          setWarehouse_id((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItem_id());

      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouse_id());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItem_id();
      case WAREHOUSE_ID:
        return isSetWarehouse_id();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getHeldInventoryMapForItem_args)
        return this.equals((getHeldInventoryMapForItem_args)that);
      return false;
    }

    public boolean equals(getHeldInventoryMapForItem_args that) {
      if (that == null)
        return false;

      boolean this_present_item_id = true;
      boolean that_present_item_id = true;
      if (this_present_item_id || that_present_item_id) {
        if (!(this_present_item_id && that_present_item_id))
          return false;
        if (this.item_id != that.item_id)
          return false;
      }

      boolean this_present_warehouse_id = true;
      boolean that_present_warehouse_id = true;
      if (this_present_warehouse_id || that_present_warehouse_id) {
        if (!(this_present_warehouse_id && that_present_warehouse_id))
          return false;
        if (this.warehouse_id != that.warehouse_id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getHeldInventoryMapForItem_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getHeldInventoryMapForItem_args typedOther = (getHeldInventoryMapForItem_args)other;

      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItem_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(typedOther.isSetWarehouse_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouse_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouse_id, typedOther.warehouse_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.item_id = iprot.readI64();
              setItem_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouse_id = iprot.readI64();
              setWarehouse_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.item_id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouse_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getHeldInventoryMapForItem_args(");
      boolean first = true;

      sb.append("item_id:");
      sb.append(this.item_id);
      first = false;
      if (!first) sb.append(", ");
      sb.append("warehouse_id:");
      sb.append(this.warehouse_id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getHeldInventoryMapForItem_result implements org.apache.thrift.TBase<getHeldInventoryMapForItem_result, getHeldInventoryMapForItem_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHeldInventoryMapForItem_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);

    private Map<Integer,Long> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32), 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHeldInventoryMapForItem_result.class, metaDataMap);
    }

    public getHeldInventoryMapForItem_result() {
    }

    public getHeldInventoryMapForItem_result(
      Map<Integer,Long> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getHeldInventoryMapForItem_result(getHeldInventoryMapForItem_result other) {
      if (other.isSetSuccess()) {
        Map<Integer,Long> __this__success = new HashMap<Integer,Long>();
        for (Map.Entry<Integer, Long> other_element : other.success.entrySet()) {

          Integer other_element_key = other_element.getKey();
          Long other_element_value = other_element.getValue();

          Integer __this__success_copy_key = other_element_key;

          Long __this__success_copy_value = other_element_value;

          __this__success.put(__this__success_copy_key, __this__success_copy_value);
        }
        this.success = __this__success;
      }
    }

    public getHeldInventoryMapForItem_result deepCopy() {
      return new getHeldInventoryMapForItem_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public void putToSuccess(int key, long val) {
      if (this.success == null) {
        this.success = new HashMap<Integer,Long>();
      }
      this.success.put(key, val);
    }

    public Map<Integer,Long> getSuccess() {
      return this.success;
    }

    public void setSuccess(Map<Integer,Long> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Map<Integer,Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getHeldInventoryMapForItem_result)
        return this.equals((getHeldInventoryMapForItem_result)that);
      return false;
    }

    public boolean equals(getHeldInventoryMapForItem_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getHeldInventoryMapForItem_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getHeldInventoryMapForItem_result typedOther = (getHeldInventoryMapForItem_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map150 = iprot.readMapBegin();
                this.success = new HashMap<Integer,Long>(2*_map150.size);
                for (int _i151 = 0; _i151 < _map150.size; ++_i151)
                {
                  int _key152; // required
                  long _val153; // required
                  _key152 = iprot.readI32();
                  _val153 = iprot.readI64();
                  this.success.put(_key152, _val153);
                }
                iprot.readMapEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.I64, this.success.size()));
          for (Map.Entry<Integer, Long> _iter154 : this.success.entrySet())
          {
            oprot.writeI32(_iter154.getKey());
            oprot.writeI64(_iter154.getValue());
          }
          oprot.writeMapEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getHeldInventoryMapForItem_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addOrUpdateAllAmazonFbaInventory_args implements org.apache.thrift.TBase<addOrUpdateAllAmazonFbaInventory_args, addOrUpdateAllAmazonFbaInventory_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addOrUpdateAllAmazonFbaInventory_args");

    private static final org.apache.thrift.protocol.TField ALLAMAZONFBAINVENTORYSNAPSHOT_FIELD_DESC = new org.apache.thrift.protocol.TField("allamazonfbainventorysnapshot", org.apache.thrift.protocol.TType.LIST, (short)-1);

    private List<AmazonFbaInventorySnapshot> allamazonfbainventorysnapshot; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ALLAMAZONFBAINVENTORYSNAPSHOT((short)-1, "allamazonfbainventorysnapshot");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case -1: // ALLAMAZONFBAINVENTORYSNAPSHOT
            return ALLAMAZONFBAINVENTORYSNAPSHOT;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ALLAMAZONFBAINVENTORYSNAPSHOT, new org.apache.thrift.meta_data.FieldMetaData("allamazonfbainventorysnapshot", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AmazonFbaInventorySnapshot.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addOrUpdateAllAmazonFbaInventory_args.class, metaDataMap);
    }

    public addOrUpdateAllAmazonFbaInventory_args() {
    }

    public addOrUpdateAllAmazonFbaInventory_args(
      List<AmazonFbaInventorySnapshot> allamazonfbainventorysnapshot)
    {
      this();
      this.allamazonfbainventorysnapshot = allamazonfbainventorysnapshot;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addOrUpdateAllAmazonFbaInventory_args(addOrUpdateAllAmazonFbaInventory_args other) {
      if (other.isSetAllamazonfbainventorysnapshot()) {
        List<AmazonFbaInventorySnapshot> __this__allamazonfbainventorysnapshot = new ArrayList<AmazonFbaInventorySnapshot>();
        for (AmazonFbaInventorySnapshot other_element : other.allamazonfbainventorysnapshot) {
          __this__allamazonfbainventorysnapshot.add(new AmazonFbaInventorySnapshot(other_element));
        }
        this.allamazonfbainventorysnapshot = __this__allamazonfbainventorysnapshot;
      }
    }

    public addOrUpdateAllAmazonFbaInventory_args deepCopy() {
      return new addOrUpdateAllAmazonFbaInventory_args(this);
    }

    @Override
    public void clear() {
      this.allamazonfbainventorysnapshot = null;
    }

    public int getAllamazonfbainventorysnapshotSize() {
      return (this.allamazonfbainventorysnapshot == null) ? 0 : this.allamazonfbainventorysnapshot.size();
    }

    public java.util.Iterator<AmazonFbaInventorySnapshot> getAllamazonfbainventorysnapshotIterator() {
      return (this.allamazonfbainventorysnapshot == null) ? null : this.allamazonfbainventorysnapshot.iterator();
    }

    public void addToAllamazonfbainventorysnapshot(AmazonFbaInventorySnapshot elem) {
      if (this.allamazonfbainventorysnapshot == null) {
        this.allamazonfbainventorysnapshot = new ArrayList<AmazonFbaInventorySnapshot>();
      }
      this.allamazonfbainventorysnapshot.add(elem);
    }

    public List<AmazonFbaInventorySnapshot> getAllamazonfbainventorysnapshot() {
      return this.allamazonfbainventorysnapshot;
    }

    public void setAllamazonfbainventorysnapshot(List<AmazonFbaInventorySnapshot> allamazonfbainventorysnapshot) {
      this.allamazonfbainventorysnapshot = allamazonfbainventorysnapshot;
    }

    public void unsetAllamazonfbainventorysnapshot() {
      this.allamazonfbainventorysnapshot = null;
    }

    /** Returns true if field allamazonfbainventorysnapshot is set (has been assigned a value) and false otherwise */
    public boolean isSetAllamazonfbainventorysnapshot() {
      return this.allamazonfbainventorysnapshot != null;
    }

    public void setAllamazonfbainventorysnapshotIsSet(boolean value) {
      if (!value) {
        this.allamazonfbainventorysnapshot = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ALLAMAZONFBAINVENTORYSNAPSHOT:
        if (value == null) {
          unsetAllamazonfbainventorysnapshot();
        } else {
          setAllamazonfbainventorysnapshot((List<AmazonFbaInventorySnapshot>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ALLAMAZONFBAINVENTORYSNAPSHOT:
        return getAllamazonfbainventorysnapshot();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ALLAMAZONFBAINVENTORYSNAPSHOT:
        return isSetAllamazonfbainventorysnapshot();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addOrUpdateAllAmazonFbaInventory_args)
        return this.equals((addOrUpdateAllAmazonFbaInventory_args)that);
      return false;
    }

    public boolean equals(addOrUpdateAllAmazonFbaInventory_args that) {
      if (that == null)
        return false;

      boolean this_present_allamazonfbainventorysnapshot = true && this.isSetAllamazonfbainventorysnapshot();
      boolean that_present_allamazonfbainventorysnapshot = true && that.isSetAllamazonfbainventorysnapshot();
      if (this_present_allamazonfbainventorysnapshot || that_present_allamazonfbainventorysnapshot) {
        if (!(this_present_allamazonfbainventorysnapshot && that_present_allamazonfbainventorysnapshot))
          return false;
        if (!this.allamazonfbainventorysnapshot.equals(that.allamazonfbainventorysnapshot))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addOrUpdateAllAmazonFbaInventory_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addOrUpdateAllAmazonFbaInventory_args typedOther = (addOrUpdateAllAmazonFbaInventory_args)other;

      lastComparison = Boolean.valueOf(isSetAllamazonfbainventorysnapshot()).compareTo(typedOther.isSetAllamazonfbainventorysnapshot());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAllamazonfbainventorysnapshot()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.allamazonfbainventorysnapshot, typedOther.allamazonfbainventorysnapshot);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case -1: // ALLAMAZONFBAINVENTORYSNAPSHOT
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list155 = iprot.readListBegin();
                this.allamazonfbainventorysnapshot = new ArrayList<AmazonFbaInventorySnapshot>(_list155.size);
                for (int _i156 = 0; _i156 < _list155.size; ++_i156)
                {
                  AmazonFbaInventorySnapshot _elem157; // required
                  _elem157 = new AmazonFbaInventorySnapshot();
                  _elem157.read(iprot);
                  this.allamazonfbainventorysnapshot.add(_elem157);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.allamazonfbainventorysnapshot != null) {
        oprot.writeFieldBegin(ALLAMAZONFBAINVENTORYSNAPSHOT_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.allamazonfbainventorysnapshot.size()));
          for (AmazonFbaInventorySnapshot _iter158 : this.allamazonfbainventorysnapshot)
          {
            _iter158.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addOrUpdateAllAmazonFbaInventory_args(");
      boolean first = true;

      sb.append("allamazonfbainventorysnapshot:");
      if (this.allamazonfbainventorysnapshot == null) {
        sb.append("null");
      } else {
        sb.append(this.allamazonfbainventorysnapshot);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addOrUpdateAllAmazonFbaInventory_result implements org.apache.thrift.TBase<addOrUpdateAllAmazonFbaInventory_result, addOrUpdateAllAmazonFbaInventory_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addOrUpdateAllAmazonFbaInventory_result");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addOrUpdateAllAmazonFbaInventory_result.class, metaDataMap);
    }

    public addOrUpdateAllAmazonFbaInventory_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addOrUpdateAllAmazonFbaInventory_result(addOrUpdateAllAmazonFbaInventory_result other) {
    }

    public addOrUpdateAllAmazonFbaInventory_result deepCopy() {
      return new addOrUpdateAllAmazonFbaInventory_result(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addOrUpdateAllAmazonFbaInventory_result)
        return this.equals((addOrUpdateAllAmazonFbaInventory_result)that);
      return false;
    }

    public boolean equals(addOrUpdateAllAmazonFbaInventory_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addOrUpdateAllAmazonFbaInventory_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addOrUpdateAllAmazonFbaInventory_result typedOther = (addOrUpdateAllAmazonFbaInventory_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addOrUpdateAllAmazonFbaInventory_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addOrUpdateAllSnapdealInventory_args implements org.apache.thrift.TBase<addOrUpdateAllSnapdealInventory_args, addOrUpdateAllSnapdealInventory_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addOrUpdateAllSnapdealInventory_args");

    private static final org.apache.thrift.protocol.TField ALLSNAPDEALINVENTORYSNAPSHOT_FIELD_DESC = new org.apache.thrift.protocol.TField("allsnapdealinventorysnapshot", org.apache.thrift.protocol.TType.LIST, (short)-1);

    private List<SnapdealInventoryItem> allsnapdealinventorysnapshot; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ALLSNAPDEALINVENTORYSNAPSHOT((short)-1, "allsnapdealinventorysnapshot");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case -1: // ALLSNAPDEALINVENTORYSNAPSHOT
            return ALLSNAPDEALINVENTORYSNAPSHOT;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ALLSNAPDEALINVENTORYSNAPSHOT, new org.apache.thrift.meta_data.FieldMetaData("allsnapdealinventorysnapshot", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SnapdealInventoryItem.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addOrUpdateAllSnapdealInventory_args.class, metaDataMap);
    }

    public addOrUpdateAllSnapdealInventory_args() {
    }

    public addOrUpdateAllSnapdealInventory_args(
      List<SnapdealInventoryItem> allsnapdealinventorysnapshot)
    {
      this();
      this.allsnapdealinventorysnapshot = allsnapdealinventorysnapshot;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addOrUpdateAllSnapdealInventory_args(addOrUpdateAllSnapdealInventory_args other) {
      if (other.isSetAllsnapdealinventorysnapshot()) {
        List<SnapdealInventoryItem> __this__allsnapdealinventorysnapshot = new ArrayList<SnapdealInventoryItem>();
        for (SnapdealInventoryItem other_element : other.allsnapdealinventorysnapshot) {
          __this__allsnapdealinventorysnapshot.add(new SnapdealInventoryItem(other_element));
        }
        this.allsnapdealinventorysnapshot = __this__allsnapdealinventorysnapshot;
      }
    }

    public addOrUpdateAllSnapdealInventory_args deepCopy() {
      return new addOrUpdateAllSnapdealInventory_args(this);
    }

    @Override
    public void clear() {
      this.allsnapdealinventorysnapshot = null;
    }

    public int getAllsnapdealinventorysnapshotSize() {
      return (this.allsnapdealinventorysnapshot == null) ? 0 : this.allsnapdealinventorysnapshot.size();
    }

    public java.util.Iterator<SnapdealInventoryItem> getAllsnapdealinventorysnapshotIterator() {
      return (this.allsnapdealinventorysnapshot == null) ? null : this.allsnapdealinventorysnapshot.iterator();
    }

    public void addToAllsnapdealinventorysnapshot(SnapdealInventoryItem elem) {
      if (this.allsnapdealinventorysnapshot == null) {
        this.allsnapdealinventorysnapshot = new ArrayList<SnapdealInventoryItem>();
      }
      this.allsnapdealinventorysnapshot.add(elem);
    }

    public List<SnapdealInventoryItem> getAllsnapdealinventorysnapshot() {
      return this.allsnapdealinventorysnapshot;
    }

    public void setAllsnapdealinventorysnapshot(List<SnapdealInventoryItem> allsnapdealinventorysnapshot) {
      this.allsnapdealinventorysnapshot = allsnapdealinventorysnapshot;
    }

    public void unsetAllsnapdealinventorysnapshot() {
      this.allsnapdealinventorysnapshot = null;
    }

    /** Returns true if field allsnapdealinventorysnapshot is set (has been assigned a value) and false otherwise */
    public boolean isSetAllsnapdealinventorysnapshot() {
      return this.allsnapdealinventorysnapshot != null;
    }

    public void setAllsnapdealinventorysnapshotIsSet(boolean value) {
      if (!value) {
        this.allsnapdealinventorysnapshot = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ALLSNAPDEALINVENTORYSNAPSHOT:
        if (value == null) {
          unsetAllsnapdealinventorysnapshot();
        } else {
          setAllsnapdealinventorysnapshot((List<SnapdealInventoryItem>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ALLSNAPDEALINVENTORYSNAPSHOT:
        return getAllsnapdealinventorysnapshot();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ALLSNAPDEALINVENTORYSNAPSHOT:
        return isSetAllsnapdealinventorysnapshot();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addOrUpdateAllSnapdealInventory_args)
        return this.equals((addOrUpdateAllSnapdealInventory_args)that);
      return false;
    }

    public boolean equals(addOrUpdateAllSnapdealInventory_args that) {
      if (that == null)
        return false;

      boolean this_present_allsnapdealinventorysnapshot = true && this.isSetAllsnapdealinventorysnapshot();
      boolean that_present_allsnapdealinventorysnapshot = true && that.isSetAllsnapdealinventorysnapshot();
      if (this_present_allsnapdealinventorysnapshot || that_present_allsnapdealinventorysnapshot) {
        if (!(this_present_allsnapdealinventorysnapshot && that_present_allsnapdealinventorysnapshot))
          return false;
        if (!this.allsnapdealinventorysnapshot.equals(that.allsnapdealinventorysnapshot))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addOrUpdateAllSnapdealInventory_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addOrUpdateAllSnapdealInventory_args typedOther = (addOrUpdateAllSnapdealInventory_args)other;

      lastComparison = Boolean.valueOf(isSetAllsnapdealinventorysnapshot()).compareTo(typedOther.isSetAllsnapdealinventorysnapshot());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAllsnapdealinventorysnapshot()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.allsnapdealinventorysnapshot, typedOther.allsnapdealinventorysnapshot);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case -1: // ALLSNAPDEALINVENTORYSNAPSHOT
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list159 = iprot.readListBegin();
                this.allsnapdealinventorysnapshot = new ArrayList<SnapdealInventoryItem>(_list159.size);
                for (int _i160 = 0; _i160 < _list159.size; ++_i160)
                {
                  SnapdealInventoryItem _elem161; // required
                  _elem161 = new SnapdealInventoryItem();
                  _elem161.read(iprot);
                  this.allsnapdealinventorysnapshot.add(_elem161);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.allsnapdealinventorysnapshot != null) {
        oprot.writeFieldBegin(ALLSNAPDEALINVENTORYSNAPSHOT_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.allsnapdealinventorysnapshot.size()));
          for (SnapdealInventoryItem _iter162 : this.allsnapdealinventorysnapshot)
          {
            _iter162.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addOrUpdateAllSnapdealInventory_args(");
      boolean first = true;

      sb.append("allsnapdealinventorysnapshot:");
      if (this.allsnapdealinventorysnapshot == null) {
        sb.append("null");
      } else {
        sb.append(this.allsnapdealinventorysnapshot);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addOrUpdateAllSnapdealInventory_result implements org.apache.thrift.TBase<addOrUpdateAllSnapdealInventory_result, addOrUpdateAllSnapdealInventory_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addOrUpdateAllSnapdealInventory_result");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addOrUpdateAllSnapdealInventory_result.class, metaDataMap);
    }

    public addOrUpdateAllSnapdealInventory_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addOrUpdateAllSnapdealInventory_result(addOrUpdateAllSnapdealInventory_result other) {
    }

    public addOrUpdateAllSnapdealInventory_result deepCopy() {
      return new addOrUpdateAllSnapdealInventory_result(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addOrUpdateAllSnapdealInventory_result)
        return this.equals((addOrUpdateAllSnapdealInventory_result)that);
      return false;
    }

    public boolean equals(addOrUpdateAllSnapdealInventory_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addOrUpdateAllSnapdealInventory_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addOrUpdateAllSnapdealInventory_result typedOther = (addOrUpdateAllSnapdealInventory_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addOrUpdateAllSnapdealInventory_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getSnapdealInventorySnapshot_args implements org.apache.thrift.TBase<getSnapdealInventorySnapshot_args, getSnapdealInventorySnapshot_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSnapdealInventorySnapshot_args");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSnapdealInventorySnapshot_args.class, metaDataMap);
    }

    public getSnapdealInventorySnapshot_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getSnapdealInventorySnapshot_args(getSnapdealInventorySnapshot_args other) {
    }

    public getSnapdealInventorySnapshot_args deepCopy() {
      return new getSnapdealInventorySnapshot_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getSnapdealInventorySnapshot_args)
        return this.equals((getSnapdealInventorySnapshot_args)that);
      return false;
    }

    public boolean equals(getSnapdealInventorySnapshot_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getSnapdealInventorySnapshot_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getSnapdealInventorySnapshot_args typedOther = (getSnapdealInventorySnapshot_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getSnapdealInventorySnapshot_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getSnapdealInventorySnapshot_result implements org.apache.thrift.TBase<getSnapdealInventorySnapshot_result, getSnapdealInventorySnapshot_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSnapdealInventorySnapshot_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<SnapdealInventoryItem> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SnapdealInventoryItem.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSnapdealInventorySnapshot_result.class, metaDataMap);
    }

    public getSnapdealInventorySnapshot_result() {
    }

    public getSnapdealInventorySnapshot_result(
      List<SnapdealInventoryItem> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getSnapdealInventorySnapshot_result(getSnapdealInventorySnapshot_result other) {
      if (other.isSetSuccess()) {
        List<SnapdealInventoryItem> __this__success = new ArrayList<SnapdealInventoryItem>();
        for (SnapdealInventoryItem other_element : other.success) {
          __this__success.add(new SnapdealInventoryItem(other_element));
        }
        this.success = __this__success;
      }
    }

    public getSnapdealInventorySnapshot_result deepCopy() {
      return new getSnapdealInventorySnapshot_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<SnapdealInventoryItem> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(SnapdealInventoryItem elem) {
      if (this.success == null) {
        this.success = new ArrayList<SnapdealInventoryItem>();
      }
      this.success.add(elem);
    }

    public List<SnapdealInventoryItem> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<SnapdealInventoryItem> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<SnapdealInventoryItem>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getSnapdealInventorySnapshot_result)
        return this.equals((getSnapdealInventorySnapshot_result)that);
      return false;
    }

    public boolean equals(getSnapdealInventorySnapshot_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getSnapdealInventorySnapshot_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getSnapdealInventorySnapshot_result typedOther = (getSnapdealInventorySnapshot_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list163 = iprot.readListBegin();
                this.success = new ArrayList<SnapdealInventoryItem>(_list163.size);
                for (int _i164 = 0; _i164 < _list163.size; ++_i164)
                {
                  SnapdealInventoryItem _elem165; // required
                  _elem165 = new SnapdealInventoryItem();
                  _elem165.read(iprot);
                  this.success.add(_elem165);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (SnapdealInventoryItem _iter166 : this.success)
          {
            _iter166.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getSnapdealInventorySnapshot_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getHoldInventoryDetails_args implements org.apache.thrift.TBase<getHoldInventoryDetails_args, getHoldInventoryDetails_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHoldInventoryDetails_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("itemId", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)2);
    private static final org.apache.thrift.protocol.TField SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("source", org.apache.thrift.protocol.TType.I64, (short)3);

    private long itemId; // required
    private long warehouseId; // required
    private long source; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "itemId"),
      WAREHOUSE_ID((short)2, "warehouseId"),
      SOURCE((short)3, "source");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // WAREHOUSE_ID
            return WAREHOUSE_ID;
          case 3: // SOURCE
            return SOURCE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEMID_ISSET_ID = 0;
    private static final int __WAREHOUSEID_ISSET_ID = 1;
    private static final int __SOURCE_ISSET_ID = 2;
    private BitSet __isset_bit_vector = new BitSet(3);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SOURCE, new org.apache.thrift.meta_data.FieldMetaData("source", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHoldInventoryDetails_args.class, metaDataMap);
    }

    public getHoldInventoryDetails_args() {
    }

    public getHoldInventoryDetails_args(
      long itemId,
      long warehouseId,
      long source)
    {
      this();
      this.itemId = itemId;
      setItemIdIsSet(true);
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
      this.source = source;
      setSourceIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getHoldInventoryDetails_args(getHoldInventoryDetails_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.itemId = other.itemId;
      this.warehouseId = other.warehouseId;
      this.source = other.source;
    }

    public getHoldInventoryDetails_args deepCopy() {
      return new getHoldInventoryDetails_args(this);
    }

    @Override
    public void clear() {
      setItemIdIsSet(false);
      this.itemId = 0;
      setWarehouseIdIsSet(false);
      this.warehouseId = 0;
      setSourceIsSet(false);
      this.source = 0;
    }

    public long getItemId() {
      return this.itemId;
    }

    public void setItemId(long itemId) {
      this.itemId = itemId;
      setItemIdIsSet(true);
    }

    public void unsetItemId() {
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
    }

    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
    public boolean isSetItemId() {
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
    }

    public void setItemIdIsSet(boolean value) {
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
    }

    public long getWarehouseId() {
      return this.warehouseId;
    }

    public void setWarehouseId(long warehouseId) {
      this.warehouseId = warehouseId;
      setWarehouseIdIsSet(true);
    }

    public void unsetWarehouseId() {
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
    }

    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
    public boolean isSetWarehouseId() {
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
    }

    public void setWarehouseIdIsSet(boolean value) {
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
    }

    public long getSource() {
      return this.source;
    }

    public void setSource(long source) {
      this.source = source;
      setSourceIsSet(true);
    }

    public void unsetSource() {
      __isset_bit_vector.clear(__SOURCE_ISSET_ID);
    }

    /** Returns true if field source is set (has been assigned a value) and false otherwise */
    public boolean isSetSource() {
      return __isset_bit_vector.get(__SOURCE_ISSET_ID);
    }

    public void setSourceIsSet(boolean value) {
      __isset_bit_vector.set(__SOURCE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItemId();
        } else {
          setItemId((Long)value);
        }
        break;

      case WAREHOUSE_ID:
        if (value == null) {
          unsetWarehouseId();
        } else {
          setWarehouseId((Long)value);
        }
        break;

      case SOURCE:
        if (value == null) {
          unsetSource();
        } else {
          setSource((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItemId());

      case WAREHOUSE_ID:
        return Long.valueOf(getWarehouseId());

      case SOURCE:
        return Long.valueOf(getSource());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItemId();
      case WAREHOUSE_ID:
        return isSetWarehouseId();
      case SOURCE:
        return isSetSource();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getHoldInventoryDetails_args)
        return this.equals((getHoldInventoryDetails_args)that);
      return false;
    }

    public boolean equals(getHoldInventoryDetails_args that) {
      if (that == null)
        return false;

      boolean this_present_itemId = true;
      boolean that_present_itemId = true;
      if (this_present_itemId || that_present_itemId) {
        if (!(this_present_itemId && that_present_itemId))
          return false;
        if (this.itemId != that.itemId)
          return false;
      }

      boolean this_present_warehouseId = true;
      boolean that_present_warehouseId = true;
      if (this_present_warehouseId || that_present_warehouseId) {
        if (!(this_present_warehouseId && that_present_warehouseId))
          return false;
        if (this.warehouseId != that.warehouseId)
          return false;
      }

      boolean this_present_source = true;
      boolean that_present_source = true;
      if (this_present_source || that_present_source) {
        if (!(this_present_source && that_present_source))
          return false;
        if (this.source != that.source)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getHoldInventoryDetails_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getHoldInventoryDetails_args typedOther = (getHoldInventoryDetails_args)other;

      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetWarehouseId()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSource()).compareTo(typedOther.isSetSource());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSource()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source, typedOther.source);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.itemId = iprot.readI64();
              setItemIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // WAREHOUSE_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.warehouseId = iprot.readI64();
              setWarehouseIdIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 3: // SOURCE
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.source = iprot.readI64();
              setSourceIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.itemId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
      oprot.writeI64(this.warehouseId);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SOURCE_FIELD_DESC);
      oprot.writeI64(this.source);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getHoldInventoryDetails_args(");
      boolean first = true;

      sb.append("itemId:");
      sb.append(this.itemId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("warehouseId:");
      sb.append(this.warehouseId);
      first = false;
      if (!first) sb.append(", ");
      sb.append("source:");
      sb.append(this.source);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getHoldInventoryDetails_result implements org.apache.thrift.TBase<getHoldInventoryDetails_result, getHoldInventoryDetails_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHoldInventoryDetails_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<HoldInventoryDetail> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HoldInventoryDetail.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHoldInventoryDetails_result.class, metaDataMap);
    }

    public getHoldInventoryDetails_result() {
    }

    public getHoldInventoryDetails_result(
      List<HoldInventoryDetail> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getHoldInventoryDetails_result(getHoldInventoryDetails_result other) {
      if (other.isSetSuccess()) {
        List<HoldInventoryDetail> __this__success = new ArrayList<HoldInventoryDetail>();
        for (HoldInventoryDetail other_element : other.success) {
          __this__success.add(new HoldInventoryDetail(other_element));
        }
        this.success = __this__success;
      }
    }

    public getHoldInventoryDetails_result deepCopy() {
      return new getHoldInventoryDetails_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<HoldInventoryDetail> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(HoldInventoryDetail elem) {
      if (this.success == null) {
        this.success = new ArrayList<HoldInventoryDetail>();
      }
      this.success.add(elem);
    }

    public List<HoldInventoryDetail> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<HoldInventoryDetail> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<HoldInventoryDetail>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getHoldInventoryDetails_result)
        return this.equals((getHoldInventoryDetails_result)that);
      return false;
    }

    public boolean equals(getHoldInventoryDetails_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getHoldInventoryDetails_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getHoldInventoryDetails_result typedOther = (getHoldInventoryDetails_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list167 = iprot.readListBegin();
                this.success = new ArrayList<HoldInventoryDetail>(_list167.size);
                for (int _i168 = 0; _i168 < _list167.size; ++_i168)
                {
                  HoldInventoryDetail _elem169; // required
                  _elem169 = new HoldInventoryDetail();
                  _elem169.read(iprot);
                  this.success.add(_elem169);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (HoldInventoryDetail _iter170 : this.success)
          {
            _iter170.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getHoldInventoryDetails_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addOrUpdateFlipkartInventorySnapshot_args implements org.apache.thrift.TBase<addOrUpdateFlipkartInventorySnapshot_args, addOrUpdateFlipkartInventorySnapshot_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addOrUpdateFlipkartInventorySnapshot_args");

    private static final org.apache.thrift.protocol.TField FLIPKART_INVENTORY_SNAPSHOT_FIELD_DESC = new org.apache.thrift.protocol.TField("flipkartInventorySnapshot", org.apache.thrift.protocol.TType.LIST, (short)1);
    private static final org.apache.thrift.protocol.TField TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("time", org.apache.thrift.protocol.TType.I64, (short)2);

    private List<FlipkartInventorySnapshot> flipkartInventorySnapshot; // required
    private long time; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      FLIPKART_INVENTORY_SNAPSHOT((short)1, "flipkartInventorySnapshot"),
      TIME((short)2, "time");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // FLIPKART_INVENTORY_SNAPSHOT
            return FLIPKART_INVENTORY_SNAPSHOT;
          case 2: // TIME
            return TIME;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __TIME_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.FLIPKART_INVENTORY_SNAPSHOT, new org.apache.thrift.meta_data.FieldMetaData("flipkartInventorySnapshot", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FlipkartInventorySnapshot.class))));
      tmpMap.put(_Fields.TIME, new org.apache.thrift.meta_data.FieldMetaData("time", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addOrUpdateFlipkartInventorySnapshot_args.class, metaDataMap);
    }

    public addOrUpdateFlipkartInventorySnapshot_args() {
    }

    public addOrUpdateFlipkartInventorySnapshot_args(
      List<FlipkartInventorySnapshot> flipkartInventorySnapshot,
      long time)
    {
      this();
      this.flipkartInventorySnapshot = flipkartInventorySnapshot;
      this.time = time;
      setTimeIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addOrUpdateFlipkartInventorySnapshot_args(addOrUpdateFlipkartInventorySnapshot_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      if (other.isSetFlipkartInventorySnapshot()) {
        List<FlipkartInventorySnapshot> __this__flipkartInventorySnapshot = new ArrayList<FlipkartInventorySnapshot>();
        for (FlipkartInventorySnapshot other_element : other.flipkartInventorySnapshot) {
          __this__flipkartInventorySnapshot.add(new FlipkartInventorySnapshot(other_element));
        }
        this.flipkartInventorySnapshot = __this__flipkartInventorySnapshot;
      }
      this.time = other.time;
    }

    public addOrUpdateFlipkartInventorySnapshot_args deepCopy() {
      return new addOrUpdateFlipkartInventorySnapshot_args(this);
    }

    @Override
    public void clear() {
      this.flipkartInventorySnapshot = null;
      setTimeIsSet(false);
      this.time = 0;
    }

    public int getFlipkartInventorySnapshotSize() {
      return (this.flipkartInventorySnapshot == null) ? 0 : this.flipkartInventorySnapshot.size();
    }

    public java.util.Iterator<FlipkartInventorySnapshot> getFlipkartInventorySnapshotIterator() {
      return (this.flipkartInventorySnapshot == null) ? null : this.flipkartInventorySnapshot.iterator();
    }

    public void addToFlipkartInventorySnapshot(FlipkartInventorySnapshot elem) {
      if (this.flipkartInventorySnapshot == null) {
        this.flipkartInventorySnapshot = new ArrayList<FlipkartInventorySnapshot>();
      }
      this.flipkartInventorySnapshot.add(elem);
    }

    public List<FlipkartInventorySnapshot> getFlipkartInventorySnapshot() {
      return this.flipkartInventorySnapshot;
    }

    public void setFlipkartInventorySnapshot(List<FlipkartInventorySnapshot> flipkartInventorySnapshot) {
      this.flipkartInventorySnapshot = flipkartInventorySnapshot;
    }

    public void unsetFlipkartInventorySnapshot() {
      this.flipkartInventorySnapshot = null;
    }

    /** Returns true if field flipkartInventorySnapshot is set (has been assigned a value) and false otherwise */
    public boolean isSetFlipkartInventorySnapshot() {
      return this.flipkartInventorySnapshot != null;
    }

    public void setFlipkartInventorySnapshotIsSet(boolean value) {
      if (!value) {
        this.flipkartInventorySnapshot = null;
      }
    }

    public long getTime() {
      return this.time;
    }

    public void setTime(long time) {
      this.time = time;
      setTimeIsSet(true);
    }

    public void unsetTime() {
      __isset_bit_vector.clear(__TIME_ISSET_ID);
    }

    /** Returns true if field time is set (has been assigned a value) and false otherwise */
    public boolean isSetTime() {
      return __isset_bit_vector.get(__TIME_ISSET_ID);
    }

    public void setTimeIsSet(boolean value) {
      __isset_bit_vector.set(__TIME_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case FLIPKART_INVENTORY_SNAPSHOT:
        if (value == null) {
          unsetFlipkartInventorySnapshot();
        } else {
          setFlipkartInventorySnapshot((List<FlipkartInventorySnapshot>)value);
        }
        break;

      case TIME:
        if (value == null) {
          unsetTime();
        } else {
          setTime((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case FLIPKART_INVENTORY_SNAPSHOT:
        return getFlipkartInventorySnapshot();

      case TIME:
        return Long.valueOf(getTime());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case FLIPKART_INVENTORY_SNAPSHOT:
        return isSetFlipkartInventorySnapshot();
      case TIME:
        return isSetTime();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addOrUpdateFlipkartInventorySnapshot_args)
        return this.equals((addOrUpdateFlipkartInventorySnapshot_args)that);
      return false;
    }

    public boolean equals(addOrUpdateFlipkartInventorySnapshot_args that) {
      if (that == null)
        return false;

      boolean this_present_flipkartInventorySnapshot = true && this.isSetFlipkartInventorySnapshot();
      boolean that_present_flipkartInventorySnapshot = true && that.isSetFlipkartInventorySnapshot();
      if (this_present_flipkartInventorySnapshot || that_present_flipkartInventorySnapshot) {
        if (!(this_present_flipkartInventorySnapshot && that_present_flipkartInventorySnapshot))
          return false;
        if (!this.flipkartInventorySnapshot.equals(that.flipkartInventorySnapshot))
          return false;
      }

      boolean this_present_time = true;
      boolean that_present_time = true;
      if (this_present_time || that_present_time) {
        if (!(this_present_time && that_present_time))
          return false;
        if (this.time != that.time)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addOrUpdateFlipkartInventorySnapshot_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addOrUpdateFlipkartInventorySnapshot_args typedOther = (addOrUpdateFlipkartInventorySnapshot_args)other;

      lastComparison = Boolean.valueOf(isSetFlipkartInventorySnapshot()).compareTo(typedOther.isSetFlipkartInventorySnapshot());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetFlipkartInventorySnapshot()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.flipkartInventorySnapshot, typedOther.flipkartInventorySnapshot);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetTime()).compareTo(typedOther.isSetTime());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetTime()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.time, typedOther.time);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // FLIPKART_INVENTORY_SNAPSHOT
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list171 = iprot.readListBegin();
                this.flipkartInventorySnapshot = new ArrayList<FlipkartInventorySnapshot>(_list171.size);
                for (int _i172 = 0; _i172 < _list171.size; ++_i172)
                {
                  FlipkartInventorySnapshot _elem173; // required
                  _elem173 = new FlipkartInventorySnapshot();
                  _elem173.read(iprot);
                  this.flipkartInventorySnapshot.add(_elem173);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // TIME
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.time = iprot.readI64();
              setTimeIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.flipkartInventorySnapshot != null) {
        oprot.writeFieldBegin(FLIPKART_INVENTORY_SNAPSHOT_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.flipkartInventorySnapshot.size()));
          for (FlipkartInventorySnapshot _iter174 : this.flipkartInventorySnapshot)
          {
            _iter174.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldBegin(TIME_FIELD_DESC);
      oprot.writeI64(this.time);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addOrUpdateFlipkartInventorySnapshot_args(");
      boolean first = true;

      sb.append("flipkartInventorySnapshot:");
      if (this.flipkartInventorySnapshot == null) {
        sb.append("null");
      } else {
        sb.append(this.flipkartInventorySnapshot);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("time:");
      sb.append(this.time);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addOrUpdateFlipkartInventorySnapshot_result implements org.apache.thrift.TBase<addOrUpdateFlipkartInventorySnapshot_result, addOrUpdateFlipkartInventorySnapshot_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addOrUpdateFlipkartInventorySnapshot_result");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addOrUpdateFlipkartInventorySnapshot_result.class, metaDataMap);
    }

    public addOrUpdateFlipkartInventorySnapshot_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addOrUpdateFlipkartInventorySnapshot_result(addOrUpdateFlipkartInventorySnapshot_result other) {
    }

    public addOrUpdateFlipkartInventorySnapshot_result deepCopy() {
      return new addOrUpdateFlipkartInventorySnapshot_result(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addOrUpdateFlipkartInventorySnapshot_result)
        return this.equals((addOrUpdateFlipkartInventorySnapshot_result)that);
      return false;
    }

    public boolean equals(addOrUpdateFlipkartInventorySnapshot_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addOrUpdateFlipkartInventorySnapshot_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addOrUpdateFlipkartInventorySnapshot_result typedOther = (addOrUpdateFlipkartInventorySnapshot_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addOrUpdateFlipkartInventorySnapshot_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getFlipkartInventorySnapshot_args implements org.apache.thrift.TBase<getFlipkartInventorySnapshot_args, getFlipkartInventorySnapshot_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFlipkartInventorySnapshot_args");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFlipkartInventorySnapshot_args.class, metaDataMap);
    }

    public getFlipkartInventorySnapshot_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getFlipkartInventorySnapshot_args(getFlipkartInventorySnapshot_args other) {
    }

    public getFlipkartInventorySnapshot_args deepCopy() {
      return new getFlipkartInventorySnapshot_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getFlipkartInventorySnapshot_args)
        return this.equals((getFlipkartInventorySnapshot_args)that);
      return false;
    }

    public boolean equals(getFlipkartInventorySnapshot_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getFlipkartInventorySnapshot_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getFlipkartInventorySnapshot_args typedOther = (getFlipkartInventorySnapshot_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getFlipkartInventorySnapshot_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getFlipkartInventorySnapshot_result implements org.apache.thrift.TBase<getFlipkartInventorySnapshot_result, getFlipkartInventorySnapshot_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFlipkartInventorySnapshot_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<FlipkartInventorySnapshot> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FlipkartInventorySnapshot.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFlipkartInventorySnapshot_result.class, metaDataMap);
    }

    public getFlipkartInventorySnapshot_result() {
    }

    public getFlipkartInventorySnapshot_result(
      List<FlipkartInventorySnapshot> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getFlipkartInventorySnapshot_result(getFlipkartInventorySnapshot_result other) {
      if (other.isSetSuccess()) {
        List<FlipkartInventorySnapshot> __this__success = new ArrayList<FlipkartInventorySnapshot>();
        for (FlipkartInventorySnapshot other_element : other.success) {
          __this__success.add(new FlipkartInventorySnapshot(other_element));
        }
        this.success = __this__success;
      }
    }

    public getFlipkartInventorySnapshot_result deepCopy() {
      return new getFlipkartInventorySnapshot_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<FlipkartInventorySnapshot> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(FlipkartInventorySnapshot elem) {
      if (this.success == null) {
        this.success = new ArrayList<FlipkartInventorySnapshot>();
      }
      this.success.add(elem);
    }

    public List<FlipkartInventorySnapshot> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<FlipkartInventorySnapshot> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<FlipkartInventorySnapshot>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getFlipkartInventorySnapshot_result)
        return this.equals((getFlipkartInventorySnapshot_result)that);
      return false;
    }

    public boolean equals(getFlipkartInventorySnapshot_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getFlipkartInventorySnapshot_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getFlipkartInventorySnapshot_result typedOther = (getFlipkartInventorySnapshot_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list175 = iprot.readListBegin();
                this.success = new ArrayList<FlipkartInventorySnapshot>(_list175.size);
                for (int _i176 = 0; _i176 < _list175.size; ++_i176)
                {
                  FlipkartInventorySnapshot _elem177; // required
                  _elem177 = new FlipkartInventorySnapshot();
                  _elem177.read(iprot);
                  this.success.add(_elem177);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (FlipkartInventorySnapshot _iter178 : this.success)
          {
            _iter178.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getFlipkartInventorySnapshot_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getFlipkartlInventoryForItem_args implements org.apache.thrift.TBase<getFlipkartlInventoryForItem_args, getFlipkartlInventoryForItem_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFlipkartlInventoryForItem_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)1);

    private long item_id; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "item_id");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEM_ID_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFlipkartlInventoryForItem_args.class, metaDataMap);
    }

    public getFlipkartlInventoryForItem_args() {
    }

    public getFlipkartlInventoryForItem_args(
      long item_id)
    {
      this();
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getFlipkartlInventoryForItem_args(getFlipkartlInventoryForItem_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.item_id = other.item_id;
    }

    public getFlipkartlInventoryForItem_args deepCopy() {
      return new getFlipkartlInventoryForItem_args(this);
    }

    @Override
    public void clear() {
      setItem_idIsSet(false);
      this.item_id = 0;
    }

    public long getItem_id() {
      return this.item_id;
    }

    public void setItem_id(long item_id) {
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    public void unsetItem_id() {
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
    }

    /** Returns true if field item_id is set (has been assigned a value) and false otherwise */
    public boolean isSetItem_id() {
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
    }

    public void setItem_idIsSet(boolean value) {
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItem_id();
        } else {
          setItem_id((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItem_id());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItem_id();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getFlipkartlInventoryForItem_args)
        return this.equals((getFlipkartlInventoryForItem_args)that);
      return false;
    }

    public boolean equals(getFlipkartlInventoryForItem_args that) {
      if (that == null)
        return false;

      boolean this_present_item_id = true;
      boolean that_present_item_id = true;
      if (this_present_item_id || that_present_item_id) {
        if (!(this_present_item_id && that_present_item_id))
          return false;
        if (this.item_id != that.item_id)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getFlipkartlInventoryForItem_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getFlipkartlInventoryForItem_args typedOther = (getFlipkartlInventoryForItem_args)other;

      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItem_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.item_id = iprot.readI64();
              setItem_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.item_id);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getFlipkartlInventoryForItem_args(");
      boolean first = true;

      sb.append("item_id:");
      sb.append(this.item_id);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getFlipkartlInventoryForItem_result implements org.apache.thrift.TBase<getFlipkartlInventoryForItem_result, getFlipkartlInventoryForItem_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFlipkartlInventoryForItem_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRUCT, (short)0);

    private FlipkartInventorySnapshot success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FlipkartInventorySnapshot.class)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFlipkartlInventoryForItem_result.class, metaDataMap);
    }

    public getFlipkartlInventoryForItem_result() {
    }

    public getFlipkartlInventoryForItem_result(
      FlipkartInventorySnapshot success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getFlipkartlInventoryForItem_result(getFlipkartlInventoryForItem_result other) {
      if (other.isSetSuccess()) {
        this.success = new FlipkartInventorySnapshot(other.success);
      }
    }

    public getFlipkartlInventoryForItem_result deepCopy() {
      return new getFlipkartlInventoryForItem_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public FlipkartInventorySnapshot getSuccess() {
      return this.success;
    }

    public void setSuccess(FlipkartInventorySnapshot success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((FlipkartInventorySnapshot)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getFlipkartlInventoryForItem_result)
        return this.equals((getFlipkartlInventoryForItem_result)that);
      return false;
    }

    public boolean equals(getFlipkartlInventoryForItem_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getFlipkartlInventoryForItem_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getFlipkartlInventoryForItem_result typedOther = (getFlipkartlInventoryForItem_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.success = new FlipkartInventorySnapshot();
              this.success.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        this.success.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getFlipkartlInventoryForItem_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getStateMaster_args implements org.apache.thrift.TBase<getStateMaster_args, getStateMaster_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getStateMaster_args");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getStateMaster_args.class, metaDataMap);
    }

    public getStateMaster_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getStateMaster_args(getStateMaster_args other) {
    }

    public getStateMaster_args deepCopy() {
      return new getStateMaster_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getStateMaster_args)
        return this.equals((getStateMaster_args)that);
      return false;
    }

    public boolean equals(getStateMaster_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getStateMaster_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getStateMaster_args typedOther = (getStateMaster_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getStateMaster_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getStateMaster_result implements org.apache.thrift.TBase<getStateMaster_result, getStateMaster_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getStateMaster_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);

    private Map<Long,StateInfo> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, StateInfo.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getStateMaster_result.class, metaDataMap);
    }

    public getStateMaster_result() {
    }

    public getStateMaster_result(
      Map<Long,StateInfo> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getStateMaster_result(getStateMaster_result other) {
      if (other.isSetSuccess()) {
        Map<Long,StateInfo> __this__success = new HashMap<Long,StateInfo>();
        for (Map.Entry<Long, StateInfo> other_element : other.success.entrySet()) {

          Long other_element_key = other_element.getKey();
          StateInfo other_element_value = other_element.getValue();

          Long __this__success_copy_key = other_element_key;

          StateInfo __this__success_copy_value = new StateInfo(other_element_value);

          __this__success.put(__this__success_copy_key, __this__success_copy_value);
        }
        this.success = __this__success;
      }
    }

    public getStateMaster_result deepCopy() {
      return new getStateMaster_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public void putToSuccess(long key, StateInfo val) {
      if (this.success == null) {
        this.success = new HashMap<Long,StateInfo>();
      }
      this.success.put(key, val);
    }

    public Map<Long,StateInfo> getSuccess() {
      return this.success;
    }

    public void setSuccess(Map<Long,StateInfo> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Map<Long,StateInfo>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getStateMaster_result)
        return this.equals((getStateMaster_result)that);
      return false;
    }

    public boolean equals(getStateMaster_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getStateMaster_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getStateMaster_result typedOther = (getStateMaster_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map179 = iprot.readMapBegin();
                this.success = new HashMap<Long,StateInfo>(2*_map179.size);
                for (int _i180 = 0; _i180 < _map179.size; ++_i180)
                {
                  long _key181; // required
                  StateInfo _val182; // required
                  _key181 = iprot.readI64();
                  _val182 = new StateInfo();
                  _val182.read(iprot);
                  this.success.put(_key181, _val182);
                }
                iprot.readMapEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (Map.Entry<Long, StateInfo> _iter183 : this.success.entrySet())
          {
            oprot.writeI64(_iter183.getKey());
            _iter183.getValue().write(oprot);
          }
          oprot.writeMapEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getStateMaster_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateSnapdealStockAtEOD_args implements org.apache.thrift.TBase<updateSnapdealStockAtEOD_args, updateSnapdealStockAtEOD_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSnapdealStockAtEOD_args");

    private static final org.apache.thrift.protocol.TField ALLSNAPDEALSTOCK_FIELD_DESC = new org.apache.thrift.protocol.TField("allsnapdealstock", org.apache.thrift.protocol.TType.LIST, (short)-1);

    private List<SnapdealStockAtEOD> allsnapdealstock; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ALLSNAPDEALSTOCK((short)-1, "allsnapdealstock");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case -1: // ALLSNAPDEALSTOCK
            return ALLSNAPDEALSTOCK;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ALLSNAPDEALSTOCK, new org.apache.thrift.meta_data.FieldMetaData("allsnapdealstock", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SnapdealStockAtEOD.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSnapdealStockAtEOD_args.class, metaDataMap);
    }

    public updateSnapdealStockAtEOD_args() {
    }

    public updateSnapdealStockAtEOD_args(
      List<SnapdealStockAtEOD> allsnapdealstock)
    {
      this();
      this.allsnapdealstock = allsnapdealstock;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateSnapdealStockAtEOD_args(updateSnapdealStockAtEOD_args other) {
      if (other.isSetAllsnapdealstock()) {
        List<SnapdealStockAtEOD> __this__allsnapdealstock = new ArrayList<SnapdealStockAtEOD>();
        for (SnapdealStockAtEOD other_element : other.allsnapdealstock) {
          __this__allsnapdealstock.add(new SnapdealStockAtEOD(other_element));
        }
        this.allsnapdealstock = __this__allsnapdealstock;
      }
    }

    public updateSnapdealStockAtEOD_args deepCopy() {
      return new updateSnapdealStockAtEOD_args(this);
    }

    @Override
    public void clear() {
      this.allsnapdealstock = null;
    }

    public int getAllsnapdealstockSize() {
      return (this.allsnapdealstock == null) ? 0 : this.allsnapdealstock.size();
    }

    public java.util.Iterator<SnapdealStockAtEOD> getAllsnapdealstockIterator() {
      return (this.allsnapdealstock == null) ? null : this.allsnapdealstock.iterator();
    }

    public void addToAllsnapdealstock(SnapdealStockAtEOD elem) {
      if (this.allsnapdealstock == null) {
        this.allsnapdealstock = new ArrayList<SnapdealStockAtEOD>();
      }
      this.allsnapdealstock.add(elem);
    }

    public List<SnapdealStockAtEOD> getAllsnapdealstock() {
      return this.allsnapdealstock;
    }

    public void setAllsnapdealstock(List<SnapdealStockAtEOD> allsnapdealstock) {
      this.allsnapdealstock = allsnapdealstock;
    }

    public void unsetAllsnapdealstock() {
      this.allsnapdealstock = null;
    }

    /** Returns true if field allsnapdealstock is set (has been assigned a value) and false otherwise */
    public boolean isSetAllsnapdealstock() {
      return this.allsnapdealstock != null;
    }

    public void setAllsnapdealstockIsSet(boolean value) {
      if (!value) {
        this.allsnapdealstock = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ALLSNAPDEALSTOCK:
        if (value == null) {
          unsetAllsnapdealstock();
        } else {
          setAllsnapdealstock((List<SnapdealStockAtEOD>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ALLSNAPDEALSTOCK:
        return getAllsnapdealstock();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ALLSNAPDEALSTOCK:
        return isSetAllsnapdealstock();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateSnapdealStockAtEOD_args)
        return this.equals((updateSnapdealStockAtEOD_args)that);
      return false;
    }

    public boolean equals(updateSnapdealStockAtEOD_args that) {
      if (that == null)
        return false;

      boolean this_present_allsnapdealstock = true && this.isSetAllsnapdealstock();
      boolean that_present_allsnapdealstock = true && that.isSetAllsnapdealstock();
      if (this_present_allsnapdealstock || that_present_allsnapdealstock) {
        if (!(this_present_allsnapdealstock && that_present_allsnapdealstock))
          return false;
        if (!this.allsnapdealstock.equals(that.allsnapdealstock))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateSnapdealStockAtEOD_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateSnapdealStockAtEOD_args typedOther = (updateSnapdealStockAtEOD_args)other;

      lastComparison = Boolean.valueOf(isSetAllsnapdealstock()).compareTo(typedOther.isSetAllsnapdealstock());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAllsnapdealstock()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.allsnapdealstock, typedOther.allsnapdealstock);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case -1: // ALLSNAPDEALSTOCK
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list184 = iprot.readListBegin();
                this.allsnapdealstock = new ArrayList<SnapdealStockAtEOD>(_list184.size);
                for (int _i185 = 0; _i185 < _list184.size; ++_i185)
                {
                  SnapdealStockAtEOD _elem186; // required
                  _elem186 = new SnapdealStockAtEOD();
                  _elem186.read(iprot);
                  this.allsnapdealstock.add(_elem186);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.allsnapdealstock != null) {
        oprot.writeFieldBegin(ALLSNAPDEALSTOCK_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.allsnapdealstock.size()));
          for (SnapdealStockAtEOD _iter187 : this.allsnapdealstock)
          {
            _iter187.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateSnapdealStockAtEOD_args(");
      boolean first = true;

      sb.append("allsnapdealstock:");
      if (this.allsnapdealstock == null) {
        sb.append("null");
      } else {
        sb.append(this.allsnapdealstock);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateSnapdealStockAtEOD_result implements org.apache.thrift.TBase<updateSnapdealStockAtEOD_result, updateSnapdealStockAtEOD_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateSnapdealStockAtEOD_result");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateSnapdealStockAtEOD_result.class, metaDataMap);
    }

    public updateSnapdealStockAtEOD_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateSnapdealStockAtEOD_result(updateSnapdealStockAtEOD_result other) {
    }

    public updateSnapdealStockAtEOD_result deepCopy() {
      return new updateSnapdealStockAtEOD_result(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateSnapdealStockAtEOD_result)
        return this.equals((updateSnapdealStockAtEOD_result)that);
      return false;
    }

    public boolean equals(updateSnapdealStockAtEOD_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateSnapdealStockAtEOD_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateSnapdealStockAtEOD_result typedOther = (updateSnapdealStockAtEOD_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateSnapdealStockAtEOD_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateFlipkartStockAtEOD_args implements org.apache.thrift.TBase<updateFlipkartStockAtEOD_args, updateFlipkartStockAtEOD_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateFlipkartStockAtEOD_args");

    private static final org.apache.thrift.protocol.TField ALLFLIPKARTSTOCK_FIELD_DESC = new org.apache.thrift.protocol.TField("allflipkartstock", org.apache.thrift.protocol.TType.LIST, (short)-1);

    private List<FlipkartStockAtEOD> allflipkartstock; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ALLFLIPKARTSTOCK((short)-1, "allflipkartstock");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case -1: // ALLFLIPKARTSTOCK
            return ALLFLIPKARTSTOCK;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ALLFLIPKARTSTOCK, new org.apache.thrift.meta_data.FieldMetaData("allflipkartstock", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FlipkartStockAtEOD.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateFlipkartStockAtEOD_args.class, metaDataMap);
    }

    public updateFlipkartStockAtEOD_args() {
    }

    public updateFlipkartStockAtEOD_args(
      List<FlipkartStockAtEOD> allflipkartstock)
    {
      this();
      this.allflipkartstock = allflipkartstock;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateFlipkartStockAtEOD_args(updateFlipkartStockAtEOD_args other) {
      if (other.isSetAllflipkartstock()) {
        List<FlipkartStockAtEOD> __this__allflipkartstock = new ArrayList<FlipkartStockAtEOD>();
        for (FlipkartStockAtEOD other_element : other.allflipkartstock) {
          __this__allflipkartstock.add(new FlipkartStockAtEOD(other_element));
        }
        this.allflipkartstock = __this__allflipkartstock;
      }
    }

    public updateFlipkartStockAtEOD_args deepCopy() {
      return new updateFlipkartStockAtEOD_args(this);
    }

    @Override
    public void clear() {
      this.allflipkartstock = null;
    }

    public int getAllflipkartstockSize() {
      return (this.allflipkartstock == null) ? 0 : this.allflipkartstock.size();
    }

    public java.util.Iterator<FlipkartStockAtEOD> getAllflipkartstockIterator() {
      return (this.allflipkartstock == null) ? null : this.allflipkartstock.iterator();
    }

    public void addToAllflipkartstock(FlipkartStockAtEOD elem) {
      if (this.allflipkartstock == null) {
        this.allflipkartstock = new ArrayList<FlipkartStockAtEOD>();
      }
      this.allflipkartstock.add(elem);
    }

    public List<FlipkartStockAtEOD> getAllflipkartstock() {
      return this.allflipkartstock;
    }

    public void setAllflipkartstock(List<FlipkartStockAtEOD> allflipkartstock) {
      this.allflipkartstock = allflipkartstock;
    }

    public void unsetAllflipkartstock() {
      this.allflipkartstock = null;
    }

    /** Returns true if field allflipkartstock is set (has been assigned a value) and false otherwise */
    public boolean isSetAllflipkartstock() {
      return this.allflipkartstock != null;
    }

    public void setAllflipkartstockIsSet(boolean value) {
      if (!value) {
        this.allflipkartstock = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ALLFLIPKARTSTOCK:
        if (value == null) {
          unsetAllflipkartstock();
        } else {
          setAllflipkartstock((List<FlipkartStockAtEOD>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ALLFLIPKARTSTOCK:
        return getAllflipkartstock();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ALLFLIPKARTSTOCK:
        return isSetAllflipkartstock();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateFlipkartStockAtEOD_args)
        return this.equals((updateFlipkartStockAtEOD_args)that);
      return false;
    }

    public boolean equals(updateFlipkartStockAtEOD_args that) {
      if (that == null)
        return false;

      boolean this_present_allflipkartstock = true && this.isSetAllflipkartstock();
      boolean that_present_allflipkartstock = true && that.isSetAllflipkartstock();
      if (this_present_allflipkartstock || that_present_allflipkartstock) {
        if (!(this_present_allflipkartstock && that_present_allflipkartstock))
          return false;
        if (!this.allflipkartstock.equals(that.allflipkartstock))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateFlipkartStockAtEOD_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateFlipkartStockAtEOD_args typedOther = (updateFlipkartStockAtEOD_args)other;

      lastComparison = Boolean.valueOf(isSetAllflipkartstock()).compareTo(typedOther.isSetAllflipkartstock());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetAllflipkartstock()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.allflipkartstock, typedOther.allflipkartstock);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case -1: // ALLFLIPKARTSTOCK
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list188 = iprot.readListBegin();
                this.allflipkartstock = new ArrayList<FlipkartStockAtEOD>(_list188.size);
                for (int _i189 = 0; _i189 < _list188.size; ++_i189)
                {
                  FlipkartStockAtEOD _elem190; // required
                  _elem190 = new FlipkartStockAtEOD();
                  _elem190.read(iprot);
                  this.allflipkartstock.add(_elem190);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.allflipkartstock != null) {
        oprot.writeFieldBegin(ALLFLIPKARTSTOCK_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.allflipkartstock.size()));
          for (FlipkartStockAtEOD _iter191 : this.allflipkartstock)
          {
            _iter191.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateFlipkartStockAtEOD_args(");
      boolean first = true;

      sb.append("allflipkartstock:");
      if (this.allflipkartstock == null) {
        sb.append("null");
      } else {
        sb.append(this.allflipkartstock);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateFlipkartStockAtEOD_result implements org.apache.thrift.TBase<updateFlipkartStockAtEOD_result, updateFlipkartStockAtEOD_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateFlipkartStockAtEOD_result");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateFlipkartStockAtEOD_result.class, metaDataMap);
    }

    public updateFlipkartStockAtEOD_result() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateFlipkartStockAtEOD_result(updateFlipkartStockAtEOD_result other) {
    }

    public updateFlipkartStockAtEOD_result deepCopy() {
      return new updateFlipkartStockAtEOD_result(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateFlipkartStockAtEOD_result)
        return this.equals((updateFlipkartStockAtEOD_result)that);
      return false;
    }

    public boolean equals(updateFlipkartStockAtEOD_result that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateFlipkartStockAtEOD_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateFlipkartStockAtEOD_result typedOther = (updateFlipkartStockAtEOD_result)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateFlipkartStockAtEOD_result(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getWanNlcForSource_args implements org.apache.thrift.TBase<getWanNlcForSource_args, getWanNlcForSource_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getWanNlcForSource_args");

    private static final org.apache.thrift.protocol.TField ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("item_id", org.apache.thrift.protocol.TType.I64, (short)1);
    private static final org.apache.thrift.protocol.TField SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("source", org.apache.thrift.protocol.TType.I64, (short)2);

    private long item_id; // required
    private long source; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_ID((short)1, "item_id"),
      SOURCE((short)2, "source");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_ID
            return ITEM_ID;
          case 2: // SOURCE
            return SOURCE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __ITEM_ID_ISSET_ID = 0;
    private static final int __SOURCE_ISSET_ID = 1;
    private BitSet __isset_bit_vector = new BitSet(2);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("item_id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      tmpMap.put(_Fields.SOURCE, new org.apache.thrift.meta_data.FieldMetaData("source", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getWanNlcForSource_args.class, metaDataMap);
    }

    public getWanNlcForSource_args() {
    }

    public getWanNlcForSource_args(
      long item_id,
      long source)
    {
      this();
      this.item_id = item_id;
      setItem_idIsSet(true);
      this.source = source;
      setSourceIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getWanNlcForSource_args(getWanNlcForSource_args other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.item_id = other.item_id;
      this.source = other.source;
    }

    public getWanNlcForSource_args deepCopy() {
      return new getWanNlcForSource_args(this);
    }

    @Override
    public void clear() {
      setItem_idIsSet(false);
      this.item_id = 0;
      setSourceIsSet(false);
      this.source = 0;
    }

    public long getItem_id() {
      return this.item_id;
    }

    public void setItem_id(long item_id) {
      this.item_id = item_id;
      setItem_idIsSet(true);
    }

    public void unsetItem_id() {
      __isset_bit_vector.clear(__ITEM_ID_ISSET_ID);
    }

    /** Returns true if field item_id is set (has been assigned a value) and false otherwise */
    public boolean isSetItem_id() {
      return __isset_bit_vector.get(__ITEM_ID_ISSET_ID);
    }

    public void setItem_idIsSet(boolean value) {
      __isset_bit_vector.set(__ITEM_ID_ISSET_ID, value);
    }

    public long getSource() {
      return this.source;
    }

    public void setSource(long source) {
      this.source = source;
      setSourceIsSet(true);
    }

    public void unsetSource() {
      __isset_bit_vector.clear(__SOURCE_ISSET_ID);
    }

    /** Returns true if field source is set (has been assigned a value) and false otherwise */
    public boolean isSetSource() {
      return __isset_bit_vector.get(__SOURCE_ISSET_ID);
    }

    public void setSourceIsSet(boolean value) {
      __isset_bit_vector.set(__SOURCE_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_ID:
        if (value == null) {
          unsetItem_id();
        } else {
          setItem_id((Long)value);
        }
        break;

      case SOURCE:
        if (value == null) {
          unsetSource();
        } else {
          setSource((Long)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_ID:
        return Long.valueOf(getItem_id());

      case SOURCE:
        return Long.valueOf(getSource());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_ID:
        return isSetItem_id();
      case SOURCE:
        return isSetSource();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getWanNlcForSource_args)
        return this.equals((getWanNlcForSource_args)that);
      return false;
    }

    public boolean equals(getWanNlcForSource_args that) {
      if (that == null)
        return false;

      boolean this_present_item_id = true;
      boolean that_present_item_id = true;
      if (this_present_item_id || that_present_item_id) {
        if (!(this_present_item_id && that_present_item_id))
          return false;
        if (this.item_id != that.item_id)
          return false;
      }

      boolean this_present_source = true;
      boolean that_present_source = true;
      if (this_present_source || that_present_source) {
        if (!(this_present_source && that_present_source))
          return false;
        if (this.source != that.source)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getWanNlcForSource_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getWanNlcForSource_args typedOther = (getWanNlcForSource_args)other;

      lastComparison = Boolean.valueOf(isSetItem_id()).compareTo(typedOther.isSetItem_id());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItem_id()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.item_id, typedOther.item_id);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetSource()).compareTo(typedOther.isSetSource());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSource()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.source, typedOther.source);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_ID
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.item_id = iprot.readI64();
              setItem_idIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // SOURCE
            if (field.type == org.apache.thrift.protocol.TType.I64) {
              this.source = iprot.readI64();
              setSourceIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
      oprot.writeI64(this.item_id);
      oprot.writeFieldEnd();
      oprot.writeFieldBegin(SOURCE_FIELD_DESC);
      oprot.writeI64(this.source);
      oprot.writeFieldEnd();
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getWanNlcForSource_args(");
      boolean first = true;

      sb.append("item_id:");
      sb.append(this.item_id);
      first = false;
      if (!first) sb.append(", ");
      sb.append("source:");
      sb.append(this.source);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
        __isset_bit_vector = new BitSet(1);
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getWanNlcForSource_result implements org.apache.thrift.TBase<getWanNlcForSource_result, getWanNlcForSource_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getWanNlcForSource_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.DOUBLE, (short)0);

    private double success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getWanNlcForSource_result.class, metaDataMap);
    }

    public getWanNlcForSource_result() {
    }

    public getWanNlcForSource_result(
      double success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getWanNlcForSource_result(getWanNlcForSource_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public getWanNlcForSource_result deepCopy() {
      return new getWanNlcForSource_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = 0.0;
    }

    public double getSuccess() {
      return this.success;
    }

    public void setSuccess(double success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Double)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Double.valueOf(getSuccess());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getWanNlcForSource_result)
        return this.equals((getWanNlcForSource_result)that);
      return false;
    }

    public boolean equals(getWanNlcForSource_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getWanNlcForSource_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getWanNlcForSource_result typedOther = (getWanNlcForSource_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
              this.success = iprot.readDouble();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeDouble(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getWanNlcForSource_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllAvailableAmazonFbaItemInventory_args implements org.apache.thrift.TBase<getAllAvailableAmazonFbaItemInventory_args, getAllAvailableAmazonFbaItemInventory_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllAvailableAmazonFbaItemInventory_args");



    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
;

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllAvailableAmazonFbaItemInventory_args.class, metaDataMap);
    }

    public getAllAvailableAmazonFbaItemInventory_args() {
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllAvailableAmazonFbaItemInventory_args(getAllAvailableAmazonFbaItemInventory_args other) {
    }

    public getAllAvailableAmazonFbaItemInventory_args deepCopy() {
      return new getAllAvailableAmazonFbaItemInventory_args(this);
    }

    @Override
    public void clear() {
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllAvailableAmazonFbaItemInventory_args)
        return this.equals((getAllAvailableAmazonFbaItemInventory_args)that);
      return false;
    }

    public boolean equals(getAllAvailableAmazonFbaItemInventory_args that) {
      if (that == null)
        return false;

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllAvailableAmazonFbaItemInventory_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllAvailableAmazonFbaItemInventory_args typedOther = (getAllAvailableAmazonFbaItemInventory_args)other;

      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllAvailableAmazonFbaItemInventory_args(");
      boolean first = true;

      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getAllAvailableAmazonFbaItemInventory_result implements org.apache.thrift.TBase<getAllAvailableAmazonFbaItemInventory_result, getAllAvailableAmazonFbaItemInventory_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getAllAvailableAmazonFbaItemInventory_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<AmazonFbaInventorySnapshot> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AmazonFbaInventorySnapshot.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAllAvailableAmazonFbaItemInventory_result.class, metaDataMap);
    }

    public getAllAvailableAmazonFbaItemInventory_result() {
    }

    public getAllAvailableAmazonFbaItemInventory_result(
      List<AmazonFbaInventorySnapshot> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getAllAvailableAmazonFbaItemInventory_result(getAllAvailableAmazonFbaItemInventory_result other) {
      if (other.isSetSuccess()) {
        List<AmazonFbaInventorySnapshot> __this__success = new ArrayList<AmazonFbaInventorySnapshot>();
        for (AmazonFbaInventorySnapshot other_element : other.success) {
          __this__success.add(new AmazonFbaInventorySnapshot(other_element));
        }
        this.success = __this__success;
      }
    }

    public getAllAvailableAmazonFbaItemInventory_result deepCopy() {
      return new getAllAvailableAmazonFbaItemInventory_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<AmazonFbaInventorySnapshot> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(AmazonFbaInventorySnapshot elem) {
      if (this.success == null) {
        this.success = new ArrayList<AmazonFbaInventorySnapshot>();
      }
      this.success.add(elem);
    }

    public List<AmazonFbaInventorySnapshot> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<AmazonFbaInventorySnapshot> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<AmazonFbaInventorySnapshot>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getAllAvailableAmazonFbaItemInventory_result)
        return this.equals((getAllAvailableAmazonFbaItemInventory_result)that);
      return false;
    }

    public boolean equals(getAllAvailableAmazonFbaItemInventory_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getAllAvailableAmazonFbaItemInventory_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getAllAvailableAmazonFbaItemInventory_result typedOther = (getAllAvailableAmazonFbaItemInventory_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list192 = iprot.readListBegin();
                this.success = new ArrayList<AmazonFbaInventorySnapshot>(_list192.size);
                for (int _i193 = 0; _i193 < _list192.size; ++_i193)
                {
                  AmazonFbaInventorySnapshot _elem194; // required
                  _elem194 = new AmazonFbaInventorySnapshot();
                  _elem194.read(iprot);
                  this.success.add(_elem194);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (AmazonFbaInventorySnapshot _iter195 : this.success)
          {
            _iter195.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getAllAvailableAmazonFbaItemInventory_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateItemAvailabilityForItemIds_args implements org.apache.thrift.TBase<updateItemAvailabilityForItemIds_args, updateItemAvailabilityForItemIds_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateItemAvailabilityForItemIds_args");

    private static final org.apache.thrift.protocol.TField ITEM_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("itemIds", org.apache.thrift.protocol.TType.LIST, (short)1);

    private List<Long> itemIds; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_IDS((short)1, "itemIds");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_IDS
            return ITEM_IDS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_IDS, new org.apache.thrift.meta_data.FieldMetaData("itemIds", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateItemAvailabilityForItemIds_args.class, metaDataMap);
    }

    public updateItemAvailabilityForItemIds_args() {
    }

    public updateItemAvailabilityForItemIds_args(
      List<Long> itemIds)
    {
      this();
      this.itemIds = itemIds;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateItemAvailabilityForItemIds_args(updateItemAvailabilityForItemIds_args other) {
      if (other.isSetItemIds()) {
        List<Long> __this__itemIds = new ArrayList<Long>();
        for (Long other_element : other.itemIds) {
          __this__itemIds.add(other_element);
        }
        this.itemIds = __this__itemIds;
      }
    }

    public updateItemAvailabilityForItemIds_args deepCopy() {
      return new updateItemAvailabilityForItemIds_args(this);
    }

    @Override
    public void clear() {
      this.itemIds = null;
    }

    public int getItemIdsSize() {
      return (this.itemIds == null) ? 0 : this.itemIds.size();
    }

    public java.util.Iterator<Long> getItemIdsIterator() {
      return (this.itemIds == null) ? null : this.itemIds.iterator();
    }

    public void addToItemIds(long elem) {
      if (this.itemIds == null) {
        this.itemIds = new ArrayList<Long>();
      }
      this.itemIds.add(elem);
    }

    public List<Long> getItemIds() {
      return this.itemIds;
    }

    public void setItemIds(List<Long> itemIds) {
      this.itemIds = itemIds;
    }

    public void unsetItemIds() {
      this.itemIds = null;
    }

    /** Returns true if field itemIds is set (has been assigned a value) and false otherwise */
    public boolean isSetItemIds() {
      return this.itemIds != null;
    }

    public void setItemIdsIsSet(boolean value) {
      if (!value) {
        this.itemIds = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_IDS:
        if (value == null) {
          unsetItemIds();
        } else {
          setItemIds((List<Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_IDS:
        return getItemIds();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_IDS:
        return isSetItemIds();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateItemAvailabilityForItemIds_args)
        return this.equals((updateItemAvailabilityForItemIds_args)that);
      return false;
    }

    public boolean equals(updateItemAvailabilityForItemIds_args that) {
      if (that == null)
        return false;

      boolean this_present_itemIds = true && this.isSetItemIds();
      boolean that_present_itemIds = true && that.isSetItemIds();
      if (this_present_itemIds || that_present_itemIds) {
        if (!(this_present_itemIds && that_present_itemIds))
          return false;
        if (!this.itemIds.equals(that.itemIds))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateItemAvailabilityForItemIds_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateItemAvailabilityForItemIds_args typedOther = (updateItemAvailabilityForItemIds_args)other;

      lastComparison = Boolean.valueOf(isSetItemIds()).compareTo(typedOther.isSetItemIds());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemIds()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemIds, typedOther.itemIds);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_IDS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list196 = iprot.readListBegin();
                this.itemIds = new ArrayList<Long>(_list196.size);
                for (int _i197 = 0; _i197 < _list196.size; ++_i197)
                {
                  long _elem198; // required
                  _elem198 = iprot.readI64();
                  this.itemIds.add(_elem198);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.itemIds != null) {
        oprot.writeFieldBegin(ITEM_IDS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.itemIds.size()));
          for (long _iter199 : this.itemIds)
          {
            oprot.writeI64(_iter199);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateItemAvailabilityForItemIds_args(");
      boolean first = true;

      sb.append("itemIds:");
      if (this.itemIds == null) {
        sb.append("null");
      } else {
        sb.append(this.itemIds);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class updateItemAvailabilityForItemIds_result implements org.apache.thrift.TBase<updateItemAvailabilityForItemIds_result, updateItemAvailabilityForItemIds_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updateItemAvailabilityForItemIds_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.BOOL, (short)0);

    private boolean success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments
    private static final int __SUCCESS_ISSET_ID = 0;
    private BitSet __isset_bit_vector = new BitSet(1);

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updateItemAvailabilityForItemIds_result.class, metaDataMap);
    }

    public updateItemAvailabilityForItemIds_result() {
    }

    public updateItemAvailabilityForItemIds_result(
      boolean success)
    {
      this();
      this.success = success;
      setSuccessIsSet(true);
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public updateItemAvailabilityForItemIds_result(updateItemAvailabilityForItemIds_result other) {
      __isset_bit_vector.clear();
      __isset_bit_vector.or(other.__isset_bit_vector);
      this.success = other.success;
    }

    public updateItemAvailabilityForItemIds_result deepCopy() {
      return new updateItemAvailabilityForItemIds_result(this);
    }

    @Override
    public void clear() {
      setSuccessIsSet(false);
      this.success = false;
    }

    public boolean isSuccess() {
      return this.success;
    }

    public void setSuccess(boolean success) {
      this.success = success;
      setSuccessIsSet(true);
    }

    public void unsetSuccess() {
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
    }

    public void setSuccessIsSet(boolean value) {
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Boolean)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return Boolean.valueOf(isSuccess());

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof updateItemAvailabilityForItemIds_result)
        return this.equals((updateItemAvailabilityForItemIds_result)that);
      return false;
    }

    public boolean equals(updateItemAvailabilityForItemIds_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true;
      boolean that_present_success = true;
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (this.success != that.success)
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(updateItemAvailabilityForItemIds_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      updateItemAvailabilityForItemIds_result typedOther = (updateItemAvailabilityForItemIds_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
              this.success = iprot.readBool();
              setSuccessIsSet(true);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeBool(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("updateItemAvailabilityForItemIds_result(");
      boolean first = true;

      sb.append("success:");
      sb.append(this.success);
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addVendorItemPricingInBulk_args implements org.apache.thrift.TBase<addVendorItemPricingInBulk_args, addVendorItemPricingInBulk_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVendorItemPricingInBulk_args");

    private static final org.apache.thrift.protocol.TField VENDOR_ITEM_PRICING_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorItemPricingList", org.apache.thrift.protocol.TType.LIST, (short)1);

    private List<VendorItemPricing> vendorItemPricingList; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      VENDOR_ITEM_PRICING_LIST((short)1, "vendorItemPricingList");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // VENDOR_ITEM_PRICING_LIST
            return VENDOR_ITEM_PRICING_LIST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.VENDOR_ITEM_PRICING_LIST, new org.apache.thrift.meta_data.FieldMetaData("vendorItemPricingList", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, VendorItemPricing.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVendorItemPricingInBulk_args.class, metaDataMap);
    }

    public addVendorItemPricingInBulk_args() {
    }

    public addVendorItemPricingInBulk_args(
      List<VendorItemPricing> vendorItemPricingList)
    {
      this();
      this.vendorItemPricingList = vendorItemPricingList;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addVendorItemPricingInBulk_args(addVendorItemPricingInBulk_args other) {
      if (other.isSetVendorItemPricingList()) {
        List<VendorItemPricing> __this__vendorItemPricingList = new ArrayList<VendorItemPricing>();
        for (VendorItemPricing other_element : other.vendorItemPricingList) {
          __this__vendorItemPricingList.add(new VendorItemPricing(other_element));
        }
        this.vendorItemPricingList = __this__vendorItemPricingList;
      }
    }

    public addVendorItemPricingInBulk_args deepCopy() {
      return new addVendorItemPricingInBulk_args(this);
    }

    @Override
    public void clear() {
      this.vendorItemPricingList = null;
    }

    public int getVendorItemPricingListSize() {
      return (this.vendorItemPricingList == null) ? 0 : this.vendorItemPricingList.size();
    }

    public java.util.Iterator<VendorItemPricing> getVendorItemPricingListIterator() {
      return (this.vendorItemPricingList == null) ? null : this.vendorItemPricingList.iterator();
    }

    public void addToVendorItemPricingList(VendorItemPricing elem) {
      if (this.vendorItemPricingList == null) {
        this.vendorItemPricingList = new ArrayList<VendorItemPricing>();
      }
      this.vendorItemPricingList.add(elem);
    }

    public List<VendorItemPricing> getVendorItemPricingList() {
      return this.vendorItemPricingList;
    }

    public void setVendorItemPricingList(List<VendorItemPricing> vendorItemPricingList) {
      this.vendorItemPricingList = vendorItemPricingList;
    }

    public void unsetVendorItemPricingList() {
      this.vendorItemPricingList = null;
    }

    /** Returns true if field vendorItemPricingList is set (has been assigned a value) and false otherwise */
    public boolean isSetVendorItemPricingList() {
      return this.vendorItemPricingList != null;
    }

    public void setVendorItemPricingListIsSet(boolean value) {
      if (!value) {
        this.vendorItemPricingList = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case VENDOR_ITEM_PRICING_LIST:
        if (value == null) {
          unsetVendorItemPricingList();
        } else {
          setVendorItemPricingList((List<VendorItemPricing>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case VENDOR_ITEM_PRICING_LIST:
        return getVendorItemPricingList();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case VENDOR_ITEM_PRICING_LIST:
        return isSetVendorItemPricingList();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addVendorItemPricingInBulk_args)
        return this.equals((addVendorItemPricingInBulk_args)that);
      return false;
    }

    public boolean equals(addVendorItemPricingInBulk_args that) {
      if (that == null)
        return false;

      boolean this_present_vendorItemPricingList = true && this.isSetVendorItemPricingList();
      boolean that_present_vendorItemPricingList = true && that.isSetVendorItemPricingList();
      if (this_present_vendorItemPricingList || that_present_vendorItemPricingList) {
        if (!(this_present_vendorItemPricingList && that_present_vendorItemPricingList))
          return false;
        if (!this.vendorItemPricingList.equals(that.vendorItemPricingList))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addVendorItemPricingInBulk_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addVendorItemPricingInBulk_args typedOther = (addVendorItemPricingInBulk_args)other;

      lastComparison = Boolean.valueOf(isSetVendorItemPricingList()).compareTo(typedOther.isSetVendorItemPricingList());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetVendorItemPricingList()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorItemPricingList, typedOther.vendorItemPricingList);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // VENDOR_ITEM_PRICING_LIST
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list200 = iprot.readListBegin();
                this.vendorItemPricingList = new ArrayList<VendorItemPricing>(_list200.size);
                for (int _i201 = 0; _i201 < _list200.size; ++_i201)
                {
                  VendorItemPricing _elem202; // required
                  _elem202 = new VendorItemPricing();
                  _elem202.read(iprot);
                  this.vendorItemPricingList.add(_elem202);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.vendorItemPricingList != null) {
        oprot.writeFieldBegin(VENDOR_ITEM_PRICING_LIST_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.vendorItemPricingList.size()));
          for (VendorItemPricing _iter203 : this.vendorItemPricingList)
          {
            _iter203.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addVendorItemPricingInBulk_args(");
      boolean first = true;

      sb.append("vendorItemPricingList:");
      if (this.vendorItemPricingList == null) {
        sb.append("null");
      } else {
        sb.append(this.vendorItemPricingList);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addVendorItemPricingInBulk_result implements org.apache.thrift.TBase<addVendorItemPricingInBulk_result, addVendorItemPricingInBulk_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addVendorItemPricingInBulk_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<Long> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addVendorItemPricingInBulk_result.class, metaDataMap);
    }

    public addVendorItemPricingInBulk_result() {
    }

    public addVendorItemPricingInBulk_result(
      List<Long> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addVendorItemPricingInBulk_result(addVendorItemPricingInBulk_result other) {
      if (other.isSetSuccess()) {
        List<Long> __this__success = new ArrayList<Long>();
        for (Long other_element : other.success) {
          __this__success.add(other_element);
        }
        this.success = __this__success;
      }
    }

    public addVendorItemPricingInBulk_result deepCopy() {
      return new addVendorItemPricingInBulk_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<Long> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(long elem) {
      if (this.success == null) {
        this.success = new ArrayList<Long>();
      }
      this.success.add(elem);
    }

    public List<Long> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<Long> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addVendorItemPricingInBulk_result)
        return this.equals((addVendorItemPricingInBulk_result)that);
      return false;
    }

    public boolean equals(addVendorItemPricingInBulk_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addVendorItemPricingInBulk_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addVendorItemPricingInBulk_result typedOther = (addVendorItemPricingInBulk_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list204 = iprot.readListBegin();
                this.success = new ArrayList<Long>(_list204.size);
                for (int _i205 = 0; _i205 < _list204.size; ++_i205)
                {
                  long _elem206; // required
                  _elem206 = iprot.readI64();
                  this.success.add(_elem206);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
          for (long _iter207 : this.success)
          {
            oprot.writeI64(_iter207);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addVendorItemPricingInBulk_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addInventoryInBulk_args implements org.apache.thrift.TBase<addInventoryInBulk_args, addInventoryInBulk_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addInventoryInBulk_args");

    private static final org.apache.thrift.protocol.TField BULK_INVENTORY_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("bulkInventoryList", org.apache.thrift.protocol.TType.LIST, (short)1);

    private List<BulkAddInventory> bulkInventoryList; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      BULK_INVENTORY_LIST((short)1, "bulkInventoryList");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // BULK_INVENTORY_LIST
            return BULK_INVENTORY_LIST;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.BULK_INVENTORY_LIST, new org.apache.thrift.meta_data.FieldMetaData("bulkInventoryList", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BulkAddInventory.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addInventoryInBulk_args.class, metaDataMap);
    }

    public addInventoryInBulk_args() {
    }

    public addInventoryInBulk_args(
      List<BulkAddInventory> bulkInventoryList)
    {
      this();
      this.bulkInventoryList = bulkInventoryList;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addInventoryInBulk_args(addInventoryInBulk_args other) {
      if (other.isSetBulkInventoryList()) {
        List<BulkAddInventory> __this__bulkInventoryList = new ArrayList<BulkAddInventory>();
        for (BulkAddInventory other_element : other.bulkInventoryList) {
          __this__bulkInventoryList.add(new BulkAddInventory(other_element));
        }
        this.bulkInventoryList = __this__bulkInventoryList;
      }
    }

    public addInventoryInBulk_args deepCopy() {
      return new addInventoryInBulk_args(this);
    }

    @Override
    public void clear() {
      this.bulkInventoryList = null;
    }

    public int getBulkInventoryListSize() {
      return (this.bulkInventoryList == null) ? 0 : this.bulkInventoryList.size();
    }

    public java.util.Iterator<BulkAddInventory> getBulkInventoryListIterator() {
      return (this.bulkInventoryList == null) ? null : this.bulkInventoryList.iterator();
    }

    public void addToBulkInventoryList(BulkAddInventory elem) {
      if (this.bulkInventoryList == null) {
        this.bulkInventoryList = new ArrayList<BulkAddInventory>();
      }
      this.bulkInventoryList.add(elem);
    }

    public List<BulkAddInventory> getBulkInventoryList() {
      return this.bulkInventoryList;
    }

    public void setBulkInventoryList(List<BulkAddInventory> bulkInventoryList) {
      this.bulkInventoryList = bulkInventoryList;
    }

    public void unsetBulkInventoryList() {
      this.bulkInventoryList = null;
    }

    /** Returns true if field bulkInventoryList is set (has been assigned a value) and false otherwise */
    public boolean isSetBulkInventoryList() {
      return this.bulkInventoryList != null;
    }

    public void setBulkInventoryListIsSet(boolean value) {
      if (!value) {
        this.bulkInventoryList = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case BULK_INVENTORY_LIST:
        if (value == null) {
          unsetBulkInventoryList();
        } else {
          setBulkInventoryList((List<BulkAddInventory>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case BULK_INVENTORY_LIST:
        return getBulkInventoryList();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case BULK_INVENTORY_LIST:
        return isSetBulkInventoryList();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addInventoryInBulk_args)
        return this.equals((addInventoryInBulk_args)that);
      return false;
    }

    public boolean equals(addInventoryInBulk_args that) {
      if (that == null)
        return false;

      boolean this_present_bulkInventoryList = true && this.isSetBulkInventoryList();
      boolean that_present_bulkInventoryList = true && that.isSetBulkInventoryList();
      if (this_present_bulkInventoryList || that_present_bulkInventoryList) {
        if (!(this_present_bulkInventoryList && that_present_bulkInventoryList))
          return false;
        if (!this.bulkInventoryList.equals(that.bulkInventoryList))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addInventoryInBulk_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addInventoryInBulk_args typedOther = (addInventoryInBulk_args)other;

      lastComparison = Boolean.valueOf(isSetBulkInventoryList()).compareTo(typedOther.isSetBulkInventoryList());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetBulkInventoryList()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.bulkInventoryList, typedOther.bulkInventoryList);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // BULK_INVENTORY_LIST
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list208 = iprot.readListBegin();
                this.bulkInventoryList = new ArrayList<BulkAddInventory>(_list208.size);
                for (int _i209 = 0; _i209 < _list208.size; ++_i209)
                {
                  BulkAddInventory _elem210; // required
                  _elem210 = new BulkAddInventory();
                  _elem210.read(iprot);
                  this.bulkInventoryList.add(_elem210);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.bulkInventoryList != null) {
        oprot.writeFieldBegin(BULK_INVENTORY_LIST_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.bulkInventoryList.size()));
          for (BulkAddInventory _iter211 : this.bulkInventoryList)
          {
            _iter211.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addInventoryInBulk_args(");
      boolean first = true;

      sb.append("bulkInventoryList:");
      if (this.bulkInventoryList == null) {
        sb.append("null");
      } else {
        sb.append(this.bulkInventoryList);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class addInventoryInBulk_result implements org.apache.thrift.TBase<addInventoryInBulk_result, addInventoryInBulk_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("addInventoryInBulk_result");

    private static final org.apache.thrift.protocol.TField CEX_FIELD_DESC = new org.apache.thrift.protocol.TField("cex", org.apache.thrift.protocol.TType.STRUCT, (short)1);

    private InventoryServiceException cex; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      CEX((short)1, "cex");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // CEX
            return CEX;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.CEX, new org.apache.thrift.meta_data.FieldMetaData("cex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(addInventoryInBulk_result.class, metaDataMap);
    }

    public addInventoryInBulk_result() {
    }

    public addInventoryInBulk_result(
      InventoryServiceException cex)
    {
      this();
      this.cex = cex;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public addInventoryInBulk_result(addInventoryInBulk_result other) {
      if (other.isSetCex()) {
        this.cex = new InventoryServiceException(other.cex);
      }
    }

    public addInventoryInBulk_result deepCopy() {
      return new addInventoryInBulk_result(this);
    }

    @Override
    public void clear() {
      this.cex = null;
    }

    public InventoryServiceException getCex() {
      return this.cex;
    }

    public void setCex(InventoryServiceException cex) {
      this.cex = cex;
    }

    public void unsetCex() {
      this.cex = null;
    }

    /** Returns true if field cex is set (has been assigned a value) and false otherwise */
    public boolean isSetCex() {
      return this.cex != null;
    }

    public void setCexIsSet(boolean value) {
      if (!value) {
        this.cex = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case CEX:
        if (value == null) {
          unsetCex();
        } else {
          setCex((InventoryServiceException)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case CEX:
        return getCex();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case CEX:
        return isSetCex();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof addInventoryInBulk_result)
        return this.equals((addInventoryInBulk_result)that);
      return false;
    }

    public boolean equals(addInventoryInBulk_result that) {
      if (that == null)
        return false;

      boolean this_present_cex = true && this.isSetCex();
      boolean that_present_cex = true && that.isSetCex();
      if (this_present_cex || that_present_cex) {
        if (!(this_present_cex && that_present_cex))
          return false;
        if (!this.cex.equals(that.cex))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(addInventoryInBulk_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      addInventoryInBulk_result typedOther = (addInventoryInBulk_result)other;

      lastComparison = Boolean.valueOf(isSetCex()).compareTo(typedOther.isSetCex());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetCex()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.cex, typedOther.cex);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // CEX
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
              this.cex = new InventoryServiceException();
              this.cex.read(iprot);
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetCex()) {
        oprot.writeFieldBegin(CEX_FIELD_DESC);
        this.cex.write(oprot);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("addInventoryInBulk_result(");
      boolean first = true;

      sb.append("cex:");
      if (this.cex == null) {
        sb.append("null");
      } else {
        sb.append(this.cex);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getFofoAvailability_args implements org.apache.thrift.TBase<getFofoAvailability_args, getFofoAvailability_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFofoAvailability_args");

    private static final org.apache.thrift.protocol.TField ITEM_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("itemIds", org.apache.thrift.protocol.TType.LIST, (short)1);

    private List<Long> itemIds; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_IDS((short)1, "itemIds");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_IDS
            return ITEM_IDS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_IDS, new org.apache.thrift.meta_data.FieldMetaData("itemIds", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFofoAvailability_args.class, metaDataMap);
    }

    public getFofoAvailability_args() {
    }

    public getFofoAvailability_args(
      List<Long> itemIds)
    {
      this();
      this.itemIds = itemIds;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getFofoAvailability_args(getFofoAvailability_args other) {
      if (other.isSetItemIds()) {
        List<Long> __this__itemIds = new ArrayList<Long>();
        for (Long other_element : other.itemIds) {
          __this__itemIds.add(other_element);
        }
        this.itemIds = __this__itemIds;
      }
    }

    public getFofoAvailability_args deepCopy() {
      return new getFofoAvailability_args(this);
    }

    @Override
    public void clear() {
      this.itemIds = null;
    }

    public int getItemIdsSize() {
      return (this.itemIds == null) ? 0 : this.itemIds.size();
    }

    public java.util.Iterator<Long> getItemIdsIterator() {
      return (this.itemIds == null) ? null : this.itemIds.iterator();
    }

    public void addToItemIds(long elem) {
      if (this.itemIds == null) {
        this.itemIds = new ArrayList<Long>();
      }
      this.itemIds.add(elem);
    }

    public List<Long> getItemIds() {
      return this.itemIds;
    }

    public void setItemIds(List<Long> itemIds) {
      this.itemIds = itemIds;
    }

    public void unsetItemIds() {
      this.itemIds = null;
    }

    /** Returns true if field itemIds is set (has been assigned a value) and false otherwise */
    public boolean isSetItemIds() {
      return this.itemIds != null;
    }

    public void setItemIdsIsSet(boolean value) {
      if (!value) {
        this.itemIds = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_IDS:
        if (value == null) {
          unsetItemIds();
        } else {
          setItemIds((List<Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_IDS:
        return getItemIds();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_IDS:
        return isSetItemIds();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getFofoAvailability_args)
        return this.equals((getFofoAvailability_args)that);
      return false;
    }

    public boolean equals(getFofoAvailability_args that) {
      if (that == null)
        return false;

      boolean this_present_itemIds = true && this.isSetItemIds();
      boolean that_present_itemIds = true && that.isSetItemIds();
      if (this_present_itemIds || that_present_itemIds) {
        if (!(this_present_itemIds && that_present_itemIds))
          return false;
        if (!this.itemIds.equals(that.itemIds))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getFofoAvailability_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getFofoAvailability_args typedOther = (getFofoAvailability_args)other;

      lastComparison = Boolean.valueOf(isSetItemIds()).compareTo(typedOther.isSetItemIds());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemIds()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemIds, typedOther.itemIds);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_IDS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list212 = iprot.readListBegin();
                this.itemIds = new ArrayList<Long>(_list212.size);
                for (int _i213 = 0; _i213 < _list212.size; ++_i213)
                {
                  long _elem214; // required
                  _elem214 = iprot.readI64();
                  this.itemIds.add(_elem214);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.itemIds != null) {
        oprot.writeFieldBegin(ITEM_IDS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.itemIds.size()));
          for (long _iter215 : this.itemIds)
          {
            oprot.writeI64(_iter215);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getFofoAvailability_args(");
      boolean first = true;

      sb.append("itemIds:");
      if (this.itemIds == null) {
        sb.append("null");
      } else {
        sb.append(this.itemIds);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getFofoAvailability_result implements org.apache.thrift.TBase<getFofoAvailability_result, getFofoAvailability_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFofoAvailability_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);

    private Map<Long,Long> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFofoAvailability_result.class, metaDataMap);
    }

    public getFofoAvailability_result() {
    }

    public getFofoAvailability_result(
      Map<Long,Long> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getFofoAvailability_result(getFofoAvailability_result other) {
      if (other.isSetSuccess()) {
        Map<Long,Long> __this__success = new HashMap<Long,Long>();
        for (Map.Entry<Long, Long> other_element : other.success.entrySet()) {

          Long other_element_key = other_element.getKey();
          Long other_element_value = other_element.getValue();

          Long __this__success_copy_key = other_element_key;

          Long __this__success_copy_value = other_element_value;

          __this__success.put(__this__success_copy_key, __this__success_copy_value);
        }
        this.success = __this__success;
      }
    }

    public getFofoAvailability_result deepCopy() {
      return new getFofoAvailability_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public void putToSuccess(long key, long val) {
      if (this.success == null) {
        this.success = new HashMap<Long,Long>();
      }
      this.success.put(key, val);
    }

    public Map<Long,Long> getSuccess() {
      return this.success;
    }

    public void setSuccess(Map<Long,Long> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Map<Long,Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getFofoAvailability_result)
        return this.equals((getFofoAvailability_result)that);
      return false;
    }

    public boolean equals(getFofoAvailability_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getFofoAvailability_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getFofoAvailability_result typedOther = (getFofoAvailability_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map216 = iprot.readMapBegin();
                this.success = new HashMap<Long,Long>(2*_map216.size);
                for (int _i217 = 0; _i217 < _map216.size; ++_i217)
                {
                  long _key218; // required
                  long _val219; // required
                  _key218 = iprot.readI64();
                  _val219 = iprot.readI64();
                  this.success.put(_key218, _val219);
                }
                iprot.readMapEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.I64, this.success.size()));
          for (Map.Entry<Long, Long> _iter220 : this.success.entrySet())
          {
            oprot.writeI64(_iter220.getKey());
            oprot.writeI64(_iter220.getValue());
          }
          oprot.writeMapEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getFofoAvailability_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getFofoFulFillmentWarehouseMap_args implements org.apache.thrift.TBase<getFofoFulFillmentWarehouseMap_args, getFofoFulFillmentWarehouseMap_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFofoFulFillmentWarehouseMap_args");

    private static final org.apache.thrift.protocol.TField ITEM_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("itemIds", org.apache.thrift.protocol.TType.LIST, (short)1);

    private List<Long> itemIds; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_IDS((short)1, "itemIds");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_IDS
            return ITEM_IDS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_IDS, new org.apache.thrift.meta_data.FieldMetaData("itemIds", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFofoFulFillmentWarehouseMap_args.class, metaDataMap);
    }

    public getFofoFulFillmentWarehouseMap_args() {
    }

    public getFofoFulFillmentWarehouseMap_args(
      List<Long> itemIds)
    {
      this();
      this.itemIds = itemIds;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getFofoFulFillmentWarehouseMap_args(getFofoFulFillmentWarehouseMap_args other) {
      if (other.isSetItemIds()) {
        List<Long> __this__itemIds = new ArrayList<Long>();
        for (Long other_element : other.itemIds) {
          __this__itemIds.add(other_element);
        }
        this.itemIds = __this__itemIds;
      }
    }

    public getFofoFulFillmentWarehouseMap_args deepCopy() {
      return new getFofoFulFillmentWarehouseMap_args(this);
    }

    @Override
    public void clear() {
      this.itemIds = null;
    }

    public int getItemIdsSize() {
      return (this.itemIds == null) ? 0 : this.itemIds.size();
    }

    public java.util.Iterator<Long> getItemIdsIterator() {
      return (this.itemIds == null) ? null : this.itemIds.iterator();
    }

    public void addToItemIds(long elem) {
      if (this.itemIds == null) {
        this.itemIds = new ArrayList<Long>();
      }
      this.itemIds.add(elem);
    }

    public List<Long> getItemIds() {
      return this.itemIds;
    }

    public void setItemIds(List<Long> itemIds) {
      this.itemIds = itemIds;
    }

    public void unsetItemIds() {
      this.itemIds = null;
    }

    /** Returns true if field itemIds is set (has been assigned a value) and false otherwise */
    public boolean isSetItemIds() {
      return this.itemIds != null;
    }

    public void setItemIdsIsSet(boolean value) {
      if (!value) {
        this.itemIds = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_IDS:
        if (value == null) {
          unsetItemIds();
        } else {
          setItemIds((List<Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_IDS:
        return getItemIds();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_IDS:
        return isSetItemIds();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getFofoFulFillmentWarehouseMap_args)
        return this.equals((getFofoFulFillmentWarehouseMap_args)that);
      return false;
    }

    public boolean equals(getFofoFulFillmentWarehouseMap_args that) {
      if (that == null)
        return false;

      boolean this_present_itemIds = true && this.isSetItemIds();
      boolean that_present_itemIds = true && that.isSetItemIds();
      if (this_present_itemIds || that_present_itemIds) {
        if (!(this_present_itemIds && that_present_itemIds))
          return false;
        if (!this.itemIds.equals(that.itemIds))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getFofoFulFillmentWarehouseMap_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getFofoFulFillmentWarehouseMap_args typedOther = (getFofoFulFillmentWarehouseMap_args)other;

      lastComparison = Boolean.valueOf(isSetItemIds()).compareTo(typedOther.isSetItemIds());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemIds()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemIds, typedOther.itemIds);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_IDS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list221 = iprot.readListBegin();
                this.itemIds = new ArrayList<Long>(_list221.size);
                for (int _i222 = 0; _i222 < _list221.size; ++_i222)
                {
                  long _elem223; // required
                  _elem223 = iprot.readI64();
                  this.itemIds.add(_elem223);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.itemIds != null) {
        oprot.writeFieldBegin(ITEM_IDS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.itemIds.size()));
          for (long _iter224 : this.itemIds)
          {
            oprot.writeI64(_iter224);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getFofoFulFillmentWarehouseMap_args(");
      boolean first = true;

      sb.append("itemIds:");
      if (this.itemIds == null) {
        sb.append("null");
      } else {
        sb.append(this.itemIds);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getFofoFulFillmentWarehouseMap_result implements org.apache.thrift.TBase<getFofoFulFillmentWarehouseMap_result, getFofoFulFillmentWarehouseMap_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getFofoFulFillmentWarehouseMap_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.MAP, (short)0);

    private Map<Long,Warehouse> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Warehouse.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getFofoFulFillmentWarehouseMap_result.class, metaDataMap);
    }

    public getFofoFulFillmentWarehouseMap_result() {
    }

    public getFofoFulFillmentWarehouseMap_result(
      Map<Long,Warehouse> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getFofoFulFillmentWarehouseMap_result(getFofoFulFillmentWarehouseMap_result other) {
      if (other.isSetSuccess()) {
        Map<Long,Warehouse> __this__success = new HashMap<Long,Warehouse>();
        for (Map.Entry<Long, Warehouse> other_element : other.success.entrySet()) {

          Long other_element_key = other_element.getKey();
          Warehouse other_element_value = other_element.getValue();

          Long __this__success_copy_key = other_element_key;

          Warehouse __this__success_copy_value = new Warehouse(other_element_value);

          __this__success.put(__this__success_copy_key, __this__success_copy_value);
        }
        this.success = __this__success;
      }
    }

    public getFofoFulFillmentWarehouseMap_result deepCopy() {
      return new getFofoFulFillmentWarehouseMap_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public void putToSuccess(long key, Warehouse val) {
      if (this.success == null) {
        this.success = new HashMap<Long,Warehouse>();
      }
      this.success.put(key, val);
    }

    public Map<Long,Warehouse> getSuccess() {
      return this.success;
    }

    public void setSuccess(Map<Long,Warehouse> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((Map<Long,Warehouse>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getFofoFulFillmentWarehouseMap_result)
        return this.equals((getFofoFulFillmentWarehouseMap_result)that);
      return false;
    }

    public boolean equals(getFofoFulFillmentWarehouseMap_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getFofoFulFillmentWarehouseMap_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getFofoFulFillmentWarehouseMap_result typedOther = (getFofoFulFillmentWarehouseMap_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map225 = iprot.readMapBegin();
                this.success = new HashMap<Long,Warehouse>(2*_map225.size);
                for (int _i226 = 0; _i226 < _map225.size; ++_i226)
                {
                  long _key227; // required
                  Warehouse _val228; // required
                  _key227 = iprot.readI64();
                  _val228 = new Warehouse();
                  _val228.read(iprot);
                  this.success.put(_key227, _val228);
                }
                iprot.readMapEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (Map.Entry<Long, Warehouse> _iter229 : this.success.entrySet())
          {
            oprot.writeI64(_iter229.getKey());
            _iter229.getValue().write(oprot);
          }
          oprot.writeMapEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getFofoFulFillmentWarehouseMap_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemLocationAvailabilityCache_args implements org.apache.thrift.TBase<getItemLocationAvailabilityCache_args, getItemLocationAvailabilityCache_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemLocationAvailabilityCache_args");

    private static final org.apache.thrift.protocol.TField ITEM_LOCATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("itemLocations", org.apache.thrift.protocol.TType.LIST, (short)1);

    private List<ItemLocationAvailability> itemLocations; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_LOCATIONS((short)1, "itemLocations");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_LOCATIONS
            return ITEM_LOCATIONS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_LOCATIONS, new org.apache.thrift.meta_data.FieldMetaData("itemLocations", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ItemLocationAvailability.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemLocationAvailabilityCache_args.class, metaDataMap);
    }

    public getItemLocationAvailabilityCache_args() {
    }

    public getItemLocationAvailabilityCache_args(
      List<ItemLocationAvailability> itemLocations)
    {
      this();
      this.itemLocations = itemLocations;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemLocationAvailabilityCache_args(getItemLocationAvailabilityCache_args other) {
      if (other.isSetItemLocations()) {
        List<ItemLocationAvailability> __this__itemLocations = new ArrayList<ItemLocationAvailability>();
        for (ItemLocationAvailability other_element : other.itemLocations) {
          __this__itemLocations.add(new ItemLocationAvailability(other_element));
        }
        this.itemLocations = __this__itemLocations;
      }
    }

    public getItemLocationAvailabilityCache_args deepCopy() {
      return new getItemLocationAvailabilityCache_args(this);
    }

    @Override
    public void clear() {
      this.itemLocations = null;
    }

    public int getItemLocationsSize() {
      return (this.itemLocations == null) ? 0 : this.itemLocations.size();
    }

    public java.util.Iterator<ItemLocationAvailability> getItemLocationsIterator() {
      return (this.itemLocations == null) ? null : this.itemLocations.iterator();
    }

    public void addToItemLocations(ItemLocationAvailability elem) {
      if (this.itemLocations == null) {
        this.itemLocations = new ArrayList<ItemLocationAvailability>();
      }
      this.itemLocations.add(elem);
    }

    public List<ItemLocationAvailability> getItemLocations() {
      return this.itemLocations;
    }

    public void setItemLocations(List<ItemLocationAvailability> itemLocations) {
      this.itemLocations = itemLocations;
    }

    public void unsetItemLocations() {
      this.itemLocations = null;
    }

    /** Returns true if field itemLocations is set (has been assigned a value) and false otherwise */
    public boolean isSetItemLocations() {
      return this.itemLocations != null;
    }

    public void setItemLocationsIsSet(boolean value) {
      if (!value) {
        this.itemLocations = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_LOCATIONS:
        if (value == null) {
          unsetItemLocations();
        } else {
          setItemLocations((List<ItemLocationAvailability>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_LOCATIONS:
        return getItemLocations();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_LOCATIONS:
        return isSetItemLocations();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemLocationAvailabilityCache_args)
        return this.equals((getItemLocationAvailabilityCache_args)that);
      return false;
    }

    public boolean equals(getItemLocationAvailabilityCache_args that) {
      if (that == null)
        return false;

      boolean this_present_itemLocations = true && this.isSetItemLocations();
      boolean that_present_itemLocations = true && that.isSetItemLocations();
      if (this_present_itemLocations || that_present_itemLocations) {
        if (!(this_present_itemLocations && that_present_itemLocations))
          return false;
        if (!this.itemLocations.equals(that.itemLocations))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemLocationAvailabilityCache_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemLocationAvailabilityCache_args typedOther = (getItemLocationAvailabilityCache_args)other;

      lastComparison = Boolean.valueOf(isSetItemLocations()).compareTo(typedOther.isSetItemLocations());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemLocations()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemLocations, typedOther.itemLocations);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_LOCATIONS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list230 = iprot.readListBegin();
                this.itemLocations = new ArrayList<ItemLocationAvailability>(_list230.size);
                for (int _i231 = 0; _i231 < _list230.size; ++_i231)
                {
                  ItemLocationAvailability _elem232; // required
                  _elem232 = new ItemLocationAvailability();
                  _elem232.read(iprot);
                  this.itemLocations.add(_elem232);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.itemLocations != null) {
        oprot.writeFieldBegin(ITEM_LOCATIONS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.itemLocations.size()));
          for (ItemLocationAvailability _iter233 : this.itemLocations)
          {
            _iter233.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemLocationAvailabilityCache_args(");
      boolean first = true;

      sb.append("itemLocations:");
      if (this.itemLocations == null) {
        sb.append("null");
      } else {
        sb.append(this.itemLocations);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemLocationAvailabilityCache_result implements org.apache.thrift.TBase<getItemLocationAvailabilityCache_result, getItemLocationAvailabilityCache_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemLocationAvailabilityCache_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<ItemLocationAvailability> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ItemLocationAvailability.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemLocationAvailabilityCache_result.class, metaDataMap);
    }

    public getItemLocationAvailabilityCache_result() {
    }

    public getItemLocationAvailabilityCache_result(
      List<ItemLocationAvailability> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemLocationAvailabilityCache_result(getItemLocationAvailabilityCache_result other) {
      if (other.isSetSuccess()) {
        List<ItemLocationAvailability> __this__success = new ArrayList<ItemLocationAvailability>();
        for (ItemLocationAvailability other_element : other.success) {
          __this__success.add(new ItemLocationAvailability(other_element));
        }
        this.success = __this__success;
      }
    }

    public getItemLocationAvailabilityCache_result deepCopy() {
      return new getItemLocationAvailabilityCache_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<ItemLocationAvailability> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(ItemLocationAvailability elem) {
      if (this.success == null) {
        this.success = new ArrayList<ItemLocationAvailability>();
      }
      this.success.add(elem);
    }

    public List<ItemLocationAvailability> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<ItemLocationAvailability> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<ItemLocationAvailability>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemLocationAvailabilityCache_result)
        return this.equals((getItemLocationAvailabilityCache_result)that);
      return false;
    }

    public boolean equals(getItemLocationAvailabilityCache_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemLocationAvailabilityCache_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemLocationAvailabilityCache_result typedOther = (getItemLocationAvailabilityCache_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list234 = iprot.readListBegin();
                this.success = new ArrayList<ItemLocationAvailability>(_list234.size);
                for (int _i235 = 0; _i235 < _list234.size; ++_i235)
                {
                  ItemLocationAvailability _elem236; // required
                  _elem236 = new ItemLocationAvailability();
                  _elem236.read(iprot);
                  this.success.add(_elem236);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (ItemLocationAvailability _iter237 : this.success)
          {
            _iter237.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemLocationAvailabilityCache_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemLocationAvailabilityCacheByItemId_args implements org.apache.thrift.TBase<getItemLocationAvailabilityCacheByItemId_args, getItemLocationAvailabilityCacheByItemId_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemLocationAvailabilityCacheByItemId_args");

    private static final org.apache.thrift.protocol.TField ITEM_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("itemIds", org.apache.thrift.protocol.TType.LIST, (short)1);

    private List<Long> itemIds; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEM_IDS((short)1, "itemIds");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEM_IDS
            return ITEM_IDS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEM_IDS, new org.apache.thrift.meta_data.FieldMetaData("itemIds", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemLocationAvailabilityCacheByItemId_args.class, metaDataMap);
    }

    public getItemLocationAvailabilityCacheByItemId_args() {
    }

    public getItemLocationAvailabilityCacheByItemId_args(
      List<Long> itemIds)
    {
      this();
      this.itemIds = itemIds;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemLocationAvailabilityCacheByItemId_args(getItemLocationAvailabilityCacheByItemId_args other) {
      if (other.isSetItemIds()) {
        List<Long> __this__itemIds = new ArrayList<Long>();
        for (Long other_element : other.itemIds) {
          __this__itemIds.add(other_element);
        }
        this.itemIds = __this__itemIds;
      }
    }

    public getItemLocationAvailabilityCacheByItemId_args deepCopy() {
      return new getItemLocationAvailabilityCacheByItemId_args(this);
    }

    @Override
    public void clear() {
      this.itemIds = null;
    }

    public int getItemIdsSize() {
      return (this.itemIds == null) ? 0 : this.itemIds.size();
    }

    public java.util.Iterator<Long> getItemIdsIterator() {
      return (this.itemIds == null) ? null : this.itemIds.iterator();
    }

    public void addToItemIds(long elem) {
      if (this.itemIds == null) {
        this.itemIds = new ArrayList<Long>();
      }
      this.itemIds.add(elem);
    }

    public List<Long> getItemIds() {
      return this.itemIds;
    }

    public void setItemIds(List<Long> itemIds) {
      this.itemIds = itemIds;
    }

    public void unsetItemIds() {
      this.itemIds = null;
    }

    /** Returns true if field itemIds is set (has been assigned a value) and false otherwise */
    public boolean isSetItemIds() {
      return this.itemIds != null;
    }

    public void setItemIdsIsSet(boolean value) {
      if (!value) {
        this.itemIds = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEM_IDS:
        if (value == null) {
          unsetItemIds();
        } else {
          setItemIds((List<Long>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEM_IDS:
        return getItemIds();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEM_IDS:
        return isSetItemIds();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemLocationAvailabilityCacheByItemId_args)
        return this.equals((getItemLocationAvailabilityCacheByItemId_args)that);
      return false;
    }

    public boolean equals(getItemLocationAvailabilityCacheByItemId_args that) {
      if (that == null)
        return false;

      boolean this_present_itemIds = true && this.isSetItemIds();
      boolean that_present_itemIds = true && that.isSetItemIds();
      if (this_present_itemIds || that_present_itemIds) {
        if (!(this_present_itemIds && that_present_itemIds))
          return false;
        if (!this.itemIds.equals(that.itemIds))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemLocationAvailabilityCacheByItemId_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemLocationAvailabilityCacheByItemId_args typedOther = (getItemLocationAvailabilityCacheByItemId_args)other;

      lastComparison = Boolean.valueOf(isSetItemIds()).compareTo(typedOther.isSetItemIds());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItemIds()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemIds, typedOther.itemIds);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEM_IDS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list238 = iprot.readListBegin();
                this.itemIds = new ArrayList<Long>(_list238.size);
                for (int _i239 = 0; _i239 < _list238.size; ++_i239)
                {
                  long _elem240; // required
                  _elem240 = iprot.readI64();
                  this.itemIds.add(_elem240);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.itemIds != null) {
        oprot.writeFieldBegin(ITEM_IDS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.itemIds.size()));
          for (long _iter241 : this.itemIds)
          {
            oprot.writeI64(_iter241);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemLocationAvailabilityCacheByItemId_args(");
      boolean first = true;

      sb.append("itemIds:");
      if (this.itemIds == null) {
        sb.append("null");
      } else {
        sb.append(this.itemIds);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemLocationAvailabilityCacheByItemId_result implements org.apache.thrift.TBase<getItemLocationAvailabilityCacheByItemId_result, getItemLocationAvailabilityCacheByItemId_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemLocationAvailabilityCacheByItemId_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.LIST, (short)0);

    private List<ItemLocationAvailability> success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, ItemLocationAvailability.class))));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemLocationAvailabilityCacheByItemId_result.class, metaDataMap);
    }

    public getItemLocationAvailabilityCacheByItemId_result() {
    }

    public getItemLocationAvailabilityCacheByItemId_result(
      List<ItemLocationAvailability> success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemLocationAvailabilityCacheByItemId_result(getItemLocationAvailabilityCacheByItemId_result other) {
      if (other.isSetSuccess()) {
        List<ItemLocationAvailability> __this__success = new ArrayList<ItemLocationAvailability>();
        for (ItemLocationAvailability other_element : other.success) {
          __this__success.add(new ItemLocationAvailability(other_element));
        }
        this.success = __this__success;
      }
    }

    public getItemLocationAvailabilityCacheByItemId_result deepCopy() {
      return new getItemLocationAvailabilityCacheByItemId_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public int getSuccessSize() {
      return (this.success == null) ? 0 : this.success.size();
    }

    public java.util.Iterator<ItemLocationAvailability> getSuccessIterator() {
      return (this.success == null) ? null : this.success.iterator();
    }

    public void addToSuccess(ItemLocationAvailability elem) {
      if (this.success == null) {
        this.success = new ArrayList<ItemLocationAvailability>();
      }
      this.success.add(elem);
    }

    public List<ItemLocationAvailability> getSuccess() {
      return this.success;
    }

    public void setSuccess(List<ItemLocationAvailability> success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((List<ItemLocationAvailability>)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemLocationAvailabilityCacheByItemId_result)
        return this.equals((getItemLocationAvailabilityCacheByItemId_result)that);
      return false;
    }

    public boolean equals(getItemLocationAvailabilityCacheByItemId_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemLocationAvailabilityCacheByItemId_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemLocationAvailabilityCacheByItemId_result typedOther = (getItemLocationAvailabilityCacheByItemId_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
              {
                org.apache.thrift.protocol.TList _list242 = iprot.readListBegin();
                this.success = new ArrayList<ItemLocationAvailability>(_list242.size);
                for (int _i243 = 0; _i243 < _list242.size; ++_i243)
                {
                  ItemLocationAvailability _elem244; // required
                  _elem244 = new ItemLocationAvailability();
                  _elem244.read(iprot);
                  this.success.add(_elem244);
                }
                iprot.readListEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        {
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
          for (ItemLocationAvailability _iter245 : this.success)
          {
            _iter245.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemLocationAvailabilityCacheByItemId_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemPincodeAvailability_args implements org.apache.thrift.TBase<getItemPincodeAvailability_args, getItemPincodeAvailability_args._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemPincodeAvailability_args");

    private static final org.apache.thrift.protocol.TField ITEMPRICING_FIELD_DESC = new org.apache.thrift.protocol.TField("itempricing", org.apache.thrift.protocol.TType.MAP, (short)1);
    private static final org.apache.thrift.protocol.TField PINCODE_FIELD_DESC = new org.apache.thrift.protocol.TField("pincode", org.apache.thrift.protocol.TType.STRING, (short)2);

    private Map<Long,Long> itempricing; // required
    private String pincode; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      ITEMPRICING((short)1, "itempricing"),
      PINCODE((short)2, "pincode");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 1: // ITEMPRICING
            return ITEMPRICING;
          case 2: // PINCODE
            return PINCODE;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.ITEMPRICING, new org.apache.thrift.meta_data.FieldMetaData("itempricing", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP, 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64), 
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
      tmpMap.put(_Fields.PINCODE, new org.apache.thrift.meta_data.FieldMetaData("pincode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemPincodeAvailability_args.class, metaDataMap);
    }

    public getItemPincodeAvailability_args() {
    }

    public getItemPincodeAvailability_args(
      Map<Long,Long> itempricing,
      String pincode)
    {
      this();
      this.itempricing = itempricing;
      this.pincode = pincode;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemPincodeAvailability_args(getItemPincodeAvailability_args other) {
      if (other.isSetItempricing()) {
        Map<Long,Long> __this__itempricing = new HashMap<Long,Long>();
        for (Map.Entry<Long, Long> other_element : other.itempricing.entrySet()) {

          Long other_element_key = other_element.getKey();
          Long other_element_value = other_element.getValue();

          Long __this__itempricing_copy_key = other_element_key;

          Long __this__itempricing_copy_value = other_element_value;

          __this__itempricing.put(__this__itempricing_copy_key, __this__itempricing_copy_value);
        }
        this.itempricing = __this__itempricing;
      }
      if (other.isSetPincode()) {
        this.pincode = other.pincode;
      }
    }

    public getItemPincodeAvailability_args deepCopy() {
      return new getItemPincodeAvailability_args(this);
    }

    @Override
    public void clear() {
      this.itempricing = null;
      this.pincode = null;
    }

    public int getItempricingSize() {
      return (this.itempricing == null) ? 0 : this.itempricing.size();
    }

    public void putToItempricing(long key, long val) {
      if (this.itempricing == null) {
        this.itempricing = new HashMap<Long,Long>();
      }
      this.itempricing.put(key, val);
    }

    public Map<Long,Long> getItempricing() {
      return this.itempricing;
    }

    public void setItempricing(Map<Long,Long> itempricing) {
      this.itempricing = itempricing;
    }

    public void unsetItempricing() {
      this.itempricing = null;
    }

    /** Returns true if field itempricing is set (has been assigned a value) and false otherwise */
    public boolean isSetItempricing() {
      return this.itempricing != null;
    }

    public void setItempricingIsSet(boolean value) {
      if (!value) {
        this.itempricing = null;
      }
    }

    public String getPincode() {
      return this.pincode;
    }

    public void setPincode(String pincode) {
      this.pincode = pincode;
    }

    public void unsetPincode() {
      this.pincode = null;
    }

    /** Returns true if field pincode is set (has been assigned a value) and false otherwise */
    public boolean isSetPincode() {
      return this.pincode != null;
    }

    public void setPincodeIsSet(boolean value) {
      if (!value) {
        this.pincode = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case ITEMPRICING:
        if (value == null) {
          unsetItempricing();
        } else {
          setItempricing((Map<Long,Long>)value);
        }
        break;

      case PINCODE:
        if (value == null) {
          unsetPincode();
        } else {
          setPincode((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case ITEMPRICING:
        return getItempricing();

      case PINCODE:
        return getPincode();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case ITEMPRICING:
        return isSetItempricing();
      case PINCODE:
        return isSetPincode();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemPincodeAvailability_args)
        return this.equals((getItemPincodeAvailability_args)that);
      return false;
    }

    public boolean equals(getItemPincodeAvailability_args that) {
      if (that == null)
        return false;

      boolean this_present_itempricing = true && this.isSetItempricing();
      boolean that_present_itempricing = true && that.isSetItempricing();
      if (this_present_itempricing || that_present_itempricing) {
        if (!(this_present_itempricing && that_present_itempricing))
          return false;
        if (!this.itempricing.equals(that.itempricing))
          return false;
      }

      boolean this_present_pincode = true && this.isSetPincode();
      boolean that_present_pincode = true && that.isSetPincode();
      if (this_present_pincode || that_present_pincode) {
        if (!(this_present_pincode && that_present_pincode))
          return false;
        if (!this.pincode.equals(that.pincode))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemPincodeAvailability_args other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemPincodeAvailability_args typedOther = (getItemPincodeAvailability_args)other;

      lastComparison = Boolean.valueOf(isSetItempricing()).compareTo(typedOther.isSetItempricing());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetItempricing()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itempricing, typedOther.itempricing);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      lastComparison = Boolean.valueOf(isSetPincode()).compareTo(typedOther.isSetPincode());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetPincode()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pincode, typedOther.pincode);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 1: // ITEMPRICING
            if (field.type == org.apache.thrift.protocol.TType.MAP) {
              {
                org.apache.thrift.protocol.TMap _map246 = iprot.readMapBegin();
                this.itempricing = new HashMap<Long,Long>(2*_map246.size);
                for (int _i247 = 0; _i247 < _map246.size; ++_i247)
                {
                  long _key248; // required
                  long _val249; // required
                  _key248 = iprot.readI64();
                  _val249 = iprot.readI64();
                  this.itempricing.put(_key248, _val249);
                }
                iprot.readMapEnd();
              }
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          case 2: // PINCODE
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.pincode = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (this.itempricing != null) {
        oprot.writeFieldBegin(ITEMPRICING_FIELD_DESC);
        {
          oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I64, org.apache.thrift.protocol.TType.I64, this.itempricing.size()));
          for (Map.Entry<Long, Long> _iter250 : this.itempricing.entrySet())
          {
            oprot.writeI64(_iter250.getKey());
            oprot.writeI64(_iter250.getValue());
          }
          oprot.writeMapEnd();
        }
        oprot.writeFieldEnd();
      }
      if (this.pincode != null) {
        oprot.writeFieldBegin(PINCODE_FIELD_DESC);
        oprot.writeString(this.pincode);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemPincodeAvailability_args(");
      boolean first = true;

      sb.append("itempricing:");
      if (this.itempricing == null) {
        sb.append("null");
      } else {
        sb.append(this.itempricing);
      }
      first = false;
      if (!first) sb.append(", ");
      sb.append("pincode:");
      if (this.pincode == null) {
        sb.append("null");
      } else {
        sb.append(this.pincode);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

  public static class getItemPincodeAvailability_result implements org.apache.thrift.TBase<getItemPincodeAvailability_result, getItemPincodeAvailability_result._Fields>, java.io.Serializable, Cloneable   {
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemPincodeAvailability_result");

    private static final org.apache.thrift.protocol.TField SUCCESS_FIELD_DESC = new org.apache.thrift.protocol.TField("success", org.apache.thrift.protocol.TType.STRING, (short)0);

    private String success; // required

    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
      SUCCESS((short)0, "success");

      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();

      static {
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
          byName.put(field.getFieldName(), field);
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, or null if its not found.
       */
      public static _Fields findByThriftId(int fieldId) {
        switch(fieldId) {
          case 0: // SUCCESS
            return SUCCESS;
          default:
            return null;
        }
      }

      /**
       * Find the _Fields constant that matches fieldId, throwing an exception
       * if it is not found.
       */
      public static _Fields findByThriftIdOrThrow(int fieldId) {
        _Fields fields = findByThriftId(fieldId);
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
        return fields;
      }

      /**
       * Find the _Fields constant that matches name, or null if its not found.
       */
      public static _Fields findByName(String name) {
        return byName.get(name);
      }

      private final short _thriftId;
      private final String _fieldName;

      _Fields(short thriftId, String fieldName) {
        _thriftId = thriftId;
        _fieldName = fieldName;
      }

      public short getThriftFieldId() {
        return _thriftId;
      }

      public String getFieldName() {
        return _fieldName;
      }
    }

    // isset id assignments

    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
    static {
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
      metaDataMap = Collections.unmodifiableMap(tmpMap);
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemPincodeAvailability_result.class, metaDataMap);
    }

    public getItemPincodeAvailability_result() {
    }

    public getItemPincodeAvailability_result(
      String success)
    {
      this();
      this.success = success;
    }

    /**
     * Performs a deep copy on <i>other</i>.
     */
    public getItemPincodeAvailability_result(getItemPincodeAvailability_result other) {
      if (other.isSetSuccess()) {
        this.success = other.success;
      }
    }

    public getItemPincodeAvailability_result deepCopy() {
      return new getItemPincodeAvailability_result(this);
    }

    @Override
    public void clear() {
      this.success = null;
    }

    public String getSuccess() {
      return this.success;
    }

    public void setSuccess(String success) {
      this.success = success;
    }

    public void unsetSuccess() {
      this.success = null;
    }

    /** Returns true if field success is set (has been assigned a value) and false otherwise */
    public boolean isSetSuccess() {
      return this.success != null;
    }

    public void setSuccessIsSet(boolean value) {
      if (!value) {
        this.success = null;
      }
    }

    public void setFieldValue(_Fields field, Object value) {
      switch (field) {
      case SUCCESS:
        if (value == null) {
          unsetSuccess();
        } else {
          setSuccess((String)value);
        }
        break;

      }
    }

    public Object getFieldValue(_Fields field) {
      switch (field) {
      case SUCCESS:
        return getSuccess();

      }
      throw new IllegalStateException();
    }

    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
    public boolean isSet(_Fields field) {
      if (field == null) {
        throw new IllegalArgumentException();
      }

      switch (field) {
      case SUCCESS:
        return isSetSuccess();
      }
      throw new IllegalStateException();
    }

    @Override
    public boolean equals(Object that) {
      if (that == null)
        return false;
      if (that instanceof getItemPincodeAvailability_result)
        return this.equals((getItemPincodeAvailability_result)that);
      return false;
    }

    public boolean equals(getItemPincodeAvailability_result that) {
      if (that == null)
        return false;

      boolean this_present_success = true && this.isSetSuccess();
      boolean that_present_success = true && that.isSetSuccess();
      if (this_present_success || that_present_success) {
        if (!(this_present_success && that_present_success))
          return false;
        if (!this.success.equals(that.success))
          return false;
      }

      return true;
    }

    @Override
    public int hashCode() {
      return 0;
    }

    public int compareTo(getItemPincodeAvailability_result other) {
      if (!getClass().equals(other.getClass())) {
        return getClass().getName().compareTo(other.getClass().getName());
      }

      int lastComparison = 0;
      getItemPincodeAvailability_result typedOther = (getItemPincodeAvailability_result)other;

      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
      if (lastComparison != 0) {
        return lastComparison;
      }
      if (isSetSuccess()) {
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
        if (lastComparison != 0) {
          return lastComparison;
        }
      }
      return 0;
    }

    public _Fields fieldForId(int fieldId) {
      return _Fields.findByThriftId(fieldId);
    }

    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
      org.apache.thrift.protocol.TField field;
      iprot.readStructBegin();
      while (true)
      {
        field = iprot.readFieldBegin();
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
          break;
        }
        switch (field.id) {
          case 0: // SUCCESS
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
              this.success = iprot.readString();
            } else { 
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
            }
            break;
          default:
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
        }
        iprot.readFieldEnd();
      }
      iprot.readStructEnd();
      validate();
    }

    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
      oprot.writeStructBegin(STRUCT_DESC);

      if (this.isSetSuccess()) {
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
        oprot.writeString(this.success);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }

    @Override
    public String toString() {
      StringBuilder sb = new StringBuilder("getItemPincodeAvailability_result(");
      boolean first = true;

      sb.append("success:");
      if (this.success == null) {
        sb.append("null");
      } else {
        sb.append(this.success);
      }
      first = false;
      sb.append(")");
      return sb.toString();
    }

    public void validate() throws org.apache.thrift.TException {
      // check for required fields
    }

    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
      try {
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
      try {
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
      } catch (org.apache.thrift.TException te) {
        throw new java.io.IOException(te);
      }
    }

  }

}