Rev 4622 | Rev 5185 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
/*** Autogenerated by Thrift Compiler (0.7.0)** DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING*/package in.shop2020.warehouse;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 WarehouseService {public interface Iface extends in.shop2020.generic.GenericService.Iface {/*** Creating inventory for a serialized item** @param itemId* @param itemNumber* @param serialNumber* @param purchaseId*/public InventoryItem createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException;/*** Creating inventory for a serialized item using item number** @param itemNumber* @param serialNumber* @param purchaseId*/public InventoryItem createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException;/*** Creates inventory for an unserailized item** @param itemId* @param quantity* @param purchaseId*/public InventoryItem createInventoryItem(long itemId, long quantity, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException;/*** Retrieves serialized inventory item given a serial number** @param serialNumber*/public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException;/*** Retrieves non-serialized inventory items from a given supplier** @param itemId* @param quantity* @param supplierId*/public List<InventoryItem> getNonSeralizedInventoryItems(long itemId, long quantity, long supplierId) throws org.apache.thrift.TException;/*** Retrieves inventory items for a given item** @param itemId*/public List<InventoryItem> getInventoryItems(long itemId) throws org.apache.thrift.TException;/*** Retrieves scans for a given order** @param orderId*/public List<Scan> getScanForOrder(long orderId) throws org.apache.thrift.TException;/*** Retrieves scans for a given inventory item** @param inventoryItemId*/public List<Scan> getScan(long inventoryItemId) throws org.apache.thrift.TException;/*** Scan serialized items.** @param inventoryItemId* @param type* @param warehouseId*/public void scanSerializedItem(long inventoryItemId, ScanType type, long warehouseId) throws WarehouseServiceException, org.apache.thrift.TException;/*** Scan non-serialized items.** @param inventoryItemId* @param type* @param quantity* @param warehouseId*/public void scan(long inventoryItemId, ScanType type, long quantity, long warehouseId) throws WarehouseServiceException, org.apache.thrift.TException;/*** Scan serialized items linked with an order. Returns its price.** @param serialNumber* @param type* @param orderId* @param warehouseId*/public InventoryItem scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long warehouseId) throws WarehouseServiceException, org.apache.thrift.TException;/*** Scan non-serialized items linked with an order.** @param inventoryItemId* @param type* @param quantity* @param orderId* @param warehouseId*/public void scanForOrder(long inventoryItemId, ScanType type, long quantity, long orderId, long warehouseId) throws WarehouseServiceException, org.apache.thrift.TException;/*** Created item number to item id mapping** @param itemNumber* @param itemId*/public void createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException;/*** Get itemNumber mappings for itemId** @param itemId*/public List<String> getItemNumbers(long itemId) throws org.apache.thrift.TException;}public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {public void createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createSerializedInventoryItem_call> resultHandler) throws org.apache.thrift.TException;public void createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createSerializedInventoryItemFromItemNumber_call> resultHandler) throws org.apache.thrift.TException;public void createInventoryItem(long itemId, long quantity, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createInventoryItem_call> resultHandler) throws org.apache.thrift.TException;public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;public void getNonSeralizedInventoryItems(long itemId, long quantity, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getNonSeralizedInventoryItems_call> resultHandler) throws org.apache.thrift.TException;public void getInventoryItems(long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItems_call> resultHandler) throws org.apache.thrift.TException;public void getScanForOrder(long orderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getScanForOrder_call> resultHandler) throws org.apache.thrift.TException;public void getScan(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getScan_call> resultHandler) throws org.apache.thrift.TException;public void scanSerializedItem(long inventoryItemId, ScanType type, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanSerializedItem_call> resultHandler) throws org.apache.thrift.TException;public void scan(long inventoryItemId, ScanType type, long quantity, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scan_call> resultHandler) throws org.apache.thrift.TException;public void scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanSerializedItemForOrder_call> resultHandler) throws org.apache.thrift.TException;public void scanForOrder(long inventoryItemId, ScanType type, long quantity, long orderId, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForOrder_call> resultHandler) throws org.apache.thrift.TException;public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException;public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemNumbers_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 InventoryItem createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException{send_createSerializedInventoryItem(itemId, itemNumber, serialNumber, purchaseId);return recv_createSerializedInventoryItem();}public void send_createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId) throws org.apache.thrift.TException{createSerializedInventoryItem_args args = new createSerializedInventoryItem_args();args.setItemId(itemId);args.setItemNumber(itemNumber);args.setSerialNumber(serialNumber);args.setPurchaseId(purchaseId);sendBase("createSerializedInventoryItem", args);}public InventoryItem recv_createSerializedInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException{createSerializedInventoryItem_result result = new createSerializedInventoryItem_result();receiveBase(result, "createSerializedInventoryItem");if (result.isSetSuccess()) {return result.success;}if (result.wex != null) {throw result.wex;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createSerializedInventoryItem failed: unknown result");}public InventoryItem createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException{send_createSerializedInventoryItemFromItemNumber(itemNumber, serialNumber, purchaseId);return recv_createSerializedInventoryItemFromItemNumber();}public void send_createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId) throws org.apache.thrift.TException{createSerializedInventoryItemFromItemNumber_args args = new createSerializedInventoryItemFromItemNumber_args();args.setItemNumber(itemNumber);args.setSerialNumber(serialNumber);args.setPurchaseId(purchaseId);sendBase("createSerializedInventoryItemFromItemNumber", args);}public InventoryItem recv_createSerializedInventoryItemFromItemNumber() throws WarehouseServiceException, org.apache.thrift.TException{createSerializedInventoryItemFromItemNumber_result result = new createSerializedInventoryItemFromItemNumber_result();receiveBase(result, "createSerializedInventoryItemFromItemNumber");if (result.isSetSuccess()) {return result.success;}if (result.wex != null) {throw result.wex;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createSerializedInventoryItemFromItemNumber failed: unknown result");}public InventoryItem createInventoryItem(long itemId, long quantity, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException{send_createInventoryItem(itemId, quantity, purchaseId);return recv_createInventoryItem();}public void send_createInventoryItem(long itemId, long quantity, long purchaseId) throws org.apache.thrift.TException{createInventoryItem_args args = new createInventoryItem_args();args.setItemId(itemId);args.setQuantity(quantity);args.setPurchaseId(purchaseId);sendBase("createInventoryItem", args);}public InventoryItem recv_createInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException{createInventoryItem_result result = new createInventoryItem_result();receiveBase(result, "createInventoryItem");if (result.isSetSuccess()) {return result.success;}if (result.wex != null) {throw result.wex;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createInventoryItem failed: unknown result");}public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException{send_getInventoryItem(serialNumber);return recv_getInventoryItem();}public void send_getInventoryItem(String serialNumber) throws org.apache.thrift.TException{getInventoryItem_args args = new getInventoryItem_args();args.setSerialNumber(serialNumber);sendBase("getInventoryItem", args);}public InventoryItem recv_getInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException{getInventoryItem_result result = new getInventoryItem_result();receiveBase(result, "getInventoryItem");if (result.isSetSuccess()) {return result.success;}if (result.wex != null) {throw result.wex;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItem failed: unknown result");}public List<InventoryItem> getNonSeralizedInventoryItems(long itemId, long quantity, long supplierId) throws org.apache.thrift.TException{send_getNonSeralizedInventoryItems(itemId, quantity, supplierId);return recv_getNonSeralizedInventoryItems();}public void send_getNonSeralizedInventoryItems(long itemId, long quantity, long supplierId) throws org.apache.thrift.TException{getNonSeralizedInventoryItems_args args = new getNonSeralizedInventoryItems_args();args.setItemId(itemId);args.setQuantity(quantity);args.setSupplierId(supplierId);sendBase("getNonSeralizedInventoryItems", args);}public List<InventoryItem> recv_getNonSeralizedInventoryItems() throws org.apache.thrift.TException{getNonSeralizedInventoryItems_result result = new getNonSeralizedInventoryItems_result();receiveBase(result, "getNonSeralizedInventoryItems");if (result.isSetSuccess()) {return result.success;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNonSeralizedInventoryItems failed: unknown result");}public List<InventoryItem> getInventoryItems(long itemId) throws org.apache.thrift.TException{send_getInventoryItems(itemId);return recv_getInventoryItems();}public void send_getInventoryItems(long itemId) throws org.apache.thrift.TException{getInventoryItems_args args = new getInventoryItems_args();args.setItemId(itemId);sendBase("getInventoryItems", args);}public List<InventoryItem> recv_getInventoryItems() throws org.apache.thrift.TException{getInventoryItems_result result = new getInventoryItems_result();receiveBase(result, "getInventoryItems");if (result.isSetSuccess()) {return result.success;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItems failed: unknown result");}public List<Scan> getScanForOrder(long orderId) throws org.apache.thrift.TException{send_getScanForOrder(orderId);return recv_getScanForOrder();}public void send_getScanForOrder(long orderId) throws org.apache.thrift.TException{getScanForOrder_args args = new getScanForOrder_args();args.setOrderId(orderId);sendBase("getScanForOrder", args);}public List<Scan> recv_getScanForOrder() throws org.apache.thrift.TException{getScanForOrder_result result = new getScanForOrder_result();receiveBase(result, "getScanForOrder");if (result.isSetSuccess()) {return result.success;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getScanForOrder failed: unknown result");}public List<Scan> getScan(long inventoryItemId) throws org.apache.thrift.TException{send_getScan(inventoryItemId);return recv_getScan();}public void send_getScan(long inventoryItemId) throws org.apache.thrift.TException{getScan_args args = new getScan_args();args.setInventoryItemId(inventoryItemId);sendBase("getScan", args);}public List<Scan> recv_getScan() throws org.apache.thrift.TException{getScan_result result = new getScan_result();receiveBase(result, "getScan");if (result.isSetSuccess()) {return result.success;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getScan failed: unknown result");}public void scanSerializedItem(long inventoryItemId, ScanType type, long warehouseId) throws WarehouseServiceException, org.apache.thrift.TException{send_scanSerializedItem(inventoryItemId, type, warehouseId);recv_scanSerializedItem();}public void send_scanSerializedItem(long inventoryItemId, ScanType type, long warehouseId) throws org.apache.thrift.TException{scanSerializedItem_args args = new scanSerializedItem_args();args.setInventoryItemId(inventoryItemId);args.setType(type);args.setWarehouseId(warehouseId);sendBase("scanSerializedItem", args);}public void recv_scanSerializedItem() throws WarehouseServiceException, org.apache.thrift.TException{scanSerializedItem_result result = new scanSerializedItem_result();receiveBase(result, "scanSerializedItem");if (result.wex != null) {throw result.wex;}return;}public void scan(long inventoryItemId, ScanType type, long quantity, long warehouseId) throws WarehouseServiceException, org.apache.thrift.TException{send_scan(inventoryItemId, type, quantity, warehouseId);recv_scan();}public void send_scan(long inventoryItemId, ScanType type, long quantity, long warehouseId) throws org.apache.thrift.TException{scan_args args = new scan_args();args.setInventoryItemId(inventoryItemId);args.setType(type);args.setQuantity(quantity);args.setWarehouseId(warehouseId);sendBase("scan", args);}public void recv_scan() throws WarehouseServiceException, org.apache.thrift.TException{scan_result result = new scan_result();receiveBase(result, "scan");if (result.wex != null) {throw result.wex;}return;}public InventoryItem scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long warehouseId) throws WarehouseServiceException, org.apache.thrift.TException{send_scanSerializedItemForOrder(serialNumber, type, orderId, warehouseId);return recv_scanSerializedItemForOrder();}public void send_scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long warehouseId) throws org.apache.thrift.TException{scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();args.setSerialNumber(serialNumber);args.setType(type);args.setOrderId(orderId);args.setWarehouseId(warehouseId);sendBase("scanSerializedItemForOrder", args);}public InventoryItem recv_scanSerializedItemForOrder() throws WarehouseServiceException, org.apache.thrift.TException{scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();receiveBase(result, "scanSerializedItemForOrder");if (result.isSetSuccess()) {return result.success;}if (result.wex != null) {throw result.wex;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanSerializedItemForOrder failed: unknown result");}public void scanForOrder(long inventoryItemId, ScanType type, long quantity, long orderId, long warehouseId) throws WarehouseServiceException, org.apache.thrift.TException{send_scanForOrder(inventoryItemId, type, quantity, orderId, warehouseId);recv_scanForOrder();}public void send_scanForOrder(long inventoryItemId, ScanType type, long quantity, long orderId, long warehouseId) throws org.apache.thrift.TException{scanForOrder_args args = new scanForOrder_args();args.setInventoryItemId(inventoryItemId);args.setType(type);args.setQuantity(quantity);args.setOrderId(orderId);args.setWarehouseId(warehouseId);sendBase("scanForOrder", args);}public void recv_scanForOrder() throws WarehouseServiceException, org.apache.thrift.TException{scanForOrder_result result = new scanForOrder_result();receiveBase(result, "scanForOrder");if (result.wex != null) {throw result.wex;}return;}public void createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException{send_createItemNumberMapping(itemNumber, itemId);recv_createItemNumberMapping();}public void send_createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException{createItemNumberMapping_args args = new createItemNumberMapping_args();args.setItemNumber(itemNumber);args.setItemId(itemId);sendBase("createItemNumberMapping", args);}public void recv_createItemNumberMapping() throws org.apache.thrift.TException{createItemNumberMapping_result result = new createItemNumberMapping_result();receiveBase(result, "createItemNumberMapping");return;}public List<String> getItemNumbers(long itemId) throws org.apache.thrift.TException{send_getItemNumbers(itemId);return recv_getItemNumbers();}public void send_getItemNumbers(long itemId) throws org.apache.thrift.TException{getItemNumbers_args args = new getItemNumbers_args();args.setItemId(itemId);sendBase("getItemNumbers", args);}public List<String> recv_getItemNumbers() throws org.apache.thrift.TException{getItemNumbers_result result = new getItemNumbers_result();receiveBase(result, "getItemNumbers");if (result.isSetSuccess()) {return result.success;}throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemNumbers 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 createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createSerializedInventoryItem_call> resultHandler) throws org.apache.thrift.TException {checkReady();createSerializedInventoryItem_call method_call = new createSerializedInventoryItem_call(itemId, itemNumber, serialNumber, purchaseId, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class createSerializedInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {private long itemId;private String itemNumber;private String serialNumber;private long purchaseId;public createSerializedInventoryItem_call(long itemId, String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createSerializedInventoryItem_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.itemNumber = itemNumber;this.serialNumber = serialNumber;this.purchaseId = purchaseId;}public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createSerializedInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));createSerializedInventoryItem_args args = new createSerializedInventoryItem_args();args.setItemId(itemId);args.setItemNumber(itemNumber);args.setSerialNumber(serialNumber);args.setPurchaseId(purchaseId);args.write(prot);prot.writeMessageEnd();}public InventoryItem getResult() throws WarehouseServiceException, 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_createSerializedInventoryItem();}}public void createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createSerializedInventoryItemFromItemNumber_call> resultHandler) throws org.apache.thrift.TException {checkReady();createSerializedInventoryItemFromItemNumber_call method_call = new createSerializedInventoryItemFromItemNumber_call(itemNumber, serialNumber, purchaseId, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class createSerializedInventoryItemFromItemNumber_call extends org.apache.thrift.async.TAsyncMethodCall {private String itemNumber;private String serialNumber;private long purchaseId;public createSerializedInventoryItemFromItemNumber_call(String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createSerializedInventoryItemFromItemNumber_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.itemNumber = itemNumber;this.serialNumber = serialNumber;this.purchaseId = purchaseId;}public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createSerializedInventoryItemFromItemNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));createSerializedInventoryItemFromItemNumber_args args = new createSerializedInventoryItemFromItemNumber_args();args.setItemNumber(itemNumber);args.setSerialNumber(serialNumber);args.setPurchaseId(purchaseId);args.write(prot);prot.writeMessageEnd();}public InventoryItem getResult() throws WarehouseServiceException, 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_createSerializedInventoryItemFromItemNumber();}}public void createInventoryItem(long itemId, long quantity, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createInventoryItem_call> resultHandler) throws org.apache.thrift.TException {checkReady();createInventoryItem_call method_call = new createInventoryItem_call(itemId, quantity, purchaseId, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class createInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {private long itemId;private long quantity;private long purchaseId;public createInventoryItem_call(long itemId, long quantity, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createInventoryItem_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.quantity = quantity;this.purchaseId = purchaseId;}public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));createInventoryItem_args args = new createInventoryItem_args();args.setItemId(itemId);args.setQuantity(quantity);args.setPurchaseId(purchaseId);args.write(prot);prot.writeMessageEnd();}public InventoryItem getResult() throws WarehouseServiceException, 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_createInventoryItem();}}public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<getInventoryItem_call> resultHandler) throws org.apache.thrift.TException {checkReady();getInventoryItem_call method_call = new getInventoryItem_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class getInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {private String serialNumber;public getInventoryItem_call(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<getInventoryItem_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.serialNumber = serialNumber;}public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));getInventoryItem_args args = new getInventoryItem_args();args.setSerialNumber(serialNumber);args.write(prot);prot.writeMessageEnd();}public InventoryItem getResult() throws WarehouseServiceException, 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_getInventoryItem();}}public void getNonSeralizedInventoryItems(long itemId, long quantity, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getNonSeralizedInventoryItems_call> resultHandler) throws org.apache.thrift.TException {checkReady();getNonSeralizedInventoryItems_call method_call = new getNonSeralizedInventoryItems_call(itemId, quantity, supplierId, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class getNonSeralizedInventoryItems_call extends org.apache.thrift.async.TAsyncMethodCall {private long itemId;private long quantity;private long supplierId;public getNonSeralizedInventoryItems_call(long itemId, long quantity, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getNonSeralizedInventoryItems_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.quantity = quantity;this.supplierId = supplierId;}public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNonSeralizedInventoryItems", org.apache.thrift.protocol.TMessageType.CALL, 0));getNonSeralizedInventoryItems_args args = new getNonSeralizedInventoryItems_args();args.setItemId(itemId);args.setQuantity(quantity);args.setSupplierId(supplierId);args.write(prot);prot.writeMessageEnd();}public List<InventoryItem> 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_getNonSeralizedInventoryItems();}}public void getInventoryItems(long itemId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItems_call> resultHandler) throws org.apache.thrift.TException {checkReady();getInventoryItems_call method_call = new getInventoryItems_call(itemId, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class getInventoryItems_call extends org.apache.thrift.async.TAsyncMethodCall {private long itemId;public getInventoryItems_call(long itemId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItems_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("getInventoryItems", org.apache.thrift.protocol.TMessageType.CALL, 0));getInventoryItems_args args = new getInventoryItems_args();args.setItemId(itemId);args.write(prot);prot.writeMessageEnd();}public List<InventoryItem> 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_getInventoryItems();}}public void getScanForOrder(long orderId, org.apache.thrift.async.AsyncMethodCallback<getScanForOrder_call> resultHandler) throws org.apache.thrift.TException {checkReady();getScanForOrder_call method_call = new getScanForOrder_call(orderId, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class getScanForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {private long orderId;public getScanForOrder_call(long orderId, org.apache.thrift.async.AsyncMethodCallback<getScanForOrder_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.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("getScanForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));getScanForOrder_args args = new getScanForOrder_args();args.setOrderId(orderId);args.write(prot);prot.writeMessageEnd();}public List<Scan> 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_getScanForOrder();}}public void getScan(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<getScan_call> resultHandler) throws org.apache.thrift.TException {checkReady();getScan_call method_call = new getScan_call(inventoryItemId, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class getScan_call extends org.apache.thrift.async.TAsyncMethodCall {private long inventoryItemId;public getScan_call(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<getScan_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.inventoryItemId = inventoryItemId;}public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getScan", org.apache.thrift.protocol.TMessageType.CALL, 0));getScan_args args = new getScan_args();args.setInventoryItemId(inventoryItemId);args.write(prot);prot.writeMessageEnd();}public List<Scan> 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_getScan();}}public void scanSerializedItem(long inventoryItemId, ScanType type, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<scanSerializedItem_call> resultHandler) throws org.apache.thrift.TException {checkReady();scanSerializedItem_call method_call = new scanSerializedItem_call(inventoryItemId, type, warehouseId, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class scanSerializedItem_call extends org.apache.thrift.async.TAsyncMethodCall {private long inventoryItemId;private ScanType type;private long warehouseId;public scanSerializedItem_call(long inventoryItemId, ScanType type, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<scanSerializedItem_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.inventoryItemId = inventoryItemId;this.type = type;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("scanSerializedItem", org.apache.thrift.protocol.TMessageType.CALL, 0));scanSerializedItem_args args = new scanSerializedItem_args();args.setInventoryItemId(inventoryItemId);args.setType(type);args.setWarehouseId(warehouseId);args.write(prot);prot.writeMessageEnd();}public void getResult() throws WarehouseServiceException, 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_scanSerializedItem();}}public void scan(long inventoryItemId, ScanType type, long quantity, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<scan_call> resultHandler) throws org.apache.thrift.TException {checkReady();scan_call method_call = new scan_call(inventoryItemId, type, quantity, warehouseId, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class scan_call extends org.apache.thrift.async.TAsyncMethodCall {private long inventoryItemId;private ScanType type;private long quantity;private long warehouseId;public scan_call(long inventoryItemId, ScanType type, long quantity, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<scan_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.inventoryItemId = inventoryItemId;this.type = type;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("scan", org.apache.thrift.protocol.TMessageType.CALL, 0));scan_args args = new scan_args();args.setInventoryItemId(inventoryItemId);args.setType(type);args.setQuantity(quantity);args.setWarehouseId(warehouseId);args.write(prot);prot.writeMessageEnd();}public void getResult() throws WarehouseServiceException, 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_scan();}}public void scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<scanSerializedItemForOrder_call> resultHandler) throws org.apache.thrift.TException {checkReady();scanSerializedItemForOrder_call method_call = new scanSerializedItemForOrder_call(serialNumber, type, orderId, warehouseId, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class scanSerializedItemForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {private String serialNumber;private ScanType type;private long orderId;private long warehouseId;public scanSerializedItemForOrder_call(String serialNumber, ScanType type, long orderId, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<scanSerializedItemForOrder_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.serialNumber = serialNumber;this.type = type;this.orderId = orderId;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("scanSerializedItemForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();args.setSerialNumber(serialNumber);args.setType(type);args.setOrderId(orderId);args.setWarehouseId(warehouseId);args.write(prot);prot.writeMessageEnd();}public InventoryItem getResult() throws WarehouseServiceException, 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_scanSerializedItemForOrder();}}public void scanForOrder(long inventoryItemId, ScanType type, long quantity, long orderId, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<scanForOrder_call> resultHandler) throws org.apache.thrift.TException {checkReady();scanForOrder_call method_call = new scanForOrder_call(inventoryItemId, type, quantity, orderId, warehouseId, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class scanForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {private long inventoryItemId;private ScanType type;private long quantity;private long orderId;private long warehouseId;public scanForOrder_call(long inventoryItemId, ScanType type, long quantity, long orderId, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<scanForOrder_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.inventoryItemId = inventoryItemId;this.type = type;this.quantity = quantity;this.orderId = orderId;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("scanForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));scanForOrder_args args = new scanForOrder_args();args.setInventoryItemId(inventoryItemId);args.setType(type);args.setQuantity(quantity);args.setOrderId(orderId);args.setWarehouseId(warehouseId);args.write(prot);prot.writeMessageEnd();}public void getResult() throws WarehouseServiceException, 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_scanForOrder();}}public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException {checkReady();createItemNumberMapping_call method_call = new createItemNumberMapping_call(itemNumber, itemId, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class createItemNumberMapping_call extends org.apache.thrift.async.TAsyncMethodCall {private String itemNumber;private long itemId;public createItemNumberMapping_call(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<createItemNumberMapping_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.itemNumber = itemNumber;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("createItemNumberMapping", org.apache.thrift.protocol.TMessageType.CALL, 0));createItemNumberMapping_args args = new createItemNumberMapping_args();args.setItemNumber(itemNumber);args.setItemId(itemId);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_createItemNumberMapping();}}public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<getItemNumbers_call> resultHandler) throws org.apache.thrift.TException {checkReady();getItemNumbers_call method_call = new getItemNumbers_call(itemId, resultHandler, this, ___protocolFactory, ___transport);this.___currentMethod = method_call;___manager.call(method_call);}public static class getItemNumbers_call extends org.apache.thrift.async.TAsyncMethodCall {private long itemId;public getItemNumbers_call(long itemId, org.apache.thrift.async.AsyncMethodCallback<getItemNumbers_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("getItemNumbers", org.apache.thrift.protocol.TMessageType.CALL, 0));getItemNumbers_args args = new getItemNumbers_args();args.setItemId(itemId);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_getItemNumbers();}}}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("createSerializedInventoryItem", new createSerializedInventoryItem());processMap.put("createSerializedInventoryItemFromItemNumber", new createSerializedInventoryItemFromItemNumber());processMap.put("createInventoryItem", new createInventoryItem());processMap.put("getInventoryItem", new getInventoryItem());processMap.put("getNonSeralizedInventoryItems", new getNonSeralizedInventoryItems());processMap.put("getInventoryItems", new getInventoryItems());processMap.put("getScanForOrder", new getScanForOrder());processMap.put("getScan", new getScan());processMap.put("scanSerializedItem", new scanSerializedItem());processMap.put("scan", new scan());processMap.put("scanSerializedItemForOrder", new scanSerializedItemForOrder());processMap.put("scanForOrder", new scanForOrder());processMap.put("createItemNumberMapping", new createItemNumberMapping());processMap.put("getItemNumbers", new getItemNumbers());return processMap;}private static class createSerializedInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createSerializedInventoryItem_args> {public createSerializedInventoryItem() {super("createSerializedInventoryItem");}protected createSerializedInventoryItem_args getEmptyArgsInstance() {return new createSerializedInventoryItem_args();}protected createSerializedInventoryItem_result getResult(I iface, createSerializedInventoryItem_args args) throws org.apache.thrift.TException {createSerializedInventoryItem_result result = new createSerializedInventoryItem_result();try {result.success = iface.createSerializedInventoryItem(args.itemId, args.itemNumber, args.serialNumber, args.purchaseId);} catch (WarehouseServiceException wex) {result.wex = wex;}return result;}}private static class createSerializedInventoryItemFromItemNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createSerializedInventoryItemFromItemNumber_args> {public createSerializedInventoryItemFromItemNumber() {super("createSerializedInventoryItemFromItemNumber");}protected createSerializedInventoryItemFromItemNumber_args getEmptyArgsInstance() {return new createSerializedInventoryItemFromItemNumber_args();}protected createSerializedInventoryItemFromItemNumber_result getResult(I iface, createSerializedInventoryItemFromItemNumber_args args) throws org.apache.thrift.TException {createSerializedInventoryItemFromItemNumber_result result = new createSerializedInventoryItemFromItemNumber_result();try {result.success = iface.createSerializedInventoryItemFromItemNumber(args.itemNumber, args.serialNumber, args.purchaseId);} catch (WarehouseServiceException wex) {result.wex = wex;}return result;}}private static class createInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInventoryItem_args> {public createInventoryItem() {super("createInventoryItem");}protected createInventoryItem_args getEmptyArgsInstance() {return new createInventoryItem_args();}protected createInventoryItem_result getResult(I iface, createInventoryItem_args args) throws org.apache.thrift.TException {createInventoryItem_result result = new createInventoryItem_result();try {result.success = iface.createInventoryItem(args.itemId, args.quantity, args.purchaseId);} catch (WarehouseServiceException wex) {result.wex = wex;}return result;}}private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {public getInventoryItem() {super("getInventoryItem");}protected getInventoryItem_args getEmptyArgsInstance() {return new getInventoryItem_args();}protected getInventoryItem_result getResult(I iface, getInventoryItem_args args) throws org.apache.thrift.TException {getInventoryItem_result result = new getInventoryItem_result();try {result.success = iface.getInventoryItem(args.serialNumber);} catch (WarehouseServiceException wex) {result.wex = wex;}return result;}}private static class getNonSeralizedInventoryItems<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getNonSeralizedInventoryItems_args> {public getNonSeralizedInventoryItems() {super("getNonSeralizedInventoryItems");}protected getNonSeralizedInventoryItems_args getEmptyArgsInstance() {return new getNonSeralizedInventoryItems_args();}protected getNonSeralizedInventoryItems_result getResult(I iface, getNonSeralizedInventoryItems_args args) throws org.apache.thrift.TException {getNonSeralizedInventoryItems_result result = new getNonSeralizedInventoryItems_result();result.success = iface.getNonSeralizedInventoryItems(args.itemId, args.quantity, args.supplierId);return result;}}private static class getInventoryItems<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItems_args> {public getInventoryItems() {super("getInventoryItems");}protected getInventoryItems_args getEmptyArgsInstance() {return new getInventoryItems_args();}protected getInventoryItems_result getResult(I iface, getInventoryItems_args args) throws org.apache.thrift.TException {getInventoryItems_result result = new getInventoryItems_result();result.success = iface.getInventoryItems(args.itemId);return result;}}private static class getScanForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getScanForOrder_args> {public getScanForOrder() {super("getScanForOrder");}protected getScanForOrder_args getEmptyArgsInstance() {return new getScanForOrder_args();}protected getScanForOrder_result getResult(I iface, getScanForOrder_args args) throws org.apache.thrift.TException {getScanForOrder_result result = new getScanForOrder_result();result.success = iface.getScanForOrder(args.orderId);return result;}}private static class getScan<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getScan_args> {public getScan() {super("getScan");}protected getScan_args getEmptyArgsInstance() {return new getScan_args();}protected getScan_result getResult(I iface, getScan_args args) throws org.apache.thrift.TException {getScan_result result = new getScan_result();result.success = iface.getScan(args.inventoryItemId);return result;}}private static class scanSerializedItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanSerializedItem_args> {public scanSerializedItem() {super("scanSerializedItem");}protected scanSerializedItem_args getEmptyArgsInstance() {return new scanSerializedItem_args();}protected scanSerializedItem_result getResult(I iface, scanSerializedItem_args args) throws org.apache.thrift.TException {scanSerializedItem_result result = new scanSerializedItem_result();try {iface.scanSerializedItem(args.inventoryItemId, args.type, args.warehouseId);} catch (WarehouseServiceException wex) {result.wex = wex;}return result;}}private static class scan<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scan_args> {public scan() {super("scan");}protected scan_args getEmptyArgsInstance() {return new scan_args();}protected scan_result getResult(I iface, scan_args args) throws org.apache.thrift.TException {scan_result result = new scan_result();try {iface.scan(args.inventoryItemId, args.type, args.quantity, args.warehouseId);} catch (WarehouseServiceException wex) {result.wex = wex;}return result;}}private static class scanSerializedItemForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanSerializedItemForOrder_args> {public scanSerializedItemForOrder() {super("scanSerializedItemForOrder");}protected scanSerializedItemForOrder_args getEmptyArgsInstance() {return new scanSerializedItemForOrder_args();}protected scanSerializedItemForOrder_result getResult(I iface, scanSerializedItemForOrder_args args) throws org.apache.thrift.TException {scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();try {result.success = iface.scanSerializedItemForOrder(args.serialNumber, args.type, args.orderId, args.warehouseId);} catch (WarehouseServiceException wex) {result.wex = wex;}return result;}}private static class scanForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForOrder_args> {public scanForOrder() {super("scanForOrder");}protected scanForOrder_args getEmptyArgsInstance() {return new scanForOrder_args();}protected scanForOrder_result getResult(I iface, scanForOrder_args args) throws org.apache.thrift.TException {scanForOrder_result result = new scanForOrder_result();try {iface.scanForOrder(args.inventoryItemId, args.type, args.quantity, args.orderId, args.warehouseId);} catch (WarehouseServiceException wex) {result.wex = wex;}return result;}}private static class createItemNumberMapping<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createItemNumberMapping_args> {public createItemNumberMapping() {super("createItemNumberMapping");}protected createItemNumberMapping_args getEmptyArgsInstance() {return new createItemNumberMapping_args();}protected createItemNumberMapping_result getResult(I iface, createItemNumberMapping_args args) throws org.apache.thrift.TException {createItemNumberMapping_result result = new createItemNumberMapping_result();iface.createItemNumberMapping(args.itemNumber, args.itemId);return result;}}private static class getItemNumbers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemNumbers_args> {public getItemNumbers() {super("getItemNumbers");}protected getItemNumbers_args getEmptyArgsInstance() {return new getItemNumbers_args();}protected getItemNumbers_result getResult(I iface, getItemNumbers_args args) throws org.apache.thrift.TException {getItemNumbers_result result = new getItemNumbers_result();result.success = iface.getItemNumbers(args.itemId);return result;}}}public static class createSerializedInventoryItem_args implements org.apache.thrift.TBase<createSerializedInventoryItem_args, createSerializedInventoryItem_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItem_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 ITEM_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("itemNumber", org.apache.thrift.protocol.TType.STRING, (short)2);private static final org.apache.thrift.protocol.TField SERIAL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("serialNumber", org.apache.thrift.protocol.TType.STRING, (short)3);private static final org.apache.thrift.protocol.TField PURCHASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseId", org.apache.thrift.protocol.TType.I64, (short)4);private long itemId; // requiredprivate String itemNumber; // requiredprivate String serialNumber; // requiredprivate long purchaseId; // 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"),ITEM_NUMBER((short)2, "itemNumber"),SERIAL_NUMBER((short)3, "serialNumber"),PURCHASE_ID((short)4, "purchaseId");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_IDreturn ITEM_ID;case 2: // ITEM_NUMBERreturn ITEM_NUMBER;case 3: // SERIAL_NUMBERreturn SERIAL_NUMBER;case 4: // PURCHASE_IDreturn PURCHASE_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 assignmentsprivate static final int __ITEMID_ISSET_ID = 0;private static final int __PURCHASEID_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.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", 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(createSerializedInventoryItem_args.class, metaDataMap);}public createSerializedInventoryItem_args() {}public createSerializedInventoryItem_args(long itemId,String itemNumber,String serialNumber,long purchaseId){this();this.itemId = itemId;setItemIdIsSet(true);this.itemNumber = itemNumber;this.serialNumber = serialNumber;this.purchaseId = purchaseId;setPurchaseIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public createSerializedInventoryItem_args(createSerializedInventoryItem_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.itemId = other.itemId;if (other.isSetItemNumber()) {this.itemNumber = other.itemNumber;}if (other.isSetSerialNumber()) {this.serialNumber = other.serialNumber;}this.purchaseId = other.purchaseId;}public createSerializedInventoryItem_args deepCopy() {return new createSerializedInventoryItem_args(this);}@Overridepublic void clear() {setItemIdIsSet(false);this.itemId = 0;this.itemNumber = null;this.serialNumber = null;setPurchaseIdIsSet(false);this.purchaseId = 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 String getItemNumber() {return this.itemNumber;}public void setItemNumber(String itemNumber) {this.itemNumber = itemNumber;}public void unsetItemNumber() {this.itemNumber = null;}/** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */public boolean isSetItemNumber() {return this.itemNumber != null;}public void setItemNumberIsSet(boolean value) {if (!value) {this.itemNumber = null;}}public String getSerialNumber() {return this.serialNumber;}public void setSerialNumber(String serialNumber) {this.serialNumber = serialNumber;}public void unsetSerialNumber() {this.serialNumber = null;}/** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */public boolean isSetSerialNumber() {return this.serialNumber != null;}public void setSerialNumberIsSet(boolean value) {if (!value) {this.serialNumber = null;}}public long getPurchaseId() {return this.purchaseId;}public void setPurchaseId(long purchaseId) {this.purchaseId = purchaseId;setPurchaseIdIsSet(true);}public void unsetPurchaseId() {__isset_bit_vector.clear(__PURCHASEID_ISSET_ID);}/** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */public boolean isSetPurchaseId() {return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);}public void setPurchaseIdIsSet(boolean value) {__isset_bit_vector.set(__PURCHASEID_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 ITEM_NUMBER:if (value == null) {unsetItemNumber();} else {setItemNumber((String)value);}break;case SERIAL_NUMBER:if (value == null) {unsetSerialNumber();} else {setSerialNumber((String)value);}break;case PURCHASE_ID:if (value == null) {unsetPurchaseId();} else {setPurchaseId((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case ITEM_ID:return Long.valueOf(getItemId());case ITEM_NUMBER:return getItemNumber();case SERIAL_NUMBER:return getSerialNumber();case PURCHASE_ID:return Long.valueOf(getPurchaseId());}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 ITEM_NUMBER:return isSetItemNumber();case SERIAL_NUMBER:return isSetSerialNumber();case PURCHASE_ID:return isSetPurchaseId();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof createSerializedInventoryItem_args)return this.equals((createSerializedInventoryItem_args)that);return false;}public boolean equals(createSerializedInventoryItem_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_itemNumber = true && this.isSetItemNumber();boolean that_present_itemNumber = true && that.isSetItemNumber();if (this_present_itemNumber || that_present_itemNumber) {if (!(this_present_itemNumber && that_present_itemNumber))return false;if (!this.itemNumber.equals(that.itemNumber))return false;}boolean this_present_serialNumber = true && this.isSetSerialNumber();boolean that_present_serialNumber = true && that.isSetSerialNumber();if (this_present_serialNumber || that_present_serialNumber) {if (!(this_present_serialNumber && that_present_serialNumber))return false;if (!this.serialNumber.equals(that.serialNumber))return false;}boolean this_present_purchaseId = true;boolean that_present_purchaseId = true;if (this_present_purchaseId || that_present_purchaseId) {if (!(this_present_purchaseId && that_present_purchaseId))return false;if (this.purchaseId != that.purchaseId)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(createSerializedInventoryItem_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;createSerializedInventoryItem_args typedOther = (createSerializedInventoryItem_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(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());if (lastComparison != 0) {return lastComparison;}if (isSetItemNumber()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());if (lastComparison != 0) {return lastComparison;}if (isSetSerialNumber()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());if (lastComparison != 0) {return lastComparison;}if (isSetPurchaseId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);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_IDif (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: // ITEM_NUMBERif (field.type == org.apache.thrift.protocol.TType.STRING) {this.itemNumber = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // SERIAL_NUMBERif (field.type == org.apache.thrift.protocol.TType.STRING) {this.serialNumber = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 4: // PURCHASE_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.purchaseId = iprot.readI64();setPurchaseIdIsSet(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();if (this.itemNumber != null) {oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);oprot.writeString(this.itemNumber);oprot.writeFieldEnd();}if (this.serialNumber != null) {oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);oprot.writeString(this.serialNumber);oprot.writeFieldEnd();}oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);oprot.writeI64(this.purchaseId);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("createSerializedInventoryItem_args(");boolean first = true;sb.append("itemId:");sb.append(this.itemId);first = false;if (!first) sb.append(", ");sb.append("itemNumber:");if (this.itemNumber == null) {sb.append("null");} else {sb.append(this.itemNumber);}first = false;if (!first) sb.append(", ");sb.append("serialNumber:");if (this.serialNumber == null) {sb.append("null");} else {sb.append(this.serialNumber);}first = false;if (!first) sb.append(", ");sb.append("purchaseId:");sb.append(this.purchaseId);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 createSerializedInventoryItem_result implements org.apache.thrift.TBase<createSerializedInventoryItem_result, createSerializedInventoryItem_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItem_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 WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);private InventoryItem success; // requiredprivate WarehouseServiceException wex; // 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"),WEX((short)1, "wex");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: // SUCCESSreturn SUCCESS;case 1: // WEXreturn WEX;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 assignmentspublic 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, InventoryItem.class)));tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", 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(createSerializedInventoryItem_result.class, metaDataMap);}public createSerializedInventoryItem_result() {}public createSerializedInventoryItem_result(InventoryItem success,WarehouseServiceException wex){this();this.success = success;this.wex = wex;}/*** Performs a deep copy on <i>other</i>.*/public createSerializedInventoryItem_result(createSerializedInventoryItem_result other) {if (other.isSetSuccess()) {this.success = new InventoryItem(other.success);}if (other.isSetWex()) {this.wex = new WarehouseServiceException(other.wex);}}public createSerializedInventoryItem_result deepCopy() {return new createSerializedInventoryItem_result(this);}@Overridepublic void clear() {this.success = null;this.wex = null;}public InventoryItem getSuccess() {return this.success;}public void setSuccess(InventoryItem 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 WarehouseServiceException getWex() {return this.wex;}public void setWex(WarehouseServiceException wex) {this.wex = wex;}public void unsetWex() {this.wex = null;}/** Returns true if field wex is set (has been assigned a value) and false otherwise */public boolean isSetWex() {return this.wex != null;}public void setWexIsSet(boolean value) {if (!value) {this.wex = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((InventoryItem)value);}break;case WEX:if (value == null) {unsetWex();} else {setWex((WarehouseServiceException)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case SUCCESS:return getSuccess();case WEX:return getWex();}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 WEX:return isSetWex();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof createSerializedInventoryItem_result)return this.equals((createSerializedInventoryItem_result)that);return false;}public boolean equals(createSerializedInventoryItem_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_wex = true && this.isSetWex();boolean that_present_wex = true && that.isSetWex();if (this_present_wex || that_present_wex) {if (!(this_present_wex && that_present_wex))return false;if (!this.wex.equals(that.wex))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(createSerializedInventoryItem_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;createSerializedInventoryItem_result typedOther = (createSerializedInventoryItem_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(isSetWex()).compareTo(typedOther.isSetWex());if (lastComparison != 0) {return lastComparison;}if (isSetWex()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);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: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.success = new InventoryItem();this.success.read(iprot);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 1: // WEXif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.wex = new WarehouseServiceException();this.wex.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.isSetWex()) {oprot.writeFieldBegin(WEX_FIELD_DESC);this.wex.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("createSerializedInventoryItem_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("wex:");if (this.wex == null) {sb.append("null");} else {sb.append(this.wex);}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 createSerializedInventoryItemFromItemNumber_args implements org.apache.thrift.TBase<createSerializedInventoryItemFromItemNumber_args, createSerializedInventoryItemFromItemNumber_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItemFromItemNumber_args");private static final org.apache.thrift.protocol.TField ITEM_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("itemNumber", org.apache.thrift.protocol.TType.STRING, (short)1);private static final org.apache.thrift.protocol.TField SERIAL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("serialNumber", org.apache.thrift.protocol.TType.STRING, (short)2);private static final org.apache.thrift.protocol.TField PURCHASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseId", org.apache.thrift.protocol.TType.I64, (short)3);private String itemNumber; // requiredprivate String serialNumber; // requiredprivate long purchaseId; // 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_NUMBER((short)1, "itemNumber"),SERIAL_NUMBER((short)2, "serialNumber"),PURCHASE_ID((short)3, "purchaseId");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_NUMBERreturn ITEM_NUMBER;case 2: // SERIAL_NUMBERreturn SERIAL_NUMBER;case 3: // PURCHASE_IDreturn PURCHASE_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 assignmentsprivate static final int __PURCHASEID_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_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", 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(createSerializedInventoryItemFromItemNumber_args.class, metaDataMap);}public createSerializedInventoryItemFromItemNumber_args() {}public createSerializedInventoryItemFromItemNumber_args(String itemNumber,String serialNumber,long purchaseId){this();this.itemNumber = itemNumber;this.serialNumber = serialNumber;this.purchaseId = purchaseId;setPurchaseIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public createSerializedInventoryItemFromItemNumber_args(createSerializedInventoryItemFromItemNumber_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);if (other.isSetItemNumber()) {this.itemNumber = other.itemNumber;}if (other.isSetSerialNumber()) {this.serialNumber = other.serialNumber;}this.purchaseId = other.purchaseId;}public createSerializedInventoryItemFromItemNumber_args deepCopy() {return new createSerializedInventoryItemFromItemNumber_args(this);}@Overridepublic void clear() {this.itemNumber = null;this.serialNumber = null;setPurchaseIdIsSet(false);this.purchaseId = 0;}public String getItemNumber() {return this.itemNumber;}public void setItemNumber(String itemNumber) {this.itemNumber = itemNumber;}public void unsetItemNumber() {this.itemNumber = null;}/** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */public boolean isSetItemNumber() {return this.itemNumber != null;}public void setItemNumberIsSet(boolean value) {if (!value) {this.itemNumber = null;}}public String getSerialNumber() {return this.serialNumber;}public void setSerialNumber(String serialNumber) {this.serialNumber = serialNumber;}public void unsetSerialNumber() {this.serialNumber = null;}/** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */public boolean isSetSerialNumber() {return this.serialNumber != null;}public void setSerialNumberIsSet(boolean value) {if (!value) {this.serialNumber = null;}}public long getPurchaseId() {return this.purchaseId;}public void setPurchaseId(long purchaseId) {this.purchaseId = purchaseId;setPurchaseIdIsSet(true);}public void unsetPurchaseId() {__isset_bit_vector.clear(__PURCHASEID_ISSET_ID);}/** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */public boolean isSetPurchaseId() {return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);}public void setPurchaseIdIsSet(boolean value) {__isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case ITEM_NUMBER:if (value == null) {unsetItemNumber();} else {setItemNumber((String)value);}break;case SERIAL_NUMBER:if (value == null) {unsetSerialNumber();} else {setSerialNumber((String)value);}break;case PURCHASE_ID:if (value == null) {unsetPurchaseId();} else {setPurchaseId((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case ITEM_NUMBER:return getItemNumber();case SERIAL_NUMBER:return getSerialNumber();case PURCHASE_ID:return Long.valueOf(getPurchaseId());}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_NUMBER:return isSetItemNumber();case SERIAL_NUMBER:return isSetSerialNumber();case PURCHASE_ID:return isSetPurchaseId();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof createSerializedInventoryItemFromItemNumber_args)return this.equals((createSerializedInventoryItemFromItemNumber_args)that);return false;}public boolean equals(createSerializedInventoryItemFromItemNumber_args that) {if (that == null)return false;boolean this_present_itemNumber = true && this.isSetItemNumber();boolean that_present_itemNumber = true && that.isSetItemNumber();if (this_present_itemNumber || that_present_itemNumber) {if (!(this_present_itemNumber && that_present_itemNumber))return false;if (!this.itemNumber.equals(that.itemNumber))return false;}boolean this_present_serialNumber = true && this.isSetSerialNumber();boolean that_present_serialNumber = true && that.isSetSerialNumber();if (this_present_serialNumber || that_present_serialNumber) {if (!(this_present_serialNumber && that_present_serialNumber))return false;if (!this.serialNumber.equals(that.serialNumber))return false;}boolean this_present_purchaseId = true;boolean that_present_purchaseId = true;if (this_present_purchaseId || that_present_purchaseId) {if (!(this_present_purchaseId && that_present_purchaseId))return false;if (this.purchaseId != that.purchaseId)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(createSerializedInventoryItemFromItemNumber_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;createSerializedInventoryItemFromItemNumber_args typedOther = (createSerializedInventoryItemFromItemNumber_args)other;lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());if (lastComparison != 0) {return lastComparison;}if (isSetItemNumber()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());if (lastComparison != 0) {return lastComparison;}if (isSetSerialNumber()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());if (lastComparison != 0) {return lastComparison;}if (isSetPurchaseId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);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_NUMBERif (field.type == org.apache.thrift.protocol.TType.STRING) {this.itemNumber = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // SERIAL_NUMBERif (field.type == org.apache.thrift.protocol.TType.STRING) {this.serialNumber = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // PURCHASE_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.purchaseId = iprot.readI64();setPurchaseIdIsSet(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.itemNumber != null) {oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);oprot.writeString(this.itemNumber);oprot.writeFieldEnd();}if (this.serialNumber != null) {oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);oprot.writeString(this.serialNumber);oprot.writeFieldEnd();}oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);oprot.writeI64(this.purchaseId);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("createSerializedInventoryItemFromItemNumber_args(");boolean first = true;sb.append("itemNumber:");if (this.itemNumber == null) {sb.append("null");} else {sb.append(this.itemNumber);}first = false;if (!first) sb.append(", ");sb.append("serialNumber:");if (this.serialNumber == null) {sb.append("null");} else {sb.append(this.serialNumber);}first = false;if (!first) sb.append(", ");sb.append("purchaseId:");sb.append(this.purchaseId);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 createSerializedInventoryItemFromItemNumber_result implements org.apache.thrift.TBase<createSerializedInventoryItemFromItemNumber_result, createSerializedInventoryItemFromItemNumber_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItemFromItemNumber_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 WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);private InventoryItem success; // requiredprivate WarehouseServiceException wex; // 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"),WEX((short)1, "wex");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: // SUCCESSreturn SUCCESS;case 1: // WEXreturn WEX;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 assignmentspublic 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, InventoryItem.class)));tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", 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(createSerializedInventoryItemFromItemNumber_result.class, metaDataMap);}public createSerializedInventoryItemFromItemNumber_result() {}public createSerializedInventoryItemFromItemNumber_result(InventoryItem success,WarehouseServiceException wex){this();this.success = success;this.wex = wex;}/*** Performs a deep copy on <i>other</i>.*/public createSerializedInventoryItemFromItemNumber_result(createSerializedInventoryItemFromItemNumber_result other) {if (other.isSetSuccess()) {this.success = new InventoryItem(other.success);}if (other.isSetWex()) {this.wex = new WarehouseServiceException(other.wex);}}public createSerializedInventoryItemFromItemNumber_result deepCopy() {return new createSerializedInventoryItemFromItemNumber_result(this);}@Overridepublic void clear() {this.success = null;this.wex = null;}public InventoryItem getSuccess() {return this.success;}public void setSuccess(InventoryItem 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 WarehouseServiceException getWex() {return this.wex;}public void setWex(WarehouseServiceException wex) {this.wex = wex;}public void unsetWex() {this.wex = null;}/** Returns true if field wex is set (has been assigned a value) and false otherwise */public boolean isSetWex() {return this.wex != null;}public void setWexIsSet(boolean value) {if (!value) {this.wex = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((InventoryItem)value);}break;case WEX:if (value == null) {unsetWex();} else {setWex((WarehouseServiceException)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case SUCCESS:return getSuccess();case WEX:return getWex();}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 WEX:return isSetWex();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof createSerializedInventoryItemFromItemNumber_result)return this.equals((createSerializedInventoryItemFromItemNumber_result)that);return false;}public boolean equals(createSerializedInventoryItemFromItemNumber_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_wex = true && this.isSetWex();boolean that_present_wex = true && that.isSetWex();if (this_present_wex || that_present_wex) {if (!(this_present_wex && that_present_wex))return false;if (!this.wex.equals(that.wex))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(createSerializedInventoryItemFromItemNumber_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;createSerializedInventoryItemFromItemNumber_result typedOther = (createSerializedInventoryItemFromItemNumber_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(isSetWex()).compareTo(typedOther.isSetWex());if (lastComparison != 0) {return lastComparison;}if (isSetWex()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);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: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.success = new InventoryItem();this.success.read(iprot);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 1: // WEXif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.wex = new WarehouseServiceException();this.wex.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.isSetWex()) {oprot.writeFieldBegin(WEX_FIELD_DESC);this.wex.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("createSerializedInventoryItemFromItemNumber_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("wex:");if (this.wex == null) {sb.append("null");} else {sb.append(this.wex);}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 createInventoryItem_args implements org.apache.thrift.TBase<createInventoryItem_args, createInventoryItem_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInventoryItem_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 QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.I64, (short)2);private static final org.apache.thrift.protocol.TField PURCHASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseId", org.apache.thrift.protocol.TType.I64, (short)3);private long itemId; // requiredprivate long quantity; // requiredprivate long purchaseId; // 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"),QUANTITY((short)2, "quantity"),PURCHASE_ID((short)3, "purchaseId");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_IDreturn ITEM_ID;case 2: // QUANTITYreturn QUANTITY;case 3: // PURCHASE_IDreturn PURCHASE_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 assignmentsprivate static final int __ITEMID_ISSET_ID = 0;private static final int __QUANTITY_ISSET_ID = 1;private static final int __PURCHASEID_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.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.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", 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(createInventoryItem_args.class, metaDataMap);}public createInventoryItem_args() {}public createInventoryItem_args(long itemId,long quantity,long purchaseId){this();this.itemId = itemId;setItemIdIsSet(true);this.quantity = quantity;setQuantityIsSet(true);this.purchaseId = purchaseId;setPurchaseIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public createInventoryItem_args(createInventoryItem_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.itemId = other.itemId;this.quantity = other.quantity;this.purchaseId = other.purchaseId;}public createInventoryItem_args deepCopy() {return new createInventoryItem_args(this);}@Overridepublic void clear() {setItemIdIsSet(false);this.itemId = 0;setQuantityIsSet(false);this.quantity = 0;setPurchaseIdIsSet(false);this.purchaseId = 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 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 getPurchaseId() {return this.purchaseId;}public void setPurchaseId(long purchaseId) {this.purchaseId = purchaseId;setPurchaseIdIsSet(true);}public void unsetPurchaseId() {__isset_bit_vector.clear(__PURCHASEID_ISSET_ID);}/** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */public boolean isSetPurchaseId() {return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);}public void setPurchaseIdIsSet(boolean value) {__isset_bit_vector.set(__PURCHASEID_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 QUANTITY:if (value == null) {unsetQuantity();} else {setQuantity((Long)value);}break;case PURCHASE_ID:if (value == null) {unsetPurchaseId();} else {setPurchaseId((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case ITEM_ID:return Long.valueOf(getItemId());case QUANTITY:return Long.valueOf(getQuantity());case PURCHASE_ID:return Long.valueOf(getPurchaseId());}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 QUANTITY:return isSetQuantity();case PURCHASE_ID:return isSetPurchaseId();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof createInventoryItem_args)return this.equals((createInventoryItem_args)that);return false;}public boolean equals(createInventoryItem_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_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_purchaseId = true;boolean that_present_purchaseId = true;if (this_present_purchaseId || that_present_purchaseId) {if (!(this_present_purchaseId && that_present_purchaseId))return false;if (this.purchaseId != that.purchaseId)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(createInventoryItem_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;createInventoryItem_args typedOther = (createInventoryItem_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(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(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());if (lastComparison != 0) {return lastComparison;}if (isSetPurchaseId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);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_IDif (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: // QUANTITYif (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 3: // PURCHASE_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.purchaseId = iprot.readI64();setPurchaseIdIsSet(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(QUANTITY_FIELD_DESC);oprot.writeI64(this.quantity);oprot.writeFieldEnd();oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);oprot.writeI64(this.purchaseId);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("createInventoryItem_args(");boolean first = true;sb.append("itemId:");sb.append(this.itemId);first = false;if (!first) sb.append(", ");sb.append("quantity:");sb.append(this.quantity);first = false;if (!first) sb.append(", ");sb.append("purchaseId:");sb.append(this.purchaseId);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 createInventoryItem_result implements org.apache.thrift.TBase<createInventoryItem_result, createInventoryItem_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInventoryItem_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 WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);private InventoryItem success; // requiredprivate WarehouseServiceException wex; // 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"),WEX((short)1, "wex");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: // SUCCESSreturn SUCCESS;case 1: // WEXreturn WEX;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 assignmentspublic 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, InventoryItem.class)));tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", 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(createInventoryItem_result.class, metaDataMap);}public createInventoryItem_result() {}public createInventoryItem_result(InventoryItem success,WarehouseServiceException wex){this();this.success = success;this.wex = wex;}/*** Performs a deep copy on <i>other</i>.*/public createInventoryItem_result(createInventoryItem_result other) {if (other.isSetSuccess()) {this.success = new InventoryItem(other.success);}if (other.isSetWex()) {this.wex = new WarehouseServiceException(other.wex);}}public createInventoryItem_result deepCopy() {return new createInventoryItem_result(this);}@Overridepublic void clear() {this.success = null;this.wex = null;}public InventoryItem getSuccess() {return this.success;}public void setSuccess(InventoryItem 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 WarehouseServiceException getWex() {return this.wex;}public void setWex(WarehouseServiceException wex) {this.wex = wex;}public void unsetWex() {this.wex = null;}/** Returns true if field wex is set (has been assigned a value) and false otherwise */public boolean isSetWex() {return this.wex != null;}public void setWexIsSet(boolean value) {if (!value) {this.wex = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((InventoryItem)value);}break;case WEX:if (value == null) {unsetWex();} else {setWex((WarehouseServiceException)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case SUCCESS:return getSuccess();case WEX:return getWex();}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 WEX:return isSetWex();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof createInventoryItem_result)return this.equals((createInventoryItem_result)that);return false;}public boolean equals(createInventoryItem_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_wex = true && this.isSetWex();boolean that_present_wex = true && that.isSetWex();if (this_present_wex || that_present_wex) {if (!(this_present_wex && that_present_wex))return false;if (!this.wex.equals(that.wex))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(createInventoryItem_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;createInventoryItem_result typedOther = (createInventoryItem_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(isSetWex()).compareTo(typedOther.isSetWex());if (lastComparison != 0) {return lastComparison;}if (isSetWex()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);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: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.success = new InventoryItem();this.success.read(iprot);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 1: // WEXif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.wex = new WarehouseServiceException();this.wex.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.isSetWex()) {oprot.writeFieldBegin(WEX_FIELD_DESC);this.wex.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("createInventoryItem_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("wex:");if (this.wex == null) {sb.append("null");} else {sb.append(this.wex);}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 getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");private static final org.apache.thrift.protocol.TField SERIAL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("serialNumber", org.apache.thrift.protocol.TType.STRING, (short)1);private String serialNumber; // 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 {SERIAL_NUMBER((short)1, "serialNumber");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: // SERIAL_NUMBERreturn SERIAL_NUMBER;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 assignmentspublic 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.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", 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(getInventoryItem_args.class, metaDataMap);}public getInventoryItem_args() {}public getInventoryItem_args(String serialNumber){this();this.serialNumber = serialNumber;}/*** Performs a deep copy on <i>other</i>.*/public getInventoryItem_args(getInventoryItem_args other) {if (other.isSetSerialNumber()) {this.serialNumber = other.serialNumber;}}public getInventoryItem_args deepCopy() {return new getInventoryItem_args(this);}@Overridepublic void clear() {this.serialNumber = null;}public String getSerialNumber() {return this.serialNumber;}public void setSerialNumber(String serialNumber) {this.serialNumber = serialNumber;}public void unsetSerialNumber() {this.serialNumber = null;}/** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */public boolean isSetSerialNumber() {return this.serialNumber != null;}public void setSerialNumberIsSet(boolean value) {if (!value) {this.serialNumber = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SERIAL_NUMBER:if (value == null) {unsetSerialNumber();} else {setSerialNumber((String)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case SERIAL_NUMBER:return getSerialNumber();}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 SERIAL_NUMBER:return isSetSerialNumber();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getInventoryItem_args)return this.equals((getInventoryItem_args)that);return false;}public boolean equals(getInventoryItem_args that) {if (that == null)return false;boolean this_present_serialNumber = true && this.isSetSerialNumber();boolean that_present_serialNumber = true && that.isSetSerialNumber();if (this_present_serialNumber || that_present_serialNumber) {if (!(this_present_serialNumber && that_present_serialNumber))return false;if (!this.serialNumber.equals(that.serialNumber))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getInventoryItem_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getInventoryItem_args typedOther = (getInventoryItem_args)other;lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());if (lastComparison != 0) {return lastComparison;}if (isSetSerialNumber()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);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: // SERIAL_NUMBERif (field.type == org.apache.thrift.protocol.TType.STRING) {this.serialNumber = 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.serialNumber != null) {oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);oprot.writeString(this.serialNumber);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getInventoryItem_args(");boolean first = true;sb.append("serialNumber:");if (this.serialNumber == null) {sb.append("null");} else {sb.append(this.serialNumber);}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 getInventoryItem_result implements org.apache.thrift.TBase<getInventoryItem_result, getInventoryItem_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_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 WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);private InventoryItem success; // requiredprivate WarehouseServiceException wex; // 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"),WEX((short)1, "wex");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: // SUCCESSreturn SUCCESS;case 1: // WEXreturn WEX;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 assignmentspublic 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, InventoryItem.class)));tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", 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(getInventoryItem_result.class, metaDataMap);}public getInventoryItem_result() {}public getInventoryItem_result(InventoryItem success,WarehouseServiceException wex){this();this.success = success;this.wex = wex;}/*** Performs a deep copy on <i>other</i>.*/public getInventoryItem_result(getInventoryItem_result other) {if (other.isSetSuccess()) {this.success = new InventoryItem(other.success);}if (other.isSetWex()) {this.wex = new WarehouseServiceException(other.wex);}}public getInventoryItem_result deepCopy() {return new getInventoryItem_result(this);}@Overridepublic void clear() {this.success = null;this.wex = null;}public InventoryItem getSuccess() {return this.success;}public void setSuccess(InventoryItem 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 WarehouseServiceException getWex() {return this.wex;}public void setWex(WarehouseServiceException wex) {this.wex = wex;}public void unsetWex() {this.wex = null;}/** Returns true if field wex is set (has been assigned a value) and false otherwise */public boolean isSetWex() {return this.wex != null;}public void setWexIsSet(boolean value) {if (!value) {this.wex = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((InventoryItem)value);}break;case WEX:if (value == null) {unsetWex();} else {setWex((WarehouseServiceException)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case SUCCESS:return getSuccess();case WEX:return getWex();}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 WEX:return isSetWex();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getInventoryItem_result)return this.equals((getInventoryItem_result)that);return false;}public boolean equals(getInventoryItem_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_wex = true && this.isSetWex();boolean that_present_wex = true && that.isSetWex();if (this_present_wex || that_present_wex) {if (!(this_present_wex && that_present_wex))return false;if (!this.wex.equals(that.wex))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getInventoryItem_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getInventoryItem_result typedOther = (getInventoryItem_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(isSetWex()).compareTo(typedOther.isSetWex());if (lastComparison != 0) {return lastComparison;}if (isSetWex()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);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: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.success = new InventoryItem();this.success.read(iprot);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 1: // WEXif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.wex = new WarehouseServiceException();this.wex.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.isSetWex()) {oprot.writeFieldBegin(WEX_FIELD_DESC);this.wex.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getInventoryItem_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("wex:");if (this.wex == null) {sb.append("null");} else {sb.append(this.wex);}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 getNonSeralizedInventoryItems_args implements org.apache.thrift.TBase<getNonSeralizedInventoryItems_args, getNonSeralizedInventoryItems_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItems_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 QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.I64, (short)2);private static final org.apache.thrift.protocol.TField SUPPLIER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("supplierId", org.apache.thrift.protocol.TType.I64, (short)3);private long itemId; // requiredprivate long quantity; // requiredprivate long supplierId; // 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"),QUANTITY((short)2, "quantity"),SUPPLIER_ID((short)3, "supplierId");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_IDreturn ITEM_ID;case 2: // QUANTITYreturn QUANTITY;case 3: // SUPPLIER_IDreturn SUPPLIER_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 assignmentsprivate static final int __ITEMID_ISSET_ID = 0;private static final int __QUANTITY_ISSET_ID = 1;private static final int __SUPPLIERID_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.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.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", 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(getNonSeralizedInventoryItems_args.class, metaDataMap);}public getNonSeralizedInventoryItems_args() {}public getNonSeralizedInventoryItems_args(long itemId,long quantity,long supplierId){this();this.itemId = itemId;setItemIdIsSet(true);this.quantity = quantity;setQuantityIsSet(true);this.supplierId = supplierId;setSupplierIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public getNonSeralizedInventoryItems_args(getNonSeralizedInventoryItems_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.itemId = other.itemId;this.quantity = other.quantity;this.supplierId = other.supplierId;}public getNonSeralizedInventoryItems_args deepCopy() {return new getNonSeralizedInventoryItems_args(this);}@Overridepublic void clear() {setItemIdIsSet(false);this.itemId = 0;setQuantityIsSet(false);this.quantity = 0;setSupplierIdIsSet(false);this.supplierId = 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 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 getSupplierId() {return this.supplierId;}public void setSupplierId(long supplierId) {this.supplierId = supplierId;setSupplierIdIsSet(true);}public void unsetSupplierId() {__isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);}/** Returns true if field supplierId is set (has been assigned a value) and false otherwise */public boolean isSetSupplierId() {return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);}public void setSupplierIdIsSet(boolean value) {__isset_bit_vector.set(__SUPPLIERID_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 QUANTITY:if (value == null) {unsetQuantity();} else {setQuantity((Long)value);}break;case SUPPLIER_ID:if (value == null) {unsetSupplierId();} else {setSupplierId((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case ITEM_ID:return Long.valueOf(getItemId());case QUANTITY:return Long.valueOf(getQuantity());case SUPPLIER_ID:return Long.valueOf(getSupplierId());}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 QUANTITY:return isSetQuantity();case SUPPLIER_ID:return isSetSupplierId();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getNonSeralizedInventoryItems_args)return this.equals((getNonSeralizedInventoryItems_args)that);return false;}public boolean equals(getNonSeralizedInventoryItems_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_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_supplierId = true;boolean that_present_supplierId = true;if (this_present_supplierId || that_present_supplierId) {if (!(this_present_supplierId && that_present_supplierId))return false;if (this.supplierId != that.supplierId)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getNonSeralizedInventoryItems_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getNonSeralizedInventoryItems_args typedOther = (getNonSeralizedInventoryItems_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(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(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());if (lastComparison != 0) {return lastComparison;}if (isSetSupplierId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);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_IDif (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: // QUANTITYif (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 3: // SUPPLIER_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.supplierId = iprot.readI64();setSupplierIdIsSet(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(QUANTITY_FIELD_DESC);oprot.writeI64(this.quantity);oprot.writeFieldEnd();oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);oprot.writeI64(this.supplierId);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItems_args(");boolean first = true;sb.append("itemId:");sb.append(this.itemId);first = false;if (!first) sb.append(", ");sb.append("quantity:");sb.append(this.quantity);first = false;if (!first) sb.append(", ");sb.append("supplierId:");sb.append(this.supplierId);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 getNonSeralizedInventoryItems_result implements org.apache.thrift.TBase<getNonSeralizedInventoryItems_result, getNonSeralizedInventoryItems_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItems_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<InventoryItem> 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: // SUCCESSreturn 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 assignmentspublic 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, InventoryItem.class))));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItems_result.class, metaDataMap);}public getNonSeralizedInventoryItems_result() {}public getNonSeralizedInventoryItems_result(List<InventoryItem> success){this();this.success = success;}/*** Performs a deep copy on <i>other</i>.*/public getNonSeralizedInventoryItems_result(getNonSeralizedInventoryItems_result other) {if (other.isSetSuccess()) {List<InventoryItem> __this__success = new ArrayList<InventoryItem>();for (InventoryItem other_element : other.success) {__this__success.add(new InventoryItem(other_element));}this.success = __this__success;}}public getNonSeralizedInventoryItems_result deepCopy() {return new getNonSeralizedInventoryItems_result(this);}@Overridepublic void clear() {this.success = null;}public int getSuccessSize() {return (this.success == null) ? 0 : this.success.size();}public java.util.Iterator<InventoryItem> getSuccessIterator() {return (this.success == null) ? null : this.success.iterator();}public void addToSuccess(InventoryItem elem) {if (this.success == null) {this.success = new ArrayList<InventoryItem>();}this.success.add(elem);}public List<InventoryItem> getSuccess() {return this.success;}public void setSuccess(List<InventoryItem> 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<InventoryItem>)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();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getNonSeralizedInventoryItems_result)return this.equals((getNonSeralizedInventoryItems_result)that);return false;}public boolean equals(getNonSeralizedInventoryItems_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;}@Overridepublic int hashCode() {return 0;}public int compareTo(getNonSeralizedInventoryItems_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getNonSeralizedInventoryItems_result typedOther = (getNonSeralizedInventoryItems_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: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.LIST) {{org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();this.success = new ArrayList<InventoryItem>(_list0.size);for (int _i1 = 0; _i1 < _list0.size; ++_i1){InventoryItem _elem2; // required_elem2 = new InventoryItem();_elem2.read(iprot);this.success.add(_elem2);}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 (InventoryItem _iter3 : this.success){_iter3.write(oprot);}oprot.writeListEnd();}oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItems_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 getInventoryItems_args implements org.apache.thrift.TBase<getInventoryItems_args, getInventoryItems_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItems_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_IDreturn 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 assignmentsprivate 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(getInventoryItems_args.class, metaDataMap);}public getInventoryItems_args() {}public getInventoryItems_args(long itemId){this();this.itemId = itemId;setItemIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public getInventoryItems_args(getInventoryItems_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.itemId = other.itemId;}public getInventoryItems_args deepCopy() {return new getInventoryItems_args(this);}@Overridepublic 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();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getInventoryItems_args)return this.equals((getInventoryItems_args)that);return false;}public boolean equals(getInventoryItems_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;}@Overridepublic int hashCode() {return 0;}public int compareTo(getInventoryItems_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getInventoryItems_args typedOther = (getInventoryItems_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_IDif (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();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getInventoryItems_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 getInventoryItems_result implements org.apache.thrift.TBase<getInventoryItems_result, getInventoryItems_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItems_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<InventoryItem> 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: // SUCCESSreturn 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 assignmentspublic 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, InventoryItem.class))));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItems_result.class, metaDataMap);}public getInventoryItems_result() {}public getInventoryItems_result(List<InventoryItem> success){this();this.success = success;}/*** Performs a deep copy on <i>other</i>.*/public getInventoryItems_result(getInventoryItems_result other) {if (other.isSetSuccess()) {List<InventoryItem> __this__success = new ArrayList<InventoryItem>();for (InventoryItem other_element : other.success) {__this__success.add(new InventoryItem(other_element));}this.success = __this__success;}}public getInventoryItems_result deepCopy() {return new getInventoryItems_result(this);}@Overridepublic void clear() {this.success = null;}public int getSuccessSize() {return (this.success == null) ? 0 : this.success.size();}public java.util.Iterator<InventoryItem> getSuccessIterator() {return (this.success == null) ? null : this.success.iterator();}public void addToSuccess(InventoryItem elem) {if (this.success == null) {this.success = new ArrayList<InventoryItem>();}this.success.add(elem);}public List<InventoryItem> getSuccess() {return this.success;}public void setSuccess(List<InventoryItem> 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<InventoryItem>)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();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getInventoryItems_result)return this.equals((getInventoryItems_result)that);return false;}public boolean equals(getInventoryItems_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;}@Overridepublic int hashCode() {return 0;}public int compareTo(getInventoryItems_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getInventoryItems_result typedOther = (getInventoryItems_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: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.LIST) {{org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();this.success = new ArrayList<InventoryItem>(_list4.size);for (int _i5 = 0; _i5 < _list4.size; ++_i5){InventoryItem _elem6; // required_elem6 = new InventoryItem();_elem6.read(iprot);this.success.add(_elem6);}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 (InventoryItem _iter7 : this.success){_iter7.write(oprot);}oprot.writeListEnd();}oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getInventoryItems_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 getScanForOrder_args implements org.apache.thrift.TBase<getScanForOrder_args, getScanForOrder_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScanForOrder_args");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)1);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 {ORDER_ID((short)1, "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: // ORDER_IDreturn 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 assignmentsprivate static final int __ORDERID_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.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(getScanForOrder_args.class, metaDataMap);}public getScanForOrder_args() {}public getScanForOrder_args(long orderId){this();this.orderId = orderId;setOrderIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public getScanForOrder_args(getScanForOrder_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.orderId = other.orderId;}public getScanForOrder_args deepCopy() {return new getScanForOrder_args(this);}@Overridepublic void clear() {setOrderIdIsSet(false);this.orderId = 0;}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 ORDER_ID:if (value == null) {unsetOrderId();} else {setOrderId((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {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 ORDER_ID:return isSetOrderId();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getScanForOrder_args)return this.equals((getScanForOrder_args)that);return false;}public boolean equals(getScanForOrder_args that) {if (that == null)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;}@Overridepublic int hashCode() {return 0;}public int compareTo(getScanForOrder_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getScanForOrder_args typedOther = (getScanForOrder_args)other;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: // ORDER_IDif (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(ORDER_ID_FIELD_DESC);oprot.writeI64(this.orderId);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getScanForOrder_args(");boolean first = true;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 {// 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 getScanForOrder_result implements org.apache.thrift.TBase<getScanForOrder_result, getScanForOrder_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScanForOrder_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<Scan> 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: // SUCCESSreturn 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 assignmentspublic 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, Scan.class))));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScanForOrder_result.class, metaDataMap);}public getScanForOrder_result() {}public getScanForOrder_result(List<Scan> success){this();this.success = success;}/*** Performs a deep copy on <i>other</i>.*/public getScanForOrder_result(getScanForOrder_result other) {if (other.isSetSuccess()) {List<Scan> __this__success = new ArrayList<Scan>();for (Scan other_element : other.success) {__this__success.add(new Scan(other_element));}this.success = __this__success;}}public getScanForOrder_result deepCopy() {return new getScanForOrder_result(this);}@Overridepublic void clear() {this.success = null;}public int getSuccessSize() {return (this.success == null) ? 0 : this.success.size();}public java.util.Iterator<Scan> getSuccessIterator() {return (this.success == null) ? null : this.success.iterator();}public void addToSuccess(Scan elem) {if (this.success == null) {this.success = new ArrayList<Scan>();}this.success.add(elem);}public List<Scan> getSuccess() {return this.success;}public void setSuccess(List<Scan> 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<Scan>)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();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getScanForOrder_result)return this.equals((getScanForOrder_result)that);return false;}public boolean equals(getScanForOrder_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;}@Overridepublic int hashCode() {return 0;}public int compareTo(getScanForOrder_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getScanForOrder_result typedOther = (getScanForOrder_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: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.LIST) {{org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();this.success = new ArrayList<Scan>(_list8.size);for (int _i9 = 0; _i9 < _list8.size; ++_i9){Scan _elem10; // required_elem10 = new Scan();_elem10.read(iprot);this.success.add(_elem10);}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 (Scan _iter11 : this.success){_iter11.write(oprot);}oprot.writeListEnd();}oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getScanForOrder_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 getScan_args implements org.apache.thrift.TBase<getScan_args, getScan_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScan_args");private static final org.apache.thrift.protocol.TField INVENTORY_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("inventoryItemId", org.apache.thrift.protocol.TType.I64, (short)1);private long inventoryItemId; // 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 {INVENTORY_ITEM_ID((short)1, "inventoryItemId");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: // INVENTORY_ITEM_IDreturn INVENTORY_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 assignmentsprivate static final int __INVENTORYITEMID_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.INVENTORY_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("inventoryItemId", 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(getScan_args.class, metaDataMap);}public getScan_args() {}public getScan_args(long inventoryItemId){this();this.inventoryItemId = inventoryItemId;setInventoryItemIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public getScan_args(getScan_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.inventoryItemId = other.inventoryItemId;}public getScan_args deepCopy() {return new getScan_args(this);}@Overridepublic void clear() {setInventoryItemIdIsSet(false);this.inventoryItemId = 0;}public long getInventoryItemId() {return this.inventoryItemId;}public void setInventoryItemId(long inventoryItemId) {this.inventoryItemId = inventoryItemId;setInventoryItemIdIsSet(true);}public void unsetInventoryItemId() {__isset_bit_vector.clear(__INVENTORYITEMID_ISSET_ID);}/** Returns true if field inventoryItemId is set (has been assigned a value) and false otherwise */public boolean isSetInventoryItemId() {return __isset_bit_vector.get(__INVENTORYITEMID_ISSET_ID);}public void setInventoryItemIdIsSet(boolean value) {__isset_bit_vector.set(__INVENTORYITEMID_ISSET_ID, value);}public void setFieldValue(_Fields field, Object value) {switch (field) {case INVENTORY_ITEM_ID:if (value == null) {unsetInventoryItemId();} else {setInventoryItemId((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case INVENTORY_ITEM_ID:return Long.valueOf(getInventoryItemId());}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 INVENTORY_ITEM_ID:return isSetInventoryItemId();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getScan_args)return this.equals((getScan_args)that);return false;}public boolean equals(getScan_args that) {if (that == null)return false;boolean this_present_inventoryItemId = true;boolean that_present_inventoryItemId = true;if (this_present_inventoryItemId || that_present_inventoryItemId) {if (!(this_present_inventoryItemId && that_present_inventoryItemId))return false;if (this.inventoryItemId != that.inventoryItemId)return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(getScan_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getScan_args typedOther = (getScan_args)other;lastComparison = Boolean.valueOf(isSetInventoryItemId()).compareTo(typedOther.isSetInventoryItemId());if (lastComparison != 0) {return lastComparison;}if (isSetInventoryItemId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItemId, typedOther.inventoryItemId);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: // INVENTORY_ITEM_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.inventoryItemId = iprot.readI64();setInventoryItemIdIsSet(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(INVENTORY_ITEM_ID_FIELD_DESC);oprot.writeI64(this.inventoryItemId);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getScan_args(");boolean first = true;sb.append("inventoryItemId:");sb.append(this.inventoryItemId);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 getScan_result implements org.apache.thrift.TBase<getScan_result, getScan_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScan_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<Scan> 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: // SUCCESSreturn 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 assignmentspublic 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, Scan.class))));metaDataMap = Collections.unmodifiableMap(tmpMap);org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScan_result.class, metaDataMap);}public getScan_result() {}public getScan_result(List<Scan> success){this();this.success = success;}/*** Performs a deep copy on <i>other</i>.*/public getScan_result(getScan_result other) {if (other.isSetSuccess()) {List<Scan> __this__success = new ArrayList<Scan>();for (Scan other_element : other.success) {__this__success.add(new Scan(other_element));}this.success = __this__success;}}public getScan_result deepCopy() {return new getScan_result(this);}@Overridepublic void clear() {this.success = null;}public int getSuccessSize() {return (this.success == null) ? 0 : this.success.size();}public java.util.Iterator<Scan> getSuccessIterator() {return (this.success == null) ? null : this.success.iterator();}public void addToSuccess(Scan elem) {if (this.success == null) {this.success = new ArrayList<Scan>();}this.success.add(elem);}public List<Scan> getSuccess() {return this.success;}public void setSuccess(List<Scan> 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<Scan>)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();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getScan_result)return this.equals((getScan_result)that);return false;}public boolean equals(getScan_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;}@Overridepublic int hashCode() {return 0;}public int compareTo(getScan_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getScan_result typedOther = (getScan_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: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.LIST) {{org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();this.success = new ArrayList<Scan>(_list12.size);for (int _i13 = 0; _i13 < _list12.size; ++_i13){Scan _elem14; // required_elem14 = new Scan();_elem14.read(iprot);this.success.add(_elem14);}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 (Scan _iter15 : this.success){_iter15.write(oprot);}oprot.writeListEnd();}oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getScan_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 scanSerializedItem_args implements org.apache.thrift.TBase<scanSerializedItem_args, scanSerializedItem_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItem_args");private static final org.apache.thrift.protocol.TField INVENTORY_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("inventoryItemId", org.apache.thrift.protocol.TType.I64, (short)1);private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)2);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)3);private long inventoryItemId; // requiredprivate ScanType type; // requiredprivate 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 {INVENTORY_ITEM_ID((short)1, "inventoryItemId"),/**** @see ScanType*/TYPE((short)2, "type"),WAREHOUSE_ID((short)3, "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: // INVENTORY_ITEM_IDreturn INVENTORY_ITEM_ID;case 2: // TYPEreturn TYPE;case 3: // WAREHOUSE_IDreturn 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 assignmentsprivate static final int __INVENTORYITEMID_ISSET_ID = 0;private static final int __WAREHOUSEID_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.INVENTORY_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("inventoryItemId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.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(scanSerializedItem_args.class, metaDataMap);}public scanSerializedItem_args() {}public scanSerializedItem_args(long inventoryItemId,ScanType type,long warehouseId){this();this.inventoryItemId = inventoryItemId;setInventoryItemIdIsSet(true);this.type = type;this.warehouseId = warehouseId;setWarehouseIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public scanSerializedItem_args(scanSerializedItem_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.inventoryItemId = other.inventoryItemId;if (other.isSetType()) {this.type = other.type;}this.warehouseId = other.warehouseId;}public scanSerializedItem_args deepCopy() {return new scanSerializedItem_args(this);}@Overridepublic void clear() {setInventoryItemIdIsSet(false);this.inventoryItemId = 0;this.type = null;setWarehouseIdIsSet(false);this.warehouseId = 0;}public long getInventoryItemId() {return this.inventoryItemId;}public void setInventoryItemId(long inventoryItemId) {this.inventoryItemId = inventoryItemId;setInventoryItemIdIsSet(true);}public void unsetInventoryItemId() {__isset_bit_vector.clear(__INVENTORYITEMID_ISSET_ID);}/** Returns true if field inventoryItemId is set (has been assigned a value) and false otherwise */public boolean isSetInventoryItemId() {return __isset_bit_vector.get(__INVENTORYITEMID_ISSET_ID);}public void setInventoryItemIdIsSet(boolean value) {__isset_bit_vector.set(__INVENTORYITEMID_ISSET_ID, value);}/**** @see ScanType*/public ScanType getType() {return this.type;}/**** @see ScanType*/public void setType(ScanType type) {this.type = type;}public void unsetType() {this.type = null;}/** Returns true if field type is set (has been assigned a value) and false otherwise */public boolean isSetType() {return this.type != null;}public void setTypeIsSet(boolean value) {if (!value) {this.type = 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 INVENTORY_ITEM_ID:if (value == null) {unsetInventoryItemId();} else {setInventoryItemId((Long)value);}break;case TYPE:if (value == null) {unsetType();} else {setType((ScanType)value);}break;case WAREHOUSE_ID:if (value == null) {unsetWarehouseId();} else {setWarehouseId((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case INVENTORY_ITEM_ID:return Long.valueOf(getInventoryItemId());case TYPE:return getType();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 INVENTORY_ITEM_ID:return isSetInventoryItemId();case TYPE:return isSetType();case WAREHOUSE_ID:return isSetWarehouseId();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof scanSerializedItem_args)return this.equals((scanSerializedItem_args)that);return false;}public boolean equals(scanSerializedItem_args that) {if (that == null)return false;boolean this_present_inventoryItemId = true;boolean that_present_inventoryItemId = true;if (this_present_inventoryItemId || that_present_inventoryItemId) {if (!(this_present_inventoryItemId && that_present_inventoryItemId))return false;if (this.inventoryItemId != that.inventoryItemId)return false;}boolean this_present_type = true && this.isSetType();boolean that_present_type = true && that.isSetType();if (this_present_type || that_present_type) {if (!(this_present_type && that_present_type))return false;if (!this.type.equals(that.type))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;}@Overridepublic int hashCode() {return 0;}public int compareTo(scanSerializedItem_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;scanSerializedItem_args typedOther = (scanSerializedItem_args)other;lastComparison = Boolean.valueOf(isSetInventoryItemId()).compareTo(typedOther.isSetInventoryItemId());if (lastComparison != 0) {return lastComparison;}if (isSetInventoryItemId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItemId, typedOther.inventoryItemId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());if (lastComparison != 0) {return lastComparison;}if (isSetType()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);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: // INVENTORY_ITEM_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.inventoryItemId = iprot.readI64();setInventoryItemIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // TYPEif (field.type == org.apache.thrift.protocol.TType.I32) {this.type = ScanType.findByValue(iprot.readI32());} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // WAREHOUSE_IDif (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(INVENTORY_ITEM_ID_FIELD_DESC);oprot.writeI64(this.inventoryItemId);oprot.writeFieldEnd();if (this.type != null) {oprot.writeFieldBegin(TYPE_FIELD_DESC);oprot.writeI32(this.type.getValue());oprot.writeFieldEnd();}oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);oprot.writeI64(this.warehouseId);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("scanSerializedItem_args(");boolean first = true;sb.append("inventoryItemId:");sb.append(this.inventoryItemId);first = false;if (!first) sb.append(", ");sb.append("type:");if (this.type == null) {sb.append("null");} else {sb.append(this.type);}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 scanSerializedItem_result implements org.apache.thrift.TBase<scanSerializedItem_result, scanSerializedItem_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItem_result");private static final org.apache.thrift.protocol.TField WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);private WarehouseServiceException wex; // 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 {WEX((short)1, "wex");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: // WEXreturn WEX;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 assignmentspublic 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.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", 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(scanSerializedItem_result.class, metaDataMap);}public scanSerializedItem_result() {}public scanSerializedItem_result(WarehouseServiceException wex){this();this.wex = wex;}/*** Performs a deep copy on <i>other</i>.*/public scanSerializedItem_result(scanSerializedItem_result other) {if (other.isSetWex()) {this.wex = new WarehouseServiceException(other.wex);}}public scanSerializedItem_result deepCopy() {return new scanSerializedItem_result(this);}@Overridepublic void clear() {this.wex = null;}public WarehouseServiceException getWex() {return this.wex;}public void setWex(WarehouseServiceException wex) {this.wex = wex;}public void unsetWex() {this.wex = null;}/** Returns true if field wex is set (has been assigned a value) and false otherwise */public boolean isSetWex() {return this.wex != null;}public void setWexIsSet(boolean value) {if (!value) {this.wex = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case WEX:if (value == null) {unsetWex();} else {setWex((WarehouseServiceException)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case WEX:return getWex();}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 WEX:return isSetWex();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof scanSerializedItem_result)return this.equals((scanSerializedItem_result)that);return false;}public boolean equals(scanSerializedItem_result that) {if (that == null)return false;boolean this_present_wex = true && this.isSetWex();boolean that_present_wex = true && that.isSetWex();if (this_present_wex || that_present_wex) {if (!(this_present_wex && that_present_wex))return false;if (!this.wex.equals(that.wex))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(scanSerializedItem_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;scanSerializedItem_result typedOther = (scanSerializedItem_result)other;lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());if (lastComparison != 0) {return lastComparison;}if (isSetWex()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);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: // WEXif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.wex = new WarehouseServiceException();this.wex.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.isSetWex()) {oprot.writeFieldBegin(WEX_FIELD_DESC);this.wex.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("scanSerializedItem_result(");boolean first = true;sb.append("wex:");if (this.wex == null) {sb.append("null");} else {sb.append(this.wex);}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 scan_args implements org.apache.thrift.TBase<scan_args, scan_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_args");private static final org.apache.thrift.protocol.TField INVENTORY_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("inventoryItemId", org.apache.thrift.protocol.TType.I64, (short)1);private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (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 long inventoryItemId; // requiredprivate ScanType type; // requiredprivate long quantity; // requiredprivate 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 {INVENTORY_ITEM_ID((short)1, "inventoryItemId"),/**** @see ScanType*/TYPE((short)2, "type"),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: // INVENTORY_ITEM_IDreturn INVENTORY_ITEM_ID;case 2: // TYPEreturn TYPE;case 3: // QUANTITYreturn QUANTITY;case 4: // WAREHOUSE_IDreturn 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 assignmentsprivate static final int __INVENTORYITEMID_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.INVENTORY_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("inventoryItemId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));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(scan_args.class, metaDataMap);}public scan_args() {}public scan_args(long inventoryItemId,ScanType type,long quantity,long warehouseId){this();this.inventoryItemId = inventoryItemId;setInventoryItemIdIsSet(true);this.type = type;this.quantity = quantity;setQuantityIsSet(true);this.warehouseId = warehouseId;setWarehouseIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public scan_args(scan_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.inventoryItemId = other.inventoryItemId;if (other.isSetType()) {this.type = other.type;}this.quantity = other.quantity;this.warehouseId = other.warehouseId;}public scan_args deepCopy() {return new scan_args(this);}@Overridepublic void clear() {setInventoryItemIdIsSet(false);this.inventoryItemId = 0;this.type = null;setQuantityIsSet(false);this.quantity = 0;setWarehouseIdIsSet(false);this.warehouseId = 0;}public long getInventoryItemId() {return this.inventoryItemId;}public void setInventoryItemId(long inventoryItemId) {this.inventoryItemId = inventoryItemId;setInventoryItemIdIsSet(true);}public void unsetInventoryItemId() {__isset_bit_vector.clear(__INVENTORYITEMID_ISSET_ID);}/** Returns true if field inventoryItemId is set (has been assigned a value) and false otherwise */public boolean isSetInventoryItemId() {return __isset_bit_vector.get(__INVENTORYITEMID_ISSET_ID);}public void setInventoryItemIdIsSet(boolean value) {__isset_bit_vector.set(__INVENTORYITEMID_ISSET_ID, value);}/**** @see ScanType*/public ScanType getType() {return this.type;}/**** @see ScanType*/public void setType(ScanType type) {this.type = type;}public void unsetType() {this.type = null;}/** Returns true if field type is set (has been assigned a value) and false otherwise */public boolean isSetType() {return this.type != null;}public void setTypeIsSet(boolean value) {if (!value) {this.type = null;}}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 INVENTORY_ITEM_ID:if (value == null) {unsetInventoryItemId();} else {setInventoryItemId((Long)value);}break;case TYPE:if (value == null) {unsetType();} else {setType((ScanType)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 INVENTORY_ITEM_ID:return Long.valueOf(getInventoryItemId());case TYPE:return getType();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 INVENTORY_ITEM_ID:return isSetInventoryItemId();case TYPE:return isSetType();case QUANTITY:return isSetQuantity();case WAREHOUSE_ID:return isSetWarehouseId();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof scan_args)return this.equals((scan_args)that);return false;}public boolean equals(scan_args that) {if (that == null)return false;boolean this_present_inventoryItemId = true;boolean that_present_inventoryItemId = true;if (this_present_inventoryItemId || that_present_inventoryItemId) {if (!(this_present_inventoryItemId && that_present_inventoryItemId))return false;if (this.inventoryItemId != that.inventoryItemId)return false;}boolean this_present_type = true && this.isSetType();boolean that_present_type = true && that.isSetType();if (this_present_type || that_present_type) {if (!(this_present_type && that_present_type))return false;if (!this.type.equals(that.type))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;}@Overridepublic int hashCode() {return 0;}public int compareTo(scan_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;scan_args typedOther = (scan_args)other;lastComparison = Boolean.valueOf(isSetInventoryItemId()).compareTo(typedOther.isSetInventoryItemId());if (lastComparison != 0) {return lastComparison;}if (isSetInventoryItemId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItemId, typedOther.inventoryItemId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());if (lastComparison != 0) {return lastComparison;}if (isSetType()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);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: // INVENTORY_ITEM_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.inventoryItemId = iprot.readI64();setInventoryItemIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // TYPEif (field.type == org.apache.thrift.protocol.TType.I32) {this.type = ScanType.findByValue(iprot.readI32());} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // QUANTITYif (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_IDif (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(INVENTORY_ITEM_ID_FIELD_DESC);oprot.writeI64(this.inventoryItemId);oprot.writeFieldEnd();if (this.type != null) {oprot.writeFieldBegin(TYPE_FIELD_DESC);oprot.writeI32(this.type.getValue());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();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("scan_args(");boolean first = true;sb.append("inventoryItemId:");sb.append(this.inventoryItemId);first = false;if (!first) sb.append(", ");sb.append("type:");if (this.type == null) {sb.append("null");} else {sb.append(this.type);}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 scan_result implements org.apache.thrift.TBase<scan_result, scan_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_result");private static final org.apache.thrift.protocol.TField WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);private WarehouseServiceException wex; // 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 {WEX((short)1, "wex");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: // WEXreturn WEX;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 assignmentspublic 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.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", 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(scan_result.class, metaDataMap);}public scan_result() {}public scan_result(WarehouseServiceException wex){this();this.wex = wex;}/*** Performs a deep copy on <i>other</i>.*/public scan_result(scan_result other) {if (other.isSetWex()) {this.wex = new WarehouseServiceException(other.wex);}}public scan_result deepCopy() {return new scan_result(this);}@Overridepublic void clear() {this.wex = null;}public WarehouseServiceException getWex() {return this.wex;}public void setWex(WarehouseServiceException wex) {this.wex = wex;}public void unsetWex() {this.wex = null;}/** Returns true if field wex is set (has been assigned a value) and false otherwise */public boolean isSetWex() {return this.wex != null;}public void setWexIsSet(boolean value) {if (!value) {this.wex = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case WEX:if (value == null) {unsetWex();} else {setWex((WarehouseServiceException)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case WEX:return getWex();}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 WEX:return isSetWex();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof scan_result)return this.equals((scan_result)that);return false;}public boolean equals(scan_result that) {if (that == null)return false;boolean this_present_wex = true && this.isSetWex();boolean that_present_wex = true && that.isSetWex();if (this_present_wex || that_present_wex) {if (!(this_present_wex && that_present_wex))return false;if (!this.wex.equals(that.wex))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(scan_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;scan_result typedOther = (scan_result)other;lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());if (lastComparison != 0) {return lastComparison;}if (isSetWex()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);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: // WEXif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.wex = new WarehouseServiceException();this.wex.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.isSetWex()) {oprot.writeFieldBegin(WEX_FIELD_DESC);this.wex.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("scan_result(");boolean first = true;sb.append("wex:");if (this.wex == null) {sb.append("null");} else {sb.append(this.wex);}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 scanSerializedItemForOrder_args implements org.apache.thrift.TBase<scanSerializedItemForOrder_args, scanSerializedItemForOrder_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_args");private static final org.apache.thrift.protocol.TField SERIAL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("serialNumber", org.apache.thrift.protocol.TType.STRING, (short)1);private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)2);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)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 serialNumber; // requiredprivate ScanType type; // requiredprivate long orderId; // requiredprivate 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 {SERIAL_NUMBER((short)1, "serialNumber"),/**** @see ScanType*/TYPE((short)2, "type"),ORDER_ID((short)3, "orderId"),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: // SERIAL_NUMBERreturn SERIAL_NUMBER;case 2: // TYPEreturn TYPE;case 3: // ORDER_IDreturn ORDER_ID;case 4: // WAREHOUSE_IDreturn 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 assignmentsprivate static final int __ORDERID_ISSET_ID = 0;private static final int __WAREHOUSEID_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.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));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.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(scanSerializedItemForOrder_args.class, metaDataMap);}public scanSerializedItemForOrder_args() {}public scanSerializedItemForOrder_args(String serialNumber,ScanType type,long orderId,long warehouseId){this();this.serialNumber = serialNumber;this.type = type;this.orderId = orderId;setOrderIdIsSet(true);this.warehouseId = warehouseId;setWarehouseIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public scanSerializedItemForOrder_args(scanSerializedItemForOrder_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);if (other.isSetSerialNumber()) {this.serialNumber = other.serialNumber;}if (other.isSetType()) {this.type = other.type;}this.orderId = other.orderId;this.warehouseId = other.warehouseId;}public scanSerializedItemForOrder_args deepCopy() {return new scanSerializedItemForOrder_args(this);}@Overridepublic void clear() {this.serialNumber = null;this.type = null;setOrderIdIsSet(false);this.orderId = 0;setWarehouseIdIsSet(false);this.warehouseId = 0;}public String getSerialNumber() {return this.serialNumber;}public void setSerialNumber(String serialNumber) {this.serialNumber = serialNumber;}public void unsetSerialNumber() {this.serialNumber = null;}/** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */public boolean isSetSerialNumber() {return this.serialNumber != null;}public void setSerialNumberIsSet(boolean value) {if (!value) {this.serialNumber = null;}}/**** @see ScanType*/public ScanType getType() {return this.type;}/**** @see ScanType*/public void setType(ScanType type) {this.type = type;}public void unsetType() {this.type = null;}/** Returns true if field type is set (has been assigned a value) and false otherwise */public boolean isSetType() {return this.type != null;}public void setTypeIsSet(boolean value) {if (!value) {this.type = null;}}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 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 SERIAL_NUMBER:if (value == null) {unsetSerialNumber();} else {setSerialNumber((String)value);}break;case TYPE:if (value == null) {unsetType();} else {setType((ScanType)value);}break;case ORDER_ID:if (value == null) {unsetOrderId();} else {setOrderId((Long)value);}break;case WAREHOUSE_ID:if (value == null) {unsetWarehouseId();} else {setWarehouseId((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case SERIAL_NUMBER:return getSerialNumber();case TYPE:return getType();case ORDER_ID:return Long.valueOf(getOrderId());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 SERIAL_NUMBER:return isSetSerialNumber();case TYPE:return isSetType();case ORDER_ID:return isSetOrderId();case WAREHOUSE_ID:return isSetWarehouseId();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof scanSerializedItemForOrder_args)return this.equals((scanSerializedItemForOrder_args)that);return false;}public boolean equals(scanSerializedItemForOrder_args that) {if (that == null)return false;boolean this_present_serialNumber = true && this.isSetSerialNumber();boolean that_present_serialNumber = true && that.isSetSerialNumber();if (this_present_serialNumber || that_present_serialNumber) {if (!(this_present_serialNumber && that_present_serialNumber))return false;if (!this.serialNumber.equals(that.serialNumber))return false;}boolean this_present_type = true && this.isSetType();boolean that_present_type = true && that.isSetType();if (this_present_type || that_present_type) {if (!(this_present_type && that_present_type))return false;if (!this.type.equals(that.type))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_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;}@Overridepublic int hashCode() {return 0;}public int compareTo(scanSerializedItemForOrder_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;scanSerializedItemForOrder_args typedOther = (scanSerializedItemForOrder_args)other;lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());if (lastComparison != 0) {return lastComparison;}if (isSetSerialNumber()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());if (lastComparison != 0) {return lastComparison;}if (isSetType()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);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(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: // SERIAL_NUMBERif (field.type == org.apache.thrift.protocol.TType.STRING) {this.serialNumber = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // TYPEif (field.type == org.apache.thrift.protocol.TType.I32) {this.type = ScanType.findByValue(iprot.readI32());} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // ORDER_IDif (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 4: // WAREHOUSE_IDif (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.serialNumber != null) {oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);oprot.writeString(this.serialNumber);oprot.writeFieldEnd();}if (this.type != null) {oprot.writeFieldBegin(TYPE_FIELD_DESC);oprot.writeI32(this.type.getValue());oprot.writeFieldEnd();}oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);oprot.writeI64(this.orderId);oprot.writeFieldEnd();oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);oprot.writeI64(this.warehouseId);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_args(");boolean first = true;sb.append("serialNumber:");if (this.serialNumber == null) {sb.append("null");} else {sb.append(this.serialNumber);}first = false;if (!first) sb.append(", ");sb.append("type:");if (this.type == null) {sb.append("null");} else {sb.append(this.type);}first = false;if (!first) sb.append(", ");sb.append("orderId:");sb.append(this.orderId);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 scanSerializedItemForOrder_result implements org.apache.thrift.TBase<scanSerializedItemForOrder_result, scanSerializedItemForOrder_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_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 WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);private InventoryItem success; // requiredprivate WarehouseServiceException wex; // 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"),WEX((short)1, "wex");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: // SUCCESSreturn SUCCESS;case 1: // WEXreturn WEX;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 assignmentspublic 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, InventoryItem.class)));tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", 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(scanSerializedItemForOrder_result.class, metaDataMap);}public scanSerializedItemForOrder_result() {}public scanSerializedItemForOrder_result(InventoryItem success,WarehouseServiceException wex){this();this.success = success;this.wex = wex;}/*** Performs a deep copy on <i>other</i>.*/public scanSerializedItemForOrder_result(scanSerializedItemForOrder_result other) {if (other.isSetSuccess()) {this.success = new InventoryItem(other.success);}if (other.isSetWex()) {this.wex = new WarehouseServiceException(other.wex);}}public scanSerializedItemForOrder_result deepCopy() {return new scanSerializedItemForOrder_result(this);}@Overridepublic void clear() {this.success = null;this.wex = null;}public InventoryItem getSuccess() {return this.success;}public void setSuccess(InventoryItem 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 WarehouseServiceException getWex() {return this.wex;}public void setWex(WarehouseServiceException wex) {this.wex = wex;}public void unsetWex() {this.wex = null;}/** Returns true if field wex is set (has been assigned a value) and false otherwise */public boolean isSetWex() {return this.wex != null;}public void setWexIsSet(boolean value) {if (!value) {this.wex = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case SUCCESS:if (value == null) {unsetSuccess();} else {setSuccess((InventoryItem)value);}break;case WEX:if (value == null) {unsetWex();} else {setWex((WarehouseServiceException)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case SUCCESS:return getSuccess();case WEX:return getWex();}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 WEX:return isSetWex();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof scanSerializedItemForOrder_result)return this.equals((scanSerializedItemForOrder_result)that);return false;}public boolean equals(scanSerializedItemForOrder_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_wex = true && this.isSetWex();boolean that_present_wex = true && that.isSetWex();if (this_present_wex || that_present_wex) {if (!(this_present_wex && that_present_wex))return false;if (!this.wex.equals(that.wex))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(scanSerializedItemForOrder_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;scanSerializedItemForOrder_result typedOther = (scanSerializedItemForOrder_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(isSetWex()).compareTo(typedOther.isSetWex());if (lastComparison != 0) {return lastComparison;}if (isSetWex()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);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: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.success = new InventoryItem();this.success.read(iprot);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 1: // WEXif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.wex = new WarehouseServiceException();this.wex.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.isSetWex()) {oprot.writeFieldBegin(WEX_FIELD_DESC);this.wex.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_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("wex:");if (this.wex == null) {sb.append("null");} else {sb.append(this.wex);}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 scanForOrder_args implements org.apache.thrift.TBase<scanForOrder_args, scanForOrder_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_args");private static final org.apache.thrift.protocol.TField INVENTORY_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("inventoryItemId", org.apache.thrift.protocol.TType.I64, (short)1);private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (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 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 WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)5);private long inventoryItemId; // requiredprivate ScanType type; // requiredprivate long quantity; // requiredprivate long orderId; // requiredprivate 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 {INVENTORY_ITEM_ID((short)1, "inventoryItemId"),/**** @see ScanType*/TYPE((short)2, "type"),QUANTITY((short)3, "quantity"),ORDER_ID((short)4, "orderId"),WAREHOUSE_ID((short)5, "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: // INVENTORY_ITEM_IDreturn INVENTORY_ITEM_ID;case 2: // TYPEreturn TYPE;case 3: // QUANTITYreturn QUANTITY;case 4: // ORDER_IDreturn ORDER_ID;case 5: // WAREHOUSE_IDreturn 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 assignmentsprivate static final int __INVENTORYITEMID_ISSET_ID = 0;private static final int __QUANTITY_ISSET_ID = 1;private static final int __ORDERID_ISSET_ID = 2;private static final int __WAREHOUSEID_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.INVENTORY_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("inventoryItemId", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));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.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.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(scanForOrder_args.class, metaDataMap);}public scanForOrder_args() {}public scanForOrder_args(long inventoryItemId,ScanType type,long quantity,long orderId,long warehouseId){this();this.inventoryItemId = inventoryItemId;setInventoryItemIdIsSet(true);this.type = type;this.quantity = quantity;setQuantityIsSet(true);this.orderId = orderId;setOrderIdIsSet(true);this.warehouseId = warehouseId;setWarehouseIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public scanForOrder_args(scanForOrder_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.inventoryItemId = other.inventoryItemId;if (other.isSetType()) {this.type = other.type;}this.quantity = other.quantity;this.orderId = other.orderId;this.warehouseId = other.warehouseId;}public scanForOrder_args deepCopy() {return new scanForOrder_args(this);}@Overridepublic void clear() {setInventoryItemIdIsSet(false);this.inventoryItemId = 0;this.type = null;setQuantityIsSet(false);this.quantity = 0;setOrderIdIsSet(false);this.orderId = 0;setWarehouseIdIsSet(false);this.warehouseId = 0;}public long getInventoryItemId() {return this.inventoryItemId;}public void setInventoryItemId(long inventoryItemId) {this.inventoryItemId = inventoryItemId;setInventoryItemIdIsSet(true);}public void unsetInventoryItemId() {__isset_bit_vector.clear(__INVENTORYITEMID_ISSET_ID);}/** Returns true if field inventoryItemId is set (has been assigned a value) and false otherwise */public boolean isSetInventoryItemId() {return __isset_bit_vector.get(__INVENTORYITEMID_ISSET_ID);}public void setInventoryItemIdIsSet(boolean value) {__isset_bit_vector.set(__INVENTORYITEMID_ISSET_ID, value);}/**** @see ScanType*/public ScanType getType() {return this.type;}/**** @see ScanType*/public void setType(ScanType type) {this.type = type;}public void unsetType() {this.type = null;}/** Returns true if field type is set (has been assigned a value) and false otherwise */public boolean isSetType() {return this.type != null;}public void setTypeIsSet(boolean value) {if (!value) {this.type = null;}}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 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 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 INVENTORY_ITEM_ID:if (value == null) {unsetInventoryItemId();} else {setInventoryItemId((Long)value);}break;case TYPE:if (value == null) {unsetType();} else {setType((ScanType)value);}break;case QUANTITY:if (value == null) {unsetQuantity();} else {setQuantity((Long)value);}break;case ORDER_ID:if (value == null) {unsetOrderId();} else {setOrderId((Long)value);}break;case WAREHOUSE_ID:if (value == null) {unsetWarehouseId();} else {setWarehouseId((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case INVENTORY_ITEM_ID:return Long.valueOf(getInventoryItemId());case TYPE:return getType();case QUANTITY:return Long.valueOf(getQuantity());case ORDER_ID:return Long.valueOf(getOrderId());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 INVENTORY_ITEM_ID:return isSetInventoryItemId();case TYPE:return isSetType();case QUANTITY:return isSetQuantity();case ORDER_ID:return isSetOrderId();case WAREHOUSE_ID:return isSetWarehouseId();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof scanForOrder_args)return this.equals((scanForOrder_args)that);return false;}public boolean equals(scanForOrder_args that) {if (that == null)return false;boolean this_present_inventoryItemId = true;boolean that_present_inventoryItemId = true;if (this_present_inventoryItemId || that_present_inventoryItemId) {if (!(this_present_inventoryItemId && that_present_inventoryItemId))return false;if (this.inventoryItemId != that.inventoryItemId)return false;}boolean this_present_type = true && this.isSetType();boolean that_present_type = true && that.isSetType();if (this_present_type || that_present_type) {if (!(this_present_type && that_present_type))return false;if (!this.type.equals(that.type))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_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_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;}@Overridepublic int hashCode() {return 0;}public int compareTo(scanForOrder_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;scanForOrder_args typedOther = (scanForOrder_args)other;lastComparison = Boolean.valueOf(isSetInventoryItemId()).compareTo(typedOther.isSetInventoryItemId());if (lastComparison != 0) {return lastComparison;}if (isSetInventoryItemId()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItemId, typedOther.inventoryItemId);if (lastComparison != 0) {return lastComparison;}}lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());if (lastComparison != 0) {return lastComparison;}if (isSetType()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);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(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(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: // INVENTORY_ITEM_IDif (field.type == org.apache.thrift.protocol.TType.I64) {this.inventoryItemId = iprot.readI64();setInventoryItemIdIsSet(true);} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // TYPEif (field.type == org.apache.thrift.protocol.TType.I32) {this.type = ScanType.findByValue(iprot.readI32());} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 3: // QUANTITYif (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: // ORDER_IDif (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: // WAREHOUSE_IDif (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(INVENTORY_ITEM_ID_FIELD_DESC);oprot.writeI64(this.inventoryItemId);oprot.writeFieldEnd();if (this.type != null) {oprot.writeFieldBegin(TYPE_FIELD_DESC);oprot.writeI32(this.type.getValue());oprot.writeFieldEnd();}oprot.writeFieldBegin(QUANTITY_FIELD_DESC);oprot.writeI64(this.quantity);oprot.writeFieldEnd();oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);oprot.writeI64(this.orderId);oprot.writeFieldEnd();oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);oprot.writeI64(this.warehouseId);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("scanForOrder_args(");boolean first = true;sb.append("inventoryItemId:");sb.append(this.inventoryItemId);first = false;if (!first) sb.append(", ");sb.append("type:");if (this.type == null) {sb.append("null");} else {sb.append(this.type);}first = false;if (!first) sb.append(", ");sb.append("quantity:");sb.append(this.quantity);first = false;if (!first) sb.append(", ");sb.append("orderId:");sb.append(this.orderId);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 scanForOrder_result implements org.apache.thrift.TBase<scanForOrder_result, scanForOrder_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_result");private static final org.apache.thrift.protocol.TField WEX_FIELD_DESC = new org.apache.thrift.protocol.TField("wex", org.apache.thrift.protocol.TType.STRUCT, (short)1);private WarehouseServiceException wex; // 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 {WEX((short)1, "wex");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: // WEXreturn WEX;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 assignmentspublic 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.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", 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(scanForOrder_result.class, metaDataMap);}public scanForOrder_result() {}public scanForOrder_result(WarehouseServiceException wex){this();this.wex = wex;}/*** Performs a deep copy on <i>other</i>.*/public scanForOrder_result(scanForOrder_result other) {if (other.isSetWex()) {this.wex = new WarehouseServiceException(other.wex);}}public scanForOrder_result deepCopy() {return new scanForOrder_result(this);}@Overridepublic void clear() {this.wex = null;}public WarehouseServiceException getWex() {return this.wex;}public void setWex(WarehouseServiceException wex) {this.wex = wex;}public void unsetWex() {this.wex = null;}/** Returns true if field wex is set (has been assigned a value) and false otherwise */public boolean isSetWex() {return this.wex != null;}public void setWexIsSet(boolean value) {if (!value) {this.wex = null;}}public void setFieldValue(_Fields field, Object value) {switch (field) {case WEX:if (value == null) {unsetWex();} else {setWex((WarehouseServiceException)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case WEX:return getWex();}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 WEX:return isSetWex();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof scanForOrder_result)return this.equals((scanForOrder_result)that);return false;}public boolean equals(scanForOrder_result that) {if (that == null)return false;boolean this_present_wex = true && this.isSetWex();boolean that_present_wex = true && that.isSetWex();if (this_present_wex || that_present_wex) {if (!(this_present_wex && that_present_wex))return false;if (!this.wex.equals(that.wex))return false;}return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(scanForOrder_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;scanForOrder_result typedOther = (scanForOrder_result)other;lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());if (lastComparison != 0) {return lastComparison;}if (isSetWex()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);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: // WEXif (field.type == org.apache.thrift.protocol.TType.STRUCT) {this.wex = new WarehouseServiceException();this.wex.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.isSetWex()) {oprot.writeFieldBegin(WEX_FIELD_DESC);this.wex.write(oprot);oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("scanForOrder_result(");boolean first = true;sb.append("wex:");if (this.wex == null) {sb.append("null");} else {sb.append(this.wex);}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 createItemNumberMapping_args implements org.apache.thrift.TBase<createItemNumberMapping_args, createItemNumberMapping_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_args");private static final org.apache.thrift.protocol.TField ITEM_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("itemNumber", org.apache.thrift.protocol.TType.STRING, (short)1);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)2);private String itemNumber; // requiredprivate 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_NUMBER((short)1, "itemNumber"),ITEM_ID((short)2, "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_NUMBERreturn ITEM_NUMBER;case 2: // ITEM_IDreturn 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 assignmentsprivate 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_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT,new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));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(createItemNumberMapping_args.class, metaDataMap);}public createItemNumberMapping_args() {}public createItemNumberMapping_args(String itemNumber,long itemId){this();this.itemNumber = itemNumber;this.itemId = itemId;setItemIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public createItemNumberMapping_args(createItemNumberMapping_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);if (other.isSetItemNumber()) {this.itemNumber = other.itemNumber;}this.itemId = other.itemId;}public createItemNumberMapping_args deepCopy() {return new createItemNumberMapping_args(this);}@Overridepublic void clear() {this.itemNumber = null;setItemIdIsSet(false);this.itemId = 0;}public String getItemNumber() {return this.itemNumber;}public void setItemNumber(String itemNumber) {this.itemNumber = itemNumber;}public void unsetItemNumber() {this.itemNumber = null;}/** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */public boolean isSetItemNumber() {return this.itemNumber != null;}public void setItemNumberIsSet(boolean value) {if (!value) {this.itemNumber = null;}}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_NUMBER:if (value == null) {unsetItemNumber();} else {setItemNumber((String)value);}break;case ITEM_ID:if (value == null) {unsetItemId();} else {setItemId((Long)value);}break;}}public Object getFieldValue(_Fields field) {switch (field) {case ITEM_NUMBER:return getItemNumber();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_NUMBER:return isSetItemNumber();case ITEM_ID:return isSetItemId();}throw new IllegalStateException();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof createItemNumberMapping_args)return this.equals((createItemNumberMapping_args)that);return false;}public boolean equals(createItemNumberMapping_args that) {if (that == null)return false;boolean this_present_itemNumber = true && this.isSetItemNumber();boolean that_present_itemNumber = true && that.isSetItemNumber();if (this_present_itemNumber || that_present_itemNumber) {if (!(this_present_itemNumber && that_present_itemNumber))return false;if (!this.itemNumber.equals(that.itemNumber))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;}@Overridepublic int hashCode() {return 0;}public int compareTo(createItemNumberMapping_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;createItemNumberMapping_args typedOther = (createItemNumberMapping_args)other;lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());if (lastComparison != 0) {return lastComparison;}if (isSetItemNumber()) {lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);if (lastComparison != 0) {return lastComparison;}}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_NUMBERif (field.type == org.apache.thrift.protocol.TType.STRING) {this.itemNumber = iprot.readString();} else {org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);}break;case 2: // ITEM_IDif (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);if (this.itemNumber != null) {oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);oprot.writeString(this.itemNumber);oprot.writeFieldEnd();}oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);oprot.writeI64(this.itemId);oprot.writeFieldEnd();oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("createItemNumberMapping_args(");boolean first = true;sb.append("itemNumber:");if (this.itemNumber == null) {sb.append("null");} else {sb.append(this.itemNumber);}first = false;if (!first) sb.append(", ");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 createItemNumberMapping_result implements org.apache.thrift.TBase<createItemNumberMapping_result, createItemNumberMapping_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_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(createItemNumberMapping_result.class, metaDataMap);}public createItemNumberMapping_result() {}/*** Performs a deep copy on <i>other</i>.*/public createItemNumberMapping_result(createItemNumberMapping_result other) {}public createItemNumberMapping_result deepCopy() {return new createItemNumberMapping_result(this);}@Overridepublic 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();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof createItemNumberMapping_result)return this.equals((createItemNumberMapping_result)that);return false;}public boolean equals(createItemNumberMapping_result that) {if (that == null)return false;return true;}@Overridepublic int hashCode() {return 0;}public int compareTo(createItemNumberMapping_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;createItemNumberMapping_result typedOther = (createItemNumberMapping_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();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("createItemNumberMapping_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 getItemNumbers_args implements org.apache.thrift.TBase<getItemNumbers_args, getItemNumbers_args._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_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_IDreturn 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 assignmentsprivate 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(getItemNumbers_args.class, metaDataMap);}public getItemNumbers_args() {}public getItemNumbers_args(long itemId){this();this.itemId = itemId;setItemIdIsSet(true);}/*** Performs a deep copy on <i>other</i>.*/public getItemNumbers_args(getItemNumbers_args other) {__isset_bit_vector.clear();__isset_bit_vector.or(other.__isset_bit_vector);this.itemId = other.itemId;}public getItemNumbers_args deepCopy() {return new getItemNumbers_args(this);}@Overridepublic 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();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getItemNumbers_args)return this.equals((getItemNumbers_args)that);return false;}public boolean equals(getItemNumbers_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;}@Overridepublic int hashCode() {return 0;}public int compareTo(getItemNumbers_args other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getItemNumbers_args typedOther = (getItemNumbers_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_IDif (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();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getItemNumbers_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 getItemNumbers_result implements org.apache.thrift.TBase<getItemNumbers_result, getItemNumbers_result._Fields>, java.io.Serializable, Cloneable {private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_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: // SUCCESSreturn 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 assignmentspublic 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(getItemNumbers_result.class, metaDataMap);}public getItemNumbers_result() {}public getItemNumbers_result(List<String> success){this();this.success = success;}/*** Performs a deep copy on <i>other</i>.*/public getItemNumbers_result(getItemNumbers_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 getItemNumbers_result deepCopy() {return new getItemNumbers_result(this);}@Overridepublic 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();}@Overridepublic boolean equals(Object that) {if (that == null)return false;if (that instanceof getItemNumbers_result)return this.equals((getItemNumbers_result)that);return false;}public boolean equals(getItemNumbers_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;}@Overridepublic int hashCode() {return 0;}public int compareTo(getItemNumbers_result other) {if (!getClass().equals(other.getClass())) {return getClass().getName().compareTo(other.getClass().getName());}int lastComparison = 0;getItemNumbers_result typedOther = (getItemNumbers_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: // SUCCESSif (field.type == org.apache.thrift.protocol.TType.LIST) {{org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();this.success = new ArrayList<String>(_list16.size);for (int _i17 = 0; _i17 < _list16.size; ++_i17){String _elem18; // required_elem18 = iprot.readString();this.success.add(_elem18);}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 _iter19 : this.success){oprot.writeString(_iter19);}oprot.writeListEnd();}oprot.writeFieldEnd();}oprot.writeFieldStop();oprot.writeStructEnd();}@Overridepublic String toString() {StringBuilder sb = new StringBuilder("getItemNumbers_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);}}}}