Subversion Repositories SmartDukaan

Rev

Rev 6880 | Rev 7199 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2820 chandransh 1
/**
3430 rajveer 2
 * Autogenerated by Thrift Compiler (0.7.0)
2820 chandransh 3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.warehouse;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
3430 rajveer 18
import java.nio.ByteBuffer;
2820 chandransh 19
import java.util.Arrays;
20
import org.slf4j.Logger;
21
import org.slf4j.LoggerFactory;
22
 
23
public class WarehouseService {
24
 
3374 rajveer 25
  public interface Iface extends in.shop2020.generic.GenericService.Iface {
2820 chandransh 26
 
27
    /**
4496 mandeep.dh 28
     * Retrieves serialized inventory item given a serial number
2832 chandransh 29
     * 
4496 mandeep.dh 30
     * @param serialNumber
2832 chandransh 31
     */
4541 mandeep.dh 32
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException;
2832 chandransh 33
 
34
    /**
5361 mandeep.dh 35
     * Retrieves non-serialized inventory item from a given supplier
2820 chandransh 36
     * 
5530 mandeep.dh 37
     * @param itemNumber
4496 mandeep.dh 38
     * @param itemId
5530 mandeep.dh 39
     * @param fulfilmentWarehouseId
2820 chandransh 40
     */
5530 mandeep.dh 41
    public InventoryItem getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
2820 chandransh 42
 
43
    /**
4496 mandeep.dh 44
     * Scan non-serialized items.
2820 chandransh 45
     * 
5361 mandeep.dh 46
     * @param inventoryItem
2820 chandransh 47
     * @param type
4496 mandeep.dh 48
     * @param quantity
5361 mandeep.dh 49
     * @param billingWarehouseId
2820 chandransh 50
     */
5361 mandeep.dh 51
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
2820 chandransh 52
 
4496 mandeep.dh 53
    /**
54
     * Scan serialized items linked with an order. Returns its price.
55
     * 
4555 mandeep.dh 56
     * @param serialNumber
4496 mandeep.dh 57
     * @param type
58
     * @param orderId
5110 mandeep.dh 59
     * @param fulfilmentWarehouseId
60
     * @param quantity
61
     * @param billingWarehouseId
4496 mandeep.dh 62
     */
5110 mandeep.dh 63
    public InventoryItem scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
4496 mandeep.dh 64
 
65
    /**
66
     * Scan non-serialized items linked with an order.
67
     * 
5361 mandeep.dh 68
     * @param inventoryItem
4496 mandeep.dh 69
     * @param type
70
     * @param quantity
71
     * @param orderId
5110 mandeep.dh 72
     * @param fulfilmentWarehouseId
5361 mandeep.dh 73
     * @param billingWarehouseId
4496 mandeep.dh 74
     */
5361 mandeep.dh 75
    public InventoryItem scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
4496 mandeep.dh 76
 
77
    /**
78
     * Created item number to item id mapping
79
     * 
80
     * @param itemNumber
81
     * @param itemId
82
     */
83
    public void createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException;
84
 
4622 amit.gupta 85
    /**
86
     * Get itemNumber mappings for itemId
87
     * 
88
     * @param itemId
89
     */
90
    public List<String> getItemNumbers(long itemId) throws org.apache.thrift.TException;
91
 
5110 mandeep.dh 92
    /**
93
     * Gets item ids for a given item number
94
     * 
95
     * @param itemNumber
96
     */
97
    public List<Long> getItemIds(String itemNumber) throws org.apache.thrift.TException;
98
 
5185 mandeep.dh 99
    /**
100
     * Retrieves all inventory items given a last scan type
101
     * 
102
     * @param lastScanType
103
     */
104
    public List<InventoryItem> getInventoryItemsFromLastScanType(ScanType lastScanType) throws WarehouseServiceException, org.apache.thrift.TException;
105
 
106
    /**
107
     * Retrieves inventory item given a inventoryItem id
108
     * 
109
     * @param inventoryItemId
110
     */
111
    public InventoryItem getInventoryItemFromId(long inventoryItemId) throws WarehouseServiceException, org.apache.thrift.TException;
112
 
5372 mandeep.dh 113
    /**
114
     * Returns the purchase scans grouped by items for Purchase register reconciliation
115
     * 
116
     * @param startDate
117
     * @param endDate
118
     */
119
    public List<DetailedPurchaseScan> getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException;
120
 
5496 mandeep.dh 121
    /**
122
     * Returns the invoices and the count of scans against on a given day.
123
     * 
124
     * @param date
125
     */
126
    public List<InvoiceScan> fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException;
127
 
5620 mandeep.dh 128
    /**
129
     * Returns inventory item for a given order
130
     * 
131
     * @param orderId
132
     */
133
    public InventoryItem getInventoryItemFromOrder(long orderId) throws WarehouseServiceException, org.apache.thrift.TException;
134
 
5711 mandeep.dh 135
    /**
136
     * Fetches the stock inventory age week-wise
137
     */
138
    public List<InventoryAge> getInventoryAge() throws org.apache.thrift.TException;
139
 
6322 amar.kumar 140
    /**
141
     * Fetches the scanRecords for a given item for a given time interval
142
     * 
143
     * @param itemId
144
     * @param fromDate
145
     * @param toDate
146
     */
147
    public List<Scan> getInventoryScansForItem(long itemId, long fromDate, long toDate) throws org.apache.thrift.TException;
148
 
149
    /**
150
     * Fetches the scanRecords for a given serialNumber for a given time interval
151
     * 
152
     * @param serialNumber
153
     */
154
    public List<Scan> getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException;
155
 
6467 amar.kumar 156
    /**
6548 amar.kumar 157
     * Inserts outgoing scans for Returned Items and updates returnId in InventoryItems
6467 amar.kumar 158
     * 
159
     * @param saleReturnItems
160
     * @param vendorId
161
     */
162
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId) throws WarehouseServiceException, org.apache.thrift.TException;
163
 
6548 amar.kumar 164
    /**
165
     * Inserts scans for lost Items and updates lastScanType in InventoryItems
166
     * 
167
     * @param lostItems
168
     * @param vendorId
169
     */
170
    public void scanForLostItem(List<InventoryItem> lostItems, long vendorId) throws WarehouseServiceException, org.apache.thrift.TException;
171
 
172
    /**
173
     * Get inventory count for available Serialized items in our warehouses using entries in ScanNew table
174
     */
175
    public List<InventoryAvailability> getCurrentSerializedInventoryByScans() throws org.apache.thrift.TException;
176
 
6630 amar.kumar 177
    /**
178
     * Get inventory count for available Serialized items in our warehouses using entries in ScanNew table
179
     */
180
    public List<InventoryAvailability> getCurrentNonSerializedInventoryByScans() throws org.apache.thrift.TException;
181
 
6762 amar.kumar 182
    /**
183
     * Get inventory for Serialized items in our warehouses at a given date using entries in ScanNew table
184
     * 
185
     * @param date
186
     */
187
    public List<InventoryAvailability> getHistoricSerializedInventoryByScans(long date) throws org.apache.thrift.TException;
188
 
189
    /**
190
     * Get inventory for Non Serialized items in our warehouses at a given date using entries in ScanNew table
191
     * 
192
     * @param date
193
     */
194
    public List<InventoryAvailability> getHistoricNonSerializedInventoryByScans(long date) throws org.apache.thrift.TException;
195
 
196
    /**
6880 amar.kumar 197
     * Insert Purchase/Sale Entries for product billed by Hotspot using OURS_EXTERNAL Billing
6762 amar.kumar 198
     * 
199
     * @param itemId
200
     * @param serialNumber
201
     * @param itemNumber
202
     * @param invoiceNumber
203
     * @param warehouseId
204
     * @param unitPrice
205
     * @param orderId
206
     */
207
    public InventoryItem scanForOursExternalSale(long itemId, String serialNumber, String itemNumber, String invoiceNumber, long warehouseId, double unitPrice, long orderId) throws WarehouseServiceException, org.apache.thrift.TException;
208
 
209
    /**
6880 amar.kumar 210
     * Insert Purchase_Ret/Sale_Ret Entries for product billed by Hotspot using OURS_EXTERNAL Billing
6762 amar.kumar 211
     * 
212
     * @param orderId
213
     * @param unitPrice
214
     */
215
    public void scanForOursExternalSaleReturn(long orderId, double unitPrice) throws org.apache.thrift.TException;
216
 
6880 amar.kumar 217
    public List<InventoryMovement> getMovementNonSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException;
218
 
219
    public List<InventoryMovement> getMovementSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException;
220
 
7190 amar.kumar 221
    public InventoryItem scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType) throws WarehouseServiceException, org.apache.thrift.TException;
222
 
2820 chandransh 223
  }
224
 
3430 rajveer 225
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
226
 
4496 mandeep.dh 227
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 228
 
5530 mandeep.dh 229
    public void getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getNonSeralizedInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 230
 
5361 mandeep.dh 231
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scan_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 232
 
5110 mandeep.dh 233
    public void scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanSerializedItemForOrder_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 234
 
5361 mandeep.dh 235
    public void scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForOrder_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 236
 
237
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException;
238
 
4622 amit.gupta 239
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemNumbers_call> resultHandler) throws org.apache.thrift.TException;
240
 
5110 mandeep.dh 241
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemIds_call> resultHandler) throws org.apache.thrift.TException;
242
 
5185 mandeep.dh 243
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException;
244
 
245
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException;
246
 
5372 mandeep.dh 247
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException;
248
 
5496 mandeep.dh 249
    public void fetchScansPerInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.fetchScansPerInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException;
250
 
5620 mandeep.dh 251
    public void getInventoryItemFromOrder(long orderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromOrder_call> resultHandler) throws org.apache.thrift.TException;
252
 
5711 mandeep.dh 253
    public void getInventoryAge(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryAge_call> resultHandler) throws org.apache.thrift.TException;
254
 
6322 amar.kumar 255
    public void getInventoryScansForItem(long itemId, long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryScansForItem_call> resultHandler) throws org.apache.thrift.TException;
256
 
257
    public void getScanRecordsForSerialNumber(long serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getScanRecordsForSerialNumber_call> resultHandler) throws org.apache.thrift.TException;
258
 
6467 amar.kumar 259
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException;
260
 
6548 amar.kumar 261
    public void scanForLostItem(List<InventoryItem> lostItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForLostItem_call> resultHandler) throws org.apache.thrift.TException;
262
 
263
    public void getCurrentSerializedInventoryByScans(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCurrentSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
264
 
6630 amar.kumar 265
    public void getCurrentNonSerializedInventoryByScans(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getCurrentNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
266
 
6762 amar.kumar 267
    public void getHistoricSerializedInventoryByScans(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getHistoricSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
268
 
269
    public void getHistoricNonSerializedInventoryByScans(long date, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getHistoricNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
270
 
271
    public void scanForOursExternalSale(long itemId, String serialNumber, String itemNumber, String invoiceNumber, long warehouseId, double unitPrice, long orderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForOursExternalSale_call> resultHandler) throws org.apache.thrift.TException;
272
 
273
    public void scanForOursExternalSaleReturn(long orderId, double unitPrice, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForOursExternalSaleReturn_call> resultHandler) throws org.apache.thrift.TException;
274
 
6880 amar.kumar 275
    public void getMovementNonSerializedInventoryByScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getMovementNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
276
 
277
    public void getMovementSerializedInventoryByScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getMovementSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException;
278
 
7190 amar.kumar 279
    public void scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanfreebie_call> resultHandler) throws org.apache.thrift.TException;
280
 
3430 rajveer 281
  }
282
 
3374 rajveer 283
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
3430 rajveer 284
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
285
      public Factory() {}
286
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
287
        return new Client(prot);
288
      }
289
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
290
        return new Client(iprot, oprot);
291
      }
292
    }
293
 
294
    public Client(org.apache.thrift.protocol.TProtocol prot)
2820 chandransh 295
    {
3430 rajveer 296
      super(prot, prot);
2820 chandransh 297
    }
298
 
3430 rajveer 299
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
3374 rajveer 300
      super(iprot, oprot);
2820 chandransh 301
    }
302
 
4541 mandeep.dh 303
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 304
    {
4496 mandeep.dh 305
      send_getInventoryItem(serialNumber);
306
      return recv_getInventoryItem();
2832 chandransh 307
    }
308
 
4496 mandeep.dh 309
    public void send_getInventoryItem(String serialNumber) throws org.apache.thrift.TException
2832 chandransh 310
    {
4496 mandeep.dh 311
      getInventoryItem_args args = new getInventoryItem_args();
312
      args.setSerialNumber(serialNumber);
313
      sendBase("getInventoryItem", args);
2832 chandransh 314
    }
315
 
4541 mandeep.dh 316
    public InventoryItem recv_getInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 317
    {
4496 mandeep.dh 318
      getInventoryItem_result result = new getInventoryItem_result();
319
      receiveBase(result, "getInventoryItem");
2832 chandransh 320
      if (result.isSetSuccess()) {
321
        return result.success;
322
      }
4541 mandeep.dh 323
      if (result.wex != null) {
324
        throw result.wex;
325
      }
4496 mandeep.dh 326
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItem failed: unknown result");
327
    }
328
 
5530 mandeep.dh 329
    public InventoryItem getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 330
    {
5530 mandeep.dh 331
      send_getNonSeralizedInventoryItem(itemNumber, itemId, fulfilmentWarehouseId);
5361 mandeep.dh 332
      return recv_getNonSeralizedInventoryItem();
4496 mandeep.dh 333
    }
334
 
5530 mandeep.dh 335
    public void send_getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 336
    {
5361 mandeep.dh 337
      getNonSeralizedInventoryItem_args args = new getNonSeralizedInventoryItem_args();
5530 mandeep.dh 338
      args.setItemNumber(itemNumber);
4496 mandeep.dh 339
      args.setItemId(itemId);
5530 mandeep.dh 340
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 341
      sendBase("getNonSeralizedInventoryItem", args);
4496 mandeep.dh 342
    }
343
 
5361 mandeep.dh 344
    public InventoryItem recv_getNonSeralizedInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 345
    {
5361 mandeep.dh 346
      getNonSeralizedInventoryItem_result result = new getNonSeralizedInventoryItem_result();
347
      receiveBase(result, "getNonSeralizedInventoryItem");
4496 mandeep.dh 348
      if (result.isSetSuccess()) {
349
        return result.success;
2832 chandransh 350
      }
5361 mandeep.dh 351
      if (result.wex != null) {
352
        throw result.wex;
2820 chandransh 353
      }
5361 mandeep.dh 354
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNonSeralizedInventoryItem failed: unknown result");
4496 mandeep.dh 355
    }
356
 
5361 mandeep.dh 357
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 358
    {
5361 mandeep.dh 359
      send_scan(inventoryItem, type, quantity, billingWarehouseId);
4496 mandeep.dh 360
      recv_scan();
3383 chandransh 361
    }
362
 
5361 mandeep.dh 363
    public void send_scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws org.apache.thrift.TException
3383 chandransh 364
    {
4496 mandeep.dh 365
      scan_args args = new scan_args();
5361 mandeep.dh 366
      args.setInventoryItem(inventoryItem);
4496 mandeep.dh 367
      args.setType(type);
368
      args.setQuantity(quantity);
5361 mandeep.dh 369
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 370
      sendBase("scan", args);
3383 chandransh 371
    }
372
 
4496 mandeep.dh 373
    public void recv_scan() throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 374
    {
4496 mandeep.dh 375
      scan_result result = new scan_result();
376
      receiveBase(result, "scan");
377
      if (result.wex != null) {
378
        throw result.wex;
379
      }
380
      return;
381
    }
382
 
5110 mandeep.dh 383
    public InventoryItem scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 384
    {
5110 mandeep.dh 385
      send_scanSerializedItemForOrder(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId);
4496 mandeep.dh 386
      return recv_scanSerializedItemForOrder();
387
    }
388
 
5110 mandeep.dh 389
    public void send_scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 390
    {
391
      scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 392
      args.setSerialNumber(serialNumber);
4496 mandeep.dh 393
      args.setType(type);
394
      args.setOrderId(orderId);
5110 mandeep.dh 395
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
396
      args.setQuantity(quantity);
397
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 398
      sendBase("scanSerializedItemForOrder", args);
399
    }
400
 
4555 mandeep.dh 401
    public InventoryItem recv_scanSerializedItemForOrder() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 402
    {
403
      scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
404
      receiveBase(result, "scanSerializedItemForOrder");
3383 chandransh 405
      if (result.isSetSuccess()) {
406
        return result.success;
407
      }
408
      if (result.wex != null) {
409
        throw result.wex;
410
      }
4496 mandeep.dh 411
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanSerializedItemForOrder failed: unknown result");
3383 chandransh 412
    }
413
 
5361 mandeep.dh 414
    public InventoryItem scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 415
    {
5361 mandeep.dh 416
      send_scanForOrder(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId);
417
      return recv_scanForOrder();
2820 chandransh 418
    }
419
 
5361 mandeep.dh 420
    public void send_scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws org.apache.thrift.TException
2820 chandransh 421
    {
4496 mandeep.dh 422
      scanForOrder_args args = new scanForOrder_args();
5361 mandeep.dh 423
      args.setInventoryItem(inventoryItem);
3430 rajveer 424
      args.setType(type);
4496 mandeep.dh 425
      args.setQuantity(quantity);
426
      args.setOrderId(orderId);
5110 mandeep.dh 427
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 428
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 429
      sendBase("scanForOrder", args);
2820 chandransh 430
    }
431
 
5361 mandeep.dh 432
    public InventoryItem recv_scanForOrder() throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 433
    {
4496 mandeep.dh 434
      scanForOrder_result result = new scanForOrder_result();
435
      receiveBase(result, "scanForOrder");
5361 mandeep.dh 436
      if (result.isSetSuccess()) {
437
        return result.success;
438
      }
2820 chandransh 439
      if (result.wex != null) {
440
        throw result.wex;
441
      }
5361 mandeep.dh 442
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanForOrder failed: unknown result");
2820 chandransh 443
    }
444
 
4496 mandeep.dh 445
    public void createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 446
    {
4496 mandeep.dh 447
      send_createItemNumberMapping(itemNumber, itemId);
448
      recv_createItemNumberMapping();
2820 chandransh 449
    }
450
 
4496 mandeep.dh 451
    public void send_createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 452
    {
4496 mandeep.dh 453
      createItemNumberMapping_args args = new createItemNumberMapping_args();
3430 rajveer 454
      args.setItemNumber(itemNumber);
4496 mandeep.dh 455
      args.setItemId(itemId);
456
      sendBase("createItemNumberMapping", args);
2820 chandransh 457
    }
458
 
4496 mandeep.dh 459
    public void recv_createItemNumberMapping() throws org.apache.thrift.TException
2820 chandransh 460
    {
4496 mandeep.dh 461
      createItemNumberMapping_result result = new createItemNumberMapping_result();
462
      receiveBase(result, "createItemNumberMapping");
2820 chandransh 463
      return;
464
    }
465
 
4622 amit.gupta 466
    public List<String> getItemNumbers(long itemId) throws org.apache.thrift.TException
467
    {
468
      send_getItemNumbers(itemId);
469
      return recv_getItemNumbers();
470
    }
471
 
472
    public void send_getItemNumbers(long itemId) throws org.apache.thrift.TException
473
    {
474
      getItemNumbers_args args = new getItemNumbers_args();
475
      args.setItemId(itemId);
476
      sendBase("getItemNumbers", args);
477
    }
478
 
479
    public List<String> recv_getItemNumbers() throws org.apache.thrift.TException
480
    {
481
      getItemNumbers_result result = new getItemNumbers_result();
482
      receiveBase(result, "getItemNumbers");
483
      if (result.isSetSuccess()) {
484
        return result.success;
485
      }
486
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemNumbers failed: unknown result");
487
    }
488
 
5110 mandeep.dh 489
    public List<Long> getItemIds(String itemNumber) throws org.apache.thrift.TException
490
    {
491
      send_getItemIds(itemNumber);
492
      return recv_getItemIds();
493
    }
494
 
495
    public void send_getItemIds(String itemNumber) throws org.apache.thrift.TException
496
    {
497
      getItemIds_args args = new getItemIds_args();
498
      args.setItemNumber(itemNumber);
499
      sendBase("getItemIds", args);
500
    }
501
 
502
    public List<Long> recv_getItemIds() throws org.apache.thrift.TException
503
    {
504
      getItemIds_result result = new getItemIds_result();
505
      receiveBase(result, "getItemIds");
506
      if (result.isSetSuccess()) {
507
        return result.success;
508
      }
509
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemIds failed: unknown result");
510
    }
511
 
5185 mandeep.dh 512
    public List<InventoryItem> getInventoryItemsFromLastScanType(ScanType lastScanType) throws WarehouseServiceException, org.apache.thrift.TException
513
    {
514
      send_getInventoryItemsFromLastScanType(lastScanType);
515
      return recv_getInventoryItemsFromLastScanType();
516
    }
517
 
518
    public void send_getInventoryItemsFromLastScanType(ScanType lastScanType) throws org.apache.thrift.TException
519
    {
520
      getInventoryItemsFromLastScanType_args args = new getInventoryItemsFromLastScanType_args();
521
      args.setLastScanType(lastScanType);
522
      sendBase("getInventoryItemsFromLastScanType", args);
523
    }
524
 
525
    public List<InventoryItem> recv_getInventoryItemsFromLastScanType() throws WarehouseServiceException, org.apache.thrift.TException
526
    {
527
      getInventoryItemsFromLastScanType_result result = new getInventoryItemsFromLastScanType_result();
528
      receiveBase(result, "getInventoryItemsFromLastScanType");
529
      if (result.isSetSuccess()) {
530
        return result.success;
531
      }
532
      if (result.wex != null) {
533
        throw result.wex;
534
      }
535
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemsFromLastScanType failed: unknown result");
536
    }
537
 
538
    public InventoryItem getInventoryItemFromId(long inventoryItemId) throws WarehouseServiceException, org.apache.thrift.TException
539
    {
540
      send_getInventoryItemFromId(inventoryItemId);
541
      return recv_getInventoryItemFromId();
542
    }
543
 
544
    public void send_getInventoryItemFromId(long inventoryItemId) throws org.apache.thrift.TException
545
    {
546
      getInventoryItemFromId_args args = new getInventoryItemFromId_args();
547
      args.setInventoryItemId(inventoryItemId);
548
      sendBase("getInventoryItemFromId", args);
549
    }
550
 
551
    public InventoryItem recv_getInventoryItemFromId() throws WarehouseServiceException, org.apache.thrift.TException
552
    {
553
      getInventoryItemFromId_result result = new getInventoryItemFromId_result();
554
      receiveBase(result, "getInventoryItemFromId");
555
      if (result.isSetSuccess()) {
556
        return result.success;
557
      }
558
      if (result.wex != null) {
559
        throw result.wex;
560
      }
561
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromId failed: unknown result");
562
    }
563
 
5372 mandeep.dh 564
    public List<DetailedPurchaseScan> getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException
565
    {
566
      send_getPurchaseScans(startDate, endDate);
567
      return recv_getPurchaseScans();
568
    }
569
 
570
    public void send_getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException
571
    {
572
      getPurchaseScans_args args = new getPurchaseScans_args();
573
      args.setStartDate(startDate);
574
      args.setEndDate(endDate);
575
      sendBase("getPurchaseScans", args);
576
    }
577
 
578
    public List<DetailedPurchaseScan> recv_getPurchaseScans() throws org.apache.thrift.TException
579
    {
580
      getPurchaseScans_result result = new getPurchaseScans_result();
581
      receiveBase(result, "getPurchaseScans");
582
      if (result.isSetSuccess()) {
583
        return result.success;
584
      }
585
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseScans failed: unknown result");
586
    }
587
 
5496 mandeep.dh 588
    public List<InvoiceScan> fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException
589
    {
590
      send_fetchScansPerInvoiceNumber(date);
591
      return recv_fetchScansPerInvoiceNumber();
592
    }
593
 
594
    public void send_fetchScansPerInvoiceNumber(long date) throws org.apache.thrift.TException
595
    {
596
      fetchScansPerInvoiceNumber_args args = new fetchScansPerInvoiceNumber_args();
597
      args.setDate(date);
598
      sendBase("fetchScansPerInvoiceNumber", args);
599
    }
600
 
601
    public List<InvoiceScan> recv_fetchScansPerInvoiceNumber() throws org.apache.thrift.TException
602
    {
603
      fetchScansPerInvoiceNumber_result result = new fetchScansPerInvoiceNumber_result();
604
      receiveBase(result, "fetchScansPerInvoiceNumber");
605
      if (result.isSetSuccess()) {
606
        return result.success;
607
      }
608
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "fetchScansPerInvoiceNumber failed: unknown result");
609
    }
610
 
5620 mandeep.dh 611
    public InventoryItem getInventoryItemFromOrder(long orderId) throws WarehouseServiceException, org.apache.thrift.TException
612
    {
613
      send_getInventoryItemFromOrder(orderId);
614
      return recv_getInventoryItemFromOrder();
615
    }
616
 
617
    public void send_getInventoryItemFromOrder(long orderId) throws org.apache.thrift.TException
618
    {
619
      getInventoryItemFromOrder_args args = new getInventoryItemFromOrder_args();
620
      args.setOrderId(orderId);
621
      sendBase("getInventoryItemFromOrder", args);
622
    }
623
 
624
    public InventoryItem recv_getInventoryItemFromOrder() throws WarehouseServiceException, org.apache.thrift.TException
625
    {
626
      getInventoryItemFromOrder_result result = new getInventoryItemFromOrder_result();
627
      receiveBase(result, "getInventoryItemFromOrder");
628
      if (result.isSetSuccess()) {
629
        return result.success;
630
      }
631
      if (result.we != null) {
632
        throw result.we;
633
      }
634
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromOrder failed: unknown result");
635
    }
636
 
5711 mandeep.dh 637
    public List<InventoryAge> getInventoryAge() throws org.apache.thrift.TException
638
    {
639
      send_getInventoryAge();
640
      return recv_getInventoryAge();
641
    }
642
 
643
    public void send_getInventoryAge() throws org.apache.thrift.TException
644
    {
645
      getInventoryAge_args args = new getInventoryAge_args();
646
      sendBase("getInventoryAge", args);
647
    }
648
 
649
    public List<InventoryAge> recv_getInventoryAge() throws org.apache.thrift.TException
650
    {
651
      getInventoryAge_result result = new getInventoryAge_result();
652
      receiveBase(result, "getInventoryAge");
653
      if (result.isSetSuccess()) {
654
        return result.success;
655
      }
656
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryAge failed: unknown result");
657
    }
658
 
6322 amar.kumar 659
    public List<Scan> getInventoryScansForItem(long itemId, long fromDate, long toDate) throws org.apache.thrift.TException
660
    {
661
      send_getInventoryScansForItem(itemId, fromDate, toDate);
662
      return recv_getInventoryScansForItem();
663
    }
664
 
665
    public void send_getInventoryScansForItem(long itemId, long fromDate, long toDate) throws org.apache.thrift.TException
666
    {
667
      getInventoryScansForItem_args args = new getInventoryScansForItem_args();
668
      args.setItemId(itemId);
669
      args.setFromDate(fromDate);
670
      args.setToDate(toDate);
671
      sendBase("getInventoryScansForItem", args);
672
    }
673
 
674
    public List<Scan> recv_getInventoryScansForItem() throws org.apache.thrift.TException
675
    {
676
      getInventoryScansForItem_result result = new getInventoryScansForItem_result();
677
      receiveBase(result, "getInventoryScansForItem");
678
      if (result.isSetSuccess()) {
679
        return result.success;
680
      }
681
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryScansForItem failed: unknown result");
682
    }
683
 
684
    public List<Scan> getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException
685
    {
686
      send_getScanRecordsForSerialNumber(serialNumber);
687
      return recv_getScanRecordsForSerialNumber();
688
    }
689
 
690
    public void send_getScanRecordsForSerialNumber(long serialNumber) throws org.apache.thrift.TException
691
    {
692
      getScanRecordsForSerialNumber_args args = new getScanRecordsForSerialNumber_args();
693
      args.setSerialNumber(serialNumber);
694
      sendBase("getScanRecordsForSerialNumber", args);
695
    }
696
 
697
    public List<Scan> recv_getScanRecordsForSerialNumber() throws org.apache.thrift.TException
698
    {
699
      getScanRecordsForSerialNumber_result result = new getScanRecordsForSerialNumber_result();
700
      receiveBase(result, "getScanRecordsForSerialNumber");
701
      if (result.isSetSuccess()) {
702
        return result.success;
703
      }
704
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getScanRecordsForSerialNumber failed: unknown result");
705
    }
706
 
6467 amar.kumar 707
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId) throws WarehouseServiceException, org.apache.thrift.TException
708
    {
709
      send_scanForPurchaseReturn(saleReturnItems, vendorId);
710
      recv_scanForPurchaseReturn();
711
    }
712
 
713
    public void send_scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId) throws org.apache.thrift.TException
714
    {
715
      scanForPurchaseReturn_args args = new scanForPurchaseReturn_args();
716
      args.setSaleReturnItems(saleReturnItems);
717
      args.setVendorId(vendorId);
718
      sendBase("scanForPurchaseReturn", args);
719
    }
720
 
721
    public void recv_scanForPurchaseReturn() throws WarehouseServiceException, org.apache.thrift.TException
722
    {
723
      scanForPurchaseReturn_result result = new scanForPurchaseReturn_result();
724
      receiveBase(result, "scanForPurchaseReturn");
725
      if (result.ex != null) {
726
        throw result.ex;
727
      }
728
      return;
729
    }
730
 
6548 amar.kumar 731
    public void scanForLostItem(List<InventoryItem> lostItems, long vendorId) throws WarehouseServiceException, org.apache.thrift.TException
732
    {
733
      send_scanForLostItem(lostItems, vendorId);
734
      recv_scanForLostItem();
735
    }
736
 
737
    public void send_scanForLostItem(List<InventoryItem> lostItems, long vendorId) throws org.apache.thrift.TException
738
    {
739
      scanForLostItem_args args = new scanForLostItem_args();
740
      args.setLostItems(lostItems);
741
      args.setVendorId(vendorId);
742
      sendBase("scanForLostItem", args);
743
    }
744
 
745
    public void recv_scanForLostItem() throws WarehouseServiceException, org.apache.thrift.TException
746
    {
747
      scanForLostItem_result result = new scanForLostItem_result();
748
      receiveBase(result, "scanForLostItem");
749
      if (result.ex != null) {
750
        throw result.ex;
751
      }
752
      return;
753
    }
754
 
755
    public List<InventoryAvailability> getCurrentSerializedInventoryByScans() throws org.apache.thrift.TException
756
    {
757
      send_getCurrentSerializedInventoryByScans();
758
      return recv_getCurrentSerializedInventoryByScans();
759
    }
760
 
761
    public void send_getCurrentSerializedInventoryByScans() throws org.apache.thrift.TException
762
    {
763
      getCurrentSerializedInventoryByScans_args args = new getCurrentSerializedInventoryByScans_args();
764
      sendBase("getCurrentSerializedInventoryByScans", args);
765
    }
766
 
767
    public List<InventoryAvailability> recv_getCurrentSerializedInventoryByScans() throws org.apache.thrift.TException
768
    {
769
      getCurrentSerializedInventoryByScans_result result = new getCurrentSerializedInventoryByScans_result();
770
      receiveBase(result, "getCurrentSerializedInventoryByScans");
771
      if (result.isSetSuccess()) {
772
        return result.success;
773
      }
774
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCurrentSerializedInventoryByScans failed: unknown result");
775
    }
776
 
6630 amar.kumar 777
    public List<InventoryAvailability> getCurrentNonSerializedInventoryByScans() throws org.apache.thrift.TException
778
    {
779
      send_getCurrentNonSerializedInventoryByScans();
780
      return recv_getCurrentNonSerializedInventoryByScans();
781
    }
782
 
783
    public void send_getCurrentNonSerializedInventoryByScans() throws org.apache.thrift.TException
784
    {
785
      getCurrentNonSerializedInventoryByScans_args args = new getCurrentNonSerializedInventoryByScans_args();
786
      sendBase("getCurrentNonSerializedInventoryByScans", args);
787
    }
788
 
789
    public List<InventoryAvailability> recv_getCurrentNonSerializedInventoryByScans() throws org.apache.thrift.TException
790
    {
791
      getCurrentNonSerializedInventoryByScans_result result = new getCurrentNonSerializedInventoryByScans_result();
792
      receiveBase(result, "getCurrentNonSerializedInventoryByScans");
793
      if (result.isSetSuccess()) {
794
        return result.success;
795
      }
796
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getCurrentNonSerializedInventoryByScans failed: unknown result");
797
    }
798
 
6762 amar.kumar 799
    public List<InventoryAvailability> getHistoricSerializedInventoryByScans(long date) throws org.apache.thrift.TException
800
    {
801
      send_getHistoricSerializedInventoryByScans(date);
802
      return recv_getHistoricSerializedInventoryByScans();
803
    }
804
 
805
    public void send_getHistoricSerializedInventoryByScans(long date) throws org.apache.thrift.TException
806
    {
807
      getHistoricSerializedInventoryByScans_args args = new getHistoricSerializedInventoryByScans_args();
808
      args.setDate(date);
809
      sendBase("getHistoricSerializedInventoryByScans", args);
810
    }
811
 
812
    public List<InventoryAvailability> recv_getHistoricSerializedInventoryByScans() throws org.apache.thrift.TException
813
    {
814
      getHistoricSerializedInventoryByScans_result result = new getHistoricSerializedInventoryByScans_result();
815
      receiveBase(result, "getHistoricSerializedInventoryByScans");
816
      if (result.isSetSuccess()) {
817
        return result.success;
818
      }
819
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getHistoricSerializedInventoryByScans failed: unknown result");
820
    }
821
 
822
    public List<InventoryAvailability> getHistoricNonSerializedInventoryByScans(long date) throws org.apache.thrift.TException
823
    {
824
      send_getHistoricNonSerializedInventoryByScans(date);
825
      return recv_getHistoricNonSerializedInventoryByScans();
826
    }
827
 
828
    public void send_getHistoricNonSerializedInventoryByScans(long date) throws org.apache.thrift.TException
829
    {
830
      getHistoricNonSerializedInventoryByScans_args args = new getHistoricNonSerializedInventoryByScans_args();
831
      args.setDate(date);
832
      sendBase("getHistoricNonSerializedInventoryByScans", args);
833
    }
834
 
835
    public List<InventoryAvailability> recv_getHistoricNonSerializedInventoryByScans() throws org.apache.thrift.TException
836
    {
837
      getHistoricNonSerializedInventoryByScans_result result = new getHistoricNonSerializedInventoryByScans_result();
838
      receiveBase(result, "getHistoricNonSerializedInventoryByScans");
839
      if (result.isSetSuccess()) {
840
        return result.success;
841
      }
842
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getHistoricNonSerializedInventoryByScans failed: unknown result");
843
    }
844
 
845
    public InventoryItem scanForOursExternalSale(long itemId, String serialNumber, String itemNumber, String invoiceNumber, long warehouseId, double unitPrice, long orderId) throws WarehouseServiceException, org.apache.thrift.TException
846
    {
847
      send_scanForOursExternalSale(itemId, serialNumber, itemNumber, invoiceNumber, warehouseId, unitPrice, orderId);
848
      return recv_scanForOursExternalSale();
849
    }
850
 
851
    public void send_scanForOursExternalSale(long itemId, String serialNumber, String itemNumber, String invoiceNumber, long warehouseId, double unitPrice, long orderId) throws org.apache.thrift.TException
852
    {
853
      scanForOursExternalSale_args args = new scanForOursExternalSale_args();
854
      args.setItemId(itemId);
855
      args.setSerialNumber(serialNumber);
856
      args.setItemNumber(itemNumber);
857
      args.setInvoiceNumber(invoiceNumber);
858
      args.setWarehouseId(warehouseId);
859
      args.setUnitPrice(unitPrice);
860
      args.setOrderId(orderId);
861
      sendBase("scanForOursExternalSale", args);
862
    }
863
 
864
    public InventoryItem recv_scanForOursExternalSale() throws WarehouseServiceException, org.apache.thrift.TException
865
    {
866
      scanForOursExternalSale_result result = new scanForOursExternalSale_result();
867
      receiveBase(result, "scanForOursExternalSale");
868
      if (result.isSetSuccess()) {
869
        return result.success;
870
      }
871
      if (result.ex != null) {
872
        throw result.ex;
873
      }
874
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanForOursExternalSale failed: unknown result");
875
    }
876
 
877
    public void scanForOursExternalSaleReturn(long orderId, double unitPrice) throws org.apache.thrift.TException
878
    {
879
      send_scanForOursExternalSaleReturn(orderId, unitPrice);
880
      recv_scanForOursExternalSaleReturn();
881
    }
882
 
883
    public void send_scanForOursExternalSaleReturn(long orderId, double unitPrice) throws org.apache.thrift.TException
884
    {
885
      scanForOursExternalSaleReturn_args args = new scanForOursExternalSaleReturn_args();
886
      args.setOrderId(orderId);
887
      args.setUnitPrice(unitPrice);
888
      sendBase("scanForOursExternalSaleReturn", args);
889
    }
890
 
891
    public void recv_scanForOursExternalSaleReturn() throws org.apache.thrift.TException
892
    {
893
      scanForOursExternalSaleReturn_result result = new scanForOursExternalSaleReturn_result();
894
      receiveBase(result, "scanForOursExternalSaleReturn");
895
      return;
896
    }
897
 
6880 amar.kumar 898
    public List<InventoryMovement> getMovementNonSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException
899
    {
900
      send_getMovementNonSerializedInventoryByScans(startDate, endDate);
901
      return recv_getMovementNonSerializedInventoryByScans();
902
    }
903
 
904
    public void send_getMovementNonSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException
905
    {
906
      getMovementNonSerializedInventoryByScans_args args = new getMovementNonSerializedInventoryByScans_args();
907
      args.setStartDate(startDate);
908
      args.setEndDate(endDate);
909
      sendBase("getMovementNonSerializedInventoryByScans", args);
910
    }
911
 
912
    public List<InventoryMovement> recv_getMovementNonSerializedInventoryByScans() throws org.apache.thrift.TException
913
    {
914
      getMovementNonSerializedInventoryByScans_result result = new getMovementNonSerializedInventoryByScans_result();
915
      receiveBase(result, "getMovementNonSerializedInventoryByScans");
916
      if (result.isSetSuccess()) {
917
        return result.success;
918
      }
919
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getMovementNonSerializedInventoryByScans failed: unknown result");
920
    }
921
 
922
    public List<InventoryMovement> getMovementSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException
923
    {
924
      send_getMovementSerializedInventoryByScans(startDate, endDate);
925
      return recv_getMovementSerializedInventoryByScans();
926
    }
927
 
928
    public void send_getMovementSerializedInventoryByScans(long startDate, long endDate) throws org.apache.thrift.TException
929
    {
930
      getMovementSerializedInventoryByScans_args args = new getMovementSerializedInventoryByScans_args();
931
      args.setStartDate(startDate);
932
      args.setEndDate(endDate);
933
      sendBase("getMovementSerializedInventoryByScans", args);
934
    }
935
 
936
    public List<InventoryMovement> recv_getMovementSerializedInventoryByScans() throws org.apache.thrift.TException
937
    {
938
      getMovementSerializedInventoryByScans_result result = new getMovementSerializedInventoryByScans_result();
939
      receiveBase(result, "getMovementSerializedInventoryByScans");
940
      if (result.isSetSuccess()) {
941
        return result.success;
942
      }
943
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getMovementSerializedInventoryByScans failed: unknown result");
944
    }
945
 
7190 amar.kumar 946
    public InventoryItem scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType) throws WarehouseServiceException, org.apache.thrift.TException
947
    {
948
      send_scanfreebie(orderId, freebieItemId, freebieWarehouseId, scanType);
949
      return recv_scanfreebie();
950
    }
951
 
952
    public void send_scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType) throws org.apache.thrift.TException
953
    {
954
      scanfreebie_args args = new scanfreebie_args();
955
      args.setOrderId(orderId);
956
      args.setFreebieItemId(freebieItemId);
957
      args.setFreebieWarehouseId(freebieWarehouseId);
958
      args.setScanType(scanType);
959
      sendBase("scanfreebie", args);
960
    }
961
 
962
    public InventoryItem recv_scanfreebie() throws WarehouseServiceException, org.apache.thrift.TException
963
    {
964
      scanfreebie_result result = new scanfreebie_result();
965
      receiveBase(result, "scanfreebie");
966
      if (result.isSetSuccess()) {
967
        return result.success;
968
      }
969
      if (result.wex != null) {
970
        throw result.wex;
971
      }
972
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanfreebie failed: unknown result");
973
    }
974
 
2820 chandransh 975
  }
3430 rajveer 976
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
977
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
978
      private org.apache.thrift.async.TAsyncClientManager clientManager;
979
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
980
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
981
        this.clientManager = clientManager;
982
        this.protocolFactory = protocolFactory;
983
      }
984
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
985
        return new AsyncClient(protocolFactory, clientManager, transport);
986
      }
2820 chandransh 987
    }
988
 
3430 rajveer 989
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
990
      super(protocolFactory, clientManager, transport);
991
    }
2820 chandransh 992
 
4496 mandeep.dh 993
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<getInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 994
      checkReady();
4496 mandeep.dh 995
      getInventoryItem_call method_call = new getInventoryItem_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 996
      this.___currentMethod = method_call;
997
      ___manager.call(method_call);
998
    }
999
 
4496 mandeep.dh 1000
    public static class getInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
1001
      private String serialNumber;
1002
      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 {
3430 rajveer 1003
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 1004
        this.serialNumber = serialNumber;
3430 rajveer 1005
      }
1006
 
1007
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 1008
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
1009
        getInventoryItem_args args = new getInventoryItem_args();
1010
        args.setSerialNumber(serialNumber);
3430 rajveer 1011
        args.write(prot);
1012
        prot.writeMessageEnd();
1013
      }
1014
 
4541 mandeep.dh 1015
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 1016
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1017
          throw new IllegalStateException("Method call not finished!");
1018
        }
1019
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1020
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 1021
        return (new Client(prot)).recv_getInventoryItem();
3430 rajveer 1022
      }
1023
    }
1024
 
5530 mandeep.dh 1025
    public void getNonSeralizedInventoryItem(String itemNumber, long itemId, long fulfilmentWarehouseId, org.apache.thrift.async.AsyncMethodCallback<getNonSeralizedInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 1026
      checkReady();
5530 mandeep.dh 1027
      getNonSeralizedInventoryItem_call method_call = new getNonSeralizedInventoryItem_call(itemNumber, itemId, fulfilmentWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 1028
      this.___currentMethod = method_call;
1029
      ___manager.call(method_call);
1030
    }
1031
 
5361 mandeep.dh 1032
    public static class getNonSeralizedInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
5530 mandeep.dh 1033
      private String itemNumber;
4496 mandeep.dh 1034
      private long itemId;
5530 mandeep.dh 1035
      private long fulfilmentWarehouseId;
1036
      public getNonSeralizedInventoryItem_call(String itemNumber, long itemId, long fulfilmentWarehouseId, org.apache.thrift.async.AsyncMethodCallback<getNonSeralizedInventoryItem_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 {
3430 rajveer 1037
        super(client, protocolFactory, transport, resultHandler, false);
5530 mandeep.dh 1038
        this.itemNumber = itemNumber;
4496 mandeep.dh 1039
        this.itemId = itemId;
5530 mandeep.dh 1040
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
3430 rajveer 1041
      }
1042
 
1043
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
5361 mandeep.dh 1044
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNonSeralizedInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
1045
        getNonSeralizedInventoryItem_args args = new getNonSeralizedInventoryItem_args();
5530 mandeep.dh 1046
        args.setItemNumber(itemNumber);
4496 mandeep.dh 1047
        args.setItemId(itemId);
5530 mandeep.dh 1048
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
3430 rajveer 1049
        args.write(prot);
1050
        prot.writeMessageEnd();
1051
      }
1052
 
5361 mandeep.dh 1053
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 1054
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1055
          throw new IllegalStateException("Method call not finished!");
1056
        }
1057
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1058
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5361 mandeep.dh 1059
        return (new Client(prot)).recv_getNonSeralizedInventoryItem();
3430 rajveer 1060
      }
1061
    }
1062
 
5361 mandeep.dh 1063
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<scan_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 1064
      checkReady();
5361 mandeep.dh 1065
      scan_call method_call = new scan_call(inventoryItem, type, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 1066
      this.___currentMethod = method_call;
1067
      ___manager.call(method_call);
1068
    }
1069
 
4496 mandeep.dh 1070
    public static class scan_call extends org.apache.thrift.async.TAsyncMethodCall {
5361 mandeep.dh 1071
      private InventoryItem inventoryItem;
3430 rajveer 1072
      private ScanType type;
4496 mandeep.dh 1073
      private long quantity;
5361 mandeep.dh 1074
      private long billingWarehouseId;
1075
      public scan_call(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId, 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 {
3430 rajveer 1076
        super(client, protocolFactory, transport, resultHandler, false);
5361 mandeep.dh 1077
        this.inventoryItem = inventoryItem;
3430 rajveer 1078
        this.type = type;
4496 mandeep.dh 1079
        this.quantity = quantity;
5361 mandeep.dh 1080
        this.billingWarehouseId = billingWarehouseId;
3430 rajveer 1081
      }
1082
 
1083
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 1084
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scan", org.apache.thrift.protocol.TMessageType.CALL, 0));
1085
        scan_args args = new scan_args();
5361 mandeep.dh 1086
        args.setInventoryItem(inventoryItem);
3430 rajveer 1087
        args.setType(type);
4496 mandeep.dh 1088
        args.setQuantity(quantity);
5361 mandeep.dh 1089
        args.setBillingWarehouseId(billingWarehouseId);
3430 rajveer 1090
        args.write(prot);
1091
        prot.writeMessageEnd();
1092
      }
1093
 
1094
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1095
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1096
          throw new IllegalStateException("Method call not finished!");
1097
        }
1098
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1099
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 1100
        (new Client(prot)).recv_scan();
3430 rajveer 1101
      }
1102
    }
1103
 
5110 mandeep.dh 1104
    public void scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<scanSerializedItemForOrder_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1105
      checkReady();
5110 mandeep.dh 1106
      scanSerializedItemForOrder_call method_call = new scanSerializedItemForOrder_call(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1107
      this.___currentMethod = method_call;
1108
      ___manager.call(method_call);
1109
    }
1110
 
1111
    public static class scanSerializedItemForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
4555 mandeep.dh 1112
      private String serialNumber;
4496 mandeep.dh 1113
      private ScanType type;
1114
      private long orderId;
5110 mandeep.dh 1115
      private long fulfilmentWarehouseId;
1116
      private double quantity;
1117
      private long billingWarehouseId;
1118
      public scanSerializedItemForOrder_call(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId, 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 {
4496 mandeep.dh 1119
        super(client, protocolFactory, transport, resultHandler, false);
4555 mandeep.dh 1120
        this.serialNumber = serialNumber;
4496 mandeep.dh 1121
        this.type = type;
1122
        this.orderId = orderId;
5110 mandeep.dh 1123
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
1124
        this.quantity = quantity;
1125
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 1126
      }
1127
 
1128
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1129
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanSerializedItemForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1130
        scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 1131
        args.setSerialNumber(serialNumber);
4496 mandeep.dh 1132
        args.setType(type);
1133
        args.setOrderId(orderId);
5110 mandeep.dh 1134
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
1135
        args.setQuantity(quantity);
1136
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 1137
        args.write(prot);
1138
        prot.writeMessageEnd();
1139
      }
1140
 
4555 mandeep.dh 1141
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 1142
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1143
          throw new IllegalStateException("Method call not finished!");
1144
        }
1145
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1146
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1147
        return (new Client(prot)).recv_scanSerializedItemForOrder();
1148
      }
1149
    }
1150
 
5361 mandeep.dh 1151
    public void scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<scanForOrder_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1152
      checkReady();
5361 mandeep.dh 1153
      scanForOrder_call method_call = new scanForOrder_call(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1154
      this.___currentMethod = method_call;
1155
      ___manager.call(method_call);
1156
    }
1157
 
1158
    public static class scanForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
5361 mandeep.dh 1159
      private InventoryItem inventoryItem;
4496 mandeep.dh 1160
      private ScanType type;
1161
      private long quantity;
1162
      private long orderId;
5110 mandeep.dh 1163
      private long fulfilmentWarehouseId;
5361 mandeep.dh 1164
      private long billingWarehouseId;
1165
      public scanForOrder_call(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId, 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 {
4496 mandeep.dh 1166
        super(client, protocolFactory, transport, resultHandler, false);
5361 mandeep.dh 1167
        this.inventoryItem = inventoryItem;
4496 mandeep.dh 1168
        this.type = type;
1169
        this.quantity = quantity;
1170
        this.orderId = orderId;
5110 mandeep.dh 1171
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5361 mandeep.dh 1172
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 1173
      }
1174
 
1175
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1176
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1177
        scanForOrder_args args = new scanForOrder_args();
5361 mandeep.dh 1178
        args.setInventoryItem(inventoryItem);
4496 mandeep.dh 1179
        args.setType(type);
1180
        args.setQuantity(quantity);
1181
        args.setOrderId(orderId);
5110 mandeep.dh 1182
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 1183
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 1184
        args.write(prot);
1185
        prot.writeMessageEnd();
1186
      }
1187
 
5361 mandeep.dh 1188
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 1189
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1190
          throw new IllegalStateException("Method call not finished!");
1191
        }
1192
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1193
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5361 mandeep.dh 1194
        return (new Client(prot)).recv_scanForOrder();
4496 mandeep.dh 1195
      }
1196
    }
1197
 
1198
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException {
1199
      checkReady();
1200
      createItemNumberMapping_call method_call = new createItemNumberMapping_call(itemNumber, itemId, resultHandler, this, ___protocolFactory, ___transport);
1201
      this.___currentMethod = method_call;
1202
      ___manager.call(method_call);
1203
    }
1204
 
1205
    public static class createItemNumberMapping_call extends org.apache.thrift.async.TAsyncMethodCall {
1206
      private String itemNumber;
1207
      private long itemId;
1208
      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 {
1209
        super(client, protocolFactory, transport, resultHandler, false);
1210
        this.itemNumber = itemNumber;
1211
        this.itemId = itemId;
1212
      }
1213
 
1214
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1215
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createItemNumberMapping", org.apache.thrift.protocol.TMessageType.CALL, 0));
1216
        createItemNumberMapping_args args = new createItemNumberMapping_args();
1217
        args.setItemNumber(itemNumber);
1218
        args.setItemId(itemId);
1219
        args.write(prot);
1220
        prot.writeMessageEnd();
1221
      }
1222
 
1223
      public void getResult() throws org.apache.thrift.TException {
1224
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1225
          throw new IllegalStateException("Method call not finished!");
1226
        }
1227
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1228
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1229
        (new Client(prot)).recv_createItemNumberMapping();
1230
      }
1231
    }
1232
 
4622 amit.gupta 1233
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<getItemNumbers_call> resultHandler) throws org.apache.thrift.TException {
1234
      checkReady();
1235
      getItemNumbers_call method_call = new getItemNumbers_call(itemId, resultHandler, this, ___protocolFactory, ___transport);
1236
      this.___currentMethod = method_call;
1237
      ___manager.call(method_call);
1238
    }
1239
 
1240
    public static class getItemNumbers_call extends org.apache.thrift.async.TAsyncMethodCall {
1241
      private long itemId;
1242
      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 {
1243
        super(client, protocolFactory, transport, resultHandler, false);
1244
        this.itemId = itemId;
1245
      }
1246
 
1247
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1248
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemNumbers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1249
        getItemNumbers_args args = new getItemNumbers_args();
1250
        args.setItemId(itemId);
1251
        args.write(prot);
1252
        prot.writeMessageEnd();
1253
      }
1254
 
1255
      public List<String> getResult() throws org.apache.thrift.TException {
1256
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1257
          throw new IllegalStateException("Method call not finished!");
1258
        }
1259
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1260
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1261
        return (new Client(prot)).recv_getItemNumbers();
1262
      }
1263
    }
1264
 
5110 mandeep.dh 1265
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<getItemIds_call> resultHandler) throws org.apache.thrift.TException {
1266
      checkReady();
1267
      getItemIds_call method_call = new getItemIds_call(itemNumber, resultHandler, this, ___protocolFactory, ___transport);
1268
      this.___currentMethod = method_call;
1269
      ___manager.call(method_call);
1270
    }
1271
 
1272
    public static class getItemIds_call extends org.apache.thrift.async.TAsyncMethodCall {
1273
      private String itemNumber;
1274
      public getItemIds_call(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<getItemIds_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 {
1275
        super(client, protocolFactory, transport, resultHandler, false);
1276
        this.itemNumber = itemNumber;
1277
      }
1278
 
1279
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1280
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemIds", org.apache.thrift.protocol.TMessageType.CALL, 0));
1281
        getItemIds_args args = new getItemIds_args();
1282
        args.setItemNumber(itemNumber);
1283
        args.write(prot);
1284
        prot.writeMessageEnd();
1285
      }
1286
 
1287
      public List<Long> getResult() throws org.apache.thrift.TException {
1288
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1289
          throw new IllegalStateException("Method call not finished!");
1290
        }
1291
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1292
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1293
        return (new Client(prot)).recv_getItemIds();
1294
      }
1295
    }
1296
 
5185 mandeep.dh 1297
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException {
1298
      checkReady();
1299
      getInventoryItemsFromLastScanType_call method_call = new getInventoryItemsFromLastScanType_call(lastScanType, resultHandler, this, ___protocolFactory, ___transport);
1300
      this.___currentMethod = method_call;
1301
      ___manager.call(method_call);
1302
    }
1303
 
1304
    public static class getInventoryItemsFromLastScanType_call extends org.apache.thrift.async.TAsyncMethodCall {
1305
      private ScanType lastScanType;
1306
      public getInventoryItemsFromLastScanType_call(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemsFromLastScanType_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 {
1307
        super(client, protocolFactory, transport, resultHandler, false);
1308
        this.lastScanType = lastScanType;
1309
      }
1310
 
1311
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1312
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemsFromLastScanType", org.apache.thrift.protocol.TMessageType.CALL, 0));
1313
        getInventoryItemsFromLastScanType_args args = new getInventoryItemsFromLastScanType_args();
1314
        args.setLastScanType(lastScanType);
1315
        args.write(prot);
1316
        prot.writeMessageEnd();
1317
      }
1318
 
1319
      public List<InventoryItem> getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1320
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1321
          throw new IllegalStateException("Method call not finished!");
1322
        }
1323
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1324
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1325
        return (new Client(prot)).recv_getInventoryItemsFromLastScanType();
1326
      }
1327
    }
1328
 
1329
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException {
1330
      checkReady();
1331
      getInventoryItemFromId_call method_call = new getInventoryItemFromId_call(inventoryItemId, resultHandler, this, ___protocolFactory, ___transport);
1332
      this.___currentMethod = method_call;
1333
      ___manager.call(method_call);
1334
    }
1335
 
1336
    public static class getInventoryItemFromId_call extends org.apache.thrift.async.TAsyncMethodCall {
1337
      private long inventoryItemId;
1338
      public getInventoryItemFromId_call(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromId_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 {
1339
        super(client, protocolFactory, transport, resultHandler, false);
1340
        this.inventoryItemId = inventoryItemId;
1341
      }
1342
 
1343
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1344
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemFromId", org.apache.thrift.protocol.TMessageType.CALL, 0));
1345
        getInventoryItemFromId_args args = new getInventoryItemFromId_args();
1346
        args.setInventoryItemId(inventoryItemId);
1347
        args.write(prot);
1348
        prot.writeMessageEnd();
1349
      }
1350
 
1351
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1352
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1353
          throw new IllegalStateException("Method call not finished!");
1354
        }
1355
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1356
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1357
        return (new Client(prot)).recv_getInventoryItemFromId();
1358
      }
1359
    }
1360
 
5372 mandeep.dh 1361
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException {
1362
      checkReady();
1363
      getPurchaseScans_call method_call = new getPurchaseScans_call(startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
1364
      this.___currentMethod = method_call;
1365
      ___manager.call(method_call);
1366
    }
1367
 
1368
    public static class getPurchaseScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1369
      private long startDate;
1370
      private long endDate;
1371
      public getPurchaseScans_call(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getPurchaseScans_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 {
1372
        super(client, protocolFactory, transport, resultHandler, false);
1373
        this.startDate = startDate;
1374
        this.endDate = endDate;
1375
      }
1376
 
1377
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1378
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1379
        getPurchaseScans_args args = new getPurchaseScans_args();
1380
        args.setStartDate(startDate);
1381
        args.setEndDate(endDate);
1382
        args.write(prot);
1383
        prot.writeMessageEnd();
1384
      }
1385
 
1386
      public List<DetailedPurchaseScan> getResult() throws org.apache.thrift.TException {
1387
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1388
          throw new IllegalStateException("Method call not finished!");
1389
        }
1390
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1391
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1392
        return (new Client(prot)).recv_getPurchaseScans();
1393
      }
1394
    }
1395
 
5496 mandeep.dh 1396
    public void fetchScansPerInvoiceNumber(long date, org.apache.thrift.async.AsyncMethodCallback<fetchScansPerInvoiceNumber_call> resultHandler) throws org.apache.thrift.TException {
1397
      checkReady();
1398
      fetchScansPerInvoiceNumber_call method_call = new fetchScansPerInvoiceNumber_call(date, resultHandler, this, ___protocolFactory, ___transport);
1399
      this.___currentMethod = method_call;
1400
      ___manager.call(method_call);
1401
    }
1402
 
1403
    public static class fetchScansPerInvoiceNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
1404
      private long date;
1405
      public fetchScansPerInvoiceNumber_call(long date, org.apache.thrift.async.AsyncMethodCallback<fetchScansPerInvoiceNumber_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 {
1406
        super(client, protocolFactory, transport, resultHandler, false);
1407
        this.date = date;
1408
      }
1409
 
1410
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1411
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("fetchScansPerInvoiceNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
1412
        fetchScansPerInvoiceNumber_args args = new fetchScansPerInvoiceNumber_args();
1413
        args.setDate(date);
1414
        args.write(prot);
1415
        prot.writeMessageEnd();
1416
      }
1417
 
1418
      public List<InvoiceScan> getResult() throws org.apache.thrift.TException {
1419
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1420
          throw new IllegalStateException("Method call not finished!");
1421
        }
1422
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1423
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1424
        return (new Client(prot)).recv_fetchScansPerInvoiceNumber();
1425
      }
1426
    }
1427
 
5620 mandeep.dh 1428
    public void getInventoryItemFromOrder(long orderId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromOrder_call> resultHandler) throws org.apache.thrift.TException {
1429
      checkReady();
1430
      getInventoryItemFromOrder_call method_call = new getInventoryItemFromOrder_call(orderId, resultHandler, this, ___protocolFactory, ___transport);
1431
      this.___currentMethod = method_call;
1432
      ___manager.call(method_call);
1433
    }
1434
 
1435
    public static class getInventoryItemFromOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1436
      private long orderId;
1437
      public getInventoryItemFromOrder_call(long orderId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromOrder_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 {
1438
        super(client, protocolFactory, transport, resultHandler, false);
1439
        this.orderId = orderId;
1440
      }
1441
 
1442
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1443
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemFromOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1444
        getInventoryItemFromOrder_args args = new getInventoryItemFromOrder_args();
1445
        args.setOrderId(orderId);
1446
        args.write(prot);
1447
        prot.writeMessageEnd();
1448
      }
1449
 
1450
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1451
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1452
          throw new IllegalStateException("Method call not finished!");
1453
        }
1454
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1455
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1456
        return (new Client(prot)).recv_getInventoryItemFromOrder();
1457
      }
1458
    }
1459
 
5711 mandeep.dh 1460
    public void getInventoryAge(org.apache.thrift.async.AsyncMethodCallback<getInventoryAge_call> resultHandler) throws org.apache.thrift.TException {
1461
      checkReady();
1462
      getInventoryAge_call method_call = new getInventoryAge_call(resultHandler, this, ___protocolFactory, ___transport);
1463
      this.___currentMethod = method_call;
1464
      ___manager.call(method_call);
1465
    }
1466
 
1467
    public static class getInventoryAge_call extends org.apache.thrift.async.TAsyncMethodCall {
1468
      public getInventoryAge_call(org.apache.thrift.async.AsyncMethodCallback<getInventoryAge_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 {
1469
        super(client, protocolFactory, transport, resultHandler, false);
1470
      }
1471
 
1472
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1473
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryAge", org.apache.thrift.protocol.TMessageType.CALL, 0));
1474
        getInventoryAge_args args = new getInventoryAge_args();
1475
        args.write(prot);
1476
        prot.writeMessageEnd();
1477
      }
1478
 
1479
      public List<InventoryAge> getResult() throws org.apache.thrift.TException {
1480
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1481
          throw new IllegalStateException("Method call not finished!");
1482
        }
1483
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1484
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1485
        return (new Client(prot)).recv_getInventoryAge();
1486
      }
1487
    }
1488
 
6322 amar.kumar 1489
    public void getInventoryScansForItem(long itemId, long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<getInventoryScansForItem_call> resultHandler) throws org.apache.thrift.TException {
1490
      checkReady();
1491
      getInventoryScansForItem_call method_call = new getInventoryScansForItem_call(itemId, fromDate, toDate, resultHandler, this, ___protocolFactory, ___transport);
1492
      this.___currentMethod = method_call;
1493
      ___manager.call(method_call);
1494
    }
1495
 
1496
    public static class getInventoryScansForItem_call extends org.apache.thrift.async.TAsyncMethodCall {
1497
      private long itemId;
1498
      private long fromDate;
1499
      private long toDate;
1500
      public getInventoryScansForItem_call(long itemId, long fromDate, long toDate, org.apache.thrift.async.AsyncMethodCallback<getInventoryScansForItem_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 {
1501
        super(client, protocolFactory, transport, resultHandler, false);
1502
        this.itemId = itemId;
1503
        this.fromDate = fromDate;
1504
        this.toDate = toDate;
1505
      }
1506
 
1507
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1508
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryScansForItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
1509
        getInventoryScansForItem_args args = new getInventoryScansForItem_args();
1510
        args.setItemId(itemId);
1511
        args.setFromDate(fromDate);
1512
        args.setToDate(toDate);
1513
        args.write(prot);
1514
        prot.writeMessageEnd();
1515
      }
1516
 
1517
      public List<Scan> getResult() throws org.apache.thrift.TException {
1518
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1519
          throw new IllegalStateException("Method call not finished!");
1520
        }
1521
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1522
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1523
        return (new Client(prot)).recv_getInventoryScansForItem();
1524
      }
1525
    }
1526
 
1527
    public void getScanRecordsForSerialNumber(long serialNumber, org.apache.thrift.async.AsyncMethodCallback<getScanRecordsForSerialNumber_call> resultHandler) throws org.apache.thrift.TException {
1528
      checkReady();
1529
      getScanRecordsForSerialNumber_call method_call = new getScanRecordsForSerialNumber_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);
1530
      this.___currentMethod = method_call;
1531
      ___manager.call(method_call);
1532
    }
1533
 
1534
    public static class getScanRecordsForSerialNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
1535
      private long serialNumber;
1536
      public getScanRecordsForSerialNumber_call(long serialNumber, org.apache.thrift.async.AsyncMethodCallback<getScanRecordsForSerialNumber_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 {
1537
        super(client, protocolFactory, transport, resultHandler, false);
1538
        this.serialNumber = serialNumber;
1539
      }
1540
 
1541
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1542
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getScanRecordsForSerialNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
1543
        getScanRecordsForSerialNumber_args args = new getScanRecordsForSerialNumber_args();
1544
        args.setSerialNumber(serialNumber);
1545
        args.write(prot);
1546
        prot.writeMessageEnd();
1547
      }
1548
 
1549
      public List<Scan> getResult() throws org.apache.thrift.TException {
1550
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1551
          throw new IllegalStateException("Method call not finished!");
1552
        }
1553
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1554
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1555
        return (new Client(prot)).recv_getScanRecordsForSerialNumber();
1556
      }
1557
    }
1558
 
6467 amar.kumar 1559
    public void scanForPurchaseReturn(List<InventoryItem> saleReturnItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<scanForPurchaseReturn_call> resultHandler) throws org.apache.thrift.TException {
1560
      checkReady();
1561
      scanForPurchaseReturn_call method_call = new scanForPurchaseReturn_call(saleReturnItems, vendorId, resultHandler, this, ___protocolFactory, ___transport);
1562
      this.___currentMethod = method_call;
1563
      ___manager.call(method_call);
1564
    }
1565
 
1566
    public static class scanForPurchaseReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1567
      private List<InventoryItem> saleReturnItems;
1568
      private long vendorId;
1569
      public scanForPurchaseReturn_call(List<InventoryItem> saleReturnItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<scanForPurchaseReturn_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 {
1570
        super(client, protocolFactory, transport, resultHandler, false);
1571
        this.saleReturnItems = saleReturnItems;
1572
        this.vendorId = vendorId;
1573
      }
1574
 
1575
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1576
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForPurchaseReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1577
        scanForPurchaseReturn_args args = new scanForPurchaseReturn_args();
1578
        args.setSaleReturnItems(saleReturnItems);
1579
        args.setVendorId(vendorId);
1580
        args.write(prot);
1581
        prot.writeMessageEnd();
1582
      }
1583
 
1584
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1585
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1586
          throw new IllegalStateException("Method call not finished!");
1587
        }
1588
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1589
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1590
        (new Client(prot)).recv_scanForPurchaseReturn();
1591
      }
1592
    }
1593
 
6548 amar.kumar 1594
    public void scanForLostItem(List<InventoryItem> lostItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<scanForLostItem_call> resultHandler) throws org.apache.thrift.TException {
1595
      checkReady();
1596
      scanForLostItem_call method_call = new scanForLostItem_call(lostItems, vendorId, resultHandler, this, ___protocolFactory, ___transport);
1597
      this.___currentMethod = method_call;
1598
      ___manager.call(method_call);
1599
    }
1600
 
1601
    public static class scanForLostItem_call extends org.apache.thrift.async.TAsyncMethodCall {
1602
      private List<InventoryItem> lostItems;
1603
      private long vendorId;
1604
      public scanForLostItem_call(List<InventoryItem> lostItems, long vendorId, org.apache.thrift.async.AsyncMethodCallback<scanForLostItem_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 {
1605
        super(client, protocolFactory, transport, resultHandler, false);
1606
        this.lostItems = lostItems;
1607
        this.vendorId = vendorId;
1608
      }
1609
 
1610
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1611
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForLostItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
1612
        scanForLostItem_args args = new scanForLostItem_args();
1613
        args.setLostItems(lostItems);
1614
        args.setVendorId(vendorId);
1615
        args.write(prot);
1616
        prot.writeMessageEnd();
1617
      }
1618
 
1619
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1620
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1621
          throw new IllegalStateException("Method call not finished!");
1622
        }
1623
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1624
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1625
        (new Client(prot)).recv_scanForLostItem();
1626
      }
1627
    }
1628
 
1629
    public void getCurrentSerializedInventoryByScans(org.apache.thrift.async.AsyncMethodCallback<getCurrentSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1630
      checkReady();
1631
      getCurrentSerializedInventoryByScans_call method_call = new getCurrentSerializedInventoryByScans_call(resultHandler, this, ___protocolFactory, ___transport);
1632
      this.___currentMethod = method_call;
1633
      ___manager.call(method_call);
1634
    }
1635
 
1636
    public static class getCurrentSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1637
      public getCurrentSerializedInventoryByScans_call(org.apache.thrift.async.AsyncMethodCallback<getCurrentSerializedInventoryByScans_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 {
1638
        super(client, protocolFactory, transport, resultHandler, false);
1639
      }
1640
 
1641
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1642
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCurrentSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1643
        getCurrentSerializedInventoryByScans_args args = new getCurrentSerializedInventoryByScans_args();
1644
        args.write(prot);
1645
        prot.writeMessageEnd();
1646
      }
1647
 
1648
      public List<InventoryAvailability> getResult() throws org.apache.thrift.TException {
1649
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1650
          throw new IllegalStateException("Method call not finished!");
1651
        }
1652
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1653
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1654
        return (new Client(prot)).recv_getCurrentSerializedInventoryByScans();
1655
      }
1656
    }
1657
 
6630 amar.kumar 1658
    public void getCurrentNonSerializedInventoryByScans(org.apache.thrift.async.AsyncMethodCallback<getCurrentNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1659
      checkReady();
1660
      getCurrentNonSerializedInventoryByScans_call method_call = new getCurrentNonSerializedInventoryByScans_call(resultHandler, this, ___protocolFactory, ___transport);
1661
      this.___currentMethod = method_call;
1662
      ___manager.call(method_call);
1663
    }
1664
 
1665
    public static class getCurrentNonSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1666
      public getCurrentNonSerializedInventoryByScans_call(org.apache.thrift.async.AsyncMethodCallback<getCurrentNonSerializedInventoryByScans_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 {
1667
        super(client, protocolFactory, transport, resultHandler, false);
1668
      }
1669
 
1670
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1671
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getCurrentNonSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1672
        getCurrentNonSerializedInventoryByScans_args args = new getCurrentNonSerializedInventoryByScans_args();
1673
        args.write(prot);
1674
        prot.writeMessageEnd();
1675
      }
1676
 
1677
      public List<InventoryAvailability> getResult() throws org.apache.thrift.TException {
1678
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1679
          throw new IllegalStateException("Method call not finished!");
1680
        }
1681
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1682
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1683
        return (new Client(prot)).recv_getCurrentNonSerializedInventoryByScans();
1684
      }
1685
    }
1686
 
6762 amar.kumar 1687
    public void getHistoricSerializedInventoryByScans(long date, org.apache.thrift.async.AsyncMethodCallback<getHistoricSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1688
      checkReady();
1689
      getHistoricSerializedInventoryByScans_call method_call = new getHistoricSerializedInventoryByScans_call(date, resultHandler, this, ___protocolFactory, ___transport);
1690
      this.___currentMethod = method_call;
1691
      ___manager.call(method_call);
1692
    }
1693
 
1694
    public static class getHistoricSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1695
      private long date;
1696
      public getHistoricSerializedInventoryByScans_call(long date, org.apache.thrift.async.AsyncMethodCallback<getHistoricSerializedInventoryByScans_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 {
1697
        super(client, protocolFactory, transport, resultHandler, false);
1698
        this.date = date;
1699
      }
1700
 
1701
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1702
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getHistoricSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1703
        getHistoricSerializedInventoryByScans_args args = new getHistoricSerializedInventoryByScans_args();
1704
        args.setDate(date);
1705
        args.write(prot);
1706
        prot.writeMessageEnd();
1707
      }
1708
 
1709
      public List<InventoryAvailability> getResult() throws org.apache.thrift.TException {
1710
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1711
          throw new IllegalStateException("Method call not finished!");
1712
        }
1713
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1714
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1715
        return (new Client(prot)).recv_getHistoricSerializedInventoryByScans();
1716
      }
1717
    }
1718
 
1719
    public void getHistoricNonSerializedInventoryByScans(long date, org.apache.thrift.async.AsyncMethodCallback<getHistoricNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1720
      checkReady();
1721
      getHistoricNonSerializedInventoryByScans_call method_call = new getHistoricNonSerializedInventoryByScans_call(date, resultHandler, this, ___protocolFactory, ___transport);
1722
      this.___currentMethod = method_call;
1723
      ___manager.call(method_call);
1724
    }
1725
 
1726
    public static class getHistoricNonSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1727
      private long date;
1728
      public getHistoricNonSerializedInventoryByScans_call(long date, org.apache.thrift.async.AsyncMethodCallback<getHistoricNonSerializedInventoryByScans_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 {
1729
        super(client, protocolFactory, transport, resultHandler, false);
1730
        this.date = date;
1731
      }
1732
 
1733
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1734
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getHistoricNonSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1735
        getHistoricNonSerializedInventoryByScans_args args = new getHistoricNonSerializedInventoryByScans_args();
1736
        args.setDate(date);
1737
        args.write(prot);
1738
        prot.writeMessageEnd();
1739
      }
1740
 
1741
      public List<InventoryAvailability> getResult() throws org.apache.thrift.TException {
1742
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1743
          throw new IllegalStateException("Method call not finished!");
1744
        }
1745
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1746
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1747
        return (new Client(prot)).recv_getHistoricNonSerializedInventoryByScans();
1748
      }
1749
    }
1750
 
1751
    public void scanForOursExternalSale(long itemId, String serialNumber, String itemNumber, String invoiceNumber, long warehouseId, double unitPrice, long orderId, org.apache.thrift.async.AsyncMethodCallback<scanForOursExternalSale_call> resultHandler) throws org.apache.thrift.TException {
1752
      checkReady();
1753
      scanForOursExternalSale_call method_call = new scanForOursExternalSale_call(itemId, serialNumber, itemNumber, invoiceNumber, warehouseId, unitPrice, orderId, resultHandler, this, ___protocolFactory, ___transport);
1754
      this.___currentMethod = method_call;
1755
      ___manager.call(method_call);
1756
    }
1757
 
1758
    public static class scanForOursExternalSale_call extends org.apache.thrift.async.TAsyncMethodCall {
1759
      private long itemId;
1760
      private String serialNumber;
1761
      private String itemNumber;
1762
      private String invoiceNumber;
1763
      private long warehouseId;
1764
      private double unitPrice;
1765
      private long orderId;
1766
      public scanForOursExternalSale_call(long itemId, String serialNumber, String itemNumber, String invoiceNumber, long warehouseId, double unitPrice, long orderId, org.apache.thrift.async.AsyncMethodCallback<scanForOursExternalSale_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 {
1767
        super(client, protocolFactory, transport, resultHandler, false);
1768
        this.itemId = itemId;
1769
        this.serialNumber = serialNumber;
1770
        this.itemNumber = itemNumber;
1771
        this.invoiceNumber = invoiceNumber;
1772
        this.warehouseId = warehouseId;
1773
        this.unitPrice = unitPrice;
1774
        this.orderId = orderId;
1775
      }
1776
 
1777
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1778
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForOursExternalSale", org.apache.thrift.protocol.TMessageType.CALL, 0));
1779
        scanForOursExternalSale_args args = new scanForOursExternalSale_args();
1780
        args.setItemId(itemId);
1781
        args.setSerialNumber(serialNumber);
1782
        args.setItemNumber(itemNumber);
1783
        args.setInvoiceNumber(invoiceNumber);
1784
        args.setWarehouseId(warehouseId);
1785
        args.setUnitPrice(unitPrice);
1786
        args.setOrderId(orderId);
1787
        args.write(prot);
1788
        prot.writeMessageEnd();
1789
      }
1790
 
1791
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1792
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1793
          throw new IllegalStateException("Method call not finished!");
1794
        }
1795
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1796
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1797
        return (new Client(prot)).recv_scanForOursExternalSale();
1798
      }
1799
    }
1800
 
1801
    public void scanForOursExternalSaleReturn(long orderId, double unitPrice, org.apache.thrift.async.AsyncMethodCallback<scanForOursExternalSaleReturn_call> resultHandler) throws org.apache.thrift.TException {
1802
      checkReady();
1803
      scanForOursExternalSaleReturn_call method_call = new scanForOursExternalSaleReturn_call(orderId, unitPrice, resultHandler, this, ___protocolFactory, ___transport);
1804
      this.___currentMethod = method_call;
1805
      ___manager.call(method_call);
1806
    }
1807
 
1808
    public static class scanForOursExternalSaleReturn_call extends org.apache.thrift.async.TAsyncMethodCall {
1809
      private long orderId;
1810
      private double unitPrice;
1811
      public scanForOursExternalSaleReturn_call(long orderId, double unitPrice, org.apache.thrift.async.AsyncMethodCallback<scanForOursExternalSaleReturn_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 {
1812
        super(client, protocolFactory, transport, resultHandler, false);
1813
        this.orderId = orderId;
1814
        this.unitPrice = unitPrice;
1815
      }
1816
 
1817
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1818
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForOursExternalSaleReturn", org.apache.thrift.protocol.TMessageType.CALL, 0));
1819
        scanForOursExternalSaleReturn_args args = new scanForOursExternalSaleReturn_args();
1820
        args.setOrderId(orderId);
1821
        args.setUnitPrice(unitPrice);
1822
        args.write(prot);
1823
        prot.writeMessageEnd();
1824
      }
1825
 
1826
      public void getResult() throws org.apache.thrift.TException {
1827
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1828
          throw new IllegalStateException("Method call not finished!");
1829
        }
1830
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1831
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1832
        (new Client(prot)).recv_scanForOursExternalSaleReturn();
1833
      }
1834
    }
1835
 
6880 amar.kumar 1836
    public void getMovementNonSerializedInventoryByScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getMovementNonSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1837
      checkReady();
1838
      getMovementNonSerializedInventoryByScans_call method_call = new getMovementNonSerializedInventoryByScans_call(startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
1839
      this.___currentMethod = method_call;
1840
      ___manager.call(method_call);
1841
    }
1842
 
1843
    public static class getMovementNonSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1844
      private long startDate;
1845
      private long endDate;
1846
      public getMovementNonSerializedInventoryByScans_call(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getMovementNonSerializedInventoryByScans_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 {
1847
        super(client, protocolFactory, transport, resultHandler, false);
1848
        this.startDate = startDate;
1849
        this.endDate = endDate;
1850
      }
1851
 
1852
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1853
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getMovementNonSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1854
        getMovementNonSerializedInventoryByScans_args args = new getMovementNonSerializedInventoryByScans_args();
1855
        args.setStartDate(startDate);
1856
        args.setEndDate(endDate);
1857
        args.write(prot);
1858
        prot.writeMessageEnd();
1859
      }
1860
 
1861
      public List<InventoryMovement> getResult() throws org.apache.thrift.TException {
1862
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1863
          throw new IllegalStateException("Method call not finished!");
1864
        }
1865
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1866
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1867
        return (new Client(prot)).recv_getMovementNonSerializedInventoryByScans();
1868
      }
1869
    }
1870
 
1871
    public void getMovementSerializedInventoryByScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getMovementSerializedInventoryByScans_call> resultHandler) throws org.apache.thrift.TException {
1872
      checkReady();
1873
      getMovementSerializedInventoryByScans_call method_call = new getMovementSerializedInventoryByScans_call(startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
1874
      this.___currentMethod = method_call;
1875
      ___manager.call(method_call);
1876
    }
1877
 
1878
    public static class getMovementSerializedInventoryByScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1879
      private long startDate;
1880
      private long endDate;
1881
      public getMovementSerializedInventoryByScans_call(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getMovementSerializedInventoryByScans_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 {
1882
        super(client, protocolFactory, transport, resultHandler, false);
1883
        this.startDate = startDate;
1884
        this.endDate = endDate;
1885
      }
1886
 
1887
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1888
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getMovementSerializedInventoryByScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1889
        getMovementSerializedInventoryByScans_args args = new getMovementSerializedInventoryByScans_args();
1890
        args.setStartDate(startDate);
1891
        args.setEndDate(endDate);
1892
        args.write(prot);
1893
        prot.writeMessageEnd();
1894
      }
1895
 
1896
      public List<InventoryMovement> getResult() throws org.apache.thrift.TException {
1897
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1898
          throw new IllegalStateException("Method call not finished!");
1899
        }
1900
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1901
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1902
        return (new Client(prot)).recv_getMovementSerializedInventoryByScans();
1903
      }
1904
    }
1905
 
7190 amar.kumar 1906
    public void scanfreebie(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType, org.apache.thrift.async.AsyncMethodCallback<scanfreebie_call> resultHandler) throws org.apache.thrift.TException {
1907
      checkReady();
1908
      scanfreebie_call method_call = new scanfreebie_call(orderId, freebieItemId, freebieWarehouseId, scanType, resultHandler, this, ___protocolFactory, ___transport);
1909
      this.___currentMethod = method_call;
1910
      ___manager.call(method_call);
1911
    }
1912
 
1913
    public static class scanfreebie_call extends org.apache.thrift.async.TAsyncMethodCall {
1914
      private long orderId;
1915
      private long freebieItemId;
1916
      private long freebieWarehouseId;
1917
      private ScanType scanType;
1918
      public scanfreebie_call(long orderId, long freebieItemId, long freebieWarehouseId, ScanType scanType, org.apache.thrift.async.AsyncMethodCallback<scanfreebie_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 {
1919
        super(client, protocolFactory, transport, resultHandler, false);
1920
        this.orderId = orderId;
1921
        this.freebieItemId = freebieItemId;
1922
        this.freebieWarehouseId = freebieWarehouseId;
1923
        this.scanType = scanType;
1924
      }
1925
 
1926
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1927
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanfreebie", org.apache.thrift.protocol.TMessageType.CALL, 0));
1928
        scanfreebie_args args = new scanfreebie_args();
1929
        args.setOrderId(orderId);
1930
        args.setFreebieItemId(freebieItemId);
1931
        args.setFreebieWarehouseId(freebieWarehouseId);
1932
        args.setScanType(scanType);
1933
        args.write(prot);
1934
        prot.writeMessageEnd();
1935
      }
1936
 
1937
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1938
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1939
          throw new IllegalStateException("Method call not finished!");
1940
        }
1941
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1942
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1943
        return (new Client(prot)).recv_scanfreebie();
1944
      }
1945
    }
1946
 
3430 rajveer 1947
  }
1948
 
1949
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1950
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1951
    public Processor(I iface) {
1952
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
1953
    }
1954
 
1955
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1956
      super(iface, getProcessMap(processMap));
1957
    }
1958
 
1959
    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) {
4496 mandeep.dh 1960
      processMap.put("getInventoryItem", new getInventoryItem());
5361 mandeep.dh 1961
      processMap.put("getNonSeralizedInventoryItem", new getNonSeralizedInventoryItem());
4496 mandeep.dh 1962
      processMap.put("scan", new scan());
1963
      processMap.put("scanSerializedItemForOrder", new scanSerializedItemForOrder());
1964
      processMap.put("scanForOrder", new scanForOrder());
1965
      processMap.put("createItemNumberMapping", new createItemNumberMapping());
4622 amit.gupta 1966
      processMap.put("getItemNumbers", new getItemNumbers());
5110 mandeep.dh 1967
      processMap.put("getItemIds", new getItemIds());
5185 mandeep.dh 1968
      processMap.put("getInventoryItemsFromLastScanType", new getInventoryItemsFromLastScanType());
1969
      processMap.put("getInventoryItemFromId", new getInventoryItemFromId());
5372 mandeep.dh 1970
      processMap.put("getPurchaseScans", new getPurchaseScans());
5496 mandeep.dh 1971
      processMap.put("fetchScansPerInvoiceNumber", new fetchScansPerInvoiceNumber());
5620 mandeep.dh 1972
      processMap.put("getInventoryItemFromOrder", new getInventoryItemFromOrder());
5711 mandeep.dh 1973
      processMap.put("getInventoryAge", new getInventoryAge());
6322 amar.kumar 1974
      processMap.put("getInventoryScansForItem", new getInventoryScansForItem());
1975
      processMap.put("getScanRecordsForSerialNumber", new getScanRecordsForSerialNumber());
6467 amar.kumar 1976
      processMap.put("scanForPurchaseReturn", new scanForPurchaseReturn());
6548 amar.kumar 1977
      processMap.put("scanForLostItem", new scanForLostItem());
1978
      processMap.put("getCurrentSerializedInventoryByScans", new getCurrentSerializedInventoryByScans());
6630 amar.kumar 1979
      processMap.put("getCurrentNonSerializedInventoryByScans", new getCurrentNonSerializedInventoryByScans());
6762 amar.kumar 1980
      processMap.put("getHistoricSerializedInventoryByScans", new getHistoricSerializedInventoryByScans());
1981
      processMap.put("getHistoricNonSerializedInventoryByScans", new getHistoricNonSerializedInventoryByScans());
1982
      processMap.put("scanForOursExternalSale", new scanForOursExternalSale());
1983
      processMap.put("scanForOursExternalSaleReturn", new scanForOursExternalSaleReturn());
6880 amar.kumar 1984
      processMap.put("getMovementNonSerializedInventoryByScans", new getMovementNonSerializedInventoryByScans());
1985
      processMap.put("getMovementSerializedInventoryByScans", new getMovementSerializedInventoryByScans());
7190 amar.kumar 1986
      processMap.put("scanfreebie", new scanfreebie());
3430 rajveer 1987
      return processMap;
1988
    }
1989
 
4496 mandeep.dh 1990
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
1991
      public getInventoryItem() {
1992
        super("getInventoryItem");
3430 rajveer 1993
      }
1994
 
4496 mandeep.dh 1995
      protected getInventoryItem_args getEmptyArgsInstance() {
1996
        return new getInventoryItem_args();
3430 rajveer 1997
      }
1998
 
4496 mandeep.dh 1999
      protected getInventoryItem_result getResult(I iface, getInventoryItem_args args) throws org.apache.thrift.TException {
2000
        getInventoryItem_result result = new getInventoryItem_result();
4541 mandeep.dh 2001
        try {
2002
          result.success = iface.getInventoryItem(args.serialNumber);
2003
        } catch (WarehouseServiceException wex) {
2004
          result.wex = wex;
2005
        }
3430 rajveer 2006
        return result;
2832 chandransh 2007
      }
2008
    }
2009
 
5361 mandeep.dh 2010
    private static class getNonSeralizedInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getNonSeralizedInventoryItem_args> {
2011
      public getNonSeralizedInventoryItem() {
2012
        super("getNonSeralizedInventoryItem");
3430 rajveer 2013
      }
2014
 
5361 mandeep.dh 2015
      protected getNonSeralizedInventoryItem_args getEmptyArgsInstance() {
2016
        return new getNonSeralizedInventoryItem_args();
3430 rajveer 2017
      }
2018
 
5361 mandeep.dh 2019
      protected getNonSeralizedInventoryItem_result getResult(I iface, getNonSeralizedInventoryItem_args args) throws org.apache.thrift.TException {
2020
        getNonSeralizedInventoryItem_result result = new getNonSeralizedInventoryItem_result();
2021
        try {
5530 mandeep.dh 2022
          result.success = iface.getNonSeralizedInventoryItem(args.itemNumber, args.itemId, args.fulfilmentWarehouseId);
5361 mandeep.dh 2023
        } catch (WarehouseServiceException wex) {
2024
          result.wex = wex;
2025
        }
3430 rajveer 2026
        return result;
2820 chandransh 2027
      }
2028
    }
2029
 
4496 mandeep.dh 2030
    private static class scan<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scan_args> {
2031
      public scan() {
2032
        super("scan");
3430 rajveer 2033
      }
2034
 
4496 mandeep.dh 2035
      protected scan_args getEmptyArgsInstance() {
2036
        return new scan_args();
3430 rajveer 2037
      }
2038
 
4496 mandeep.dh 2039
      protected scan_result getResult(I iface, scan_args args) throws org.apache.thrift.TException {
2040
        scan_result result = new scan_result();
3383 chandransh 2041
        try {
5361 mandeep.dh 2042
          iface.scan(args.inventoryItem, args.type, args.quantity, args.billingWarehouseId);
3383 chandransh 2043
        } catch (WarehouseServiceException wex) {
2044
          result.wex = wex;
2045
        }
3430 rajveer 2046
        return result;
3383 chandransh 2047
      }
2048
    }
2049
 
4496 mandeep.dh 2050
    private static class scanSerializedItemForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanSerializedItemForOrder_args> {
2051
      public scanSerializedItemForOrder() {
2052
        super("scanSerializedItemForOrder");
3430 rajveer 2053
      }
2054
 
4496 mandeep.dh 2055
      protected scanSerializedItemForOrder_args getEmptyArgsInstance() {
2056
        return new scanSerializedItemForOrder_args();
3430 rajveer 2057
      }
2058
 
4496 mandeep.dh 2059
      protected scanSerializedItemForOrder_result getResult(I iface, scanSerializedItemForOrder_args args) throws org.apache.thrift.TException {
2060
        scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
2820 chandransh 2061
        try {
5110 mandeep.dh 2062
          result.success = iface.scanSerializedItemForOrder(args.serialNumber, args.type, args.orderId, args.fulfilmentWarehouseId, args.quantity, args.billingWarehouseId);
2820 chandransh 2063
        } catch (WarehouseServiceException wex) {
2064
          result.wex = wex;
2065
        }
3430 rajveer 2066
        return result;
2820 chandransh 2067
      }
2068
    }
2069
 
4496 mandeep.dh 2070
    private static class scanForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForOrder_args> {
2071
      public scanForOrder() {
2072
        super("scanForOrder");
3430 rajveer 2073
      }
2074
 
4496 mandeep.dh 2075
      protected scanForOrder_args getEmptyArgsInstance() {
2076
        return new scanForOrder_args();
3430 rajveer 2077
      }
2078
 
4496 mandeep.dh 2079
      protected scanForOrder_result getResult(I iface, scanForOrder_args args) throws org.apache.thrift.TException {
2080
        scanForOrder_result result = new scanForOrder_result();
2820 chandransh 2081
        try {
5361 mandeep.dh 2082
          result.success = iface.scanForOrder(args.inventoryItem, args.type, args.quantity, args.orderId, args.fulfilmentWarehouseId, args.billingWarehouseId);
2820 chandransh 2083
        } catch (WarehouseServiceException wex) {
2084
          result.wex = wex;
2085
        }
3430 rajveer 2086
        return result;
2820 chandransh 2087
      }
2088
    }
2089
 
4496 mandeep.dh 2090
    private static class createItemNumberMapping<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createItemNumberMapping_args> {
2091
      public createItemNumberMapping() {
2092
        super("createItemNumberMapping");
2093
      }
2094
 
2095
      protected createItemNumberMapping_args getEmptyArgsInstance() {
2096
        return new createItemNumberMapping_args();
2097
      }
2098
 
2099
      protected createItemNumberMapping_result getResult(I iface, createItemNumberMapping_args args) throws org.apache.thrift.TException {
2100
        createItemNumberMapping_result result = new createItemNumberMapping_result();
2101
        iface.createItemNumberMapping(args.itemNumber, args.itemId);
2102
        return result;
2103
      }
2104
    }
2105
 
4622 amit.gupta 2106
    private static class getItemNumbers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemNumbers_args> {
2107
      public getItemNumbers() {
2108
        super("getItemNumbers");
2109
      }
2110
 
2111
      protected getItemNumbers_args getEmptyArgsInstance() {
2112
        return new getItemNumbers_args();
2113
      }
2114
 
2115
      protected getItemNumbers_result getResult(I iface, getItemNumbers_args args) throws org.apache.thrift.TException {
2116
        getItemNumbers_result result = new getItemNumbers_result();
2117
        result.success = iface.getItemNumbers(args.itemId);
2118
        return result;
2119
      }
2120
    }
2121
 
5110 mandeep.dh 2122
    private static class getItemIds<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemIds_args> {
2123
      public getItemIds() {
2124
        super("getItemIds");
2125
      }
2126
 
2127
      protected getItemIds_args getEmptyArgsInstance() {
2128
        return new getItemIds_args();
2129
      }
2130
 
2131
      protected getItemIds_result getResult(I iface, getItemIds_args args) throws org.apache.thrift.TException {
2132
        getItemIds_result result = new getItemIds_result();
2133
        result.success = iface.getItemIds(args.itemNumber);
2134
        return result;
2135
      }
2136
    }
2137
 
5185 mandeep.dh 2138
    private static class getInventoryItemsFromLastScanType<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemsFromLastScanType_args> {
2139
      public getInventoryItemsFromLastScanType() {
2140
        super("getInventoryItemsFromLastScanType");
2141
      }
2142
 
2143
      protected getInventoryItemsFromLastScanType_args getEmptyArgsInstance() {
2144
        return new getInventoryItemsFromLastScanType_args();
2145
      }
2146
 
2147
      protected getInventoryItemsFromLastScanType_result getResult(I iface, getInventoryItemsFromLastScanType_args args) throws org.apache.thrift.TException {
2148
        getInventoryItemsFromLastScanType_result result = new getInventoryItemsFromLastScanType_result();
2149
        try {
2150
          result.success = iface.getInventoryItemsFromLastScanType(args.lastScanType);
2151
        } catch (WarehouseServiceException wex) {
2152
          result.wex = wex;
2153
        }
2154
        return result;
2155
      }
2156
    }
2157
 
2158
    private static class getInventoryItemFromId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemFromId_args> {
2159
      public getInventoryItemFromId() {
2160
        super("getInventoryItemFromId");
2161
      }
2162
 
2163
      protected getInventoryItemFromId_args getEmptyArgsInstance() {
2164
        return new getInventoryItemFromId_args();
2165
      }
2166
 
2167
      protected getInventoryItemFromId_result getResult(I iface, getInventoryItemFromId_args args) throws org.apache.thrift.TException {
2168
        getInventoryItemFromId_result result = new getInventoryItemFromId_result();
2169
        try {
2170
          result.success = iface.getInventoryItemFromId(args.inventoryItemId);
2171
        } catch (WarehouseServiceException wex) {
2172
          result.wex = wex;
2173
        }
2174
        return result;
2175
      }
2176
    }
2177
 
5372 mandeep.dh 2178
    private static class getPurchaseScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseScans_args> {
2179
      public getPurchaseScans() {
2180
        super("getPurchaseScans");
2181
      }
2182
 
2183
      protected getPurchaseScans_args getEmptyArgsInstance() {
2184
        return new getPurchaseScans_args();
2185
      }
2186
 
2187
      protected getPurchaseScans_result getResult(I iface, getPurchaseScans_args args) throws org.apache.thrift.TException {
2188
        getPurchaseScans_result result = new getPurchaseScans_result();
2189
        result.success = iface.getPurchaseScans(args.startDate, args.endDate);
2190
        return result;
2191
      }
2192
    }
2193
 
5496 mandeep.dh 2194
    private static class fetchScansPerInvoiceNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, fetchScansPerInvoiceNumber_args> {
2195
      public fetchScansPerInvoiceNumber() {
2196
        super("fetchScansPerInvoiceNumber");
2197
      }
2198
 
2199
      protected fetchScansPerInvoiceNumber_args getEmptyArgsInstance() {
2200
        return new fetchScansPerInvoiceNumber_args();
2201
      }
2202
 
2203
      protected fetchScansPerInvoiceNumber_result getResult(I iface, fetchScansPerInvoiceNumber_args args) throws org.apache.thrift.TException {
2204
        fetchScansPerInvoiceNumber_result result = new fetchScansPerInvoiceNumber_result();
2205
        result.success = iface.fetchScansPerInvoiceNumber(args.date);
2206
        return result;
2207
      }
2208
    }
2209
 
5620 mandeep.dh 2210
    private static class getInventoryItemFromOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemFromOrder_args> {
2211
      public getInventoryItemFromOrder() {
2212
        super("getInventoryItemFromOrder");
2213
      }
2214
 
2215
      protected getInventoryItemFromOrder_args getEmptyArgsInstance() {
2216
        return new getInventoryItemFromOrder_args();
2217
      }
2218
 
2219
      protected getInventoryItemFromOrder_result getResult(I iface, getInventoryItemFromOrder_args args) throws org.apache.thrift.TException {
2220
        getInventoryItemFromOrder_result result = new getInventoryItemFromOrder_result();
2221
        try {
2222
          result.success = iface.getInventoryItemFromOrder(args.orderId);
2223
        } catch (WarehouseServiceException we) {
2224
          result.we = we;
2225
        }
2226
        return result;
2227
      }
2228
    }
2229
 
5711 mandeep.dh 2230
    private static class getInventoryAge<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryAge_args> {
2231
      public getInventoryAge() {
2232
        super("getInventoryAge");
2233
      }
2234
 
2235
      protected getInventoryAge_args getEmptyArgsInstance() {
2236
        return new getInventoryAge_args();
2237
      }
2238
 
2239
      protected getInventoryAge_result getResult(I iface, getInventoryAge_args args) throws org.apache.thrift.TException {
2240
        getInventoryAge_result result = new getInventoryAge_result();
2241
        result.success = iface.getInventoryAge();
2242
        return result;
2243
      }
2244
    }
2245
 
6322 amar.kumar 2246
    private static class getInventoryScansForItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryScansForItem_args> {
2247
      public getInventoryScansForItem() {
2248
        super("getInventoryScansForItem");
2249
      }
2250
 
2251
      protected getInventoryScansForItem_args getEmptyArgsInstance() {
2252
        return new getInventoryScansForItem_args();
2253
      }
2254
 
2255
      protected getInventoryScansForItem_result getResult(I iface, getInventoryScansForItem_args args) throws org.apache.thrift.TException {
2256
        getInventoryScansForItem_result result = new getInventoryScansForItem_result();
2257
        result.success = iface.getInventoryScansForItem(args.itemId, args.fromDate, args.toDate);
2258
        return result;
2259
      }
2260
    }
2261
 
2262
    private static class getScanRecordsForSerialNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getScanRecordsForSerialNumber_args> {
2263
      public getScanRecordsForSerialNumber() {
2264
        super("getScanRecordsForSerialNumber");
2265
      }
2266
 
2267
      protected getScanRecordsForSerialNumber_args getEmptyArgsInstance() {
2268
        return new getScanRecordsForSerialNumber_args();
2269
      }
2270
 
2271
      protected getScanRecordsForSerialNumber_result getResult(I iface, getScanRecordsForSerialNumber_args args) throws org.apache.thrift.TException {
2272
        getScanRecordsForSerialNumber_result result = new getScanRecordsForSerialNumber_result();
2273
        result.success = iface.getScanRecordsForSerialNumber(args.serialNumber);
2274
        return result;
2275
      }
2276
    }
2277
 
6467 amar.kumar 2278
    private static class scanForPurchaseReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForPurchaseReturn_args> {
2279
      public scanForPurchaseReturn() {
2280
        super("scanForPurchaseReturn");
2281
      }
2282
 
2283
      protected scanForPurchaseReturn_args getEmptyArgsInstance() {
2284
        return new scanForPurchaseReturn_args();
2285
      }
2286
 
2287
      protected scanForPurchaseReturn_result getResult(I iface, scanForPurchaseReturn_args args) throws org.apache.thrift.TException {
2288
        scanForPurchaseReturn_result result = new scanForPurchaseReturn_result();
2289
        try {
2290
          iface.scanForPurchaseReturn(args.saleReturnItems, args.vendorId);
2291
        } catch (WarehouseServiceException ex) {
2292
          result.ex = ex;
2293
        }
2294
        return result;
2295
      }
2296
    }
2297
 
6548 amar.kumar 2298
    private static class scanForLostItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForLostItem_args> {
2299
      public scanForLostItem() {
2300
        super("scanForLostItem");
2301
      }
2302
 
2303
      protected scanForLostItem_args getEmptyArgsInstance() {
2304
        return new scanForLostItem_args();
2305
      }
2306
 
2307
      protected scanForLostItem_result getResult(I iface, scanForLostItem_args args) throws org.apache.thrift.TException {
2308
        scanForLostItem_result result = new scanForLostItem_result();
2309
        try {
2310
          iface.scanForLostItem(args.lostItems, args.vendorId);
2311
        } catch (WarehouseServiceException ex) {
2312
          result.ex = ex;
2313
        }
2314
        return result;
2315
      }
2316
    }
2317
 
2318
    private static class getCurrentSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCurrentSerializedInventoryByScans_args> {
2319
      public getCurrentSerializedInventoryByScans() {
2320
        super("getCurrentSerializedInventoryByScans");
2321
      }
2322
 
2323
      protected getCurrentSerializedInventoryByScans_args getEmptyArgsInstance() {
2324
        return new getCurrentSerializedInventoryByScans_args();
2325
      }
2326
 
2327
      protected getCurrentSerializedInventoryByScans_result getResult(I iface, getCurrentSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
2328
        getCurrentSerializedInventoryByScans_result result = new getCurrentSerializedInventoryByScans_result();
2329
        result.success = iface.getCurrentSerializedInventoryByScans();
2330
        return result;
2331
      }
2332
    }
2333
 
6630 amar.kumar 2334
    private static class getCurrentNonSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getCurrentNonSerializedInventoryByScans_args> {
2335
      public getCurrentNonSerializedInventoryByScans() {
2336
        super("getCurrentNonSerializedInventoryByScans");
2337
      }
2338
 
2339
      protected getCurrentNonSerializedInventoryByScans_args getEmptyArgsInstance() {
2340
        return new getCurrentNonSerializedInventoryByScans_args();
2341
      }
2342
 
2343
      protected getCurrentNonSerializedInventoryByScans_result getResult(I iface, getCurrentNonSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
2344
        getCurrentNonSerializedInventoryByScans_result result = new getCurrentNonSerializedInventoryByScans_result();
2345
        result.success = iface.getCurrentNonSerializedInventoryByScans();
2346
        return result;
2347
      }
2348
    }
2349
 
6762 amar.kumar 2350
    private static class getHistoricSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getHistoricSerializedInventoryByScans_args> {
2351
      public getHistoricSerializedInventoryByScans() {
2352
        super("getHistoricSerializedInventoryByScans");
2353
      }
2354
 
2355
      protected getHistoricSerializedInventoryByScans_args getEmptyArgsInstance() {
2356
        return new getHistoricSerializedInventoryByScans_args();
2357
      }
2358
 
2359
      protected getHistoricSerializedInventoryByScans_result getResult(I iface, getHistoricSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
2360
        getHistoricSerializedInventoryByScans_result result = new getHistoricSerializedInventoryByScans_result();
2361
        result.success = iface.getHistoricSerializedInventoryByScans(args.date);
2362
        return result;
2363
      }
2364
    }
2365
 
2366
    private static class getHistoricNonSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getHistoricNonSerializedInventoryByScans_args> {
2367
      public getHistoricNonSerializedInventoryByScans() {
2368
        super("getHistoricNonSerializedInventoryByScans");
2369
      }
2370
 
2371
      protected getHistoricNonSerializedInventoryByScans_args getEmptyArgsInstance() {
2372
        return new getHistoricNonSerializedInventoryByScans_args();
2373
      }
2374
 
2375
      protected getHistoricNonSerializedInventoryByScans_result getResult(I iface, getHistoricNonSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
2376
        getHistoricNonSerializedInventoryByScans_result result = new getHistoricNonSerializedInventoryByScans_result();
2377
        result.success = iface.getHistoricNonSerializedInventoryByScans(args.date);
2378
        return result;
2379
      }
2380
    }
2381
 
2382
    private static class scanForOursExternalSale<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForOursExternalSale_args> {
2383
      public scanForOursExternalSale() {
2384
        super("scanForOursExternalSale");
2385
      }
2386
 
2387
      protected scanForOursExternalSale_args getEmptyArgsInstance() {
2388
        return new scanForOursExternalSale_args();
2389
      }
2390
 
2391
      protected scanForOursExternalSale_result getResult(I iface, scanForOursExternalSale_args args) throws org.apache.thrift.TException {
2392
        scanForOursExternalSale_result result = new scanForOursExternalSale_result();
2393
        try {
2394
          result.success = iface.scanForOursExternalSale(args.itemId, args.serialNumber, args.itemNumber, args.invoiceNumber, args.warehouseId, args.unitPrice, args.orderId);
2395
        } catch (WarehouseServiceException ex) {
2396
          result.ex = ex;
2397
        }
2398
        return result;
2399
      }
2400
    }
2401
 
2402
    private static class scanForOursExternalSaleReturn<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForOursExternalSaleReturn_args> {
2403
      public scanForOursExternalSaleReturn() {
2404
        super("scanForOursExternalSaleReturn");
2405
      }
2406
 
2407
      protected scanForOursExternalSaleReturn_args getEmptyArgsInstance() {
2408
        return new scanForOursExternalSaleReturn_args();
2409
      }
2410
 
2411
      protected scanForOursExternalSaleReturn_result getResult(I iface, scanForOursExternalSaleReturn_args args) throws org.apache.thrift.TException {
2412
        scanForOursExternalSaleReturn_result result = new scanForOursExternalSaleReturn_result();
2413
        iface.scanForOursExternalSaleReturn(args.orderId, args.unitPrice);
2414
        return result;
2415
      }
2416
    }
2417
 
6880 amar.kumar 2418
    private static class getMovementNonSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getMovementNonSerializedInventoryByScans_args> {
2419
      public getMovementNonSerializedInventoryByScans() {
2420
        super("getMovementNonSerializedInventoryByScans");
2421
      }
2422
 
2423
      protected getMovementNonSerializedInventoryByScans_args getEmptyArgsInstance() {
2424
        return new getMovementNonSerializedInventoryByScans_args();
2425
      }
2426
 
2427
      protected getMovementNonSerializedInventoryByScans_result getResult(I iface, getMovementNonSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
2428
        getMovementNonSerializedInventoryByScans_result result = new getMovementNonSerializedInventoryByScans_result();
2429
        result.success = iface.getMovementNonSerializedInventoryByScans(args.startDate, args.endDate);
2430
        return result;
2431
      }
2432
    }
2433
 
2434
    private static class getMovementSerializedInventoryByScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getMovementSerializedInventoryByScans_args> {
2435
      public getMovementSerializedInventoryByScans() {
2436
        super("getMovementSerializedInventoryByScans");
2437
      }
2438
 
2439
      protected getMovementSerializedInventoryByScans_args getEmptyArgsInstance() {
2440
        return new getMovementSerializedInventoryByScans_args();
2441
      }
2442
 
2443
      protected getMovementSerializedInventoryByScans_result getResult(I iface, getMovementSerializedInventoryByScans_args args) throws org.apache.thrift.TException {
2444
        getMovementSerializedInventoryByScans_result result = new getMovementSerializedInventoryByScans_result();
2445
        result.success = iface.getMovementSerializedInventoryByScans(args.startDate, args.endDate);
2446
        return result;
2447
      }
2448
    }
2449
 
7190 amar.kumar 2450
    private static class scanfreebie<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanfreebie_args> {
2451
      public scanfreebie() {
2452
        super("scanfreebie");
2453
      }
2454
 
2455
      protected scanfreebie_args getEmptyArgsInstance() {
2456
        return new scanfreebie_args();
2457
      }
2458
 
2459
      protected scanfreebie_result getResult(I iface, scanfreebie_args args) throws org.apache.thrift.TException {
2460
        scanfreebie_result result = new scanfreebie_result();
2461
        try {
2462
          result.success = iface.scanfreebie(args.orderId, args.freebieItemId, args.freebieWarehouseId, args.scanType);
2463
        } catch (WarehouseServiceException wex) {
2464
          result.wex = wex;
2465
        }
2466
        return result;
2467
      }
2468
    }
2469
 
2820 chandransh 2470
  }
2471
 
4496 mandeep.dh 2472
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
2473
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
2832 chandransh 2474
 
4496 mandeep.dh 2475
    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);
2832 chandransh 2476
 
4496 mandeep.dh 2477
    private String serialNumber; // required
2832 chandransh 2478
 
2479
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2480
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 2481
      SERIAL_NUMBER((short)1, "serialNumber");
2832 chandransh 2482
 
2483
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2484
 
2485
      static {
2486
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2487
          byName.put(field.getFieldName(), field);
2488
        }
2489
      }
2490
 
2491
      /**
2492
       * Find the _Fields constant that matches fieldId, or null if its not found.
2493
       */
2494
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2495
        switch(fieldId) {
4496 mandeep.dh 2496
          case 1: // SERIAL_NUMBER
2497
            return SERIAL_NUMBER;
3430 rajveer 2498
          default:
2499
            return null;
2500
        }
2832 chandransh 2501
      }
2502
 
2503
      /**
2504
       * Find the _Fields constant that matches fieldId, throwing an exception
2505
       * if it is not found.
2506
       */
2507
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2508
        _Fields fields = findByThriftId(fieldId);
2509
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2510
        return fields;
2511
      }
2512
 
2513
      /**
2514
       * Find the _Fields constant that matches name, or null if its not found.
2515
       */
2516
      public static _Fields findByName(String name) {
2517
        return byName.get(name);
2518
      }
2519
 
2520
      private final short _thriftId;
2521
      private final String _fieldName;
2522
 
2523
      _Fields(short thriftId, String fieldName) {
2524
        _thriftId = thriftId;
2525
        _fieldName = fieldName;
2526
      }
2527
 
2528
      public short getThriftFieldId() {
2529
        return _thriftId;
2530
      }
2531
 
2532
      public String getFieldName() {
2533
        return _fieldName;
2534
      }
2535
    }
2536
 
2537
    // isset id assignments
2538
 
3430 rajveer 2539
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 2540
    static {
3430 rajveer 2541
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 2542
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2543
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 2544
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 2545
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_args.class, metaDataMap);
2832 chandransh 2546
    }
2547
 
4496 mandeep.dh 2548
    public getInventoryItem_args() {
2832 chandransh 2549
    }
2550
 
4496 mandeep.dh 2551
    public getInventoryItem_args(
2552
      String serialNumber)
2832 chandransh 2553
    {
2554
      this();
4496 mandeep.dh 2555
      this.serialNumber = serialNumber;
2832 chandransh 2556
    }
2557
 
2558
    /**
2559
     * Performs a deep copy on <i>other</i>.
2560
     */
4496 mandeep.dh 2561
    public getInventoryItem_args(getInventoryItem_args other) {
2562
      if (other.isSetSerialNumber()) {
2563
        this.serialNumber = other.serialNumber;
2564
      }
2832 chandransh 2565
    }
2566
 
4496 mandeep.dh 2567
    public getInventoryItem_args deepCopy() {
2568
      return new getInventoryItem_args(this);
2832 chandransh 2569
    }
2570
 
3430 rajveer 2571
    @Override
2572
    public void clear() {
4496 mandeep.dh 2573
      this.serialNumber = null;
2832 chandransh 2574
    }
2575
 
4496 mandeep.dh 2576
    public String getSerialNumber() {
2577
      return this.serialNumber;
2832 chandransh 2578
    }
2579
 
4496 mandeep.dh 2580
    public void setSerialNumber(String serialNumber) {
2581
      this.serialNumber = serialNumber;
2832 chandransh 2582
    }
2583
 
4496 mandeep.dh 2584
    public void unsetSerialNumber() {
2585
      this.serialNumber = null;
2832 chandransh 2586
    }
2587
 
4496 mandeep.dh 2588
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
2589
    public boolean isSetSerialNumber() {
2590
      return this.serialNumber != null;
2832 chandransh 2591
    }
2592
 
4496 mandeep.dh 2593
    public void setSerialNumberIsSet(boolean value) {
2594
      if (!value) {
2595
        this.serialNumber = null;
2596
      }
2832 chandransh 2597
    }
2598
 
2599
    public void setFieldValue(_Fields field, Object value) {
2600
      switch (field) {
4496 mandeep.dh 2601
      case SERIAL_NUMBER:
2832 chandransh 2602
        if (value == null) {
4496 mandeep.dh 2603
          unsetSerialNumber();
2832 chandransh 2604
        } else {
4496 mandeep.dh 2605
          setSerialNumber((String)value);
2832 chandransh 2606
        }
2607
        break;
2608
 
2609
      }
2610
    }
2611
 
2612
    public Object getFieldValue(_Fields field) {
2613
      switch (field) {
4496 mandeep.dh 2614
      case SERIAL_NUMBER:
2615
        return getSerialNumber();
2832 chandransh 2616
 
2617
      }
2618
      throw new IllegalStateException();
2619
    }
2620
 
3430 rajveer 2621
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2622
    public boolean isSet(_Fields field) {
2623
      if (field == null) {
2624
        throw new IllegalArgumentException();
2625
      }
2832 chandransh 2626
 
2627
      switch (field) {
4496 mandeep.dh 2628
      case SERIAL_NUMBER:
2629
        return isSetSerialNumber();
2832 chandransh 2630
      }
2631
      throw new IllegalStateException();
2632
    }
2633
 
2634
    @Override
2635
    public boolean equals(Object that) {
2636
      if (that == null)
2637
        return false;
4496 mandeep.dh 2638
      if (that instanceof getInventoryItem_args)
2639
        return this.equals((getInventoryItem_args)that);
2832 chandransh 2640
      return false;
2641
    }
2642
 
4496 mandeep.dh 2643
    public boolean equals(getInventoryItem_args that) {
2832 chandransh 2644
      if (that == null)
2645
        return false;
2646
 
4496 mandeep.dh 2647
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
2648
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
2649
      if (this_present_serialNumber || that_present_serialNumber) {
2650
        if (!(this_present_serialNumber && that_present_serialNumber))
2832 chandransh 2651
          return false;
4496 mandeep.dh 2652
        if (!this.serialNumber.equals(that.serialNumber))
2832 chandransh 2653
          return false;
2654
      }
2655
 
2656
      return true;
2657
    }
2658
 
2659
    @Override
2660
    public int hashCode() {
2661
      return 0;
2662
    }
2663
 
4496 mandeep.dh 2664
    public int compareTo(getInventoryItem_args other) {
2832 chandransh 2665
      if (!getClass().equals(other.getClass())) {
2666
        return getClass().getName().compareTo(other.getClass().getName());
2667
      }
2668
 
2669
      int lastComparison = 0;
4496 mandeep.dh 2670
      getInventoryItem_args typedOther = (getInventoryItem_args)other;
2832 chandransh 2671
 
4496 mandeep.dh 2672
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2832 chandransh 2673
      if (lastComparison != 0) {
2674
        return lastComparison;
2675
      }
4496 mandeep.dh 2676
      if (isSetSerialNumber()) {
2677
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 2678
        if (lastComparison != 0) {
2679
          return lastComparison;
2680
        }
2832 chandransh 2681
      }
2682
      return 0;
2683
    }
2684
 
3430 rajveer 2685
    public _Fields fieldForId(int fieldId) {
2686
      return _Fields.findByThriftId(fieldId);
2687
    }
2688
 
2689
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2690
      org.apache.thrift.protocol.TField field;
2832 chandransh 2691
      iprot.readStructBegin();
2692
      while (true)
2693
      {
2694
        field = iprot.readFieldBegin();
3430 rajveer 2695
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 2696
          break;
2697
        }
3430 rajveer 2698
        switch (field.id) {
4496 mandeep.dh 2699
          case 1: // SERIAL_NUMBER
2700
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
2701
              this.serialNumber = iprot.readString();
3430 rajveer 2702
            } else { 
2703
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2704
            }
2705
            break;
2706
          default:
2707
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 2708
        }
3430 rajveer 2709
        iprot.readFieldEnd();
2832 chandransh 2710
      }
2711
      iprot.readStructEnd();
2712
      validate();
2713
    }
2714
 
3430 rajveer 2715
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 2716
      validate();
2717
 
2718
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 2719
      if (this.serialNumber != null) {
2720
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
2721
        oprot.writeString(this.serialNumber);
2722
        oprot.writeFieldEnd();
2723
      }
2832 chandransh 2724
      oprot.writeFieldStop();
2725
      oprot.writeStructEnd();
2726
    }
2727
 
2728
    @Override
2729
    public String toString() {
4496 mandeep.dh 2730
      StringBuilder sb = new StringBuilder("getInventoryItem_args(");
2832 chandransh 2731
      boolean first = true;
2732
 
4496 mandeep.dh 2733
      sb.append("serialNumber:");
2734
      if (this.serialNumber == null) {
2735
        sb.append("null");
2736
      } else {
2737
        sb.append(this.serialNumber);
2738
      }
2832 chandransh 2739
      first = false;
2740
      sb.append(")");
2741
      return sb.toString();
2742
    }
2743
 
3430 rajveer 2744
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 2745
      // check for required fields
2746
    }
2747
 
3430 rajveer 2748
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2749
      try {
2750
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2751
      } catch (org.apache.thrift.TException te) {
2752
        throw new java.io.IOException(te);
2753
      }
2754
    }
2755
 
2756
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2757
      try {
2758
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2759
      } catch (org.apache.thrift.TException te) {
2760
        throw new java.io.IOException(te);
2761
      }
2762
    }
2763
 
2832 chandransh 2764
  }
2765
 
4496 mandeep.dh 2766
  public static class getInventoryItem_result implements org.apache.thrift.TBase<getInventoryItem_result, getInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
2767
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_result");
2832 chandransh 2768
 
3430 rajveer 2769
    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);
4541 mandeep.dh 2770
    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);
2832 chandransh 2771
 
4496 mandeep.dh 2772
    private InventoryItem success; // required
4541 mandeep.dh 2773
    private WarehouseServiceException wex; // required
2832 chandransh 2774
 
2775
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2776
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4541 mandeep.dh 2777
      SUCCESS((short)0, "success"),
2778
      WEX((short)1, "wex");
2832 chandransh 2779
 
2780
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2781
 
2782
      static {
2783
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2784
          byName.put(field.getFieldName(), field);
2785
        }
2786
      }
2787
 
2788
      /**
2789
       * Find the _Fields constant that matches fieldId, or null if its not found.
2790
       */
2791
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2792
        switch(fieldId) {
2793
          case 0: // SUCCESS
2794
            return SUCCESS;
4541 mandeep.dh 2795
          case 1: // WEX
2796
            return WEX;
3430 rajveer 2797
          default:
2798
            return null;
2799
        }
2832 chandransh 2800
      }
2801
 
2802
      /**
2803
       * Find the _Fields constant that matches fieldId, throwing an exception
2804
       * if it is not found.
2805
       */
2806
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2807
        _Fields fields = findByThriftId(fieldId);
2808
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2809
        return fields;
2810
      }
2811
 
2812
      /**
2813
       * Find the _Fields constant that matches name, or null if its not found.
2814
       */
2815
      public static _Fields findByName(String name) {
2816
        return byName.get(name);
2817
      }
2818
 
2819
      private final short _thriftId;
2820
      private final String _fieldName;
2821
 
2822
      _Fields(short thriftId, String fieldName) {
2823
        _thriftId = thriftId;
2824
        _fieldName = fieldName;
2825
      }
2826
 
2827
      public short getThriftFieldId() {
2828
        return _thriftId;
2829
      }
2830
 
2831
      public String getFieldName() {
2832
        return _fieldName;
2833
      }
2834
    }
2835
 
2836
    // isset id assignments
2837
 
3430 rajveer 2838
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 2839
    static {
3430 rajveer 2840
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2841
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 2842
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4541 mandeep.dh 2843
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2844
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 2845
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 2846
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_result.class, metaDataMap);
2832 chandransh 2847
    }
2848
 
4496 mandeep.dh 2849
    public getInventoryItem_result() {
2832 chandransh 2850
    }
2851
 
4496 mandeep.dh 2852
    public getInventoryItem_result(
4541 mandeep.dh 2853
      InventoryItem success,
2854
      WarehouseServiceException wex)
2832 chandransh 2855
    {
2856
      this();
2857
      this.success = success;
4541 mandeep.dh 2858
      this.wex = wex;
2832 chandransh 2859
    }
2860
 
2861
    /**
2862
     * Performs a deep copy on <i>other</i>.
2863
     */
4496 mandeep.dh 2864
    public getInventoryItem_result(getInventoryItem_result other) {
2832 chandransh 2865
      if (other.isSetSuccess()) {
4496 mandeep.dh 2866
        this.success = new InventoryItem(other.success);
2832 chandransh 2867
      }
4541 mandeep.dh 2868
      if (other.isSetWex()) {
2869
        this.wex = new WarehouseServiceException(other.wex);
2870
      }
2832 chandransh 2871
    }
2872
 
4496 mandeep.dh 2873
    public getInventoryItem_result deepCopy() {
2874
      return new getInventoryItem_result(this);
2832 chandransh 2875
    }
2876
 
3430 rajveer 2877
    @Override
2878
    public void clear() {
2879
      this.success = null;
4541 mandeep.dh 2880
      this.wex = null;
2832 chandransh 2881
    }
2882
 
4496 mandeep.dh 2883
    public InventoryItem getSuccess() {
2832 chandransh 2884
      return this.success;
2885
    }
2886
 
4496 mandeep.dh 2887
    public void setSuccess(InventoryItem success) {
2832 chandransh 2888
      this.success = success;
2889
    }
2890
 
2891
    public void unsetSuccess() {
2892
      this.success = null;
2893
    }
2894
 
3430 rajveer 2895
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2832 chandransh 2896
    public boolean isSetSuccess() {
2897
      return this.success != null;
2898
    }
2899
 
2900
    public void setSuccessIsSet(boolean value) {
2901
      if (!value) {
2902
        this.success = null;
2903
      }
2904
    }
2905
 
4541 mandeep.dh 2906
    public WarehouseServiceException getWex() {
2907
      return this.wex;
2908
    }
2909
 
2910
    public void setWex(WarehouseServiceException wex) {
2911
      this.wex = wex;
2912
    }
2913
 
2914
    public void unsetWex() {
2915
      this.wex = null;
2916
    }
2917
 
2918
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2919
    public boolean isSetWex() {
2920
      return this.wex != null;
2921
    }
2922
 
2923
    public void setWexIsSet(boolean value) {
2924
      if (!value) {
2925
        this.wex = null;
2926
      }
2927
    }
2928
 
2832 chandransh 2929
    public void setFieldValue(_Fields field, Object value) {
2930
      switch (field) {
2931
      case SUCCESS:
2932
        if (value == null) {
2933
          unsetSuccess();
2934
        } else {
4496 mandeep.dh 2935
          setSuccess((InventoryItem)value);
2832 chandransh 2936
        }
2937
        break;
2938
 
4541 mandeep.dh 2939
      case WEX:
2940
        if (value == null) {
2941
          unsetWex();
2942
        } else {
2943
          setWex((WarehouseServiceException)value);
2944
        }
2945
        break;
2946
 
2832 chandransh 2947
      }
2948
    }
2949
 
2950
    public Object getFieldValue(_Fields field) {
2951
      switch (field) {
2952
      case SUCCESS:
2953
        return getSuccess();
2954
 
4541 mandeep.dh 2955
      case WEX:
2956
        return getWex();
2957
 
2832 chandransh 2958
      }
2959
      throw new IllegalStateException();
2960
    }
2961
 
3430 rajveer 2962
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2963
    public boolean isSet(_Fields field) {
2964
      if (field == null) {
2965
        throw new IllegalArgumentException();
2966
      }
2832 chandransh 2967
 
2968
      switch (field) {
2969
      case SUCCESS:
2970
        return isSetSuccess();
4541 mandeep.dh 2971
      case WEX:
2972
        return isSetWex();
2832 chandransh 2973
      }
2974
      throw new IllegalStateException();
2975
    }
2976
 
2977
    @Override
2978
    public boolean equals(Object that) {
2979
      if (that == null)
2980
        return false;
4496 mandeep.dh 2981
      if (that instanceof getInventoryItem_result)
2982
        return this.equals((getInventoryItem_result)that);
2832 chandransh 2983
      return false;
2984
    }
2985
 
4496 mandeep.dh 2986
    public boolean equals(getInventoryItem_result that) {
2832 chandransh 2987
      if (that == null)
2988
        return false;
2989
 
2990
      boolean this_present_success = true && this.isSetSuccess();
2991
      boolean that_present_success = true && that.isSetSuccess();
2992
      if (this_present_success || that_present_success) {
2993
        if (!(this_present_success && that_present_success))
2994
          return false;
2995
        if (!this.success.equals(that.success))
2996
          return false;
2997
      }
2998
 
4541 mandeep.dh 2999
      boolean this_present_wex = true && this.isSetWex();
3000
      boolean that_present_wex = true && that.isSetWex();
3001
      if (this_present_wex || that_present_wex) {
3002
        if (!(this_present_wex && that_present_wex))
3003
          return false;
3004
        if (!this.wex.equals(that.wex))
3005
          return false;
3006
      }
3007
 
2832 chandransh 3008
      return true;
3009
    }
3010
 
3011
    @Override
3012
    public int hashCode() {
3013
      return 0;
3014
    }
3015
 
4496 mandeep.dh 3016
    public int compareTo(getInventoryItem_result other) {
2832 chandransh 3017
      if (!getClass().equals(other.getClass())) {
3018
        return getClass().getName().compareTo(other.getClass().getName());
3019
      }
3020
 
3021
      int lastComparison = 0;
4496 mandeep.dh 3022
      getInventoryItem_result typedOther = (getInventoryItem_result)other;
2832 chandransh 3023
 
3430 rajveer 3024
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2832 chandransh 3025
      if (lastComparison != 0) {
3026
        return lastComparison;
3027
      }
3430 rajveer 3028
      if (isSetSuccess()) {
3029
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3030
        if (lastComparison != 0) {
3031
          return lastComparison;
3032
        }
2832 chandransh 3033
      }
4541 mandeep.dh 3034
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
3035
      if (lastComparison != 0) {
3036
        return lastComparison;
3037
      }
3038
      if (isSetWex()) {
3039
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3040
        if (lastComparison != 0) {
3041
          return lastComparison;
3042
        }
3043
      }
2832 chandransh 3044
      return 0;
3045
    }
3046
 
3430 rajveer 3047
    public _Fields fieldForId(int fieldId) {
3048
      return _Fields.findByThriftId(fieldId);
3049
    }
3050
 
3051
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3052
      org.apache.thrift.protocol.TField field;
2832 chandransh 3053
      iprot.readStructBegin();
3054
      while (true)
3055
      {
3056
        field = iprot.readFieldBegin();
3430 rajveer 3057
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 3058
          break;
3059
        }
3430 rajveer 3060
        switch (field.id) {
3061
          case 0: // SUCCESS
3062
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4496 mandeep.dh 3063
              this.success = new InventoryItem();
3430 rajveer 3064
              this.success.read(iprot);
3065
            } else { 
3066
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3067
            }
3068
            break;
4541 mandeep.dh 3069
          case 1: // WEX
3070
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3071
              this.wex = new WarehouseServiceException();
3072
              this.wex.read(iprot);
3073
            } else { 
3074
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3075
            }
3076
            break;
3430 rajveer 3077
          default:
3078
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 3079
        }
3430 rajveer 3080
        iprot.readFieldEnd();
2832 chandransh 3081
      }
3082
      iprot.readStructEnd();
3083
      validate();
3084
    }
3085
 
3430 rajveer 3086
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 3087
      oprot.writeStructBegin(STRUCT_DESC);
3088
 
3089
      if (this.isSetSuccess()) {
3090
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3091
        this.success.write(oprot);
3092
        oprot.writeFieldEnd();
4541 mandeep.dh 3093
      } else if (this.isSetWex()) {
3094
        oprot.writeFieldBegin(WEX_FIELD_DESC);
3095
        this.wex.write(oprot);
3096
        oprot.writeFieldEnd();
2832 chandransh 3097
      }
3098
      oprot.writeFieldStop();
3099
      oprot.writeStructEnd();
3100
    }
3101
 
3102
    @Override
3103
    public String toString() {
4496 mandeep.dh 3104
      StringBuilder sb = new StringBuilder("getInventoryItem_result(");
2832 chandransh 3105
      boolean first = true;
3106
 
3107
      sb.append("success:");
3108
      if (this.success == null) {
3109
        sb.append("null");
3110
      } else {
3111
        sb.append(this.success);
3112
      }
3113
      first = false;
4541 mandeep.dh 3114
      if (!first) sb.append(", ");
3115
      sb.append("wex:");
3116
      if (this.wex == null) {
3117
        sb.append("null");
3118
      } else {
3119
        sb.append(this.wex);
3120
      }
3121
      first = false;
2832 chandransh 3122
      sb.append(")");
3123
      return sb.toString();
3124
    }
3125
 
3430 rajveer 3126
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 3127
      // check for required fields
3128
    }
3129
 
3430 rajveer 3130
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3131
      try {
3132
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3133
      } catch (org.apache.thrift.TException te) {
3134
        throw new java.io.IOException(te);
3135
      }
3136
    }
3137
 
3138
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3139
      try {
3140
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3141
      } catch (org.apache.thrift.TException te) {
3142
        throw new java.io.IOException(te);
3143
      }
3144
    }
3145
 
2832 chandransh 3146
  }
3147
 
5361 mandeep.dh 3148
  public static class getNonSeralizedInventoryItem_args implements org.apache.thrift.TBase<getNonSeralizedInventoryItem_args, getNonSeralizedInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
3149
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItem_args");
2820 chandransh 3150
 
5530 mandeep.dh 3151
    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);
3152
    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);
3153
    private static final org.apache.thrift.protocol.TField FULFILMENT_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fulfilmentWarehouseId", org.apache.thrift.protocol.TType.I64, (short)3);
2820 chandransh 3154
 
5530 mandeep.dh 3155
    private String itemNumber; // required
4496 mandeep.dh 3156
    private long itemId; // required
5530 mandeep.dh 3157
    private long fulfilmentWarehouseId; // required
2820 chandransh 3158
 
3159
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3160
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5530 mandeep.dh 3161
      ITEM_NUMBER((short)1, "itemNumber"),
3162
      ITEM_ID((short)2, "itemId"),
3163
      FULFILMENT_WAREHOUSE_ID((short)3, "fulfilmentWarehouseId");
2820 chandransh 3164
 
3165
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3166
 
3167
      static {
3168
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3169
          byName.put(field.getFieldName(), field);
3170
        }
3171
      }
3172
 
3173
      /**
3174
       * Find the _Fields constant that matches fieldId, or null if its not found.
3175
       */
3176
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3177
        switch(fieldId) {
5530 mandeep.dh 3178
          case 1: // ITEM_NUMBER
3179
            return ITEM_NUMBER;
3180
          case 2: // ITEM_ID
4496 mandeep.dh 3181
            return ITEM_ID;
5530 mandeep.dh 3182
          case 3: // FULFILMENT_WAREHOUSE_ID
3183
            return FULFILMENT_WAREHOUSE_ID;
3430 rajveer 3184
          default:
3185
            return null;
3186
        }
2820 chandransh 3187
      }
3188
 
3189
      /**
3190
       * Find the _Fields constant that matches fieldId, throwing an exception
3191
       * if it is not found.
3192
       */
3193
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3194
        _Fields fields = findByThriftId(fieldId);
3195
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3196
        return fields;
3197
      }
3198
 
3199
      /**
3200
       * Find the _Fields constant that matches name, or null if its not found.
3201
       */
3202
      public static _Fields findByName(String name) {
3203
        return byName.get(name);
3204
      }
3205
 
3206
      private final short _thriftId;
3207
      private final String _fieldName;
3208
 
3209
      _Fields(short thriftId, String fieldName) {
3210
        _thriftId = thriftId;
3211
        _fieldName = fieldName;
3212
      }
3213
 
3214
      public short getThriftFieldId() {
3215
        return _thriftId;
3216
      }
3217
 
3218
      public String getFieldName() {
3219
        return _fieldName;
3220
      }
3221
    }
3222
 
3223
    // isset id assignments
4496 mandeep.dh 3224
    private static final int __ITEMID_ISSET_ID = 0;
5530 mandeep.dh 3225
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 1;
5361 mandeep.dh 3226
    private BitSet __isset_bit_vector = new BitSet(2);
2820 chandransh 3227
 
3430 rajveer 3228
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 3229
    static {
3430 rajveer 3230
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5530 mandeep.dh 3231
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3232
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4496 mandeep.dh 3233
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3430 rajveer 3234
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5530 mandeep.dh 3235
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 3236
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 3237
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5361 mandeep.dh 3238
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItem_args.class, metaDataMap);
2820 chandransh 3239
    }
3240
 
5361 mandeep.dh 3241
    public getNonSeralizedInventoryItem_args() {
2820 chandransh 3242
    }
3243
 
5361 mandeep.dh 3244
    public getNonSeralizedInventoryItem_args(
5530 mandeep.dh 3245
      String itemNumber,
4496 mandeep.dh 3246
      long itemId,
5530 mandeep.dh 3247
      long fulfilmentWarehouseId)
2820 chandransh 3248
    {
3249
      this();
5530 mandeep.dh 3250
      this.itemNumber = itemNumber;
4496 mandeep.dh 3251
      this.itemId = itemId;
3252
      setItemIdIsSet(true);
5530 mandeep.dh 3253
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
3254
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 3255
    }
3256
 
3257
    /**
3258
     * Performs a deep copy on <i>other</i>.
3259
     */
5361 mandeep.dh 3260
    public getNonSeralizedInventoryItem_args(getNonSeralizedInventoryItem_args other) {
2820 chandransh 3261
      __isset_bit_vector.clear();
3262
      __isset_bit_vector.or(other.__isset_bit_vector);
5530 mandeep.dh 3263
      if (other.isSetItemNumber()) {
3264
        this.itemNumber = other.itemNumber;
3265
      }
4496 mandeep.dh 3266
      this.itemId = other.itemId;
5530 mandeep.dh 3267
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
2820 chandransh 3268
    }
3269
 
5361 mandeep.dh 3270
    public getNonSeralizedInventoryItem_args deepCopy() {
3271
      return new getNonSeralizedInventoryItem_args(this);
2820 chandransh 3272
    }
3273
 
3430 rajveer 3274
    @Override
3275
    public void clear() {
5530 mandeep.dh 3276
      this.itemNumber = null;
4496 mandeep.dh 3277
      setItemIdIsSet(false);
3278
      this.itemId = 0;
5530 mandeep.dh 3279
      setFulfilmentWarehouseIdIsSet(false);
3280
      this.fulfilmentWarehouseId = 0;
2820 chandransh 3281
    }
3282
 
5530 mandeep.dh 3283
    public String getItemNumber() {
3284
      return this.itemNumber;
3285
    }
3286
 
3287
    public void setItemNumber(String itemNumber) {
3288
      this.itemNumber = itemNumber;
3289
    }
3290
 
3291
    public void unsetItemNumber() {
3292
      this.itemNumber = null;
3293
    }
3294
 
3295
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
3296
    public boolean isSetItemNumber() {
3297
      return this.itemNumber != null;
3298
    }
3299
 
3300
    public void setItemNumberIsSet(boolean value) {
3301
      if (!value) {
3302
        this.itemNumber = null;
3303
      }
3304
    }
3305
 
4496 mandeep.dh 3306
    public long getItemId() {
3307
      return this.itemId;
2820 chandransh 3308
    }
3309
 
4496 mandeep.dh 3310
    public void setItemId(long itemId) {
3311
      this.itemId = itemId;
3312
      setItemIdIsSet(true);
2820 chandransh 3313
    }
3314
 
4496 mandeep.dh 3315
    public void unsetItemId() {
3316
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
2820 chandransh 3317
    }
3318
 
4496 mandeep.dh 3319
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
3320
    public boolean isSetItemId() {
3321
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
2820 chandransh 3322
    }
3323
 
4496 mandeep.dh 3324
    public void setItemIdIsSet(boolean value) {
3325
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
2820 chandransh 3326
    }
3327
 
5530 mandeep.dh 3328
    public long getFulfilmentWarehouseId() {
3329
      return this.fulfilmentWarehouseId;
2820 chandransh 3330
    }
3331
 
5530 mandeep.dh 3332
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
3333
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
3334
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 3335
    }
3336
 
5530 mandeep.dh 3337
    public void unsetFulfilmentWarehouseId() {
3338
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 3339
    }
3340
 
5530 mandeep.dh 3341
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
3342
    public boolean isSetFulfilmentWarehouseId() {
3343
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 3344
    }
3345
 
5530 mandeep.dh 3346
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
3347
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
2820 chandransh 3348
    }
3349
 
3350
    public void setFieldValue(_Fields field, Object value) {
3351
      switch (field) {
5530 mandeep.dh 3352
      case ITEM_NUMBER:
3353
        if (value == null) {
3354
          unsetItemNumber();
3355
        } else {
3356
          setItemNumber((String)value);
3357
        }
3358
        break;
3359
 
4496 mandeep.dh 3360
      case ITEM_ID:
2820 chandransh 3361
        if (value == null) {
4496 mandeep.dh 3362
          unsetItemId();
2820 chandransh 3363
        } else {
4496 mandeep.dh 3364
          setItemId((Long)value);
2820 chandransh 3365
        }
3366
        break;
3367
 
5530 mandeep.dh 3368
      case FULFILMENT_WAREHOUSE_ID:
2820 chandransh 3369
        if (value == null) {
5530 mandeep.dh 3370
          unsetFulfilmentWarehouseId();
2820 chandransh 3371
        } else {
5530 mandeep.dh 3372
          setFulfilmentWarehouseId((Long)value);
2820 chandransh 3373
        }
3374
        break;
3375
 
3376
      }
3377
    }
3378
 
3379
    public Object getFieldValue(_Fields field) {
3380
      switch (field) {
5530 mandeep.dh 3381
      case ITEM_NUMBER:
3382
        return getItemNumber();
3383
 
4496 mandeep.dh 3384
      case ITEM_ID:
3385
        return Long.valueOf(getItemId());
2820 chandransh 3386
 
5530 mandeep.dh 3387
      case FULFILMENT_WAREHOUSE_ID:
3388
        return Long.valueOf(getFulfilmentWarehouseId());
2820 chandransh 3389
 
3390
      }
3391
      throw new IllegalStateException();
3392
    }
3393
 
3430 rajveer 3394
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3395
    public boolean isSet(_Fields field) {
3396
      if (field == null) {
3397
        throw new IllegalArgumentException();
3398
      }
2820 chandransh 3399
 
3400
      switch (field) {
5530 mandeep.dh 3401
      case ITEM_NUMBER:
3402
        return isSetItemNumber();
4496 mandeep.dh 3403
      case ITEM_ID:
3404
        return isSetItemId();
5530 mandeep.dh 3405
      case FULFILMENT_WAREHOUSE_ID:
3406
        return isSetFulfilmentWarehouseId();
2820 chandransh 3407
      }
3408
      throw new IllegalStateException();
3409
    }
3410
 
3411
    @Override
3412
    public boolean equals(Object that) {
3413
      if (that == null)
3414
        return false;
5361 mandeep.dh 3415
      if (that instanceof getNonSeralizedInventoryItem_args)
3416
        return this.equals((getNonSeralizedInventoryItem_args)that);
2820 chandransh 3417
      return false;
3418
    }
3419
 
5361 mandeep.dh 3420
    public boolean equals(getNonSeralizedInventoryItem_args that) {
2820 chandransh 3421
      if (that == null)
3422
        return false;
3423
 
5530 mandeep.dh 3424
      boolean this_present_itemNumber = true && this.isSetItemNumber();
3425
      boolean that_present_itemNumber = true && that.isSetItemNumber();
3426
      if (this_present_itemNumber || that_present_itemNumber) {
3427
        if (!(this_present_itemNumber && that_present_itemNumber))
3428
          return false;
3429
        if (!this.itemNumber.equals(that.itemNumber))
3430
          return false;
3431
      }
3432
 
4496 mandeep.dh 3433
      boolean this_present_itemId = true;
3434
      boolean that_present_itemId = true;
3435
      if (this_present_itemId || that_present_itemId) {
3436
        if (!(this_present_itemId && that_present_itemId))
2820 chandransh 3437
          return false;
4496 mandeep.dh 3438
        if (this.itemId != that.itemId)
2820 chandransh 3439
          return false;
3440
      }
3441
 
5530 mandeep.dh 3442
      boolean this_present_fulfilmentWarehouseId = true;
3443
      boolean that_present_fulfilmentWarehouseId = true;
3444
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
3445
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
2820 chandransh 3446
          return false;
5530 mandeep.dh 3447
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
2820 chandransh 3448
          return false;
3449
      }
3450
 
3451
      return true;
3452
    }
3453
 
3454
    @Override
3455
    public int hashCode() {
3456
      return 0;
3457
    }
3458
 
5361 mandeep.dh 3459
    public int compareTo(getNonSeralizedInventoryItem_args other) {
2820 chandransh 3460
      if (!getClass().equals(other.getClass())) {
3461
        return getClass().getName().compareTo(other.getClass().getName());
3462
      }
3463
 
3464
      int lastComparison = 0;
5361 mandeep.dh 3465
      getNonSeralizedInventoryItem_args typedOther = (getNonSeralizedInventoryItem_args)other;
2820 chandransh 3466
 
5530 mandeep.dh 3467
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
3468
      if (lastComparison != 0) {
3469
        return lastComparison;
3470
      }
3471
      if (isSetItemNumber()) {
3472
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
3473
        if (lastComparison != 0) {
3474
          return lastComparison;
3475
        }
3476
      }
4496 mandeep.dh 3477
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
2820 chandransh 3478
      if (lastComparison != 0) {
3479
        return lastComparison;
3480
      }
4496 mandeep.dh 3481
      if (isSetItemId()) {
3482
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
3430 rajveer 3483
        if (lastComparison != 0) {
3484
          return lastComparison;
3485
        }
2820 chandransh 3486
      }
5530 mandeep.dh 3487
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
2820 chandransh 3488
      if (lastComparison != 0) {
3489
        return lastComparison;
3490
      }
5530 mandeep.dh 3491
      if (isSetFulfilmentWarehouseId()) {
3492
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
3430 rajveer 3493
        if (lastComparison != 0) {
3494
          return lastComparison;
3495
        }
2820 chandransh 3496
      }
3497
      return 0;
3498
    }
3499
 
3430 rajveer 3500
    public _Fields fieldForId(int fieldId) {
3501
      return _Fields.findByThriftId(fieldId);
3502
    }
3503
 
3504
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3505
      org.apache.thrift.protocol.TField field;
2820 chandransh 3506
      iprot.readStructBegin();
3507
      while (true)
3508
      {
3509
        field = iprot.readFieldBegin();
3430 rajveer 3510
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 3511
          break;
3512
        }
3430 rajveer 3513
        switch (field.id) {
5530 mandeep.dh 3514
          case 1: // ITEM_NUMBER
3515
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
3516
              this.itemNumber = iprot.readString();
3517
            } else { 
3518
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3519
            }
3520
            break;
3521
          case 2: // ITEM_ID
3430 rajveer 3522
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4496 mandeep.dh 3523
              this.itemId = iprot.readI64();
3524
              setItemIdIsSet(true);
3430 rajveer 3525
            } else { 
3526
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3527
            }
3528
            break;
5530 mandeep.dh 3529
          case 3: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 3530
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5530 mandeep.dh 3531
              this.fulfilmentWarehouseId = iprot.readI64();
3532
              setFulfilmentWarehouseIdIsSet(true);
3430 rajveer 3533
            } else { 
3534
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3535
            }
3536
            break;
3537
          default:
3538
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 3539
        }
3430 rajveer 3540
        iprot.readFieldEnd();
2820 chandransh 3541
      }
3542
      iprot.readStructEnd();
3543
      validate();
3544
    }
3545
 
3430 rajveer 3546
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 3547
      validate();
3548
 
3549
      oprot.writeStructBegin(STRUCT_DESC);
5530 mandeep.dh 3550
      if (this.itemNumber != null) {
3551
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
3552
        oprot.writeString(this.itemNumber);
3553
        oprot.writeFieldEnd();
3554
      }
4496 mandeep.dh 3555
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
3556
      oprot.writeI64(this.itemId);
2820 chandransh 3557
      oprot.writeFieldEnd();
5530 mandeep.dh 3558
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
3559
      oprot.writeI64(this.fulfilmentWarehouseId);
2820 chandransh 3560
      oprot.writeFieldEnd();
3561
      oprot.writeFieldStop();
3562
      oprot.writeStructEnd();
3563
    }
3564
 
3565
    @Override
3566
    public String toString() {
5361 mandeep.dh 3567
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItem_args(");
2820 chandransh 3568
      boolean first = true;
3569
 
5530 mandeep.dh 3570
      sb.append("itemNumber:");
3571
      if (this.itemNumber == null) {
3572
        sb.append("null");
3573
      } else {
3574
        sb.append(this.itemNumber);
3575
      }
3576
      first = false;
3577
      if (!first) sb.append(", ");
4496 mandeep.dh 3578
      sb.append("itemId:");
3579
      sb.append(this.itemId);
2820 chandransh 3580
      first = false;
3581
      if (!first) sb.append(", ");
5530 mandeep.dh 3582
      sb.append("fulfilmentWarehouseId:");
3583
      sb.append(this.fulfilmentWarehouseId);
2820 chandransh 3584
      first = false;
3585
      sb.append(")");
3586
      return sb.toString();
3587
    }
3588
 
3430 rajveer 3589
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 3590
      // check for required fields
3591
    }
3592
 
3430 rajveer 3593
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3594
      try {
3595
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3596
      } catch (org.apache.thrift.TException te) {
3597
        throw new java.io.IOException(te);
3598
      }
3599
    }
3600
 
3601
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3602
      try {
4496 mandeep.dh 3603
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
3604
        __isset_bit_vector = new BitSet(1);
3430 rajveer 3605
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3606
      } catch (org.apache.thrift.TException te) {
3607
        throw new java.io.IOException(te);
3608
      }
3609
    }
3610
 
2820 chandransh 3611
  }
3612
 
5361 mandeep.dh 3613
  public static class getNonSeralizedInventoryItem_result implements org.apache.thrift.TBase<getNonSeralizedInventoryItem_result, getNonSeralizedInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
3614
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItem_result");
2820 chandransh 3615
 
5361 mandeep.dh 3616
    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);
3617
    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);
2820 chandransh 3618
 
5361 mandeep.dh 3619
    private InventoryItem success; // required
3620
    private WarehouseServiceException wex; // required
2820 chandransh 3621
 
3622
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3623
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 3624
      SUCCESS((short)0, "success"),
3625
      WEX((short)1, "wex");
2820 chandransh 3626
 
3627
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3628
 
3629
      static {
3630
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3631
          byName.put(field.getFieldName(), field);
3632
        }
3633
      }
3634
 
3635
      /**
3636
       * Find the _Fields constant that matches fieldId, or null if its not found.
3637
       */
3638
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3639
        switch(fieldId) {
3640
          case 0: // SUCCESS
3641
            return SUCCESS;
5361 mandeep.dh 3642
          case 1: // WEX
3643
            return WEX;
3430 rajveer 3644
          default:
3645
            return null;
3646
        }
2820 chandransh 3647
      }
3648
 
3649
      /**
3650
       * Find the _Fields constant that matches fieldId, throwing an exception
3651
       * if it is not found.
3652
       */
3653
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3654
        _Fields fields = findByThriftId(fieldId);
3655
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3656
        return fields;
3657
      }
3658
 
3659
      /**
3660
       * Find the _Fields constant that matches name, or null if its not found.
3661
       */
3662
      public static _Fields findByName(String name) {
3663
        return byName.get(name);
3664
      }
3665
 
3666
      private final short _thriftId;
3667
      private final String _fieldName;
3668
 
3669
      _Fields(short thriftId, String fieldName) {
3670
        _thriftId = thriftId;
3671
        _fieldName = fieldName;
3672
      }
3673
 
3674
      public short getThriftFieldId() {
3675
        return _thriftId;
3676
      }
3677
 
3678
      public String getFieldName() {
3679
        return _fieldName;
3680
      }
3681
    }
3682
 
3683
    // isset id assignments
3684
 
3430 rajveer 3685
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 3686
    static {
3430 rajveer 3687
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3688
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5361 mandeep.dh 3689
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3690
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3691
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 3692
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5361 mandeep.dh 3693
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItem_result.class, metaDataMap);
2820 chandransh 3694
    }
3695
 
5361 mandeep.dh 3696
    public getNonSeralizedInventoryItem_result() {
2820 chandransh 3697
    }
3698
 
5361 mandeep.dh 3699
    public getNonSeralizedInventoryItem_result(
3700
      InventoryItem success,
3701
      WarehouseServiceException wex)
2820 chandransh 3702
    {
3703
      this();
3704
      this.success = success;
5361 mandeep.dh 3705
      this.wex = wex;
2820 chandransh 3706
    }
3707
 
3708
    /**
3709
     * Performs a deep copy on <i>other</i>.
3710
     */
5361 mandeep.dh 3711
    public getNonSeralizedInventoryItem_result(getNonSeralizedInventoryItem_result other) {
4496 mandeep.dh 3712
      if (other.isSetSuccess()) {
5361 mandeep.dh 3713
        this.success = new InventoryItem(other.success);
2820 chandransh 3714
      }
5361 mandeep.dh 3715
      if (other.isSetWex()) {
3716
        this.wex = new WarehouseServiceException(other.wex);
3717
      }
2820 chandransh 3718
    }
3719
 
5361 mandeep.dh 3720
    public getNonSeralizedInventoryItem_result deepCopy() {
3721
      return new getNonSeralizedInventoryItem_result(this);
2820 chandransh 3722
    }
3723
 
3430 rajveer 3724
    @Override
3725
    public void clear() {
4496 mandeep.dh 3726
      this.success = null;
5361 mandeep.dh 3727
      this.wex = null;
2820 chandransh 3728
    }
3729
 
5361 mandeep.dh 3730
    public InventoryItem getSuccess() {
2820 chandransh 3731
      return this.success;
3732
    }
3733
 
5361 mandeep.dh 3734
    public void setSuccess(InventoryItem success) {
2820 chandransh 3735
      this.success = success;
3736
    }
3737
 
3738
    public void unsetSuccess() {
4496 mandeep.dh 3739
      this.success = null;
2820 chandransh 3740
    }
3741
 
3430 rajveer 3742
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2820 chandransh 3743
    public boolean isSetSuccess() {
4496 mandeep.dh 3744
      return this.success != null;
2820 chandransh 3745
    }
3746
 
3747
    public void setSuccessIsSet(boolean value) {
4496 mandeep.dh 3748
      if (!value) {
3749
        this.success = null;
3750
      }
2820 chandransh 3751
    }
3752
 
5361 mandeep.dh 3753
    public WarehouseServiceException getWex() {
3754
      return this.wex;
2820 chandransh 3755
    }
3756
 
5361 mandeep.dh 3757
    public void setWex(WarehouseServiceException wex) {
3758
      this.wex = wex;
2820 chandransh 3759
    }
3760
 
5361 mandeep.dh 3761
    public void unsetWex() {
3762
      this.wex = null;
2820 chandransh 3763
    }
3764
 
5361 mandeep.dh 3765
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3766
    public boolean isSetWex() {
3767
      return this.wex != null;
2820 chandransh 3768
    }
3769
 
5361 mandeep.dh 3770
    public void setWexIsSet(boolean value) {
3771
      if (!value) {
3772
        this.wex = null;
2820 chandransh 3773
      }
3774
    }
3775
 
3776
    public void setFieldValue(_Fields field, Object value) {
3777
      switch (field) {
5361 mandeep.dh 3778
      case SUCCESS:
2820 chandransh 3779
        if (value == null) {
5361 mandeep.dh 3780
          unsetSuccess();
2820 chandransh 3781
        } else {
5361 mandeep.dh 3782
          setSuccess((InventoryItem)value);
2820 chandransh 3783
        }
3784
        break;
3785
 
5361 mandeep.dh 3786
      case WEX:
2820 chandransh 3787
        if (value == null) {
5361 mandeep.dh 3788
          unsetWex();
2820 chandransh 3789
        } else {
5361 mandeep.dh 3790
          setWex((WarehouseServiceException)value);
2820 chandransh 3791
        }
3792
        break;
3793
 
3794
      }
3795
    }
3796
 
3797
    public Object getFieldValue(_Fields field) {
3798
      switch (field) {
3799
      case SUCCESS:
4496 mandeep.dh 3800
        return getSuccess();
2820 chandransh 3801
 
5361 mandeep.dh 3802
      case WEX:
3803
        return getWex();
3804
 
2820 chandransh 3805
      }
3806
      throw new IllegalStateException();
3807
    }
3808
 
3430 rajveer 3809
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3810
    public boolean isSet(_Fields field) {
3811
      if (field == null) {
3812
        throw new IllegalArgumentException();
3813
      }
2820 chandransh 3814
 
3815
      switch (field) {
3816
      case SUCCESS:
3817
        return isSetSuccess();
5361 mandeep.dh 3818
      case WEX:
3819
        return isSetWex();
2820 chandransh 3820
      }
3821
      throw new IllegalStateException();
3822
    }
3823
 
3824
    @Override
3825
    public boolean equals(Object that) {
3826
      if (that == null)
3827
        return false;
5361 mandeep.dh 3828
      if (that instanceof getNonSeralizedInventoryItem_result)
3829
        return this.equals((getNonSeralizedInventoryItem_result)that);
2820 chandransh 3830
      return false;
3831
    }
3832
 
5361 mandeep.dh 3833
    public boolean equals(getNonSeralizedInventoryItem_result that) {
2820 chandransh 3834
      if (that == null)
3835
        return false;
3836
 
4496 mandeep.dh 3837
      boolean this_present_success = true && this.isSetSuccess();
3838
      boolean that_present_success = true && that.isSetSuccess();
2820 chandransh 3839
      if (this_present_success || that_present_success) {
3840
        if (!(this_present_success && that_present_success))
3841
          return false;
4496 mandeep.dh 3842
        if (!this.success.equals(that.success))
2820 chandransh 3843
          return false;
3844
      }
3845
 
5361 mandeep.dh 3846
      boolean this_present_wex = true && this.isSetWex();
3847
      boolean that_present_wex = true && that.isSetWex();
3848
      if (this_present_wex || that_present_wex) {
3849
        if (!(this_present_wex && that_present_wex))
4496 mandeep.dh 3850
          return false;
5361 mandeep.dh 3851
        if (!this.wex.equals(that.wex))
4496 mandeep.dh 3852
          return false;
3853
      }
3854
 
3855
      return true;
3856
    }
3857
 
3858
    @Override
3859
    public int hashCode() {
3860
      return 0;
3861
    }
3862
 
5361 mandeep.dh 3863
    public int compareTo(getNonSeralizedInventoryItem_result other) {
4496 mandeep.dh 3864
      if (!getClass().equals(other.getClass())) {
3865
        return getClass().getName().compareTo(other.getClass().getName());
3866
      }
3867
 
3868
      int lastComparison = 0;
5361 mandeep.dh 3869
      getNonSeralizedInventoryItem_result typedOther = (getNonSeralizedInventoryItem_result)other;
4496 mandeep.dh 3870
 
3871
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3872
      if (lastComparison != 0) {
3873
        return lastComparison;
3874
      }
3875
      if (isSetSuccess()) {
3876
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3877
        if (lastComparison != 0) {
3878
          return lastComparison;
3879
        }
3880
      }
5361 mandeep.dh 3881
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 3882
      if (lastComparison != 0) {
3883
        return lastComparison;
3884
      }
5361 mandeep.dh 3885
      if (isSetWex()) {
3886
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3430 rajveer 3887
        if (lastComparison != 0) {
3888
          return lastComparison;
3889
        }
2820 chandransh 3890
      }
3891
      return 0;
3892
    }
3893
 
3430 rajveer 3894
    public _Fields fieldForId(int fieldId) {
3895
      return _Fields.findByThriftId(fieldId);
3896
    }
3897
 
3898
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3899
      org.apache.thrift.protocol.TField field;
2820 chandransh 3900
      iprot.readStructBegin();
3901
      while (true)
3902
      {
3903
        field = iprot.readFieldBegin();
3430 rajveer 3904
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 3905
          break;
3906
        }
3430 rajveer 3907
        switch (field.id) {
5361 mandeep.dh 3908
          case 0: // SUCCESS
3909
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3910
              this.success = new InventoryItem();
3911
              this.success.read(iprot);
3430 rajveer 3912
            } else { 
3913
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3914
            }
3915
            break;
5361 mandeep.dh 3916
          case 1: // WEX
3917
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3918
              this.wex = new WarehouseServiceException();
3919
              this.wex.read(iprot);
4496 mandeep.dh 3920
            } else { 
3921
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3922
            }
3923
            break;
3924
          default:
3925
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3926
        }
3927
        iprot.readFieldEnd();
3928
      }
3929
      iprot.readStructEnd();
3930
      validate();
3931
    }
3932
 
3933
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3934
      oprot.writeStructBegin(STRUCT_DESC);
3935
 
3936
      if (this.isSetSuccess()) {
3937
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5361 mandeep.dh 3938
        this.success.write(oprot);
4496 mandeep.dh 3939
        oprot.writeFieldEnd();
5361 mandeep.dh 3940
      } else if (this.isSetWex()) {
3941
        oprot.writeFieldBegin(WEX_FIELD_DESC);
3942
        this.wex.write(oprot);
3943
        oprot.writeFieldEnd();
4496 mandeep.dh 3944
      }
3945
      oprot.writeFieldStop();
3946
      oprot.writeStructEnd();
3947
    }
3948
 
3949
    @Override
3950
    public String toString() {
5361 mandeep.dh 3951
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItem_result(");
4496 mandeep.dh 3952
      boolean first = true;
3953
 
3954
      sb.append("success:");
3955
      if (this.success == null) {
3956
        sb.append("null");
3957
      } else {
3958
        sb.append(this.success);
3959
      }
3960
      first = false;
5361 mandeep.dh 3961
      if (!first) sb.append(", ");
3962
      sb.append("wex:");
3963
      if (this.wex == null) {
3964
        sb.append("null");
3965
      } else {
3966
        sb.append(this.wex);
3967
      }
3968
      first = false;
4496 mandeep.dh 3969
      sb.append(")");
3970
      return sb.toString();
3971
    }
3972
 
3973
    public void validate() throws org.apache.thrift.TException {
3974
      // check for required fields
3975
    }
3976
 
3977
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3978
      try {
3979
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3980
      } catch (org.apache.thrift.TException te) {
3981
        throw new java.io.IOException(te);
3982
      }
3983
    }
3984
 
3985
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3986
      try {
3987
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3988
      } catch (org.apache.thrift.TException te) {
3989
        throw new java.io.IOException(te);
3990
      }
3991
    }
3992
 
3993
  }
3994
 
3995
  public static class scan_args implements org.apache.thrift.TBase<scan_args, scan_args._Fields>, java.io.Serializable, Cloneable   {
3996
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_args");
3383 chandransh 3997
 
5361 mandeep.dh 3998
    private static final org.apache.thrift.protocol.TField INVENTORY_ITEM_FIELD_DESC = new org.apache.thrift.protocol.TField("inventoryItem", org.apache.thrift.protocol.TType.STRUCT, (short)1);
4496 mandeep.dh 3999
    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);
4000
    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);
5361 mandeep.dh 4001
    private static final org.apache.thrift.protocol.TField BILLING_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("billingWarehouseId", org.apache.thrift.protocol.TType.I64, (short)4);
3383 chandransh 4002
 
5361 mandeep.dh 4003
    private InventoryItem inventoryItem; // required
4496 mandeep.dh 4004
    private ScanType type; // required
4005
    private long quantity; // required
5361 mandeep.dh 4006
    private long billingWarehouseId; // required
3383 chandransh 4007
 
4008
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4009
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 4010
      INVENTORY_ITEM((short)1, "inventoryItem"),
4496 mandeep.dh 4011
      /**
4012
       * 
4013
       * @see ScanType
4014
       */
4015
      TYPE((short)2, "type"),
4016
      QUANTITY((short)3, "quantity"),
5361 mandeep.dh 4017
      BILLING_WAREHOUSE_ID((short)4, "billingWarehouseId");
3383 chandransh 4018
 
4019
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4020
 
4021
      static {
4022
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4023
          byName.put(field.getFieldName(), field);
4024
        }
4025
      }
4026
 
4027
      /**
4028
       * Find the _Fields constant that matches fieldId, or null if its not found.
4029
       */
4030
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4031
        switch(fieldId) {
5361 mandeep.dh 4032
          case 1: // INVENTORY_ITEM
4033
            return INVENTORY_ITEM;
4496 mandeep.dh 4034
          case 2: // TYPE
4035
            return TYPE;
4036
          case 3: // QUANTITY
4037
            return QUANTITY;
5361 mandeep.dh 4038
          case 4: // BILLING_WAREHOUSE_ID
4039
            return BILLING_WAREHOUSE_ID;
3430 rajveer 4040
          default:
4041
            return null;
4042
        }
3383 chandransh 4043
      }
4044
 
4045
      /**
4046
       * Find the _Fields constant that matches fieldId, throwing an exception
4047
       * if it is not found.
4048
       */
4049
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4050
        _Fields fields = findByThriftId(fieldId);
4051
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4052
        return fields;
4053
      }
4054
 
4055
      /**
4056
       * Find the _Fields constant that matches name, or null if its not found.
4057
       */
4058
      public static _Fields findByName(String name) {
4059
        return byName.get(name);
4060
      }
4061
 
4062
      private final short _thriftId;
4063
      private final String _fieldName;
4064
 
4065
      _Fields(short thriftId, String fieldName) {
4066
        _thriftId = thriftId;
4067
        _fieldName = fieldName;
4068
      }
4069
 
4070
      public short getThriftFieldId() {
4071
        return _thriftId;
4072
      }
4073
 
4074
      public String getFieldName() {
4075
        return _fieldName;
4076
      }
4077
    }
4078
 
4079
    // isset id assignments
5361 mandeep.dh 4080
    private static final int __QUANTITY_ISSET_ID = 0;
4081
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 1;
4082
    private BitSet __isset_bit_vector = new BitSet(2);
3383 chandransh 4083
 
3430 rajveer 4084
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 4085
    static {
3430 rajveer 4086
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 4087
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4088
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4496 mandeep.dh 4089
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4090
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4091
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4092
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 4093
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 4094
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 4095
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4096
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_args.class, metaDataMap);
3383 chandransh 4097
    }
4098
 
4496 mandeep.dh 4099
    public scan_args() {
3383 chandransh 4100
    }
4101
 
4496 mandeep.dh 4102
    public scan_args(
5361 mandeep.dh 4103
      InventoryItem inventoryItem,
4496 mandeep.dh 4104
      ScanType type,
4105
      long quantity,
5361 mandeep.dh 4106
      long billingWarehouseId)
3383 chandransh 4107
    {
4108
      this();
5361 mandeep.dh 4109
      this.inventoryItem = inventoryItem;
4496 mandeep.dh 4110
      this.type = type;
4111
      this.quantity = quantity;
4112
      setQuantityIsSet(true);
5361 mandeep.dh 4113
      this.billingWarehouseId = billingWarehouseId;
4114
      setBillingWarehouseIdIsSet(true);
3383 chandransh 4115
    }
4116
 
4117
    /**
4118
     * Performs a deep copy on <i>other</i>.
4119
     */
4496 mandeep.dh 4120
    public scan_args(scan_args other) {
3383 chandransh 4121
      __isset_bit_vector.clear();
4122
      __isset_bit_vector.or(other.__isset_bit_vector);
5361 mandeep.dh 4123
      if (other.isSetInventoryItem()) {
4124
        this.inventoryItem = new InventoryItem(other.inventoryItem);
4125
      }
4496 mandeep.dh 4126
      if (other.isSetType()) {
4127
        this.type = other.type;
4128
      }
4129
      this.quantity = other.quantity;
5361 mandeep.dh 4130
      this.billingWarehouseId = other.billingWarehouseId;
3383 chandransh 4131
    }
4132
 
4496 mandeep.dh 4133
    public scan_args deepCopy() {
4134
      return new scan_args(this);
3383 chandransh 4135
    }
4136
 
3430 rajveer 4137
    @Override
4138
    public void clear() {
5361 mandeep.dh 4139
      this.inventoryItem = null;
4496 mandeep.dh 4140
      this.type = null;
4141
      setQuantityIsSet(false);
4142
      this.quantity = 0;
5361 mandeep.dh 4143
      setBillingWarehouseIdIsSet(false);
4144
      this.billingWarehouseId = 0;
3383 chandransh 4145
    }
4146
 
5361 mandeep.dh 4147
    public InventoryItem getInventoryItem() {
4148
      return this.inventoryItem;
3383 chandransh 4149
    }
4150
 
5361 mandeep.dh 4151
    public void setInventoryItem(InventoryItem inventoryItem) {
4152
      this.inventoryItem = inventoryItem;
3383 chandransh 4153
    }
4154
 
5361 mandeep.dh 4155
    public void unsetInventoryItem() {
4156
      this.inventoryItem = null;
3383 chandransh 4157
    }
4158
 
5361 mandeep.dh 4159
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
4160
    public boolean isSetInventoryItem() {
4161
      return this.inventoryItem != null;
3383 chandransh 4162
    }
4163
 
5361 mandeep.dh 4164
    public void setInventoryItemIsSet(boolean value) {
4165
      if (!value) {
4166
        this.inventoryItem = null;
4167
      }
3383 chandransh 4168
    }
4169
 
4496 mandeep.dh 4170
    /**
4171
     * 
4172
     * @see ScanType
4173
     */
4174
    public ScanType getType() {
4175
      return this.type;
3383 chandransh 4176
    }
4177
 
4496 mandeep.dh 4178
    /**
4179
     * 
4180
     * @see ScanType
4181
     */
4182
    public void setType(ScanType type) {
4183
      this.type = type;
3383 chandransh 4184
    }
4185
 
4496 mandeep.dh 4186
    public void unsetType() {
4187
      this.type = null;
3383 chandransh 4188
    }
4189
 
4496 mandeep.dh 4190
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
4191
    public boolean isSetType() {
4192
      return this.type != null;
3383 chandransh 4193
    }
4194
 
4496 mandeep.dh 4195
    public void setTypeIsSet(boolean value) {
4196
      if (!value) {
4197
        this.type = null;
4198
      }
3383 chandransh 4199
    }
4200
 
4496 mandeep.dh 4201
    public long getQuantity() {
4202
      return this.quantity;
4203
    }
4204
 
4205
    public void setQuantity(long quantity) {
4206
      this.quantity = quantity;
4207
      setQuantityIsSet(true);
4208
    }
4209
 
4210
    public void unsetQuantity() {
4211
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
4212
    }
4213
 
4214
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
4215
    public boolean isSetQuantity() {
4216
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
4217
    }
4218
 
4219
    public void setQuantityIsSet(boolean value) {
4220
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
4221
    }
4222
 
5361 mandeep.dh 4223
    public long getBillingWarehouseId() {
4224
      return this.billingWarehouseId;
4496 mandeep.dh 4225
    }
4226
 
5361 mandeep.dh 4227
    public void setBillingWarehouseId(long billingWarehouseId) {
4228
      this.billingWarehouseId = billingWarehouseId;
4229
      setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 4230
    }
4231
 
5361 mandeep.dh 4232
    public void unsetBillingWarehouseId() {
4233
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 4234
    }
4235
 
5361 mandeep.dh 4236
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
4237
    public boolean isSetBillingWarehouseId() {
4238
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 4239
    }
4240
 
5361 mandeep.dh 4241
    public void setBillingWarehouseIdIsSet(boolean value) {
4242
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 4243
    }
4244
 
3383 chandransh 4245
    public void setFieldValue(_Fields field, Object value) {
4246
      switch (field) {
5361 mandeep.dh 4247
      case INVENTORY_ITEM:
3383 chandransh 4248
        if (value == null) {
5361 mandeep.dh 4249
          unsetInventoryItem();
3383 chandransh 4250
        } else {
5361 mandeep.dh 4251
          setInventoryItem((InventoryItem)value);
3383 chandransh 4252
        }
4253
        break;
4254
 
4496 mandeep.dh 4255
      case TYPE:
3383 chandransh 4256
        if (value == null) {
4496 mandeep.dh 4257
          unsetType();
3383 chandransh 4258
        } else {
4496 mandeep.dh 4259
          setType((ScanType)value);
3383 chandransh 4260
        }
4261
        break;
4262
 
4496 mandeep.dh 4263
      case QUANTITY:
4264
        if (value == null) {
4265
          unsetQuantity();
4266
        } else {
4267
          setQuantity((Long)value);
4268
        }
4269
        break;
4270
 
5361 mandeep.dh 4271
      case BILLING_WAREHOUSE_ID:
4496 mandeep.dh 4272
        if (value == null) {
5361 mandeep.dh 4273
          unsetBillingWarehouseId();
4496 mandeep.dh 4274
        } else {
5361 mandeep.dh 4275
          setBillingWarehouseId((Long)value);
4496 mandeep.dh 4276
        }
4277
        break;
4278
 
3383 chandransh 4279
      }
4280
    }
4281
 
4282
    public Object getFieldValue(_Fields field) {
4283
      switch (field) {
5361 mandeep.dh 4284
      case INVENTORY_ITEM:
4285
        return getInventoryItem();
3383 chandransh 4286
 
4496 mandeep.dh 4287
      case TYPE:
4288
        return getType();
3383 chandransh 4289
 
4496 mandeep.dh 4290
      case QUANTITY:
4291
        return Long.valueOf(getQuantity());
4292
 
5361 mandeep.dh 4293
      case BILLING_WAREHOUSE_ID:
4294
        return Long.valueOf(getBillingWarehouseId());
4496 mandeep.dh 4295
 
3383 chandransh 4296
      }
4297
      throw new IllegalStateException();
4298
    }
4299
 
3430 rajveer 4300
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4301
    public boolean isSet(_Fields field) {
4302
      if (field == null) {
4303
        throw new IllegalArgumentException();
4304
      }
3383 chandransh 4305
 
4306
      switch (field) {
5361 mandeep.dh 4307
      case INVENTORY_ITEM:
4308
        return isSetInventoryItem();
4496 mandeep.dh 4309
      case TYPE:
4310
        return isSetType();
4311
      case QUANTITY:
4312
        return isSetQuantity();
5361 mandeep.dh 4313
      case BILLING_WAREHOUSE_ID:
4314
        return isSetBillingWarehouseId();
3383 chandransh 4315
      }
4316
      throw new IllegalStateException();
4317
    }
4318
 
4319
    @Override
4320
    public boolean equals(Object that) {
4321
      if (that == null)
4322
        return false;
4496 mandeep.dh 4323
      if (that instanceof scan_args)
4324
        return this.equals((scan_args)that);
3383 chandransh 4325
      return false;
4326
    }
4327
 
4496 mandeep.dh 4328
    public boolean equals(scan_args that) {
3383 chandransh 4329
      if (that == null)
4330
        return false;
4331
 
5361 mandeep.dh 4332
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
4333
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
4334
      if (this_present_inventoryItem || that_present_inventoryItem) {
4335
        if (!(this_present_inventoryItem && that_present_inventoryItem))
3383 chandransh 4336
          return false;
5361 mandeep.dh 4337
        if (!this.inventoryItem.equals(that.inventoryItem))
3383 chandransh 4338
          return false;
4339
      }
4340
 
4496 mandeep.dh 4341
      boolean this_present_type = true && this.isSetType();
4342
      boolean that_present_type = true && that.isSetType();
4343
      if (this_present_type || that_present_type) {
4344
        if (!(this_present_type && that_present_type))
3383 chandransh 4345
          return false;
4496 mandeep.dh 4346
        if (!this.type.equals(that.type))
3383 chandransh 4347
          return false;
4348
      }
4349
 
4496 mandeep.dh 4350
      boolean this_present_quantity = true;
4351
      boolean that_present_quantity = true;
4352
      if (this_present_quantity || that_present_quantity) {
4353
        if (!(this_present_quantity && that_present_quantity))
4354
          return false;
4355
        if (this.quantity != that.quantity)
4356
          return false;
4357
      }
4358
 
5361 mandeep.dh 4359
      boolean this_present_billingWarehouseId = true;
4360
      boolean that_present_billingWarehouseId = true;
4361
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
4362
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
4496 mandeep.dh 4363
          return false;
5361 mandeep.dh 4364
        if (this.billingWarehouseId != that.billingWarehouseId)
4496 mandeep.dh 4365
          return false;
4366
      }
4367
 
3383 chandransh 4368
      return true;
4369
    }
4370
 
4371
    @Override
4372
    public int hashCode() {
4373
      return 0;
4374
    }
4375
 
4496 mandeep.dh 4376
    public int compareTo(scan_args other) {
3383 chandransh 4377
      if (!getClass().equals(other.getClass())) {
4378
        return getClass().getName().compareTo(other.getClass().getName());
4379
      }
4380
 
4381
      int lastComparison = 0;
4496 mandeep.dh 4382
      scan_args typedOther = (scan_args)other;
3383 chandransh 4383
 
5361 mandeep.dh 4384
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
3383 chandransh 4385
      if (lastComparison != 0) {
4386
        return lastComparison;
4387
      }
5361 mandeep.dh 4388
      if (isSetInventoryItem()) {
4389
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
3430 rajveer 4390
        if (lastComparison != 0) {
4391
          return lastComparison;
4392
        }
3383 chandransh 4393
      }
4496 mandeep.dh 4394
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
3383 chandransh 4395
      if (lastComparison != 0) {
4396
        return lastComparison;
4397
      }
4496 mandeep.dh 4398
      if (isSetType()) {
4399
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 4400
        if (lastComparison != 0) {
4401
          return lastComparison;
4402
        }
3383 chandransh 4403
      }
4496 mandeep.dh 4404
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
4405
      if (lastComparison != 0) {
4406
        return lastComparison;
4407
      }
4408
      if (isSetQuantity()) {
4409
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
4410
        if (lastComparison != 0) {
4411
          return lastComparison;
4412
        }
4413
      }
5361 mandeep.dh 4414
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
4496 mandeep.dh 4415
      if (lastComparison != 0) {
4416
        return lastComparison;
4417
      }
5361 mandeep.dh 4418
      if (isSetBillingWarehouseId()) {
4419
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
4496 mandeep.dh 4420
        if (lastComparison != 0) {
4421
          return lastComparison;
4422
        }
4423
      }
3383 chandransh 4424
      return 0;
4425
    }
4426
 
3430 rajveer 4427
    public _Fields fieldForId(int fieldId) {
4428
      return _Fields.findByThriftId(fieldId);
4429
    }
4430
 
4431
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4432
      org.apache.thrift.protocol.TField field;
3383 chandransh 4433
      iprot.readStructBegin();
4434
      while (true)
4435
      {
4436
        field = iprot.readFieldBegin();
3430 rajveer 4437
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 4438
          break;
4439
        }
3430 rajveer 4440
        switch (field.id) {
5361 mandeep.dh 4441
          case 1: // INVENTORY_ITEM
4442
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4443
              this.inventoryItem = new InventoryItem();
4444
              this.inventoryItem.read(iprot);
3430 rajveer 4445
            } else { 
4446
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4447
            }
4448
            break;
4496 mandeep.dh 4449
          case 2: // TYPE
4450
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4451
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 4452
            } else { 
4453
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4454
            }
4455
            break;
4496 mandeep.dh 4456
          case 3: // QUANTITY
4457
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4458
              this.quantity = iprot.readI64();
4459
              setQuantityIsSet(true);
4460
            } else { 
4461
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4462
            }
4463
            break;
5361 mandeep.dh 4464
          case 4: // BILLING_WAREHOUSE_ID
4496 mandeep.dh 4465
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5361 mandeep.dh 4466
              this.billingWarehouseId = iprot.readI64();
4467
              setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 4468
            } else { 
4469
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4470
            }
4471
            break;
3430 rajveer 4472
          default:
4473
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 4474
        }
3430 rajveer 4475
        iprot.readFieldEnd();
3383 chandransh 4476
      }
4477
      iprot.readStructEnd();
4478
      validate();
4479
    }
4480
 
3430 rajveer 4481
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 4482
      validate();
4483
 
4484
      oprot.writeStructBegin(STRUCT_DESC);
5361 mandeep.dh 4485
      if (this.inventoryItem != null) {
4486
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
4487
        this.inventoryItem.write(oprot);
4488
        oprot.writeFieldEnd();
4489
      }
4496 mandeep.dh 4490
      if (this.type != null) {
4491
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
4492
        oprot.writeI32(this.type.getValue());
4493
        oprot.writeFieldEnd();
4494
      }
4495
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
4496
      oprot.writeI64(this.quantity);
3383 chandransh 4497
      oprot.writeFieldEnd();
5361 mandeep.dh 4498
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
4499
      oprot.writeI64(this.billingWarehouseId);
4496 mandeep.dh 4500
      oprot.writeFieldEnd();
3383 chandransh 4501
      oprot.writeFieldStop();
4502
      oprot.writeStructEnd();
4503
    }
4504
 
4505
    @Override
4506
    public String toString() {
4496 mandeep.dh 4507
      StringBuilder sb = new StringBuilder("scan_args(");
3383 chandransh 4508
      boolean first = true;
4509
 
5361 mandeep.dh 4510
      sb.append("inventoryItem:");
4511
      if (this.inventoryItem == null) {
4512
        sb.append("null");
4513
      } else {
4514
        sb.append(this.inventoryItem);
4515
      }
3383 chandransh 4516
      first = false;
4517
      if (!first) sb.append(", ");
4496 mandeep.dh 4518
      sb.append("type:");
4519
      if (this.type == null) {
4520
        sb.append("null");
4521
      } else {
4522
        sb.append(this.type);
4523
      }
3383 chandransh 4524
      first = false;
4496 mandeep.dh 4525
      if (!first) sb.append(", ");
4526
      sb.append("quantity:");
4527
      sb.append(this.quantity);
4528
      first = false;
4529
      if (!first) sb.append(", ");
5361 mandeep.dh 4530
      sb.append("billingWarehouseId:");
4531
      sb.append(this.billingWarehouseId);
4496 mandeep.dh 4532
      first = false;
3383 chandransh 4533
      sb.append(")");
4534
      return sb.toString();
4535
    }
4536
 
3430 rajveer 4537
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 4538
      // check for required fields
4539
    }
4540
 
3430 rajveer 4541
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4542
      try {
4543
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4544
      } catch (org.apache.thrift.TException te) {
4545
        throw new java.io.IOException(te);
4546
      }
4547
    }
4548
 
4549
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4550
      try {
4496 mandeep.dh 4551
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
4552
        __isset_bit_vector = new BitSet(1);
3430 rajveer 4553
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4554
      } catch (org.apache.thrift.TException te) {
4555
        throw new java.io.IOException(te);
4556
      }
4557
    }
4558
 
3383 chandransh 4559
  }
4560
 
4496 mandeep.dh 4561
  public static class scan_result implements org.apache.thrift.TBase<scan_result, scan_result._Fields>, java.io.Serializable, Cloneable   {
4562
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_result");
3383 chandransh 4563
 
3430 rajveer 4564
    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);
3383 chandransh 4565
 
3430 rajveer 4566
    private WarehouseServiceException wex; // required
3383 chandransh 4567
 
4568
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4569
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3383 chandransh 4570
      WEX((short)1, "wex");
4571
 
4572
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4573
 
4574
      static {
4575
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4576
          byName.put(field.getFieldName(), field);
4577
        }
4578
      }
4579
 
4580
      /**
4581
       * Find the _Fields constant that matches fieldId, or null if its not found.
4582
       */
4583
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4584
        switch(fieldId) {
4585
          case 1: // WEX
4586
            return WEX;
4587
          default:
4588
            return null;
4589
        }
3383 chandransh 4590
      }
4591
 
4592
      /**
4593
       * Find the _Fields constant that matches fieldId, throwing an exception
4594
       * if it is not found.
4595
       */
4596
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4597
        _Fields fields = findByThriftId(fieldId);
4598
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4599
        return fields;
4600
      }
4601
 
4602
      /**
4603
       * Find the _Fields constant that matches name, or null if its not found.
4604
       */
4605
      public static _Fields findByName(String name) {
4606
        return byName.get(name);
4607
      }
4608
 
4609
      private final short _thriftId;
4610
      private final String _fieldName;
4611
 
4612
      _Fields(short thriftId, String fieldName) {
4613
        _thriftId = thriftId;
4614
        _fieldName = fieldName;
4615
      }
4616
 
4617
      public short getThriftFieldId() {
4618
        return _thriftId;
4619
      }
4620
 
4621
      public String getFieldName() {
4622
        return _fieldName;
4623
      }
4624
    }
4625
 
4626
    // isset id assignments
4627
 
3430 rajveer 4628
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 4629
    static {
3430 rajveer 4630
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4631
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4632
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4633
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4634
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_result.class, metaDataMap);
3383 chandransh 4635
    }
4636
 
4496 mandeep.dh 4637
    public scan_result() {
3383 chandransh 4638
    }
4639
 
4496 mandeep.dh 4640
    public scan_result(
3383 chandransh 4641
      WarehouseServiceException wex)
4642
    {
4643
      this();
4644
      this.wex = wex;
4645
    }
4646
 
4647
    /**
4648
     * Performs a deep copy on <i>other</i>.
4649
     */
4496 mandeep.dh 4650
    public scan_result(scan_result other) {
3383 chandransh 4651
      if (other.isSetWex()) {
4652
        this.wex = new WarehouseServiceException(other.wex);
4653
      }
4654
    }
4655
 
4496 mandeep.dh 4656
    public scan_result deepCopy() {
4657
      return new scan_result(this);
3383 chandransh 4658
    }
4659
 
3430 rajveer 4660
    @Override
4661
    public void clear() {
4662
      this.wex = null;
3383 chandransh 4663
    }
4664
 
4665
    public WarehouseServiceException getWex() {
4666
      return this.wex;
4667
    }
4668
 
3430 rajveer 4669
    public void setWex(WarehouseServiceException wex) {
3383 chandransh 4670
      this.wex = wex;
4671
    }
4672
 
4673
    public void unsetWex() {
4674
      this.wex = null;
4675
    }
4676
 
3430 rajveer 4677
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3383 chandransh 4678
    public boolean isSetWex() {
4679
      return this.wex != null;
4680
    }
4681
 
4682
    public void setWexIsSet(boolean value) {
4683
      if (!value) {
4684
        this.wex = null;
4685
      }
4686
    }
4687
 
4688
    public void setFieldValue(_Fields field, Object value) {
4689
      switch (field) {
4690
      case WEX:
4691
        if (value == null) {
4692
          unsetWex();
4693
        } else {
4694
          setWex((WarehouseServiceException)value);
4695
        }
4696
        break;
4697
 
4698
      }
4699
    }
4700
 
4701
    public Object getFieldValue(_Fields field) {
4702
      switch (field) {
4703
      case WEX:
4704
        return getWex();
4705
 
4706
      }
4707
      throw new IllegalStateException();
4708
    }
4709
 
3430 rajveer 4710
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4711
    public boolean isSet(_Fields field) {
4712
      if (field == null) {
4713
        throw new IllegalArgumentException();
4714
      }
3383 chandransh 4715
 
4716
      switch (field) {
4717
      case WEX:
4718
        return isSetWex();
4719
      }
4720
      throw new IllegalStateException();
4721
    }
4722
 
4723
    @Override
4724
    public boolean equals(Object that) {
4725
      if (that == null)
4726
        return false;
4496 mandeep.dh 4727
      if (that instanceof scan_result)
4728
        return this.equals((scan_result)that);
3383 chandransh 4729
      return false;
4730
    }
4731
 
4496 mandeep.dh 4732
    public boolean equals(scan_result that) {
3383 chandransh 4733
      if (that == null)
4734
        return false;
4735
 
4736
      boolean this_present_wex = true && this.isSetWex();
4737
      boolean that_present_wex = true && that.isSetWex();
4738
      if (this_present_wex || that_present_wex) {
4739
        if (!(this_present_wex && that_present_wex))
4740
          return false;
4741
        if (!this.wex.equals(that.wex))
4742
          return false;
4743
      }
4744
 
4745
      return true;
4746
    }
4747
 
4748
    @Override
4749
    public int hashCode() {
4750
      return 0;
4751
    }
4752
 
4496 mandeep.dh 4753
    public int compareTo(scan_result other) {
3383 chandransh 4754
      if (!getClass().equals(other.getClass())) {
4755
        return getClass().getName().compareTo(other.getClass().getName());
4756
      }
4757
 
4758
      int lastComparison = 0;
4496 mandeep.dh 4759
      scan_result typedOther = (scan_result)other;
3383 chandransh 4760
 
3430 rajveer 4761
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
3383 chandransh 4762
      if (lastComparison != 0) {
4763
        return lastComparison;
4764
      }
3430 rajveer 4765
      if (isSetWex()) {
4766
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
4767
        if (lastComparison != 0) {
4768
          return lastComparison;
4769
        }
3383 chandransh 4770
      }
4771
      return 0;
4772
    }
4773
 
3430 rajveer 4774
    public _Fields fieldForId(int fieldId) {
4775
      return _Fields.findByThriftId(fieldId);
4776
    }
4777
 
4778
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4779
      org.apache.thrift.protocol.TField field;
3383 chandransh 4780
      iprot.readStructBegin();
4781
      while (true)
4782
      {
4783
        field = iprot.readFieldBegin();
3430 rajveer 4784
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 4785
          break;
4786
        }
3430 rajveer 4787
        switch (field.id) {
4788
          case 1: // WEX
4789
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4790
              this.wex = new WarehouseServiceException();
4791
              this.wex.read(iprot);
4792
            } else { 
4793
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4794
            }
4795
            break;
4796
          default:
4797
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 4798
        }
3430 rajveer 4799
        iprot.readFieldEnd();
3383 chandransh 4800
      }
4801
      iprot.readStructEnd();
4802
      validate();
4803
    }
4804
 
3430 rajveer 4805
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 4806
      oprot.writeStructBegin(STRUCT_DESC);
4807
 
4496 mandeep.dh 4808
      if (this.isSetWex()) {
3383 chandransh 4809
        oprot.writeFieldBegin(WEX_FIELD_DESC);
4810
        this.wex.write(oprot);
4811
        oprot.writeFieldEnd();
4812
      }
4813
      oprot.writeFieldStop();
4814
      oprot.writeStructEnd();
4815
    }
4816
 
4817
    @Override
4818
    public String toString() {
4496 mandeep.dh 4819
      StringBuilder sb = new StringBuilder("scan_result(");
3383 chandransh 4820
      boolean first = true;
4821
 
4822
      sb.append("wex:");
4823
      if (this.wex == null) {
4824
        sb.append("null");
4825
      } else {
4826
        sb.append(this.wex);
4827
      }
4828
      first = false;
4829
      sb.append(")");
4830
      return sb.toString();
4831
    }
4832
 
3430 rajveer 4833
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 4834
      // check for required fields
4835
    }
4836
 
3430 rajveer 4837
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4838
      try {
4839
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4840
      } catch (org.apache.thrift.TException te) {
4841
        throw new java.io.IOException(te);
4842
      }
4843
    }
4844
 
4845
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4846
      try {
4847
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4848
      } catch (org.apache.thrift.TException te) {
4849
        throw new java.io.IOException(te);
4850
      }
4851
    }
4852
 
3383 chandransh 4853
  }
4854
 
4496 mandeep.dh 4855
  public static class scanSerializedItemForOrder_args implements org.apache.thrift.TBase<scanSerializedItemForOrder_args, scanSerializedItemForOrder_args._Fields>, java.io.Serializable, Cloneable   {
4856
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_args");
2820 chandransh 4857
 
4555 mandeep.dh 4858
    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);
4496 mandeep.dh 4859
    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);
4860
    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);
5110 mandeep.dh 4861
    private static final org.apache.thrift.protocol.TField FULFILMENT_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fulfilmentWarehouseId", org.apache.thrift.protocol.TType.I64, (short)4);
4862
    private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.DOUBLE, (short)5);
4863
    private static final org.apache.thrift.protocol.TField BILLING_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("billingWarehouseId", org.apache.thrift.protocol.TType.I64, (short)6);
2820 chandransh 4864
 
4555 mandeep.dh 4865
    private String serialNumber; // required
3430 rajveer 4866
    private ScanType type; // required
4496 mandeep.dh 4867
    private long orderId; // required
5110 mandeep.dh 4868
    private long fulfilmentWarehouseId; // required
4869
    private double quantity; // required
4870
    private long billingWarehouseId; // required
2820 chandransh 4871
 
4872
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4873
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 4874
      SERIAL_NUMBER((short)1, "serialNumber"),
2820 chandransh 4875
      /**
4876
       * 
4877
       * @see ScanType
4878
       */
4496 mandeep.dh 4879
      TYPE((short)2, "type"),
4880
      ORDER_ID((short)3, "orderId"),
5110 mandeep.dh 4881
      FULFILMENT_WAREHOUSE_ID((short)4, "fulfilmentWarehouseId"),
4882
      QUANTITY((short)5, "quantity"),
4883
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 4884
 
4885
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4886
 
4887
      static {
4888
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4889
          byName.put(field.getFieldName(), field);
4890
        }
4891
      }
4892
 
4893
      /**
4894
       * Find the _Fields constant that matches fieldId, or null if its not found.
4895
       */
4896
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4897
        switch(fieldId) {
4555 mandeep.dh 4898
          case 1: // SERIAL_NUMBER
4899
            return SERIAL_NUMBER;
4496 mandeep.dh 4900
          case 2: // TYPE
3430 rajveer 4901
            return TYPE;
4496 mandeep.dh 4902
          case 3: // ORDER_ID
4903
            return ORDER_ID;
5110 mandeep.dh 4904
          case 4: // FULFILMENT_WAREHOUSE_ID
4905
            return FULFILMENT_WAREHOUSE_ID;
4906
          case 5: // QUANTITY
4907
            return QUANTITY;
4908
          case 6: // BILLING_WAREHOUSE_ID
4909
            return BILLING_WAREHOUSE_ID;
3430 rajveer 4910
          default:
4911
            return null;
4912
        }
2820 chandransh 4913
      }
4914
 
4915
      /**
4916
       * Find the _Fields constant that matches fieldId, throwing an exception
4917
       * if it is not found.
4918
       */
4919
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4920
        _Fields fields = findByThriftId(fieldId);
4921
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4922
        return fields;
4923
      }
4924
 
4925
      /**
4926
       * Find the _Fields constant that matches name, or null if its not found.
4927
       */
4928
      public static _Fields findByName(String name) {
4929
        return byName.get(name);
4930
      }
4931
 
4932
      private final short _thriftId;
4933
      private final String _fieldName;
4934
 
4935
      _Fields(short thriftId, String fieldName) {
4936
        _thriftId = thriftId;
4937
        _fieldName = fieldName;
4938
      }
4939
 
4940
      public short getThriftFieldId() {
4941
        return _thriftId;
4942
      }
4943
 
4944
      public String getFieldName() {
4945
        return _fieldName;
4946
      }
4947
    }
4948
 
4949
    // isset id assignments
4555 mandeep.dh 4950
    private static final int __ORDERID_ISSET_ID = 0;
5110 mandeep.dh 4951
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 1;
4952
    private static final int __QUANTITY_ISSET_ID = 2;
4953
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
4954
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 4955
 
3430 rajveer 4956
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 4957
    static {
3430 rajveer 4958
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4555 mandeep.dh 4959
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4960
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 4961
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4962
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 4963
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4964
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 4965
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 4966
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 4967
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4968
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
4969
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4970
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 4971
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4972
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_args.class, metaDataMap);
2820 chandransh 4973
    }
4974
 
4496 mandeep.dh 4975
    public scanSerializedItemForOrder_args() {
2820 chandransh 4976
    }
4977
 
4496 mandeep.dh 4978
    public scanSerializedItemForOrder_args(
4555 mandeep.dh 4979
      String serialNumber,
4496 mandeep.dh 4980
      ScanType type,
4981
      long orderId,
5110 mandeep.dh 4982
      long fulfilmentWarehouseId,
4983
      double quantity,
4984
      long billingWarehouseId)
2820 chandransh 4985
    {
4986
      this();
4555 mandeep.dh 4987
      this.serialNumber = serialNumber;
2820 chandransh 4988
      this.type = type;
4496 mandeep.dh 4989
      this.orderId = orderId;
4990
      setOrderIdIsSet(true);
5110 mandeep.dh 4991
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
4992
      setFulfilmentWarehouseIdIsSet(true);
4993
      this.quantity = quantity;
4994
      setQuantityIsSet(true);
4995
      this.billingWarehouseId = billingWarehouseId;
4996
      setBillingWarehouseIdIsSet(true);
2820 chandransh 4997
    }
4998
 
4999
    /**
5000
     * Performs a deep copy on <i>other</i>.
5001
     */
4496 mandeep.dh 5002
    public scanSerializedItemForOrder_args(scanSerializedItemForOrder_args other) {
2820 chandransh 5003
      __isset_bit_vector.clear();
5004
      __isset_bit_vector.or(other.__isset_bit_vector);
4555 mandeep.dh 5005
      if (other.isSetSerialNumber()) {
5006
        this.serialNumber = other.serialNumber;
5007
      }
2820 chandransh 5008
      if (other.isSetType()) {
5009
        this.type = other.type;
5010
      }
4496 mandeep.dh 5011
      this.orderId = other.orderId;
5110 mandeep.dh 5012
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
5013
      this.quantity = other.quantity;
5014
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 5015
    }
5016
 
4496 mandeep.dh 5017
    public scanSerializedItemForOrder_args deepCopy() {
5018
      return new scanSerializedItemForOrder_args(this);
2820 chandransh 5019
    }
5020
 
3430 rajveer 5021
    @Override
5022
    public void clear() {
4555 mandeep.dh 5023
      this.serialNumber = null;
3430 rajveer 5024
      this.type = null;
4496 mandeep.dh 5025
      setOrderIdIsSet(false);
5026
      this.orderId = 0;
5110 mandeep.dh 5027
      setFulfilmentWarehouseIdIsSet(false);
5028
      this.fulfilmentWarehouseId = 0;
5029
      setQuantityIsSet(false);
5030
      this.quantity = 0.0;
5031
      setBillingWarehouseIdIsSet(false);
5032
      this.billingWarehouseId = 0;
2820 chandransh 5033
    }
5034
 
4555 mandeep.dh 5035
    public String getSerialNumber() {
5036
      return this.serialNumber;
2820 chandransh 5037
    }
5038
 
4555 mandeep.dh 5039
    public void setSerialNumber(String serialNumber) {
5040
      this.serialNumber = serialNumber;
2820 chandransh 5041
    }
5042
 
4555 mandeep.dh 5043
    public void unsetSerialNumber() {
5044
      this.serialNumber = null;
2820 chandransh 5045
    }
5046
 
4555 mandeep.dh 5047
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
5048
    public boolean isSetSerialNumber() {
5049
      return this.serialNumber != null;
2820 chandransh 5050
    }
5051
 
4555 mandeep.dh 5052
    public void setSerialNumberIsSet(boolean value) {
5053
      if (!value) {
5054
        this.serialNumber = null;
5055
      }
2820 chandransh 5056
    }
5057
 
4496 mandeep.dh 5058
    /**
5059
     * 
5060
     * @see ScanType
5061
     */
5062
    public ScanType getType() {
5063
      return this.type;
2820 chandransh 5064
    }
5065
 
4496 mandeep.dh 5066
    /**
5067
     * 
5068
     * @see ScanType
5069
     */
5070
    public void setType(ScanType type) {
5071
      this.type = type;
2820 chandransh 5072
    }
5073
 
4496 mandeep.dh 5074
    public void unsetType() {
5075
      this.type = null;
2820 chandransh 5076
    }
5077
 
4496 mandeep.dh 5078
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
5079
    public boolean isSetType() {
5080
      return this.type != null;
2820 chandransh 5081
    }
5082
 
4496 mandeep.dh 5083
    public void setTypeIsSet(boolean value) {
2820 chandransh 5084
      if (!value) {
4496 mandeep.dh 5085
        this.type = null;
2820 chandransh 5086
      }
5087
    }
5088
 
4496 mandeep.dh 5089
    public long getOrderId() {
5090
      return this.orderId;
2820 chandransh 5091
    }
5092
 
4496 mandeep.dh 5093
    public void setOrderId(long orderId) {
5094
      this.orderId = orderId;
5095
      setOrderIdIsSet(true);
2820 chandransh 5096
    }
5097
 
4496 mandeep.dh 5098
    public void unsetOrderId() {
5099
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
2820 chandransh 5100
    }
5101
 
4496 mandeep.dh 5102
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
5103
    public boolean isSetOrderId() {
5104
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
2820 chandransh 5105
    }
5106
 
4496 mandeep.dh 5107
    public void setOrderIdIsSet(boolean value) {
5108
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
2820 chandransh 5109
    }
5110
 
5110 mandeep.dh 5111
    public long getFulfilmentWarehouseId() {
5112
      return this.fulfilmentWarehouseId;
2820 chandransh 5113
    }
5114
 
5110 mandeep.dh 5115
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
5116
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5117
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 5118
    }
5119
 
5110 mandeep.dh 5120
    public void unsetFulfilmentWarehouseId() {
5121
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 5122
    }
5123
 
5110 mandeep.dh 5124
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
5125
    public boolean isSetFulfilmentWarehouseId() {
5126
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 5127
    }
5128
 
5110 mandeep.dh 5129
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
5130
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
2820 chandransh 5131
    }
5132
 
5110 mandeep.dh 5133
    public double getQuantity() {
5134
      return this.quantity;
5135
    }
5136
 
5137
    public void setQuantity(double quantity) {
5138
      this.quantity = quantity;
5139
      setQuantityIsSet(true);
5140
    }
5141
 
5142
    public void unsetQuantity() {
5143
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
5144
    }
5145
 
5146
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
5147
    public boolean isSetQuantity() {
5148
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
5149
    }
5150
 
5151
    public void setQuantityIsSet(boolean value) {
5152
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
5153
    }
5154
 
5155
    public long getBillingWarehouseId() {
5156
      return this.billingWarehouseId;
5157
    }
5158
 
5159
    public void setBillingWarehouseId(long billingWarehouseId) {
5160
      this.billingWarehouseId = billingWarehouseId;
5161
      setBillingWarehouseIdIsSet(true);
5162
    }
5163
 
5164
    public void unsetBillingWarehouseId() {
5165
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
5166
    }
5167
 
5168
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
5169
    public boolean isSetBillingWarehouseId() {
5170
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
5171
    }
5172
 
5173
    public void setBillingWarehouseIdIsSet(boolean value) {
5174
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
5175
    }
5176
 
2820 chandransh 5177
    public void setFieldValue(_Fields field, Object value) {
5178
      switch (field) {
4555 mandeep.dh 5179
      case SERIAL_NUMBER:
2820 chandransh 5180
        if (value == null) {
4555 mandeep.dh 5181
          unsetSerialNumber();
2820 chandransh 5182
        } else {
4555 mandeep.dh 5183
          setSerialNumber((String)value);
2820 chandransh 5184
        }
5185
        break;
5186
 
4496 mandeep.dh 5187
      case TYPE:
2820 chandransh 5188
        if (value == null) {
4496 mandeep.dh 5189
          unsetType();
2820 chandransh 5190
        } else {
4496 mandeep.dh 5191
          setType((ScanType)value);
2820 chandransh 5192
        }
5193
        break;
5194
 
4496 mandeep.dh 5195
      case ORDER_ID:
2820 chandransh 5196
        if (value == null) {
4496 mandeep.dh 5197
          unsetOrderId();
2820 chandransh 5198
        } else {
4496 mandeep.dh 5199
          setOrderId((Long)value);
2820 chandransh 5200
        }
5201
        break;
5202
 
5110 mandeep.dh 5203
      case FULFILMENT_WAREHOUSE_ID:
2820 chandransh 5204
        if (value == null) {
5110 mandeep.dh 5205
          unsetFulfilmentWarehouseId();
2820 chandransh 5206
        } else {
5110 mandeep.dh 5207
          setFulfilmentWarehouseId((Long)value);
2820 chandransh 5208
        }
5209
        break;
5210
 
5110 mandeep.dh 5211
      case QUANTITY:
5212
        if (value == null) {
5213
          unsetQuantity();
5214
        } else {
5215
          setQuantity((Double)value);
5216
        }
5217
        break;
5218
 
5219
      case BILLING_WAREHOUSE_ID:
5220
        if (value == null) {
5221
          unsetBillingWarehouseId();
5222
        } else {
5223
          setBillingWarehouseId((Long)value);
5224
        }
5225
        break;
5226
 
2820 chandransh 5227
      }
5228
    }
5229
 
5230
    public Object getFieldValue(_Fields field) {
5231
      switch (field) {
4555 mandeep.dh 5232
      case SERIAL_NUMBER:
5233
        return getSerialNumber();
2820 chandransh 5234
 
5235
      case TYPE:
5236
        return getType();
5237
 
4496 mandeep.dh 5238
      case ORDER_ID:
5239
        return Long.valueOf(getOrderId());
5240
 
5110 mandeep.dh 5241
      case FULFILMENT_WAREHOUSE_ID:
5242
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 5243
 
5110 mandeep.dh 5244
      case QUANTITY:
5245
        return Double.valueOf(getQuantity());
5246
 
5247
      case BILLING_WAREHOUSE_ID:
5248
        return Long.valueOf(getBillingWarehouseId());
5249
 
2820 chandransh 5250
      }
5251
      throw new IllegalStateException();
5252
    }
5253
 
3430 rajveer 5254
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5255
    public boolean isSet(_Fields field) {
5256
      if (field == null) {
5257
        throw new IllegalArgumentException();
5258
      }
2820 chandransh 5259
 
5260
      switch (field) {
4555 mandeep.dh 5261
      case SERIAL_NUMBER:
5262
        return isSetSerialNumber();
2820 chandransh 5263
      case TYPE:
5264
        return isSetType();
4496 mandeep.dh 5265
      case ORDER_ID:
5266
        return isSetOrderId();
5110 mandeep.dh 5267
      case FULFILMENT_WAREHOUSE_ID:
5268
        return isSetFulfilmentWarehouseId();
5269
      case QUANTITY:
5270
        return isSetQuantity();
5271
      case BILLING_WAREHOUSE_ID:
5272
        return isSetBillingWarehouseId();
2820 chandransh 5273
      }
5274
      throw new IllegalStateException();
5275
    }
5276
 
5277
    @Override
5278
    public boolean equals(Object that) {
5279
      if (that == null)
5280
        return false;
4496 mandeep.dh 5281
      if (that instanceof scanSerializedItemForOrder_args)
5282
        return this.equals((scanSerializedItemForOrder_args)that);
2820 chandransh 5283
      return false;
5284
    }
5285
 
4496 mandeep.dh 5286
    public boolean equals(scanSerializedItemForOrder_args that) {
2820 chandransh 5287
      if (that == null)
5288
        return false;
5289
 
4555 mandeep.dh 5290
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
5291
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
5292
      if (this_present_serialNumber || that_present_serialNumber) {
5293
        if (!(this_present_serialNumber && that_present_serialNumber))
2820 chandransh 5294
          return false;
4555 mandeep.dh 5295
        if (!this.serialNumber.equals(that.serialNumber))
2820 chandransh 5296
          return false;
5297
      }
5298
 
4496 mandeep.dh 5299
      boolean this_present_type = true && this.isSetType();
5300
      boolean that_present_type = true && that.isSetType();
5301
      if (this_present_type || that_present_type) {
5302
        if (!(this_present_type && that_present_type))
2820 chandransh 5303
          return false;
4496 mandeep.dh 5304
        if (!this.type.equals(that.type))
2820 chandransh 5305
          return false;
5306
      }
5307
 
4496 mandeep.dh 5308
      boolean this_present_orderId = true;
5309
      boolean that_present_orderId = true;
5310
      if (this_present_orderId || that_present_orderId) {
5311
        if (!(this_present_orderId && that_present_orderId))
2820 chandransh 5312
          return false;
4496 mandeep.dh 5313
        if (this.orderId != that.orderId)
2820 chandransh 5314
          return false;
5315
      }
5316
 
5110 mandeep.dh 5317
      boolean this_present_fulfilmentWarehouseId = true;
5318
      boolean that_present_fulfilmentWarehouseId = true;
5319
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
5320
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
2820 chandransh 5321
          return false;
5110 mandeep.dh 5322
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
2820 chandransh 5323
          return false;
5324
      }
5325
 
5110 mandeep.dh 5326
      boolean this_present_quantity = true;
5327
      boolean that_present_quantity = true;
5328
      if (this_present_quantity || that_present_quantity) {
5329
        if (!(this_present_quantity && that_present_quantity))
5330
          return false;
5331
        if (this.quantity != that.quantity)
5332
          return false;
5333
      }
5334
 
5335
      boolean this_present_billingWarehouseId = true;
5336
      boolean that_present_billingWarehouseId = true;
5337
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
5338
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
5339
          return false;
5340
        if (this.billingWarehouseId != that.billingWarehouseId)
5341
          return false;
5342
      }
5343
 
2820 chandransh 5344
      return true;
5345
    }
5346
 
5347
    @Override
5348
    public int hashCode() {
5349
      return 0;
5350
    }
5351
 
4496 mandeep.dh 5352
    public int compareTo(scanSerializedItemForOrder_args other) {
2820 chandransh 5353
      if (!getClass().equals(other.getClass())) {
5354
        return getClass().getName().compareTo(other.getClass().getName());
5355
      }
5356
 
5357
      int lastComparison = 0;
4496 mandeep.dh 5358
      scanSerializedItemForOrder_args typedOther = (scanSerializedItemForOrder_args)other;
2820 chandransh 5359
 
4555 mandeep.dh 5360
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2820 chandransh 5361
      if (lastComparison != 0) {
5362
        return lastComparison;
5363
      }
4555 mandeep.dh 5364
      if (isSetSerialNumber()) {
5365
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 5366
        if (lastComparison != 0) {
5367
          return lastComparison;
5368
        }
2820 chandransh 5369
      }
4496 mandeep.dh 5370
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 5371
      if (lastComparison != 0) {
5372
        return lastComparison;
5373
      }
4496 mandeep.dh 5374
      if (isSetType()) {
5375
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 5376
        if (lastComparison != 0) {
5377
          return lastComparison;
5378
        }
2820 chandransh 5379
      }
4496 mandeep.dh 5380
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
2820 chandransh 5381
      if (lastComparison != 0) {
5382
        return lastComparison;
5383
      }
4496 mandeep.dh 5384
      if (isSetOrderId()) {
5385
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
3430 rajveer 5386
        if (lastComparison != 0) {
5387
          return lastComparison;
5388
        }
2820 chandransh 5389
      }
5110 mandeep.dh 5390
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
2820 chandransh 5391
      if (lastComparison != 0) {
5392
        return lastComparison;
5393
      }
5110 mandeep.dh 5394
      if (isSetFulfilmentWarehouseId()) {
5395
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
3430 rajveer 5396
        if (lastComparison != 0) {
5397
          return lastComparison;
5398
        }
2820 chandransh 5399
      }
5110 mandeep.dh 5400
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
5401
      if (lastComparison != 0) {
5402
        return lastComparison;
5403
      }
5404
      if (isSetQuantity()) {
5405
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
5406
        if (lastComparison != 0) {
5407
          return lastComparison;
5408
        }
5409
      }
5410
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
5411
      if (lastComparison != 0) {
5412
        return lastComparison;
5413
      }
5414
      if (isSetBillingWarehouseId()) {
5415
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
5416
        if (lastComparison != 0) {
5417
          return lastComparison;
5418
        }
5419
      }
2820 chandransh 5420
      return 0;
5421
    }
5422
 
3430 rajveer 5423
    public _Fields fieldForId(int fieldId) {
5424
      return _Fields.findByThriftId(fieldId);
5425
    }
5426
 
5427
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5428
      org.apache.thrift.protocol.TField field;
2820 chandransh 5429
      iprot.readStructBegin();
5430
      while (true)
5431
      {
5432
        field = iprot.readFieldBegin();
3430 rajveer 5433
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 5434
          break;
5435
        }
3430 rajveer 5436
        switch (field.id) {
4555 mandeep.dh 5437
          case 1: // SERIAL_NUMBER
5438
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
5439
              this.serialNumber = iprot.readString();
3430 rajveer 5440
            } else { 
5441
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5442
            }
5443
            break;
4496 mandeep.dh 5444
          case 2: // TYPE
5445
            if (field.type == org.apache.thrift.protocol.TType.I32) {
5446
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 5447
            } else { 
5448
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5449
            }
5450
            break;
4496 mandeep.dh 5451
          case 3: // ORDER_ID
5452
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5453
              this.orderId = iprot.readI64();
5454
              setOrderIdIsSet(true);
3430 rajveer 5455
            } else { 
5456
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5457
            }
5458
            break;
5110 mandeep.dh 5459
          case 4: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 5460
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 5461
              this.fulfilmentWarehouseId = iprot.readI64();
5462
              setFulfilmentWarehouseIdIsSet(true);
3430 rajveer 5463
            } else { 
5464
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5465
            }
5466
            break;
5110 mandeep.dh 5467
          case 5: // QUANTITY
5468
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
5469
              this.quantity = iprot.readDouble();
5470
              setQuantityIsSet(true);
5471
            } else { 
5472
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5473
            }
5474
            break;
5475
          case 6: // BILLING_WAREHOUSE_ID
5476
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5477
              this.billingWarehouseId = iprot.readI64();
5478
              setBillingWarehouseIdIsSet(true);
5479
            } else { 
5480
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5481
            }
5482
            break;
3430 rajveer 5483
          default:
5484
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 5485
        }
3430 rajveer 5486
        iprot.readFieldEnd();
2820 chandransh 5487
      }
5488
      iprot.readStructEnd();
5489
      validate();
5490
    }
5491
 
3430 rajveer 5492
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 5493
      validate();
5494
 
5495
      oprot.writeStructBegin(STRUCT_DESC);
4555 mandeep.dh 5496
      if (this.serialNumber != null) {
5497
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
5498
        oprot.writeString(this.serialNumber);
5499
        oprot.writeFieldEnd();
5500
      }
2820 chandransh 5501
      if (this.type != null) {
5502
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
5503
        oprot.writeI32(this.type.getValue());
5504
        oprot.writeFieldEnd();
5505
      }
4496 mandeep.dh 5506
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
5507
      oprot.writeI64(this.orderId);
5508
      oprot.writeFieldEnd();
5110 mandeep.dh 5509
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
5510
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 5511
      oprot.writeFieldEnd();
5110 mandeep.dh 5512
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
5513
      oprot.writeDouble(this.quantity);
5514
      oprot.writeFieldEnd();
5515
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
5516
      oprot.writeI64(this.billingWarehouseId);
5517
      oprot.writeFieldEnd();
2820 chandransh 5518
      oprot.writeFieldStop();
5519
      oprot.writeStructEnd();
5520
    }
5521
 
5522
    @Override
5523
    public String toString() {
4496 mandeep.dh 5524
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_args(");
2820 chandransh 5525
      boolean first = true;
5526
 
4555 mandeep.dh 5527
      sb.append("serialNumber:");
5528
      if (this.serialNumber == null) {
5529
        sb.append("null");
5530
      } else {
5531
        sb.append(this.serialNumber);
5532
      }
2820 chandransh 5533
      first = false;
5534
      if (!first) sb.append(", ");
4496 mandeep.dh 5535
      sb.append("type:");
5536
      if (this.type == null) {
2820 chandransh 5537
        sb.append("null");
5538
      } else {
4496 mandeep.dh 5539
        sb.append(this.type);
2820 chandransh 5540
      }
5541
      first = false;
5542
      if (!first) sb.append(", ");
4496 mandeep.dh 5543
      sb.append("orderId:");
5544
      sb.append(this.orderId);
2820 chandransh 5545
      first = false;
5546
      if (!first) sb.append(", ");
5110 mandeep.dh 5547
      sb.append("fulfilmentWarehouseId:");
5548
      sb.append(this.fulfilmentWarehouseId);
2820 chandransh 5549
      first = false;
5110 mandeep.dh 5550
      if (!first) sb.append(", ");
5551
      sb.append("quantity:");
5552
      sb.append(this.quantity);
5553
      first = false;
5554
      if (!first) sb.append(", ");
5555
      sb.append("billingWarehouseId:");
5556
      sb.append(this.billingWarehouseId);
5557
      first = false;
2820 chandransh 5558
      sb.append(")");
5559
      return sb.toString();
5560
    }
5561
 
3430 rajveer 5562
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 5563
      // check for required fields
5564
    }
5565
 
3430 rajveer 5566
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5567
      try {
5568
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5569
      } catch (org.apache.thrift.TException te) {
5570
        throw new java.io.IOException(te);
5571
      }
5572
    }
5573
 
5574
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5575
      try {
5576
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5577
      } catch (org.apache.thrift.TException te) {
5578
        throw new java.io.IOException(te);
5579
      }
5580
    }
5581
 
2820 chandransh 5582
  }
5583
 
4496 mandeep.dh 5584
  public static class scanSerializedItemForOrder_result implements org.apache.thrift.TBase<scanSerializedItemForOrder_result, scanSerializedItemForOrder_result._Fields>, java.io.Serializable, Cloneable   {
5585
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_result");
2820 chandransh 5586
 
4555 mandeep.dh 5587
    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);
3430 rajveer 5588
    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);
2820 chandransh 5589
 
4555 mandeep.dh 5590
    private InventoryItem success; // required
3430 rajveer 5591
    private WarehouseServiceException wex; // required
2820 chandransh 5592
 
5593
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 5594
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 5595
      SUCCESS((short)0, "success"),
2820 chandransh 5596
      WEX((short)1, "wex");
5597
 
5598
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5599
 
5600
      static {
5601
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5602
          byName.put(field.getFieldName(), field);
5603
        }
5604
      }
5605
 
5606
      /**
5607
       * Find the _Fields constant that matches fieldId, or null if its not found.
5608
       */
5609
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 5610
        switch(fieldId) {
4496 mandeep.dh 5611
          case 0: // SUCCESS
5612
            return SUCCESS;
3430 rajveer 5613
          case 1: // WEX
5614
            return WEX;
5615
          default:
5616
            return null;
5617
        }
2820 chandransh 5618
      }
5619
 
5620
      /**
5621
       * Find the _Fields constant that matches fieldId, throwing an exception
5622
       * if it is not found.
5623
       */
5624
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5625
        _Fields fields = findByThriftId(fieldId);
5626
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5627
        return fields;
5628
      }
5629
 
5630
      /**
5631
       * Find the _Fields constant that matches name, or null if its not found.
5632
       */
5633
      public static _Fields findByName(String name) {
5634
        return byName.get(name);
5635
      }
5636
 
5637
      private final short _thriftId;
5638
      private final String _fieldName;
5639
 
5640
      _Fields(short thriftId, String fieldName) {
5641
        _thriftId = thriftId;
5642
        _fieldName = fieldName;
5643
      }
5644
 
5645
      public short getThriftFieldId() {
5646
        return _thriftId;
5647
      }
5648
 
5649
      public String getFieldName() {
5650
        return _fieldName;
5651
      }
5652
    }
5653
 
5654
    // isset id assignments
5655
 
3430 rajveer 5656
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 5657
    static {
3430 rajveer 5658
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 5659
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 5660
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 5661
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5662
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5663
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 5664
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_result.class, metaDataMap);
2820 chandransh 5665
    }
5666
 
4496 mandeep.dh 5667
    public scanSerializedItemForOrder_result() {
2820 chandransh 5668
    }
5669
 
4496 mandeep.dh 5670
    public scanSerializedItemForOrder_result(
4555 mandeep.dh 5671
      InventoryItem success,
2820 chandransh 5672
      WarehouseServiceException wex)
5673
    {
5674
      this();
4496 mandeep.dh 5675
      this.success = success;
2820 chandransh 5676
      this.wex = wex;
5677
    }
5678
 
5679
    /**
5680
     * Performs a deep copy on <i>other</i>.
5681
     */
4496 mandeep.dh 5682
    public scanSerializedItemForOrder_result(scanSerializedItemForOrder_result other) {
4555 mandeep.dh 5683
      if (other.isSetSuccess()) {
5684
        this.success = new InventoryItem(other.success);
5685
      }
2820 chandransh 5686
      if (other.isSetWex()) {
5687
        this.wex = new WarehouseServiceException(other.wex);
5688
      }
5689
    }
5690
 
4496 mandeep.dh 5691
    public scanSerializedItemForOrder_result deepCopy() {
5692
      return new scanSerializedItemForOrder_result(this);
2820 chandransh 5693
    }
5694
 
3430 rajveer 5695
    @Override
5696
    public void clear() {
4555 mandeep.dh 5697
      this.success = null;
3430 rajveer 5698
      this.wex = null;
2820 chandransh 5699
    }
5700
 
4555 mandeep.dh 5701
    public InventoryItem getSuccess() {
4496 mandeep.dh 5702
      return this.success;
5703
    }
5704
 
4555 mandeep.dh 5705
    public void setSuccess(InventoryItem success) {
4496 mandeep.dh 5706
      this.success = success;
5707
    }
5708
 
5709
    public void unsetSuccess() {
4555 mandeep.dh 5710
      this.success = null;
4496 mandeep.dh 5711
    }
5712
 
5713
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5714
    public boolean isSetSuccess() {
4555 mandeep.dh 5715
      return this.success != null;
4496 mandeep.dh 5716
    }
5717
 
5718
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 5719
      if (!value) {
5720
        this.success = null;
5721
      }
4496 mandeep.dh 5722
    }
5723
 
2820 chandransh 5724
    public WarehouseServiceException getWex() {
5725
      return this.wex;
5726
    }
5727
 
3430 rajveer 5728
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 5729
      this.wex = wex;
5730
    }
5731
 
5732
    public void unsetWex() {
5733
      this.wex = null;
5734
    }
5735
 
3430 rajveer 5736
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 5737
    public boolean isSetWex() {
5738
      return this.wex != null;
5739
    }
5740
 
5741
    public void setWexIsSet(boolean value) {
5742
      if (!value) {
5743
        this.wex = null;
5744
      }
5745
    }
5746
 
5747
    public void setFieldValue(_Fields field, Object value) {
5748
      switch (field) {
4496 mandeep.dh 5749
      case SUCCESS:
5750
        if (value == null) {
5751
          unsetSuccess();
5752
        } else {
4555 mandeep.dh 5753
          setSuccess((InventoryItem)value);
4496 mandeep.dh 5754
        }
5755
        break;
5756
 
2820 chandransh 5757
      case WEX:
5758
        if (value == null) {
5759
          unsetWex();
5760
        } else {
5761
          setWex((WarehouseServiceException)value);
5762
        }
5763
        break;
5764
 
5765
      }
5766
    }
5767
 
5768
    public Object getFieldValue(_Fields field) {
5769
      switch (field) {
4496 mandeep.dh 5770
      case SUCCESS:
4555 mandeep.dh 5771
        return getSuccess();
4496 mandeep.dh 5772
 
2820 chandransh 5773
      case WEX:
5774
        return getWex();
5775
 
5776
      }
5777
      throw new IllegalStateException();
5778
    }
5779
 
3430 rajveer 5780
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5781
    public boolean isSet(_Fields field) {
5782
      if (field == null) {
5783
        throw new IllegalArgumentException();
5784
      }
2820 chandransh 5785
 
5786
      switch (field) {
4496 mandeep.dh 5787
      case SUCCESS:
5788
        return isSetSuccess();
2820 chandransh 5789
      case WEX:
5790
        return isSetWex();
5791
      }
5792
      throw new IllegalStateException();
5793
    }
5794
 
5795
    @Override
5796
    public boolean equals(Object that) {
5797
      if (that == null)
5798
        return false;
4496 mandeep.dh 5799
      if (that instanceof scanSerializedItemForOrder_result)
5800
        return this.equals((scanSerializedItemForOrder_result)that);
2820 chandransh 5801
      return false;
5802
    }
5803
 
4496 mandeep.dh 5804
    public boolean equals(scanSerializedItemForOrder_result that) {
2820 chandransh 5805
      if (that == null)
5806
        return false;
5807
 
4555 mandeep.dh 5808
      boolean this_present_success = true && this.isSetSuccess();
5809
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 5810
      if (this_present_success || that_present_success) {
5811
        if (!(this_present_success && that_present_success))
5812
          return false;
4555 mandeep.dh 5813
        if (!this.success.equals(that.success))
4496 mandeep.dh 5814
          return false;
5815
      }
5816
 
2820 chandransh 5817
      boolean this_present_wex = true && this.isSetWex();
5818
      boolean that_present_wex = true && that.isSetWex();
5819
      if (this_present_wex || that_present_wex) {
5820
        if (!(this_present_wex && that_present_wex))
5821
          return false;
5822
        if (!this.wex.equals(that.wex))
5823
          return false;
5824
      }
5825
 
5826
      return true;
5827
    }
5828
 
5829
    @Override
5830
    public int hashCode() {
5831
      return 0;
5832
    }
5833
 
4496 mandeep.dh 5834
    public int compareTo(scanSerializedItemForOrder_result other) {
2820 chandransh 5835
      if (!getClass().equals(other.getClass())) {
5836
        return getClass().getName().compareTo(other.getClass().getName());
5837
      }
5838
 
5839
      int lastComparison = 0;
4496 mandeep.dh 5840
      scanSerializedItemForOrder_result typedOther = (scanSerializedItemForOrder_result)other;
2820 chandransh 5841
 
4496 mandeep.dh 5842
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5843
      if (lastComparison != 0) {
5844
        return lastComparison;
5845
      }
5846
      if (isSetSuccess()) {
5847
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5848
        if (lastComparison != 0) {
5849
          return lastComparison;
5850
        }
5851
      }
3430 rajveer 5852
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 5853
      if (lastComparison != 0) {
5854
        return lastComparison;
5855
      }
3430 rajveer 5856
      if (isSetWex()) {
5857
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
5858
        if (lastComparison != 0) {
5859
          return lastComparison;
5860
        }
2820 chandransh 5861
      }
5862
      return 0;
5863
    }
5864
 
3430 rajveer 5865
    public _Fields fieldForId(int fieldId) {
5866
      return _Fields.findByThriftId(fieldId);
5867
    }
5868
 
5869
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5870
      org.apache.thrift.protocol.TField field;
2820 chandransh 5871
      iprot.readStructBegin();
5872
      while (true)
5873
      {
5874
        field = iprot.readFieldBegin();
3430 rajveer 5875
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 5876
          break;
5877
        }
3430 rajveer 5878
        switch (field.id) {
4496 mandeep.dh 5879
          case 0: // SUCCESS
4555 mandeep.dh 5880
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5881
              this.success = new InventoryItem();
5882
              this.success.read(iprot);
4496 mandeep.dh 5883
            } else { 
5884
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5885
            }
5886
            break;
3430 rajveer 5887
          case 1: // WEX
5888
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5889
              this.wex = new WarehouseServiceException();
5890
              this.wex.read(iprot);
5891
            } else { 
5892
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5893
            }
5894
            break;
5895
          default:
5896
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 5897
        }
3430 rajveer 5898
        iprot.readFieldEnd();
2820 chandransh 5899
      }
5900
      iprot.readStructEnd();
5901
      validate();
5902
    }
5903
 
3430 rajveer 5904
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 5905
      oprot.writeStructBegin(STRUCT_DESC);
5906
 
4496 mandeep.dh 5907
      if (this.isSetSuccess()) {
5908
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 5909
        this.success.write(oprot);
4496 mandeep.dh 5910
        oprot.writeFieldEnd();
5911
      } else if (this.isSetWex()) {
2820 chandransh 5912
        oprot.writeFieldBegin(WEX_FIELD_DESC);
5913
        this.wex.write(oprot);
5914
        oprot.writeFieldEnd();
5915
      }
5916
      oprot.writeFieldStop();
5917
      oprot.writeStructEnd();
5918
    }
5919
 
5920
    @Override
5921
    public String toString() {
4496 mandeep.dh 5922
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_result(");
2820 chandransh 5923
      boolean first = true;
5924
 
4496 mandeep.dh 5925
      sb.append("success:");
4555 mandeep.dh 5926
      if (this.success == null) {
5927
        sb.append("null");
5928
      } else {
5929
        sb.append(this.success);
5930
      }
4496 mandeep.dh 5931
      first = false;
5932
      if (!first) sb.append(", ");
2820 chandransh 5933
      sb.append("wex:");
5934
      if (this.wex == null) {
5935
        sb.append("null");
5936
      } else {
5937
        sb.append(this.wex);
5938
      }
5939
      first = false;
5940
      sb.append(")");
5941
      return sb.toString();
5942
    }
5943
 
3430 rajveer 5944
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 5945
      // check for required fields
5946
    }
5947
 
3430 rajveer 5948
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5949
      try {
5950
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5951
      } catch (org.apache.thrift.TException te) {
5952
        throw new java.io.IOException(te);
5953
      }
5954
    }
5955
 
5956
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5957
      try {
5958
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5959
      } catch (org.apache.thrift.TException te) {
5960
        throw new java.io.IOException(te);
5961
      }
5962
    }
5963
 
2820 chandransh 5964
  }
5965
 
4496 mandeep.dh 5966
  public static class scanForOrder_args implements org.apache.thrift.TBase<scanForOrder_args, scanForOrder_args._Fields>, java.io.Serializable, Cloneable   {
5967
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_args");
2820 chandransh 5968
 
5361 mandeep.dh 5969
    private static final org.apache.thrift.protocol.TField INVENTORY_ITEM_FIELD_DESC = new org.apache.thrift.protocol.TField("inventoryItem", org.apache.thrift.protocol.TType.STRUCT, (short)1);
4496 mandeep.dh 5970
    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);
5971
    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);
5972
    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);
5110 mandeep.dh 5973
    private static final org.apache.thrift.protocol.TField FULFILMENT_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fulfilmentWarehouseId", org.apache.thrift.protocol.TType.I64, (short)5);
5361 mandeep.dh 5974
    private static final org.apache.thrift.protocol.TField BILLING_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("billingWarehouseId", org.apache.thrift.protocol.TType.I64, (short)6);
2820 chandransh 5975
 
5361 mandeep.dh 5976
    private InventoryItem inventoryItem; // required
3430 rajveer 5977
    private ScanType type; // required
4496 mandeep.dh 5978
    private long quantity; // required
5979
    private long orderId; // required
5110 mandeep.dh 5980
    private long fulfilmentWarehouseId; // required
5361 mandeep.dh 5981
    private long billingWarehouseId; // required
2820 chandransh 5982
 
5983
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 5984
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 5985
      INVENTORY_ITEM((short)1, "inventoryItem"),
2820 chandransh 5986
      /**
5987
       * 
5988
       * @see ScanType
5989
       */
4496 mandeep.dh 5990
      TYPE((short)2, "type"),
5991
      QUANTITY((short)3, "quantity"),
5992
      ORDER_ID((short)4, "orderId"),
5361 mandeep.dh 5993
      FULFILMENT_WAREHOUSE_ID((short)5, "fulfilmentWarehouseId"),
5994
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 5995
 
5996
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5997
 
5998
      static {
5999
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6000
          byName.put(field.getFieldName(), field);
6001
        }
6002
      }
6003
 
6004
      /**
6005
       * Find the _Fields constant that matches fieldId, or null if its not found.
6006
       */
6007
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6008
        switch(fieldId) {
5361 mandeep.dh 6009
          case 1: // INVENTORY_ITEM
6010
            return INVENTORY_ITEM;
4496 mandeep.dh 6011
          case 2: // TYPE
3430 rajveer 6012
            return TYPE;
4496 mandeep.dh 6013
          case 3: // QUANTITY
6014
            return QUANTITY;
6015
          case 4: // ORDER_ID
6016
            return ORDER_ID;
5110 mandeep.dh 6017
          case 5: // FULFILMENT_WAREHOUSE_ID
6018
            return FULFILMENT_WAREHOUSE_ID;
5361 mandeep.dh 6019
          case 6: // BILLING_WAREHOUSE_ID
6020
            return BILLING_WAREHOUSE_ID;
3430 rajveer 6021
          default:
6022
            return null;
6023
        }
2820 chandransh 6024
      }
6025
 
6026
      /**
6027
       * Find the _Fields constant that matches fieldId, throwing an exception
6028
       * if it is not found.
6029
       */
6030
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6031
        _Fields fields = findByThriftId(fieldId);
6032
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6033
        return fields;
6034
      }
6035
 
6036
      /**
6037
       * Find the _Fields constant that matches name, or null if its not found.
6038
       */
6039
      public static _Fields findByName(String name) {
6040
        return byName.get(name);
6041
      }
6042
 
6043
      private final short _thriftId;
6044
      private final String _fieldName;
6045
 
6046
      _Fields(short thriftId, String fieldName) {
6047
        _thriftId = thriftId;
6048
        _fieldName = fieldName;
6049
      }
6050
 
6051
      public short getThriftFieldId() {
6052
        return _thriftId;
6053
      }
6054
 
6055
      public String getFieldName() {
6056
        return _fieldName;
6057
      }
6058
    }
6059
 
6060
    // isset id assignments
5361 mandeep.dh 6061
    private static final int __QUANTITY_ISSET_ID = 0;
6062
    private static final int __ORDERID_ISSET_ID = 1;
6063
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 2;
6064
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
4496 mandeep.dh 6065
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 6066
 
3430 rajveer 6067
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 6068
    static {
3430 rajveer 6069
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 6070
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6071
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 6072
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6073
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 6074
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6075
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6076
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6077
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 6078
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 6079
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 6080
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6081
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 6082
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 6083
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_args.class, metaDataMap);
2820 chandransh 6084
    }
6085
 
4496 mandeep.dh 6086
    public scanForOrder_args() {
2820 chandransh 6087
    }
6088
 
4496 mandeep.dh 6089
    public scanForOrder_args(
5361 mandeep.dh 6090
      InventoryItem inventoryItem,
4496 mandeep.dh 6091
      ScanType type,
6092
      long quantity,
6093
      long orderId,
5361 mandeep.dh 6094
      long fulfilmentWarehouseId,
6095
      long billingWarehouseId)
2820 chandransh 6096
    {
6097
      this();
5361 mandeep.dh 6098
      this.inventoryItem = inventoryItem;
2820 chandransh 6099
      this.type = type;
4496 mandeep.dh 6100
      this.quantity = quantity;
6101
      setQuantityIsSet(true);
6102
      this.orderId = orderId;
6103
      setOrderIdIsSet(true);
5110 mandeep.dh 6104
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
6105
      setFulfilmentWarehouseIdIsSet(true);
5361 mandeep.dh 6106
      this.billingWarehouseId = billingWarehouseId;
6107
      setBillingWarehouseIdIsSet(true);
2820 chandransh 6108
    }
6109
 
6110
    /**
6111
     * Performs a deep copy on <i>other</i>.
6112
     */
4496 mandeep.dh 6113
    public scanForOrder_args(scanForOrder_args other) {
6114
      __isset_bit_vector.clear();
6115
      __isset_bit_vector.or(other.__isset_bit_vector);
5361 mandeep.dh 6116
      if (other.isSetInventoryItem()) {
6117
        this.inventoryItem = new InventoryItem(other.inventoryItem);
6118
      }
2820 chandransh 6119
      if (other.isSetType()) {
6120
        this.type = other.type;
6121
      }
4496 mandeep.dh 6122
      this.quantity = other.quantity;
6123
      this.orderId = other.orderId;
5110 mandeep.dh 6124
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
5361 mandeep.dh 6125
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 6126
    }
6127
 
4496 mandeep.dh 6128
    public scanForOrder_args deepCopy() {
6129
      return new scanForOrder_args(this);
2820 chandransh 6130
    }
6131
 
3430 rajveer 6132
    @Override
6133
    public void clear() {
5361 mandeep.dh 6134
      this.inventoryItem = null;
3430 rajveer 6135
      this.type = null;
4496 mandeep.dh 6136
      setQuantityIsSet(false);
6137
      this.quantity = 0;
6138
      setOrderIdIsSet(false);
6139
      this.orderId = 0;
5110 mandeep.dh 6140
      setFulfilmentWarehouseIdIsSet(false);
6141
      this.fulfilmentWarehouseId = 0;
5361 mandeep.dh 6142
      setBillingWarehouseIdIsSet(false);
6143
      this.billingWarehouseId = 0;
2820 chandransh 6144
    }
6145
 
5361 mandeep.dh 6146
    public InventoryItem getInventoryItem() {
6147
      return this.inventoryItem;
2820 chandransh 6148
    }
6149
 
5361 mandeep.dh 6150
    public void setInventoryItem(InventoryItem inventoryItem) {
6151
      this.inventoryItem = inventoryItem;
2820 chandransh 6152
    }
6153
 
5361 mandeep.dh 6154
    public void unsetInventoryItem() {
6155
      this.inventoryItem = null;
2820 chandransh 6156
    }
6157
 
5361 mandeep.dh 6158
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
6159
    public boolean isSetInventoryItem() {
6160
      return this.inventoryItem != null;
2820 chandransh 6161
    }
6162
 
5361 mandeep.dh 6163
    public void setInventoryItemIsSet(boolean value) {
6164
      if (!value) {
6165
        this.inventoryItem = null;
6166
      }
2820 chandransh 6167
    }
6168
 
6169
    /**
6170
     * 
6171
     * @see ScanType
6172
     */
6173
    public ScanType getType() {
6174
      return this.type;
6175
    }
6176
 
6177
    /**
6178
     * 
6179
     * @see ScanType
6180
     */
3430 rajveer 6181
    public void setType(ScanType type) {
2820 chandransh 6182
      this.type = type;
6183
    }
6184
 
6185
    public void unsetType() {
6186
      this.type = null;
6187
    }
6188
 
3430 rajveer 6189
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
2820 chandransh 6190
    public boolean isSetType() {
6191
      return this.type != null;
6192
    }
6193
 
6194
    public void setTypeIsSet(boolean value) {
6195
      if (!value) {
6196
        this.type = null;
6197
      }
6198
    }
6199
 
4496 mandeep.dh 6200
    public long getQuantity() {
6201
      return this.quantity;
6202
    }
6203
 
6204
    public void setQuantity(long quantity) {
6205
      this.quantity = quantity;
6206
      setQuantityIsSet(true);
6207
    }
6208
 
6209
    public void unsetQuantity() {
6210
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
6211
    }
6212
 
6213
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
6214
    public boolean isSetQuantity() {
6215
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
6216
    }
6217
 
6218
    public void setQuantityIsSet(boolean value) {
6219
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
6220
    }
6221
 
6222
    public long getOrderId() {
6223
      return this.orderId;
6224
    }
6225
 
6226
    public void setOrderId(long orderId) {
6227
      this.orderId = orderId;
6228
      setOrderIdIsSet(true);
6229
    }
6230
 
6231
    public void unsetOrderId() {
6232
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
6233
    }
6234
 
6235
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
6236
    public boolean isSetOrderId() {
6237
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
6238
    }
6239
 
6240
    public void setOrderIdIsSet(boolean value) {
6241
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
6242
    }
6243
 
5110 mandeep.dh 6244
    public long getFulfilmentWarehouseId() {
6245
      return this.fulfilmentWarehouseId;
4496 mandeep.dh 6246
    }
6247
 
5110 mandeep.dh 6248
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
6249
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
6250
      setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 6251
    }
6252
 
5110 mandeep.dh 6253
    public void unsetFulfilmentWarehouseId() {
6254
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 6255
    }
6256
 
5110 mandeep.dh 6257
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
6258
    public boolean isSetFulfilmentWarehouseId() {
6259
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 6260
    }
6261
 
5110 mandeep.dh 6262
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
6263
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 6264
    }
6265
 
5361 mandeep.dh 6266
    public long getBillingWarehouseId() {
6267
      return this.billingWarehouseId;
6268
    }
6269
 
6270
    public void setBillingWarehouseId(long billingWarehouseId) {
6271
      this.billingWarehouseId = billingWarehouseId;
6272
      setBillingWarehouseIdIsSet(true);
6273
    }
6274
 
6275
    public void unsetBillingWarehouseId() {
6276
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
6277
    }
6278
 
6279
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
6280
    public boolean isSetBillingWarehouseId() {
6281
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
6282
    }
6283
 
6284
    public void setBillingWarehouseIdIsSet(boolean value) {
6285
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
6286
    }
6287
 
2820 chandransh 6288
    public void setFieldValue(_Fields field, Object value) {
6289
      switch (field) {
5361 mandeep.dh 6290
      case INVENTORY_ITEM:
2820 chandransh 6291
        if (value == null) {
5361 mandeep.dh 6292
          unsetInventoryItem();
2820 chandransh 6293
        } else {
5361 mandeep.dh 6294
          setInventoryItem((InventoryItem)value);
2820 chandransh 6295
        }
6296
        break;
6297
 
4496 mandeep.dh 6298
      case TYPE:
2820 chandransh 6299
        if (value == null) {
4496 mandeep.dh 6300
          unsetType();
2820 chandransh 6301
        } else {
4496 mandeep.dh 6302
          setType((ScanType)value);
2820 chandransh 6303
        }
6304
        break;
6305
 
4496 mandeep.dh 6306
      case QUANTITY:
2820 chandransh 6307
        if (value == null) {
4496 mandeep.dh 6308
          unsetQuantity();
2820 chandransh 6309
        } else {
4496 mandeep.dh 6310
          setQuantity((Long)value);
2820 chandransh 6311
        }
6312
        break;
6313
 
4496 mandeep.dh 6314
      case ORDER_ID:
6315
        if (value == null) {
6316
          unsetOrderId();
6317
        } else {
6318
          setOrderId((Long)value);
6319
        }
6320
        break;
6321
 
5110 mandeep.dh 6322
      case FULFILMENT_WAREHOUSE_ID:
4496 mandeep.dh 6323
        if (value == null) {
5110 mandeep.dh 6324
          unsetFulfilmentWarehouseId();
4496 mandeep.dh 6325
        } else {
5110 mandeep.dh 6326
          setFulfilmentWarehouseId((Long)value);
4496 mandeep.dh 6327
        }
6328
        break;
6329
 
5361 mandeep.dh 6330
      case BILLING_WAREHOUSE_ID:
6331
        if (value == null) {
6332
          unsetBillingWarehouseId();
6333
        } else {
6334
          setBillingWarehouseId((Long)value);
6335
        }
6336
        break;
6337
 
2820 chandransh 6338
      }
6339
    }
6340
 
6341
    public Object getFieldValue(_Fields field) {
6342
      switch (field) {
5361 mandeep.dh 6343
      case INVENTORY_ITEM:
6344
        return getInventoryItem();
2820 chandransh 6345
 
6346
      case TYPE:
6347
        return getType();
6348
 
4496 mandeep.dh 6349
      case QUANTITY:
6350
        return Long.valueOf(getQuantity());
6351
 
6352
      case ORDER_ID:
6353
        return Long.valueOf(getOrderId());
6354
 
5110 mandeep.dh 6355
      case FULFILMENT_WAREHOUSE_ID:
6356
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 6357
 
5361 mandeep.dh 6358
      case BILLING_WAREHOUSE_ID:
6359
        return Long.valueOf(getBillingWarehouseId());
6360
 
2820 chandransh 6361
      }
6362
      throw new IllegalStateException();
6363
    }
6364
 
3430 rajveer 6365
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6366
    public boolean isSet(_Fields field) {
6367
      if (field == null) {
6368
        throw new IllegalArgumentException();
6369
      }
2820 chandransh 6370
 
6371
      switch (field) {
5361 mandeep.dh 6372
      case INVENTORY_ITEM:
6373
        return isSetInventoryItem();
2820 chandransh 6374
      case TYPE:
6375
        return isSetType();
4496 mandeep.dh 6376
      case QUANTITY:
6377
        return isSetQuantity();
6378
      case ORDER_ID:
6379
        return isSetOrderId();
5110 mandeep.dh 6380
      case FULFILMENT_WAREHOUSE_ID:
6381
        return isSetFulfilmentWarehouseId();
5361 mandeep.dh 6382
      case BILLING_WAREHOUSE_ID:
6383
        return isSetBillingWarehouseId();
2820 chandransh 6384
      }
6385
      throw new IllegalStateException();
6386
    }
6387
 
6388
    @Override
6389
    public boolean equals(Object that) {
6390
      if (that == null)
6391
        return false;
4496 mandeep.dh 6392
      if (that instanceof scanForOrder_args)
6393
        return this.equals((scanForOrder_args)that);
2820 chandransh 6394
      return false;
6395
    }
6396
 
4496 mandeep.dh 6397
    public boolean equals(scanForOrder_args that) {
2820 chandransh 6398
      if (that == null)
6399
        return false;
6400
 
5361 mandeep.dh 6401
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
6402
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
6403
      if (this_present_inventoryItem || that_present_inventoryItem) {
6404
        if (!(this_present_inventoryItem && that_present_inventoryItem))
2820 chandransh 6405
          return false;
5361 mandeep.dh 6406
        if (!this.inventoryItem.equals(that.inventoryItem))
2820 chandransh 6407
          return false;
6408
      }
6409
 
6410
      boolean this_present_type = true && this.isSetType();
6411
      boolean that_present_type = true && that.isSetType();
6412
      if (this_present_type || that_present_type) {
6413
        if (!(this_present_type && that_present_type))
6414
          return false;
6415
        if (!this.type.equals(that.type))
6416
          return false;
6417
      }
6418
 
4496 mandeep.dh 6419
      boolean this_present_quantity = true;
6420
      boolean that_present_quantity = true;
6421
      if (this_present_quantity || that_present_quantity) {
6422
        if (!(this_present_quantity && that_present_quantity))
6423
          return false;
6424
        if (this.quantity != that.quantity)
6425
          return false;
6426
      }
6427
 
6428
      boolean this_present_orderId = true;
6429
      boolean that_present_orderId = true;
6430
      if (this_present_orderId || that_present_orderId) {
6431
        if (!(this_present_orderId && that_present_orderId))
6432
          return false;
6433
        if (this.orderId != that.orderId)
6434
          return false;
6435
      }
6436
 
5110 mandeep.dh 6437
      boolean this_present_fulfilmentWarehouseId = true;
6438
      boolean that_present_fulfilmentWarehouseId = true;
6439
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
6440
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
4496 mandeep.dh 6441
          return false;
5110 mandeep.dh 6442
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
4496 mandeep.dh 6443
          return false;
6444
      }
6445
 
5361 mandeep.dh 6446
      boolean this_present_billingWarehouseId = true;
6447
      boolean that_present_billingWarehouseId = true;
6448
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
6449
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
6450
          return false;
6451
        if (this.billingWarehouseId != that.billingWarehouseId)
6452
          return false;
6453
      }
6454
 
2820 chandransh 6455
      return true;
6456
    }
6457
 
6458
    @Override
6459
    public int hashCode() {
6460
      return 0;
6461
    }
6462
 
4496 mandeep.dh 6463
    public int compareTo(scanForOrder_args other) {
2820 chandransh 6464
      if (!getClass().equals(other.getClass())) {
6465
        return getClass().getName().compareTo(other.getClass().getName());
6466
      }
6467
 
6468
      int lastComparison = 0;
4496 mandeep.dh 6469
      scanForOrder_args typedOther = (scanForOrder_args)other;
2820 chandransh 6470
 
5361 mandeep.dh 6471
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
2820 chandransh 6472
      if (lastComparison != 0) {
6473
        return lastComparison;
6474
      }
5361 mandeep.dh 6475
      if (isSetInventoryItem()) {
6476
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
3430 rajveer 6477
        if (lastComparison != 0) {
6478
          return lastComparison;
6479
        }
2820 chandransh 6480
      }
4496 mandeep.dh 6481
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 6482
      if (lastComparison != 0) {
6483
        return lastComparison;
6484
      }
4496 mandeep.dh 6485
      if (isSetType()) {
6486
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 6487
        if (lastComparison != 0) {
6488
          return lastComparison;
6489
        }
2820 chandransh 6490
      }
4496 mandeep.dh 6491
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
2820 chandransh 6492
      if (lastComparison != 0) {
6493
        return lastComparison;
6494
      }
4496 mandeep.dh 6495
      if (isSetQuantity()) {
6496
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
3430 rajveer 6497
        if (lastComparison != 0) {
6498
          return lastComparison;
6499
        }
2820 chandransh 6500
      }
4496 mandeep.dh 6501
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
6502
      if (lastComparison != 0) {
6503
        return lastComparison;
6504
      }
6505
      if (isSetOrderId()) {
6506
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
6507
        if (lastComparison != 0) {
6508
          return lastComparison;
6509
        }
6510
      }
5110 mandeep.dh 6511
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
4496 mandeep.dh 6512
      if (lastComparison != 0) {
6513
        return lastComparison;
6514
      }
5110 mandeep.dh 6515
      if (isSetFulfilmentWarehouseId()) {
6516
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
4496 mandeep.dh 6517
        if (lastComparison != 0) {
6518
          return lastComparison;
6519
        }
6520
      }
5361 mandeep.dh 6521
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
6522
      if (lastComparison != 0) {
6523
        return lastComparison;
6524
      }
6525
      if (isSetBillingWarehouseId()) {
6526
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
6527
        if (lastComparison != 0) {
6528
          return lastComparison;
6529
        }
6530
      }
2820 chandransh 6531
      return 0;
6532
    }
6533
 
3430 rajveer 6534
    public _Fields fieldForId(int fieldId) {
6535
      return _Fields.findByThriftId(fieldId);
6536
    }
6537
 
6538
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6539
      org.apache.thrift.protocol.TField field;
2820 chandransh 6540
      iprot.readStructBegin();
6541
      while (true)
6542
      {
6543
        field = iprot.readFieldBegin();
3430 rajveer 6544
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 6545
          break;
6546
        }
3430 rajveer 6547
        switch (field.id) {
5361 mandeep.dh 6548
          case 1: // INVENTORY_ITEM
6549
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6550
              this.inventoryItem = new InventoryItem();
6551
              this.inventoryItem.read(iprot);
3430 rajveer 6552
            } else { 
6553
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6554
            }
6555
            break;
4496 mandeep.dh 6556
          case 2: // TYPE
6557
            if (field.type == org.apache.thrift.protocol.TType.I32) {
6558
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 6559
            } else { 
6560
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6561
            }
6562
            break;
4496 mandeep.dh 6563
          case 3: // QUANTITY
6564
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6565
              this.quantity = iprot.readI64();
6566
              setQuantityIsSet(true);
3430 rajveer 6567
            } else { 
6568
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6569
            }
6570
            break;
4496 mandeep.dh 6571
          case 4: // ORDER_ID
6572
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6573
              this.orderId = iprot.readI64();
6574
              setOrderIdIsSet(true);
6575
            } else { 
6576
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6577
            }
6578
            break;
5110 mandeep.dh 6579
          case 5: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 6580
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 6581
              this.fulfilmentWarehouseId = iprot.readI64();
6582
              setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 6583
            } else { 
6584
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6585
            }
6586
            break;
5361 mandeep.dh 6587
          case 6: // BILLING_WAREHOUSE_ID
6588
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6589
              this.billingWarehouseId = iprot.readI64();
6590
              setBillingWarehouseIdIsSet(true);
6591
            } else { 
6592
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6593
            }
6594
            break;
3430 rajveer 6595
          default:
6596
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 6597
        }
3430 rajveer 6598
        iprot.readFieldEnd();
2820 chandransh 6599
      }
6600
      iprot.readStructEnd();
6601
      validate();
6602
    }
6603
 
3430 rajveer 6604
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 6605
      validate();
6606
 
6607
      oprot.writeStructBegin(STRUCT_DESC);
5361 mandeep.dh 6608
      if (this.inventoryItem != null) {
6609
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
6610
        this.inventoryItem.write(oprot);
6611
        oprot.writeFieldEnd();
6612
      }
2820 chandransh 6613
      if (this.type != null) {
6614
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
6615
        oprot.writeI32(this.type.getValue());
6616
        oprot.writeFieldEnd();
6617
      }
4496 mandeep.dh 6618
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
6619
      oprot.writeI64(this.quantity);
6620
      oprot.writeFieldEnd();
6621
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
6622
      oprot.writeI64(this.orderId);
6623
      oprot.writeFieldEnd();
5110 mandeep.dh 6624
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
6625
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 6626
      oprot.writeFieldEnd();
5361 mandeep.dh 6627
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
6628
      oprot.writeI64(this.billingWarehouseId);
6629
      oprot.writeFieldEnd();
2820 chandransh 6630
      oprot.writeFieldStop();
6631
      oprot.writeStructEnd();
6632
    }
6633
 
6634
    @Override
6635
    public String toString() {
4496 mandeep.dh 6636
      StringBuilder sb = new StringBuilder("scanForOrder_args(");
2820 chandransh 6637
      boolean first = true;
6638
 
5361 mandeep.dh 6639
      sb.append("inventoryItem:");
6640
      if (this.inventoryItem == null) {
6641
        sb.append("null");
6642
      } else {
6643
        sb.append(this.inventoryItem);
6644
      }
2820 chandransh 6645
      first = false;
6646
      if (!first) sb.append(", ");
6647
      sb.append("type:");
6648
      if (this.type == null) {
6649
        sb.append("null");
6650
      } else {
6651
        sb.append(this.type);
6652
      }
6653
      first = false;
4496 mandeep.dh 6654
      if (!first) sb.append(", ");
6655
      sb.append("quantity:");
6656
      sb.append(this.quantity);
6657
      first = false;
6658
      if (!first) sb.append(", ");
6659
      sb.append("orderId:");
6660
      sb.append(this.orderId);
6661
      first = false;
6662
      if (!first) sb.append(", ");
5110 mandeep.dh 6663
      sb.append("fulfilmentWarehouseId:");
6664
      sb.append(this.fulfilmentWarehouseId);
4496 mandeep.dh 6665
      first = false;
5361 mandeep.dh 6666
      if (!first) sb.append(", ");
6667
      sb.append("billingWarehouseId:");
6668
      sb.append(this.billingWarehouseId);
6669
      first = false;
2820 chandransh 6670
      sb.append(")");
6671
      return sb.toString();
6672
    }
6673
 
3430 rajveer 6674
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 6675
      // check for required fields
6676
    }
6677
 
3430 rajveer 6678
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6679
      try {
6680
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6681
      } catch (org.apache.thrift.TException te) {
6682
        throw new java.io.IOException(te);
6683
      }
6684
    }
6685
 
6686
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6687
      try {
4496 mandeep.dh 6688
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6689
        __isset_bit_vector = new BitSet(1);
3430 rajveer 6690
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6691
      } catch (org.apache.thrift.TException te) {
6692
        throw new java.io.IOException(te);
6693
      }
6694
    }
6695
 
2820 chandransh 6696
  }
6697
 
4496 mandeep.dh 6698
  public static class scanForOrder_result implements org.apache.thrift.TBase<scanForOrder_result, scanForOrder_result._Fields>, java.io.Serializable, Cloneable   {
6699
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_result");
2820 chandransh 6700
 
5361 mandeep.dh 6701
    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);
3430 rajveer 6702
    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);
2820 chandransh 6703
 
5361 mandeep.dh 6704
    private InventoryItem success; // required
3430 rajveer 6705
    private WarehouseServiceException wex; // required
2820 chandransh 6706
 
6707
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6708
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 6709
      SUCCESS((short)0, "success"),
2820 chandransh 6710
      WEX((short)1, "wex");
6711
 
6712
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6713
 
6714
      static {
6715
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6716
          byName.put(field.getFieldName(), field);
6717
        }
6718
      }
6719
 
6720
      /**
6721
       * Find the _Fields constant that matches fieldId, or null if its not found.
6722
       */
6723
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6724
        switch(fieldId) {
5361 mandeep.dh 6725
          case 0: // SUCCESS
6726
            return SUCCESS;
3430 rajveer 6727
          case 1: // WEX
6728
            return WEX;
6729
          default:
6730
            return null;
6731
        }
2820 chandransh 6732
      }
6733
 
6734
      /**
6735
       * Find the _Fields constant that matches fieldId, throwing an exception
6736
       * if it is not found.
6737
       */
6738
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6739
        _Fields fields = findByThriftId(fieldId);
6740
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6741
        return fields;
6742
      }
6743
 
6744
      /**
6745
       * Find the _Fields constant that matches name, or null if its not found.
6746
       */
6747
      public static _Fields findByName(String name) {
6748
        return byName.get(name);
6749
      }
6750
 
6751
      private final short _thriftId;
6752
      private final String _fieldName;
6753
 
6754
      _Fields(short thriftId, String fieldName) {
6755
        _thriftId = thriftId;
6756
        _fieldName = fieldName;
6757
      }
6758
 
6759
      public short getThriftFieldId() {
6760
        return _thriftId;
6761
      }
6762
 
6763
      public String getFieldName() {
6764
        return _fieldName;
6765
      }
6766
    }
6767
 
6768
    // isset id assignments
6769
 
3430 rajveer 6770
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 6771
    static {
3430 rajveer 6772
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 6773
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6774
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 6775
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6776
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6777
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 6778
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_result.class, metaDataMap);
2820 chandransh 6779
    }
6780
 
4496 mandeep.dh 6781
    public scanForOrder_result() {
2820 chandransh 6782
    }
6783
 
4496 mandeep.dh 6784
    public scanForOrder_result(
5361 mandeep.dh 6785
      InventoryItem success,
2820 chandransh 6786
      WarehouseServiceException wex)
6787
    {
6788
      this();
5361 mandeep.dh 6789
      this.success = success;
2820 chandransh 6790
      this.wex = wex;
6791
    }
6792
 
6793
    /**
6794
     * Performs a deep copy on <i>other</i>.
6795
     */
4496 mandeep.dh 6796
    public scanForOrder_result(scanForOrder_result other) {
5361 mandeep.dh 6797
      if (other.isSetSuccess()) {
6798
        this.success = new InventoryItem(other.success);
6799
      }
2820 chandransh 6800
      if (other.isSetWex()) {
6801
        this.wex = new WarehouseServiceException(other.wex);
6802
      }
6803
    }
6804
 
4496 mandeep.dh 6805
    public scanForOrder_result deepCopy() {
6806
      return new scanForOrder_result(this);
2820 chandransh 6807
    }
6808
 
3430 rajveer 6809
    @Override
6810
    public void clear() {
5361 mandeep.dh 6811
      this.success = null;
3430 rajveer 6812
      this.wex = null;
2820 chandransh 6813
    }
6814
 
5361 mandeep.dh 6815
    public InventoryItem getSuccess() {
6816
      return this.success;
6817
    }
6818
 
6819
    public void setSuccess(InventoryItem success) {
6820
      this.success = success;
6821
    }
6822
 
6823
    public void unsetSuccess() {
6824
      this.success = null;
6825
    }
6826
 
6827
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6828
    public boolean isSetSuccess() {
6829
      return this.success != null;
6830
    }
6831
 
6832
    public void setSuccessIsSet(boolean value) {
6833
      if (!value) {
6834
        this.success = null;
6835
      }
6836
    }
6837
 
2820 chandransh 6838
    public WarehouseServiceException getWex() {
6839
      return this.wex;
6840
    }
6841
 
3430 rajveer 6842
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 6843
      this.wex = wex;
6844
    }
6845
 
6846
    public void unsetWex() {
6847
      this.wex = null;
6848
    }
6849
 
3430 rajveer 6850
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 6851
    public boolean isSetWex() {
6852
      return this.wex != null;
6853
    }
6854
 
6855
    public void setWexIsSet(boolean value) {
6856
      if (!value) {
6857
        this.wex = null;
6858
      }
6859
    }
6860
 
6861
    public void setFieldValue(_Fields field, Object value) {
6862
      switch (field) {
5361 mandeep.dh 6863
      case SUCCESS:
6864
        if (value == null) {
6865
          unsetSuccess();
6866
        } else {
6867
          setSuccess((InventoryItem)value);
6868
        }
6869
        break;
6870
 
2820 chandransh 6871
      case WEX:
6872
        if (value == null) {
6873
          unsetWex();
6874
        } else {
6875
          setWex((WarehouseServiceException)value);
6876
        }
6877
        break;
6878
 
6879
      }
6880
    }
6881
 
6882
    public Object getFieldValue(_Fields field) {
6883
      switch (field) {
5361 mandeep.dh 6884
      case SUCCESS:
6885
        return getSuccess();
6886
 
2820 chandransh 6887
      case WEX:
6888
        return getWex();
6889
 
6890
      }
6891
      throw new IllegalStateException();
6892
    }
6893
 
3430 rajveer 6894
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6895
    public boolean isSet(_Fields field) {
6896
      if (field == null) {
6897
        throw new IllegalArgumentException();
6898
      }
2820 chandransh 6899
 
6900
      switch (field) {
5361 mandeep.dh 6901
      case SUCCESS:
6902
        return isSetSuccess();
2820 chandransh 6903
      case WEX:
6904
        return isSetWex();
6905
      }
6906
      throw new IllegalStateException();
6907
    }
6908
 
6909
    @Override
6910
    public boolean equals(Object that) {
6911
      if (that == null)
6912
        return false;
4496 mandeep.dh 6913
      if (that instanceof scanForOrder_result)
6914
        return this.equals((scanForOrder_result)that);
2820 chandransh 6915
      return false;
6916
    }
6917
 
4496 mandeep.dh 6918
    public boolean equals(scanForOrder_result that) {
2820 chandransh 6919
      if (that == null)
6920
        return false;
6921
 
5361 mandeep.dh 6922
      boolean this_present_success = true && this.isSetSuccess();
6923
      boolean that_present_success = true && that.isSetSuccess();
6924
      if (this_present_success || that_present_success) {
6925
        if (!(this_present_success && that_present_success))
6926
          return false;
6927
        if (!this.success.equals(that.success))
6928
          return false;
6929
      }
6930
 
2820 chandransh 6931
      boolean this_present_wex = true && this.isSetWex();
6932
      boolean that_present_wex = true && that.isSetWex();
6933
      if (this_present_wex || that_present_wex) {
6934
        if (!(this_present_wex && that_present_wex))
6935
          return false;
6936
        if (!this.wex.equals(that.wex))
6937
          return false;
6938
      }
6939
 
6940
      return true;
6941
    }
6942
 
6943
    @Override
6944
    public int hashCode() {
6945
      return 0;
6946
    }
6947
 
4496 mandeep.dh 6948
    public int compareTo(scanForOrder_result other) {
2820 chandransh 6949
      if (!getClass().equals(other.getClass())) {
6950
        return getClass().getName().compareTo(other.getClass().getName());
6951
      }
6952
 
6953
      int lastComparison = 0;
4496 mandeep.dh 6954
      scanForOrder_result typedOther = (scanForOrder_result)other;
2820 chandransh 6955
 
5361 mandeep.dh 6956
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6957
      if (lastComparison != 0) {
6958
        return lastComparison;
6959
      }
6960
      if (isSetSuccess()) {
6961
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6962
        if (lastComparison != 0) {
6963
          return lastComparison;
6964
        }
6965
      }
3430 rajveer 6966
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 6967
      if (lastComparison != 0) {
6968
        return lastComparison;
6969
      }
3430 rajveer 6970
      if (isSetWex()) {
6971
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
6972
        if (lastComparison != 0) {
6973
          return lastComparison;
6974
        }
2820 chandransh 6975
      }
6976
      return 0;
6977
    }
6978
 
3430 rajveer 6979
    public _Fields fieldForId(int fieldId) {
6980
      return _Fields.findByThriftId(fieldId);
6981
    }
6982
 
6983
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6984
      org.apache.thrift.protocol.TField field;
2820 chandransh 6985
      iprot.readStructBegin();
6986
      while (true)
6987
      {
6988
        field = iprot.readFieldBegin();
3430 rajveer 6989
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 6990
          break;
6991
        }
3430 rajveer 6992
        switch (field.id) {
5361 mandeep.dh 6993
          case 0: // SUCCESS
6994
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6995
              this.success = new InventoryItem();
6996
              this.success.read(iprot);
6997
            } else { 
6998
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6999
            }
7000
            break;
3430 rajveer 7001
          case 1: // WEX
7002
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7003
              this.wex = new WarehouseServiceException();
7004
              this.wex.read(iprot);
7005
            } else { 
7006
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7007
            }
7008
            break;
7009
          default:
7010
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 7011
        }
3430 rajveer 7012
        iprot.readFieldEnd();
2820 chandransh 7013
      }
7014
      iprot.readStructEnd();
7015
      validate();
7016
    }
7017
 
3430 rajveer 7018
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 7019
      oprot.writeStructBegin(STRUCT_DESC);
7020
 
5361 mandeep.dh 7021
      if (this.isSetSuccess()) {
7022
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7023
        this.success.write(oprot);
7024
        oprot.writeFieldEnd();
7025
      } else if (this.isSetWex()) {
2820 chandransh 7026
        oprot.writeFieldBegin(WEX_FIELD_DESC);
7027
        this.wex.write(oprot);
7028
        oprot.writeFieldEnd();
7029
      }
7030
      oprot.writeFieldStop();
7031
      oprot.writeStructEnd();
7032
    }
7033
 
7034
    @Override
7035
    public String toString() {
4496 mandeep.dh 7036
      StringBuilder sb = new StringBuilder("scanForOrder_result(");
2820 chandransh 7037
      boolean first = true;
7038
 
5361 mandeep.dh 7039
      sb.append("success:");
7040
      if (this.success == null) {
7041
        sb.append("null");
7042
      } else {
7043
        sb.append(this.success);
7044
      }
7045
      first = false;
7046
      if (!first) sb.append(", ");
2820 chandransh 7047
      sb.append("wex:");
7048
      if (this.wex == null) {
7049
        sb.append("null");
7050
      } else {
7051
        sb.append(this.wex);
7052
      }
7053
      first = false;
7054
      sb.append(")");
7055
      return sb.toString();
7056
    }
7057
 
3430 rajveer 7058
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 7059
      // check for required fields
7060
    }
7061
 
3430 rajveer 7062
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7063
      try {
7064
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7065
      } catch (org.apache.thrift.TException te) {
7066
        throw new java.io.IOException(te);
7067
      }
7068
    }
7069
 
7070
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7071
      try {
7072
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7073
      } catch (org.apache.thrift.TException te) {
7074
        throw new java.io.IOException(te);
7075
      }
7076
    }
7077
 
2820 chandransh 7078
  }
7079
 
4496 mandeep.dh 7080
  public static class createItemNumberMapping_args implements org.apache.thrift.TBase<createItemNumberMapping_args, createItemNumberMapping_args._Fields>, java.io.Serializable, Cloneable   {
7081
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_args");
7082
 
7083
    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);
7084
    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);
7085
 
7086
    private String itemNumber; // required
7087
    private long itemId; // required
7088
 
7089
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7090
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7091
      ITEM_NUMBER((short)1, "itemNumber"),
7092
      ITEM_ID((short)2, "itemId");
7093
 
7094
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7095
 
7096
      static {
7097
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7098
          byName.put(field.getFieldName(), field);
7099
        }
7100
      }
7101
 
7102
      /**
7103
       * Find the _Fields constant that matches fieldId, or null if its not found.
7104
       */
7105
      public static _Fields findByThriftId(int fieldId) {
7106
        switch(fieldId) {
7107
          case 1: // ITEM_NUMBER
7108
            return ITEM_NUMBER;
7109
          case 2: // ITEM_ID
7110
            return ITEM_ID;
7111
          default:
7112
            return null;
7113
        }
7114
      }
7115
 
7116
      /**
7117
       * Find the _Fields constant that matches fieldId, throwing an exception
7118
       * if it is not found.
7119
       */
7120
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7121
        _Fields fields = findByThriftId(fieldId);
7122
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7123
        return fields;
7124
      }
7125
 
7126
      /**
7127
       * Find the _Fields constant that matches name, or null if its not found.
7128
       */
7129
      public static _Fields findByName(String name) {
7130
        return byName.get(name);
7131
      }
7132
 
7133
      private final short _thriftId;
7134
      private final String _fieldName;
7135
 
7136
      _Fields(short thriftId, String fieldName) {
7137
        _thriftId = thriftId;
7138
        _fieldName = fieldName;
7139
      }
7140
 
7141
      public short getThriftFieldId() {
7142
        return _thriftId;
7143
      }
7144
 
7145
      public String getFieldName() {
7146
        return _fieldName;
7147
      }
7148
    }
7149
 
7150
    // isset id assignments
7151
    private static final int __ITEMID_ISSET_ID = 0;
7152
    private BitSet __isset_bit_vector = new BitSet(1);
7153
 
7154
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7155
    static {
7156
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7157
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7158
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
7159
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7160
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7161
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7162
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_args.class, metaDataMap);
7163
    }
7164
 
7165
    public createItemNumberMapping_args() {
7166
    }
7167
 
7168
    public createItemNumberMapping_args(
7169
      String itemNumber,
7170
      long itemId)
7171
    {
7172
      this();
7173
      this.itemNumber = itemNumber;
7174
      this.itemId = itemId;
7175
      setItemIdIsSet(true);
7176
    }
7177
 
7178
    /**
7179
     * Performs a deep copy on <i>other</i>.
7180
     */
7181
    public createItemNumberMapping_args(createItemNumberMapping_args other) {
7182
      __isset_bit_vector.clear();
7183
      __isset_bit_vector.or(other.__isset_bit_vector);
7184
      if (other.isSetItemNumber()) {
7185
        this.itemNumber = other.itemNumber;
7186
      }
7187
      this.itemId = other.itemId;
7188
    }
7189
 
7190
    public createItemNumberMapping_args deepCopy() {
7191
      return new createItemNumberMapping_args(this);
7192
    }
7193
 
7194
    @Override
7195
    public void clear() {
7196
      this.itemNumber = null;
7197
      setItemIdIsSet(false);
7198
      this.itemId = 0;
7199
    }
7200
 
7201
    public String getItemNumber() {
7202
      return this.itemNumber;
7203
    }
7204
 
7205
    public void setItemNumber(String itemNumber) {
7206
      this.itemNumber = itemNumber;
7207
    }
7208
 
7209
    public void unsetItemNumber() {
7210
      this.itemNumber = null;
7211
    }
7212
 
7213
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
7214
    public boolean isSetItemNumber() {
7215
      return this.itemNumber != null;
7216
    }
7217
 
7218
    public void setItemNumberIsSet(boolean value) {
7219
      if (!value) {
7220
        this.itemNumber = null;
7221
      }
7222
    }
7223
 
7224
    public long getItemId() {
7225
      return this.itemId;
7226
    }
7227
 
7228
    public void setItemId(long itemId) {
7229
      this.itemId = itemId;
7230
      setItemIdIsSet(true);
7231
    }
7232
 
7233
    public void unsetItemId() {
7234
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
7235
    }
7236
 
7237
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
7238
    public boolean isSetItemId() {
7239
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
7240
    }
7241
 
7242
    public void setItemIdIsSet(boolean value) {
7243
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
7244
    }
7245
 
7246
    public void setFieldValue(_Fields field, Object value) {
7247
      switch (field) {
7248
      case ITEM_NUMBER:
7249
        if (value == null) {
7250
          unsetItemNumber();
7251
        } else {
7252
          setItemNumber((String)value);
7253
        }
7254
        break;
7255
 
7256
      case ITEM_ID:
7257
        if (value == null) {
7258
          unsetItemId();
7259
        } else {
7260
          setItemId((Long)value);
7261
        }
7262
        break;
7263
 
7264
      }
7265
    }
7266
 
7267
    public Object getFieldValue(_Fields field) {
7268
      switch (field) {
7269
      case ITEM_NUMBER:
7270
        return getItemNumber();
7271
 
7272
      case ITEM_ID:
7273
        return Long.valueOf(getItemId());
7274
 
7275
      }
7276
      throw new IllegalStateException();
7277
    }
7278
 
7279
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7280
    public boolean isSet(_Fields field) {
7281
      if (field == null) {
7282
        throw new IllegalArgumentException();
7283
      }
7284
 
7285
      switch (field) {
7286
      case ITEM_NUMBER:
7287
        return isSetItemNumber();
7288
      case ITEM_ID:
7289
        return isSetItemId();
7290
      }
7291
      throw new IllegalStateException();
7292
    }
7293
 
7294
    @Override
7295
    public boolean equals(Object that) {
7296
      if (that == null)
7297
        return false;
7298
      if (that instanceof createItemNumberMapping_args)
7299
        return this.equals((createItemNumberMapping_args)that);
7300
      return false;
7301
    }
7302
 
7303
    public boolean equals(createItemNumberMapping_args that) {
7304
      if (that == null)
7305
        return false;
7306
 
7307
      boolean this_present_itemNumber = true && this.isSetItemNumber();
7308
      boolean that_present_itemNumber = true && that.isSetItemNumber();
7309
      if (this_present_itemNumber || that_present_itemNumber) {
7310
        if (!(this_present_itemNumber && that_present_itemNumber))
7311
          return false;
7312
        if (!this.itemNumber.equals(that.itemNumber))
7313
          return false;
7314
      }
7315
 
7316
      boolean this_present_itemId = true;
7317
      boolean that_present_itemId = true;
7318
      if (this_present_itemId || that_present_itemId) {
7319
        if (!(this_present_itemId && that_present_itemId))
7320
          return false;
7321
        if (this.itemId != that.itemId)
7322
          return false;
7323
      }
7324
 
7325
      return true;
7326
    }
7327
 
7328
    @Override
7329
    public int hashCode() {
7330
      return 0;
7331
    }
7332
 
7333
    public int compareTo(createItemNumberMapping_args other) {
7334
      if (!getClass().equals(other.getClass())) {
7335
        return getClass().getName().compareTo(other.getClass().getName());
7336
      }
7337
 
7338
      int lastComparison = 0;
7339
      createItemNumberMapping_args typedOther = (createItemNumberMapping_args)other;
7340
 
7341
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
7342
      if (lastComparison != 0) {
7343
        return lastComparison;
7344
      }
7345
      if (isSetItemNumber()) {
7346
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
7347
        if (lastComparison != 0) {
7348
          return lastComparison;
7349
        }
7350
      }
7351
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
7352
      if (lastComparison != 0) {
7353
        return lastComparison;
7354
      }
7355
      if (isSetItemId()) {
7356
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
7357
        if (lastComparison != 0) {
7358
          return lastComparison;
7359
        }
7360
      }
7361
      return 0;
7362
    }
7363
 
7364
    public _Fields fieldForId(int fieldId) {
7365
      return _Fields.findByThriftId(fieldId);
7366
    }
7367
 
7368
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7369
      org.apache.thrift.protocol.TField field;
7370
      iprot.readStructBegin();
7371
      while (true)
7372
      {
7373
        field = iprot.readFieldBegin();
7374
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7375
          break;
7376
        }
7377
        switch (field.id) {
7378
          case 1: // ITEM_NUMBER
7379
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
7380
              this.itemNumber = iprot.readString();
7381
            } else { 
7382
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7383
            }
7384
            break;
7385
          case 2: // ITEM_ID
7386
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7387
              this.itemId = iprot.readI64();
7388
              setItemIdIsSet(true);
7389
            } else { 
7390
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7391
            }
7392
            break;
7393
          default:
7394
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7395
        }
7396
        iprot.readFieldEnd();
7397
      }
7398
      iprot.readStructEnd();
7399
      validate();
7400
    }
7401
 
7402
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7403
      validate();
7404
 
7405
      oprot.writeStructBegin(STRUCT_DESC);
7406
      if (this.itemNumber != null) {
7407
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
7408
        oprot.writeString(this.itemNumber);
7409
        oprot.writeFieldEnd();
7410
      }
7411
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
7412
      oprot.writeI64(this.itemId);
7413
      oprot.writeFieldEnd();
7414
      oprot.writeFieldStop();
7415
      oprot.writeStructEnd();
7416
    }
7417
 
7418
    @Override
7419
    public String toString() {
7420
      StringBuilder sb = new StringBuilder("createItemNumberMapping_args(");
7421
      boolean first = true;
7422
 
7423
      sb.append("itemNumber:");
7424
      if (this.itemNumber == null) {
7425
        sb.append("null");
7426
      } else {
7427
        sb.append(this.itemNumber);
7428
      }
7429
      first = false;
7430
      if (!first) sb.append(", ");
7431
      sb.append("itemId:");
7432
      sb.append(this.itemId);
7433
      first = false;
7434
      sb.append(")");
7435
      return sb.toString();
7436
    }
7437
 
7438
    public void validate() throws org.apache.thrift.TException {
7439
      // check for required fields
7440
    }
7441
 
7442
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7443
      try {
7444
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7445
      } catch (org.apache.thrift.TException te) {
7446
        throw new java.io.IOException(te);
7447
      }
7448
    }
7449
 
7450
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7451
      try {
7452
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7453
        __isset_bit_vector = new BitSet(1);
7454
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7455
      } catch (org.apache.thrift.TException te) {
7456
        throw new java.io.IOException(te);
7457
      }
7458
    }
7459
 
7460
  }
7461
 
7462
  public static class createItemNumberMapping_result implements org.apache.thrift.TBase<createItemNumberMapping_result, createItemNumberMapping_result._Fields>, java.io.Serializable, Cloneable   {
7463
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_result");
7464
 
7465
 
7466
 
7467
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7468
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7469
;
7470
 
7471
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7472
 
7473
      static {
7474
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7475
          byName.put(field.getFieldName(), field);
7476
        }
7477
      }
7478
 
7479
      /**
7480
       * Find the _Fields constant that matches fieldId, or null if its not found.
7481
       */
7482
      public static _Fields findByThriftId(int fieldId) {
7483
        switch(fieldId) {
7484
          default:
7485
            return null;
7486
        }
7487
      }
7488
 
7489
      /**
7490
       * Find the _Fields constant that matches fieldId, throwing an exception
7491
       * if it is not found.
7492
       */
7493
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7494
        _Fields fields = findByThriftId(fieldId);
7495
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7496
        return fields;
7497
      }
7498
 
7499
      /**
7500
       * Find the _Fields constant that matches name, or null if its not found.
7501
       */
7502
      public static _Fields findByName(String name) {
7503
        return byName.get(name);
7504
      }
7505
 
7506
      private final short _thriftId;
7507
      private final String _fieldName;
7508
 
7509
      _Fields(short thriftId, String fieldName) {
7510
        _thriftId = thriftId;
7511
        _fieldName = fieldName;
7512
      }
7513
 
7514
      public short getThriftFieldId() {
7515
        return _thriftId;
7516
      }
7517
 
7518
      public String getFieldName() {
7519
        return _fieldName;
7520
      }
7521
    }
7522
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7523
    static {
7524
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7525
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7526
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_result.class, metaDataMap);
7527
    }
7528
 
7529
    public createItemNumberMapping_result() {
7530
    }
7531
 
7532
    /**
7533
     * Performs a deep copy on <i>other</i>.
7534
     */
7535
    public createItemNumberMapping_result(createItemNumberMapping_result other) {
7536
    }
7537
 
7538
    public createItemNumberMapping_result deepCopy() {
7539
      return new createItemNumberMapping_result(this);
7540
    }
7541
 
7542
    @Override
7543
    public void clear() {
7544
    }
7545
 
7546
    public void setFieldValue(_Fields field, Object value) {
7547
      switch (field) {
7548
      }
7549
    }
7550
 
7551
    public Object getFieldValue(_Fields field) {
7552
      switch (field) {
7553
      }
7554
      throw new IllegalStateException();
7555
    }
7556
 
7557
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7558
    public boolean isSet(_Fields field) {
7559
      if (field == null) {
7560
        throw new IllegalArgumentException();
7561
      }
7562
 
7563
      switch (field) {
7564
      }
7565
      throw new IllegalStateException();
7566
    }
7567
 
7568
    @Override
7569
    public boolean equals(Object that) {
7570
      if (that == null)
7571
        return false;
7572
      if (that instanceof createItemNumberMapping_result)
7573
        return this.equals((createItemNumberMapping_result)that);
7574
      return false;
7575
    }
7576
 
7577
    public boolean equals(createItemNumberMapping_result that) {
7578
      if (that == null)
7579
        return false;
7580
 
7581
      return true;
7582
    }
7583
 
7584
    @Override
7585
    public int hashCode() {
7586
      return 0;
7587
    }
7588
 
7589
    public int compareTo(createItemNumberMapping_result other) {
7590
      if (!getClass().equals(other.getClass())) {
7591
        return getClass().getName().compareTo(other.getClass().getName());
7592
      }
7593
 
7594
      int lastComparison = 0;
7595
      createItemNumberMapping_result typedOther = (createItemNumberMapping_result)other;
7596
 
7597
      return 0;
7598
    }
7599
 
7600
    public _Fields fieldForId(int fieldId) {
7601
      return _Fields.findByThriftId(fieldId);
7602
    }
7603
 
7604
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7605
      org.apache.thrift.protocol.TField field;
7606
      iprot.readStructBegin();
7607
      while (true)
7608
      {
7609
        field = iprot.readFieldBegin();
7610
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7611
          break;
7612
        }
7613
        switch (field.id) {
7614
          default:
7615
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7616
        }
7617
        iprot.readFieldEnd();
7618
      }
7619
      iprot.readStructEnd();
7620
      validate();
7621
    }
7622
 
7623
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7624
      oprot.writeStructBegin(STRUCT_DESC);
7625
 
7626
      oprot.writeFieldStop();
7627
      oprot.writeStructEnd();
7628
    }
7629
 
7630
    @Override
7631
    public String toString() {
7632
      StringBuilder sb = new StringBuilder("createItemNumberMapping_result(");
7633
      boolean first = true;
7634
 
7635
      sb.append(")");
7636
      return sb.toString();
7637
    }
7638
 
7639
    public void validate() throws org.apache.thrift.TException {
7640
      // check for required fields
7641
    }
7642
 
7643
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7644
      try {
7645
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7646
      } catch (org.apache.thrift.TException te) {
7647
        throw new java.io.IOException(te);
7648
      }
7649
    }
7650
 
7651
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7652
      try {
7653
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7654
      } catch (org.apache.thrift.TException te) {
7655
        throw new java.io.IOException(te);
7656
      }
7657
    }
7658
 
7659
  }
7660
 
4622 amit.gupta 7661
  public static class getItemNumbers_args implements org.apache.thrift.TBase<getItemNumbers_args, getItemNumbers_args._Fields>, java.io.Serializable, Cloneable   {
7662
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_args");
7663
 
7664
    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);
7665
 
7666
    private long itemId; // required
7667
 
7668
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7669
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7670
      ITEM_ID((short)1, "itemId");
7671
 
7672
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7673
 
7674
      static {
7675
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7676
          byName.put(field.getFieldName(), field);
7677
        }
7678
      }
7679
 
7680
      /**
7681
       * Find the _Fields constant that matches fieldId, or null if its not found.
7682
       */
7683
      public static _Fields findByThriftId(int fieldId) {
7684
        switch(fieldId) {
7685
          case 1: // ITEM_ID
7686
            return ITEM_ID;
7687
          default:
7688
            return null;
7689
        }
7690
      }
7691
 
7692
      /**
7693
       * Find the _Fields constant that matches fieldId, throwing an exception
7694
       * if it is not found.
7695
       */
7696
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7697
        _Fields fields = findByThriftId(fieldId);
7698
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7699
        return fields;
7700
      }
7701
 
7702
      /**
7703
       * Find the _Fields constant that matches name, or null if its not found.
7704
       */
7705
      public static _Fields findByName(String name) {
7706
        return byName.get(name);
7707
      }
7708
 
7709
      private final short _thriftId;
7710
      private final String _fieldName;
7711
 
7712
      _Fields(short thriftId, String fieldName) {
7713
        _thriftId = thriftId;
7714
        _fieldName = fieldName;
7715
      }
7716
 
7717
      public short getThriftFieldId() {
7718
        return _thriftId;
7719
      }
7720
 
7721
      public String getFieldName() {
7722
        return _fieldName;
7723
      }
7724
    }
7725
 
7726
    // isset id assignments
7727
    private static final int __ITEMID_ISSET_ID = 0;
7728
    private BitSet __isset_bit_vector = new BitSet(1);
7729
 
7730
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7731
    static {
7732
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7733
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7734
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7735
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7736
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_args.class, metaDataMap);
7737
    }
7738
 
7739
    public getItemNumbers_args() {
7740
    }
7741
 
7742
    public getItemNumbers_args(
7743
      long itemId)
7744
    {
7745
      this();
7746
      this.itemId = itemId;
7747
      setItemIdIsSet(true);
7748
    }
7749
 
7750
    /**
7751
     * Performs a deep copy on <i>other</i>.
7752
     */
7753
    public getItemNumbers_args(getItemNumbers_args other) {
7754
      __isset_bit_vector.clear();
7755
      __isset_bit_vector.or(other.__isset_bit_vector);
7756
      this.itemId = other.itemId;
7757
    }
7758
 
7759
    public getItemNumbers_args deepCopy() {
7760
      return new getItemNumbers_args(this);
7761
    }
7762
 
7763
    @Override
7764
    public void clear() {
7765
      setItemIdIsSet(false);
7766
      this.itemId = 0;
7767
    }
7768
 
7769
    public long getItemId() {
7770
      return this.itemId;
7771
    }
7772
 
7773
    public void setItemId(long itemId) {
7774
      this.itemId = itemId;
7775
      setItemIdIsSet(true);
7776
    }
7777
 
7778
    public void unsetItemId() {
7779
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
7780
    }
7781
 
7782
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
7783
    public boolean isSetItemId() {
7784
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
7785
    }
7786
 
7787
    public void setItemIdIsSet(boolean value) {
7788
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
7789
    }
7790
 
7791
    public void setFieldValue(_Fields field, Object value) {
7792
      switch (field) {
7793
      case ITEM_ID:
7794
        if (value == null) {
7795
          unsetItemId();
7796
        } else {
7797
          setItemId((Long)value);
7798
        }
7799
        break;
7800
 
7801
      }
7802
    }
7803
 
7804
    public Object getFieldValue(_Fields field) {
7805
      switch (field) {
7806
      case ITEM_ID:
7807
        return Long.valueOf(getItemId());
7808
 
7809
      }
7810
      throw new IllegalStateException();
7811
    }
7812
 
7813
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7814
    public boolean isSet(_Fields field) {
7815
      if (field == null) {
7816
        throw new IllegalArgumentException();
7817
      }
7818
 
7819
      switch (field) {
7820
      case ITEM_ID:
7821
        return isSetItemId();
7822
      }
7823
      throw new IllegalStateException();
7824
    }
7825
 
7826
    @Override
7827
    public boolean equals(Object that) {
7828
      if (that == null)
7829
        return false;
7830
      if (that instanceof getItemNumbers_args)
7831
        return this.equals((getItemNumbers_args)that);
7832
      return false;
7833
    }
7834
 
7835
    public boolean equals(getItemNumbers_args that) {
7836
      if (that == null)
7837
        return false;
7838
 
7839
      boolean this_present_itemId = true;
7840
      boolean that_present_itemId = true;
7841
      if (this_present_itemId || that_present_itemId) {
7842
        if (!(this_present_itemId && that_present_itemId))
7843
          return false;
7844
        if (this.itemId != that.itemId)
7845
          return false;
7846
      }
7847
 
7848
      return true;
7849
    }
7850
 
7851
    @Override
7852
    public int hashCode() {
7853
      return 0;
7854
    }
7855
 
7856
    public int compareTo(getItemNumbers_args other) {
7857
      if (!getClass().equals(other.getClass())) {
7858
        return getClass().getName().compareTo(other.getClass().getName());
7859
      }
7860
 
7861
      int lastComparison = 0;
7862
      getItemNumbers_args typedOther = (getItemNumbers_args)other;
7863
 
7864
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
7865
      if (lastComparison != 0) {
7866
        return lastComparison;
7867
      }
7868
      if (isSetItemId()) {
7869
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
7870
        if (lastComparison != 0) {
7871
          return lastComparison;
7872
        }
7873
      }
7874
      return 0;
7875
    }
7876
 
7877
    public _Fields fieldForId(int fieldId) {
7878
      return _Fields.findByThriftId(fieldId);
7879
    }
7880
 
7881
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7882
      org.apache.thrift.protocol.TField field;
7883
      iprot.readStructBegin();
7884
      while (true)
7885
      {
7886
        field = iprot.readFieldBegin();
7887
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7888
          break;
7889
        }
7890
        switch (field.id) {
7891
          case 1: // ITEM_ID
7892
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7893
              this.itemId = iprot.readI64();
7894
              setItemIdIsSet(true);
7895
            } else { 
7896
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7897
            }
7898
            break;
7899
          default:
7900
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7901
        }
7902
        iprot.readFieldEnd();
7903
      }
7904
      iprot.readStructEnd();
7905
      validate();
7906
    }
7907
 
7908
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7909
      validate();
7910
 
7911
      oprot.writeStructBegin(STRUCT_DESC);
7912
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
7913
      oprot.writeI64(this.itemId);
7914
      oprot.writeFieldEnd();
7915
      oprot.writeFieldStop();
7916
      oprot.writeStructEnd();
7917
    }
7918
 
7919
    @Override
7920
    public String toString() {
7921
      StringBuilder sb = new StringBuilder("getItemNumbers_args(");
7922
      boolean first = true;
7923
 
7924
      sb.append("itemId:");
7925
      sb.append(this.itemId);
7926
      first = false;
7927
      sb.append(")");
7928
      return sb.toString();
7929
    }
7930
 
7931
    public void validate() throws org.apache.thrift.TException {
7932
      // check for required fields
7933
    }
7934
 
7935
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7936
      try {
7937
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7938
      } catch (org.apache.thrift.TException te) {
7939
        throw new java.io.IOException(te);
7940
      }
7941
    }
7942
 
7943
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7944
      try {
7945
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7946
        __isset_bit_vector = new BitSet(1);
7947
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7948
      } catch (org.apache.thrift.TException te) {
7949
        throw new java.io.IOException(te);
7950
      }
7951
    }
7952
 
7953
  }
7954
 
7955
  public static class getItemNumbers_result implements org.apache.thrift.TBase<getItemNumbers_result, getItemNumbers_result._Fields>, java.io.Serializable, Cloneable   {
7956
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_result");
7957
 
7958
    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);
7959
 
7960
    private List<String> success; // required
7961
 
7962
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7963
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7964
      SUCCESS((short)0, "success");
7965
 
7966
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7967
 
7968
      static {
7969
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7970
          byName.put(field.getFieldName(), field);
7971
        }
7972
      }
7973
 
7974
      /**
7975
       * Find the _Fields constant that matches fieldId, or null if its not found.
7976
       */
7977
      public static _Fields findByThriftId(int fieldId) {
7978
        switch(fieldId) {
7979
          case 0: // SUCCESS
7980
            return SUCCESS;
7981
          default:
7982
            return null;
7983
        }
7984
      }
7985
 
7986
      /**
7987
       * Find the _Fields constant that matches fieldId, throwing an exception
7988
       * if it is not found.
7989
       */
7990
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7991
        _Fields fields = findByThriftId(fieldId);
7992
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7993
        return fields;
7994
      }
7995
 
7996
      /**
7997
       * Find the _Fields constant that matches name, or null if its not found.
7998
       */
7999
      public static _Fields findByName(String name) {
8000
        return byName.get(name);
8001
      }
8002
 
8003
      private final short _thriftId;
8004
      private final String _fieldName;
8005
 
8006
      _Fields(short thriftId, String fieldName) {
8007
        _thriftId = thriftId;
8008
        _fieldName = fieldName;
8009
      }
8010
 
8011
      public short getThriftFieldId() {
8012
        return _thriftId;
8013
      }
8014
 
8015
      public String getFieldName() {
8016
        return _fieldName;
8017
      }
8018
    }
8019
 
8020
    // isset id assignments
8021
 
8022
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8023
    static {
8024
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8025
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8026
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8027
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
8028
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8029
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_result.class, metaDataMap);
8030
    }
8031
 
8032
    public getItemNumbers_result() {
8033
    }
8034
 
8035
    public getItemNumbers_result(
8036
      List<String> success)
8037
    {
8038
      this();
8039
      this.success = success;
8040
    }
8041
 
8042
    /**
8043
     * Performs a deep copy on <i>other</i>.
8044
     */
8045
    public getItemNumbers_result(getItemNumbers_result other) {
8046
      if (other.isSetSuccess()) {
8047
        List<String> __this__success = new ArrayList<String>();
8048
        for (String other_element : other.success) {
8049
          __this__success.add(other_element);
8050
        }
8051
        this.success = __this__success;
8052
      }
8053
    }
8054
 
8055
    public getItemNumbers_result deepCopy() {
8056
      return new getItemNumbers_result(this);
8057
    }
8058
 
8059
    @Override
8060
    public void clear() {
8061
      this.success = null;
8062
    }
8063
 
8064
    public int getSuccessSize() {
8065
      return (this.success == null) ? 0 : this.success.size();
8066
    }
8067
 
8068
    public java.util.Iterator<String> getSuccessIterator() {
8069
      return (this.success == null) ? null : this.success.iterator();
8070
    }
8071
 
8072
    public void addToSuccess(String elem) {
8073
      if (this.success == null) {
8074
        this.success = new ArrayList<String>();
8075
      }
8076
      this.success.add(elem);
8077
    }
8078
 
8079
    public List<String> getSuccess() {
8080
      return this.success;
8081
    }
8082
 
8083
    public void setSuccess(List<String> success) {
8084
      this.success = success;
8085
    }
8086
 
8087
    public void unsetSuccess() {
8088
      this.success = null;
8089
    }
8090
 
8091
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8092
    public boolean isSetSuccess() {
8093
      return this.success != null;
8094
    }
8095
 
8096
    public void setSuccessIsSet(boolean value) {
8097
      if (!value) {
8098
        this.success = null;
8099
      }
8100
    }
8101
 
8102
    public void setFieldValue(_Fields field, Object value) {
8103
      switch (field) {
8104
      case SUCCESS:
8105
        if (value == null) {
8106
          unsetSuccess();
8107
        } else {
8108
          setSuccess((List<String>)value);
8109
        }
8110
        break;
8111
 
8112
      }
8113
    }
8114
 
8115
    public Object getFieldValue(_Fields field) {
8116
      switch (field) {
8117
      case SUCCESS:
8118
        return getSuccess();
8119
 
8120
      }
8121
      throw new IllegalStateException();
8122
    }
8123
 
8124
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8125
    public boolean isSet(_Fields field) {
8126
      if (field == null) {
8127
        throw new IllegalArgumentException();
8128
      }
8129
 
8130
      switch (field) {
8131
      case SUCCESS:
8132
        return isSetSuccess();
8133
      }
8134
      throw new IllegalStateException();
8135
    }
8136
 
8137
    @Override
8138
    public boolean equals(Object that) {
8139
      if (that == null)
8140
        return false;
8141
      if (that instanceof getItemNumbers_result)
8142
        return this.equals((getItemNumbers_result)that);
8143
      return false;
8144
    }
8145
 
8146
    public boolean equals(getItemNumbers_result that) {
8147
      if (that == null)
8148
        return false;
8149
 
8150
      boolean this_present_success = true && this.isSetSuccess();
8151
      boolean that_present_success = true && that.isSetSuccess();
8152
      if (this_present_success || that_present_success) {
8153
        if (!(this_present_success && that_present_success))
8154
          return false;
8155
        if (!this.success.equals(that.success))
8156
          return false;
8157
      }
8158
 
8159
      return true;
8160
    }
8161
 
8162
    @Override
8163
    public int hashCode() {
8164
      return 0;
8165
    }
8166
 
8167
    public int compareTo(getItemNumbers_result other) {
8168
      if (!getClass().equals(other.getClass())) {
8169
        return getClass().getName().compareTo(other.getClass().getName());
8170
      }
8171
 
8172
      int lastComparison = 0;
8173
      getItemNumbers_result typedOther = (getItemNumbers_result)other;
8174
 
8175
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8176
      if (lastComparison != 0) {
8177
        return lastComparison;
8178
      }
8179
      if (isSetSuccess()) {
8180
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8181
        if (lastComparison != 0) {
8182
          return lastComparison;
8183
        }
8184
      }
8185
      return 0;
8186
    }
8187
 
8188
    public _Fields fieldForId(int fieldId) {
8189
      return _Fields.findByThriftId(fieldId);
8190
    }
8191
 
8192
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8193
      org.apache.thrift.protocol.TField field;
8194
      iprot.readStructBegin();
8195
      while (true)
8196
      {
8197
        field = iprot.readFieldBegin();
8198
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8199
          break;
8200
        }
8201
        switch (field.id) {
8202
          case 0: // SUCCESS
8203
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8204
              {
5361 mandeep.dh 8205
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
8206
                this.success = new ArrayList<String>(_list0.size);
8207
                for (int _i1 = 0; _i1 < _list0.size; ++_i1)
4622 amit.gupta 8208
                {
5361 mandeep.dh 8209
                  String _elem2; // required
8210
                  _elem2 = iprot.readString();
8211
                  this.success.add(_elem2);
4622 amit.gupta 8212
                }
8213
                iprot.readListEnd();
8214
              }
8215
            } else { 
8216
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8217
            }
8218
            break;
8219
          default:
8220
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8221
        }
8222
        iprot.readFieldEnd();
8223
      }
8224
      iprot.readStructEnd();
8225
      validate();
8226
    }
8227
 
8228
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8229
      oprot.writeStructBegin(STRUCT_DESC);
8230
 
8231
      if (this.isSetSuccess()) {
8232
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8233
        {
8234
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
5361 mandeep.dh 8235
          for (String _iter3 : this.success)
4622 amit.gupta 8236
          {
5361 mandeep.dh 8237
            oprot.writeString(_iter3);
4622 amit.gupta 8238
          }
8239
          oprot.writeListEnd();
8240
        }
8241
        oprot.writeFieldEnd();
8242
      }
8243
      oprot.writeFieldStop();
8244
      oprot.writeStructEnd();
8245
    }
8246
 
8247
    @Override
8248
    public String toString() {
8249
      StringBuilder sb = new StringBuilder("getItemNumbers_result(");
8250
      boolean first = true;
8251
 
8252
      sb.append("success:");
8253
      if (this.success == null) {
8254
        sb.append("null");
8255
      } else {
8256
        sb.append(this.success);
8257
      }
8258
      first = false;
8259
      sb.append(")");
8260
      return sb.toString();
8261
    }
8262
 
8263
    public void validate() throws org.apache.thrift.TException {
8264
      // check for required fields
8265
    }
8266
 
8267
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8268
      try {
8269
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8270
      } catch (org.apache.thrift.TException te) {
8271
        throw new java.io.IOException(te);
8272
      }
8273
    }
8274
 
8275
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8276
      try {
8277
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8278
      } catch (org.apache.thrift.TException te) {
8279
        throw new java.io.IOException(te);
8280
      }
8281
    }
8282
 
8283
  }
8284
 
5110 mandeep.dh 8285
  public static class getItemIds_args implements org.apache.thrift.TBase<getItemIds_args, getItemIds_args._Fields>, java.io.Serializable, Cloneable   {
8286
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_args");
8287
 
8288
    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);
8289
 
8290
    private String itemNumber; // required
8291
 
8292
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8293
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8294
      ITEM_NUMBER((short)1, "itemNumber");
8295
 
8296
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8297
 
8298
      static {
8299
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8300
          byName.put(field.getFieldName(), field);
8301
        }
8302
      }
8303
 
8304
      /**
8305
       * Find the _Fields constant that matches fieldId, or null if its not found.
8306
       */
8307
      public static _Fields findByThriftId(int fieldId) {
8308
        switch(fieldId) {
8309
          case 1: // ITEM_NUMBER
8310
            return ITEM_NUMBER;
8311
          default:
8312
            return null;
8313
        }
8314
      }
8315
 
8316
      /**
8317
       * Find the _Fields constant that matches fieldId, throwing an exception
8318
       * if it is not found.
8319
       */
8320
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8321
        _Fields fields = findByThriftId(fieldId);
8322
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8323
        return fields;
8324
      }
8325
 
8326
      /**
8327
       * Find the _Fields constant that matches name, or null if its not found.
8328
       */
8329
      public static _Fields findByName(String name) {
8330
        return byName.get(name);
8331
      }
8332
 
8333
      private final short _thriftId;
8334
      private final String _fieldName;
8335
 
8336
      _Fields(short thriftId, String fieldName) {
8337
        _thriftId = thriftId;
8338
        _fieldName = fieldName;
8339
      }
8340
 
8341
      public short getThriftFieldId() {
8342
        return _thriftId;
8343
      }
8344
 
8345
      public String getFieldName() {
8346
        return _fieldName;
8347
      }
8348
    }
8349
 
8350
    // isset id assignments
8351
 
8352
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8353
    static {
8354
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8355
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8356
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
8357
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8358
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_args.class, metaDataMap);
8359
    }
8360
 
8361
    public getItemIds_args() {
8362
    }
8363
 
8364
    public getItemIds_args(
8365
      String itemNumber)
8366
    {
8367
      this();
8368
      this.itemNumber = itemNumber;
8369
    }
8370
 
8371
    /**
8372
     * Performs a deep copy on <i>other</i>.
8373
     */
8374
    public getItemIds_args(getItemIds_args other) {
8375
      if (other.isSetItemNumber()) {
8376
        this.itemNumber = other.itemNumber;
8377
      }
8378
    }
8379
 
8380
    public getItemIds_args deepCopy() {
8381
      return new getItemIds_args(this);
8382
    }
8383
 
8384
    @Override
8385
    public void clear() {
8386
      this.itemNumber = null;
8387
    }
8388
 
8389
    public String getItemNumber() {
8390
      return this.itemNumber;
8391
    }
8392
 
8393
    public void setItemNumber(String itemNumber) {
8394
      this.itemNumber = itemNumber;
8395
    }
8396
 
8397
    public void unsetItemNumber() {
8398
      this.itemNumber = null;
8399
    }
8400
 
8401
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
8402
    public boolean isSetItemNumber() {
8403
      return this.itemNumber != null;
8404
    }
8405
 
8406
    public void setItemNumberIsSet(boolean value) {
8407
      if (!value) {
8408
        this.itemNumber = null;
8409
      }
8410
    }
8411
 
8412
    public void setFieldValue(_Fields field, Object value) {
8413
      switch (field) {
8414
      case ITEM_NUMBER:
8415
        if (value == null) {
8416
          unsetItemNumber();
8417
        } else {
8418
          setItemNumber((String)value);
8419
        }
8420
        break;
8421
 
8422
      }
8423
    }
8424
 
8425
    public Object getFieldValue(_Fields field) {
8426
      switch (field) {
8427
      case ITEM_NUMBER:
8428
        return getItemNumber();
8429
 
8430
      }
8431
      throw new IllegalStateException();
8432
    }
8433
 
8434
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8435
    public boolean isSet(_Fields field) {
8436
      if (field == null) {
8437
        throw new IllegalArgumentException();
8438
      }
8439
 
8440
      switch (field) {
8441
      case ITEM_NUMBER:
8442
        return isSetItemNumber();
8443
      }
8444
      throw new IllegalStateException();
8445
    }
8446
 
8447
    @Override
8448
    public boolean equals(Object that) {
8449
      if (that == null)
8450
        return false;
8451
      if (that instanceof getItemIds_args)
8452
        return this.equals((getItemIds_args)that);
8453
      return false;
8454
    }
8455
 
8456
    public boolean equals(getItemIds_args that) {
8457
      if (that == null)
8458
        return false;
8459
 
8460
      boolean this_present_itemNumber = true && this.isSetItemNumber();
8461
      boolean that_present_itemNumber = true && that.isSetItemNumber();
8462
      if (this_present_itemNumber || that_present_itemNumber) {
8463
        if (!(this_present_itemNumber && that_present_itemNumber))
8464
          return false;
8465
        if (!this.itemNumber.equals(that.itemNumber))
8466
          return false;
8467
      }
8468
 
8469
      return true;
8470
    }
8471
 
8472
    @Override
8473
    public int hashCode() {
8474
      return 0;
8475
    }
8476
 
8477
    public int compareTo(getItemIds_args other) {
8478
      if (!getClass().equals(other.getClass())) {
8479
        return getClass().getName().compareTo(other.getClass().getName());
8480
      }
8481
 
8482
      int lastComparison = 0;
8483
      getItemIds_args typedOther = (getItemIds_args)other;
8484
 
8485
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
8486
      if (lastComparison != 0) {
8487
        return lastComparison;
8488
      }
8489
      if (isSetItemNumber()) {
8490
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
8491
        if (lastComparison != 0) {
8492
          return lastComparison;
8493
        }
8494
      }
8495
      return 0;
8496
    }
8497
 
8498
    public _Fields fieldForId(int fieldId) {
8499
      return _Fields.findByThriftId(fieldId);
8500
    }
8501
 
8502
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8503
      org.apache.thrift.protocol.TField field;
8504
      iprot.readStructBegin();
8505
      while (true)
8506
      {
8507
        field = iprot.readFieldBegin();
8508
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8509
          break;
8510
        }
8511
        switch (field.id) {
8512
          case 1: // ITEM_NUMBER
8513
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
8514
              this.itemNumber = iprot.readString();
8515
            } else { 
8516
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8517
            }
8518
            break;
8519
          default:
8520
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8521
        }
8522
        iprot.readFieldEnd();
8523
      }
8524
      iprot.readStructEnd();
8525
      validate();
8526
    }
8527
 
8528
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8529
      validate();
8530
 
8531
      oprot.writeStructBegin(STRUCT_DESC);
8532
      if (this.itemNumber != null) {
8533
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
8534
        oprot.writeString(this.itemNumber);
8535
        oprot.writeFieldEnd();
8536
      }
8537
      oprot.writeFieldStop();
8538
      oprot.writeStructEnd();
8539
    }
8540
 
8541
    @Override
8542
    public String toString() {
8543
      StringBuilder sb = new StringBuilder("getItemIds_args(");
8544
      boolean first = true;
8545
 
8546
      sb.append("itemNumber:");
8547
      if (this.itemNumber == null) {
8548
        sb.append("null");
8549
      } else {
8550
        sb.append(this.itemNumber);
8551
      }
8552
      first = false;
8553
      sb.append(")");
8554
      return sb.toString();
8555
    }
8556
 
8557
    public void validate() throws org.apache.thrift.TException {
8558
      // check for required fields
8559
    }
8560
 
8561
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8562
      try {
8563
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8564
      } catch (org.apache.thrift.TException te) {
8565
        throw new java.io.IOException(te);
8566
      }
8567
    }
8568
 
8569
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8570
      try {
8571
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8572
      } catch (org.apache.thrift.TException te) {
8573
        throw new java.io.IOException(te);
8574
      }
8575
    }
8576
 
8577
  }
8578
 
8579
  public static class getItemIds_result implements org.apache.thrift.TBase<getItemIds_result, getItemIds_result._Fields>, java.io.Serializable, Cloneable   {
8580
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_result");
8581
 
8582
    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);
8583
 
8584
    private List<Long> success; // required
8585
 
8586
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8587
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8588
      SUCCESS((short)0, "success");
8589
 
8590
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8591
 
8592
      static {
8593
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8594
          byName.put(field.getFieldName(), field);
8595
        }
8596
      }
8597
 
8598
      /**
8599
       * Find the _Fields constant that matches fieldId, or null if its not found.
8600
       */
8601
      public static _Fields findByThriftId(int fieldId) {
8602
        switch(fieldId) {
8603
          case 0: // SUCCESS
8604
            return SUCCESS;
8605
          default:
8606
            return null;
8607
        }
8608
      }
8609
 
8610
      /**
8611
       * Find the _Fields constant that matches fieldId, throwing an exception
8612
       * if it is not found.
8613
       */
8614
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8615
        _Fields fields = findByThriftId(fieldId);
8616
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8617
        return fields;
8618
      }
8619
 
8620
      /**
8621
       * Find the _Fields constant that matches name, or null if its not found.
8622
       */
8623
      public static _Fields findByName(String name) {
8624
        return byName.get(name);
8625
      }
8626
 
8627
      private final short _thriftId;
8628
      private final String _fieldName;
8629
 
8630
      _Fields(short thriftId, String fieldName) {
8631
        _thriftId = thriftId;
8632
        _fieldName = fieldName;
8633
      }
8634
 
8635
      public short getThriftFieldId() {
8636
        return _thriftId;
8637
      }
8638
 
8639
      public String getFieldName() {
8640
        return _fieldName;
8641
      }
8642
    }
8643
 
8644
    // isset id assignments
8645
 
8646
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8647
    static {
8648
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8649
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8650
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8651
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
8652
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8653
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_result.class, metaDataMap);
8654
    }
8655
 
8656
    public getItemIds_result() {
8657
    }
8658
 
8659
    public getItemIds_result(
8660
      List<Long> success)
8661
    {
8662
      this();
8663
      this.success = success;
8664
    }
8665
 
8666
    /**
8667
     * Performs a deep copy on <i>other</i>.
8668
     */
8669
    public getItemIds_result(getItemIds_result other) {
8670
      if (other.isSetSuccess()) {
8671
        List<Long> __this__success = new ArrayList<Long>();
8672
        for (Long other_element : other.success) {
8673
          __this__success.add(other_element);
8674
        }
8675
        this.success = __this__success;
8676
      }
8677
    }
8678
 
8679
    public getItemIds_result deepCopy() {
8680
      return new getItemIds_result(this);
8681
    }
8682
 
8683
    @Override
8684
    public void clear() {
8685
      this.success = null;
8686
    }
8687
 
8688
    public int getSuccessSize() {
8689
      return (this.success == null) ? 0 : this.success.size();
8690
    }
8691
 
8692
    public java.util.Iterator<Long> getSuccessIterator() {
8693
      return (this.success == null) ? null : this.success.iterator();
8694
    }
8695
 
8696
    public void addToSuccess(long elem) {
8697
      if (this.success == null) {
8698
        this.success = new ArrayList<Long>();
8699
      }
8700
      this.success.add(elem);
8701
    }
8702
 
8703
    public List<Long> getSuccess() {
8704
      return this.success;
8705
    }
8706
 
8707
    public void setSuccess(List<Long> success) {
8708
      this.success = success;
8709
    }
8710
 
8711
    public void unsetSuccess() {
8712
      this.success = null;
8713
    }
8714
 
8715
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8716
    public boolean isSetSuccess() {
8717
      return this.success != null;
8718
    }
8719
 
8720
    public void setSuccessIsSet(boolean value) {
8721
      if (!value) {
8722
        this.success = null;
8723
      }
8724
    }
8725
 
8726
    public void setFieldValue(_Fields field, Object value) {
8727
      switch (field) {
8728
      case SUCCESS:
8729
        if (value == null) {
8730
          unsetSuccess();
8731
        } else {
8732
          setSuccess((List<Long>)value);
8733
        }
8734
        break;
8735
 
8736
      }
8737
    }
8738
 
8739
    public Object getFieldValue(_Fields field) {
8740
      switch (field) {
8741
      case SUCCESS:
8742
        return getSuccess();
8743
 
8744
      }
8745
      throw new IllegalStateException();
8746
    }
8747
 
8748
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8749
    public boolean isSet(_Fields field) {
8750
      if (field == null) {
8751
        throw new IllegalArgumentException();
8752
      }
8753
 
8754
      switch (field) {
8755
      case SUCCESS:
8756
        return isSetSuccess();
8757
      }
8758
      throw new IllegalStateException();
8759
    }
8760
 
8761
    @Override
8762
    public boolean equals(Object that) {
8763
      if (that == null)
8764
        return false;
8765
      if (that instanceof getItemIds_result)
8766
        return this.equals((getItemIds_result)that);
8767
      return false;
8768
    }
8769
 
8770
    public boolean equals(getItemIds_result that) {
8771
      if (that == null)
8772
        return false;
8773
 
8774
      boolean this_present_success = true && this.isSetSuccess();
8775
      boolean that_present_success = true && that.isSetSuccess();
8776
      if (this_present_success || that_present_success) {
8777
        if (!(this_present_success && that_present_success))
8778
          return false;
8779
        if (!this.success.equals(that.success))
8780
          return false;
8781
      }
8782
 
8783
      return true;
8784
    }
8785
 
8786
    @Override
8787
    public int hashCode() {
8788
      return 0;
8789
    }
8790
 
8791
    public int compareTo(getItemIds_result other) {
8792
      if (!getClass().equals(other.getClass())) {
8793
        return getClass().getName().compareTo(other.getClass().getName());
8794
      }
8795
 
8796
      int lastComparison = 0;
8797
      getItemIds_result typedOther = (getItemIds_result)other;
8798
 
8799
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8800
      if (lastComparison != 0) {
8801
        return lastComparison;
8802
      }
8803
      if (isSetSuccess()) {
8804
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8805
        if (lastComparison != 0) {
8806
          return lastComparison;
8807
        }
8808
      }
8809
      return 0;
8810
    }
8811
 
8812
    public _Fields fieldForId(int fieldId) {
8813
      return _Fields.findByThriftId(fieldId);
8814
    }
8815
 
8816
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8817
      org.apache.thrift.protocol.TField field;
8818
      iprot.readStructBegin();
8819
      while (true)
8820
      {
8821
        field = iprot.readFieldBegin();
8822
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
8823
          break;
8824
        }
8825
        switch (field.id) {
8826
          case 0: // SUCCESS
8827
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8828
              {
5361 mandeep.dh 8829
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
8830
                this.success = new ArrayList<Long>(_list4.size);
8831
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
5110 mandeep.dh 8832
                {
5361 mandeep.dh 8833
                  long _elem6; // required
8834
                  _elem6 = iprot.readI64();
8835
                  this.success.add(_elem6);
5110 mandeep.dh 8836
                }
8837
                iprot.readListEnd();
8838
              }
8839
            } else { 
8840
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8841
            }
8842
            break;
8843
          default:
8844
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8845
        }
8846
        iprot.readFieldEnd();
8847
      }
8848
      iprot.readStructEnd();
8849
      validate();
8850
    }
8851
 
8852
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
8853
      oprot.writeStructBegin(STRUCT_DESC);
8854
 
8855
      if (this.isSetSuccess()) {
8856
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8857
        {
8858
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
5361 mandeep.dh 8859
          for (long _iter7 : this.success)
5110 mandeep.dh 8860
          {
5361 mandeep.dh 8861
            oprot.writeI64(_iter7);
5110 mandeep.dh 8862
          }
8863
          oprot.writeListEnd();
8864
        }
8865
        oprot.writeFieldEnd();
8866
      }
8867
      oprot.writeFieldStop();
8868
      oprot.writeStructEnd();
8869
    }
8870
 
8871
    @Override
8872
    public String toString() {
8873
      StringBuilder sb = new StringBuilder("getItemIds_result(");
8874
      boolean first = true;
8875
 
8876
      sb.append("success:");
8877
      if (this.success == null) {
8878
        sb.append("null");
8879
      } else {
8880
        sb.append(this.success);
8881
      }
8882
      first = false;
8883
      sb.append(")");
8884
      return sb.toString();
8885
    }
8886
 
8887
    public void validate() throws org.apache.thrift.TException {
8888
      // check for required fields
8889
    }
8890
 
8891
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8892
      try {
8893
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8894
      } catch (org.apache.thrift.TException te) {
8895
        throw new java.io.IOException(te);
8896
      }
8897
    }
8898
 
8899
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8900
      try {
8901
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8902
      } catch (org.apache.thrift.TException te) {
8903
        throw new java.io.IOException(te);
8904
      }
8905
    }
8906
 
8907
  }
8908
 
5185 mandeep.dh 8909
  public static class getInventoryItemsFromLastScanType_args implements org.apache.thrift.TBase<getInventoryItemsFromLastScanType_args, getInventoryItemsFromLastScanType_args._Fields>, java.io.Serializable, Cloneable   {
8910
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemsFromLastScanType_args");
8911
 
8912
    private static final org.apache.thrift.protocol.TField LAST_SCAN_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("lastScanType", org.apache.thrift.protocol.TType.I32, (short)1);
8913
 
8914
    private ScanType lastScanType; // required
8915
 
8916
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8917
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8918
      /**
8919
       * 
8920
       * @see ScanType
8921
       */
8922
      LAST_SCAN_TYPE((short)1, "lastScanType");
8923
 
8924
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8925
 
8926
      static {
8927
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8928
          byName.put(field.getFieldName(), field);
8929
        }
8930
      }
8931
 
8932
      /**
8933
       * Find the _Fields constant that matches fieldId, or null if its not found.
8934
       */
8935
      public static _Fields findByThriftId(int fieldId) {
8936
        switch(fieldId) {
8937
          case 1: // LAST_SCAN_TYPE
8938
            return LAST_SCAN_TYPE;
8939
          default:
8940
            return null;
8941
        }
8942
      }
8943
 
8944
      /**
8945
       * Find the _Fields constant that matches fieldId, throwing an exception
8946
       * if it is not found.
8947
       */
8948
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8949
        _Fields fields = findByThriftId(fieldId);
8950
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8951
        return fields;
8952
      }
8953
 
8954
      /**
8955
       * Find the _Fields constant that matches name, or null if its not found.
8956
       */
8957
      public static _Fields findByName(String name) {
8958
        return byName.get(name);
8959
      }
8960
 
8961
      private final short _thriftId;
8962
      private final String _fieldName;
8963
 
8964
      _Fields(short thriftId, String fieldName) {
8965
        _thriftId = thriftId;
8966
        _fieldName = fieldName;
8967
      }
8968
 
8969
      public short getThriftFieldId() {
8970
        return _thriftId;
8971
      }
8972
 
8973
      public String getFieldName() {
8974
        return _fieldName;
8975
      }
8976
    }
8977
 
8978
    // isset id assignments
8979
 
8980
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8981
    static {
8982
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8983
      tmpMap.put(_Fields.LAST_SCAN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("lastScanType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8984
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
8985
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8986
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemsFromLastScanType_args.class, metaDataMap);
8987
    }
8988
 
8989
    public getInventoryItemsFromLastScanType_args() {
8990
    }
8991
 
8992
    public getInventoryItemsFromLastScanType_args(
8993
      ScanType lastScanType)
8994
    {
8995
      this();
8996
      this.lastScanType = lastScanType;
8997
    }
8998
 
8999
    /**
9000
     * Performs a deep copy on <i>other</i>.
9001
     */
9002
    public getInventoryItemsFromLastScanType_args(getInventoryItemsFromLastScanType_args other) {
9003
      if (other.isSetLastScanType()) {
9004
        this.lastScanType = other.lastScanType;
9005
      }
9006
    }
9007
 
9008
    public getInventoryItemsFromLastScanType_args deepCopy() {
9009
      return new getInventoryItemsFromLastScanType_args(this);
9010
    }
9011
 
9012
    @Override
9013
    public void clear() {
9014
      this.lastScanType = null;
9015
    }
9016
 
9017
    /**
9018
     * 
9019
     * @see ScanType
9020
     */
9021
    public ScanType getLastScanType() {
9022
      return this.lastScanType;
9023
    }
9024
 
9025
    /**
9026
     * 
9027
     * @see ScanType
9028
     */
9029
    public void setLastScanType(ScanType lastScanType) {
9030
      this.lastScanType = lastScanType;
9031
    }
9032
 
9033
    public void unsetLastScanType() {
9034
      this.lastScanType = null;
9035
    }
9036
 
9037
    /** Returns true if field lastScanType is set (has been assigned a value) and false otherwise */
9038
    public boolean isSetLastScanType() {
9039
      return this.lastScanType != null;
9040
    }
9041
 
9042
    public void setLastScanTypeIsSet(boolean value) {
9043
      if (!value) {
9044
        this.lastScanType = null;
9045
      }
9046
    }
9047
 
9048
    public void setFieldValue(_Fields field, Object value) {
9049
      switch (field) {
9050
      case LAST_SCAN_TYPE:
9051
        if (value == null) {
9052
          unsetLastScanType();
9053
        } else {
9054
          setLastScanType((ScanType)value);
9055
        }
9056
        break;
9057
 
9058
      }
9059
    }
9060
 
9061
    public Object getFieldValue(_Fields field) {
9062
      switch (field) {
9063
      case LAST_SCAN_TYPE:
9064
        return getLastScanType();
9065
 
9066
      }
9067
      throw new IllegalStateException();
9068
    }
9069
 
9070
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9071
    public boolean isSet(_Fields field) {
9072
      if (field == null) {
9073
        throw new IllegalArgumentException();
9074
      }
9075
 
9076
      switch (field) {
9077
      case LAST_SCAN_TYPE:
9078
        return isSetLastScanType();
9079
      }
9080
      throw new IllegalStateException();
9081
    }
9082
 
9083
    @Override
9084
    public boolean equals(Object that) {
9085
      if (that == null)
9086
        return false;
9087
      if (that instanceof getInventoryItemsFromLastScanType_args)
9088
        return this.equals((getInventoryItemsFromLastScanType_args)that);
9089
      return false;
9090
    }
9091
 
9092
    public boolean equals(getInventoryItemsFromLastScanType_args that) {
9093
      if (that == null)
9094
        return false;
9095
 
9096
      boolean this_present_lastScanType = true && this.isSetLastScanType();
9097
      boolean that_present_lastScanType = true && that.isSetLastScanType();
9098
      if (this_present_lastScanType || that_present_lastScanType) {
9099
        if (!(this_present_lastScanType && that_present_lastScanType))
9100
          return false;
9101
        if (!this.lastScanType.equals(that.lastScanType))
9102
          return false;
9103
      }
9104
 
9105
      return true;
9106
    }
9107
 
9108
    @Override
9109
    public int hashCode() {
9110
      return 0;
9111
    }
9112
 
9113
    public int compareTo(getInventoryItemsFromLastScanType_args other) {
9114
      if (!getClass().equals(other.getClass())) {
9115
        return getClass().getName().compareTo(other.getClass().getName());
9116
      }
9117
 
9118
      int lastComparison = 0;
9119
      getInventoryItemsFromLastScanType_args typedOther = (getInventoryItemsFromLastScanType_args)other;
9120
 
9121
      lastComparison = Boolean.valueOf(isSetLastScanType()).compareTo(typedOther.isSetLastScanType());
9122
      if (lastComparison != 0) {
9123
        return lastComparison;
9124
      }
9125
      if (isSetLastScanType()) {
9126
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastScanType, typedOther.lastScanType);
9127
        if (lastComparison != 0) {
9128
          return lastComparison;
9129
        }
9130
      }
9131
      return 0;
9132
    }
9133
 
9134
    public _Fields fieldForId(int fieldId) {
9135
      return _Fields.findByThriftId(fieldId);
9136
    }
9137
 
9138
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9139
      org.apache.thrift.protocol.TField field;
9140
      iprot.readStructBegin();
9141
      while (true)
9142
      {
9143
        field = iprot.readFieldBegin();
9144
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9145
          break;
9146
        }
9147
        switch (field.id) {
9148
          case 1: // LAST_SCAN_TYPE
9149
            if (field.type == org.apache.thrift.protocol.TType.I32) {
9150
              this.lastScanType = ScanType.findByValue(iprot.readI32());
9151
            } else { 
9152
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9153
            }
9154
            break;
9155
          default:
9156
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9157
        }
9158
        iprot.readFieldEnd();
9159
      }
9160
      iprot.readStructEnd();
9161
      validate();
9162
    }
9163
 
9164
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9165
      validate();
9166
 
9167
      oprot.writeStructBegin(STRUCT_DESC);
9168
      if (this.lastScanType != null) {
9169
        oprot.writeFieldBegin(LAST_SCAN_TYPE_FIELD_DESC);
9170
        oprot.writeI32(this.lastScanType.getValue());
9171
        oprot.writeFieldEnd();
9172
      }
9173
      oprot.writeFieldStop();
9174
      oprot.writeStructEnd();
9175
    }
9176
 
9177
    @Override
9178
    public String toString() {
9179
      StringBuilder sb = new StringBuilder("getInventoryItemsFromLastScanType_args(");
9180
      boolean first = true;
9181
 
9182
      sb.append("lastScanType:");
9183
      if (this.lastScanType == null) {
9184
        sb.append("null");
9185
      } else {
9186
        sb.append(this.lastScanType);
9187
      }
9188
      first = false;
9189
      sb.append(")");
9190
      return sb.toString();
9191
    }
9192
 
9193
    public void validate() throws org.apache.thrift.TException {
9194
      // check for required fields
9195
    }
9196
 
9197
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9198
      try {
9199
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9200
      } catch (org.apache.thrift.TException te) {
9201
        throw new java.io.IOException(te);
9202
      }
9203
    }
9204
 
9205
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9206
      try {
9207
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9208
      } catch (org.apache.thrift.TException te) {
9209
        throw new java.io.IOException(te);
9210
      }
9211
    }
9212
 
9213
  }
9214
 
9215
  public static class getInventoryItemsFromLastScanType_result implements org.apache.thrift.TBase<getInventoryItemsFromLastScanType_result, getInventoryItemsFromLastScanType_result._Fields>, java.io.Serializable, Cloneable   {
9216
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemsFromLastScanType_result");
9217
 
9218
    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);
9219
    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);
9220
 
9221
    private List<InventoryItem> success; // required
9222
    private WarehouseServiceException wex; // required
9223
 
9224
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9225
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9226
      SUCCESS((short)0, "success"),
9227
      WEX((short)1, "wex");
9228
 
9229
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9230
 
9231
      static {
9232
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9233
          byName.put(field.getFieldName(), field);
9234
        }
9235
      }
9236
 
9237
      /**
9238
       * Find the _Fields constant that matches fieldId, or null if its not found.
9239
       */
9240
      public static _Fields findByThriftId(int fieldId) {
9241
        switch(fieldId) {
9242
          case 0: // SUCCESS
9243
            return SUCCESS;
9244
          case 1: // WEX
9245
            return WEX;
9246
          default:
9247
            return null;
9248
        }
9249
      }
9250
 
9251
      /**
9252
       * Find the _Fields constant that matches fieldId, throwing an exception
9253
       * if it is not found.
9254
       */
9255
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9256
        _Fields fields = findByThriftId(fieldId);
9257
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9258
        return fields;
9259
      }
9260
 
9261
      /**
9262
       * Find the _Fields constant that matches name, or null if its not found.
9263
       */
9264
      public static _Fields findByName(String name) {
9265
        return byName.get(name);
9266
      }
9267
 
9268
      private final short _thriftId;
9269
      private final String _fieldName;
9270
 
9271
      _Fields(short thriftId, String fieldName) {
9272
        _thriftId = thriftId;
9273
        _fieldName = fieldName;
9274
      }
9275
 
9276
      public short getThriftFieldId() {
9277
        return _thriftId;
9278
      }
9279
 
9280
      public String getFieldName() {
9281
        return _fieldName;
9282
      }
9283
    }
9284
 
9285
    // isset id assignments
9286
 
9287
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9288
    static {
9289
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9290
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9291
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9292
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
9293
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9294
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9295
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9296
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemsFromLastScanType_result.class, metaDataMap);
9297
    }
9298
 
9299
    public getInventoryItemsFromLastScanType_result() {
9300
    }
9301
 
9302
    public getInventoryItemsFromLastScanType_result(
9303
      List<InventoryItem> success,
9304
      WarehouseServiceException wex)
9305
    {
9306
      this();
9307
      this.success = success;
9308
      this.wex = wex;
9309
    }
9310
 
9311
    /**
9312
     * Performs a deep copy on <i>other</i>.
9313
     */
9314
    public getInventoryItemsFromLastScanType_result(getInventoryItemsFromLastScanType_result other) {
9315
      if (other.isSetSuccess()) {
9316
        List<InventoryItem> __this__success = new ArrayList<InventoryItem>();
9317
        for (InventoryItem other_element : other.success) {
9318
          __this__success.add(new InventoryItem(other_element));
9319
        }
9320
        this.success = __this__success;
9321
      }
9322
      if (other.isSetWex()) {
9323
        this.wex = new WarehouseServiceException(other.wex);
9324
      }
9325
    }
9326
 
9327
    public getInventoryItemsFromLastScanType_result deepCopy() {
9328
      return new getInventoryItemsFromLastScanType_result(this);
9329
    }
9330
 
9331
    @Override
9332
    public void clear() {
9333
      this.success = null;
9334
      this.wex = null;
9335
    }
9336
 
9337
    public int getSuccessSize() {
9338
      return (this.success == null) ? 0 : this.success.size();
9339
    }
9340
 
9341
    public java.util.Iterator<InventoryItem> getSuccessIterator() {
9342
      return (this.success == null) ? null : this.success.iterator();
9343
    }
9344
 
9345
    public void addToSuccess(InventoryItem elem) {
9346
      if (this.success == null) {
9347
        this.success = new ArrayList<InventoryItem>();
9348
      }
9349
      this.success.add(elem);
9350
    }
9351
 
9352
    public List<InventoryItem> getSuccess() {
9353
      return this.success;
9354
    }
9355
 
9356
    public void setSuccess(List<InventoryItem> success) {
9357
      this.success = success;
9358
    }
9359
 
9360
    public void unsetSuccess() {
9361
      this.success = null;
9362
    }
9363
 
9364
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9365
    public boolean isSetSuccess() {
9366
      return this.success != null;
9367
    }
9368
 
9369
    public void setSuccessIsSet(boolean value) {
9370
      if (!value) {
9371
        this.success = null;
9372
      }
9373
    }
9374
 
9375
    public WarehouseServiceException getWex() {
9376
      return this.wex;
9377
    }
9378
 
9379
    public void setWex(WarehouseServiceException wex) {
9380
      this.wex = wex;
9381
    }
9382
 
9383
    public void unsetWex() {
9384
      this.wex = null;
9385
    }
9386
 
9387
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
9388
    public boolean isSetWex() {
9389
      return this.wex != null;
9390
    }
9391
 
9392
    public void setWexIsSet(boolean value) {
9393
      if (!value) {
9394
        this.wex = null;
9395
      }
9396
    }
9397
 
9398
    public void setFieldValue(_Fields field, Object value) {
9399
      switch (field) {
9400
      case SUCCESS:
9401
        if (value == null) {
9402
          unsetSuccess();
9403
        } else {
9404
          setSuccess((List<InventoryItem>)value);
9405
        }
9406
        break;
9407
 
9408
      case WEX:
9409
        if (value == null) {
9410
          unsetWex();
9411
        } else {
9412
          setWex((WarehouseServiceException)value);
9413
        }
9414
        break;
9415
 
9416
      }
9417
    }
9418
 
9419
    public Object getFieldValue(_Fields field) {
9420
      switch (field) {
9421
      case SUCCESS:
9422
        return getSuccess();
9423
 
9424
      case WEX:
9425
        return getWex();
9426
 
9427
      }
9428
      throw new IllegalStateException();
9429
    }
9430
 
9431
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9432
    public boolean isSet(_Fields field) {
9433
      if (field == null) {
9434
        throw new IllegalArgumentException();
9435
      }
9436
 
9437
      switch (field) {
9438
      case SUCCESS:
9439
        return isSetSuccess();
9440
      case WEX:
9441
        return isSetWex();
9442
      }
9443
      throw new IllegalStateException();
9444
    }
9445
 
9446
    @Override
9447
    public boolean equals(Object that) {
9448
      if (that == null)
9449
        return false;
9450
      if (that instanceof getInventoryItemsFromLastScanType_result)
9451
        return this.equals((getInventoryItemsFromLastScanType_result)that);
9452
      return false;
9453
    }
9454
 
9455
    public boolean equals(getInventoryItemsFromLastScanType_result that) {
9456
      if (that == null)
9457
        return false;
9458
 
9459
      boolean this_present_success = true && this.isSetSuccess();
9460
      boolean that_present_success = true && that.isSetSuccess();
9461
      if (this_present_success || that_present_success) {
9462
        if (!(this_present_success && that_present_success))
9463
          return false;
9464
        if (!this.success.equals(that.success))
9465
          return false;
9466
      }
9467
 
9468
      boolean this_present_wex = true && this.isSetWex();
9469
      boolean that_present_wex = true && that.isSetWex();
9470
      if (this_present_wex || that_present_wex) {
9471
        if (!(this_present_wex && that_present_wex))
9472
          return false;
9473
        if (!this.wex.equals(that.wex))
9474
          return false;
9475
      }
9476
 
9477
      return true;
9478
    }
9479
 
9480
    @Override
9481
    public int hashCode() {
9482
      return 0;
9483
    }
9484
 
9485
    public int compareTo(getInventoryItemsFromLastScanType_result other) {
9486
      if (!getClass().equals(other.getClass())) {
9487
        return getClass().getName().compareTo(other.getClass().getName());
9488
      }
9489
 
9490
      int lastComparison = 0;
9491
      getInventoryItemsFromLastScanType_result typedOther = (getInventoryItemsFromLastScanType_result)other;
9492
 
9493
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9494
      if (lastComparison != 0) {
9495
        return lastComparison;
9496
      }
9497
      if (isSetSuccess()) {
9498
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9499
        if (lastComparison != 0) {
9500
          return lastComparison;
9501
        }
9502
      }
9503
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
9504
      if (lastComparison != 0) {
9505
        return lastComparison;
9506
      }
9507
      if (isSetWex()) {
9508
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
9509
        if (lastComparison != 0) {
9510
          return lastComparison;
9511
        }
9512
      }
9513
      return 0;
9514
    }
9515
 
9516
    public _Fields fieldForId(int fieldId) {
9517
      return _Fields.findByThriftId(fieldId);
9518
    }
9519
 
9520
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9521
      org.apache.thrift.protocol.TField field;
9522
      iprot.readStructBegin();
9523
      while (true)
9524
      {
9525
        field = iprot.readFieldBegin();
9526
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9527
          break;
9528
        }
9529
        switch (field.id) {
9530
          case 0: // SUCCESS
9531
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9532
              {
5361 mandeep.dh 9533
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
9534
                this.success = new ArrayList<InventoryItem>(_list8.size);
9535
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
5185 mandeep.dh 9536
                {
5361 mandeep.dh 9537
                  InventoryItem _elem10; // required
9538
                  _elem10 = new InventoryItem();
9539
                  _elem10.read(iprot);
9540
                  this.success.add(_elem10);
5185 mandeep.dh 9541
                }
9542
                iprot.readListEnd();
9543
              }
9544
            } else { 
9545
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9546
            }
9547
            break;
9548
          case 1: // WEX
9549
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9550
              this.wex = new WarehouseServiceException();
9551
              this.wex.read(iprot);
9552
            } else { 
9553
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9554
            }
9555
            break;
9556
          default:
9557
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9558
        }
9559
        iprot.readFieldEnd();
9560
      }
9561
      iprot.readStructEnd();
9562
      validate();
9563
    }
9564
 
9565
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9566
      oprot.writeStructBegin(STRUCT_DESC);
9567
 
9568
      if (this.isSetSuccess()) {
9569
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9570
        {
9571
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
5361 mandeep.dh 9572
          for (InventoryItem _iter11 : this.success)
5185 mandeep.dh 9573
          {
5361 mandeep.dh 9574
            _iter11.write(oprot);
5185 mandeep.dh 9575
          }
9576
          oprot.writeListEnd();
9577
        }
9578
        oprot.writeFieldEnd();
9579
      } else if (this.isSetWex()) {
9580
        oprot.writeFieldBegin(WEX_FIELD_DESC);
9581
        this.wex.write(oprot);
9582
        oprot.writeFieldEnd();
9583
      }
9584
      oprot.writeFieldStop();
9585
      oprot.writeStructEnd();
9586
    }
9587
 
9588
    @Override
9589
    public String toString() {
9590
      StringBuilder sb = new StringBuilder("getInventoryItemsFromLastScanType_result(");
9591
      boolean first = true;
9592
 
9593
      sb.append("success:");
9594
      if (this.success == null) {
9595
        sb.append("null");
9596
      } else {
9597
        sb.append(this.success);
9598
      }
9599
      first = false;
9600
      if (!first) sb.append(", ");
9601
      sb.append("wex:");
9602
      if (this.wex == null) {
9603
        sb.append("null");
9604
      } else {
9605
        sb.append(this.wex);
9606
      }
9607
      first = false;
9608
      sb.append(")");
9609
      return sb.toString();
9610
    }
9611
 
9612
    public void validate() throws org.apache.thrift.TException {
9613
      // check for required fields
9614
    }
9615
 
9616
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9617
      try {
9618
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9619
      } catch (org.apache.thrift.TException te) {
9620
        throw new java.io.IOException(te);
9621
      }
9622
    }
9623
 
9624
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9625
      try {
9626
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9627
      } catch (org.apache.thrift.TException te) {
9628
        throw new java.io.IOException(te);
9629
      }
9630
    }
9631
 
9632
  }
9633
 
9634
  public static class getInventoryItemFromId_args implements org.apache.thrift.TBase<getInventoryItemFromId_args, getInventoryItemFromId_args._Fields>, java.io.Serializable, Cloneable   {
9635
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromId_args");
9636
 
9637
    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);
9638
 
9639
    private long inventoryItemId; // required
9640
 
9641
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9642
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9643
      INVENTORY_ITEM_ID((short)1, "inventoryItemId");
9644
 
9645
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9646
 
9647
      static {
9648
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9649
          byName.put(field.getFieldName(), field);
9650
        }
9651
      }
9652
 
9653
      /**
9654
       * Find the _Fields constant that matches fieldId, or null if its not found.
9655
       */
9656
      public static _Fields findByThriftId(int fieldId) {
9657
        switch(fieldId) {
9658
          case 1: // INVENTORY_ITEM_ID
9659
            return INVENTORY_ITEM_ID;
9660
          default:
9661
            return null;
9662
        }
9663
      }
9664
 
9665
      /**
9666
       * Find the _Fields constant that matches fieldId, throwing an exception
9667
       * if it is not found.
9668
       */
9669
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9670
        _Fields fields = findByThriftId(fieldId);
9671
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9672
        return fields;
9673
      }
9674
 
9675
      /**
9676
       * Find the _Fields constant that matches name, or null if its not found.
9677
       */
9678
      public static _Fields findByName(String name) {
9679
        return byName.get(name);
9680
      }
9681
 
9682
      private final short _thriftId;
9683
      private final String _fieldName;
9684
 
9685
      _Fields(short thriftId, String fieldName) {
9686
        _thriftId = thriftId;
9687
        _fieldName = fieldName;
9688
      }
9689
 
9690
      public short getThriftFieldId() {
9691
        return _thriftId;
9692
      }
9693
 
9694
      public String getFieldName() {
9695
        return _fieldName;
9696
      }
9697
    }
9698
 
9699
    // isset id assignments
9700
    private static final int __INVENTORYITEMID_ISSET_ID = 0;
9701
    private BitSet __isset_bit_vector = new BitSet(1);
9702
 
9703
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9704
    static {
9705
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9706
      tmpMap.put(_Fields.INVENTORY_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("inventoryItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9707
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9708
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9709
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromId_args.class, metaDataMap);
9710
    }
9711
 
9712
    public getInventoryItemFromId_args() {
9713
    }
9714
 
9715
    public getInventoryItemFromId_args(
9716
      long inventoryItemId)
9717
    {
9718
      this();
9719
      this.inventoryItemId = inventoryItemId;
9720
      setInventoryItemIdIsSet(true);
9721
    }
9722
 
9723
    /**
9724
     * Performs a deep copy on <i>other</i>.
9725
     */
9726
    public getInventoryItemFromId_args(getInventoryItemFromId_args other) {
9727
      __isset_bit_vector.clear();
9728
      __isset_bit_vector.or(other.__isset_bit_vector);
9729
      this.inventoryItemId = other.inventoryItemId;
9730
    }
9731
 
9732
    public getInventoryItemFromId_args deepCopy() {
9733
      return new getInventoryItemFromId_args(this);
9734
    }
9735
 
9736
    @Override
9737
    public void clear() {
9738
      setInventoryItemIdIsSet(false);
9739
      this.inventoryItemId = 0;
9740
    }
9741
 
9742
    public long getInventoryItemId() {
9743
      return this.inventoryItemId;
9744
    }
9745
 
9746
    public void setInventoryItemId(long inventoryItemId) {
9747
      this.inventoryItemId = inventoryItemId;
9748
      setInventoryItemIdIsSet(true);
9749
    }
9750
 
9751
    public void unsetInventoryItemId() {
9752
      __isset_bit_vector.clear(__INVENTORYITEMID_ISSET_ID);
9753
    }
9754
 
9755
    /** Returns true if field inventoryItemId is set (has been assigned a value) and false otherwise */
9756
    public boolean isSetInventoryItemId() {
9757
      return __isset_bit_vector.get(__INVENTORYITEMID_ISSET_ID);
9758
    }
9759
 
9760
    public void setInventoryItemIdIsSet(boolean value) {
9761
      __isset_bit_vector.set(__INVENTORYITEMID_ISSET_ID, value);
9762
    }
9763
 
9764
    public void setFieldValue(_Fields field, Object value) {
9765
      switch (field) {
9766
      case INVENTORY_ITEM_ID:
9767
        if (value == null) {
9768
          unsetInventoryItemId();
9769
        } else {
9770
          setInventoryItemId((Long)value);
9771
        }
9772
        break;
9773
 
9774
      }
9775
    }
9776
 
9777
    public Object getFieldValue(_Fields field) {
9778
      switch (field) {
9779
      case INVENTORY_ITEM_ID:
9780
        return Long.valueOf(getInventoryItemId());
9781
 
9782
      }
9783
      throw new IllegalStateException();
9784
    }
9785
 
9786
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9787
    public boolean isSet(_Fields field) {
9788
      if (field == null) {
9789
        throw new IllegalArgumentException();
9790
      }
9791
 
9792
      switch (field) {
9793
      case INVENTORY_ITEM_ID:
9794
        return isSetInventoryItemId();
9795
      }
9796
      throw new IllegalStateException();
9797
    }
9798
 
9799
    @Override
9800
    public boolean equals(Object that) {
9801
      if (that == null)
9802
        return false;
9803
      if (that instanceof getInventoryItemFromId_args)
9804
        return this.equals((getInventoryItemFromId_args)that);
9805
      return false;
9806
    }
9807
 
9808
    public boolean equals(getInventoryItemFromId_args that) {
9809
      if (that == null)
9810
        return false;
9811
 
9812
      boolean this_present_inventoryItemId = true;
9813
      boolean that_present_inventoryItemId = true;
9814
      if (this_present_inventoryItemId || that_present_inventoryItemId) {
9815
        if (!(this_present_inventoryItemId && that_present_inventoryItemId))
9816
          return false;
9817
        if (this.inventoryItemId != that.inventoryItemId)
9818
          return false;
9819
      }
9820
 
9821
      return true;
9822
    }
9823
 
9824
    @Override
9825
    public int hashCode() {
9826
      return 0;
9827
    }
9828
 
9829
    public int compareTo(getInventoryItemFromId_args other) {
9830
      if (!getClass().equals(other.getClass())) {
9831
        return getClass().getName().compareTo(other.getClass().getName());
9832
      }
9833
 
9834
      int lastComparison = 0;
9835
      getInventoryItemFromId_args typedOther = (getInventoryItemFromId_args)other;
9836
 
9837
      lastComparison = Boolean.valueOf(isSetInventoryItemId()).compareTo(typedOther.isSetInventoryItemId());
9838
      if (lastComparison != 0) {
9839
        return lastComparison;
9840
      }
9841
      if (isSetInventoryItemId()) {
9842
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItemId, typedOther.inventoryItemId);
9843
        if (lastComparison != 0) {
9844
          return lastComparison;
9845
        }
9846
      }
9847
      return 0;
9848
    }
9849
 
9850
    public _Fields fieldForId(int fieldId) {
9851
      return _Fields.findByThriftId(fieldId);
9852
    }
9853
 
9854
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9855
      org.apache.thrift.protocol.TField field;
9856
      iprot.readStructBegin();
9857
      while (true)
9858
      {
9859
        field = iprot.readFieldBegin();
9860
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9861
          break;
9862
        }
9863
        switch (field.id) {
9864
          case 1: // INVENTORY_ITEM_ID
9865
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9866
              this.inventoryItemId = iprot.readI64();
9867
              setInventoryItemIdIsSet(true);
9868
            } else { 
9869
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9870
            }
9871
            break;
9872
          default:
9873
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9874
        }
9875
        iprot.readFieldEnd();
9876
      }
9877
      iprot.readStructEnd();
9878
      validate();
9879
    }
9880
 
9881
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9882
      validate();
9883
 
9884
      oprot.writeStructBegin(STRUCT_DESC);
9885
      oprot.writeFieldBegin(INVENTORY_ITEM_ID_FIELD_DESC);
9886
      oprot.writeI64(this.inventoryItemId);
9887
      oprot.writeFieldEnd();
9888
      oprot.writeFieldStop();
9889
      oprot.writeStructEnd();
9890
    }
9891
 
9892
    @Override
9893
    public String toString() {
9894
      StringBuilder sb = new StringBuilder("getInventoryItemFromId_args(");
9895
      boolean first = true;
9896
 
9897
      sb.append("inventoryItemId:");
9898
      sb.append(this.inventoryItemId);
9899
      first = false;
9900
      sb.append(")");
9901
      return sb.toString();
9902
    }
9903
 
9904
    public void validate() throws org.apache.thrift.TException {
9905
      // check for required fields
9906
    }
9907
 
9908
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9909
      try {
9910
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9911
      } catch (org.apache.thrift.TException te) {
9912
        throw new java.io.IOException(te);
9913
      }
9914
    }
9915
 
9916
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9917
      try {
5372 mandeep.dh 9918
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9919
        __isset_bit_vector = new BitSet(1);
5185 mandeep.dh 9920
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9921
      } catch (org.apache.thrift.TException te) {
9922
        throw new java.io.IOException(te);
9923
      }
9924
    }
9925
 
9926
  }
9927
 
9928
  public static class getInventoryItemFromId_result implements org.apache.thrift.TBase<getInventoryItemFromId_result, getInventoryItemFromId_result._Fields>, java.io.Serializable, Cloneable   {
9929
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromId_result");
9930
 
9931
    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);
9932
    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);
9933
 
9934
    private InventoryItem success; // required
9935
    private WarehouseServiceException wex; // required
9936
 
9937
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9938
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9939
      SUCCESS((short)0, "success"),
9940
      WEX((short)1, "wex");
9941
 
9942
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9943
 
9944
      static {
9945
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9946
          byName.put(field.getFieldName(), field);
9947
        }
9948
      }
9949
 
9950
      /**
9951
       * Find the _Fields constant that matches fieldId, or null if its not found.
9952
       */
9953
      public static _Fields findByThriftId(int fieldId) {
9954
        switch(fieldId) {
9955
          case 0: // SUCCESS
9956
            return SUCCESS;
9957
          case 1: // WEX
9958
            return WEX;
9959
          default:
9960
            return null;
9961
        }
9962
      }
9963
 
9964
      /**
9965
       * Find the _Fields constant that matches fieldId, throwing an exception
9966
       * if it is not found.
9967
       */
9968
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9969
        _Fields fields = findByThriftId(fieldId);
9970
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9971
        return fields;
9972
      }
9973
 
9974
      /**
9975
       * Find the _Fields constant that matches name, or null if its not found.
9976
       */
9977
      public static _Fields findByName(String name) {
9978
        return byName.get(name);
9979
      }
9980
 
9981
      private final short _thriftId;
9982
      private final String _fieldName;
9983
 
9984
      _Fields(short thriftId, String fieldName) {
9985
        _thriftId = thriftId;
9986
        _fieldName = fieldName;
9987
      }
9988
 
9989
      public short getThriftFieldId() {
9990
        return _thriftId;
9991
      }
9992
 
9993
      public String getFieldName() {
9994
        return _fieldName;
9995
      }
9996
    }
9997
 
9998
    // isset id assignments
9999
 
10000
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10001
    static {
10002
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10003
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10004
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
10005
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10006
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10007
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10008
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromId_result.class, metaDataMap);
10009
    }
10010
 
10011
    public getInventoryItemFromId_result() {
10012
    }
10013
 
10014
    public getInventoryItemFromId_result(
10015
      InventoryItem success,
10016
      WarehouseServiceException wex)
10017
    {
10018
      this();
10019
      this.success = success;
10020
      this.wex = wex;
10021
    }
10022
 
10023
    /**
10024
     * Performs a deep copy on <i>other</i>.
10025
     */
10026
    public getInventoryItemFromId_result(getInventoryItemFromId_result other) {
10027
      if (other.isSetSuccess()) {
10028
        this.success = new InventoryItem(other.success);
10029
      }
10030
      if (other.isSetWex()) {
10031
        this.wex = new WarehouseServiceException(other.wex);
10032
      }
10033
    }
10034
 
10035
    public getInventoryItemFromId_result deepCopy() {
10036
      return new getInventoryItemFromId_result(this);
10037
    }
10038
 
10039
    @Override
10040
    public void clear() {
10041
      this.success = null;
10042
      this.wex = null;
10043
    }
10044
 
10045
    public InventoryItem getSuccess() {
10046
      return this.success;
10047
    }
10048
 
10049
    public void setSuccess(InventoryItem success) {
10050
      this.success = success;
10051
    }
10052
 
10053
    public void unsetSuccess() {
10054
      this.success = null;
10055
    }
10056
 
10057
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10058
    public boolean isSetSuccess() {
10059
      return this.success != null;
10060
    }
10061
 
10062
    public void setSuccessIsSet(boolean value) {
10063
      if (!value) {
10064
        this.success = null;
10065
      }
10066
    }
10067
 
10068
    public WarehouseServiceException getWex() {
10069
      return this.wex;
10070
    }
10071
 
10072
    public void setWex(WarehouseServiceException wex) {
10073
      this.wex = wex;
10074
    }
10075
 
10076
    public void unsetWex() {
10077
      this.wex = null;
10078
    }
10079
 
10080
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
10081
    public boolean isSetWex() {
10082
      return this.wex != null;
10083
    }
10084
 
10085
    public void setWexIsSet(boolean value) {
10086
      if (!value) {
10087
        this.wex = null;
10088
      }
10089
    }
10090
 
10091
    public void setFieldValue(_Fields field, Object value) {
10092
      switch (field) {
10093
      case SUCCESS:
10094
        if (value == null) {
10095
          unsetSuccess();
10096
        } else {
10097
          setSuccess((InventoryItem)value);
10098
        }
10099
        break;
10100
 
10101
      case WEX:
10102
        if (value == null) {
10103
          unsetWex();
10104
        } else {
10105
          setWex((WarehouseServiceException)value);
10106
        }
10107
        break;
10108
 
10109
      }
10110
    }
10111
 
10112
    public Object getFieldValue(_Fields field) {
10113
      switch (field) {
10114
      case SUCCESS:
10115
        return getSuccess();
10116
 
10117
      case WEX:
10118
        return getWex();
10119
 
10120
      }
10121
      throw new IllegalStateException();
10122
    }
10123
 
10124
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10125
    public boolean isSet(_Fields field) {
10126
      if (field == null) {
10127
        throw new IllegalArgumentException();
10128
      }
10129
 
10130
      switch (field) {
10131
      case SUCCESS:
10132
        return isSetSuccess();
10133
      case WEX:
10134
        return isSetWex();
10135
      }
10136
      throw new IllegalStateException();
10137
    }
10138
 
10139
    @Override
10140
    public boolean equals(Object that) {
10141
      if (that == null)
10142
        return false;
10143
      if (that instanceof getInventoryItemFromId_result)
10144
        return this.equals((getInventoryItemFromId_result)that);
10145
      return false;
10146
    }
10147
 
10148
    public boolean equals(getInventoryItemFromId_result that) {
10149
      if (that == null)
10150
        return false;
10151
 
10152
      boolean this_present_success = true && this.isSetSuccess();
10153
      boolean that_present_success = true && that.isSetSuccess();
10154
      if (this_present_success || that_present_success) {
10155
        if (!(this_present_success && that_present_success))
10156
          return false;
10157
        if (!this.success.equals(that.success))
10158
          return false;
10159
      }
10160
 
10161
      boolean this_present_wex = true && this.isSetWex();
10162
      boolean that_present_wex = true && that.isSetWex();
10163
      if (this_present_wex || that_present_wex) {
10164
        if (!(this_present_wex && that_present_wex))
10165
          return false;
10166
        if (!this.wex.equals(that.wex))
10167
          return false;
10168
      }
10169
 
10170
      return true;
10171
    }
10172
 
10173
    @Override
10174
    public int hashCode() {
10175
      return 0;
10176
    }
10177
 
10178
    public int compareTo(getInventoryItemFromId_result other) {
10179
      if (!getClass().equals(other.getClass())) {
10180
        return getClass().getName().compareTo(other.getClass().getName());
10181
      }
10182
 
10183
      int lastComparison = 0;
10184
      getInventoryItemFromId_result typedOther = (getInventoryItemFromId_result)other;
10185
 
10186
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10187
      if (lastComparison != 0) {
10188
        return lastComparison;
10189
      }
10190
      if (isSetSuccess()) {
10191
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10192
        if (lastComparison != 0) {
10193
          return lastComparison;
10194
        }
10195
      }
10196
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
10197
      if (lastComparison != 0) {
10198
        return lastComparison;
10199
      }
10200
      if (isSetWex()) {
10201
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
10202
        if (lastComparison != 0) {
10203
          return lastComparison;
10204
        }
10205
      }
10206
      return 0;
10207
    }
10208
 
10209
    public _Fields fieldForId(int fieldId) {
10210
      return _Fields.findByThriftId(fieldId);
10211
    }
10212
 
10213
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10214
      org.apache.thrift.protocol.TField field;
10215
      iprot.readStructBegin();
10216
      while (true)
10217
      {
10218
        field = iprot.readFieldBegin();
10219
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10220
          break;
10221
        }
10222
        switch (field.id) {
10223
          case 0: // SUCCESS
10224
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10225
              this.success = new InventoryItem();
10226
              this.success.read(iprot);
10227
            } else { 
10228
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10229
            }
10230
            break;
10231
          case 1: // WEX
10232
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10233
              this.wex = new WarehouseServiceException();
10234
              this.wex.read(iprot);
10235
            } else { 
10236
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10237
            }
10238
            break;
10239
          default:
10240
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10241
        }
10242
        iprot.readFieldEnd();
10243
      }
10244
      iprot.readStructEnd();
10245
      validate();
10246
    }
10247
 
10248
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10249
      oprot.writeStructBegin(STRUCT_DESC);
10250
 
10251
      if (this.isSetSuccess()) {
10252
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10253
        this.success.write(oprot);
10254
        oprot.writeFieldEnd();
10255
      } else if (this.isSetWex()) {
10256
        oprot.writeFieldBegin(WEX_FIELD_DESC);
10257
        this.wex.write(oprot);
10258
        oprot.writeFieldEnd();
10259
      }
10260
      oprot.writeFieldStop();
10261
      oprot.writeStructEnd();
10262
    }
10263
 
10264
    @Override
10265
    public String toString() {
10266
      StringBuilder sb = new StringBuilder("getInventoryItemFromId_result(");
10267
      boolean first = true;
10268
 
10269
      sb.append("success:");
10270
      if (this.success == null) {
10271
        sb.append("null");
10272
      } else {
10273
        sb.append(this.success);
10274
      }
10275
      first = false;
10276
      if (!first) sb.append(", ");
10277
      sb.append("wex:");
10278
      if (this.wex == null) {
10279
        sb.append("null");
10280
      } else {
10281
        sb.append(this.wex);
10282
      }
10283
      first = false;
10284
      sb.append(")");
10285
      return sb.toString();
10286
    }
10287
 
10288
    public void validate() throws org.apache.thrift.TException {
10289
      // check for required fields
10290
    }
10291
 
10292
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10293
      try {
10294
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10295
      } catch (org.apache.thrift.TException te) {
10296
        throw new java.io.IOException(te);
10297
      }
10298
    }
10299
 
10300
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10301
      try {
10302
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10303
      } catch (org.apache.thrift.TException te) {
10304
        throw new java.io.IOException(te);
10305
      }
10306
    }
10307
 
10308
  }
10309
 
5372 mandeep.dh 10310
  public static class getPurchaseScans_args implements org.apache.thrift.TBase<getPurchaseScans_args, getPurchaseScans_args._Fields>, java.io.Serializable, Cloneable   {
10311
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScans_args");
10312
 
10313
    private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.I64, (short)1);
10314
    private static final org.apache.thrift.protocol.TField END_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("endDate", org.apache.thrift.protocol.TType.I64, (short)2);
10315
 
10316
    private long startDate; // required
10317
    private long endDate; // required
10318
 
10319
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10320
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10321
      START_DATE((short)1, "startDate"),
10322
      END_DATE((short)2, "endDate");
10323
 
10324
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10325
 
10326
      static {
10327
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10328
          byName.put(field.getFieldName(), field);
10329
        }
10330
      }
10331
 
10332
      /**
10333
       * Find the _Fields constant that matches fieldId, or null if its not found.
10334
       */
10335
      public static _Fields findByThriftId(int fieldId) {
10336
        switch(fieldId) {
10337
          case 1: // START_DATE
10338
            return START_DATE;
10339
          case 2: // END_DATE
10340
            return END_DATE;
10341
          default:
10342
            return null;
10343
        }
10344
      }
10345
 
10346
      /**
10347
       * Find the _Fields constant that matches fieldId, throwing an exception
10348
       * if it is not found.
10349
       */
10350
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10351
        _Fields fields = findByThriftId(fieldId);
10352
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10353
        return fields;
10354
      }
10355
 
10356
      /**
10357
       * Find the _Fields constant that matches name, or null if its not found.
10358
       */
10359
      public static _Fields findByName(String name) {
10360
        return byName.get(name);
10361
      }
10362
 
10363
      private final short _thriftId;
10364
      private final String _fieldName;
10365
 
10366
      _Fields(short thriftId, String fieldName) {
10367
        _thriftId = thriftId;
10368
        _fieldName = fieldName;
10369
      }
10370
 
10371
      public short getThriftFieldId() {
10372
        return _thriftId;
10373
      }
10374
 
10375
      public String getFieldName() {
10376
        return _fieldName;
10377
      }
10378
    }
10379
 
10380
    // isset id assignments
10381
    private static final int __STARTDATE_ISSET_ID = 0;
10382
    private static final int __ENDDATE_ISSET_ID = 1;
10383
    private BitSet __isset_bit_vector = new BitSet(2);
10384
 
10385
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10386
    static {
10387
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10388
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10389
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10390
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10391
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10392
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10393
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScans_args.class, metaDataMap);
10394
    }
10395
 
10396
    public getPurchaseScans_args() {
10397
    }
10398
 
10399
    public getPurchaseScans_args(
10400
      long startDate,
10401
      long endDate)
10402
    {
10403
      this();
10404
      this.startDate = startDate;
10405
      setStartDateIsSet(true);
10406
      this.endDate = endDate;
10407
      setEndDateIsSet(true);
10408
    }
10409
 
10410
    /**
10411
     * Performs a deep copy on <i>other</i>.
10412
     */
10413
    public getPurchaseScans_args(getPurchaseScans_args other) {
10414
      __isset_bit_vector.clear();
10415
      __isset_bit_vector.or(other.__isset_bit_vector);
10416
      this.startDate = other.startDate;
10417
      this.endDate = other.endDate;
10418
    }
10419
 
10420
    public getPurchaseScans_args deepCopy() {
10421
      return new getPurchaseScans_args(this);
10422
    }
10423
 
10424
    @Override
10425
    public void clear() {
10426
      setStartDateIsSet(false);
10427
      this.startDate = 0;
10428
      setEndDateIsSet(false);
10429
      this.endDate = 0;
10430
    }
10431
 
10432
    public long getStartDate() {
10433
      return this.startDate;
10434
    }
10435
 
10436
    public void setStartDate(long startDate) {
10437
      this.startDate = startDate;
10438
      setStartDateIsSet(true);
10439
    }
10440
 
10441
    public void unsetStartDate() {
10442
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
10443
    }
10444
 
10445
    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
10446
    public boolean isSetStartDate() {
10447
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
10448
    }
10449
 
10450
    public void setStartDateIsSet(boolean value) {
10451
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
10452
    }
10453
 
10454
    public long getEndDate() {
10455
      return this.endDate;
10456
    }
10457
 
10458
    public void setEndDate(long endDate) {
10459
      this.endDate = endDate;
10460
      setEndDateIsSet(true);
10461
    }
10462
 
10463
    public void unsetEndDate() {
10464
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
10465
    }
10466
 
10467
    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
10468
    public boolean isSetEndDate() {
10469
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
10470
    }
10471
 
10472
    public void setEndDateIsSet(boolean value) {
10473
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
10474
    }
10475
 
10476
    public void setFieldValue(_Fields field, Object value) {
10477
      switch (field) {
10478
      case START_DATE:
10479
        if (value == null) {
10480
          unsetStartDate();
10481
        } else {
10482
          setStartDate((Long)value);
10483
        }
10484
        break;
10485
 
10486
      case END_DATE:
10487
        if (value == null) {
10488
          unsetEndDate();
10489
        } else {
10490
          setEndDate((Long)value);
10491
        }
10492
        break;
10493
 
10494
      }
10495
    }
10496
 
10497
    public Object getFieldValue(_Fields field) {
10498
      switch (field) {
10499
      case START_DATE:
10500
        return Long.valueOf(getStartDate());
10501
 
10502
      case END_DATE:
10503
        return Long.valueOf(getEndDate());
10504
 
10505
      }
10506
      throw new IllegalStateException();
10507
    }
10508
 
10509
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10510
    public boolean isSet(_Fields field) {
10511
      if (field == null) {
10512
        throw new IllegalArgumentException();
10513
      }
10514
 
10515
      switch (field) {
10516
      case START_DATE:
10517
        return isSetStartDate();
10518
      case END_DATE:
10519
        return isSetEndDate();
10520
      }
10521
      throw new IllegalStateException();
10522
    }
10523
 
10524
    @Override
10525
    public boolean equals(Object that) {
10526
      if (that == null)
10527
        return false;
10528
      if (that instanceof getPurchaseScans_args)
10529
        return this.equals((getPurchaseScans_args)that);
10530
      return false;
10531
    }
10532
 
10533
    public boolean equals(getPurchaseScans_args that) {
10534
      if (that == null)
10535
        return false;
10536
 
10537
      boolean this_present_startDate = true;
10538
      boolean that_present_startDate = true;
10539
      if (this_present_startDate || that_present_startDate) {
10540
        if (!(this_present_startDate && that_present_startDate))
10541
          return false;
10542
        if (this.startDate != that.startDate)
10543
          return false;
10544
      }
10545
 
10546
      boolean this_present_endDate = true;
10547
      boolean that_present_endDate = true;
10548
      if (this_present_endDate || that_present_endDate) {
10549
        if (!(this_present_endDate && that_present_endDate))
10550
          return false;
10551
        if (this.endDate != that.endDate)
10552
          return false;
10553
      }
10554
 
10555
      return true;
10556
    }
10557
 
10558
    @Override
10559
    public int hashCode() {
10560
      return 0;
10561
    }
10562
 
10563
    public int compareTo(getPurchaseScans_args other) {
10564
      if (!getClass().equals(other.getClass())) {
10565
        return getClass().getName().compareTo(other.getClass().getName());
10566
      }
10567
 
10568
      int lastComparison = 0;
10569
      getPurchaseScans_args typedOther = (getPurchaseScans_args)other;
10570
 
10571
      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
10572
      if (lastComparison != 0) {
10573
        return lastComparison;
10574
      }
10575
      if (isSetStartDate()) {
10576
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
10577
        if (lastComparison != 0) {
10578
          return lastComparison;
10579
        }
10580
      }
10581
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
10582
      if (lastComparison != 0) {
10583
        return lastComparison;
10584
      }
10585
      if (isSetEndDate()) {
10586
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
10587
        if (lastComparison != 0) {
10588
          return lastComparison;
10589
        }
10590
      }
10591
      return 0;
10592
    }
10593
 
10594
    public _Fields fieldForId(int fieldId) {
10595
      return _Fields.findByThriftId(fieldId);
10596
    }
10597
 
10598
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10599
      org.apache.thrift.protocol.TField field;
10600
      iprot.readStructBegin();
10601
      while (true)
10602
      {
10603
        field = iprot.readFieldBegin();
10604
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10605
          break;
10606
        }
10607
        switch (field.id) {
10608
          case 1: // START_DATE
10609
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10610
              this.startDate = iprot.readI64();
10611
              setStartDateIsSet(true);
10612
            } else { 
10613
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10614
            }
10615
            break;
10616
          case 2: // END_DATE
10617
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10618
              this.endDate = iprot.readI64();
10619
              setEndDateIsSet(true);
10620
            } else { 
10621
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10622
            }
10623
            break;
10624
          default:
10625
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10626
        }
10627
        iprot.readFieldEnd();
10628
      }
10629
      iprot.readStructEnd();
10630
      validate();
10631
    }
10632
 
10633
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10634
      validate();
10635
 
10636
      oprot.writeStructBegin(STRUCT_DESC);
10637
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
10638
      oprot.writeI64(this.startDate);
10639
      oprot.writeFieldEnd();
10640
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
10641
      oprot.writeI64(this.endDate);
10642
      oprot.writeFieldEnd();
10643
      oprot.writeFieldStop();
10644
      oprot.writeStructEnd();
10645
    }
10646
 
10647
    @Override
10648
    public String toString() {
10649
      StringBuilder sb = new StringBuilder("getPurchaseScans_args(");
10650
      boolean first = true;
10651
 
10652
      sb.append("startDate:");
10653
      sb.append(this.startDate);
10654
      first = false;
10655
      if (!first) sb.append(", ");
10656
      sb.append("endDate:");
10657
      sb.append(this.endDate);
10658
      first = false;
10659
      sb.append(")");
10660
      return sb.toString();
10661
    }
10662
 
10663
    public void validate() throws org.apache.thrift.TException {
10664
      // check for required fields
10665
    }
10666
 
10667
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10668
      try {
10669
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10670
      } catch (org.apache.thrift.TException te) {
10671
        throw new java.io.IOException(te);
10672
      }
10673
    }
10674
 
10675
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10676
      try {
10677
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10678
        __isset_bit_vector = new BitSet(1);
10679
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10680
      } catch (org.apache.thrift.TException te) {
10681
        throw new java.io.IOException(te);
10682
      }
10683
    }
10684
 
10685
  }
10686
 
10687
  public static class getPurchaseScans_result implements org.apache.thrift.TBase<getPurchaseScans_result, getPurchaseScans_result._Fields>, java.io.Serializable, Cloneable   {
10688
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScans_result");
10689
 
10690
    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);
10691
 
10692
    private List<DetailedPurchaseScan> success; // required
10693
 
10694
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10695
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10696
      SUCCESS((short)0, "success");
10697
 
10698
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10699
 
10700
      static {
10701
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10702
          byName.put(field.getFieldName(), field);
10703
        }
10704
      }
10705
 
10706
      /**
10707
       * Find the _Fields constant that matches fieldId, or null if its not found.
10708
       */
10709
      public static _Fields findByThriftId(int fieldId) {
10710
        switch(fieldId) {
10711
          case 0: // SUCCESS
10712
            return SUCCESS;
10713
          default:
10714
            return null;
10715
        }
10716
      }
10717
 
10718
      /**
10719
       * Find the _Fields constant that matches fieldId, throwing an exception
10720
       * if it is not found.
10721
       */
10722
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10723
        _Fields fields = findByThriftId(fieldId);
10724
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10725
        return fields;
10726
      }
10727
 
10728
      /**
10729
       * Find the _Fields constant that matches name, or null if its not found.
10730
       */
10731
      public static _Fields findByName(String name) {
10732
        return byName.get(name);
10733
      }
10734
 
10735
      private final short _thriftId;
10736
      private final String _fieldName;
10737
 
10738
      _Fields(short thriftId, String fieldName) {
10739
        _thriftId = thriftId;
10740
        _fieldName = fieldName;
10741
      }
10742
 
10743
      public short getThriftFieldId() {
10744
        return _thriftId;
10745
      }
10746
 
10747
      public String getFieldName() {
10748
        return _fieldName;
10749
      }
10750
    }
10751
 
10752
    // isset id assignments
10753
 
10754
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10755
    static {
10756
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10757
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10758
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10759
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DetailedPurchaseScan.class))));
10760
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10761
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScans_result.class, metaDataMap);
10762
    }
10763
 
10764
    public getPurchaseScans_result() {
10765
    }
10766
 
10767
    public getPurchaseScans_result(
10768
      List<DetailedPurchaseScan> success)
10769
    {
10770
      this();
10771
      this.success = success;
10772
    }
10773
 
10774
    /**
10775
     * Performs a deep copy on <i>other</i>.
10776
     */
10777
    public getPurchaseScans_result(getPurchaseScans_result other) {
10778
      if (other.isSetSuccess()) {
10779
        List<DetailedPurchaseScan> __this__success = new ArrayList<DetailedPurchaseScan>();
10780
        for (DetailedPurchaseScan other_element : other.success) {
10781
          __this__success.add(new DetailedPurchaseScan(other_element));
10782
        }
10783
        this.success = __this__success;
10784
      }
10785
    }
10786
 
10787
    public getPurchaseScans_result deepCopy() {
10788
      return new getPurchaseScans_result(this);
10789
    }
10790
 
10791
    @Override
10792
    public void clear() {
10793
      this.success = null;
10794
    }
10795
 
10796
    public int getSuccessSize() {
10797
      return (this.success == null) ? 0 : this.success.size();
10798
    }
10799
 
10800
    public java.util.Iterator<DetailedPurchaseScan> getSuccessIterator() {
10801
      return (this.success == null) ? null : this.success.iterator();
10802
    }
10803
 
10804
    public void addToSuccess(DetailedPurchaseScan elem) {
10805
      if (this.success == null) {
10806
        this.success = new ArrayList<DetailedPurchaseScan>();
10807
      }
10808
      this.success.add(elem);
10809
    }
10810
 
10811
    public List<DetailedPurchaseScan> getSuccess() {
10812
      return this.success;
10813
    }
10814
 
10815
    public void setSuccess(List<DetailedPurchaseScan> success) {
10816
      this.success = success;
10817
    }
10818
 
10819
    public void unsetSuccess() {
10820
      this.success = null;
10821
    }
10822
 
10823
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10824
    public boolean isSetSuccess() {
10825
      return this.success != null;
10826
    }
10827
 
10828
    public void setSuccessIsSet(boolean value) {
10829
      if (!value) {
10830
        this.success = null;
10831
      }
10832
    }
10833
 
10834
    public void setFieldValue(_Fields field, Object value) {
10835
      switch (field) {
10836
      case SUCCESS:
10837
        if (value == null) {
10838
          unsetSuccess();
10839
        } else {
10840
          setSuccess((List<DetailedPurchaseScan>)value);
10841
        }
10842
        break;
10843
 
10844
      }
10845
    }
10846
 
10847
    public Object getFieldValue(_Fields field) {
10848
      switch (field) {
10849
      case SUCCESS:
10850
        return getSuccess();
10851
 
10852
      }
10853
      throw new IllegalStateException();
10854
    }
10855
 
10856
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10857
    public boolean isSet(_Fields field) {
10858
      if (field == null) {
10859
        throw new IllegalArgumentException();
10860
      }
10861
 
10862
      switch (field) {
10863
      case SUCCESS:
10864
        return isSetSuccess();
10865
      }
10866
      throw new IllegalStateException();
10867
    }
10868
 
10869
    @Override
10870
    public boolean equals(Object that) {
10871
      if (that == null)
10872
        return false;
10873
      if (that instanceof getPurchaseScans_result)
10874
        return this.equals((getPurchaseScans_result)that);
10875
      return false;
10876
    }
10877
 
10878
    public boolean equals(getPurchaseScans_result that) {
10879
      if (that == null)
10880
        return false;
10881
 
10882
      boolean this_present_success = true && this.isSetSuccess();
10883
      boolean that_present_success = true && that.isSetSuccess();
10884
      if (this_present_success || that_present_success) {
10885
        if (!(this_present_success && that_present_success))
10886
          return false;
10887
        if (!this.success.equals(that.success))
10888
          return false;
10889
      }
10890
 
10891
      return true;
10892
    }
10893
 
10894
    @Override
10895
    public int hashCode() {
10896
      return 0;
10897
    }
10898
 
10899
    public int compareTo(getPurchaseScans_result other) {
10900
      if (!getClass().equals(other.getClass())) {
10901
        return getClass().getName().compareTo(other.getClass().getName());
10902
      }
10903
 
10904
      int lastComparison = 0;
10905
      getPurchaseScans_result typedOther = (getPurchaseScans_result)other;
10906
 
10907
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10908
      if (lastComparison != 0) {
10909
        return lastComparison;
10910
      }
10911
      if (isSetSuccess()) {
10912
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10913
        if (lastComparison != 0) {
10914
          return lastComparison;
10915
        }
10916
      }
10917
      return 0;
10918
    }
10919
 
10920
    public _Fields fieldForId(int fieldId) {
10921
      return _Fields.findByThriftId(fieldId);
10922
    }
10923
 
10924
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10925
      org.apache.thrift.protocol.TField field;
10926
      iprot.readStructBegin();
10927
      while (true)
10928
      {
10929
        field = iprot.readFieldBegin();
10930
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10931
          break;
10932
        }
10933
        switch (field.id) {
10934
          case 0: // SUCCESS
10935
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10936
              {
10937
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
10938
                this.success = new ArrayList<DetailedPurchaseScan>(_list12.size);
10939
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
10940
                {
10941
                  DetailedPurchaseScan _elem14; // required
10942
                  _elem14 = new DetailedPurchaseScan();
10943
                  _elem14.read(iprot);
10944
                  this.success.add(_elem14);
10945
                }
10946
                iprot.readListEnd();
10947
              }
10948
            } else { 
10949
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10950
            }
10951
            break;
10952
          default:
10953
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10954
        }
10955
        iprot.readFieldEnd();
10956
      }
10957
      iprot.readStructEnd();
10958
      validate();
10959
    }
10960
 
10961
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10962
      oprot.writeStructBegin(STRUCT_DESC);
10963
 
10964
      if (this.isSetSuccess()) {
10965
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10966
        {
10967
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
10968
          for (DetailedPurchaseScan _iter15 : this.success)
10969
          {
10970
            _iter15.write(oprot);
10971
          }
10972
          oprot.writeListEnd();
10973
        }
10974
        oprot.writeFieldEnd();
10975
      }
10976
      oprot.writeFieldStop();
10977
      oprot.writeStructEnd();
10978
    }
10979
 
10980
    @Override
10981
    public String toString() {
10982
      StringBuilder sb = new StringBuilder("getPurchaseScans_result(");
10983
      boolean first = true;
10984
 
10985
      sb.append("success:");
10986
      if (this.success == null) {
10987
        sb.append("null");
10988
      } else {
10989
        sb.append(this.success);
10990
      }
10991
      first = false;
10992
      sb.append(")");
10993
      return sb.toString();
10994
    }
10995
 
10996
    public void validate() throws org.apache.thrift.TException {
10997
      // check for required fields
10998
    }
10999
 
11000
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11001
      try {
11002
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11003
      } catch (org.apache.thrift.TException te) {
11004
        throw new java.io.IOException(te);
11005
      }
11006
    }
11007
 
11008
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11009
      try {
11010
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11011
      } catch (org.apache.thrift.TException te) {
11012
        throw new java.io.IOException(te);
11013
      }
11014
    }
11015
 
11016
  }
11017
 
5496 mandeep.dh 11018
  public static class fetchScansPerInvoiceNumber_args implements org.apache.thrift.TBase<fetchScansPerInvoiceNumber_args, fetchScansPerInvoiceNumber_args._Fields>, java.io.Serializable, Cloneable   {
11019
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchScansPerInvoiceNumber_args");
11020
 
11021
    private static final org.apache.thrift.protocol.TField DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("date", org.apache.thrift.protocol.TType.I64, (short)1);
11022
 
11023
    private long date; // required
11024
 
11025
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11026
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11027
      DATE((short)1, "date");
11028
 
11029
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11030
 
11031
      static {
11032
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11033
          byName.put(field.getFieldName(), field);
11034
        }
11035
      }
11036
 
11037
      /**
11038
       * Find the _Fields constant that matches fieldId, or null if its not found.
11039
       */
11040
      public static _Fields findByThriftId(int fieldId) {
11041
        switch(fieldId) {
11042
          case 1: // DATE
11043
            return DATE;
11044
          default:
11045
            return null;
11046
        }
11047
      }
11048
 
11049
      /**
11050
       * Find the _Fields constant that matches fieldId, throwing an exception
11051
       * if it is not found.
11052
       */
11053
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11054
        _Fields fields = findByThriftId(fieldId);
11055
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11056
        return fields;
11057
      }
11058
 
11059
      /**
11060
       * Find the _Fields constant that matches name, or null if its not found.
11061
       */
11062
      public static _Fields findByName(String name) {
11063
        return byName.get(name);
11064
      }
11065
 
11066
      private final short _thriftId;
11067
      private final String _fieldName;
11068
 
11069
      _Fields(short thriftId, String fieldName) {
11070
        _thriftId = thriftId;
11071
        _fieldName = fieldName;
11072
      }
11073
 
11074
      public short getThriftFieldId() {
11075
        return _thriftId;
11076
      }
11077
 
11078
      public String getFieldName() {
11079
        return _fieldName;
11080
      }
11081
    }
11082
 
11083
    // isset id assignments
11084
    private static final int __DATE_ISSET_ID = 0;
11085
    private BitSet __isset_bit_vector = new BitSet(1);
11086
 
11087
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11088
    static {
11089
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11090
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11091
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11092
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11093
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchScansPerInvoiceNumber_args.class, metaDataMap);
11094
    }
11095
 
11096
    public fetchScansPerInvoiceNumber_args() {
11097
    }
11098
 
11099
    public fetchScansPerInvoiceNumber_args(
11100
      long date)
11101
    {
11102
      this();
11103
      this.date = date;
11104
      setDateIsSet(true);
11105
    }
11106
 
11107
    /**
11108
     * Performs a deep copy on <i>other</i>.
11109
     */
11110
    public fetchScansPerInvoiceNumber_args(fetchScansPerInvoiceNumber_args other) {
11111
      __isset_bit_vector.clear();
11112
      __isset_bit_vector.or(other.__isset_bit_vector);
11113
      this.date = other.date;
11114
    }
11115
 
11116
    public fetchScansPerInvoiceNumber_args deepCopy() {
11117
      return new fetchScansPerInvoiceNumber_args(this);
11118
    }
11119
 
11120
    @Override
11121
    public void clear() {
11122
      setDateIsSet(false);
11123
      this.date = 0;
11124
    }
11125
 
11126
    public long getDate() {
11127
      return this.date;
11128
    }
11129
 
11130
    public void setDate(long date) {
11131
      this.date = date;
11132
      setDateIsSet(true);
11133
    }
11134
 
11135
    public void unsetDate() {
11136
      __isset_bit_vector.clear(__DATE_ISSET_ID);
11137
    }
11138
 
11139
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
11140
    public boolean isSetDate() {
11141
      return __isset_bit_vector.get(__DATE_ISSET_ID);
11142
    }
11143
 
11144
    public void setDateIsSet(boolean value) {
11145
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
11146
    }
11147
 
11148
    public void setFieldValue(_Fields field, Object value) {
11149
      switch (field) {
11150
      case DATE:
11151
        if (value == null) {
11152
          unsetDate();
11153
        } else {
11154
          setDate((Long)value);
11155
        }
11156
        break;
11157
 
11158
      }
11159
    }
11160
 
11161
    public Object getFieldValue(_Fields field) {
11162
      switch (field) {
11163
      case DATE:
11164
        return Long.valueOf(getDate());
11165
 
11166
      }
11167
      throw new IllegalStateException();
11168
    }
11169
 
11170
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11171
    public boolean isSet(_Fields field) {
11172
      if (field == null) {
11173
        throw new IllegalArgumentException();
11174
      }
11175
 
11176
      switch (field) {
11177
      case DATE:
11178
        return isSetDate();
11179
      }
11180
      throw new IllegalStateException();
11181
    }
11182
 
11183
    @Override
11184
    public boolean equals(Object that) {
11185
      if (that == null)
11186
        return false;
11187
      if (that instanceof fetchScansPerInvoiceNumber_args)
11188
        return this.equals((fetchScansPerInvoiceNumber_args)that);
11189
      return false;
11190
    }
11191
 
11192
    public boolean equals(fetchScansPerInvoiceNumber_args that) {
11193
      if (that == null)
11194
        return false;
11195
 
11196
      boolean this_present_date = true;
11197
      boolean that_present_date = true;
11198
      if (this_present_date || that_present_date) {
11199
        if (!(this_present_date && that_present_date))
11200
          return false;
11201
        if (this.date != that.date)
11202
          return false;
11203
      }
11204
 
11205
      return true;
11206
    }
11207
 
11208
    @Override
11209
    public int hashCode() {
11210
      return 0;
11211
    }
11212
 
11213
    public int compareTo(fetchScansPerInvoiceNumber_args other) {
11214
      if (!getClass().equals(other.getClass())) {
11215
        return getClass().getName().compareTo(other.getClass().getName());
11216
      }
11217
 
11218
      int lastComparison = 0;
11219
      fetchScansPerInvoiceNumber_args typedOther = (fetchScansPerInvoiceNumber_args)other;
11220
 
11221
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
11222
      if (lastComparison != 0) {
11223
        return lastComparison;
11224
      }
11225
      if (isSetDate()) {
11226
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
11227
        if (lastComparison != 0) {
11228
          return lastComparison;
11229
        }
11230
      }
11231
      return 0;
11232
    }
11233
 
11234
    public _Fields fieldForId(int fieldId) {
11235
      return _Fields.findByThriftId(fieldId);
11236
    }
11237
 
11238
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11239
      org.apache.thrift.protocol.TField field;
11240
      iprot.readStructBegin();
11241
      while (true)
11242
      {
11243
        field = iprot.readFieldBegin();
11244
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11245
          break;
11246
        }
11247
        switch (field.id) {
11248
          case 1: // DATE
11249
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11250
              this.date = iprot.readI64();
11251
              setDateIsSet(true);
11252
            } else { 
11253
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11254
            }
11255
            break;
11256
          default:
11257
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11258
        }
11259
        iprot.readFieldEnd();
11260
      }
11261
      iprot.readStructEnd();
11262
      validate();
11263
    }
11264
 
11265
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11266
      validate();
11267
 
11268
      oprot.writeStructBegin(STRUCT_DESC);
11269
      oprot.writeFieldBegin(DATE_FIELD_DESC);
11270
      oprot.writeI64(this.date);
11271
      oprot.writeFieldEnd();
11272
      oprot.writeFieldStop();
11273
      oprot.writeStructEnd();
11274
    }
11275
 
11276
    @Override
11277
    public String toString() {
11278
      StringBuilder sb = new StringBuilder("fetchScansPerInvoiceNumber_args(");
11279
      boolean first = true;
11280
 
11281
      sb.append("date:");
11282
      sb.append(this.date);
11283
      first = false;
11284
      sb.append(")");
11285
      return sb.toString();
11286
    }
11287
 
11288
    public void validate() throws org.apache.thrift.TException {
11289
      // check for required fields
11290
    }
11291
 
11292
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11293
      try {
11294
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11295
      } catch (org.apache.thrift.TException te) {
11296
        throw new java.io.IOException(te);
11297
      }
11298
    }
11299
 
11300
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11301
      try {
5711 mandeep.dh 11302
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11303
        __isset_bit_vector = new BitSet(1);
5496 mandeep.dh 11304
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11305
      } catch (org.apache.thrift.TException te) {
11306
        throw new java.io.IOException(te);
11307
      }
11308
    }
11309
 
11310
  }
11311
 
11312
  public static class fetchScansPerInvoiceNumber_result implements org.apache.thrift.TBase<fetchScansPerInvoiceNumber_result, fetchScansPerInvoiceNumber_result._Fields>, java.io.Serializable, Cloneable   {
11313
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("fetchScansPerInvoiceNumber_result");
11314
 
11315
    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);
11316
 
11317
    private List<InvoiceScan> success; // required
11318
 
11319
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11320
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11321
      SUCCESS((short)0, "success");
11322
 
11323
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11324
 
11325
      static {
11326
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11327
          byName.put(field.getFieldName(), field);
11328
        }
11329
      }
11330
 
11331
      /**
11332
       * Find the _Fields constant that matches fieldId, or null if its not found.
11333
       */
11334
      public static _Fields findByThriftId(int fieldId) {
11335
        switch(fieldId) {
11336
          case 0: // SUCCESS
11337
            return SUCCESS;
11338
          default:
11339
            return null;
11340
        }
11341
      }
11342
 
11343
      /**
11344
       * Find the _Fields constant that matches fieldId, throwing an exception
11345
       * if it is not found.
11346
       */
11347
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11348
        _Fields fields = findByThriftId(fieldId);
11349
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11350
        return fields;
11351
      }
11352
 
11353
      /**
11354
       * Find the _Fields constant that matches name, or null if its not found.
11355
       */
11356
      public static _Fields findByName(String name) {
11357
        return byName.get(name);
11358
      }
11359
 
11360
      private final short _thriftId;
11361
      private final String _fieldName;
11362
 
11363
      _Fields(short thriftId, String fieldName) {
11364
        _thriftId = thriftId;
11365
        _fieldName = fieldName;
11366
      }
11367
 
11368
      public short getThriftFieldId() {
11369
        return _thriftId;
11370
      }
11371
 
11372
      public String getFieldName() {
11373
        return _fieldName;
11374
      }
11375
    }
11376
 
11377
    // isset id assignments
11378
 
11379
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11380
    static {
11381
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11382
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11383
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
11384
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InvoiceScan.class))));
11385
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11386
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(fetchScansPerInvoiceNumber_result.class, metaDataMap);
11387
    }
11388
 
11389
    public fetchScansPerInvoiceNumber_result() {
11390
    }
11391
 
11392
    public fetchScansPerInvoiceNumber_result(
11393
      List<InvoiceScan> success)
11394
    {
11395
      this();
11396
      this.success = success;
11397
    }
11398
 
11399
    /**
11400
     * Performs a deep copy on <i>other</i>.
11401
     */
11402
    public fetchScansPerInvoiceNumber_result(fetchScansPerInvoiceNumber_result other) {
11403
      if (other.isSetSuccess()) {
11404
        List<InvoiceScan> __this__success = new ArrayList<InvoiceScan>();
11405
        for (InvoiceScan other_element : other.success) {
11406
          __this__success.add(new InvoiceScan(other_element));
11407
        }
11408
        this.success = __this__success;
11409
      }
11410
    }
11411
 
11412
    public fetchScansPerInvoiceNumber_result deepCopy() {
11413
      return new fetchScansPerInvoiceNumber_result(this);
11414
    }
11415
 
11416
    @Override
11417
    public void clear() {
11418
      this.success = null;
11419
    }
11420
 
11421
    public int getSuccessSize() {
11422
      return (this.success == null) ? 0 : this.success.size();
11423
    }
11424
 
11425
    public java.util.Iterator<InvoiceScan> getSuccessIterator() {
11426
      return (this.success == null) ? null : this.success.iterator();
11427
    }
11428
 
11429
    public void addToSuccess(InvoiceScan elem) {
11430
      if (this.success == null) {
11431
        this.success = new ArrayList<InvoiceScan>();
11432
      }
11433
      this.success.add(elem);
11434
    }
11435
 
11436
    public List<InvoiceScan> getSuccess() {
11437
      return this.success;
11438
    }
11439
 
11440
    public void setSuccess(List<InvoiceScan> success) {
11441
      this.success = success;
11442
    }
11443
 
11444
    public void unsetSuccess() {
11445
      this.success = null;
11446
    }
11447
 
11448
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
11449
    public boolean isSetSuccess() {
11450
      return this.success != null;
11451
    }
11452
 
11453
    public void setSuccessIsSet(boolean value) {
11454
      if (!value) {
11455
        this.success = null;
11456
      }
11457
    }
11458
 
11459
    public void setFieldValue(_Fields field, Object value) {
11460
      switch (field) {
11461
      case SUCCESS:
11462
        if (value == null) {
11463
          unsetSuccess();
11464
        } else {
11465
          setSuccess((List<InvoiceScan>)value);
11466
        }
11467
        break;
11468
 
11469
      }
11470
    }
11471
 
11472
    public Object getFieldValue(_Fields field) {
11473
      switch (field) {
11474
      case SUCCESS:
11475
        return getSuccess();
11476
 
11477
      }
11478
      throw new IllegalStateException();
11479
    }
11480
 
11481
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11482
    public boolean isSet(_Fields field) {
11483
      if (field == null) {
11484
        throw new IllegalArgumentException();
11485
      }
11486
 
11487
      switch (field) {
11488
      case SUCCESS:
11489
        return isSetSuccess();
11490
      }
11491
      throw new IllegalStateException();
11492
    }
11493
 
11494
    @Override
11495
    public boolean equals(Object that) {
11496
      if (that == null)
11497
        return false;
11498
      if (that instanceof fetchScansPerInvoiceNumber_result)
11499
        return this.equals((fetchScansPerInvoiceNumber_result)that);
11500
      return false;
11501
    }
11502
 
11503
    public boolean equals(fetchScansPerInvoiceNumber_result that) {
11504
      if (that == null)
11505
        return false;
11506
 
11507
      boolean this_present_success = true && this.isSetSuccess();
11508
      boolean that_present_success = true && that.isSetSuccess();
11509
      if (this_present_success || that_present_success) {
11510
        if (!(this_present_success && that_present_success))
11511
          return false;
11512
        if (!this.success.equals(that.success))
11513
          return false;
11514
      }
11515
 
11516
      return true;
11517
    }
11518
 
11519
    @Override
11520
    public int hashCode() {
11521
      return 0;
11522
    }
11523
 
11524
    public int compareTo(fetchScansPerInvoiceNumber_result other) {
11525
      if (!getClass().equals(other.getClass())) {
11526
        return getClass().getName().compareTo(other.getClass().getName());
11527
      }
11528
 
11529
      int lastComparison = 0;
11530
      fetchScansPerInvoiceNumber_result typedOther = (fetchScansPerInvoiceNumber_result)other;
11531
 
11532
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
11533
      if (lastComparison != 0) {
11534
        return lastComparison;
11535
      }
11536
      if (isSetSuccess()) {
11537
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11538
        if (lastComparison != 0) {
11539
          return lastComparison;
11540
        }
11541
      }
11542
      return 0;
11543
    }
11544
 
11545
    public _Fields fieldForId(int fieldId) {
11546
      return _Fields.findByThriftId(fieldId);
11547
    }
11548
 
11549
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11550
      org.apache.thrift.protocol.TField field;
11551
      iprot.readStructBegin();
11552
      while (true)
11553
      {
11554
        field = iprot.readFieldBegin();
11555
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11556
          break;
11557
        }
11558
        switch (field.id) {
11559
          case 0: // SUCCESS
11560
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11561
              {
11562
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
11563
                this.success = new ArrayList<InvoiceScan>(_list16.size);
11564
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
11565
                {
11566
                  InvoiceScan _elem18; // required
11567
                  _elem18 = new InvoiceScan();
11568
                  _elem18.read(iprot);
11569
                  this.success.add(_elem18);
11570
                }
11571
                iprot.readListEnd();
11572
              }
11573
            } else { 
11574
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11575
            }
11576
            break;
11577
          default:
11578
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11579
        }
11580
        iprot.readFieldEnd();
11581
      }
11582
      iprot.readStructEnd();
11583
      validate();
11584
    }
11585
 
11586
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11587
      oprot.writeStructBegin(STRUCT_DESC);
11588
 
11589
      if (this.isSetSuccess()) {
11590
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11591
        {
11592
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
11593
          for (InvoiceScan _iter19 : this.success)
11594
          {
11595
            _iter19.write(oprot);
11596
          }
11597
          oprot.writeListEnd();
11598
        }
11599
        oprot.writeFieldEnd();
11600
      }
11601
      oprot.writeFieldStop();
11602
      oprot.writeStructEnd();
11603
    }
11604
 
11605
    @Override
11606
    public String toString() {
11607
      StringBuilder sb = new StringBuilder("fetchScansPerInvoiceNumber_result(");
11608
      boolean first = true;
11609
 
11610
      sb.append("success:");
11611
      if (this.success == null) {
11612
        sb.append("null");
11613
      } else {
11614
        sb.append(this.success);
11615
      }
11616
      first = false;
11617
      sb.append(")");
11618
      return sb.toString();
11619
    }
11620
 
11621
    public void validate() throws org.apache.thrift.TException {
11622
      // check for required fields
11623
    }
11624
 
11625
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11626
      try {
11627
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11628
      } catch (org.apache.thrift.TException te) {
11629
        throw new java.io.IOException(te);
11630
      }
11631
    }
11632
 
11633
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11634
      try {
11635
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11636
      } catch (org.apache.thrift.TException te) {
11637
        throw new java.io.IOException(te);
11638
      }
11639
    }
11640
 
11641
  }
11642
 
5620 mandeep.dh 11643
  public static class getInventoryItemFromOrder_args implements org.apache.thrift.TBase<getInventoryItemFromOrder_args, getInventoryItemFromOrder_args._Fields>, java.io.Serializable, Cloneable   {
11644
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromOrder_args");
11645
 
11646
    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);
11647
 
11648
    private long orderId; // required
11649
 
11650
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11651
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11652
      ORDER_ID((short)1, "orderId");
11653
 
11654
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11655
 
11656
      static {
11657
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11658
          byName.put(field.getFieldName(), field);
11659
        }
11660
      }
11661
 
11662
      /**
11663
       * Find the _Fields constant that matches fieldId, or null if its not found.
11664
       */
11665
      public static _Fields findByThriftId(int fieldId) {
11666
        switch(fieldId) {
11667
          case 1: // ORDER_ID
11668
            return ORDER_ID;
11669
          default:
11670
            return null;
11671
        }
11672
      }
11673
 
11674
      /**
11675
       * Find the _Fields constant that matches fieldId, throwing an exception
11676
       * if it is not found.
11677
       */
11678
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11679
        _Fields fields = findByThriftId(fieldId);
11680
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11681
        return fields;
11682
      }
11683
 
11684
      /**
11685
       * Find the _Fields constant that matches name, or null if its not found.
11686
       */
11687
      public static _Fields findByName(String name) {
11688
        return byName.get(name);
11689
      }
11690
 
11691
      private final short _thriftId;
11692
      private final String _fieldName;
11693
 
11694
      _Fields(short thriftId, String fieldName) {
11695
        _thriftId = thriftId;
11696
        _fieldName = fieldName;
11697
      }
11698
 
11699
      public short getThriftFieldId() {
11700
        return _thriftId;
11701
      }
11702
 
11703
      public String getFieldName() {
11704
        return _fieldName;
11705
      }
11706
    }
11707
 
11708
    // isset id assignments
11709
    private static final int __ORDERID_ISSET_ID = 0;
11710
    private BitSet __isset_bit_vector = new BitSet(1);
11711
 
11712
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11713
    static {
11714
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11715
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11716
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11717
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11718
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromOrder_args.class, metaDataMap);
11719
    }
11720
 
11721
    public getInventoryItemFromOrder_args() {
11722
    }
11723
 
11724
    public getInventoryItemFromOrder_args(
11725
      long orderId)
11726
    {
11727
      this();
11728
      this.orderId = orderId;
11729
      setOrderIdIsSet(true);
11730
    }
11731
 
11732
    /**
11733
     * Performs a deep copy on <i>other</i>.
11734
     */
11735
    public getInventoryItemFromOrder_args(getInventoryItemFromOrder_args other) {
11736
      __isset_bit_vector.clear();
11737
      __isset_bit_vector.or(other.__isset_bit_vector);
11738
      this.orderId = other.orderId;
11739
    }
11740
 
11741
    public getInventoryItemFromOrder_args deepCopy() {
11742
      return new getInventoryItemFromOrder_args(this);
11743
    }
11744
 
11745
    @Override
11746
    public void clear() {
11747
      setOrderIdIsSet(false);
11748
      this.orderId = 0;
11749
    }
11750
 
11751
    public long getOrderId() {
11752
      return this.orderId;
11753
    }
11754
 
11755
    public void setOrderId(long orderId) {
11756
      this.orderId = orderId;
11757
      setOrderIdIsSet(true);
11758
    }
11759
 
11760
    public void unsetOrderId() {
11761
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
11762
    }
11763
 
11764
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
11765
    public boolean isSetOrderId() {
11766
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
11767
    }
11768
 
11769
    public void setOrderIdIsSet(boolean value) {
11770
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
11771
    }
11772
 
11773
    public void setFieldValue(_Fields field, Object value) {
11774
      switch (field) {
11775
      case ORDER_ID:
11776
        if (value == null) {
11777
          unsetOrderId();
11778
        } else {
11779
          setOrderId((Long)value);
11780
        }
11781
        break;
11782
 
11783
      }
11784
    }
11785
 
11786
    public Object getFieldValue(_Fields field) {
11787
      switch (field) {
11788
      case ORDER_ID:
11789
        return Long.valueOf(getOrderId());
11790
 
11791
      }
11792
      throw new IllegalStateException();
11793
    }
11794
 
11795
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11796
    public boolean isSet(_Fields field) {
11797
      if (field == null) {
11798
        throw new IllegalArgumentException();
11799
      }
11800
 
11801
      switch (field) {
11802
      case ORDER_ID:
11803
        return isSetOrderId();
11804
      }
11805
      throw new IllegalStateException();
11806
    }
11807
 
11808
    @Override
11809
    public boolean equals(Object that) {
11810
      if (that == null)
11811
        return false;
11812
      if (that instanceof getInventoryItemFromOrder_args)
11813
        return this.equals((getInventoryItemFromOrder_args)that);
11814
      return false;
11815
    }
11816
 
11817
    public boolean equals(getInventoryItemFromOrder_args that) {
11818
      if (that == null)
11819
        return false;
11820
 
11821
      boolean this_present_orderId = true;
11822
      boolean that_present_orderId = true;
11823
      if (this_present_orderId || that_present_orderId) {
11824
        if (!(this_present_orderId && that_present_orderId))
11825
          return false;
11826
        if (this.orderId != that.orderId)
11827
          return false;
11828
      }
11829
 
11830
      return true;
11831
    }
11832
 
11833
    @Override
11834
    public int hashCode() {
11835
      return 0;
11836
    }
11837
 
11838
    public int compareTo(getInventoryItemFromOrder_args other) {
11839
      if (!getClass().equals(other.getClass())) {
11840
        return getClass().getName().compareTo(other.getClass().getName());
11841
      }
11842
 
11843
      int lastComparison = 0;
11844
      getInventoryItemFromOrder_args typedOther = (getInventoryItemFromOrder_args)other;
11845
 
11846
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
11847
      if (lastComparison != 0) {
11848
        return lastComparison;
11849
      }
11850
      if (isSetOrderId()) {
11851
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
11852
        if (lastComparison != 0) {
11853
          return lastComparison;
11854
        }
11855
      }
11856
      return 0;
11857
    }
11858
 
11859
    public _Fields fieldForId(int fieldId) {
11860
      return _Fields.findByThriftId(fieldId);
11861
    }
11862
 
11863
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11864
      org.apache.thrift.protocol.TField field;
11865
      iprot.readStructBegin();
11866
      while (true)
11867
      {
11868
        field = iprot.readFieldBegin();
11869
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11870
          break;
11871
        }
11872
        switch (field.id) {
11873
          case 1: // ORDER_ID
11874
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11875
              this.orderId = iprot.readI64();
11876
              setOrderIdIsSet(true);
11877
            } else { 
11878
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11879
            }
11880
            break;
11881
          default:
11882
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11883
        }
11884
        iprot.readFieldEnd();
11885
      }
11886
      iprot.readStructEnd();
11887
      validate();
11888
    }
11889
 
11890
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11891
      validate();
11892
 
11893
      oprot.writeStructBegin(STRUCT_DESC);
11894
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11895
      oprot.writeI64(this.orderId);
11896
      oprot.writeFieldEnd();
11897
      oprot.writeFieldStop();
11898
      oprot.writeStructEnd();
11899
    }
11900
 
11901
    @Override
11902
    public String toString() {
11903
      StringBuilder sb = new StringBuilder("getInventoryItemFromOrder_args(");
11904
      boolean first = true;
11905
 
11906
      sb.append("orderId:");
11907
      sb.append(this.orderId);
11908
      first = false;
11909
      sb.append(")");
11910
      return sb.toString();
11911
    }
11912
 
11913
    public void validate() throws org.apache.thrift.TException {
11914
      // check for required fields
11915
    }
11916
 
11917
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11918
      try {
11919
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11920
      } catch (org.apache.thrift.TException te) {
11921
        throw new java.io.IOException(te);
11922
      }
11923
    }
11924
 
11925
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11926
      try {
11927
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11928
        __isset_bit_vector = new BitSet(1);
11929
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11930
      } catch (org.apache.thrift.TException te) {
11931
        throw new java.io.IOException(te);
11932
      }
11933
    }
11934
 
11935
  }
11936
 
11937
  public static class getInventoryItemFromOrder_result implements org.apache.thrift.TBase<getInventoryItemFromOrder_result, getInventoryItemFromOrder_result._Fields>, java.io.Serializable, Cloneable   {
11938
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromOrder_result");
11939
 
11940
    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);
11941
    private static final org.apache.thrift.protocol.TField WE_FIELD_DESC = new org.apache.thrift.protocol.TField("we", org.apache.thrift.protocol.TType.STRUCT, (short)1);
11942
 
11943
    private InventoryItem success; // required
11944
    private WarehouseServiceException we; // required
11945
 
11946
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11947
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11948
      SUCCESS((short)0, "success"),
11949
      WE((short)1, "we");
11950
 
11951
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11952
 
11953
      static {
11954
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11955
          byName.put(field.getFieldName(), field);
11956
        }
11957
      }
11958
 
11959
      /**
11960
       * Find the _Fields constant that matches fieldId, or null if its not found.
11961
       */
11962
      public static _Fields findByThriftId(int fieldId) {
11963
        switch(fieldId) {
11964
          case 0: // SUCCESS
11965
            return SUCCESS;
11966
          case 1: // WE
11967
            return WE;
11968
          default:
11969
            return null;
11970
        }
11971
      }
11972
 
11973
      /**
11974
       * Find the _Fields constant that matches fieldId, throwing an exception
11975
       * if it is not found.
11976
       */
11977
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11978
        _Fields fields = findByThriftId(fieldId);
11979
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11980
        return fields;
11981
      }
11982
 
11983
      /**
11984
       * Find the _Fields constant that matches name, or null if its not found.
11985
       */
11986
      public static _Fields findByName(String name) {
11987
        return byName.get(name);
11988
      }
11989
 
11990
      private final short _thriftId;
11991
      private final String _fieldName;
11992
 
11993
      _Fields(short thriftId, String fieldName) {
11994
        _thriftId = thriftId;
11995
        _fieldName = fieldName;
11996
      }
11997
 
11998
      public short getThriftFieldId() {
11999
        return _thriftId;
12000
      }
12001
 
12002
      public String getFieldName() {
12003
        return _fieldName;
12004
      }
12005
    }
12006
 
12007
    // isset id assignments
12008
 
12009
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12010
    static {
12011
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12012
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12013
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
12014
      tmpMap.put(_Fields.WE, new org.apache.thrift.meta_data.FieldMetaData("we", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12015
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12016
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12017
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromOrder_result.class, metaDataMap);
12018
    }
12019
 
12020
    public getInventoryItemFromOrder_result() {
12021
    }
12022
 
12023
    public getInventoryItemFromOrder_result(
12024
      InventoryItem success,
12025
      WarehouseServiceException we)
12026
    {
12027
      this();
12028
      this.success = success;
12029
      this.we = we;
12030
    }
12031
 
12032
    /**
12033
     * Performs a deep copy on <i>other</i>.
12034
     */
12035
    public getInventoryItemFromOrder_result(getInventoryItemFromOrder_result other) {
12036
      if (other.isSetSuccess()) {
12037
        this.success = new InventoryItem(other.success);
12038
      }
12039
      if (other.isSetWe()) {
12040
        this.we = new WarehouseServiceException(other.we);
12041
      }
12042
    }
12043
 
12044
    public getInventoryItemFromOrder_result deepCopy() {
12045
      return new getInventoryItemFromOrder_result(this);
12046
    }
12047
 
12048
    @Override
12049
    public void clear() {
12050
      this.success = null;
12051
      this.we = null;
12052
    }
12053
 
12054
    public InventoryItem getSuccess() {
12055
      return this.success;
12056
    }
12057
 
12058
    public void setSuccess(InventoryItem success) {
12059
      this.success = success;
12060
    }
12061
 
12062
    public void unsetSuccess() {
12063
      this.success = null;
12064
    }
12065
 
12066
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12067
    public boolean isSetSuccess() {
12068
      return this.success != null;
12069
    }
12070
 
12071
    public void setSuccessIsSet(boolean value) {
12072
      if (!value) {
12073
        this.success = null;
12074
      }
12075
    }
12076
 
12077
    public WarehouseServiceException getWe() {
12078
      return this.we;
12079
    }
12080
 
12081
    public void setWe(WarehouseServiceException we) {
12082
      this.we = we;
12083
    }
12084
 
12085
    public void unsetWe() {
12086
      this.we = null;
12087
    }
12088
 
12089
    /** Returns true if field we is set (has been assigned a value) and false otherwise */
12090
    public boolean isSetWe() {
12091
      return this.we != null;
12092
    }
12093
 
12094
    public void setWeIsSet(boolean value) {
12095
      if (!value) {
12096
        this.we = null;
12097
      }
12098
    }
12099
 
12100
    public void setFieldValue(_Fields field, Object value) {
12101
      switch (field) {
12102
      case SUCCESS:
12103
        if (value == null) {
12104
          unsetSuccess();
12105
        } else {
12106
          setSuccess((InventoryItem)value);
12107
        }
12108
        break;
12109
 
12110
      case WE:
12111
        if (value == null) {
12112
          unsetWe();
12113
        } else {
12114
          setWe((WarehouseServiceException)value);
12115
        }
12116
        break;
12117
 
12118
      }
12119
    }
12120
 
12121
    public Object getFieldValue(_Fields field) {
12122
      switch (field) {
12123
      case SUCCESS:
12124
        return getSuccess();
12125
 
12126
      case WE:
12127
        return getWe();
12128
 
12129
      }
12130
      throw new IllegalStateException();
12131
    }
12132
 
12133
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12134
    public boolean isSet(_Fields field) {
12135
      if (field == null) {
12136
        throw new IllegalArgumentException();
12137
      }
12138
 
12139
      switch (field) {
12140
      case SUCCESS:
12141
        return isSetSuccess();
12142
      case WE:
12143
        return isSetWe();
12144
      }
12145
      throw new IllegalStateException();
12146
    }
12147
 
12148
    @Override
12149
    public boolean equals(Object that) {
12150
      if (that == null)
12151
        return false;
12152
      if (that instanceof getInventoryItemFromOrder_result)
12153
        return this.equals((getInventoryItemFromOrder_result)that);
12154
      return false;
12155
    }
12156
 
12157
    public boolean equals(getInventoryItemFromOrder_result that) {
12158
      if (that == null)
12159
        return false;
12160
 
12161
      boolean this_present_success = true && this.isSetSuccess();
12162
      boolean that_present_success = true && that.isSetSuccess();
12163
      if (this_present_success || that_present_success) {
12164
        if (!(this_present_success && that_present_success))
12165
          return false;
12166
        if (!this.success.equals(that.success))
12167
          return false;
12168
      }
12169
 
12170
      boolean this_present_we = true && this.isSetWe();
12171
      boolean that_present_we = true && that.isSetWe();
12172
      if (this_present_we || that_present_we) {
12173
        if (!(this_present_we && that_present_we))
12174
          return false;
12175
        if (!this.we.equals(that.we))
12176
          return false;
12177
      }
12178
 
12179
      return true;
12180
    }
12181
 
12182
    @Override
12183
    public int hashCode() {
12184
      return 0;
12185
    }
12186
 
12187
    public int compareTo(getInventoryItemFromOrder_result other) {
12188
      if (!getClass().equals(other.getClass())) {
12189
        return getClass().getName().compareTo(other.getClass().getName());
12190
      }
12191
 
12192
      int lastComparison = 0;
12193
      getInventoryItemFromOrder_result typedOther = (getInventoryItemFromOrder_result)other;
12194
 
12195
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12196
      if (lastComparison != 0) {
12197
        return lastComparison;
12198
      }
12199
      if (isSetSuccess()) {
12200
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12201
        if (lastComparison != 0) {
12202
          return lastComparison;
12203
        }
12204
      }
12205
      lastComparison = Boolean.valueOf(isSetWe()).compareTo(typedOther.isSetWe());
12206
      if (lastComparison != 0) {
12207
        return lastComparison;
12208
      }
12209
      if (isSetWe()) {
12210
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.we, typedOther.we);
12211
        if (lastComparison != 0) {
12212
          return lastComparison;
12213
        }
12214
      }
12215
      return 0;
12216
    }
12217
 
12218
    public _Fields fieldForId(int fieldId) {
12219
      return _Fields.findByThriftId(fieldId);
12220
    }
12221
 
12222
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12223
      org.apache.thrift.protocol.TField field;
12224
      iprot.readStructBegin();
12225
      while (true)
12226
      {
12227
        field = iprot.readFieldBegin();
12228
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12229
          break;
12230
        }
12231
        switch (field.id) {
12232
          case 0: // SUCCESS
12233
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12234
              this.success = new InventoryItem();
12235
              this.success.read(iprot);
12236
            } else { 
12237
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12238
            }
12239
            break;
12240
          case 1: // WE
12241
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12242
              this.we = new WarehouseServiceException();
12243
              this.we.read(iprot);
12244
            } else { 
12245
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12246
            }
12247
            break;
12248
          default:
12249
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12250
        }
12251
        iprot.readFieldEnd();
12252
      }
12253
      iprot.readStructEnd();
12254
      validate();
12255
    }
12256
 
12257
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12258
      oprot.writeStructBegin(STRUCT_DESC);
12259
 
12260
      if (this.isSetSuccess()) {
12261
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12262
        this.success.write(oprot);
12263
        oprot.writeFieldEnd();
12264
      } else if (this.isSetWe()) {
12265
        oprot.writeFieldBegin(WE_FIELD_DESC);
12266
        this.we.write(oprot);
12267
        oprot.writeFieldEnd();
12268
      }
12269
      oprot.writeFieldStop();
12270
      oprot.writeStructEnd();
12271
    }
12272
 
12273
    @Override
12274
    public String toString() {
12275
      StringBuilder sb = new StringBuilder("getInventoryItemFromOrder_result(");
12276
      boolean first = true;
12277
 
12278
      sb.append("success:");
12279
      if (this.success == null) {
12280
        sb.append("null");
12281
      } else {
12282
        sb.append(this.success);
12283
      }
12284
      first = false;
12285
      if (!first) sb.append(", ");
12286
      sb.append("we:");
12287
      if (this.we == null) {
12288
        sb.append("null");
12289
      } else {
12290
        sb.append(this.we);
12291
      }
12292
      first = false;
12293
      sb.append(")");
12294
      return sb.toString();
12295
    }
12296
 
12297
    public void validate() throws org.apache.thrift.TException {
12298
      // check for required fields
12299
    }
12300
 
12301
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12302
      try {
12303
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12304
      } catch (org.apache.thrift.TException te) {
12305
        throw new java.io.IOException(te);
12306
      }
12307
    }
12308
 
12309
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12310
      try {
12311
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12312
      } catch (org.apache.thrift.TException te) {
12313
        throw new java.io.IOException(te);
12314
      }
12315
    }
12316
 
12317
  }
12318
 
5711 mandeep.dh 12319
  public static class getInventoryAge_args implements org.apache.thrift.TBase<getInventoryAge_args, getInventoryAge_args._Fields>, java.io.Serializable, Cloneable   {
12320
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryAge_args");
12321
 
12322
 
12323
 
12324
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12325
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12326
;
12327
 
12328
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12329
 
12330
      static {
12331
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12332
          byName.put(field.getFieldName(), field);
12333
        }
12334
      }
12335
 
12336
      /**
12337
       * Find the _Fields constant that matches fieldId, or null if its not found.
12338
       */
12339
      public static _Fields findByThriftId(int fieldId) {
12340
        switch(fieldId) {
12341
          default:
12342
            return null;
12343
        }
12344
      }
12345
 
12346
      /**
12347
       * Find the _Fields constant that matches fieldId, throwing an exception
12348
       * if it is not found.
12349
       */
12350
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12351
        _Fields fields = findByThriftId(fieldId);
12352
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12353
        return fields;
12354
      }
12355
 
12356
      /**
12357
       * Find the _Fields constant that matches name, or null if its not found.
12358
       */
12359
      public static _Fields findByName(String name) {
12360
        return byName.get(name);
12361
      }
12362
 
12363
      private final short _thriftId;
12364
      private final String _fieldName;
12365
 
12366
      _Fields(short thriftId, String fieldName) {
12367
        _thriftId = thriftId;
12368
        _fieldName = fieldName;
12369
      }
12370
 
12371
      public short getThriftFieldId() {
12372
        return _thriftId;
12373
      }
12374
 
12375
      public String getFieldName() {
12376
        return _fieldName;
12377
      }
12378
    }
12379
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12380
    static {
12381
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12382
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12383
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryAge_args.class, metaDataMap);
12384
    }
12385
 
12386
    public getInventoryAge_args() {
12387
    }
12388
 
12389
    /**
12390
     * Performs a deep copy on <i>other</i>.
12391
     */
12392
    public getInventoryAge_args(getInventoryAge_args other) {
12393
    }
12394
 
12395
    public getInventoryAge_args deepCopy() {
12396
      return new getInventoryAge_args(this);
12397
    }
12398
 
12399
    @Override
12400
    public void clear() {
12401
    }
12402
 
12403
    public void setFieldValue(_Fields field, Object value) {
12404
      switch (field) {
12405
      }
12406
    }
12407
 
12408
    public Object getFieldValue(_Fields field) {
12409
      switch (field) {
12410
      }
12411
      throw new IllegalStateException();
12412
    }
12413
 
12414
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12415
    public boolean isSet(_Fields field) {
12416
      if (field == null) {
12417
        throw new IllegalArgumentException();
12418
      }
12419
 
12420
      switch (field) {
12421
      }
12422
      throw new IllegalStateException();
12423
    }
12424
 
12425
    @Override
12426
    public boolean equals(Object that) {
12427
      if (that == null)
12428
        return false;
12429
      if (that instanceof getInventoryAge_args)
12430
        return this.equals((getInventoryAge_args)that);
12431
      return false;
12432
    }
12433
 
12434
    public boolean equals(getInventoryAge_args that) {
12435
      if (that == null)
12436
        return false;
12437
 
12438
      return true;
12439
    }
12440
 
12441
    @Override
12442
    public int hashCode() {
12443
      return 0;
12444
    }
12445
 
12446
    public int compareTo(getInventoryAge_args other) {
12447
      if (!getClass().equals(other.getClass())) {
12448
        return getClass().getName().compareTo(other.getClass().getName());
12449
      }
12450
 
12451
      int lastComparison = 0;
12452
      getInventoryAge_args typedOther = (getInventoryAge_args)other;
12453
 
12454
      return 0;
12455
    }
12456
 
12457
    public _Fields fieldForId(int fieldId) {
12458
      return _Fields.findByThriftId(fieldId);
12459
    }
12460
 
12461
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12462
      org.apache.thrift.protocol.TField field;
12463
      iprot.readStructBegin();
12464
      while (true)
12465
      {
12466
        field = iprot.readFieldBegin();
12467
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12468
          break;
12469
        }
12470
        switch (field.id) {
12471
          default:
12472
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12473
        }
12474
        iprot.readFieldEnd();
12475
      }
12476
      iprot.readStructEnd();
12477
      validate();
12478
    }
12479
 
12480
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12481
      validate();
12482
 
12483
      oprot.writeStructBegin(STRUCT_DESC);
12484
      oprot.writeFieldStop();
12485
      oprot.writeStructEnd();
12486
    }
12487
 
12488
    @Override
12489
    public String toString() {
12490
      StringBuilder sb = new StringBuilder("getInventoryAge_args(");
12491
      boolean first = true;
12492
 
12493
      sb.append(")");
12494
      return sb.toString();
12495
    }
12496
 
12497
    public void validate() throws org.apache.thrift.TException {
12498
      // check for required fields
12499
    }
12500
 
12501
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12502
      try {
12503
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12504
      } catch (org.apache.thrift.TException te) {
12505
        throw new java.io.IOException(te);
12506
      }
12507
    }
12508
 
12509
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12510
      try {
12511
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12512
      } catch (org.apache.thrift.TException te) {
12513
        throw new java.io.IOException(te);
12514
      }
12515
    }
12516
 
12517
  }
12518
 
12519
  public static class getInventoryAge_result implements org.apache.thrift.TBase<getInventoryAge_result, getInventoryAge_result._Fields>, java.io.Serializable, Cloneable   {
12520
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryAge_result");
12521
 
12522
    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);
12523
 
12524
    private List<InventoryAge> success; // required
12525
 
12526
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12527
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12528
      SUCCESS((short)0, "success");
12529
 
12530
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12531
 
12532
      static {
12533
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12534
          byName.put(field.getFieldName(), field);
12535
        }
12536
      }
12537
 
12538
      /**
12539
       * Find the _Fields constant that matches fieldId, or null if its not found.
12540
       */
12541
      public static _Fields findByThriftId(int fieldId) {
12542
        switch(fieldId) {
12543
          case 0: // SUCCESS
12544
            return SUCCESS;
12545
          default:
12546
            return null;
12547
        }
12548
      }
12549
 
12550
      /**
12551
       * Find the _Fields constant that matches fieldId, throwing an exception
12552
       * if it is not found.
12553
       */
12554
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12555
        _Fields fields = findByThriftId(fieldId);
12556
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12557
        return fields;
12558
      }
12559
 
12560
      /**
12561
       * Find the _Fields constant that matches name, or null if its not found.
12562
       */
12563
      public static _Fields findByName(String name) {
12564
        return byName.get(name);
12565
      }
12566
 
12567
      private final short _thriftId;
12568
      private final String _fieldName;
12569
 
12570
      _Fields(short thriftId, String fieldName) {
12571
        _thriftId = thriftId;
12572
        _fieldName = fieldName;
12573
      }
12574
 
12575
      public short getThriftFieldId() {
12576
        return _thriftId;
12577
      }
12578
 
12579
      public String getFieldName() {
12580
        return _fieldName;
12581
      }
12582
    }
12583
 
12584
    // isset id assignments
12585
 
12586
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12587
    static {
12588
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12589
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12590
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12591
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAge.class))));
12592
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12593
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryAge_result.class, metaDataMap);
12594
    }
12595
 
12596
    public getInventoryAge_result() {
12597
    }
12598
 
12599
    public getInventoryAge_result(
12600
      List<InventoryAge> success)
12601
    {
12602
      this();
12603
      this.success = success;
12604
    }
12605
 
12606
    /**
12607
     * Performs a deep copy on <i>other</i>.
12608
     */
12609
    public getInventoryAge_result(getInventoryAge_result other) {
12610
      if (other.isSetSuccess()) {
12611
        List<InventoryAge> __this__success = new ArrayList<InventoryAge>();
12612
        for (InventoryAge other_element : other.success) {
12613
          __this__success.add(new InventoryAge(other_element));
12614
        }
12615
        this.success = __this__success;
12616
      }
12617
    }
12618
 
12619
    public getInventoryAge_result deepCopy() {
12620
      return new getInventoryAge_result(this);
12621
    }
12622
 
12623
    @Override
12624
    public void clear() {
12625
      this.success = null;
12626
    }
12627
 
12628
    public int getSuccessSize() {
12629
      return (this.success == null) ? 0 : this.success.size();
12630
    }
12631
 
12632
    public java.util.Iterator<InventoryAge> getSuccessIterator() {
12633
      return (this.success == null) ? null : this.success.iterator();
12634
    }
12635
 
12636
    public void addToSuccess(InventoryAge elem) {
12637
      if (this.success == null) {
12638
        this.success = new ArrayList<InventoryAge>();
12639
      }
12640
      this.success.add(elem);
12641
    }
12642
 
12643
    public List<InventoryAge> getSuccess() {
12644
      return this.success;
12645
    }
12646
 
12647
    public void setSuccess(List<InventoryAge> success) {
12648
      this.success = success;
12649
    }
12650
 
12651
    public void unsetSuccess() {
12652
      this.success = null;
12653
    }
12654
 
12655
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12656
    public boolean isSetSuccess() {
12657
      return this.success != null;
12658
    }
12659
 
12660
    public void setSuccessIsSet(boolean value) {
12661
      if (!value) {
12662
        this.success = null;
12663
      }
12664
    }
12665
 
12666
    public void setFieldValue(_Fields field, Object value) {
12667
      switch (field) {
12668
      case SUCCESS:
12669
        if (value == null) {
12670
          unsetSuccess();
12671
        } else {
12672
          setSuccess((List<InventoryAge>)value);
12673
        }
12674
        break;
12675
 
12676
      }
12677
    }
12678
 
12679
    public Object getFieldValue(_Fields field) {
12680
      switch (field) {
12681
      case SUCCESS:
12682
        return getSuccess();
12683
 
12684
      }
12685
      throw new IllegalStateException();
12686
    }
12687
 
12688
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12689
    public boolean isSet(_Fields field) {
12690
      if (field == null) {
12691
        throw new IllegalArgumentException();
12692
      }
12693
 
12694
      switch (field) {
12695
      case SUCCESS:
12696
        return isSetSuccess();
12697
      }
12698
      throw new IllegalStateException();
12699
    }
12700
 
12701
    @Override
12702
    public boolean equals(Object that) {
12703
      if (that == null)
12704
        return false;
12705
      if (that instanceof getInventoryAge_result)
12706
        return this.equals((getInventoryAge_result)that);
12707
      return false;
12708
    }
12709
 
12710
    public boolean equals(getInventoryAge_result that) {
12711
      if (that == null)
12712
        return false;
12713
 
12714
      boolean this_present_success = true && this.isSetSuccess();
12715
      boolean that_present_success = true && that.isSetSuccess();
12716
      if (this_present_success || that_present_success) {
12717
        if (!(this_present_success && that_present_success))
12718
          return false;
12719
        if (!this.success.equals(that.success))
12720
          return false;
12721
      }
12722
 
12723
      return true;
12724
    }
12725
 
12726
    @Override
12727
    public int hashCode() {
12728
      return 0;
12729
    }
12730
 
12731
    public int compareTo(getInventoryAge_result other) {
12732
      if (!getClass().equals(other.getClass())) {
12733
        return getClass().getName().compareTo(other.getClass().getName());
12734
      }
12735
 
12736
      int lastComparison = 0;
12737
      getInventoryAge_result typedOther = (getInventoryAge_result)other;
12738
 
12739
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12740
      if (lastComparison != 0) {
12741
        return lastComparison;
12742
      }
12743
      if (isSetSuccess()) {
12744
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12745
        if (lastComparison != 0) {
12746
          return lastComparison;
12747
        }
12748
      }
12749
      return 0;
12750
    }
12751
 
12752
    public _Fields fieldForId(int fieldId) {
12753
      return _Fields.findByThriftId(fieldId);
12754
    }
12755
 
12756
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12757
      org.apache.thrift.protocol.TField field;
12758
      iprot.readStructBegin();
12759
      while (true)
12760
      {
12761
        field = iprot.readFieldBegin();
12762
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12763
          break;
12764
        }
12765
        switch (field.id) {
12766
          case 0: // SUCCESS
12767
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12768
              {
12769
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
12770
                this.success = new ArrayList<InventoryAge>(_list20.size);
12771
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
12772
                {
12773
                  InventoryAge _elem22; // required
12774
                  _elem22 = new InventoryAge();
12775
                  _elem22.read(iprot);
12776
                  this.success.add(_elem22);
12777
                }
12778
                iprot.readListEnd();
12779
              }
12780
            } else { 
12781
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12782
            }
12783
            break;
12784
          default:
12785
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12786
        }
12787
        iprot.readFieldEnd();
12788
      }
12789
      iprot.readStructEnd();
12790
      validate();
12791
    }
12792
 
12793
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12794
      oprot.writeStructBegin(STRUCT_DESC);
12795
 
12796
      if (this.isSetSuccess()) {
12797
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12798
        {
12799
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
12800
          for (InventoryAge _iter23 : this.success)
12801
          {
12802
            _iter23.write(oprot);
12803
          }
12804
          oprot.writeListEnd();
12805
        }
12806
        oprot.writeFieldEnd();
12807
      }
12808
      oprot.writeFieldStop();
12809
      oprot.writeStructEnd();
12810
    }
12811
 
12812
    @Override
12813
    public String toString() {
12814
      StringBuilder sb = new StringBuilder("getInventoryAge_result(");
12815
      boolean first = true;
12816
 
12817
      sb.append("success:");
12818
      if (this.success == null) {
12819
        sb.append("null");
12820
      } else {
12821
        sb.append(this.success);
12822
      }
12823
      first = false;
12824
      sb.append(")");
12825
      return sb.toString();
12826
    }
12827
 
12828
    public void validate() throws org.apache.thrift.TException {
12829
      // check for required fields
12830
    }
12831
 
12832
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12833
      try {
12834
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12835
      } catch (org.apache.thrift.TException te) {
12836
        throw new java.io.IOException(te);
12837
      }
12838
    }
12839
 
12840
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12841
      try {
12842
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12843
      } catch (org.apache.thrift.TException te) {
12844
        throw new java.io.IOException(te);
12845
      }
12846
    }
12847
 
12848
  }
12849
 
6322 amar.kumar 12850
  public static class getInventoryScansForItem_args implements org.apache.thrift.TBase<getInventoryScansForItem_args, getInventoryScansForItem_args._Fields>, java.io.Serializable, Cloneable   {
12851
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryScansForItem_args");
12852
 
12853
    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);
12854
    private static final org.apache.thrift.protocol.TField FROM_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("fromDate", org.apache.thrift.protocol.TType.I64, (short)2);
12855
    private static final org.apache.thrift.protocol.TField TO_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("toDate", org.apache.thrift.protocol.TType.I64, (short)3);
12856
 
12857
    private long itemId; // required
12858
    private long fromDate; // required
12859
    private long toDate; // required
12860
 
12861
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12862
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12863
      ITEM_ID((short)1, "itemId"),
12864
      FROM_DATE((short)2, "fromDate"),
12865
      TO_DATE((short)3, "toDate");
12866
 
12867
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12868
 
12869
      static {
12870
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12871
          byName.put(field.getFieldName(), field);
12872
        }
12873
      }
12874
 
12875
      /**
12876
       * Find the _Fields constant that matches fieldId, or null if its not found.
12877
       */
12878
      public static _Fields findByThriftId(int fieldId) {
12879
        switch(fieldId) {
12880
          case 1: // ITEM_ID
12881
            return ITEM_ID;
12882
          case 2: // FROM_DATE
12883
            return FROM_DATE;
12884
          case 3: // TO_DATE
12885
            return TO_DATE;
12886
          default:
12887
            return null;
12888
        }
12889
      }
12890
 
12891
      /**
12892
       * Find the _Fields constant that matches fieldId, throwing an exception
12893
       * if it is not found.
12894
       */
12895
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12896
        _Fields fields = findByThriftId(fieldId);
12897
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12898
        return fields;
12899
      }
12900
 
12901
      /**
12902
       * Find the _Fields constant that matches name, or null if its not found.
12903
       */
12904
      public static _Fields findByName(String name) {
12905
        return byName.get(name);
12906
      }
12907
 
12908
      private final short _thriftId;
12909
      private final String _fieldName;
12910
 
12911
      _Fields(short thriftId, String fieldName) {
12912
        _thriftId = thriftId;
12913
        _fieldName = fieldName;
12914
      }
12915
 
12916
      public short getThriftFieldId() {
12917
        return _thriftId;
12918
      }
12919
 
12920
      public String getFieldName() {
12921
        return _fieldName;
12922
      }
12923
    }
12924
 
12925
    // isset id assignments
12926
    private static final int __ITEMID_ISSET_ID = 0;
12927
    private static final int __FROMDATE_ISSET_ID = 1;
12928
    private static final int __TODATE_ISSET_ID = 2;
12929
    private BitSet __isset_bit_vector = new BitSet(3);
12930
 
12931
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12932
    static {
12933
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12934
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12935
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12936
      tmpMap.put(_Fields.FROM_DATE, new org.apache.thrift.meta_data.FieldMetaData("fromDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12937
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12938
      tmpMap.put(_Fields.TO_DATE, new org.apache.thrift.meta_data.FieldMetaData("toDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12939
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12940
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12941
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryScansForItem_args.class, metaDataMap);
12942
    }
12943
 
12944
    public getInventoryScansForItem_args() {
12945
    }
12946
 
12947
    public getInventoryScansForItem_args(
12948
      long itemId,
12949
      long fromDate,
12950
      long toDate)
12951
    {
12952
      this();
12953
      this.itemId = itemId;
12954
      setItemIdIsSet(true);
12955
      this.fromDate = fromDate;
12956
      setFromDateIsSet(true);
12957
      this.toDate = toDate;
12958
      setToDateIsSet(true);
12959
    }
12960
 
12961
    /**
12962
     * Performs a deep copy on <i>other</i>.
12963
     */
12964
    public getInventoryScansForItem_args(getInventoryScansForItem_args other) {
12965
      __isset_bit_vector.clear();
12966
      __isset_bit_vector.or(other.__isset_bit_vector);
12967
      this.itemId = other.itemId;
12968
      this.fromDate = other.fromDate;
12969
      this.toDate = other.toDate;
12970
    }
12971
 
12972
    public getInventoryScansForItem_args deepCopy() {
12973
      return new getInventoryScansForItem_args(this);
12974
    }
12975
 
12976
    @Override
12977
    public void clear() {
12978
      setItemIdIsSet(false);
12979
      this.itemId = 0;
12980
      setFromDateIsSet(false);
12981
      this.fromDate = 0;
12982
      setToDateIsSet(false);
12983
      this.toDate = 0;
12984
    }
12985
 
12986
    public long getItemId() {
12987
      return this.itemId;
12988
    }
12989
 
12990
    public void setItemId(long itemId) {
12991
      this.itemId = itemId;
12992
      setItemIdIsSet(true);
12993
    }
12994
 
12995
    public void unsetItemId() {
12996
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
12997
    }
12998
 
12999
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
13000
    public boolean isSetItemId() {
13001
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
13002
    }
13003
 
13004
    public void setItemIdIsSet(boolean value) {
13005
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
13006
    }
13007
 
13008
    public long getFromDate() {
13009
      return this.fromDate;
13010
    }
13011
 
13012
    public void setFromDate(long fromDate) {
13013
      this.fromDate = fromDate;
13014
      setFromDateIsSet(true);
13015
    }
13016
 
13017
    public void unsetFromDate() {
13018
      __isset_bit_vector.clear(__FROMDATE_ISSET_ID);
13019
    }
13020
 
13021
    /** Returns true if field fromDate is set (has been assigned a value) and false otherwise */
13022
    public boolean isSetFromDate() {
13023
      return __isset_bit_vector.get(__FROMDATE_ISSET_ID);
13024
    }
13025
 
13026
    public void setFromDateIsSet(boolean value) {
13027
      __isset_bit_vector.set(__FROMDATE_ISSET_ID, value);
13028
    }
13029
 
13030
    public long getToDate() {
13031
      return this.toDate;
13032
    }
13033
 
13034
    public void setToDate(long toDate) {
13035
      this.toDate = toDate;
13036
      setToDateIsSet(true);
13037
    }
13038
 
13039
    public void unsetToDate() {
13040
      __isset_bit_vector.clear(__TODATE_ISSET_ID);
13041
    }
13042
 
13043
    /** Returns true if field toDate is set (has been assigned a value) and false otherwise */
13044
    public boolean isSetToDate() {
13045
      return __isset_bit_vector.get(__TODATE_ISSET_ID);
13046
    }
13047
 
13048
    public void setToDateIsSet(boolean value) {
13049
      __isset_bit_vector.set(__TODATE_ISSET_ID, value);
13050
    }
13051
 
13052
    public void setFieldValue(_Fields field, Object value) {
13053
      switch (field) {
13054
      case ITEM_ID:
13055
        if (value == null) {
13056
          unsetItemId();
13057
        } else {
13058
          setItemId((Long)value);
13059
        }
13060
        break;
13061
 
13062
      case FROM_DATE:
13063
        if (value == null) {
13064
          unsetFromDate();
13065
        } else {
13066
          setFromDate((Long)value);
13067
        }
13068
        break;
13069
 
13070
      case TO_DATE:
13071
        if (value == null) {
13072
          unsetToDate();
13073
        } else {
13074
          setToDate((Long)value);
13075
        }
13076
        break;
13077
 
13078
      }
13079
    }
13080
 
13081
    public Object getFieldValue(_Fields field) {
13082
      switch (field) {
13083
      case ITEM_ID:
13084
        return Long.valueOf(getItemId());
13085
 
13086
      case FROM_DATE:
13087
        return Long.valueOf(getFromDate());
13088
 
13089
      case TO_DATE:
13090
        return Long.valueOf(getToDate());
13091
 
13092
      }
13093
      throw new IllegalStateException();
13094
    }
13095
 
13096
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13097
    public boolean isSet(_Fields field) {
13098
      if (field == null) {
13099
        throw new IllegalArgumentException();
13100
      }
13101
 
13102
      switch (field) {
13103
      case ITEM_ID:
13104
        return isSetItemId();
13105
      case FROM_DATE:
13106
        return isSetFromDate();
13107
      case TO_DATE:
13108
        return isSetToDate();
13109
      }
13110
      throw new IllegalStateException();
13111
    }
13112
 
13113
    @Override
13114
    public boolean equals(Object that) {
13115
      if (that == null)
13116
        return false;
13117
      if (that instanceof getInventoryScansForItem_args)
13118
        return this.equals((getInventoryScansForItem_args)that);
13119
      return false;
13120
    }
13121
 
13122
    public boolean equals(getInventoryScansForItem_args that) {
13123
      if (that == null)
13124
        return false;
13125
 
13126
      boolean this_present_itemId = true;
13127
      boolean that_present_itemId = true;
13128
      if (this_present_itemId || that_present_itemId) {
13129
        if (!(this_present_itemId && that_present_itemId))
13130
          return false;
13131
        if (this.itemId != that.itemId)
13132
          return false;
13133
      }
13134
 
13135
      boolean this_present_fromDate = true;
13136
      boolean that_present_fromDate = true;
13137
      if (this_present_fromDate || that_present_fromDate) {
13138
        if (!(this_present_fromDate && that_present_fromDate))
13139
          return false;
13140
        if (this.fromDate != that.fromDate)
13141
          return false;
13142
      }
13143
 
13144
      boolean this_present_toDate = true;
13145
      boolean that_present_toDate = true;
13146
      if (this_present_toDate || that_present_toDate) {
13147
        if (!(this_present_toDate && that_present_toDate))
13148
          return false;
13149
        if (this.toDate != that.toDate)
13150
          return false;
13151
      }
13152
 
13153
      return true;
13154
    }
13155
 
13156
    @Override
13157
    public int hashCode() {
13158
      return 0;
13159
    }
13160
 
13161
    public int compareTo(getInventoryScansForItem_args other) {
13162
      if (!getClass().equals(other.getClass())) {
13163
        return getClass().getName().compareTo(other.getClass().getName());
13164
      }
13165
 
13166
      int lastComparison = 0;
13167
      getInventoryScansForItem_args typedOther = (getInventoryScansForItem_args)other;
13168
 
13169
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
13170
      if (lastComparison != 0) {
13171
        return lastComparison;
13172
      }
13173
      if (isSetItemId()) {
13174
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
13175
        if (lastComparison != 0) {
13176
          return lastComparison;
13177
        }
13178
      }
13179
      lastComparison = Boolean.valueOf(isSetFromDate()).compareTo(typedOther.isSetFromDate());
13180
      if (lastComparison != 0) {
13181
        return lastComparison;
13182
      }
13183
      if (isSetFromDate()) {
13184
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromDate, typedOther.fromDate);
13185
        if (lastComparison != 0) {
13186
          return lastComparison;
13187
        }
13188
      }
13189
      lastComparison = Boolean.valueOf(isSetToDate()).compareTo(typedOther.isSetToDate());
13190
      if (lastComparison != 0) {
13191
        return lastComparison;
13192
      }
13193
      if (isSetToDate()) {
13194
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toDate, typedOther.toDate);
13195
        if (lastComparison != 0) {
13196
          return lastComparison;
13197
        }
13198
      }
13199
      return 0;
13200
    }
13201
 
13202
    public _Fields fieldForId(int fieldId) {
13203
      return _Fields.findByThriftId(fieldId);
13204
    }
13205
 
13206
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13207
      org.apache.thrift.protocol.TField field;
13208
      iprot.readStructBegin();
13209
      while (true)
13210
      {
13211
        field = iprot.readFieldBegin();
13212
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13213
          break;
13214
        }
13215
        switch (field.id) {
13216
          case 1: // ITEM_ID
13217
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13218
              this.itemId = iprot.readI64();
13219
              setItemIdIsSet(true);
13220
            } else { 
13221
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13222
            }
13223
            break;
13224
          case 2: // FROM_DATE
13225
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13226
              this.fromDate = iprot.readI64();
13227
              setFromDateIsSet(true);
13228
            } else { 
13229
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13230
            }
13231
            break;
13232
          case 3: // TO_DATE
13233
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13234
              this.toDate = iprot.readI64();
13235
              setToDateIsSet(true);
13236
            } else { 
13237
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13238
            }
13239
            break;
13240
          default:
13241
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13242
        }
13243
        iprot.readFieldEnd();
13244
      }
13245
      iprot.readStructEnd();
13246
      validate();
13247
    }
13248
 
13249
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13250
      validate();
13251
 
13252
      oprot.writeStructBegin(STRUCT_DESC);
13253
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
13254
      oprot.writeI64(this.itemId);
13255
      oprot.writeFieldEnd();
13256
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
13257
      oprot.writeI64(this.fromDate);
13258
      oprot.writeFieldEnd();
13259
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
13260
      oprot.writeI64(this.toDate);
13261
      oprot.writeFieldEnd();
13262
      oprot.writeFieldStop();
13263
      oprot.writeStructEnd();
13264
    }
13265
 
13266
    @Override
13267
    public String toString() {
13268
      StringBuilder sb = new StringBuilder("getInventoryScansForItem_args(");
13269
      boolean first = true;
13270
 
13271
      sb.append("itemId:");
13272
      sb.append(this.itemId);
13273
      first = false;
13274
      if (!first) sb.append(", ");
13275
      sb.append("fromDate:");
13276
      sb.append(this.fromDate);
13277
      first = false;
13278
      if (!first) sb.append(", ");
13279
      sb.append("toDate:");
13280
      sb.append(this.toDate);
13281
      first = false;
13282
      sb.append(")");
13283
      return sb.toString();
13284
    }
13285
 
13286
    public void validate() throws org.apache.thrift.TException {
13287
      // check for required fields
13288
    }
13289
 
13290
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13291
      try {
13292
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13293
      } catch (org.apache.thrift.TException te) {
13294
        throw new java.io.IOException(te);
13295
      }
13296
    }
13297
 
13298
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13299
      try {
13300
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13301
      } catch (org.apache.thrift.TException te) {
13302
        throw new java.io.IOException(te);
13303
      }
13304
    }
13305
 
13306
  }
13307
 
13308
  public static class getInventoryScansForItem_result implements org.apache.thrift.TBase<getInventoryScansForItem_result, getInventoryScansForItem_result._Fields>, java.io.Serializable, Cloneable   {
13309
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryScansForItem_result");
13310
 
13311
    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);
13312
 
13313
    private List<Scan> success; // required
13314
 
13315
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13316
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13317
      SUCCESS((short)0, "success");
13318
 
13319
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13320
 
13321
      static {
13322
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13323
          byName.put(field.getFieldName(), field);
13324
        }
13325
      }
13326
 
13327
      /**
13328
       * Find the _Fields constant that matches fieldId, or null if its not found.
13329
       */
13330
      public static _Fields findByThriftId(int fieldId) {
13331
        switch(fieldId) {
13332
          case 0: // SUCCESS
13333
            return SUCCESS;
13334
          default:
13335
            return null;
13336
        }
13337
      }
13338
 
13339
      /**
13340
       * Find the _Fields constant that matches fieldId, throwing an exception
13341
       * if it is not found.
13342
       */
13343
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13344
        _Fields fields = findByThriftId(fieldId);
13345
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13346
        return fields;
13347
      }
13348
 
13349
      /**
13350
       * Find the _Fields constant that matches name, or null if its not found.
13351
       */
13352
      public static _Fields findByName(String name) {
13353
        return byName.get(name);
13354
      }
13355
 
13356
      private final short _thriftId;
13357
      private final String _fieldName;
13358
 
13359
      _Fields(short thriftId, String fieldName) {
13360
        _thriftId = thriftId;
13361
        _fieldName = fieldName;
13362
      }
13363
 
13364
      public short getThriftFieldId() {
13365
        return _thriftId;
13366
      }
13367
 
13368
      public String getFieldName() {
13369
        return _fieldName;
13370
      }
13371
    }
13372
 
13373
    // isset id assignments
13374
 
13375
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13376
    static {
13377
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13378
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13379
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13380
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Scan.class))));
13381
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13382
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryScansForItem_result.class, metaDataMap);
13383
    }
13384
 
13385
    public getInventoryScansForItem_result() {
13386
    }
13387
 
13388
    public getInventoryScansForItem_result(
13389
      List<Scan> success)
13390
    {
13391
      this();
13392
      this.success = success;
13393
    }
13394
 
13395
    /**
13396
     * Performs a deep copy on <i>other</i>.
13397
     */
13398
    public getInventoryScansForItem_result(getInventoryScansForItem_result other) {
13399
      if (other.isSetSuccess()) {
13400
        List<Scan> __this__success = new ArrayList<Scan>();
13401
        for (Scan other_element : other.success) {
13402
          __this__success.add(new Scan(other_element));
13403
        }
13404
        this.success = __this__success;
13405
      }
13406
    }
13407
 
13408
    public getInventoryScansForItem_result deepCopy() {
13409
      return new getInventoryScansForItem_result(this);
13410
    }
13411
 
13412
    @Override
13413
    public void clear() {
13414
      this.success = null;
13415
    }
13416
 
13417
    public int getSuccessSize() {
13418
      return (this.success == null) ? 0 : this.success.size();
13419
    }
13420
 
13421
    public java.util.Iterator<Scan> getSuccessIterator() {
13422
      return (this.success == null) ? null : this.success.iterator();
13423
    }
13424
 
13425
    public void addToSuccess(Scan elem) {
13426
      if (this.success == null) {
13427
        this.success = new ArrayList<Scan>();
13428
      }
13429
      this.success.add(elem);
13430
    }
13431
 
13432
    public List<Scan> getSuccess() {
13433
      return this.success;
13434
    }
13435
 
13436
    public void setSuccess(List<Scan> success) {
13437
      this.success = success;
13438
    }
13439
 
13440
    public void unsetSuccess() {
13441
      this.success = null;
13442
    }
13443
 
13444
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13445
    public boolean isSetSuccess() {
13446
      return this.success != null;
13447
    }
13448
 
13449
    public void setSuccessIsSet(boolean value) {
13450
      if (!value) {
13451
        this.success = null;
13452
      }
13453
    }
13454
 
13455
    public void setFieldValue(_Fields field, Object value) {
13456
      switch (field) {
13457
      case SUCCESS:
13458
        if (value == null) {
13459
          unsetSuccess();
13460
        } else {
13461
          setSuccess((List<Scan>)value);
13462
        }
13463
        break;
13464
 
13465
      }
13466
    }
13467
 
13468
    public Object getFieldValue(_Fields field) {
13469
      switch (field) {
13470
      case SUCCESS:
13471
        return getSuccess();
13472
 
13473
      }
13474
      throw new IllegalStateException();
13475
    }
13476
 
13477
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13478
    public boolean isSet(_Fields field) {
13479
      if (field == null) {
13480
        throw new IllegalArgumentException();
13481
      }
13482
 
13483
      switch (field) {
13484
      case SUCCESS:
13485
        return isSetSuccess();
13486
      }
13487
      throw new IllegalStateException();
13488
    }
13489
 
13490
    @Override
13491
    public boolean equals(Object that) {
13492
      if (that == null)
13493
        return false;
13494
      if (that instanceof getInventoryScansForItem_result)
13495
        return this.equals((getInventoryScansForItem_result)that);
13496
      return false;
13497
    }
13498
 
13499
    public boolean equals(getInventoryScansForItem_result that) {
13500
      if (that == null)
13501
        return false;
13502
 
13503
      boolean this_present_success = true && this.isSetSuccess();
13504
      boolean that_present_success = true && that.isSetSuccess();
13505
      if (this_present_success || that_present_success) {
13506
        if (!(this_present_success && that_present_success))
13507
          return false;
13508
        if (!this.success.equals(that.success))
13509
          return false;
13510
      }
13511
 
13512
      return true;
13513
    }
13514
 
13515
    @Override
13516
    public int hashCode() {
13517
      return 0;
13518
    }
13519
 
13520
    public int compareTo(getInventoryScansForItem_result other) {
13521
      if (!getClass().equals(other.getClass())) {
13522
        return getClass().getName().compareTo(other.getClass().getName());
13523
      }
13524
 
13525
      int lastComparison = 0;
13526
      getInventoryScansForItem_result typedOther = (getInventoryScansForItem_result)other;
13527
 
13528
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13529
      if (lastComparison != 0) {
13530
        return lastComparison;
13531
      }
13532
      if (isSetSuccess()) {
13533
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13534
        if (lastComparison != 0) {
13535
          return lastComparison;
13536
        }
13537
      }
13538
      return 0;
13539
    }
13540
 
13541
    public _Fields fieldForId(int fieldId) {
13542
      return _Fields.findByThriftId(fieldId);
13543
    }
13544
 
13545
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13546
      org.apache.thrift.protocol.TField field;
13547
      iprot.readStructBegin();
13548
      while (true)
13549
      {
13550
        field = iprot.readFieldBegin();
13551
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13552
          break;
13553
        }
13554
        switch (field.id) {
13555
          case 0: // SUCCESS
13556
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13557
              {
13558
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
13559
                this.success = new ArrayList<Scan>(_list24.size);
13560
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
13561
                {
13562
                  Scan _elem26; // required
13563
                  _elem26 = new Scan();
13564
                  _elem26.read(iprot);
13565
                  this.success.add(_elem26);
13566
                }
13567
                iprot.readListEnd();
13568
              }
13569
            } else { 
13570
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13571
            }
13572
            break;
13573
          default:
13574
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13575
        }
13576
        iprot.readFieldEnd();
13577
      }
13578
      iprot.readStructEnd();
13579
      validate();
13580
    }
13581
 
13582
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13583
      oprot.writeStructBegin(STRUCT_DESC);
13584
 
13585
      if (this.isSetSuccess()) {
13586
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13587
        {
13588
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
13589
          for (Scan _iter27 : this.success)
13590
          {
13591
            _iter27.write(oprot);
13592
          }
13593
          oprot.writeListEnd();
13594
        }
13595
        oprot.writeFieldEnd();
13596
      }
13597
      oprot.writeFieldStop();
13598
      oprot.writeStructEnd();
13599
    }
13600
 
13601
    @Override
13602
    public String toString() {
13603
      StringBuilder sb = new StringBuilder("getInventoryScansForItem_result(");
13604
      boolean first = true;
13605
 
13606
      sb.append("success:");
13607
      if (this.success == null) {
13608
        sb.append("null");
13609
      } else {
13610
        sb.append(this.success);
13611
      }
13612
      first = false;
13613
      sb.append(")");
13614
      return sb.toString();
13615
    }
13616
 
13617
    public void validate() throws org.apache.thrift.TException {
13618
      // check for required fields
13619
    }
13620
 
13621
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13622
      try {
13623
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13624
      } catch (org.apache.thrift.TException te) {
13625
        throw new java.io.IOException(te);
13626
      }
13627
    }
13628
 
13629
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13630
      try {
13631
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13632
      } catch (org.apache.thrift.TException te) {
13633
        throw new java.io.IOException(te);
13634
      }
13635
    }
13636
 
13637
  }
13638
 
13639
  public static class getScanRecordsForSerialNumber_args implements org.apache.thrift.TBase<getScanRecordsForSerialNumber_args, getScanRecordsForSerialNumber_args._Fields>, java.io.Serializable, Cloneable   {
13640
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScanRecordsForSerialNumber_args");
13641
 
13642
    private static final org.apache.thrift.protocol.TField SERIAL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("serialNumber", org.apache.thrift.protocol.TType.I64, (short)1);
13643
 
13644
    private long serialNumber; // required
13645
 
13646
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13647
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13648
      SERIAL_NUMBER((short)1, "serialNumber");
13649
 
13650
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13651
 
13652
      static {
13653
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13654
          byName.put(field.getFieldName(), field);
13655
        }
13656
      }
13657
 
13658
      /**
13659
       * Find the _Fields constant that matches fieldId, or null if its not found.
13660
       */
13661
      public static _Fields findByThriftId(int fieldId) {
13662
        switch(fieldId) {
13663
          case 1: // SERIAL_NUMBER
13664
            return SERIAL_NUMBER;
13665
          default:
13666
            return null;
13667
        }
13668
      }
13669
 
13670
      /**
13671
       * Find the _Fields constant that matches fieldId, throwing an exception
13672
       * if it is not found.
13673
       */
13674
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13675
        _Fields fields = findByThriftId(fieldId);
13676
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13677
        return fields;
13678
      }
13679
 
13680
      /**
13681
       * Find the _Fields constant that matches name, or null if its not found.
13682
       */
13683
      public static _Fields findByName(String name) {
13684
        return byName.get(name);
13685
      }
13686
 
13687
      private final short _thriftId;
13688
      private final String _fieldName;
13689
 
13690
      _Fields(short thriftId, String fieldName) {
13691
        _thriftId = thriftId;
13692
        _fieldName = fieldName;
13693
      }
13694
 
13695
      public short getThriftFieldId() {
13696
        return _thriftId;
13697
      }
13698
 
13699
      public String getFieldName() {
13700
        return _fieldName;
13701
      }
13702
    }
13703
 
13704
    // isset id assignments
13705
    private static final int __SERIALNUMBER_ISSET_ID = 0;
13706
    private BitSet __isset_bit_vector = new BitSet(1);
13707
 
13708
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13709
    static {
13710
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13711
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13712
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13713
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13714
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScanRecordsForSerialNumber_args.class, metaDataMap);
13715
    }
13716
 
13717
    public getScanRecordsForSerialNumber_args() {
13718
    }
13719
 
13720
    public getScanRecordsForSerialNumber_args(
13721
      long serialNumber)
13722
    {
13723
      this();
13724
      this.serialNumber = serialNumber;
13725
      setSerialNumberIsSet(true);
13726
    }
13727
 
13728
    /**
13729
     * Performs a deep copy on <i>other</i>.
13730
     */
13731
    public getScanRecordsForSerialNumber_args(getScanRecordsForSerialNumber_args other) {
13732
      __isset_bit_vector.clear();
13733
      __isset_bit_vector.or(other.__isset_bit_vector);
13734
      this.serialNumber = other.serialNumber;
13735
    }
13736
 
13737
    public getScanRecordsForSerialNumber_args deepCopy() {
13738
      return new getScanRecordsForSerialNumber_args(this);
13739
    }
13740
 
13741
    @Override
13742
    public void clear() {
13743
      setSerialNumberIsSet(false);
13744
      this.serialNumber = 0;
13745
    }
13746
 
13747
    public long getSerialNumber() {
13748
      return this.serialNumber;
13749
    }
13750
 
13751
    public void setSerialNumber(long serialNumber) {
13752
      this.serialNumber = serialNumber;
13753
      setSerialNumberIsSet(true);
13754
    }
13755
 
13756
    public void unsetSerialNumber() {
13757
      __isset_bit_vector.clear(__SERIALNUMBER_ISSET_ID);
13758
    }
13759
 
13760
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
13761
    public boolean isSetSerialNumber() {
13762
      return __isset_bit_vector.get(__SERIALNUMBER_ISSET_ID);
13763
    }
13764
 
13765
    public void setSerialNumberIsSet(boolean value) {
13766
      __isset_bit_vector.set(__SERIALNUMBER_ISSET_ID, value);
13767
    }
13768
 
13769
    public void setFieldValue(_Fields field, Object value) {
13770
      switch (field) {
13771
      case SERIAL_NUMBER:
13772
        if (value == null) {
13773
          unsetSerialNumber();
13774
        } else {
13775
          setSerialNumber((Long)value);
13776
        }
13777
        break;
13778
 
13779
      }
13780
    }
13781
 
13782
    public Object getFieldValue(_Fields field) {
13783
      switch (field) {
13784
      case SERIAL_NUMBER:
13785
        return Long.valueOf(getSerialNumber());
13786
 
13787
      }
13788
      throw new IllegalStateException();
13789
    }
13790
 
13791
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13792
    public boolean isSet(_Fields field) {
13793
      if (field == null) {
13794
        throw new IllegalArgumentException();
13795
      }
13796
 
13797
      switch (field) {
13798
      case SERIAL_NUMBER:
13799
        return isSetSerialNumber();
13800
      }
13801
      throw new IllegalStateException();
13802
    }
13803
 
13804
    @Override
13805
    public boolean equals(Object that) {
13806
      if (that == null)
13807
        return false;
13808
      if (that instanceof getScanRecordsForSerialNumber_args)
13809
        return this.equals((getScanRecordsForSerialNumber_args)that);
13810
      return false;
13811
    }
13812
 
13813
    public boolean equals(getScanRecordsForSerialNumber_args that) {
13814
      if (that == null)
13815
        return false;
13816
 
13817
      boolean this_present_serialNumber = true;
13818
      boolean that_present_serialNumber = true;
13819
      if (this_present_serialNumber || that_present_serialNumber) {
13820
        if (!(this_present_serialNumber && that_present_serialNumber))
13821
          return false;
13822
        if (this.serialNumber != that.serialNumber)
13823
          return false;
13824
      }
13825
 
13826
      return true;
13827
    }
13828
 
13829
    @Override
13830
    public int hashCode() {
13831
      return 0;
13832
    }
13833
 
13834
    public int compareTo(getScanRecordsForSerialNumber_args other) {
13835
      if (!getClass().equals(other.getClass())) {
13836
        return getClass().getName().compareTo(other.getClass().getName());
13837
      }
13838
 
13839
      int lastComparison = 0;
13840
      getScanRecordsForSerialNumber_args typedOther = (getScanRecordsForSerialNumber_args)other;
13841
 
13842
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
13843
      if (lastComparison != 0) {
13844
        return lastComparison;
13845
      }
13846
      if (isSetSerialNumber()) {
13847
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
13848
        if (lastComparison != 0) {
13849
          return lastComparison;
13850
        }
13851
      }
13852
      return 0;
13853
    }
13854
 
13855
    public _Fields fieldForId(int fieldId) {
13856
      return _Fields.findByThriftId(fieldId);
13857
    }
13858
 
13859
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13860
      org.apache.thrift.protocol.TField field;
13861
      iprot.readStructBegin();
13862
      while (true)
13863
      {
13864
        field = iprot.readFieldBegin();
13865
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13866
          break;
13867
        }
13868
        switch (field.id) {
13869
          case 1: // SERIAL_NUMBER
13870
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13871
              this.serialNumber = iprot.readI64();
13872
              setSerialNumberIsSet(true);
13873
            } else { 
13874
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13875
            }
13876
            break;
13877
          default:
13878
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13879
        }
13880
        iprot.readFieldEnd();
13881
      }
13882
      iprot.readStructEnd();
13883
      validate();
13884
    }
13885
 
13886
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13887
      validate();
13888
 
13889
      oprot.writeStructBegin(STRUCT_DESC);
13890
      oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
13891
      oprot.writeI64(this.serialNumber);
13892
      oprot.writeFieldEnd();
13893
      oprot.writeFieldStop();
13894
      oprot.writeStructEnd();
13895
    }
13896
 
13897
    @Override
13898
    public String toString() {
13899
      StringBuilder sb = new StringBuilder("getScanRecordsForSerialNumber_args(");
13900
      boolean first = true;
13901
 
13902
      sb.append("serialNumber:");
13903
      sb.append(this.serialNumber);
13904
      first = false;
13905
      sb.append(")");
13906
      return sb.toString();
13907
    }
13908
 
13909
    public void validate() throws org.apache.thrift.TException {
13910
      // check for required fields
13911
    }
13912
 
13913
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13914
      try {
13915
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13916
      } catch (org.apache.thrift.TException te) {
13917
        throw new java.io.IOException(te);
13918
      }
13919
    }
13920
 
13921
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13922
      try {
13923
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
13924
        __isset_bit_vector = new BitSet(1);
13925
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13926
      } catch (org.apache.thrift.TException te) {
13927
        throw new java.io.IOException(te);
13928
      }
13929
    }
13930
 
13931
  }
13932
 
13933
  public static class getScanRecordsForSerialNumber_result implements org.apache.thrift.TBase<getScanRecordsForSerialNumber_result, getScanRecordsForSerialNumber_result._Fields>, java.io.Serializable, Cloneable   {
13934
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScanRecordsForSerialNumber_result");
13935
 
13936
    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);
13937
 
13938
    private List<Scan> success; // required
13939
 
13940
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13941
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13942
      SUCCESS((short)0, "success");
13943
 
13944
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13945
 
13946
      static {
13947
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13948
          byName.put(field.getFieldName(), field);
13949
        }
13950
      }
13951
 
13952
      /**
13953
       * Find the _Fields constant that matches fieldId, or null if its not found.
13954
       */
13955
      public static _Fields findByThriftId(int fieldId) {
13956
        switch(fieldId) {
13957
          case 0: // SUCCESS
13958
            return SUCCESS;
13959
          default:
13960
            return null;
13961
        }
13962
      }
13963
 
13964
      /**
13965
       * Find the _Fields constant that matches fieldId, throwing an exception
13966
       * if it is not found.
13967
       */
13968
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13969
        _Fields fields = findByThriftId(fieldId);
13970
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13971
        return fields;
13972
      }
13973
 
13974
      /**
13975
       * Find the _Fields constant that matches name, or null if its not found.
13976
       */
13977
      public static _Fields findByName(String name) {
13978
        return byName.get(name);
13979
      }
13980
 
13981
      private final short _thriftId;
13982
      private final String _fieldName;
13983
 
13984
      _Fields(short thriftId, String fieldName) {
13985
        _thriftId = thriftId;
13986
        _fieldName = fieldName;
13987
      }
13988
 
13989
      public short getThriftFieldId() {
13990
        return _thriftId;
13991
      }
13992
 
13993
      public String getFieldName() {
13994
        return _fieldName;
13995
      }
13996
    }
13997
 
13998
    // isset id assignments
13999
 
14000
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14001
    static {
14002
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14003
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14004
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
14005
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Scan.class))));
14006
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14007
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScanRecordsForSerialNumber_result.class, metaDataMap);
14008
    }
14009
 
14010
    public getScanRecordsForSerialNumber_result() {
14011
    }
14012
 
14013
    public getScanRecordsForSerialNumber_result(
14014
      List<Scan> success)
14015
    {
14016
      this();
14017
      this.success = success;
14018
    }
14019
 
14020
    /**
14021
     * Performs a deep copy on <i>other</i>.
14022
     */
14023
    public getScanRecordsForSerialNumber_result(getScanRecordsForSerialNumber_result other) {
14024
      if (other.isSetSuccess()) {
14025
        List<Scan> __this__success = new ArrayList<Scan>();
14026
        for (Scan other_element : other.success) {
14027
          __this__success.add(new Scan(other_element));
14028
        }
14029
        this.success = __this__success;
14030
      }
14031
    }
14032
 
14033
    public getScanRecordsForSerialNumber_result deepCopy() {
14034
      return new getScanRecordsForSerialNumber_result(this);
14035
    }
14036
 
14037
    @Override
14038
    public void clear() {
14039
      this.success = null;
14040
    }
14041
 
14042
    public int getSuccessSize() {
14043
      return (this.success == null) ? 0 : this.success.size();
14044
    }
14045
 
14046
    public java.util.Iterator<Scan> getSuccessIterator() {
14047
      return (this.success == null) ? null : this.success.iterator();
14048
    }
14049
 
14050
    public void addToSuccess(Scan elem) {
14051
      if (this.success == null) {
14052
        this.success = new ArrayList<Scan>();
14053
      }
14054
      this.success.add(elem);
14055
    }
14056
 
14057
    public List<Scan> getSuccess() {
14058
      return this.success;
14059
    }
14060
 
14061
    public void setSuccess(List<Scan> success) {
14062
      this.success = success;
14063
    }
14064
 
14065
    public void unsetSuccess() {
14066
      this.success = null;
14067
    }
14068
 
14069
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14070
    public boolean isSetSuccess() {
14071
      return this.success != null;
14072
    }
14073
 
14074
    public void setSuccessIsSet(boolean value) {
14075
      if (!value) {
14076
        this.success = null;
14077
      }
14078
    }
14079
 
14080
    public void setFieldValue(_Fields field, Object value) {
14081
      switch (field) {
14082
      case SUCCESS:
14083
        if (value == null) {
14084
          unsetSuccess();
14085
        } else {
14086
          setSuccess((List<Scan>)value);
14087
        }
14088
        break;
14089
 
14090
      }
14091
    }
14092
 
14093
    public Object getFieldValue(_Fields field) {
14094
      switch (field) {
14095
      case SUCCESS:
14096
        return getSuccess();
14097
 
14098
      }
14099
      throw new IllegalStateException();
14100
    }
14101
 
14102
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14103
    public boolean isSet(_Fields field) {
14104
      if (field == null) {
14105
        throw new IllegalArgumentException();
14106
      }
14107
 
14108
      switch (field) {
14109
      case SUCCESS:
14110
        return isSetSuccess();
14111
      }
14112
      throw new IllegalStateException();
14113
    }
14114
 
14115
    @Override
14116
    public boolean equals(Object that) {
14117
      if (that == null)
14118
        return false;
14119
      if (that instanceof getScanRecordsForSerialNumber_result)
14120
        return this.equals((getScanRecordsForSerialNumber_result)that);
14121
      return false;
14122
    }
14123
 
14124
    public boolean equals(getScanRecordsForSerialNumber_result that) {
14125
      if (that == null)
14126
        return false;
14127
 
14128
      boolean this_present_success = true && this.isSetSuccess();
14129
      boolean that_present_success = true && that.isSetSuccess();
14130
      if (this_present_success || that_present_success) {
14131
        if (!(this_present_success && that_present_success))
14132
          return false;
14133
        if (!this.success.equals(that.success))
14134
          return false;
14135
      }
14136
 
14137
      return true;
14138
    }
14139
 
14140
    @Override
14141
    public int hashCode() {
14142
      return 0;
14143
    }
14144
 
14145
    public int compareTo(getScanRecordsForSerialNumber_result other) {
14146
      if (!getClass().equals(other.getClass())) {
14147
        return getClass().getName().compareTo(other.getClass().getName());
14148
      }
14149
 
14150
      int lastComparison = 0;
14151
      getScanRecordsForSerialNumber_result typedOther = (getScanRecordsForSerialNumber_result)other;
14152
 
14153
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14154
      if (lastComparison != 0) {
14155
        return lastComparison;
14156
      }
14157
      if (isSetSuccess()) {
14158
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14159
        if (lastComparison != 0) {
14160
          return lastComparison;
14161
        }
14162
      }
14163
      return 0;
14164
    }
14165
 
14166
    public _Fields fieldForId(int fieldId) {
14167
      return _Fields.findByThriftId(fieldId);
14168
    }
14169
 
14170
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14171
      org.apache.thrift.protocol.TField field;
14172
      iprot.readStructBegin();
14173
      while (true)
14174
      {
14175
        field = iprot.readFieldBegin();
14176
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14177
          break;
14178
        }
14179
        switch (field.id) {
14180
          case 0: // SUCCESS
14181
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
14182
              {
14183
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
14184
                this.success = new ArrayList<Scan>(_list28.size);
14185
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
14186
                {
14187
                  Scan _elem30; // required
14188
                  _elem30 = new Scan();
14189
                  _elem30.read(iprot);
14190
                  this.success.add(_elem30);
14191
                }
14192
                iprot.readListEnd();
14193
              }
14194
            } else { 
14195
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14196
            }
14197
            break;
14198
          default:
14199
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14200
        }
14201
        iprot.readFieldEnd();
14202
      }
14203
      iprot.readStructEnd();
14204
      validate();
14205
    }
14206
 
14207
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14208
      oprot.writeStructBegin(STRUCT_DESC);
14209
 
14210
      if (this.isSetSuccess()) {
14211
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14212
        {
14213
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
14214
          for (Scan _iter31 : this.success)
14215
          {
14216
            _iter31.write(oprot);
14217
          }
14218
          oprot.writeListEnd();
14219
        }
14220
        oprot.writeFieldEnd();
14221
      }
14222
      oprot.writeFieldStop();
14223
      oprot.writeStructEnd();
14224
    }
14225
 
14226
    @Override
14227
    public String toString() {
14228
      StringBuilder sb = new StringBuilder("getScanRecordsForSerialNumber_result(");
14229
      boolean first = true;
14230
 
14231
      sb.append("success:");
14232
      if (this.success == null) {
14233
        sb.append("null");
14234
      } else {
14235
        sb.append(this.success);
14236
      }
14237
      first = false;
14238
      sb.append(")");
14239
      return sb.toString();
14240
    }
14241
 
14242
    public void validate() throws org.apache.thrift.TException {
14243
      // check for required fields
14244
    }
14245
 
14246
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14247
      try {
14248
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14249
      } catch (org.apache.thrift.TException te) {
14250
        throw new java.io.IOException(te);
14251
      }
14252
    }
14253
 
14254
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14255
      try {
14256
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14257
      } catch (org.apache.thrift.TException te) {
14258
        throw new java.io.IOException(te);
14259
      }
14260
    }
14261
 
14262
  }
14263
 
6467 amar.kumar 14264
  public static class scanForPurchaseReturn_args implements org.apache.thrift.TBase<scanForPurchaseReturn_args, scanForPurchaseReturn_args._Fields>, java.io.Serializable, Cloneable   {
14265
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForPurchaseReturn_args");
14266
 
14267
    private static final org.apache.thrift.protocol.TField SALE_RETURN_ITEMS_FIELD_DESC = new org.apache.thrift.protocol.TField("saleReturnItems", org.apache.thrift.protocol.TType.LIST, (short)1);
14268
    private static final org.apache.thrift.protocol.TField VENDOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorId", org.apache.thrift.protocol.TType.I64, (short)2);
14269
 
14270
    private List<InventoryItem> saleReturnItems; // required
14271
    private long vendorId; // required
14272
 
14273
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14274
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14275
      SALE_RETURN_ITEMS((short)1, "saleReturnItems"),
14276
      VENDOR_ID((short)2, "vendorId");
14277
 
14278
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14279
 
14280
      static {
14281
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14282
          byName.put(field.getFieldName(), field);
14283
        }
14284
      }
14285
 
14286
      /**
14287
       * Find the _Fields constant that matches fieldId, or null if its not found.
14288
       */
14289
      public static _Fields findByThriftId(int fieldId) {
14290
        switch(fieldId) {
14291
          case 1: // SALE_RETURN_ITEMS
14292
            return SALE_RETURN_ITEMS;
14293
          case 2: // VENDOR_ID
14294
            return VENDOR_ID;
14295
          default:
14296
            return null;
14297
        }
14298
      }
14299
 
14300
      /**
14301
       * Find the _Fields constant that matches fieldId, throwing an exception
14302
       * if it is not found.
14303
       */
14304
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14305
        _Fields fields = findByThriftId(fieldId);
14306
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14307
        return fields;
14308
      }
14309
 
14310
      /**
14311
       * Find the _Fields constant that matches name, or null if its not found.
14312
       */
14313
      public static _Fields findByName(String name) {
14314
        return byName.get(name);
14315
      }
14316
 
14317
      private final short _thriftId;
14318
      private final String _fieldName;
14319
 
14320
      _Fields(short thriftId, String fieldName) {
14321
        _thriftId = thriftId;
14322
        _fieldName = fieldName;
14323
      }
14324
 
14325
      public short getThriftFieldId() {
14326
        return _thriftId;
14327
      }
14328
 
14329
      public String getFieldName() {
14330
        return _fieldName;
14331
      }
14332
    }
14333
 
14334
    // isset id assignments
14335
    private static final int __VENDORID_ISSET_ID = 0;
14336
    private BitSet __isset_bit_vector = new BitSet(1);
14337
 
14338
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14339
    static {
14340
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14341
      tmpMap.put(_Fields.SALE_RETURN_ITEMS, new org.apache.thrift.meta_data.FieldMetaData("saleReturnItems", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14342
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
14343
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
14344
      tmpMap.put(_Fields.VENDOR_ID, new org.apache.thrift.meta_data.FieldMetaData("vendorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14345
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14346
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14347
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForPurchaseReturn_args.class, metaDataMap);
14348
    }
14349
 
14350
    public scanForPurchaseReturn_args() {
14351
    }
14352
 
14353
    public scanForPurchaseReturn_args(
14354
      List<InventoryItem> saleReturnItems,
14355
      long vendorId)
14356
    {
14357
      this();
14358
      this.saleReturnItems = saleReturnItems;
14359
      this.vendorId = vendorId;
14360
      setVendorIdIsSet(true);
14361
    }
14362
 
14363
    /**
14364
     * Performs a deep copy on <i>other</i>.
14365
     */
14366
    public scanForPurchaseReturn_args(scanForPurchaseReturn_args other) {
14367
      __isset_bit_vector.clear();
14368
      __isset_bit_vector.or(other.__isset_bit_vector);
14369
      if (other.isSetSaleReturnItems()) {
14370
        List<InventoryItem> __this__saleReturnItems = new ArrayList<InventoryItem>();
14371
        for (InventoryItem other_element : other.saleReturnItems) {
14372
          __this__saleReturnItems.add(new InventoryItem(other_element));
14373
        }
14374
        this.saleReturnItems = __this__saleReturnItems;
14375
      }
14376
      this.vendorId = other.vendorId;
14377
    }
14378
 
14379
    public scanForPurchaseReturn_args deepCopy() {
14380
      return new scanForPurchaseReturn_args(this);
14381
    }
14382
 
14383
    @Override
14384
    public void clear() {
14385
      this.saleReturnItems = null;
14386
      setVendorIdIsSet(false);
14387
      this.vendorId = 0;
14388
    }
14389
 
14390
    public int getSaleReturnItemsSize() {
14391
      return (this.saleReturnItems == null) ? 0 : this.saleReturnItems.size();
14392
    }
14393
 
14394
    public java.util.Iterator<InventoryItem> getSaleReturnItemsIterator() {
14395
      return (this.saleReturnItems == null) ? null : this.saleReturnItems.iterator();
14396
    }
14397
 
14398
    public void addToSaleReturnItems(InventoryItem elem) {
14399
      if (this.saleReturnItems == null) {
14400
        this.saleReturnItems = new ArrayList<InventoryItem>();
14401
      }
14402
      this.saleReturnItems.add(elem);
14403
    }
14404
 
14405
    public List<InventoryItem> getSaleReturnItems() {
14406
      return this.saleReturnItems;
14407
    }
14408
 
14409
    public void setSaleReturnItems(List<InventoryItem> saleReturnItems) {
14410
      this.saleReturnItems = saleReturnItems;
14411
    }
14412
 
14413
    public void unsetSaleReturnItems() {
14414
      this.saleReturnItems = null;
14415
    }
14416
 
14417
    /** Returns true if field saleReturnItems is set (has been assigned a value) and false otherwise */
14418
    public boolean isSetSaleReturnItems() {
14419
      return this.saleReturnItems != null;
14420
    }
14421
 
14422
    public void setSaleReturnItemsIsSet(boolean value) {
14423
      if (!value) {
14424
        this.saleReturnItems = null;
14425
      }
14426
    }
14427
 
14428
    public long getVendorId() {
14429
      return this.vendorId;
14430
    }
14431
 
14432
    public void setVendorId(long vendorId) {
14433
      this.vendorId = vendorId;
14434
      setVendorIdIsSet(true);
14435
    }
14436
 
14437
    public void unsetVendorId() {
14438
      __isset_bit_vector.clear(__VENDORID_ISSET_ID);
14439
    }
14440
 
14441
    /** Returns true if field vendorId is set (has been assigned a value) and false otherwise */
14442
    public boolean isSetVendorId() {
14443
      return __isset_bit_vector.get(__VENDORID_ISSET_ID);
14444
    }
14445
 
14446
    public void setVendorIdIsSet(boolean value) {
14447
      __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
14448
    }
14449
 
14450
    public void setFieldValue(_Fields field, Object value) {
14451
      switch (field) {
14452
      case SALE_RETURN_ITEMS:
14453
        if (value == null) {
14454
          unsetSaleReturnItems();
14455
        } else {
14456
          setSaleReturnItems((List<InventoryItem>)value);
14457
        }
14458
        break;
14459
 
14460
      case VENDOR_ID:
14461
        if (value == null) {
14462
          unsetVendorId();
14463
        } else {
14464
          setVendorId((Long)value);
14465
        }
14466
        break;
14467
 
14468
      }
14469
    }
14470
 
14471
    public Object getFieldValue(_Fields field) {
14472
      switch (field) {
14473
      case SALE_RETURN_ITEMS:
14474
        return getSaleReturnItems();
14475
 
14476
      case VENDOR_ID:
14477
        return Long.valueOf(getVendorId());
14478
 
14479
      }
14480
      throw new IllegalStateException();
14481
    }
14482
 
14483
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14484
    public boolean isSet(_Fields field) {
14485
      if (field == null) {
14486
        throw new IllegalArgumentException();
14487
      }
14488
 
14489
      switch (field) {
14490
      case SALE_RETURN_ITEMS:
14491
        return isSetSaleReturnItems();
14492
      case VENDOR_ID:
14493
        return isSetVendorId();
14494
      }
14495
      throw new IllegalStateException();
14496
    }
14497
 
14498
    @Override
14499
    public boolean equals(Object that) {
14500
      if (that == null)
14501
        return false;
14502
      if (that instanceof scanForPurchaseReturn_args)
14503
        return this.equals((scanForPurchaseReturn_args)that);
14504
      return false;
14505
    }
14506
 
14507
    public boolean equals(scanForPurchaseReturn_args that) {
14508
      if (that == null)
14509
        return false;
14510
 
14511
      boolean this_present_saleReturnItems = true && this.isSetSaleReturnItems();
14512
      boolean that_present_saleReturnItems = true && that.isSetSaleReturnItems();
14513
      if (this_present_saleReturnItems || that_present_saleReturnItems) {
14514
        if (!(this_present_saleReturnItems && that_present_saleReturnItems))
14515
          return false;
14516
        if (!this.saleReturnItems.equals(that.saleReturnItems))
14517
          return false;
14518
      }
14519
 
14520
      boolean this_present_vendorId = true;
14521
      boolean that_present_vendorId = true;
14522
      if (this_present_vendorId || that_present_vendorId) {
14523
        if (!(this_present_vendorId && that_present_vendorId))
14524
          return false;
14525
        if (this.vendorId != that.vendorId)
14526
          return false;
14527
      }
14528
 
14529
      return true;
14530
    }
14531
 
14532
    @Override
14533
    public int hashCode() {
14534
      return 0;
14535
    }
14536
 
14537
    public int compareTo(scanForPurchaseReturn_args other) {
14538
      if (!getClass().equals(other.getClass())) {
14539
        return getClass().getName().compareTo(other.getClass().getName());
14540
      }
14541
 
14542
      int lastComparison = 0;
14543
      scanForPurchaseReturn_args typedOther = (scanForPurchaseReturn_args)other;
14544
 
14545
      lastComparison = Boolean.valueOf(isSetSaleReturnItems()).compareTo(typedOther.isSetSaleReturnItems());
14546
      if (lastComparison != 0) {
14547
        return lastComparison;
14548
      }
14549
      if (isSetSaleReturnItems()) {
14550
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.saleReturnItems, typedOther.saleReturnItems);
14551
        if (lastComparison != 0) {
14552
          return lastComparison;
14553
        }
14554
      }
14555
      lastComparison = Boolean.valueOf(isSetVendorId()).compareTo(typedOther.isSetVendorId());
14556
      if (lastComparison != 0) {
14557
        return lastComparison;
14558
      }
14559
      if (isSetVendorId()) {
14560
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorId, typedOther.vendorId);
14561
        if (lastComparison != 0) {
14562
          return lastComparison;
14563
        }
14564
      }
14565
      return 0;
14566
    }
14567
 
14568
    public _Fields fieldForId(int fieldId) {
14569
      return _Fields.findByThriftId(fieldId);
14570
    }
14571
 
14572
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14573
      org.apache.thrift.protocol.TField field;
14574
      iprot.readStructBegin();
14575
      while (true)
14576
      {
14577
        field = iprot.readFieldBegin();
14578
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14579
          break;
14580
        }
14581
        switch (field.id) {
14582
          case 1: // SALE_RETURN_ITEMS
14583
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
14584
              {
14585
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
14586
                this.saleReturnItems = new ArrayList<InventoryItem>(_list32.size);
14587
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
14588
                {
14589
                  InventoryItem _elem34; // required
14590
                  _elem34 = new InventoryItem();
14591
                  _elem34.read(iprot);
14592
                  this.saleReturnItems.add(_elem34);
14593
                }
14594
                iprot.readListEnd();
14595
              }
14596
            } else { 
14597
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14598
            }
14599
            break;
14600
          case 2: // VENDOR_ID
14601
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14602
              this.vendorId = iprot.readI64();
14603
              setVendorIdIsSet(true);
14604
            } else { 
14605
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14606
            }
14607
            break;
14608
          default:
14609
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14610
        }
14611
        iprot.readFieldEnd();
14612
      }
14613
      iprot.readStructEnd();
14614
      validate();
14615
    }
14616
 
14617
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14618
      validate();
14619
 
14620
      oprot.writeStructBegin(STRUCT_DESC);
14621
      if (this.saleReturnItems != null) {
14622
        oprot.writeFieldBegin(SALE_RETURN_ITEMS_FIELD_DESC);
14623
        {
14624
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.saleReturnItems.size()));
14625
          for (InventoryItem _iter35 : this.saleReturnItems)
14626
          {
14627
            _iter35.write(oprot);
14628
          }
14629
          oprot.writeListEnd();
14630
        }
14631
        oprot.writeFieldEnd();
14632
      }
14633
      oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
14634
      oprot.writeI64(this.vendorId);
14635
      oprot.writeFieldEnd();
14636
      oprot.writeFieldStop();
14637
      oprot.writeStructEnd();
14638
    }
14639
 
14640
    @Override
14641
    public String toString() {
14642
      StringBuilder sb = new StringBuilder("scanForPurchaseReturn_args(");
14643
      boolean first = true;
14644
 
14645
      sb.append("saleReturnItems:");
14646
      if (this.saleReturnItems == null) {
14647
        sb.append("null");
14648
      } else {
14649
        sb.append(this.saleReturnItems);
14650
      }
14651
      first = false;
14652
      if (!first) sb.append(", ");
14653
      sb.append("vendorId:");
14654
      sb.append(this.vendorId);
14655
      first = false;
14656
      sb.append(")");
14657
      return sb.toString();
14658
    }
14659
 
14660
    public void validate() throws org.apache.thrift.TException {
14661
      // check for required fields
14662
    }
14663
 
14664
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14665
      try {
14666
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14667
      } catch (org.apache.thrift.TException te) {
14668
        throw new java.io.IOException(te);
14669
      }
14670
    }
14671
 
14672
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14673
      try {
14674
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14675
      } catch (org.apache.thrift.TException te) {
14676
        throw new java.io.IOException(te);
14677
      }
14678
    }
14679
 
14680
  }
14681
 
14682
  public static class scanForPurchaseReturn_result implements org.apache.thrift.TBase<scanForPurchaseReturn_result, scanForPurchaseReturn_result._Fields>, java.io.Serializable, Cloneable   {
14683
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForPurchaseReturn_result");
14684
 
14685
    private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
14686
 
14687
    private WarehouseServiceException ex; // required
14688
 
14689
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14690
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14691
      EX((short)1, "ex");
14692
 
14693
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14694
 
14695
      static {
14696
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14697
          byName.put(field.getFieldName(), field);
14698
        }
14699
      }
14700
 
14701
      /**
14702
       * Find the _Fields constant that matches fieldId, or null if its not found.
14703
       */
14704
      public static _Fields findByThriftId(int fieldId) {
14705
        switch(fieldId) {
14706
          case 1: // EX
14707
            return EX;
14708
          default:
14709
            return null;
14710
        }
14711
      }
14712
 
14713
      /**
14714
       * Find the _Fields constant that matches fieldId, throwing an exception
14715
       * if it is not found.
14716
       */
14717
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14718
        _Fields fields = findByThriftId(fieldId);
14719
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14720
        return fields;
14721
      }
14722
 
14723
      /**
14724
       * Find the _Fields constant that matches name, or null if its not found.
14725
       */
14726
      public static _Fields findByName(String name) {
14727
        return byName.get(name);
14728
      }
14729
 
14730
      private final short _thriftId;
14731
      private final String _fieldName;
14732
 
14733
      _Fields(short thriftId, String fieldName) {
14734
        _thriftId = thriftId;
14735
        _fieldName = fieldName;
14736
      }
14737
 
14738
      public short getThriftFieldId() {
14739
        return _thriftId;
14740
      }
14741
 
14742
      public String getFieldName() {
14743
        return _fieldName;
14744
      }
14745
    }
14746
 
14747
    // isset id assignments
14748
 
14749
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14750
    static {
14751
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14752
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14753
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
14754
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14755
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForPurchaseReturn_result.class, metaDataMap);
14756
    }
14757
 
14758
    public scanForPurchaseReturn_result() {
14759
    }
14760
 
14761
    public scanForPurchaseReturn_result(
14762
      WarehouseServiceException ex)
14763
    {
14764
      this();
14765
      this.ex = ex;
14766
    }
14767
 
14768
    /**
14769
     * Performs a deep copy on <i>other</i>.
14770
     */
14771
    public scanForPurchaseReturn_result(scanForPurchaseReturn_result other) {
14772
      if (other.isSetEx()) {
14773
        this.ex = new WarehouseServiceException(other.ex);
14774
      }
14775
    }
14776
 
14777
    public scanForPurchaseReturn_result deepCopy() {
14778
      return new scanForPurchaseReturn_result(this);
14779
    }
14780
 
14781
    @Override
14782
    public void clear() {
14783
      this.ex = null;
14784
    }
14785
 
14786
    public WarehouseServiceException getEx() {
14787
      return this.ex;
14788
    }
14789
 
14790
    public void setEx(WarehouseServiceException ex) {
14791
      this.ex = ex;
14792
    }
14793
 
14794
    public void unsetEx() {
14795
      this.ex = null;
14796
    }
14797
 
14798
    /** Returns true if field ex is set (has been assigned a value) and false otherwise */
14799
    public boolean isSetEx() {
14800
      return this.ex != null;
14801
    }
14802
 
14803
    public void setExIsSet(boolean value) {
14804
      if (!value) {
14805
        this.ex = null;
14806
      }
14807
    }
14808
 
14809
    public void setFieldValue(_Fields field, Object value) {
14810
      switch (field) {
14811
      case EX:
14812
        if (value == null) {
14813
          unsetEx();
14814
        } else {
14815
          setEx((WarehouseServiceException)value);
14816
        }
14817
        break;
14818
 
14819
      }
14820
    }
14821
 
14822
    public Object getFieldValue(_Fields field) {
14823
      switch (field) {
14824
      case EX:
14825
        return getEx();
14826
 
14827
      }
14828
      throw new IllegalStateException();
14829
    }
14830
 
14831
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14832
    public boolean isSet(_Fields field) {
14833
      if (field == null) {
14834
        throw new IllegalArgumentException();
14835
      }
14836
 
14837
      switch (field) {
14838
      case EX:
14839
        return isSetEx();
14840
      }
14841
      throw new IllegalStateException();
14842
    }
14843
 
14844
    @Override
14845
    public boolean equals(Object that) {
14846
      if (that == null)
14847
        return false;
14848
      if (that instanceof scanForPurchaseReturn_result)
14849
        return this.equals((scanForPurchaseReturn_result)that);
14850
      return false;
14851
    }
14852
 
14853
    public boolean equals(scanForPurchaseReturn_result that) {
14854
      if (that == null)
14855
        return false;
14856
 
14857
      boolean this_present_ex = true && this.isSetEx();
14858
      boolean that_present_ex = true && that.isSetEx();
14859
      if (this_present_ex || that_present_ex) {
14860
        if (!(this_present_ex && that_present_ex))
14861
          return false;
14862
        if (!this.ex.equals(that.ex))
14863
          return false;
14864
      }
14865
 
14866
      return true;
14867
    }
14868
 
14869
    @Override
14870
    public int hashCode() {
14871
      return 0;
14872
    }
14873
 
14874
    public int compareTo(scanForPurchaseReturn_result other) {
14875
      if (!getClass().equals(other.getClass())) {
14876
        return getClass().getName().compareTo(other.getClass().getName());
14877
      }
14878
 
14879
      int lastComparison = 0;
14880
      scanForPurchaseReturn_result typedOther = (scanForPurchaseReturn_result)other;
14881
 
14882
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx());
14883
      if (lastComparison != 0) {
14884
        return lastComparison;
14885
      }
14886
      if (isSetEx()) {
14887
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, typedOther.ex);
14888
        if (lastComparison != 0) {
14889
          return lastComparison;
14890
        }
14891
      }
14892
      return 0;
14893
    }
14894
 
14895
    public _Fields fieldForId(int fieldId) {
14896
      return _Fields.findByThriftId(fieldId);
14897
    }
14898
 
14899
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14900
      org.apache.thrift.protocol.TField field;
14901
      iprot.readStructBegin();
14902
      while (true)
14903
      {
14904
        field = iprot.readFieldBegin();
14905
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14906
          break;
14907
        }
14908
        switch (field.id) {
14909
          case 1: // EX
14910
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14911
              this.ex = new WarehouseServiceException();
14912
              this.ex.read(iprot);
14913
            } else { 
14914
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14915
            }
14916
            break;
14917
          default:
14918
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14919
        }
14920
        iprot.readFieldEnd();
14921
      }
14922
      iprot.readStructEnd();
14923
      validate();
14924
    }
14925
 
14926
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14927
      oprot.writeStructBegin(STRUCT_DESC);
14928
 
14929
      if (this.isSetEx()) {
14930
        oprot.writeFieldBegin(EX_FIELD_DESC);
14931
        this.ex.write(oprot);
14932
        oprot.writeFieldEnd();
14933
      }
14934
      oprot.writeFieldStop();
14935
      oprot.writeStructEnd();
14936
    }
14937
 
14938
    @Override
14939
    public String toString() {
14940
      StringBuilder sb = new StringBuilder("scanForPurchaseReturn_result(");
14941
      boolean first = true;
14942
 
14943
      sb.append("ex:");
14944
      if (this.ex == null) {
14945
        sb.append("null");
14946
      } else {
14947
        sb.append(this.ex);
14948
      }
14949
      first = false;
14950
      sb.append(")");
14951
      return sb.toString();
14952
    }
14953
 
14954
    public void validate() throws org.apache.thrift.TException {
14955
      // check for required fields
14956
    }
14957
 
14958
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14959
      try {
14960
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14961
      } catch (org.apache.thrift.TException te) {
14962
        throw new java.io.IOException(te);
14963
      }
14964
    }
14965
 
14966
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14967
      try {
14968
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14969
      } catch (org.apache.thrift.TException te) {
14970
        throw new java.io.IOException(te);
14971
      }
14972
    }
14973
 
14974
  }
14975
 
6548 amar.kumar 14976
  public static class scanForLostItem_args implements org.apache.thrift.TBase<scanForLostItem_args, scanForLostItem_args._Fields>, java.io.Serializable, Cloneable   {
14977
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForLostItem_args");
14978
 
14979
    private static final org.apache.thrift.protocol.TField LOST_ITEMS_FIELD_DESC = new org.apache.thrift.protocol.TField("lostItems", org.apache.thrift.protocol.TType.LIST, (short)1);
14980
    private static final org.apache.thrift.protocol.TField VENDOR_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("vendorId", org.apache.thrift.protocol.TType.I64, (short)2);
14981
 
14982
    private List<InventoryItem> lostItems; // required
14983
    private long vendorId; // required
14984
 
14985
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14986
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14987
      LOST_ITEMS((short)1, "lostItems"),
14988
      VENDOR_ID((short)2, "vendorId");
14989
 
14990
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14991
 
14992
      static {
14993
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14994
          byName.put(field.getFieldName(), field);
14995
        }
14996
      }
14997
 
14998
      /**
14999
       * Find the _Fields constant that matches fieldId, or null if its not found.
15000
       */
15001
      public static _Fields findByThriftId(int fieldId) {
15002
        switch(fieldId) {
15003
          case 1: // LOST_ITEMS
15004
            return LOST_ITEMS;
15005
          case 2: // VENDOR_ID
15006
            return VENDOR_ID;
15007
          default:
15008
            return null;
15009
        }
15010
      }
15011
 
15012
      /**
15013
       * Find the _Fields constant that matches fieldId, throwing an exception
15014
       * if it is not found.
15015
       */
15016
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15017
        _Fields fields = findByThriftId(fieldId);
15018
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15019
        return fields;
15020
      }
15021
 
15022
      /**
15023
       * Find the _Fields constant that matches name, or null if its not found.
15024
       */
15025
      public static _Fields findByName(String name) {
15026
        return byName.get(name);
15027
      }
15028
 
15029
      private final short _thriftId;
15030
      private final String _fieldName;
15031
 
15032
      _Fields(short thriftId, String fieldName) {
15033
        _thriftId = thriftId;
15034
        _fieldName = fieldName;
15035
      }
15036
 
15037
      public short getThriftFieldId() {
15038
        return _thriftId;
15039
      }
15040
 
15041
      public String getFieldName() {
15042
        return _fieldName;
15043
      }
15044
    }
15045
 
15046
    // isset id assignments
15047
    private static final int __VENDORID_ISSET_ID = 0;
15048
    private BitSet __isset_bit_vector = new BitSet(1);
15049
 
15050
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15051
    static {
15052
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15053
      tmpMap.put(_Fields.LOST_ITEMS, new org.apache.thrift.meta_data.FieldMetaData("lostItems", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15054
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
15055
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
15056
      tmpMap.put(_Fields.VENDOR_ID, new org.apache.thrift.meta_data.FieldMetaData("vendorId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15057
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
15058
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15059
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForLostItem_args.class, metaDataMap);
15060
    }
15061
 
15062
    public scanForLostItem_args() {
15063
    }
15064
 
15065
    public scanForLostItem_args(
15066
      List<InventoryItem> lostItems,
15067
      long vendorId)
15068
    {
15069
      this();
15070
      this.lostItems = lostItems;
15071
      this.vendorId = vendorId;
15072
      setVendorIdIsSet(true);
15073
    }
15074
 
15075
    /**
15076
     * Performs a deep copy on <i>other</i>.
15077
     */
15078
    public scanForLostItem_args(scanForLostItem_args other) {
15079
      __isset_bit_vector.clear();
15080
      __isset_bit_vector.or(other.__isset_bit_vector);
15081
      if (other.isSetLostItems()) {
15082
        List<InventoryItem> __this__lostItems = new ArrayList<InventoryItem>();
15083
        for (InventoryItem other_element : other.lostItems) {
15084
          __this__lostItems.add(new InventoryItem(other_element));
15085
        }
15086
        this.lostItems = __this__lostItems;
15087
      }
15088
      this.vendorId = other.vendorId;
15089
    }
15090
 
15091
    public scanForLostItem_args deepCopy() {
15092
      return new scanForLostItem_args(this);
15093
    }
15094
 
15095
    @Override
15096
    public void clear() {
15097
      this.lostItems = null;
15098
      setVendorIdIsSet(false);
15099
      this.vendorId = 0;
15100
    }
15101
 
15102
    public int getLostItemsSize() {
15103
      return (this.lostItems == null) ? 0 : this.lostItems.size();
15104
    }
15105
 
15106
    public java.util.Iterator<InventoryItem> getLostItemsIterator() {
15107
      return (this.lostItems == null) ? null : this.lostItems.iterator();
15108
    }
15109
 
15110
    public void addToLostItems(InventoryItem elem) {
15111
      if (this.lostItems == null) {
15112
        this.lostItems = new ArrayList<InventoryItem>();
15113
      }
15114
      this.lostItems.add(elem);
15115
    }
15116
 
15117
    public List<InventoryItem> getLostItems() {
15118
      return this.lostItems;
15119
    }
15120
 
15121
    public void setLostItems(List<InventoryItem> lostItems) {
15122
      this.lostItems = lostItems;
15123
    }
15124
 
15125
    public void unsetLostItems() {
15126
      this.lostItems = null;
15127
    }
15128
 
15129
    /** Returns true if field lostItems is set (has been assigned a value) and false otherwise */
15130
    public boolean isSetLostItems() {
15131
      return this.lostItems != null;
15132
    }
15133
 
15134
    public void setLostItemsIsSet(boolean value) {
15135
      if (!value) {
15136
        this.lostItems = null;
15137
      }
15138
    }
15139
 
15140
    public long getVendorId() {
15141
      return this.vendorId;
15142
    }
15143
 
15144
    public void setVendorId(long vendorId) {
15145
      this.vendorId = vendorId;
15146
      setVendorIdIsSet(true);
15147
    }
15148
 
15149
    public void unsetVendorId() {
15150
      __isset_bit_vector.clear(__VENDORID_ISSET_ID);
15151
    }
15152
 
15153
    /** Returns true if field vendorId is set (has been assigned a value) and false otherwise */
15154
    public boolean isSetVendorId() {
15155
      return __isset_bit_vector.get(__VENDORID_ISSET_ID);
15156
    }
15157
 
15158
    public void setVendorIdIsSet(boolean value) {
15159
      __isset_bit_vector.set(__VENDORID_ISSET_ID, value);
15160
    }
15161
 
15162
    public void setFieldValue(_Fields field, Object value) {
15163
      switch (field) {
15164
      case LOST_ITEMS:
15165
        if (value == null) {
15166
          unsetLostItems();
15167
        } else {
15168
          setLostItems((List<InventoryItem>)value);
15169
        }
15170
        break;
15171
 
15172
      case VENDOR_ID:
15173
        if (value == null) {
15174
          unsetVendorId();
15175
        } else {
15176
          setVendorId((Long)value);
15177
        }
15178
        break;
15179
 
15180
      }
15181
    }
15182
 
15183
    public Object getFieldValue(_Fields field) {
15184
      switch (field) {
15185
      case LOST_ITEMS:
15186
        return getLostItems();
15187
 
15188
      case VENDOR_ID:
15189
        return Long.valueOf(getVendorId());
15190
 
15191
      }
15192
      throw new IllegalStateException();
15193
    }
15194
 
15195
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15196
    public boolean isSet(_Fields field) {
15197
      if (field == null) {
15198
        throw new IllegalArgumentException();
15199
      }
15200
 
15201
      switch (field) {
15202
      case LOST_ITEMS:
15203
        return isSetLostItems();
15204
      case VENDOR_ID:
15205
        return isSetVendorId();
15206
      }
15207
      throw new IllegalStateException();
15208
    }
15209
 
15210
    @Override
15211
    public boolean equals(Object that) {
15212
      if (that == null)
15213
        return false;
15214
      if (that instanceof scanForLostItem_args)
15215
        return this.equals((scanForLostItem_args)that);
15216
      return false;
15217
    }
15218
 
15219
    public boolean equals(scanForLostItem_args that) {
15220
      if (that == null)
15221
        return false;
15222
 
15223
      boolean this_present_lostItems = true && this.isSetLostItems();
15224
      boolean that_present_lostItems = true && that.isSetLostItems();
15225
      if (this_present_lostItems || that_present_lostItems) {
15226
        if (!(this_present_lostItems && that_present_lostItems))
15227
          return false;
15228
        if (!this.lostItems.equals(that.lostItems))
15229
          return false;
15230
      }
15231
 
15232
      boolean this_present_vendorId = true;
15233
      boolean that_present_vendorId = true;
15234
      if (this_present_vendorId || that_present_vendorId) {
15235
        if (!(this_present_vendorId && that_present_vendorId))
15236
          return false;
15237
        if (this.vendorId != that.vendorId)
15238
          return false;
15239
      }
15240
 
15241
      return true;
15242
    }
15243
 
15244
    @Override
15245
    public int hashCode() {
15246
      return 0;
15247
    }
15248
 
15249
    public int compareTo(scanForLostItem_args other) {
15250
      if (!getClass().equals(other.getClass())) {
15251
        return getClass().getName().compareTo(other.getClass().getName());
15252
      }
15253
 
15254
      int lastComparison = 0;
15255
      scanForLostItem_args typedOther = (scanForLostItem_args)other;
15256
 
15257
      lastComparison = Boolean.valueOf(isSetLostItems()).compareTo(typedOther.isSetLostItems());
15258
      if (lastComparison != 0) {
15259
        return lastComparison;
15260
      }
15261
      if (isSetLostItems()) {
15262
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lostItems, typedOther.lostItems);
15263
        if (lastComparison != 0) {
15264
          return lastComparison;
15265
        }
15266
      }
15267
      lastComparison = Boolean.valueOf(isSetVendorId()).compareTo(typedOther.isSetVendorId());
15268
      if (lastComparison != 0) {
15269
        return lastComparison;
15270
      }
15271
      if (isSetVendorId()) {
15272
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.vendorId, typedOther.vendorId);
15273
        if (lastComparison != 0) {
15274
          return lastComparison;
15275
        }
15276
      }
15277
      return 0;
15278
    }
15279
 
15280
    public _Fields fieldForId(int fieldId) {
15281
      return _Fields.findByThriftId(fieldId);
15282
    }
15283
 
15284
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15285
      org.apache.thrift.protocol.TField field;
15286
      iprot.readStructBegin();
15287
      while (true)
15288
      {
15289
        field = iprot.readFieldBegin();
15290
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15291
          break;
15292
        }
15293
        switch (field.id) {
15294
          case 1: // LOST_ITEMS
15295
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
15296
              {
15297
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
15298
                this.lostItems = new ArrayList<InventoryItem>(_list36.size);
15299
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
15300
                {
15301
                  InventoryItem _elem38; // required
15302
                  _elem38 = new InventoryItem();
15303
                  _elem38.read(iprot);
15304
                  this.lostItems.add(_elem38);
15305
                }
15306
                iprot.readListEnd();
15307
              }
15308
            } else { 
15309
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15310
            }
15311
            break;
15312
          case 2: // VENDOR_ID
15313
            if (field.type == org.apache.thrift.protocol.TType.I64) {
15314
              this.vendorId = iprot.readI64();
15315
              setVendorIdIsSet(true);
15316
            } else { 
15317
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15318
            }
15319
            break;
15320
          default:
15321
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15322
        }
15323
        iprot.readFieldEnd();
15324
      }
15325
      iprot.readStructEnd();
15326
      validate();
15327
    }
15328
 
15329
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15330
      validate();
15331
 
15332
      oprot.writeStructBegin(STRUCT_DESC);
15333
      if (this.lostItems != null) {
15334
        oprot.writeFieldBegin(LOST_ITEMS_FIELD_DESC);
15335
        {
15336
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.lostItems.size()));
15337
          for (InventoryItem _iter39 : this.lostItems)
15338
          {
15339
            _iter39.write(oprot);
15340
          }
15341
          oprot.writeListEnd();
15342
        }
15343
        oprot.writeFieldEnd();
15344
      }
15345
      oprot.writeFieldBegin(VENDOR_ID_FIELD_DESC);
15346
      oprot.writeI64(this.vendorId);
15347
      oprot.writeFieldEnd();
15348
      oprot.writeFieldStop();
15349
      oprot.writeStructEnd();
15350
    }
15351
 
15352
    @Override
15353
    public String toString() {
15354
      StringBuilder sb = new StringBuilder("scanForLostItem_args(");
15355
      boolean first = true;
15356
 
15357
      sb.append("lostItems:");
15358
      if (this.lostItems == null) {
15359
        sb.append("null");
15360
      } else {
15361
        sb.append(this.lostItems);
15362
      }
15363
      first = false;
15364
      if (!first) sb.append(", ");
15365
      sb.append("vendorId:");
15366
      sb.append(this.vendorId);
15367
      first = false;
15368
      sb.append(")");
15369
      return sb.toString();
15370
    }
15371
 
15372
    public void validate() throws org.apache.thrift.TException {
15373
      // check for required fields
15374
    }
15375
 
15376
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15377
      try {
15378
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15379
      } catch (org.apache.thrift.TException te) {
15380
        throw new java.io.IOException(te);
15381
      }
15382
    }
15383
 
15384
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15385
      try {
15386
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15387
      } catch (org.apache.thrift.TException te) {
15388
        throw new java.io.IOException(te);
15389
      }
15390
    }
15391
 
15392
  }
15393
 
15394
  public static class scanForLostItem_result implements org.apache.thrift.TBase<scanForLostItem_result, scanForLostItem_result._Fields>, java.io.Serializable, Cloneable   {
15395
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForLostItem_result");
15396
 
15397
    private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
15398
 
15399
    private WarehouseServiceException ex; // required
15400
 
15401
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15402
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15403
      EX((short)1, "ex");
15404
 
15405
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15406
 
15407
      static {
15408
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15409
          byName.put(field.getFieldName(), field);
15410
        }
15411
      }
15412
 
15413
      /**
15414
       * Find the _Fields constant that matches fieldId, or null if its not found.
15415
       */
15416
      public static _Fields findByThriftId(int fieldId) {
15417
        switch(fieldId) {
15418
          case 1: // EX
15419
            return EX;
15420
          default:
15421
            return null;
15422
        }
15423
      }
15424
 
15425
      /**
15426
       * Find the _Fields constant that matches fieldId, throwing an exception
15427
       * if it is not found.
15428
       */
15429
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15430
        _Fields fields = findByThriftId(fieldId);
15431
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15432
        return fields;
15433
      }
15434
 
15435
      /**
15436
       * Find the _Fields constant that matches name, or null if its not found.
15437
       */
15438
      public static _Fields findByName(String name) {
15439
        return byName.get(name);
15440
      }
15441
 
15442
      private final short _thriftId;
15443
      private final String _fieldName;
15444
 
15445
      _Fields(short thriftId, String fieldName) {
15446
        _thriftId = thriftId;
15447
        _fieldName = fieldName;
15448
      }
15449
 
15450
      public short getThriftFieldId() {
15451
        return _thriftId;
15452
      }
15453
 
15454
      public String getFieldName() {
15455
        return _fieldName;
15456
      }
15457
    }
15458
 
15459
    // isset id assignments
15460
 
15461
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15462
    static {
15463
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15464
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15465
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
15466
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15467
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForLostItem_result.class, metaDataMap);
15468
    }
15469
 
15470
    public scanForLostItem_result() {
15471
    }
15472
 
15473
    public scanForLostItem_result(
15474
      WarehouseServiceException ex)
15475
    {
15476
      this();
15477
      this.ex = ex;
15478
    }
15479
 
15480
    /**
15481
     * Performs a deep copy on <i>other</i>.
15482
     */
15483
    public scanForLostItem_result(scanForLostItem_result other) {
15484
      if (other.isSetEx()) {
15485
        this.ex = new WarehouseServiceException(other.ex);
15486
      }
15487
    }
15488
 
15489
    public scanForLostItem_result deepCopy() {
15490
      return new scanForLostItem_result(this);
15491
    }
15492
 
15493
    @Override
15494
    public void clear() {
15495
      this.ex = null;
15496
    }
15497
 
15498
    public WarehouseServiceException getEx() {
15499
      return this.ex;
15500
    }
15501
 
15502
    public void setEx(WarehouseServiceException ex) {
15503
      this.ex = ex;
15504
    }
15505
 
15506
    public void unsetEx() {
15507
      this.ex = null;
15508
    }
15509
 
15510
    /** Returns true if field ex is set (has been assigned a value) and false otherwise */
15511
    public boolean isSetEx() {
15512
      return this.ex != null;
15513
    }
15514
 
15515
    public void setExIsSet(boolean value) {
15516
      if (!value) {
15517
        this.ex = null;
15518
      }
15519
    }
15520
 
15521
    public void setFieldValue(_Fields field, Object value) {
15522
      switch (field) {
15523
      case EX:
15524
        if (value == null) {
15525
          unsetEx();
15526
        } else {
15527
          setEx((WarehouseServiceException)value);
15528
        }
15529
        break;
15530
 
15531
      }
15532
    }
15533
 
15534
    public Object getFieldValue(_Fields field) {
15535
      switch (field) {
15536
      case EX:
15537
        return getEx();
15538
 
15539
      }
15540
      throw new IllegalStateException();
15541
    }
15542
 
15543
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15544
    public boolean isSet(_Fields field) {
15545
      if (field == null) {
15546
        throw new IllegalArgumentException();
15547
      }
15548
 
15549
      switch (field) {
15550
      case EX:
15551
        return isSetEx();
15552
      }
15553
      throw new IllegalStateException();
15554
    }
15555
 
15556
    @Override
15557
    public boolean equals(Object that) {
15558
      if (that == null)
15559
        return false;
15560
      if (that instanceof scanForLostItem_result)
15561
        return this.equals((scanForLostItem_result)that);
15562
      return false;
15563
    }
15564
 
15565
    public boolean equals(scanForLostItem_result that) {
15566
      if (that == null)
15567
        return false;
15568
 
15569
      boolean this_present_ex = true && this.isSetEx();
15570
      boolean that_present_ex = true && that.isSetEx();
15571
      if (this_present_ex || that_present_ex) {
15572
        if (!(this_present_ex && that_present_ex))
15573
          return false;
15574
        if (!this.ex.equals(that.ex))
15575
          return false;
15576
      }
15577
 
15578
      return true;
15579
    }
15580
 
15581
    @Override
15582
    public int hashCode() {
15583
      return 0;
15584
    }
15585
 
15586
    public int compareTo(scanForLostItem_result other) {
15587
      if (!getClass().equals(other.getClass())) {
15588
        return getClass().getName().compareTo(other.getClass().getName());
15589
      }
15590
 
15591
      int lastComparison = 0;
15592
      scanForLostItem_result typedOther = (scanForLostItem_result)other;
15593
 
15594
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx());
15595
      if (lastComparison != 0) {
15596
        return lastComparison;
15597
      }
15598
      if (isSetEx()) {
15599
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, typedOther.ex);
15600
        if (lastComparison != 0) {
15601
          return lastComparison;
15602
        }
15603
      }
15604
      return 0;
15605
    }
15606
 
15607
    public _Fields fieldForId(int fieldId) {
15608
      return _Fields.findByThriftId(fieldId);
15609
    }
15610
 
15611
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15612
      org.apache.thrift.protocol.TField field;
15613
      iprot.readStructBegin();
15614
      while (true)
15615
      {
15616
        field = iprot.readFieldBegin();
15617
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15618
          break;
15619
        }
15620
        switch (field.id) {
15621
          case 1: // EX
15622
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15623
              this.ex = new WarehouseServiceException();
15624
              this.ex.read(iprot);
15625
            } else { 
15626
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15627
            }
15628
            break;
15629
          default:
15630
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15631
        }
15632
        iprot.readFieldEnd();
15633
      }
15634
      iprot.readStructEnd();
15635
      validate();
15636
    }
15637
 
15638
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15639
      oprot.writeStructBegin(STRUCT_DESC);
15640
 
15641
      if (this.isSetEx()) {
15642
        oprot.writeFieldBegin(EX_FIELD_DESC);
15643
        this.ex.write(oprot);
15644
        oprot.writeFieldEnd();
15645
      }
15646
      oprot.writeFieldStop();
15647
      oprot.writeStructEnd();
15648
    }
15649
 
15650
    @Override
15651
    public String toString() {
15652
      StringBuilder sb = new StringBuilder("scanForLostItem_result(");
15653
      boolean first = true;
15654
 
15655
      sb.append("ex:");
15656
      if (this.ex == null) {
15657
        sb.append("null");
15658
      } else {
15659
        sb.append(this.ex);
15660
      }
15661
      first = false;
15662
      sb.append(")");
15663
      return sb.toString();
15664
    }
15665
 
15666
    public void validate() throws org.apache.thrift.TException {
15667
      // check for required fields
15668
    }
15669
 
15670
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15671
      try {
15672
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15673
      } catch (org.apache.thrift.TException te) {
15674
        throw new java.io.IOException(te);
15675
      }
15676
    }
15677
 
15678
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15679
      try {
15680
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15681
      } catch (org.apache.thrift.TException te) {
15682
        throw new java.io.IOException(te);
15683
      }
15684
    }
15685
 
15686
  }
15687
 
15688
  public static class getCurrentSerializedInventoryByScans_args implements org.apache.thrift.TBase<getCurrentSerializedInventoryByScans_args, getCurrentSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
15689
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCurrentSerializedInventoryByScans_args");
15690
 
15691
 
15692
 
15693
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15694
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15695
;
15696
 
15697
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15698
 
15699
      static {
15700
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15701
          byName.put(field.getFieldName(), field);
15702
        }
15703
      }
15704
 
15705
      /**
15706
       * Find the _Fields constant that matches fieldId, or null if its not found.
15707
       */
15708
      public static _Fields findByThriftId(int fieldId) {
15709
        switch(fieldId) {
15710
          default:
15711
            return null;
15712
        }
15713
      }
15714
 
15715
      /**
15716
       * Find the _Fields constant that matches fieldId, throwing an exception
15717
       * if it is not found.
15718
       */
15719
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15720
        _Fields fields = findByThriftId(fieldId);
15721
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15722
        return fields;
15723
      }
15724
 
15725
      /**
15726
       * Find the _Fields constant that matches name, or null if its not found.
15727
       */
15728
      public static _Fields findByName(String name) {
15729
        return byName.get(name);
15730
      }
15731
 
15732
      private final short _thriftId;
15733
      private final String _fieldName;
15734
 
15735
      _Fields(short thriftId, String fieldName) {
15736
        _thriftId = thriftId;
15737
        _fieldName = fieldName;
15738
      }
15739
 
15740
      public short getThriftFieldId() {
15741
        return _thriftId;
15742
      }
15743
 
15744
      public String getFieldName() {
15745
        return _fieldName;
15746
      }
15747
    }
15748
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15749
    static {
15750
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15751
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15752
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCurrentSerializedInventoryByScans_args.class, metaDataMap);
15753
    }
15754
 
15755
    public getCurrentSerializedInventoryByScans_args() {
15756
    }
15757
 
15758
    /**
15759
     * Performs a deep copy on <i>other</i>.
15760
     */
15761
    public getCurrentSerializedInventoryByScans_args(getCurrentSerializedInventoryByScans_args other) {
15762
    }
15763
 
15764
    public getCurrentSerializedInventoryByScans_args deepCopy() {
15765
      return new getCurrentSerializedInventoryByScans_args(this);
15766
    }
15767
 
15768
    @Override
15769
    public void clear() {
15770
    }
15771
 
15772
    public void setFieldValue(_Fields field, Object value) {
15773
      switch (field) {
15774
      }
15775
    }
15776
 
15777
    public Object getFieldValue(_Fields field) {
15778
      switch (field) {
15779
      }
15780
      throw new IllegalStateException();
15781
    }
15782
 
15783
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15784
    public boolean isSet(_Fields field) {
15785
      if (field == null) {
15786
        throw new IllegalArgumentException();
15787
      }
15788
 
15789
      switch (field) {
15790
      }
15791
      throw new IllegalStateException();
15792
    }
15793
 
15794
    @Override
15795
    public boolean equals(Object that) {
15796
      if (that == null)
15797
        return false;
15798
      if (that instanceof getCurrentSerializedInventoryByScans_args)
15799
        return this.equals((getCurrentSerializedInventoryByScans_args)that);
15800
      return false;
15801
    }
15802
 
15803
    public boolean equals(getCurrentSerializedInventoryByScans_args that) {
15804
      if (that == null)
15805
        return false;
15806
 
15807
      return true;
15808
    }
15809
 
15810
    @Override
15811
    public int hashCode() {
15812
      return 0;
15813
    }
15814
 
15815
    public int compareTo(getCurrentSerializedInventoryByScans_args other) {
15816
      if (!getClass().equals(other.getClass())) {
15817
        return getClass().getName().compareTo(other.getClass().getName());
15818
      }
15819
 
15820
      int lastComparison = 0;
15821
      getCurrentSerializedInventoryByScans_args typedOther = (getCurrentSerializedInventoryByScans_args)other;
15822
 
15823
      return 0;
15824
    }
15825
 
15826
    public _Fields fieldForId(int fieldId) {
15827
      return _Fields.findByThriftId(fieldId);
15828
    }
15829
 
15830
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15831
      org.apache.thrift.protocol.TField field;
15832
      iprot.readStructBegin();
15833
      while (true)
15834
      {
15835
        field = iprot.readFieldBegin();
15836
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
15837
          break;
15838
        }
15839
        switch (field.id) {
15840
          default:
15841
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15842
        }
15843
        iprot.readFieldEnd();
15844
      }
15845
      iprot.readStructEnd();
15846
      validate();
15847
    }
15848
 
15849
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
15850
      validate();
15851
 
15852
      oprot.writeStructBegin(STRUCT_DESC);
15853
      oprot.writeFieldStop();
15854
      oprot.writeStructEnd();
15855
    }
15856
 
15857
    @Override
15858
    public String toString() {
15859
      StringBuilder sb = new StringBuilder("getCurrentSerializedInventoryByScans_args(");
15860
      boolean first = true;
15861
 
15862
      sb.append(")");
15863
      return sb.toString();
15864
    }
15865
 
15866
    public void validate() throws org.apache.thrift.TException {
15867
      // check for required fields
15868
    }
15869
 
15870
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15871
      try {
15872
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15873
      } catch (org.apache.thrift.TException te) {
15874
        throw new java.io.IOException(te);
15875
      }
15876
    }
15877
 
15878
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15879
      try {
15880
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15881
      } catch (org.apache.thrift.TException te) {
15882
        throw new java.io.IOException(te);
15883
      }
15884
    }
15885
 
15886
  }
15887
 
15888
  public static class getCurrentSerializedInventoryByScans_result implements org.apache.thrift.TBase<getCurrentSerializedInventoryByScans_result, getCurrentSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
15889
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCurrentSerializedInventoryByScans_result");
15890
 
15891
    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);
15892
 
15893
    private List<InventoryAvailability> success; // required
15894
 
15895
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15896
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
15897
      SUCCESS((short)0, "success");
15898
 
15899
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15900
 
15901
      static {
15902
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15903
          byName.put(field.getFieldName(), field);
15904
        }
15905
      }
15906
 
15907
      /**
15908
       * Find the _Fields constant that matches fieldId, or null if its not found.
15909
       */
15910
      public static _Fields findByThriftId(int fieldId) {
15911
        switch(fieldId) {
15912
          case 0: // SUCCESS
15913
            return SUCCESS;
15914
          default:
15915
            return null;
15916
        }
15917
      }
15918
 
15919
      /**
15920
       * Find the _Fields constant that matches fieldId, throwing an exception
15921
       * if it is not found.
15922
       */
15923
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15924
        _Fields fields = findByThriftId(fieldId);
15925
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15926
        return fields;
15927
      }
15928
 
15929
      /**
15930
       * Find the _Fields constant that matches name, or null if its not found.
15931
       */
15932
      public static _Fields findByName(String name) {
15933
        return byName.get(name);
15934
      }
15935
 
15936
      private final short _thriftId;
15937
      private final String _fieldName;
15938
 
15939
      _Fields(short thriftId, String fieldName) {
15940
        _thriftId = thriftId;
15941
        _fieldName = fieldName;
15942
      }
15943
 
15944
      public short getThriftFieldId() {
15945
        return _thriftId;
15946
      }
15947
 
15948
      public String getFieldName() {
15949
        return _fieldName;
15950
      }
15951
    }
15952
 
15953
    // isset id assignments
15954
 
15955
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
15956
    static {
15957
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15958
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15959
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
15960
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAvailability.class))));
15961
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15962
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCurrentSerializedInventoryByScans_result.class, metaDataMap);
15963
    }
15964
 
15965
    public getCurrentSerializedInventoryByScans_result() {
15966
    }
15967
 
15968
    public getCurrentSerializedInventoryByScans_result(
15969
      List<InventoryAvailability> success)
15970
    {
15971
      this();
15972
      this.success = success;
15973
    }
15974
 
15975
    /**
15976
     * Performs a deep copy on <i>other</i>.
15977
     */
15978
    public getCurrentSerializedInventoryByScans_result(getCurrentSerializedInventoryByScans_result other) {
15979
      if (other.isSetSuccess()) {
15980
        List<InventoryAvailability> __this__success = new ArrayList<InventoryAvailability>();
15981
        for (InventoryAvailability other_element : other.success) {
15982
          __this__success.add(new InventoryAvailability(other_element));
15983
        }
15984
        this.success = __this__success;
15985
      }
15986
    }
15987
 
15988
    public getCurrentSerializedInventoryByScans_result deepCopy() {
15989
      return new getCurrentSerializedInventoryByScans_result(this);
15990
    }
15991
 
15992
    @Override
15993
    public void clear() {
15994
      this.success = null;
15995
    }
15996
 
15997
    public int getSuccessSize() {
15998
      return (this.success == null) ? 0 : this.success.size();
15999
    }
16000
 
16001
    public java.util.Iterator<InventoryAvailability> getSuccessIterator() {
16002
      return (this.success == null) ? null : this.success.iterator();
16003
    }
16004
 
16005
    public void addToSuccess(InventoryAvailability elem) {
16006
      if (this.success == null) {
16007
        this.success = new ArrayList<InventoryAvailability>();
16008
      }
16009
      this.success.add(elem);
16010
    }
16011
 
16012
    public List<InventoryAvailability> getSuccess() {
16013
      return this.success;
16014
    }
16015
 
16016
    public void setSuccess(List<InventoryAvailability> success) {
16017
      this.success = success;
16018
    }
16019
 
16020
    public void unsetSuccess() {
16021
      this.success = null;
16022
    }
16023
 
16024
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
16025
    public boolean isSetSuccess() {
16026
      return this.success != null;
16027
    }
16028
 
16029
    public void setSuccessIsSet(boolean value) {
16030
      if (!value) {
16031
        this.success = null;
16032
      }
16033
    }
16034
 
16035
    public void setFieldValue(_Fields field, Object value) {
16036
      switch (field) {
16037
      case SUCCESS:
16038
        if (value == null) {
16039
          unsetSuccess();
16040
        } else {
16041
          setSuccess((List<InventoryAvailability>)value);
16042
        }
16043
        break;
16044
 
16045
      }
16046
    }
16047
 
16048
    public Object getFieldValue(_Fields field) {
16049
      switch (field) {
16050
      case SUCCESS:
16051
        return getSuccess();
16052
 
16053
      }
16054
      throw new IllegalStateException();
16055
    }
16056
 
16057
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16058
    public boolean isSet(_Fields field) {
16059
      if (field == null) {
16060
        throw new IllegalArgumentException();
16061
      }
16062
 
16063
      switch (field) {
16064
      case SUCCESS:
16065
        return isSetSuccess();
16066
      }
16067
      throw new IllegalStateException();
16068
    }
16069
 
16070
    @Override
16071
    public boolean equals(Object that) {
16072
      if (that == null)
16073
        return false;
16074
      if (that instanceof getCurrentSerializedInventoryByScans_result)
16075
        return this.equals((getCurrentSerializedInventoryByScans_result)that);
16076
      return false;
16077
    }
16078
 
16079
    public boolean equals(getCurrentSerializedInventoryByScans_result that) {
16080
      if (that == null)
16081
        return false;
16082
 
16083
      boolean this_present_success = true && this.isSetSuccess();
16084
      boolean that_present_success = true && that.isSetSuccess();
16085
      if (this_present_success || that_present_success) {
16086
        if (!(this_present_success && that_present_success))
16087
          return false;
16088
        if (!this.success.equals(that.success))
16089
          return false;
16090
      }
16091
 
16092
      return true;
16093
    }
16094
 
16095
    @Override
16096
    public int hashCode() {
16097
      return 0;
16098
    }
16099
 
16100
    public int compareTo(getCurrentSerializedInventoryByScans_result other) {
16101
      if (!getClass().equals(other.getClass())) {
16102
        return getClass().getName().compareTo(other.getClass().getName());
16103
      }
16104
 
16105
      int lastComparison = 0;
16106
      getCurrentSerializedInventoryByScans_result typedOther = (getCurrentSerializedInventoryByScans_result)other;
16107
 
16108
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16109
      if (lastComparison != 0) {
16110
        return lastComparison;
16111
      }
16112
      if (isSetSuccess()) {
16113
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16114
        if (lastComparison != 0) {
16115
          return lastComparison;
16116
        }
16117
      }
16118
      return 0;
16119
    }
16120
 
16121
    public _Fields fieldForId(int fieldId) {
16122
      return _Fields.findByThriftId(fieldId);
16123
    }
16124
 
16125
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16126
      org.apache.thrift.protocol.TField field;
16127
      iprot.readStructBegin();
16128
      while (true)
16129
      {
16130
        field = iprot.readFieldBegin();
16131
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16132
          break;
16133
        }
16134
        switch (field.id) {
16135
          case 0: // SUCCESS
16136
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
16137
              {
16138
                org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
16139
                this.success = new ArrayList<InventoryAvailability>(_list40.size);
16140
                for (int _i41 = 0; _i41 < _list40.size; ++_i41)
16141
                {
16142
                  InventoryAvailability _elem42; // required
16143
                  _elem42 = new InventoryAvailability();
16144
                  _elem42.read(iprot);
16145
                  this.success.add(_elem42);
16146
                }
16147
                iprot.readListEnd();
16148
              }
16149
            } else { 
16150
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16151
            }
16152
            break;
16153
          default:
16154
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16155
        }
16156
        iprot.readFieldEnd();
16157
      }
16158
      iprot.readStructEnd();
16159
      validate();
16160
    }
16161
 
16162
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16163
      oprot.writeStructBegin(STRUCT_DESC);
16164
 
16165
      if (this.isSetSuccess()) {
16166
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16167
        {
16168
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
16169
          for (InventoryAvailability _iter43 : this.success)
16170
          {
16171
            _iter43.write(oprot);
16172
          }
16173
          oprot.writeListEnd();
16174
        }
16175
        oprot.writeFieldEnd();
16176
      }
16177
      oprot.writeFieldStop();
16178
      oprot.writeStructEnd();
16179
    }
16180
 
16181
    @Override
16182
    public String toString() {
16183
      StringBuilder sb = new StringBuilder("getCurrentSerializedInventoryByScans_result(");
16184
      boolean first = true;
16185
 
16186
      sb.append("success:");
16187
      if (this.success == null) {
16188
        sb.append("null");
16189
      } else {
16190
        sb.append(this.success);
16191
      }
16192
      first = false;
16193
      sb.append(")");
16194
      return sb.toString();
16195
    }
16196
 
16197
    public void validate() throws org.apache.thrift.TException {
16198
      // check for required fields
16199
    }
16200
 
16201
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16202
      try {
16203
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16204
      } catch (org.apache.thrift.TException te) {
16205
        throw new java.io.IOException(te);
16206
      }
16207
    }
16208
 
16209
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16210
      try {
16211
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16212
      } catch (org.apache.thrift.TException te) {
16213
        throw new java.io.IOException(te);
16214
      }
16215
    }
16216
 
16217
  }
16218
 
6630 amar.kumar 16219
  public static class getCurrentNonSerializedInventoryByScans_args implements org.apache.thrift.TBase<getCurrentNonSerializedInventoryByScans_args, getCurrentNonSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
16220
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCurrentNonSerializedInventoryByScans_args");
16221
 
16222
 
16223
 
16224
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16225
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16226
;
16227
 
16228
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16229
 
16230
      static {
16231
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16232
          byName.put(field.getFieldName(), field);
16233
        }
16234
      }
16235
 
16236
      /**
16237
       * Find the _Fields constant that matches fieldId, or null if its not found.
16238
       */
16239
      public static _Fields findByThriftId(int fieldId) {
16240
        switch(fieldId) {
16241
          default:
16242
            return null;
16243
        }
16244
      }
16245
 
16246
      /**
16247
       * Find the _Fields constant that matches fieldId, throwing an exception
16248
       * if it is not found.
16249
       */
16250
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16251
        _Fields fields = findByThriftId(fieldId);
16252
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16253
        return fields;
16254
      }
16255
 
16256
      /**
16257
       * Find the _Fields constant that matches name, or null if its not found.
16258
       */
16259
      public static _Fields findByName(String name) {
16260
        return byName.get(name);
16261
      }
16262
 
16263
      private final short _thriftId;
16264
      private final String _fieldName;
16265
 
16266
      _Fields(short thriftId, String fieldName) {
16267
        _thriftId = thriftId;
16268
        _fieldName = fieldName;
16269
      }
16270
 
16271
      public short getThriftFieldId() {
16272
        return _thriftId;
16273
      }
16274
 
16275
      public String getFieldName() {
16276
        return _fieldName;
16277
      }
16278
    }
16279
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16280
    static {
16281
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16282
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16283
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCurrentNonSerializedInventoryByScans_args.class, metaDataMap);
16284
    }
16285
 
16286
    public getCurrentNonSerializedInventoryByScans_args() {
16287
    }
16288
 
16289
    /**
16290
     * Performs a deep copy on <i>other</i>.
16291
     */
16292
    public getCurrentNonSerializedInventoryByScans_args(getCurrentNonSerializedInventoryByScans_args other) {
16293
    }
16294
 
16295
    public getCurrentNonSerializedInventoryByScans_args deepCopy() {
16296
      return new getCurrentNonSerializedInventoryByScans_args(this);
16297
    }
16298
 
16299
    @Override
16300
    public void clear() {
16301
    }
16302
 
16303
    public void setFieldValue(_Fields field, Object value) {
16304
      switch (field) {
16305
      }
16306
    }
16307
 
16308
    public Object getFieldValue(_Fields field) {
16309
      switch (field) {
16310
      }
16311
      throw new IllegalStateException();
16312
    }
16313
 
16314
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16315
    public boolean isSet(_Fields field) {
16316
      if (field == null) {
16317
        throw new IllegalArgumentException();
16318
      }
16319
 
16320
      switch (field) {
16321
      }
16322
      throw new IllegalStateException();
16323
    }
16324
 
16325
    @Override
16326
    public boolean equals(Object that) {
16327
      if (that == null)
16328
        return false;
16329
      if (that instanceof getCurrentNonSerializedInventoryByScans_args)
16330
        return this.equals((getCurrentNonSerializedInventoryByScans_args)that);
16331
      return false;
16332
    }
16333
 
16334
    public boolean equals(getCurrentNonSerializedInventoryByScans_args that) {
16335
      if (that == null)
16336
        return false;
16337
 
16338
      return true;
16339
    }
16340
 
16341
    @Override
16342
    public int hashCode() {
16343
      return 0;
16344
    }
16345
 
16346
    public int compareTo(getCurrentNonSerializedInventoryByScans_args other) {
16347
      if (!getClass().equals(other.getClass())) {
16348
        return getClass().getName().compareTo(other.getClass().getName());
16349
      }
16350
 
16351
      int lastComparison = 0;
16352
      getCurrentNonSerializedInventoryByScans_args typedOther = (getCurrentNonSerializedInventoryByScans_args)other;
16353
 
16354
      return 0;
16355
    }
16356
 
16357
    public _Fields fieldForId(int fieldId) {
16358
      return _Fields.findByThriftId(fieldId);
16359
    }
16360
 
16361
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16362
      org.apache.thrift.protocol.TField field;
16363
      iprot.readStructBegin();
16364
      while (true)
16365
      {
16366
        field = iprot.readFieldBegin();
16367
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16368
          break;
16369
        }
16370
        switch (field.id) {
16371
          default:
16372
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16373
        }
16374
        iprot.readFieldEnd();
16375
      }
16376
      iprot.readStructEnd();
16377
      validate();
16378
    }
16379
 
16380
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16381
      validate();
16382
 
16383
      oprot.writeStructBegin(STRUCT_DESC);
16384
      oprot.writeFieldStop();
16385
      oprot.writeStructEnd();
16386
    }
16387
 
16388
    @Override
16389
    public String toString() {
16390
      StringBuilder sb = new StringBuilder("getCurrentNonSerializedInventoryByScans_args(");
16391
      boolean first = true;
16392
 
16393
      sb.append(")");
16394
      return sb.toString();
16395
    }
16396
 
16397
    public void validate() throws org.apache.thrift.TException {
16398
      // check for required fields
16399
    }
16400
 
16401
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16402
      try {
16403
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16404
      } catch (org.apache.thrift.TException te) {
16405
        throw new java.io.IOException(te);
16406
      }
16407
    }
16408
 
16409
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16410
      try {
16411
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16412
      } catch (org.apache.thrift.TException te) {
16413
        throw new java.io.IOException(te);
16414
      }
16415
    }
16416
 
16417
  }
16418
 
16419
  public static class getCurrentNonSerializedInventoryByScans_result implements org.apache.thrift.TBase<getCurrentNonSerializedInventoryByScans_result, getCurrentNonSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
16420
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getCurrentNonSerializedInventoryByScans_result");
16421
 
16422
    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);
16423
 
16424
    private List<InventoryAvailability> success; // required
16425
 
16426
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16427
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16428
      SUCCESS((short)0, "success");
16429
 
16430
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16431
 
16432
      static {
16433
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16434
          byName.put(field.getFieldName(), field);
16435
        }
16436
      }
16437
 
16438
      /**
16439
       * Find the _Fields constant that matches fieldId, or null if its not found.
16440
       */
16441
      public static _Fields findByThriftId(int fieldId) {
16442
        switch(fieldId) {
16443
          case 0: // SUCCESS
16444
            return SUCCESS;
16445
          default:
16446
            return null;
16447
        }
16448
      }
16449
 
16450
      /**
16451
       * Find the _Fields constant that matches fieldId, throwing an exception
16452
       * if it is not found.
16453
       */
16454
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16455
        _Fields fields = findByThriftId(fieldId);
16456
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16457
        return fields;
16458
      }
16459
 
16460
      /**
16461
       * Find the _Fields constant that matches name, or null if its not found.
16462
       */
16463
      public static _Fields findByName(String name) {
16464
        return byName.get(name);
16465
      }
16466
 
16467
      private final short _thriftId;
16468
      private final String _fieldName;
16469
 
16470
      _Fields(short thriftId, String fieldName) {
16471
        _thriftId = thriftId;
16472
        _fieldName = fieldName;
16473
      }
16474
 
16475
      public short getThriftFieldId() {
16476
        return _thriftId;
16477
      }
16478
 
16479
      public String getFieldName() {
16480
        return _fieldName;
16481
      }
16482
    }
16483
 
16484
    // isset id assignments
16485
 
16486
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16487
    static {
16488
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16489
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16490
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
16491
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAvailability.class))));
16492
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16493
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getCurrentNonSerializedInventoryByScans_result.class, metaDataMap);
16494
    }
16495
 
16496
    public getCurrentNonSerializedInventoryByScans_result() {
16497
    }
16498
 
16499
    public getCurrentNonSerializedInventoryByScans_result(
16500
      List<InventoryAvailability> success)
16501
    {
16502
      this();
16503
      this.success = success;
16504
    }
16505
 
16506
    /**
16507
     * Performs a deep copy on <i>other</i>.
16508
     */
16509
    public getCurrentNonSerializedInventoryByScans_result(getCurrentNonSerializedInventoryByScans_result other) {
16510
      if (other.isSetSuccess()) {
16511
        List<InventoryAvailability> __this__success = new ArrayList<InventoryAvailability>();
16512
        for (InventoryAvailability other_element : other.success) {
16513
          __this__success.add(new InventoryAvailability(other_element));
16514
        }
16515
        this.success = __this__success;
16516
      }
16517
    }
16518
 
16519
    public getCurrentNonSerializedInventoryByScans_result deepCopy() {
16520
      return new getCurrentNonSerializedInventoryByScans_result(this);
16521
    }
16522
 
16523
    @Override
16524
    public void clear() {
16525
      this.success = null;
16526
    }
16527
 
16528
    public int getSuccessSize() {
16529
      return (this.success == null) ? 0 : this.success.size();
16530
    }
16531
 
16532
    public java.util.Iterator<InventoryAvailability> getSuccessIterator() {
16533
      return (this.success == null) ? null : this.success.iterator();
16534
    }
16535
 
16536
    public void addToSuccess(InventoryAvailability elem) {
16537
      if (this.success == null) {
16538
        this.success = new ArrayList<InventoryAvailability>();
16539
      }
16540
      this.success.add(elem);
16541
    }
16542
 
16543
    public List<InventoryAvailability> getSuccess() {
16544
      return this.success;
16545
    }
16546
 
16547
    public void setSuccess(List<InventoryAvailability> success) {
16548
      this.success = success;
16549
    }
16550
 
16551
    public void unsetSuccess() {
16552
      this.success = null;
16553
    }
16554
 
16555
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
16556
    public boolean isSetSuccess() {
16557
      return this.success != null;
16558
    }
16559
 
16560
    public void setSuccessIsSet(boolean value) {
16561
      if (!value) {
16562
        this.success = null;
16563
      }
16564
    }
16565
 
16566
    public void setFieldValue(_Fields field, Object value) {
16567
      switch (field) {
16568
      case SUCCESS:
16569
        if (value == null) {
16570
          unsetSuccess();
16571
        } else {
16572
          setSuccess((List<InventoryAvailability>)value);
16573
        }
16574
        break;
16575
 
16576
      }
16577
    }
16578
 
16579
    public Object getFieldValue(_Fields field) {
16580
      switch (field) {
16581
      case SUCCESS:
16582
        return getSuccess();
16583
 
16584
      }
16585
      throw new IllegalStateException();
16586
    }
16587
 
16588
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16589
    public boolean isSet(_Fields field) {
16590
      if (field == null) {
16591
        throw new IllegalArgumentException();
16592
      }
16593
 
16594
      switch (field) {
16595
      case SUCCESS:
16596
        return isSetSuccess();
16597
      }
16598
      throw new IllegalStateException();
16599
    }
16600
 
16601
    @Override
16602
    public boolean equals(Object that) {
16603
      if (that == null)
16604
        return false;
16605
      if (that instanceof getCurrentNonSerializedInventoryByScans_result)
16606
        return this.equals((getCurrentNonSerializedInventoryByScans_result)that);
16607
      return false;
16608
    }
16609
 
16610
    public boolean equals(getCurrentNonSerializedInventoryByScans_result that) {
16611
      if (that == null)
16612
        return false;
16613
 
16614
      boolean this_present_success = true && this.isSetSuccess();
16615
      boolean that_present_success = true && that.isSetSuccess();
16616
      if (this_present_success || that_present_success) {
16617
        if (!(this_present_success && that_present_success))
16618
          return false;
16619
        if (!this.success.equals(that.success))
16620
          return false;
16621
      }
16622
 
16623
      return true;
16624
    }
16625
 
16626
    @Override
16627
    public int hashCode() {
16628
      return 0;
16629
    }
16630
 
16631
    public int compareTo(getCurrentNonSerializedInventoryByScans_result other) {
16632
      if (!getClass().equals(other.getClass())) {
16633
        return getClass().getName().compareTo(other.getClass().getName());
16634
      }
16635
 
16636
      int lastComparison = 0;
16637
      getCurrentNonSerializedInventoryByScans_result typedOther = (getCurrentNonSerializedInventoryByScans_result)other;
16638
 
16639
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16640
      if (lastComparison != 0) {
16641
        return lastComparison;
16642
      }
16643
      if (isSetSuccess()) {
16644
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16645
        if (lastComparison != 0) {
16646
          return lastComparison;
16647
        }
16648
      }
16649
      return 0;
16650
    }
16651
 
16652
    public _Fields fieldForId(int fieldId) {
16653
      return _Fields.findByThriftId(fieldId);
16654
    }
16655
 
16656
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16657
      org.apache.thrift.protocol.TField field;
16658
      iprot.readStructBegin();
16659
      while (true)
16660
      {
16661
        field = iprot.readFieldBegin();
16662
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16663
          break;
16664
        }
16665
        switch (field.id) {
16666
          case 0: // SUCCESS
16667
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
16668
              {
16669
                org.apache.thrift.protocol.TList _list44 = iprot.readListBegin();
16670
                this.success = new ArrayList<InventoryAvailability>(_list44.size);
16671
                for (int _i45 = 0; _i45 < _list44.size; ++_i45)
16672
                {
16673
                  InventoryAvailability _elem46; // required
16674
                  _elem46 = new InventoryAvailability();
16675
                  _elem46.read(iprot);
16676
                  this.success.add(_elem46);
16677
                }
16678
                iprot.readListEnd();
16679
              }
16680
            } else { 
16681
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16682
            }
16683
            break;
16684
          default:
16685
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16686
        }
16687
        iprot.readFieldEnd();
16688
      }
16689
      iprot.readStructEnd();
16690
      validate();
16691
    }
16692
 
16693
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16694
      oprot.writeStructBegin(STRUCT_DESC);
16695
 
16696
      if (this.isSetSuccess()) {
16697
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16698
        {
16699
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
16700
          for (InventoryAvailability _iter47 : this.success)
16701
          {
16702
            _iter47.write(oprot);
16703
          }
16704
          oprot.writeListEnd();
16705
        }
16706
        oprot.writeFieldEnd();
16707
      }
16708
      oprot.writeFieldStop();
16709
      oprot.writeStructEnd();
16710
    }
16711
 
16712
    @Override
16713
    public String toString() {
16714
      StringBuilder sb = new StringBuilder("getCurrentNonSerializedInventoryByScans_result(");
16715
      boolean first = true;
16716
 
16717
      sb.append("success:");
16718
      if (this.success == null) {
16719
        sb.append("null");
16720
      } else {
16721
        sb.append(this.success);
16722
      }
16723
      first = false;
16724
      sb.append(")");
16725
      return sb.toString();
16726
    }
16727
 
16728
    public void validate() throws org.apache.thrift.TException {
16729
      // check for required fields
16730
    }
16731
 
16732
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16733
      try {
16734
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16735
      } catch (org.apache.thrift.TException te) {
16736
        throw new java.io.IOException(te);
16737
      }
16738
    }
16739
 
16740
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16741
      try {
16742
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16743
      } catch (org.apache.thrift.TException te) {
16744
        throw new java.io.IOException(te);
16745
      }
16746
    }
16747
 
16748
  }
16749
 
6762 amar.kumar 16750
  public static class getHistoricSerializedInventoryByScans_args implements org.apache.thrift.TBase<getHistoricSerializedInventoryByScans_args, getHistoricSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
16751
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHistoricSerializedInventoryByScans_args");
16752
 
16753
    private static final org.apache.thrift.protocol.TField DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("date", org.apache.thrift.protocol.TType.I64, (short)1);
16754
 
16755
    private long date; // required
16756
 
16757
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16758
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16759
      DATE((short)1, "date");
16760
 
16761
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16762
 
16763
      static {
16764
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16765
          byName.put(field.getFieldName(), field);
16766
        }
16767
      }
16768
 
16769
      /**
16770
       * Find the _Fields constant that matches fieldId, or null if its not found.
16771
       */
16772
      public static _Fields findByThriftId(int fieldId) {
16773
        switch(fieldId) {
16774
          case 1: // DATE
16775
            return DATE;
16776
          default:
16777
            return null;
16778
        }
16779
      }
16780
 
16781
      /**
16782
       * Find the _Fields constant that matches fieldId, throwing an exception
16783
       * if it is not found.
16784
       */
16785
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16786
        _Fields fields = findByThriftId(fieldId);
16787
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16788
        return fields;
16789
      }
16790
 
16791
      /**
16792
       * Find the _Fields constant that matches name, or null if its not found.
16793
       */
16794
      public static _Fields findByName(String name) {
16795
        return byName.get(name);
16796
      }
16797
 
16798
      private final short _thriftId;
16799
      private final String _fieldName;
16800
 
16801
      _Fields(short thriftId, String fieldName) {
16802
        _thriftId = thriftId;
16803
        _fieldName = fieldName;
16804
      }
16805
 
16806
      public short getThriftFieldId() {
16807
        return _thriftId;
16808
      }
16809
 
16810
      public String getFieldName() {
16811
        return _fieldName;
16812
      }
16813
    }
16814
 
16815
    // isset id assignments
16816
    private static final int __DATE_ISSET_ID = 0;
16817
    private BitSet __isset_bit_vector = new BitSet(1);
16818
 
16819
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16820
    static {
16821
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16822
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16823
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16824
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16825
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHistoricSerializedInventoryByScans_args.class, metaDataMap);
16826
    }
16827
 
16828
    public getHistoricSerializedInventoryByScans_args() {
16829
    }
16830
 
16831
    public getHistoricSerializedInventoryByScans_args(
16832
      long date)
16833
    {
16834
      this();
16835
      this.date = date;
16836
      setDateIsSet(true);
16837
    }
16838
 
16839
    /**
16840
     * Performs a deep copy on <i>other</i>.
16841
     */
16842
    public getHistoricSerializedInventoryByScans_args(getHistoricSerializedInventoryByScans_args other) {
16843
      __isset_bit_vector.clear();
16844
      __isset_bit_vector.or(other.__isset_bit_vector);
16845
      this.date = other.date;
16846
    }
16847
 
16848
    public getHistoricSerializedInventoryByScans_args deepCopy() {
16849
      return new getHistoricSerializedInventoryByScans_args(this);
16850
    }
16851
 
16852
    @Override
16853
    public void clear() {
16854
      setDateIsSet(false);
16855
      this.date = 0;
16856
    }
16857
 
16858
    public long getDate() {
16859
      return this.date;
16860
    }
16861
 
16862
    public void setDate(long date) {
16863
      this.date = date;
16864
      setDateIsSet(true);
16865
    }
16866
 
16867
    public void unsetDate() {
16868
      __isset_bit_vector.clear(__DATE_ISSET_ID);
16869
    }
16870
 
16871
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
16872
    public boolean isSetDate() {
16873
      return __isset_bit_vector.get(__DATE_ISSET_ID);
16874
    }
16875
 
16876
    public void setDateIsSet(boolean value) {
16877
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
16878
    }
16879
 
16880
    public void setFieldValue(_Fields field, Object value) {
16881
      switch (field) {
16882
      case DATE:
16883
        if (value == null) {
16884
          unsetDate();
16885
        } else {
16886
          setDate((Long)value);
16887
        }
16888
        break;
16889
 
16890
      }
16891
    }
16892
 
16893
    public Object getFieldValue(_Fields field) {
16894
      switch (field) {
16895
      case DATE:
16896
        return Long.valueOf(getDate());
16897
 
16898
      }
16899
      throw new IllegalStateException();
16900
    }
16901
 
16902
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16903
    public boolean isSet(_Fields field) {
16904
      if (field == null) {
16905
        throw new IllegalArgumentException();
16906
      }
16907
 
16908
      switch (field) {
16909
      case DATE:
16910
        return isSetDate();
16911
      }
16912
      throw new IllegalStateException();
16913
    }
16914
 
16915
    @Override
16916
    public boolean equals(Object that) {
16917
      if (that == null)
16918
        return false;
16919
      if (that instanceof getHistoricSerializedInventoryByScans_args)
16920
        return this.equals((getHistoricSerializedInventoryByScans_args)that);
16921
      return false;
16922
    }
16923
 
16924
    public boolean equals(getHistoricSerializedInventoryByScans_args that) {
16925
      if (that == null)
16926
        return false;
16927
 
16928
      boolean this_present_date = true;
16929
      boolean that_present_date = true;
16930
      if (this_present_date || that_present_date) {
16931
        if (!(this_present_date && that_present_date))
16932
          return false;
16933
        if (this.date != that.date)
16934
          return false;
16935
      }
16936
 
16937
      return true;
16938
    }
16939
 
16940
    @Override
16941
    public int hashCode() {
16942
      return 0;
16943
    }
16944
 
16945
    public int compareTo(getHistoricSerializedInventoryByScans_args other) {
16946
      if (!getClass().equals(other.getClass())) {
16947
        return getClass().getName().compareTo(other.getClass().getName());
16948
      }
16949
 
16950
      int lastComparison = 0;
16951
      getHistoricSerializedInventoryByScans_args typedOther = (getHistoricSerializedInventoryByScans_args)other;
16952
 
16953
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
16954
      if (lastComparison != 0) {
16955
        return lastComparison;
16956
      }
16957
      if (isSetDate()) {
16958
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
16959
        if (lastComparison != 0) {
16960
          return lastComparison;
16961
        }
16962
      }
16963
      return 0;
16964
    }
16965
 
16966
    public _Fields fieldForId(int fieldId) {
16967
      return _Fields.findByThriftId(fieldId);
16968
    }
16969
 
16970
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16971
      org.apache.thrift.protocol.TField field;
16972
      iprot.readStructBegin();
16973
      while (true)
16974
      {
16975
        field = iprot.readFieldBegin();
16976
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16977
          break;
16978
        }
16979
        switch (field.id) {
16980
          case 1: // DATE
16981
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16982
              this.date = iprot.readI64();
16983
              setDateIsSet(true);
16984
            } else { 
16985
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16986
            }
16987
            break;
16988
          default:
16989
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16990
        }
16991
        iprot.readFieldEnd();
16992
      }
16993
      iprot.readStructEnd();
16994
      validate();
16995
    }
16996
 
16997
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16998
      validate();
16999
 
17000
      oprot.writeStructBegin(STRUCT_DESC);
17001
      oprot.writeFieldBegin(DATE_FIELD_DESC);
17002
      oprot.writeI64(this.date);
17003
      oprot.writeFieldEnd();
17004
      oprot.writeFieldStop();
17005
      oprot.writeStructEnd();
17006
    }
17007
 
17008
    @Override
17009
    public String toString() {
17010
      StringBuilder sb = new StringBuilder("getHistoricSerializedInventoryByScans_args(");
17011
      boolean first = true;
17012
 
17013
      sb.append("date:");
17014
      sb.append(this.date);
17015
      first = false;
17016
      sb.append(")");
17017
      return sb.toString();
17018
    }
17019
 
17020
    public void validate() throws org.apache.thrift.TException {
17021
      // check for required fields
17022
    }
17023
 
17024
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17025
      try {
17026
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17027
      } catch (org.apache.thrift.TException te) {
17028
        throw new java.io.IOException(te);
17029
      }
17030
    }
17031
 
17032
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17033
      try {
17034
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17035
      } catch (org.apache.thrift.TException te) {
17036
        throw new java.io.IOException(te);
17037
      }
17038
    }
17039
 
17040
  }
17041
 
17042
  public static class getHistoricSerializedInventoryByScans_result implements org.apache.thrift.TBase<getHistoricSerializedInventoryByScans_result, getHistoricSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
17043
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHistoricSerializedInventoryByScans_result");
17044
 
17045
    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);
17046
 
17047
    private List<InventoryAvailability> success; // required
17048
 
17049
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17050
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17051
      SUCCESS((short)0, "success");
17052
 
17053
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17054
 
17055
      static {
17056
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17057
          byName.put(field.getFieldName(), field);
17058
        }
17059
      }
17060
 
17061
      /**
17062
       * Find the _Fields constant that matches fieldId, or null if its not found.
17063
       */
17064
      public static _Fields findByThriftId(int fieldId) {
17065
        switch(fieldId) {
17066
          case 0: // SUCCESS
17067
            return SUCCESS;
17068
          default:
17069
            return null;
17070
        }
17071
      }
17072
 
17073
      /**
17074
       * Find the _Fields constant that matches fieldId, throwing an exception
17075
       * if it is not found.
17076
       */
17077
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17078
        _Fields fields = findByThriftId(fieldId);
17079
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17080
        return fields;
17081
      }
17082
 
17083
      /**
17084
       * Find the _Fields constant that matches name, or null if its not found.
17085
       */
17086
      public static _Fields findByName(String name) {
17087
        return byName.get(name);
17088
      }
17089
 
17090
      private final short _thriftId;
17091
      private final String _fieldName;
17092
 
17093
      _Fields(short thriftId, String fieldName) {
17094
        _thriftId = thriftId;
17095
        _fieldName = fieldName;
17096
      }
17097
 
17098
      public short getThriftFieldId() {
17099
        return _thriftId;
17100
      }
17101
 
17102
      public String getFieldName() {
17103
        return _fieldName;
17104
      }
17105
    }
17106
 
17107
    // isset id assignments
17108
 
17109
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17110
    static {
17111
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17112
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17113
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17114
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAvailability.class))));
17115
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17116
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHistoricSerializedInventoryByScans_result.class, metaDataMap);
17117
    }
17118
 
17119
    public getHistoricSerializedInventoryByScans_result() {
17120
    }
17121
 
17122
    public getHistoricSerializedInventoryByScans_result(
17123
      List<InventoryAvailability> success)
17124
    {
17125
      this();
17126
      this.success = success;
17127
    }
17128
 
17129
    /**
17130
     * Performs a deep copy on <i>other</i>.
17131
     */
17132
    public getHistoricSerializedInventoryByScans_result(getHistoricSerializedInventoryByScans_result other) {
17133
      if (other.isSetSuccess()) {
17134
        List<InventoryAvailability> __this__success = new ArrayList<InventoryAvailability>();
17135
        for (InventoryAvailability other_element : other.success) {
17136
          __this__success.add(new InventoryAvailability(other_element));
17137
        }
17138
        this.success = __this__success;
17139
      }
17140
    }
17141
 
17142
    public getHistoricSerializedInventoryByScans_result deepCopy() {
17143
      return new getHistoricSerializedInventoryByScans_result(this);
17144
    }
17145
 
17146
    @Override
17147
    public void clear() {
17148
      this.success = null;
17149
    }
17150
 
17151
    public int getSuccessSize() {
17152
      return (this.success == null) ? 0 : this.success.size();
17153
    }
17154
 
17155
    public java.util.Iterator<InventoryAvailability> getSuccessIterator() {
17156
      return (this.success == null) ? null : this.success.iterator();
17157
    }
17158
 
17159
    public void addToSuccess(InventoryAvailability elem) {
17160
      if (this.success == null) {
17161
        this.success = new ArrayList<InventoryAvailability>();
17162
      }
17163
      this.success.add(elem);
17164
    }
17165
 
17166
    public List<InventoryAvailability> getSuccess() {
17167
      return this.success;
17168
    }
17169
 
17170
    public void setSuccess(List<InventoryAvailability> success) {
17171
      this.success = success;
17172
    }
17173
 
17174
    public void unsetSuccess() {
17175
      this.success = null;
17176
    }
17177
 
17178
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17179
    public boolean isSetSuccess() {
17180
      return this.success != null;
17181
    }
17182
 
17183
    public void setSuccessIsSet(boolean value) {
17184
      if (!value) {
17185
        this.success = null;
17186
      }
17187
    }
17188
 
17189
    public void setFieldValue(_Fields field, Object value) {
17190
      switch (field) {
17191
      case SUCCESS:
17192
        if (value == null) {
17193
          unsetSuccess();
17194
        } else {
17195
          setSuccess((List<InventoryAvailability>)value);
17196
        }
17197
        break;
17198
 
17199
      }
17200
    }
17201
 
17202
    public Object getFieldValue(_Fields field) {
17203
      switch (field) {
17204
      case SUCCESS:
17205
        return getSuccess();
17206
 
17207
      }
17208
      throw new IllegalStateException();
17209
    }
17210
 
17211
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17212
    public boolean isSet(_Fields field) {
17213
      if (field == null) {
17214
        throw new IllegalArgumentException();
17215
      }
17216
 
17217
      switch (field) {
17218
      case SUCCESS:
17219
        return isSetSuccess();
17220
      }
17221
      throw new IllegalStateException();
17222
    }
17223
 
17224
    @Override
17225
    public boolean equals(Object that) {
17226
      if (that == null)
17227
        return false;
17228
      if (that instanceof getHistoricSerializedInventoryByScans_result)
17229
        return this.equals((getHistoricSerializedInventoryByScans_result)that);
17230
      return false;
17231
    }
17232
 
17233
    public boolean equals(getHistoricSerializedInventoryByScans_result that) {
17234
      if (that == null)
17235
        return false;
17236
 
17237
      boolean this_present_success = true && this.isSetSuccess();
17238
      boolean that_present_success = true && that.isSetSuccess();
17239
      if (this_present_success || that_present_success) {
17240
        if (!(this_present_success && that_present_success))
17241
          return false;
17242
        if (!this.success.equals(that.success))
17243
          return false;
17244
      }
17245
 
17246
      return true;
17247
    }
17248
 
17249
    @Override
17250
    public int hashCode() {
17251
      return 0;
17252
    }
17253
 
17254
    public int compareTo(getHistoricSerializedInventoryByScans_result other) {
17255
      if (!getClass().equals(other.getClass())) {
17256
        return getClass().getName().compareTo(other.getClass().getName());
17257
      }
17258
 
17259
      int lastComparison = 0;
17260
      getHistoricSerializedInventoryByScans_result typedOther = (getHistoricSerializedInventoryByScans_result)other;
17261
 
17262
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17263
      if (lastComparison != 0) {
17264
        return lastComparison;
17265
      }
17266
      if (isSetSuccess()) {
17267
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17268
        if (lastComparison != 0) {
17269
          return lastComparison;
17270
        }
17271
      }
17272
      return 0;
17273
    }
17274
 
17275
    public _Fields fieldForId(int fieldId) {
17276
      return _Fields.findByThriftId(fieldId);
17277
    }
17278
 
17279
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17280
      org.apache.thrift.protocol.TField field;
17281
      iprot.readStructBegin();
17282
      while (true)
17283
      {
17284
        field = iprot.readFieldBegin();
17285
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17286
          break;
17287
        }
17288
        switch (field.id) {
17289
          case 0: // SUCCESS
17290
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
17291
              {
17292
                org.apache.thrift.protocol.TList _list48 = iprot.readListBegin();
17293
                this.success = new ArrayList<InventoryAvailability>(_list48.size);
17294
                for (int _i49 = 0; _i49 < _list48.size; ++_i49)
17295
                {
17296
                  InventoryAvailability _elem50; // required
17297
                  _elem50 = new InventoryAvailability();
17298
                  _elem50.read(iprot);
17299
                  this.success.add(_elem50);
17300
                }
17301
                iprot.readListEnd();
17302
              }
17303
            } else { 
17304
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17305
            }
17306
            break;
17307
          default:
17308
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17309
        }
17310
        iprot.readFieldEnd();
17311
      }
17312
      iprot.readStructEnd();
17313
      validate();
17314
    }
17315
 
17316
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17317
      oprot.writeStructBegin(STRUCT_DESC);
17318
 
17319
      if (this.isSetSuccess()) {
17320
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17321
        {
17322
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
17323
          for (InventoryAvailability _iter51 : this.success)
17324
          {
17325
            _iter51.write(oprot);
17326
          }
17327
          oprot.writeListEnd();
17328
        }
17329
        oprot.writeFieldEnd();
17330
      }
17331
      oprot.writeFieldStop();
17332
      oprot.writeStructEnd();
17333
    }
17334
 
17335
    @Override
17336
    public String toString() {
17337
      StringBuilder sb = new StringBuilder("getHistoricSerializedInventoryByScans_result(");
17338
      boolean first = true;
17339
 
17340
      sb.append("success:");
17341
      if (this.success == null) {
17342
        sb.append("null");
17343
      } else {
17344
        sb.append(this.success);
17345
      }
17346
      first = false;
17347
      sb.append(")");
17348
      return sb.toString();
17349
    }
17350
 
17351
    public void validate() throws org.apache.thrift.TException {
17352
      // check for required fields
17353
    }
17354
 
17355
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17356
      try {
17357
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17358
      } catch (org.apache.thrift.TException te) {
17359
        throw new java.io.IOException(te);
17360
      }
17361
    }
17362
 
17363
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17364
      try {
17365
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17366
      } catch (org.apache.thrift.TException te) {
17367
        throw new java.io.IOException(te);
17368
      }
17369
    }
17370
 
17371
  }
17372
 
17373
  public static class getHistoricNonSerializedInventoryByScans_args implements org.apache.thrift.TBase<getHistoricNonSerializedInventoryByScans_args, getHistoricNonSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
17374
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHistoricNonSerializedInventoryByScans_args");
17375
 
17376
    private static final org.apache.thrift.protocol.TField DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("date", org.apache.thrift.protocol.TType.I64, (short)1);
17377
 
17378
    private long date; // required
17379
 
17380
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17381
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17382
      DATE((short)1, "date");
17383
 
17384
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17385
 
17386
      static {
17387
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17388
          byName.put(field.getFieldName(), field);
17389
        }
17390
      }
17391
 
17392
      /**
17393
       * Find the _Fields constant that matches fieldId, or null if its not found.
17394
       */
17395
      public static _Fields findByThriftId(int fieldId) {
17396
        switch(fieldId) {
17397
          case 1: // DATE
17398
            return DATE;
17399
          default:
17400
            return null;
17401
        }
17402
      }
17403
 
17404
      /**
17405
       * Find the _Fields constant that matches fieldId, throwing an exception
17406
       * if it is not found.
17407
       */
17408
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17409
        _Fields fields = findByThriftId(fieldId);
17410
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17411
        return fields;
17412
      }
17413
 
17414
      /**
17415
       * Find the _Fields constant that matches name, or null if its not found.
17416
       */
17417
      public static _Fields findByName(String name) {
17418
        return byName.get(name);
17419
      }
17420
 
17421
      private final short _thriftId;
17422
      private final String _fieldName;
17423
 
17424
      _Fields(short thriftId, String fieldName) {
17425
        _thriftId = thriftId;
17426
        _fieldName = fieldName;
17427
      }
17428
 
17429
      public short getThriftFieldId() {
17430
        return _thriftId;
17431
      }
17432
 
17433
      public String getFieldName() {
17434
        return _fieldName;
17435
      }
17436
    }
17437
 
17438
    // isset id assignments
17439
    private static final int __DATE_ISSET_ID = 0;
17440
    private BitSet __isset_bit_vector = new BitSet(1);
17441
 
17442
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17443
    static {
17444
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17445
      tmpMap.put(_Fields.DATE, new org.apache.thrift.meta_data.FieldMetaData("date", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17446
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17447
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17448
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHistoricNonSerializedInventoryByScans_args.class, metaDataMap);
17449
    }
17450
 
17451
    public getHistoricNonSerializedInventoryByScans_args() {
17452
    }
17453
 
17454
    public getHistoricNonSerializedInventoryByScans_args(
17455
      long date)
17456
    {
17457
      this();
17458
      this.date = date;
17459
      setDateIsSet(true);
17460
    }
17461
 
17462
    /**
17463
     * Performs a deep copy on <i>other</i>.
17464
     */
17465
    public getHistoricNonSerializedInventoryByScans_args(getHistoricNonSerializedInventoryByScans_args other) {
17466
      __isset_bit_vector.clear();
17467
      __isset_bit_vector.or(other.__isset_bit_vector);
17468
      this.date = other.date;
17469
    }
17470
 
17471
    public getHistoricNonSerializedInventoryByScans_args deepCopy() {
17472
      return new getHistoricNonSerializedInventoryByScans_args(this);
17473
    }
17474
 
17475
    @Override
17476
    public void clear() {
17477
      setDateIsSet(false);
17478
      this.date = 0;
17479
    }
17480
 
17481
    public long getDate() {
17482
      return this.date;
17483
    }
17484
 
17485
    public void setDate(long date) {
17486
      this.date = date;
17487
      setDateIsSet(true);
17488
    }
17489
 
17490
    public void unsetDate() {
17491
      __isset_bit_vector.clear(__DATE_ISSET_ID);
17492
    }
17493
 
17494
    /** Returns true if field date is set (has been assigned a value) and false otherwise */
17495
    public boolean isSetDate() {
17496
      return __isset_bit_vector.get(__DATE_ISSET_ID);
17497
    }
17498
 
17499
    public void setDateIsSet(boolean value) {
17500
      __isset_bit_vector.set(__DATE_ISSET_ID, value);
17501
    }
17502
 
17503
    public void setFieldValue(_Fields field, Object value) {
17504
      switch (field) {
17505
      case DATE:
17506
        if (value == null) {
17507
          unsetDate();
17508
        } else {
17509
          setDate((Long)value);
17510
        }
17511
        break;
17512
 
17513
      }
17514
    }
17515
 
17516
    public Object getFieldValue(_Fields field) {
17517
      switch (field) {
17518
      case DATE:
17519
        return Long.valueOf(getDate());
17520
 
17521
      }
17522
      throw new IllegalStateException();
17523
    }
17524
 
17525
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17526
    public boolean isSet(_Fields field) {
17527
      if (field == null) {
17528
        throw new IllegalArgumentException();
17529
      }
17530
 
17531
      switch (field) {
17532
      case DATE:
17533
        return isSetDate();
17534
      }
17535
      throw new IllegalStateException();
17536
    }
17537
 
17538
    @Override
17539
    public boolean equals(Object that) {
17540
      if (that == null)
17541
        return false;
17542
      if (that instanceof getHistoricNonSerializedInventoryByScans_args)
17543
        return this.equals((getHistoricNonSerializedInventoryByScans_args)that);
17544
      return false;
17545
    }
17546
 
17547
    public boolean equals(getHistoricNonSerializedInventoryByScans_args that) {
17548
      if (that == null)
17549
        return false;
17550
 
17551
      boolean this_present_date = true;
17552
      boolean that_present_date = true;
17553
      if (this_present_date || that_present_date) {
17554
        if (!(this_present_date && that_present_date))
17555
          return false;
17556
        if (this.date != that.date)
17557
          return false;
17558
      }
17559
 
17560
      return true;
17561
    }
17562
 
17563
    @Override
17564
    public int hashCode() {
17565
      return 0;
17566
    }
17567
 
17568
    public int compareTo(getHistoricNonSerializedInventoryByScans_args other) {
17569
      if (!getClass().equals(other.getClass())) {
17570
        return getClass().getName().compareTo(other.getClass().getName());
17571
      }
17572
 
17573
      int lastComparison = 0;
17574
      getHistoricNonSerializedInventoryByScans_args typedOther = (getHistoricNonSerializedInventoryByScans_args)other;
17575
 
17576
      lastComparison = Boolean.valueOf(isSetDate()).compareTo(typedOther.isSetDate());
17577
      if (lastComparison != 0) {
17578
        return lastComparison;
17579
      }
17580
      if (isSetDate()) {
17581
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.date, typedOther.date);
17582
        if (lastComparison != 0) {
17583
          return lastComparison;
17584
        }
17585
      }
17586
      return 0;
17587
    }
17588
 
17589
    public _Fields fieldForId(int fieldId) {
17590
      return _Fields.findByThriftId(fieldId);
17591
    }
17592
 
17593
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17594
      org.apache.thrift.protocol.TField field;
17595
      iprot.readStructBegin();
17596
      while (true)
17597
      {
17598
        field = iprot.readFieldBegin();
17599
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17600
          break;
17601
        }
17602
        switch (field.id) {
17603
          case 1: // DATE
17604
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17605
              this.date = iprot.readI64();
17606
              setDateIsSet(true);
17607
            } else { 
17608
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17609
            }
17610
            break;
17611
          default:
17612
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17613
        }
17614
        iprot.readFieldEnd();
17615
      }
17616
      iprot.readStructEnd();
17617
      validate();
17618
    }
17619
 
17620
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17621
      validate();
17622
 
17623
      oprot.writeStructBegin(STRUCT_DESC);
17624
      oprot.writeFieldBegin(DATE_FIELD_DESC);
17625
      oprot.writeI64(this.date);
17626
      oprot.writeFieldEnd();
17627
      oprot.writeFieldStop();
17628
      oprot.writeStructEnd();
17629
    }
17630
 
17631
    @Override
17632
    public String toString() {
17633
      StringBuilder sb = new StringBuilder("getHistoricNonSerializedInventoryByScans_args(");
17634
      boolean first = true;
17635
 
17636
      sb.append("date:");
17637
      sb.append(this.date);
17638
      first = false;
17639
      sb.append(")");
17640
      return sb.toString();
17641
    }
17642
 
17643
    public void validate() throws org.apache.thrift.TException {
17644
      // check for required fields
17645
    }
17646
 
17647
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17648
      try {
17649
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17650
      } catch (org.apache.thrift.TException te) {
17651
        throw new java.io.IOException(te);
17652
      }
17653
    }
17654
 
17655
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17656
      try {
17657
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
17658
        __isset_bit_vector = new BitSet(1);
17659
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17660
      } catch (org.apache.thrift.TException te) {
17661
        throw new java.io.IOException(te);
17662
      }
17663
    }
17664
 
17665
  }
17666
 
17667
  public static class getHistoricNonSerializedInventoryByScans_result implements org.apache.thrift.TBase<getHistoricNonSerializedInventoryByScans_result, getHistoricNonSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
17668
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getHistoricNonSerializedInventoryByScans_result");
17669
 
17670
    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);
17671
 
17672
    private List<InventoryAvailability> success; // required
17673
 
17674
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17675
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17676
      SUCCESS((short)0, "success");
17677
 
17678
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17679
 
17680
      static {
17681
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17682
          byName.put(field.getFieldName(), field);
17683
        }
17684
      }
17685
 
17686
      /**
17687
       * Find the _Fields constant that matches fieldId, or null if its not found.
17688
       */
17689
      public static _Fields findByThriftId(int fieldId) {
17690
        switch(fieldId) {
17691
          case 0: // SUCCESS
17692
            return SUCCESS;
17693
          default:
17694
            return null;
17695
        }
17696
      }
17697
 
17698
      /**
17699
       * Find the _Fields constant that matches fieldId, throwing an exception
17700
       * if it is not found.
17701
       */
17702
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17703
        _Fields fields = findByThriftId(fieldId);
17704
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17705
        return fields;
17706
      }
17707
 
17708
      /**
17709
       * Find the _Fields constant that matches name, or null if its not found.
17710
       */
17711
      public static _Fields findByName(String name) {
17712
        return byName.get(name);
17713
      }
17714
 
17715
      private final short _thriftId;
17716
      private final String _fieldName;
17717
 
17718
      _Fields(short thriftId, String fieldName) {
17719
        _thriftId = thriftId;
17720
        _fieldName = fieldName;
17721
      }
17722
 
17723
      public short getThriftFieldId() {
17724
        return _thriftId;
17725
      }
17726
 
17727
      public String getFieldName() {
17728
        return _fieldName;
17729
      }
17730
    }
17731
 
17732
    // isset id assignments
17733
 
17734
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17735
    static {
17736
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17737
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17738
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
17739
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryAvailability.class))));
17740
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17741
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getHistoricNonSerializedInventoryByScans_result.class, metaDataMap);
17742
    }
17743
 
17744
    public getHistoricNonSerializedInventoryByScans_result() {
17745
    }
17746
 
17747
    public getHistoricNonSerializedInventoryByScans_result(
17748
      List<InventoryAvailability> success)
17749
    {
17750
      this();
17751
      this.success = success;
17752
    }
17753
 
17754
    /**
17755
     * Performs a deep copy on <i>other</i>.
17756
     */
17757
    public getHistoricNonSerializedInventoryByScans_result(getHistoricNonSerializedInventoryByScans_result other) {
17758
      if (other.isSetSuccess()) {
17759
        List<InventoryAvailability> __this__success = new ArrayList<InventoryAvailability>();
17760
        for (InventoryAvailability other_element : other.success) {
17761
          __this__success.add(new InventoryAvailability(other_element));
17762
        }
17763
        this.success = __this__success;
17764
      }
17765
    }
17766
 
17767
    public getHistoricNonSerializedInventoryByScans_result deepCopy() {
17768
      return new getHistoricNonSerializedInventoryByScans_result(this);
17769
    }
17770
 
17771
    @Override
17772
    public void clear() {
17773
      this.success = null;
17774
    }
17775
 
17776
    public int getSuccessSize() {
17777
      return (this.success == null) ? 0 : this.success.size();
17778
    }
17779
 
17780
    public java.util.Iterator<InventoryAvailability> getSuccessIterator() {
17781
      return (this.success == null) ? null : this.success.iterator();
17782
    }
17783
 
17784
    public void addToSuccess(InventoryAvailability elem) {
17785
      if (this.success == null) {
17786
        this.success = new ArrayList<InventoryAvailability>();
17787
      }
17788
      this.success.add(elem);
17789
    }
17790
 
17791
    public List<InventoryAvailability> getSuccess() {
17792
      return this.success;
17793
    }
17794
 
17795
    public void setSuccess(List<InventoryAvailability> success) {
17796
      this.success = success;
17797
    }
17798
 
17799
    public void unsetSuccess() {
17800
      this.success = null;
17801
    }
17802
 
17803
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17804
    public boolean isSetSuccess() {
17805
      return this.success != null;
17806
    }
17807
 
17808
    public void setSuccessIsSet(boolean value) {
17809
      if (!value) {
17810
        this.success = null;
17811
      }
17812
    }
17813
 
17814
    public void setFieldValue(_Fields field, Object value) {
17815
      switch (field) {
17816
      case SUCCESS:
17817
        if (value == null) {
17818
          unsetSuccess();
17819
        } else {
17820
          setSuccess((List<InventoryAvailability>)value);
17821
        }
17822
        break;
17823
 
17824
      }
17825
    }
17826
 
17827
    public Object getFieldValue(_Fields field) {
17828
      switch (field) {
17829
      case SUCCESS:
17830
        return getSuccess();
17831
 
17832
      }
17833
      throw new IllegalStateException();
17834
    }
17835
 
17836
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17837
    public boolean isSet(_Fields field) {
17838
      if (field == null) {
17839
        throw new IllegalArgumentException();
17840
      }
17841
 
17842
      switch (field) {
17843
      case SUCCESS:
17844
        return isSetSuccess();
17845
      }
17846
      throw new IllegalStateException();
17847
    }
17848
 
17849
    @Override
17850
    public boolean equals(Object that) {
17851
      if (that == null)
17852
        return false;
17853
      if (that instanceof getHistoricNonSerializedInventoryByScans_result)
17854
        return this.equals((getHistoricNonSerializedInventoryByScans_result)that);
17855
      return false;
17856
    }
17857
 
17858
    public boolean equals(getHistoricNonSerializedInventoryByScans_result that) {
17859
      if (that == null)
17860
        return false;
17861
 
17862
      boolean this_present_success = true && this.isSetSuccess();
17863
      boolean that_present_success = true && that.isSetSuccess();
17864
      if (this_present_success || that_present_success) {
17865
        if (!(this_present_success && that_present_success))
17866
          return false;
17867
        if (!this.success.equals(that.success))
17868
          return false;
17869
      }
17870
 
17871
      return true;
17872
    }
17873
 
17874
    @Override
17875
    public int hashCode() {
17876
      return 0;
17877
    }
17878
 
17879
    public int compareTo(getHistoricNonSerializedInventoryByScans_result other) {
17880
      if (!getClass().equals(other.getClass())) {
17881
        return getClass().getName().compareTo(other.getClass().getName());
17882
      }
17883
 
17884
      int lastComparison = 0;
17885
      getHistoricNonSerializedInventoryByScans_result typedOther = (getHistoricNonSerializedInventoryByScans_result)other;
17886
 
17887
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17888
      if (lastComparison != 0) {
17889
        return lastComparison;
17890
      }
17891
      if (isSetSuccess()) {
17892
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17893
        if (lastComparison != 0) {
17894
          return lastComparison;
17895
        }
17896
      }
17897
      return 0;
17898
    }
17899
 
17900
    public _Fields fieldForId(int fieldId) {
17901
      return _Fields.findByThriftId(fieldId);
17902
    }
17903
 
17904
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17905
      org.apache.thrift.protocol.TField field;
17906
      iprot.readStructBegin();
17907
      while (true)
17908
      {
17909
        field = iprot.readFieldBegin();
17910
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17911
          break;
17912
        }
17913
        switch (field.id) {
17914
          case 0: // SUCCESS
17915
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
17916
              {
17917
                org.apache.thrift.protocol.TList _list52 = iprot.readListBegin();
17918
                this.success = new ArrayList<InventoryAvailability>(_list52.size);
17919
                for (int _i53 = 0; _i53 < _list52.size; ++_i53)
17920
                {
17921
                  InventoryAvailability _elem54; // required
17922
                  _elem54 = new InventoryAvailability();
17923
                  _elem54.read(iprot);
17924
                  this.success.add(_elem54);
17925
                }
17926
                iprot.readListEnd();
17927
              }
17928
            } else { 
17929
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17930
            }
17931
            break;
17932
          default:
17933
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17934
        }
17935
        iprot.readFieldEnd();
17936
      }
17937
      iprot.readStructEnd();
17938
      validate();
17939
    }
17940
 
17941
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17942
      oprot.writeStructBegin(STRUCT_DESC);
17943
 
17944
      if (this.isSetSuccess()) {
17945
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17946
        {
17947
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
17948
          for (InventoryAvailability _iter55 : this.success)
17949
          {
17950
            _iter55.write(oprot);
17951
          }
17952
          oprot.writeListEnd();
17953
        }
17954
        oprot.writeFieldEnd();
17955
      }
17956
      oprot.writeFieldStop();
17957
      oprot.writeStructEnd();
17958
    }
17959
 
17960
    @Override
17961
    public String toString() {
17962
      StringBuilder sb = new StringBuilder("getHistoricNonSerializedInventoryByScans_result(");
17963
      boolean first = true;
17964
 
17965
      sb.append("success:");
17966
      if (this.success == null) {
17967
        sb.append("null");
17968
      } else {
17969
        sb.append(this.success);
17970
      }
17971
      first = false;
17972
      sb.append(")");
17973
      return sb.toString();
17974
    }
17975
 
17976
    public void validate() throws org.apache.thrift.TException {
17977
      // check for required fields
17978
    }
17979
 
17980
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17981
      try {
17982
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17983
      } catch (org.apache.thrift.TException te) {
17984
        throw new java.io.IOException(te);
17985
      }
17986
    }
17987
 
17988
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17989
      try {
17990
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17991
      } catch (org.apache.thrift.TException te) {
17992
        throw new java.io.IOException(te);
17993
      }
17994
    }
17995
 
17996
  }
17997
 
17998
  public static class scanForOursExternalSale_args implements org.apache.thrift.TBase<scanForOursExternalSale_args, scanForOursExternalSale_args._Fields>, java.io.Serializable, Cloneable   {
17999
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOursExternalSale_args");
18000
 
18001
    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);
18002
    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);
18003
    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)3);
18004
    private static final org.apache.thrift.protocol.TField INVOICE_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("invoiceNumber", org.apache.thrift.protocol.TType.STRING, (short)4);
18005
    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);
18006
    private static final org.apache.thrift.protocol.TField UNIT_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("unitPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)6);
18007
    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)7);
18008
 
18009
    private long itemId; // required
18010
    private String serialNumber; // required
18011
    private String itemNumber; // required
18012
    private String invoiceNumber; // required
18013
    private long warehouseId; // required
18014
    private double unitPrice; // required
18015
    private long orderId; // required
18016
 
18017
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18018
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18019
      ITEM_ID((short)1, "itemId"),
18020
      SERIAL_NUMBER((short)2, "serialNumber"),
18021
      ITEM_NUMBER((short)3, "itemNumber"),
18022
      INVOICE_NUMBER((short)4, "invoiceNumber"),
18023
      WAREHOUSE_ID((short)5, "warehouseId"),
18024
      UNIT_PRICE((short)6, "unitPrice"),
18025
      ORDER_ID((short)7, "orderId");
18026
 
18027
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18028
 
18029
      static {
18030
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18031
          byName.put(field.getFieldName(), field);
18032
        }
18033
      }
18034
 
18035
      /**
18036
       * Find the _Fields constant that matches fieldId, or null if its not found.
18037
       */
18038
      public static _Fields findByThriftId(int fieldId) {
18039
        switch(fieldId) {
18040
          case 1: // ITEM_ID
18041
            return ITEM_ID;
18042
          case 2: // SERIAL_NUMBER
18043
            return SERIAL_NUMBER;
18044
          case 3: // ITEM_NUMBER
18045
            return ITEM_NUMBER;
18046
          case 4: // INVOICE_NUMBER
18047
            return INVOICE_NUMBER;
18048
          case 5: // WAREHOUSE_ID
18049
            return WAREHOUSE_ID;
18050
          case 6: // UNIT_PRICE
18051
            return UNIT_PRICE;
18052
          case 7: // ORDER_ID
18053
            return ORDER_ID;
18054
          default:
18055
            return null;
18056
        }
18057
      }
18058
 
18059
      /**
18060
       * Find the _Fields constant that matches fieldId, throwing an exception
18061
       * if it is not found.
18062
       */
18063
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18064
        _Fields fields = findByThriftId(fieldId);
18065
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18066
        return fields;
18067
      }
18068
 
18069
      /**
18070
       * Find the _Fields constant that matches name, or null if its not found.
18071
       */
18072
      public static _Fields findByName(String name) {
18073
        return byName.get(name);
18074
      }
18075
 
18076
      private final short _thriftId;
18077
      private final String _fieldName;
18078
 
18079
      _Fields(short thriftId, String fieldName) {
18080
        _thriftId = thriftId;
18081
        _fieldName = fieldName;
18082
      }
18083
 
18084
      public short getThriftFieldId() {
18085
        return _thriftId;
18086
      }
18087
 
18088
      public String getFieldName() {
18089
        return _fieldName;
18090
      }
18091
    }
18092
 
18093
    // isset id assignments
18094
    private static final int __ITEMID_ISSET_ID = 0;
18095
    private static final int __WAREHOUSEID_ISSET_ID = 1;
18096
    private static final int __UNITPRICE_ISSET_ID = 2;
18097
    private static final int __ORDERID_ISSET_ID = 3;
18098
    private BitSet __isset_bit_vector = new BitSet(4);
18099
 
18100
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18101
    static {
18102
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18103
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18104
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18105
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18106
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
18107
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18108
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
18109
      tmpMap.put(_Fields.INVOICE_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("invoiceNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18110
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
18111
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18112
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18113
      tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18114
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
18115
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18116
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18117
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18118
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOursExternalSale_args.class, metaDataMap);
18119
    }
18120
 
18121
    public scanForOursExternalSale_args() {
18122
    }
18123
 
18124
    public scanForOursExternalSale_args(
18125
      long itemId,
18126
      String serialNumber,
18127
      String itemNumber,
18128
      String invoiceNumber,
18129
      long warehouseId,
18130
      double unitPrice,
18131
      long orderId)
18132
    {
18133
      this();
18134
      this.itemId = itemId;
18135
      setItemIdIsSet(true);
18136
      this.serialNumber = serialNumber;
18137
      this.itemNumber = itemNumber;
18138
      this.invoiceNumber = invoiceNumber;
18139
      this.warehouseId = warehouseId;
18140
      setWarehouseIdIsSet(true);
18141
      this.unitPrice = unitPrice;
18142
      setUnitPriceIsSet(true);
18143
      this.orderId = orderId;
18144
      setOrderIdIsSet(true);
18145
    }
18146
 
18147
    /**
18148
     * Performs a deep copy on <i>other</i>.
18149
     */
18150
    public scanForOursExternalSale_args(scanForOursExternalSale_args other) {
18151
      __isset_bit_vector.clear();
18152
      __isset_bit_vector.or(other.__isset_bit_vector);
18153
      this.itemId = other.itemId;
18154
      if (other.isSetSerialNumber()) {
18155
        this.serialNumber = other.serialNumber;
18156
      }
18157
      if (other.isSetItemNumber()) {
18158
        this.itemNumber = other.itemNumber;
18159
      }
18160
      if (other.isSetInvoiceNumber()) {
18161
        this.invoiceNumber = other.invoiceNumber;
18162
      }
18163
      this.warehouseId = other.warehouseId;
18164
      this.unitPrice = other.unitPrice;
18165
      this.orderId = other.orderId;
18166
    }
18167
 
18168
    public scanForOursExternalSale_args deepCopy() {
18169
      return new scanForOursExternalSale_args(this);
18170
    }
18171
 
18172
    @Override
18173
    public void clear() {
18174
      setItemIdIsSet(false);
18175
      this.itemId = 0;
18176
      this.serialNumber = null;
18177
      this.itemNumber = null;
18178
      this.invoiceNumber = null;
18179
      setWarehouseIdIsSet(false);
18180
      this.warehouseId = 0;
18181
      setUnitPriceIsSet(false);
18182
      this.unitPrice = 0.0;
18183
      setOrderIdIsSet(false);
18184
      this.orderId = 0;
18185
    }
18186
 
18187
    public long getItemId() {
18188
      return this.itemId;
18189
    }
18190
 
18191
    public void setItemId(long itemId) {
18192
      this.itemId = itemId;
18193
      setItemIdIsSet(true);
18194
    }
18195
 
18196
    public void unsetItemId() {
18197
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
18198
    }
18199
 
18200
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
18201
    public boolean isSetItemId() {
18202
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
18203
    }
18204
 
18205
    public void setItemIdIsSet(boolean value) {
18206
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
18207
    }
18208
 
18209
    public String getSerialNumber() {
18210
      return this.serialNumber;
18211
    }
18212
 
18213
    public void setSerialNumber(String serialNumber) {
18214
      this.serialNumber = serialNumber;
18215
    }
18216
 
18217
    public void unsetSerialNumber() {
18218
      this.serialNumber = null;
18219
    }
18220
 
18221
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
18222
    public boolean isSetSerialNumber() {
18223
      return this.serialNumber != null;
18224
    }
18225
 
18226
    public void setSerialNumberIsSet(boolean value) {
18227
      if (!value) {
18228
        this.serialNumber = null;
18229
      }
18230
    }
18231
 
18232
    public String getItemNumber() {
18233
      return this.itemNumber;
18234
    }
18235
 
18236
    public void setItemNumber(String itemNumber) {
18237
      this.itemNumber = itemNumber;
18238
    }
18239
 
18240
    public void unsetItemNumber() {
18241
      this.itemNumber = null;
18242
    }
18243
 
18244
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
18245
    public boolean isSetItemNumber() {
18246
      return this.itemNumber != null;
18247
    }
18248
 
18249
    public void setItemNumberIsSet(boolean value) {
18250
      if (!value) {
18251
        this.itemNumber = null;
18252
      }
18253
    }
18254
 
18255
    public String getInvoiceNumber() {
18256
      return this.invoiceNumber;
18257
    }
18258
 
18259
    public void setInvoiceNumber(String invoiceNumber) {
18260
      this.invoiceNumber = invoiceNumber;
18261
    }
18262
 
18263
    public void unsetInvoiceNumber() {
18264
      this.invoiceNumber = null;
18265
    }
18266
 
18267
    /** Returns true if field invoiceNumber is set (has been assigned a value) and false otherwise */
18268
    public boolean isSetInvoiceNumber() {
18269
      return this.invoiceNumber != null;
18270
    }
18271
 
18272
    public void setInvoiceNumberIsSet(boolean value) {
18273
      if (!value) {
18274
        this.invoiceNumber = null;
18275
      }
18276
    }
18277
 
18278
    public long getWarehouseId() {
18279
      return this.warehouseId;
18280
    }
18281
 
18282
    public void setWarehouseId(long warehouseId) {
18283
      this.warehouseId = warehouseId;
18284
      setWarehouseIdIsSet(true);
18285
    }
18286
 
18287
    public void unsetWarehouseId() {
18288
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
18289
    }
18290
 
18291
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
18292
    public boolean isSetWarehouseId() {
18293
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
18294
    }
18295
 
18296
    public void setWarehouseIdIsSet(boolean value) {
18297
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
18298
    }
18299
 
18300
    public double getUnitPrice() {
18301
      return this.unitPrice;
18302
    }
18303
 
18304
    public void setUnitPrice(double unitPrice) {
18305
      this.unitPrice = unitPrice;
18306
      setUnitPriceIsSet(true);
18307
    }
18308
 
18309
    public void unsetUnitPrice() {
18310
      __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
18311
    }
18312
 
18313
    /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
18314
    public boolean isSetUnitPrice() {
18315
      return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
18316
    }
18317
 
18318
    public void setUnitPriceIsSet(boolean value) {
18319
      __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
18320
    }
18321
 
18322
    public long getOrderId() {
18323
      return this.orderId;
18324
    }
18325
 
18326
    public void setOrderId(long orderId) {
18327
      this.orderId = orderId;
18328
      setOrderIdIsSet(true);
18329
    }
18330
 
18331
    public void unsetOrderId() {
18332
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
18333
    }
18334
 
18335
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
18336
    public boolean isSetOrderId() {
18337
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
18338
    }
18339
 
18340
    public void setOrderIdIsSet(boolean value) {
18341
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
18342
    }
18343
 
18344
    public void setFieldValue(_Fields field, Object value) {
18345
      switch (field) {
18346
      case ITEM_ID:
18347
        if (value == null) {
18348
          unsetItemId();
18349
        } else {
18350
          setItemId((Long)value);
18351
        }
18352
        break;
18353
 
18354
      case SERIAL_NUMBER:
18355
        if (value == null) {
18356
          unsetSerialNumber();
18357
        } else {
18358
          setSerialNumber((String)value);
18359
        }
18360
        break;
18361
 
18362
      case ITEM_NUMBER:
18363
        if (value == null) {
18364
          unsetItemNumber();
18365
        } else {
18366
          setItemNumber((String)value);
18367
        }
18368
        break;
18369
 
18370
      case INVOICE_NUMBER:
18371
        if (value == null) {
18372
          unsetInvoiceNumber();
18373
        } else {
18374
          setInvoiceNumber((String)value);
18375
        }
18376
        break;
18377
 
18378
      case WAREHOUSE_ID:
18379
        if (value == null) {
18380
          unsetWarehouseId();
18381
        } else {
18382
          setWarehouseId((Long)value);
18383
        }
18384
        break;
18385
 
18386
      case UNIT_PRICE:
18387
        if (value == null) {
18388
          unsetUnitPrice();
18389
        } else {
18390
          setUnitPrice((Double)value);
18391
        }
18392
        break;
18393
 
18394
      case ORDER_ID:
18395
        if (value == null) {
18396
          unsetOrderId();
18397
        } else {
18398
          setOrderId((Long)value);
18399
        }
18400
        break;
18401
 
18402
      }
18403
    }
18404
 
18405
    public Object getFieldValue(_Fields field) {
18406
      switch (field) {
18407
      case ITEM_ID:
18408
        return Long.valueOf(getItemId());
18409
 
18410
      case SERIAL_NUMBER:
18411
        return getSerialNumber();
18412
 
18413
      case ITEM_NUMBER:
18414
        return getItemNumber();
18415
 
18416
      case INVOICE_NUMBER:
18417
        return getInvoiceNumber();
18418
 
18419
      case WAREHOUSE_ID:
18420
        return Long.valueOf(getWarehouseId());
18421
 
18422
      case UNIT_PRICE:
18423
        return Double.valueOf(getUnitPrice());
18424
 
18425
      case ORDER_ID:
18426
        return Long.valueOf(getOrderId());
18427
 
18428
      }
18429
      throw new IllegalStateException();
18430
    }
18431
 
18432
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18433
    public boolean isSet(_Fields field) {
18434
      if (field == null) {
18435
        throw new IllegalArgumentException();
18436
      }
18437
 
18438
      switch (field) {
18439
      case ITEM_ID:
18440
        return isSetItemId();
18441
      case SERIAL_NUMBER:
18442
        return isSetSerialNumber();
18443
      case ITEM_NUMBER:
18444
        return isSetItemNumber();
18445
      case INVOICE_NUMBER:
18446
        return isSetInvoiceNumber();
18447
      case WAREHOUSE_ID:
18448
        return isSetWarehouseId();
18449
      case UNIT_PRICE:
18450
        return isSetUnitPrice();
18451
      case ORDER_ID:
18452
        return isSetOrderId();
18453
      }
18454
      throw new IllegalStateException();
18455
    }
18456
 
18457
    @Override
18458
    public boolean equals(Object that) {
18459
      if (that == null)
18460
        return false;
18461
      if (that instanceof scanForOursExternalSale_args)
18462
        return this.equals((scanForOursExternalSale_args)that);
18463
      return false;
18464
    }
18465
 
18466
    public boolean equals(scanForOursExternalSale_args that) {
18467
      if (that == null)
18468
        return false;
18469
 
18470
      boolean this_present_itemId = true;
18471
      boolean that_present_itemId = true;
18472
      if (this_present_itemId || that_present_itemId) {
18473
        if (!(this_present_itemId && that_present_itemId))
18474
          return false;
18475
        if (this.itemId != that.itemId)
18476
          return false;
18477
      }
18478
 
18479
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
18480
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
18481
      if (this_present_serialNumber || that_present_serialNumber) {
18482
        if (!(this_present_serialNumber && that_present_serialNumber))
18483
          return false;
18484
        if (!this.serialNumber.equals(that.serialNumber))
18485
          return false;
18486
      }
18487
 
18488
      boolean this_present_itemNumber = true && this.isSetItemNumber();
18489
      boolean that_present_itemNumber = true && that.isSetItemNumber();
18490
      if (this_present_itemNumber || that_present_itemNumber) {
18491
        if (!(this_present_itemNumber && that_present_itemNumber))
18492
          return false;
18493
        if (!this.itemNumber.equals(that.itemNumber))
18494
          return false;
18495
      }
18496
 
18497
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
18498
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
18499
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
18500
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
18501
          return false;
18502
        if (!this.invoiceNumber.equals(that.invoiceNumber))
18503
          return false;
18504
      }
18505
 
18506
      boolean this_present_warehouseId = true;
18507
      boolean that_present_warehouseId = true;
18508
      if (this_present_warehouseId || that_present_warehouseId) {
18509
        if (!(this_present_warehouseId && that_present_warehouseId))
18510
          return false;
18511
        if (this.warehouseId != that.warehouseId)
18512
          return false;
18513
      }
18514
 
18515
      boolean this_present_unitPrice = true;
18516
      boolean that_present_unitPrice = true;
18517
      if (this_present_unitPrice || that_present_unitPrice) {
18518
        if (!(this_present_unitPrice && that_present_unitPrice))
18519
          return false;
18520
        if (this.unitPrice != that.unitPrice)
18521
          return false;
18522
      }
18523
 
18524
      boolean this_present_orderId = true;
18525
      boolean that_present_orderId = true;
18526
      if (this_present_orderId || that_present_orderId) {
18527
        if (!(this_present_orderId && that_present_orderId))
18528
          return false;
18529
        if (this.orderId != that.orderId)
18530
          return false;
18531
      }
18532
 
18533
      return true;
18534
    }
18535
 
18536
    @Override
18537
    public int hashCode() {
18538
      return 0;
18539
    }
18540
 
18541
    public int compareTo(scanForOursExternalSale_args other) {
18542
      if (!getClass().equals(other.getClass())) {
18543
        return getClass().getName().compareTo(other.getClass().getName());
18544
      }
18545
 
18546
      int lastComparison = 0;
18547
      scanForOursExternalSale_args typedOther = (scanForOursExternalSale_args)other;
18548
 
18549
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
18550
      if (lastComparison != 0) {
18551
        return lastComparison;
18552
      }
18553
      if (isSetItemId()) {
18554
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
18555
        if (lastComparison != 0) {
18556
          return lastComparison;
18557
        }
18558
      }
18559
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
18560
      if (lastComparison != 0) {
18561
        return lastComparison;
18562
      }
18563
      if (isSetSerialNumber()) {
18564
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
18565
        if (lastComparison != 0) {
18566
          return lastComparison;
18567
        }
18568
      }
18569
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
18570
      if (lastComparison != 0) {
18571
        return lastComparison;
18572
      }
18573
      if (isSetItemNumber()) {
18574
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
18575
        if (lastComparison != 0) {
18576
          return lastComparison;
18577
        }
18578
      }
18579
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(typedOther.isSetInvoiceNumber());
18580
      if (lastComparison != 0) {
18581
        return lastComparison;
18582
      }
18583
      if (isSetInvoiceNumber()) {
18584
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.invoiceNumber, typedOther.invoiceNumber);
18585
        if (lastComparison != 0) {
18586
          return lastComparison;
18587
        }
18588
      }
18589
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
18590
      if (lastComparison != 0) {
18591
        return lastComparison;
18592
      }
18593
      if (isSetWarehouseId()) {
18594
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
18595
        if (lastComparison != 0) {
18596
          return lastComparison;
18597
        }
18598
      }
18599
      lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
18600
      if (lastComparison != 0) {
18601
        return lastComparison;
18602
      }
18603
      if (isSetUnitPrice()) {
18604
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
18605
        if (lastComparison != 0) {
18606
          return lastComparison;
18607
        }
18608
      }
18609
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
18610
      if (lastComparison != 0) {
18611
        return lastComparison;
18612
      }
18613
      if (isSetOrderId()) {
18614
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
18615
        if (lastComparison != 0) {
18616
          return lastComparison;
18617
        }
18618
      }
18619
      return 0;
18620
    }
18621
 
18622
    public _Fields fieldForId(int fieldId) {
18623
      return _Fields.findByThriftId(fieldId);
18624
    }
18625
 
18626
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18627
      org.apache.thrift.protocol.TField field;
18628
      iprot.readStructBegin();
18629
      while (true)
18630
      {
18631
        field = iprot.readFieldBegin();
18632
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18633
          break;
18634
        }
18635
        switch (field.id) {
18636
          case 1: // ITEM_ID
18637
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18638
              this.itemId = iprot.readI64();
18639
              setItemIdIsSet(true);
18640
            } else { 
18641
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18642
            }
18643
            break;
18644
          case 2: // SERIAL_NUMBER
18645
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
18646
              this.serialNumber = iprot.readString();
18647
            } else { 
18648
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18649
            }
18650
            break;
18651
          case 3: // ITEM_NUMBER
18652
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
18653
              this.itemNumber = iprot.readString();
18654
            } else { 
18655
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18656
            }
18657
            break;
18658
          case 4: // INVOICE_NUMBER
18659
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
18660
              this.invoiceNumber = iprot.readString();
18661
            } else { 
18662
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18663
            }
18664
            break;
18665
          case 5: // WAREHOUSE_ID
18666
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18667
              this.warehouseId = iprot.readI64();
18668
              setWarehouseIdIsSet(true);
18669
            } else { 
18670
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18671
            }
18672
            break;
18673
          case 6: // UNIT_PRICE
18674
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
18675
              this.unitPrice = iprot.readDouble();
18676
              setUnitPriceIsSet(true);
18677
            } else { 
18678
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18679
            }
18680
            break;
18681
          case 7: // ORDER_ID
18682
            if (field.type == org.apache.thrift.protocol.TType.I64) {
18683
              this.orderId = iprot.readI64();
18684
              setOrderIdIsSet(true);
18685
            } else { 
18686
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18687
            }
18688
            break;
18689
          default:
18690
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18691
        }
18692
        iprot.readFieldEnd();
18693
      }
18694
      iprot.readStructEnd();
18695
      validate();
18696
    }
18697
 
18698
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18699
      validate();
18700
 
18701
      oprot.writeStructBegin(STRUCT_DESC);
18702
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
18703
      oprot.writeI64(this.itemId);
18704
      oprot.writeFieldEnd();
18705
      if (this.serialNumber != null) {
18706
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
18707
        oprot.writeString(this.serialNumber);
18708
        oprot.writeFieldEnd();
18709
      }
18710
      if (this.itemNumber != null) {
18711
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
18712
        oprot.writeString(this.itemNumber);
18713
        oprot.writeFieldEnd();
18714
      }
18715
      if (this.invoiceNumber != null) {
18716
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
18717
        oprot.writeString(this.invoiceNumber);
18718
        oprot.writeFieldEnd();
18719
      }
18720
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
18721
      oprot.writeI64(this.warehouseId);
18722
      oprot.writeFieldEnd();
18723
      oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
18724
      oprot.writeDouble(this.unitPrice);
18725
      oprot.writeFieldEnd();
18726
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
18727
      oprot.writeI64(this.orderId);
18728
      oprot.writeFieldEnd();
18729
      oprot.writeFieldStop();
18730
      oprot.writeStructEnd();
18731
    }
18732
 
18733
    @Override
18734
    public String toString() {
18735
      StringBuilder sb = new StringBuilder("scanForOursExternalSale_args(");
18736
      boolean first = true;
18737
 
18738
      sb.append("itemId:");
18739
      sb.append(this.itemId);
18740
      first = false;
18741
      if (!first) sb.append(", ");
18742
      sb.append("serialNumber:");
18743
      if (this.serialNumber == null) {
18744
        sb.append("null");
18745
      } else {
18746
        sb.append(this.serialNumber);
18747
      }
18748
      first = false;
18749
      if (!first) sb.append(", ");
18750
      sb.append("itemNumber:");
18751
      if (this.itemNumber == null) {
18752
        sb.append("null");
18753
      } else {
18754
        sb.append(this.itemNumber);
18755
      }
18756
      first = false;
18757
      if (!first) sb.append(", ");
18758
      sb.append("invoiceNumber:");
18759
      if (this.invoiceNumber == null) {
18760
        sb.append("null");
18761
      } else {
18762
        sb.append(this.invoiceNumber);
18763
      }
18764
      first = false;
18765
      if (!first) sb.append(", ");
18766
      sb.append("warehouseId:");
18767
      sb.append(this.warehouseId);
18768
      first = false;
18769
      if (!first) sb.append(", ");
18770
      sb.append("unitPrice:");
18771
      sb.append(this.unitPrice);
18772
      first = false;
18773
      if (!first) sb.append(", ");
18774
      sb.append("orderId:");
18775
      sb.append(this.orderId);
18776
      first = false;
18777
      sb.append(")");
18778
      return sb.toString();
18779
    }
18780
 
18781
    public void validate() throws org.apache.thrift.TException {
18782
      // check for required fields
18783
    }
18784
 
18785
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18786
      try {
18787
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18788
      } catch (org.apache.thrift.TException te) {
18789
        throw new java.io.IOException(te);
18790
      }
18791
    }
18792
 
18793
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18794
      try {
18795
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
18796
        __isset_bit_vector = new BitSet(1);
18797
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18798
      } catch (org.apache.thrift.TException te) {
18799
        throw new java.io.IOException(te);
18800
      }
18801
    }
18802
 
18803
  }
18804
 
18805
  public static class scanForOursExternalSale_result implements org.apache.thrift.TBase<scanForOursExternalSale_result, scanForOursExternalSale_result._Fields>, java.io.Serializable, Cloneable   {
18806
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOursExternalSale_result");
18807
 
18808
    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);
18809
    private static final org.apache.thrift.protocol.TField EX_FIELD_DESC = new org.apache.thrift.protocol.TField("ex", org.apache.thrift.protocol.TType.STRUCT, (short)1);
18810
 
18811
    private InventoryItem success; // required
18812
    private WarehouseServiceException ex; // required
18813
 
18814
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18815
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18816
      SUCCESS((short)0, "success"),
18817
      EX((short)1, "ex");
18818
 
18819
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18820
 
18821
      static {
18822
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18823
          byName.put(field.getFieldName(), field);
18824
        }
18825
      }
18826
 
18827
      /**
18828
       * Find the _Fields constant that matches fieldId, or null if its not found.
18829
       */
18830
      public static _Fields findByThriftId(int fieldId) {
18831
        switch(fieldId) {
18832
          case 0: // SUCCESS
18833
            return SUCCESS;
18834
          case 1: // EX
18835
            return EX;
18836
          default:
18837
            return null;
18838
        }
18839
      }
18840
 
18841
      /**
18842
       * Find the _Fields constant that matches fieldId, throwing an exception
18843
       * if it is not found.
18844
       */
18845
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18846
        _Fields fields = findByThriftId(fieldId);
18847
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18848
        return fields;
18849
      }
18850
 
18851
      /**
18852
       * Find the _Fields constant that matches name, or null if its not found.
18853
       */
18854
      public static _Fields findByName(String name) {
18855
        return byName.get(name);
18856
      }
18857
 
18858
      private final short _thriftId;
18859
      private final String _fieldName;
18860
 
18861
      _Fields(short thriftId, String fieldName) {
18862
        _thriftId = thriftId;
18863
        _fieldName = fieldName;
18864
      }
18865
 
18866
      public short getThriftFieldId() {
18867
        return _thriftId;
18868
      }
18869
 
18870
      public String getFieldName() {
18871
        return _fieldName;
18872
      }
18873
    }
18874
 
18875
    // isset id assignments
18876
 
18877
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18878
    static {
18879
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18880
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18881
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
18882
      tmpMap.put(_Fields.EX, new org.apache.thrift.meta_data.FieldMetaData("ex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18883
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
18884
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18885
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOursExternalSale_result.class, metaDataMap);
18886
    }
18887
 
18888
    public scanForOursExternalSale_result() {
18889
    }
18890
 
18891
    public scanForOursExternalSale_result(
18892
      InventoryItem success,
18893
      WarehouseServiceException ex)
18894
    {
18895
      this();
18896
      this.success = success;
18897
      this.ex = ex;
18898
    }
18899
 
18900
    /**
18901
     * Performs a deep copy on <i>other</i>.
18902
     */
18903
    public scanForOursExternalSale_result(scanForOursExternalSale_result other) {
18904
      if (other.isSetSuccess()) {
18905
        this.success = new InventoryItem(other.success);
18906
      }
18907
      if (other.isSetEx()) {
18908
        this.ex = new WarehouseServiceException(other.ex);
18909
      }
18910
    }
18911
 
18912
    public scanForOursExternalSale_result deepCopy() {
18913
      return new scanForOursExternalSale_result(this);
18914
    }
18915
 
18916
    @Override
18917
    public void clear() {
18918
      this.success = null;
18919
      this.ex = null;
18920
    }
18921
 
18922
    public InventoryItem getSuccess() {
18923
      return this.success;
18924
    }
18925
 
18926
    public void setSuccess(InventoryItem success) {
18927
      this.success = success;
18928
    }
18929
 
18930
    public void unsetSuccess() {
18931
      this.success = null;
18932
    }
18933
 
18934
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18935
    public boolean isSetSuccess() {
18936
      return this.success != null;
18937
    }
18938
 
18939
    public void setSuccessIsSet(boolean value) {
18940
      if (!value) {
18941
        this.success = null;
18942
      }
18943
    }
18944
 
18945
    public WarehouseServiceException getEx() {
18946
      return this.ex;
18947
    }
18948
 
18949
    public void setEx(WarehouseServiceException ex) {
18950
      this.ex = ex;
18951
    }
18952
 
18953
    public void unsetEx() {
18954
      this.ex = null;
18955
    }
18956
 
18957
    /** Returns true if field ex is set (has been assigned a value) and false otherwise */
18958
    public boolean isSetEx() {
18959
      return this.ex != null;
18960
    }
18961
 
18962
    public void setExIsSet(boolean value) {
18963
      if (!value) {
18964
        this.ex = null;
18965
      }
18966
    }
18967
 
18968
    public void setFieldValue(_Fields field, Object value) {
18969
      switch (field) {
18970
      case SUCCESS:
18971
        if (value == null) {
18972
          unsetSuccess();
18973
        } else {
18974
          setSuccess((InventoryItem)value);
18975
        }
18976
        break;
18977
 
18978
      case EX:
18979
        if (value == null) {
18980
          unsetEx();
18981
        } else {
18982
          setEx((WarehouseServiceException)value);
18983
        }
18984
        break;
18985
 
18986
      }
18987
    }
18988
 
18989
    public Object getFieldValue(_Fields field) {
18990
      switch (field) {
18991
      case SUCCESS:
18992
        return getSuccess();
18993
 
18994
      case EX:
18995
        return getEx();
18996
 
18997
      }
18998
      throw new IllegalStateException();
18999
    }
19000
 
19001
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19002
    public boolean isSet(_Fields field) {
19003
      if (field == null) {
19004
        throw new IllegalArgumentException();
19005
      }
19006
 
19007
      switch (field) {
19008
      case SUCCESS:
19009
        return isSetSuccess();
19010
      case EX:
19011
        return isSetEx();
19012
      }
19013
      throw new IllegalStateException();
19014
    }
19015
 
19016
    @Override
19017
    public boolean equals(Object that) {
19018
      if (that == null)
19019
        return false;
19020
      if (that instanceof scanForOursExternalSale_result)
19021
        return this.equals((scanForOursExternalSale_result)that);
19022
      return false;
19023
    }
19024
 
19025
    public boolean equals(scanForOursExternalSale_result that) {
19026
      if (that == null)
19027
        return false;
19028
 
19029
      boolean this_present_success = true && this.isSetSuccess();
19030
      boolean that_present_success = true && that.isSetSuccess();
19031
      if (this_present_success || that_present_success) {
19032
        if (!(this_present_success && that_present_success))
19033
          return false;
19034
        if (!this.success.equals(that.success))
19035
          return false;
19036
      }
19037
 
19038
      boolean this_present_ex = true && this.isSetEx();
19039
      boolean that_present_ex = true && that.isSetEx();
19040
      if (this_present_ex || that_present_ex) {
19041
        if (!(this_present_ex && that_present_ex))
19042
          return false;
19043
        if (!this.ex.equals(that.ex))
19044
          return false;
19045
      }
19046
 
19047
      return true;
19048
    }
19049
 
19050
    @Override
19051
    public int hashCode() {
19052
      return 0;
19053
    }
19054
 
19055
    public int compareTo(scanForOursExternalSale_result other) {
19056
      if (!getClass().equals(other.getClass())) {
19057
        return getClass().getName().compareTo(other.getClass().getName());
19058
      }
19059
 
19060
      int lastComparison = 0;
19061
      scanForOursExternalSale_result typedOther = (scanForOursExternalSale_result)other;
19062
 
19063
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
19064
      if (lastComparison != 0) {
19065
        return lastComparison;
19066
      }
19067
      if (isSetSuccess()) {
19068
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
19069
        if (lastComparison != 0) {
19070
          return lastComparison;
19071
        }
19072
      }
19073
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(typedOther.isSetEx());
19074
      if (lastComparison != 0) {
19075
        return lastComparison;
19076
      }
19077
      if (isSetEx()) {
19078
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.ex, typedOther.ex);
19079
        if (lastComparison != 0) {
19080
          return lastComparison;
19081
        }
19082
      }
19083
      return 0;
19084
    }
19085
 
19086
    public _Fields fieldForId(int fieldId) {
19087
      return _Fields.findByThriftId(fieldId);
19088
    }
19089
 
19090
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19091
      org.apache.thrift.protocol.TField field;
19092
      iprot.readStructBegin();
19093
      while (true)
19094
      {
19095
        field = iprot.readFieldBegin();
19096
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19097
          break;
19098
        }
19099
        switch (field.id) {
19100
          case 0: // SUCCESS
19101
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
19102
              this.success = new InventoryItem();
19103
              this.success.read(iprot);
19104
            } else { 
19105
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19106
            }
19107
            break;
19108
          case 1: // EX
19109
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
19110
              this.ex = new WarehouseServiceException();
19111
              this.ex.read(iprot);
19112
            } else { 
19113
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19114
            }
19115
            break;
19116
          default:
19117
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19118
        }
19119
        iprot.readFieldEnd();
19120
      }
19121
      iprot.readStructEnd();
19122
      validate();
19123
    }
19124
 
19125
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19126
      oprot.writeStructBegin(STRUCT_DESC);
19127
 
19128
      if (this.isSetSuccess()) {
19129
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19130
        this.success.write(oprot);
19131
        oprot.writeFieldEnd();
19132
      } else if (this.isSetEx()) {
19133
        oprot.writeFieldBegin(EX_FIELD_DESC);
19134
        this.ex.write(oprot);
19135
        oprot.writeFieldEnd();
19136
      }
19137
      oprot.writeFieldStop();
19138
      oprot.writeStructEnd();
19139
    }
19140
 
19141
    @Override
19142
    public String toString() {
19143
      StringBuilder sb = new StringBuilder("scanForOursExternalSale_result(");
19144
      boolean first = true;
19145
 
19146
      sb.append("success:");
19147
      if (this.success == null) {
19148
        sb.append("null");
19149
      } else {
19150
        sb.append(this.success);
19151
      }
19152
      first = false;
19153
      if (!first) sb.append(", ");
19154
      sb.append("ex:");
19155
      if (this.ex == null) {
19156
        sb.append("null");
19157
      } else {
19158
        sb.append(this.ex);
19159
      }
19160
      first = false;
19161
      sb.append(")");
19162
      return sb.toString();
19163
    }
19164
 
19165
    public void validate() throws org.apache.thrift.TException {
19166
      // check for required fields
19167
    }
19168
 
19169
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19170
      try {
19171
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19172
      } catch (org.apache.thrift.TException te) {
19173
        throw new java.io.IOException(te);
19174
      }
19175
    }
19176
 
19177
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19178
      try {
19179
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19180
      } catch (org.apache.thrift.TException te) {
19181
        throw new java.io.IOException(te);
19182
      }
19183
    }
19184
 
19185
  }
19186
 
19187
  public static class scanForOursExternalSaleReturn_args implements org.apache.thrift.TBase<scanForOursExternalSaleReturn_args, scanForOursExternalSaleReturn_args._Fields>, java.io.Serializable, Cloneable   {
19188
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOursExternalSaleReturn_args");
19189
 
19190
    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);
19191
    private static final org.apache.thrift.protocol.TField UNIT_PRICE_FIELD_DESC = new org.apache.thrift.protocol.TField("unitPrice", org.apache.thrift.protocol.TType.DOUBLE, (short)2);
19192
 
19193
    private long orderId; // required
19194
    private double unitPrice; // required
19195
 
19196
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19197
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19198
      ORDER_ID((short)1, "orderId"),
19199
      UNIT_PRICE((short)2, "unitPrice");
19200
 
19201
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19202
 
19203
      static {
19204
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19205
          byName.put(field.getFieldName(), field);
19206
        }
19207
      }
19208
 
19209
      /**
19210
       * Find the _Fields constant that matches fieldId, or null if its not found.
19211
       */
19212
      public static _Fields findByThriftId(int fieldId) {
19213
        switch(fieldId) {
19214
          case 1: // ORDER_ID
19215
            return ORDER_ID;
19216
          case 2: // UNIT_PRICE
19217
            return UNIT_PRICE;
19218
          default:
19219
            return null;
19220
        }
19221
      }
19222
 
19223
      /**
19224
       * Find the _Fields constant that matches fieldId, throwing an exception
19225
       * if it is not found.
19226
       */
19227
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19228
        _Fields fields = findByThriftId(fieldId);
19229
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19230
        return fields;
19231
      }
19232
 
19233
      /**
19234
       * Find the _Fields constant that matches name, or null if its not found.
19235
       */
19236
      public static _Fields findByName(String name) {
19237
        return byName.get(name);
19238
      }
19239
 
19240
      private final short _thriftId;
19241
      private final String _fieldName;
19242
 
19243
      _Fields(short thriftId, String fieldName) {
19244
        _thriftId = thriftId;
19245
        _fieldName = fieldName;
19246
      }
19247
 
19248
      public short getThriftFieldId() {
19249
        return _thriftId;
19250
      }
19251
 
19252
      public String getFieldName() {
19253
        return _fieldName;
19254
      }
19255
    }
19256
 
19257
    // isset id assignments
19258
    private static final int __ORDERID_ISSET_ID = 0;
19259
    private static final int __UNITPRICE_ISSET_ID = 1;
19260
    private BitSet __isset_bit_vector = new BitSet(2);
19261
 
19262
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19263
    static {
19264
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19265
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19266
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19267
      tmpMap.put(_Fields.UNIT_PRICE, new org.apache.thrift.meta_data.FieldMetaData("unitPrice", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19268
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
19269
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19270
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOursExternalSaleReturn_args.class, metaDataMap);
19271
    }
19272
 
19273
    public scanForOursExternalSaleReturn_args() {
19274
    }
19275
 
19276
    public scanForOursExternalSaleReturn_args(
19277
      long orderId,
19278
      double unitPrice)
19279
    {
19280
      this();
19281
      this.orderId = orderId;
19282
      setOrderIdIsSet(true);
19283
      this.unitPrice = unitPrice;
19284
      setUnitPriceIsSet(true);
19285
    }
19286
 
19287
    /**
19288
     * Performs a deep copy on <i>other</i>.
19289
     */
19290
    public scanForOursExternalSaleReturn_args(scanForOursExternalSaleReturn_args other) {
19291
      __isset_bit_vector.clear();
19292
      __isset_bit_vector.or(other.__isset_bit_vector);
19293
      this.orderId = other.orderId;
19294
      this.unitPrice = other.unitPrice;
19295
    }
19296
 
19297
    public scanForOursExternalSaleReturn_args deepCopy() {
19298
      return new scanForOursExternalSaleReturn_args(this);
19299
    }
19300
 
19301
    @Override
19302
    public void clear() {
19303
      setOrderIdIsSet(false);
19304
      this.orderId = 0;
19305
      setUnitPriceIsSet(false);
19306
      this.unitPrice = 0.0;
19307
    }
19308
 
19309
    public long getOrderId() {
19310
      return this.orderId;
19311
    }
19312
 
19313
    public void setOrderId(long orderId) {
19314
      this.orderId = orderId;
19315
      setOrderIdIsSet(true);
19316
    }
19317
 
19318
    public void unsetOrderId() {
19319
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
19320
    }
19321
 
19322
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
19323
    public boolean isSetOrderId() {
19324
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
19325
    }
19326
 
19327
    public void setOrderIdIsSet(boolean value) {
19328
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
19329
    }
19330
 
19331
    public double getUnitPrice() {
19332
      return this.unitPrice;
19333
    }
19334
 
19335
    public void setUnitPrice(double unitPrice) {
19336
      this.unitPrice = unitPrice;
19337
      setUnitPriceIsSet(true);
19338
    }
19339
 
19340
    public void unsetUnitPrice() {
19341
      __isset_bit_vector.clear(__UNITPRICE_ISSET_ID);
19342
    }
19343
 
19344
    /** Returns true if field unitPrice is set (has been assigned a value) and false otherwise */
19345
    public boolean isSetUnitPrice() {
19346
      return __isset_bit_vector.get(__UNITPRICE_ISSET_ID);
19347
    }
19348
 
19349
    public void setUnitPriceIsSet(boolean value) {
19350
      __isset_bit_vector.set(__UNITPRICE_ISSET_ID, value);
19351
    }
19352
 
19353
    public void setFieldValue(_Fields field, Object value) {
19354
      switch (field) {
19355
      case ORDER_ID:
19356
        if (value == null) {
19357
          unsetOrderId();
19358
        } else {
19359
          setOrderId((Long)value);
19360
        }
19361
        break;
19362
 
19363
      case UNIT_PRICE:
19364
        if (value == null) {
19365
          unsetUnitPrice();
19366
        } else {
19367
          setUnitPrice((Double)value);
19368
        }
19369
        break;
19370
 
19371
      }
19372
    }
19373
 
19374
    public Object getFieldValue(_Fields field) {
19375
      switch (field) {
19376
      case ORDER_ID:
19377
        return Long.valueOf(getOrderId());
19378
 
19379
      case UNIT_PRICE:
19380
        return Double.valueOf(getUnitPrice());
19381
 
19382
      }
19383
      throw new IllegalStateException();
19384
    }
19385
 
19386
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19387
    public boolean isSet(_Fields field) {
19388
      if (field == null) {
19389
        throw new IllegalArgumentException();
19390
      }
19391
 
19392
      switch (field) {
19393
      case ORDER_ID:
19394
        return isSetOrderId();
19395
      case UNIT_PRICE:
19396
        return isSetUnitPrice();
19397
      }
19398
      throw new IllegalStateException();
19399
    }
19400
 
19401
    @Override
19402
    public boolean equals(Object that) {
19403
      if (that == null)
19404
        return false;
19405
      if (that instanceof scanForOursExternalSaleReturn_args)
19406
        return this.equals((scanForOursExternalSaleReturn_args)that);
19407
      return false;
19408
    }
19409
 
19410
    public boolean equals(scanForOursExternalSaleReturn_args that) {
19411
      if (that == null)
19412
        return false;
19413
 
19414
      boolean this_present_orderId = true;
19415
      boolean that_present_orderId = true;
19416
      if (this_present_orderId || that_present_orderId) {
19417
        if (!(this_present_orderId && that_present_orderId))
19418
          return false;
19419
        if (this.orderId != that.orderId)
19420
          return false;
19421
      }
19422
 
19423
      boolean this_present_unitPrice = true;
19424
      boolean that_present_unitPrice = true;
19425
      if (this_present_unitPrice || that_present_unitPrice) {
19426
        if (!(this_present_unitPrice && that_present_unitPrice))
19427
          return false;
19428
        if (this.unitPrice != that.unitPrice)
19429
          return false;
19430
      }
19431
 
19432
      return true;
19433
    }
19434
 
19435
    @Override
19436
    public int hashCode() {
19437
      return 0;
19438
    }
19439
 
19440
    public int compareTo(scanForOursExternalSaleReturn_args other) {
19441
      if (!getClass().equals(other.getClass())) {
19442
        return getClass().getName().compareTo(other.getClass().getName());
19443
      }
19444
 
19445
      int lastComparison = 0;
19446
      scanForOursExternalSaleReturn_args typedOther = (scanForOursExternalSaleReturn_args)other;
19447
 
19448
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
19449
      if (lastComparison != 0) {
19450
        return lastComparison;
19451
      }
19452
      if (isSetOrderId()) {
19453
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
19454
        if (lastComparison != 0) {
19455
          return lastComparison;
19456
        }
19457
      }
19458
      lastComparison = Boolean.valueOf(isSetUnitPrice()).compareTo(typedOther.isSetUnitPrice());
19459
      if (lastComparison != 0) {
19460
        return lastComparison;
19461
      }
19462
      if (isSetUnitPrice()) {
19463
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.unitPrice, typedOther.unitPrice);
19464
        if (lastComparison != 0) {
19465
          return lastComparison;
19466
        }
19467
      }
19468
      return 0;
19469
    }
19470
 
19471
    public _Fields fieldForId(int fieldId) {
19472
      return _Fields.findByThriftId(fieldId);
19473
    }
19474
 
19475
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19476
      org.apache.thrift.protocol.TField field;
19477
      iprot.readStructBegin();
19478
      while (true)
19479
      {
19480
        field = iprot.readFieldBegin();
19481
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19482
          break;
19483
        }
19484
        switch (field.id) {
19485
          case 1: // ORDER_ID
19486
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19487
              this.orderId = iprot.readI64();
19488
              setOrderIdIsSet(true);
19489
            } else { 
19490
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19491
            }
19492
            break;
19493
          case 2: // UNIT_PRICE
19494
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
19495
              this.unitPrice = iprot.readDouble();
19496
              setUnitPriceIsSet(true);
19497
            } else { 
19498
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19499
            }
19500
            break;
19501
          default:
19502
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19503
        }
19504
        iprot.readFieldEnd();
19505
      }
19506
      iprot.readStructEnd();
19507
      validate();
19508
    }
19509
 
19510
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19511
      validate();
19512
 
19513
      oprot.writeStructBegin(STRUCT_DESC);
19514
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
19515
      oprot.writeI64(this.orderId);
19516
      oprot.writeFieldEnd();
19517
      oprot.writeFieldBegin(UNIT_PRICE_FIELD_DESC);
19518
      oprot.writeDouble(this.unitPrice);
19519
      oprot.writeFieldEnd();
19520
      oprot.writeFieldStop();
19521
      oprot.writeStructEnd();
19522
    }
19523
 
19524
    @Override
19525
    public String toString() {
19526
      StringBuilder sb = new StringBuilder("scanForOursExternalSaleReturn_args(");
19527
      boolean first = true;
19528
 
19529
      sb.append("orderId:");
19530
      sb.append(this.orderId);
19531
      first = false;
19532
      if (!first) sb.append(", ");
19533
      sb.append("unitPrice:");
19534
      sb.append(this.unitPrice);
19535
      first = false;
19536
      sb.append(")");
19537
      return sb.toString();
19538
    }
19539
 
19540
    public void validate() throws org.apache.thrift.TException {
19541
      // check for required fields
19542
    }
19543
 
19544
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19545
      try {
19546
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19547
      } catch (org.apache.thrift.TException te) {
19548
        throw new java.io.IOException(te);
19549
      }
19550
    }
19551
 
19552
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19553
      try {
19554
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19555
      } catch (org.apache.thrift.TException te) {
19556
        throw new java.io.IOException(te);
19557
      }
19558
    }
19559
 
19560
  }
19561
 
19562
  public static class scanForOursExternalSaleReturn_result implements org.apache.thrift.TBase<scanForOursExternalSaleReturn_result, scanForOursExternalSaleReturn_result._Fields>, java.io.Serializable, Cloneable   {
19563
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOursExternalSaleReturn_result");
19564
 
19565
 
19566
 
19567
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19568
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19569
;
19570
 
19571
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19572
 
19573
      static {
19574
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19575
          byName.put(field.getFieldName(), field);
19576
        }
19577
      }
19578
 
19579
      /**
19580
       * Find the _Fields constant that matches fieldId, or null if its not found.
19581
       */
19582
      public static _Fields findByThriftId(int fieldId) {
19583
        switch(fieldId) {
19584
          default:
19585
            return null;
19586
        }
19587
      }
19588
 
19589
      /**
19590
       * Find the _Fields constant that matches fieldId, throwing an exception
19591
       * if it is not found.
19592
       */
19593
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19594
        _Fields fields = findByThriftId(fieldId);
19595
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19596
        return fields;
19597
      }
19598
 
19599
      /**
19600
       * Find the _Fields constant that matches name, or null if its not found.
19601
       */
19602
      public static _Fields findByName(String name) {
19603
        return byName.get(name);
19604
      }
19605
 
19606
      private final short _thriftId;
19607
      private final String _fieldName;
19608
 
19609
      _Fields(short thriftId, String fieldName) {
19610
        _thriftId = thriftId;
19611
        _fieldName = fieldName;
19612
      }
19613
 
19614
      public short getThriftFieldId() {
19615
        return _thriftId;
19616
      }
19617
 
19618
      public String getFieldName() {
19619
        return _fieldName;
19620
      }
19621
    }
19622
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19623
    static {
19624
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19625
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19626
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOursExternalSaleReturn_result.class, metaDataMap);
19627
    }
19628
 
19629
    public scanForOursExternalSaleReturn_result() {
19630
    }
19631
 
19632
    /**
19633
     * Performs a deep copy on <i>other</i>.
19634
     */
19635
    public scanForOursExternalSaleReturn_result(scanForOursExternalSaleReturn_result other) {
19636
    }
19637
 
19638
    public scanForOursExternalSaleReturn_result deepCopy() {
19639
      return new scanForOursExternalSaleReturn_result(this);
19640
    }
19641
 
19642
    @Override
19643
    public void clear() {
19644
    }
19645
 
19646
    public void setFieldValue(_Fields field, Object value) {
19647
      switch (field) {
19648
      }
19649
    }
19650
 
19651
    public Object getFieldValue(_Fields field) {
19652
      switch (field) {
19653
      }
19654
      throw new IllegalStateException();
19655
    }
19656
 
19657
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19658
    public boolean isSet(_Fields field) {
19659
      if (field == null) {
19660
        throw new IllegalArgumentException();
19661
      }
19662
 
19663
      switch (field) {
19664
      }
19665
      throw new IllegalStateException();
19666
    }
19667
 
19668
    @Override
19669
    public boolean equals(Object that) {
19670
      if (that == null)
19671
        return false;
19672
      if (that instanceof scanForOursExternalSaleReturn_result)
19673
        return this.equals((scanForOursExternalSaleReturn_result)that);
19674
      return false;
19675
    }
19676
 
19677
    public boolean equals(scanForOursExternalSaleReturn_result that) {
19678
      if (that == null)
19679
        return false;
19680
 
19681
      return true;
19682
    }
19683
 
19684
    @Override
19685
    public int hashCode() {
19686
      return 0;
19687
    }
19688
 
19689
    public int compareTo(scanForOursExternalSaleReturn_result other) {
19690
      if (!getClass().equals(other.getClass())) {
19691
        return getClass().getName().compareTo(other.getClass().getName());
19692
      }
19693
 
19694
      int lastComparison = 0;
19695
      scanForOursExternalSaleReturn_result typedOther = (scanForOursExternalSaleReturn_result)other;
19696
 
19697
      return 0;
19698
    }
19699
 
19700
    public _Fields fieldForId(int fieldId) {
19701
      return _Fields.findByThriftId(fieldId);
19702
    }
19703
 
19704
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19705
      org.apache.thrift.protocol.TField field;
19706
      iprot.readStructBegin();
19707
      while (true)
19708
      {
19709
        field = iprot.readFieldBegin();
19710
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19711
          break;
19712
        }
19713
        switch (field.id) {
19714
          default:
19715
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19716
        }
19717
        iprot.readFieldEnd();
19718
      }
19719
      iprot.readStructEnd();
19720
      validate();
19721
    }
19722
 
19723
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19724
      oprot.writeStructBegin(STRUCT_DESC);
19725
 
19726
      oprot.writeFieldStop();
19727
      oprot.writeStructEnd();
19728
    }
19729
 
19730
    @Override
19731
    public String toString() {
19732
      StringBuilder sb = new StringBuilder("scanForOursExternalSaleReturn_result(");
19733
      boolean first = true;
19734
 
19735
      sb.append(")");
19736
      return sb.toString();
19737
    }
19738
 
19739
    public void validate() throws org.apache.thrift.TException {
19740
      // check for required fields
19741
    }
19742
 
19743
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19744
      try {
19745
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19746
      } catch (org.apache.thrift.TException te) {
19747
        throw new java.io.IOException(te);
19748
      }
19749
    }
19750
 
19751
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19752
      try {
19753
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19754
      } catch (org.apache.thrift.TException te) {
19755
        throw new java.io.IOException(te);
19756
      }
19757
    }
19758
 
19759
  }
19760
 
6880 amar.kumar 19761
  public static class getMovementNonSerializedInventoryByScans_args implements org.apache.thrift.TBase<getMovementNonSerializedInventoryByScans_args, getMovementNonSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
19762
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMovementNonSerializedInventoryByScans_args");
19763
 
19764
    private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.I64, (short)1);
19765
    private static final org.apache.thrift.protocol.TField END_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("endDate", org.apache.thrift.protocol.TType.I64, (short)2);
19766
 
19767
    private long startDate; // required
19768
    private long endDate; // required
19769
 
19770
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19771
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19772
      START_DATE((short)1, "startDate"),
19773
      END_DATE((short)2, "endDate");
19774
 
19775
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19776
 
19777
      static {
19778
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19779
          byName.put(field.getFieldName(), field);
19780
        }
19781
      }
19782
 
19783
      /**
19784
       * Find the _Fields constant that matches fieldId, or null if its not found.
19785
       */
19786
      public static _Fields findByThriftId(int fieldId) {
19787
        switch(fieldId) {
19788
          case 1: // START_DATE
19789
            return START_DATE;
19790
          case 2: // END_DATE
19791
            return END_DATE;
19792
          default:
19793
            return null;
19794
        }
19795
      }
19796
 
19797
      /**
19798
       * Find the _Fields constant that matches fieldId, throwing an exception
19799
       * if it is not found.
19800
       */
19801
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19802
        _Fields fields = findByThriftId(fieldId);
19803
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19804
        return fields;
19805
      }
19806
 
19807
      /**
19808
       * Find the _Fields constant that matches name, or null if its not found.
19809
       */
19810
      public static _Fields findByName(String name) {
19811
        return byName.get(name);
19812
      }
19813
 
19814
      private final short _thriftId;
19815
      private final String _fieldName;
19816
 
19817
      _Fields(short thriftId, String fieldName) {
19818
        _thriftId = thriftId;
19819
        _fieldName = fieldName;
19820
      }
19821
 
19822
      public short getThriftFieldId() {
19823
        return _thriftId;
19824
      }
19825
 
19826
      public String getFieldName() {
19827
        return _fieldName;
19828
      }
19829
    }
19830
 
19831
    // isset id assignments
19832
    private static final int __STARTDATE_ISSET_ID = 0;
19833
    private static final int __ENDDATE_ISSET_ID = 1;
19834
    private BitSet __isset_bit_vector = new BitSet(2);
19835
 
19836
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19837
    static {
19838
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19839
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19840
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19841
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19842
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19843
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19844
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMovementNonSerializedInventoryByScans_args.class, metaDataMap);
19845
    }
19846
 
19847
    public getMovementNonSerializedInventoryByScans_args() {
19848
    }
19849
 
19850
    public getMovementNonSerializedInventoryByScans_args(
19851
      long startDate,
19852
      long endDate)
19853
    {
19854
      this();
19855
      this.startDate = startDate;
19856
      setStartDateIsSet(true);
19857
      this.endDate = endDate;
19858
      setEndDateIsSet(true);
19859
    }
19860
 
19861
    /**
19862
     * Performs a deep copy on <i>other</i>.
19863
     */
19864
    public getMovementNonSerializedInventoryByScans_args(getMovementNonSerializedInventoryByScans_args other) {
19865
      __isset_bit_vector.clear();
19866
      __isset_bit_vector.or(other.__isset_bit_vector);
19867
      this.startDate = other.startDate;
19868
      this.endDate = other.endDate;
19869
    }
19870
 
19871
    public getMovementNonSerializedInventoryByScans_args deepCopy() {
19872
      return new getMovementNonSerializedInventoryByScans_args(this);
19873
    }
19874
 
19875
    @Override
19876
    public void clear() {
19877
      setStartDateIsSet(false);
19878
      this.startDate = 0;
19879
      setEndDateIsSet(false);
19880
      this.endDate = 0;
19881
    }
19882
 
19883
    public long getStartDate() {
19884
      return this.startDate;
19885
    }
19886
 
19887
    public void setStartDate(long startDate) {
19888
      this.startDate = startDate;
19889
      setStartDateIsSet(true);
19890
    }
19891
 
19892
    public void unsetStartDate() {
19893
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
19894
    }
19895
 
19896
    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
19897
    public boolean isSetStartDate() {
19898
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
19899
    }
19900
 
19901
    public void setStartDateIsSet(boolean value) {
19902
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
19903
    }
19904
 
19905
    public long getEndDate() {
19906
      return this.endDate;
19907
    }
19908
 
19909
    public void setEndDate(long endDate) {
19910
      this.endDate = endDate;
19911
      setEndDateIsSet(true);
19912
    }
19913
 
19914
    public void unsetEndDate() {
19915
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
19916
    }
19917
 
19918
    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
19919
    public boolean isSetEndDate() {
19920
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
19921
    }
19922
 
19923
    public void setEndDateIsSet(boolean value) {
19924
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
19925
    }
19926
 
19927
    public void setFieldValue(_Fields field, Object value) {
19928
      switch (field) {
19929
      case START_DATE:
19930
        if (value == null) {
19931
          unsetStartDate();
19932
        } else {
19933
          setStartDate((Long)value);
19934
        }
19935
        break;
19936
 
19937
      case END_DATE:
19938
        if (value == null) {
19939
          unsetEndDate();
19940
        } else {
19941
          setEndDate((Long)value);
19942
        }
19943
        break;
19944
 
19945
      }
19946
    }
19947
 
19948
    public Object getFieldValue(_Fields field) {
19949
      switch (field) {
19950
      case START_DATE:
19951
        return Long.valueOf(getStartDate());
19952
 
19953
      case END_DATE:
19954
        return Long.valueOf(getEndDate());
19955
 
19956
      }
19957
      throw new IllegalStateException();
19958
    }
19959
 
19960
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19961
    public boolean isSet(_Fields field) {
19962
      if (field == null) {
19963
        throw new IllegalArgumentException();
19964
      }
19965
 
19966
      switch (field) {
19967
      case START_DATE:
19968
        return isSetStartDate();
19969
      case END_DATE:
19970
        return isSetEndDate();
19971
      }
19972
      throw new IllegalStateException();
19973
    }
19974
 
19975
    @Override
19976
    public boolean equals(Object that) {
19977
      if (that == null)
19978
        return false;
19979
      if (that instanceof getMovementNonSerializedInventoryByScans_args)
19980
        return this.equals((getMovementNonSerializedInventoryByScans_args)that);
19981
      return false;
19982
    }
19983
 
19984
    public boolean equals(getMovementNonSerializedInventoryByScans_args that) {
19985
      if (that == null)
19986
        return false;
19987
 
19988
      boolean this_present_startDate = true;
19989
      boolean that_present_startDate = true;
19990
      if (this_present_startDate || that_present_startDate) {
19991
        if (!(this_present_startDate && that_present_startDate))
19992
          return false;
19993
        if (this.startDate != that.startDate)
19994
          return false;
19995
      }
19996
 
19997
      boolean this_present_endDate = true;
19998
      boolean that_present_endDate = true;
19999
      if (this_present_endDate || that_present_endDate) {
20000
        if (!(this_present_endDate && that_present_endDate))
20001
          return false;
20002
        if (this.endDate != that.endDate)
20003
          return false;
20004
      }
20005
 
20006
      return true;
20007
    }
20008
 
20009
    @Override
20010
    public int hashCode() {
20011
      return 0;
20012
    }
20013
 
20014
    public int compareTo(getMovementNonSerializedInventoryByScans_args other) {
20015
      if (!getClass().equals(other.getClass())) {
20016
        return getClass().getName().compareTo(other.getClass().getName());
20017
      }
20018
 
20019
      int lastComparison = 0;
20020
      getMovementNonSerializedInventoryByScans_args typedOther = (getMovementNonSerializedInventoryByScans_args)other;
20021
 
20022
      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
20023
      if (lastComparison != 0) {
20024
        return lastComparison;
20025
      }
20026
      if (isSetStartDate()) {
20027
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
20028
        if (lastComparison != 0) {
20029
          return lastComparison;
20030
        }
20031
      }
20032
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
20033
      if (lastComparison != 0) {
20034
        return lastComparison;
20035
      }
20036
      if (isSetEndDate()) {
20037
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
20038
        if (lastComparison != 0) {
20039
          return lastComparison;
20040
        }
20041
      }
20042
      return 0;
20043
    }
20044
 
20045
    public _Fields fieldForId(int fieldId) {
20046
      return _Fields.findByThriftId(fieldId);
20047
    }
20048
 
20049
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20050
      org.apache.thrift.protocol.TField field;
20051
      iprot.readStructBegin();
20052
      while (true)
20053
      {
20054
        field = iprot.readFieldBegin();
20055
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20056
          break;
20057
        }
20058
        switch (field.id) {
20059
          case 1: // START_DATE
20060
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20061
              this.startDate = iprot.readI64();
20062
              setStartDateIsSet(true);
20063
            } else { 
20064
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20065
            }
20066
            break;
20067
          case 2: // END_DATE
20068
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20069
              this.endDate = iprot.readI64();
20070
              setEndDateIsSet(true);
20071
            } else { 
20072
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20073
            }
20074
            break;
20075
          default:
20076
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20077
        }
20078
        iprot.readFieldEnd();
20079
      }
20080
      iprot.readStructEnd();
20081
      validate();
20082
    }
20083
 
20084
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20085
      validate();
20086
 
20087
      oprot.writeStructBegin(STRUCT_DESC);
20088
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
20089
      oprot.writeI64(this.startDate);
20090
      oprot.writeFieldEnd();
20091
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
20092
      oprot.writeI64(this.endDate);
20093
      oprot.writeFieldEnd();
20094
      oprot.writeFieldStop();
20095
      oprot.writeStructEnd();
20096
    }
20097
 
20098
    @Override
20099
    public String toString() {
20100
      StringBuilder sb = new StringBuilder("getMovementNonSerializedInventoryByScans_args(");
20101
      boolean first = true;
20102
 
20103
      sb.append("startDate:");
20104
      sb.append(this.startDate);
20105
      first = false;
20106
      if (!first) sb.append(", ");
20107
      sb.append("endDate:");
20108
      sb.append(this.endDate);
20109
      first = false;
20110
      sb.append(")");
20111
      return sb.toString();
20112
    }
20113
 
20114
    public void validate() throws org.apache.thrift.TException {
20115
      // check for required fields
20116
    }
20117
 
20118
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20119
      try {
20120
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20121
      } catch (org.apache.thrift.TException te) {
20122
        throw new java.io.IOException(te);
20123
      }
20124
    }
20125
 
20126
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20127
      try {
20128
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
20129
        __isset_bit_vector = new BitSet(1);
20130
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20131
      } catch (org.apache.thrift.TException te) {
20132
        throw new java.io.IOException(te);
20133
      }
20134
    }
20135
 
20136
  }
20137
 
20138
  public static class getMovementNonSerializedInventoryByScans_result implements org.apache.thrift.TBase<getMovementNonSerializedInventoryByScans_result, getMovementNonSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
20139
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMovementNonSerializedInventoryByScans_result");
20140
 
20141
    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);
20142
 
20143
    private List<InventoryMovement> success; // required
20144
 
20145
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20146
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20147
      SUCCESS((short)0, "success");
20148
 
20149
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20150
 
20151
      static {
20152
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20153
          byName.put(field.getFieldName(), field);
20154
        }
20155
      }
20156
 
20157
      /**
20158
       * Find the _Fields constant that matches fieldId, or null if its not found.
20159
       */
20160
      public static _Fields findByThriftId(int fieldId) {
20161
        switch(fieldId) {
20162
          case 0: // SUCCESS
20163
            return SUCCESS;
20164
          default:
20165
            return null;
20166
        }
20167
      }
20168
 
20169
      /**
20170
       * Find the _Fields constant that matches fieldId, throwing an exception
20171
       * if it is not found.
20172
       */
20173
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20174
        _Fields fields = findByThriftId(fieldId);
20175
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20176
        return fields;
20177
      }
20178
 
20179
      /**
20180
       * Find the _Fields constant that matches name, or null if its not found.
20181
       */
20182
      public static _Fields findByName(String name) {
20183
        return byName.get(name);
20184
      }
20185
 
20186
      private final short _thriftId;
20187
      private final String _fieldName;
20188
 
20189
      _Fields(short thriftId, String fieldName) {
20190
        _thriftId = thriftId;
20191
        _fieldName = fieldName;
20192
      }
20193
 
20194
      public short getThriftFieldId() {
20195
        return _thriftId;
20196
      }
20197
 
20198
      public String getFieldName() {
20199
        return _fieldName;
20200
      }
20201
    }
20202
 
20203
    // isset id assignments
20204
 
20205
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20206
    static {
20207
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20208
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20209
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
20210
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryMovement.class))));
20211
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20212
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMovementNonSerializedInventoryByScans_result.class, metaDataMap);
20213
    }
20214
 
20215
    public getMovementNonSerializedInventoryByScans_result() {
20216
    }
20217
 
20218
    public getMovementNonSerializedInventoryByScans_result(
20219
      List<InventoryMovement> success)
20220
    {
20221
      this();
20222
      this.success = success;
20223
    }
20224
 
20225
    /**
20226
     * Performs a deep copy on <i>other</i>.
20227
     */
20228
    public getMovementNonSerializedInventoryByScans_result(getMovementNonSerializedInventoryByScans_result other) {
20229
      if (other.isSetSuccess()) {
20230
        List<InventoryMovement> __this__success = new ArrayList<InventoryMovement>();
20231
        for (InventoryMovement other_element : other.success) {
20232
          __this__success.add(new InventoryMovement(other_element));
20233
        }
20234
        this.success = __this__success;
20235
      }
20236
    }
20237
 
20238
    public getMovementNonSerializedInventoryByScans_result deepCopy() {
20239
      return new getMovementNonSerializedInventoryByScans_result(this);
20240
    }
20241
 
20242
    @Override
20243
    public void clear() {
20244
      this.success = null;
20245
    }
20246
 
20247
    public int getSuccessSize() {
20248
      return (this.success == null) ? 0 : this.success.size();
20249
    }
20250
 
20251
    public java.util.Iterator<InventoryMovement> getSuccessIterator() {
20252
      return (this.success == null) ? null : this.success.iterator();
20253
    }
20254
 
20255
    public void addToSuccess(InventoryMovement elem) {
20256
      if (this.success == null) {
20257
        this.success = new ArrayList<InventoryMovement>();
20258
      }
20259
      this.success.add(elem);
20260
    }
20261
 
20262
    public List<InventoryMovement> getSuccess() {
20263
      return this.success;
20264
    }
20265
 
20266
    public void setSuccess(List<InventoryMovement> success) {
20267
      this.success = success;
20268
    }
20269
 
20270
    public void unsetSuccess() {
20271
      this.success = null;
20272
    }
20273
 
20274
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
20275
    public boolean isSetSuccess() {
20276
      return this.success != null;
20277
    }
20278
 
20279
    public void setSuccessIsSet(boolean value) {
20280
      if (!value) {
20281
        this.success = null;
20282
      }
20283
    }
20284
 
20285
    public void setFieldValue(_Fields field, Object value) {
20286
      switch (field) {
20287
      case SUCCESS:
20288
        if (value == null) {
20289
          unsetSuccess();
20290
        } else {
20291
          setSuccess((List<InventoryMovement>)value);
20292
        }
20293
        break;
20294
 
20295
      }
20296
    }
20297
 
20298
    public Object getFieldValue(_Fields field) {
20299
      switch (field) {
20300
      case SUCCESS:
20301
        return getSuccess();
20302
 
20303
      }
20304
      throw new IllegalStateException();
20305
    }
20306
 
20307
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20308
    public boolean isSet(_Fields field) {
20309
      if (field == null) {
20310
        throw new IllegalArgumentException();
20311
      }
20312
 
20313
      switch (field) {
20314
      case SUCCESS:
20315
        return isSetSuccess();
20316
      }
20317
      throw new IllegalStateException();
20318
    }
20319
 
20320
    @Override
20321
    public boolean equals(Object that) {
20322
      if (that == null)
20323
        return false;
20324
      if (that instanceof getMovementNonSerializedInventoryByScans_result)
20325
        return this.equals((getMovementNonSerializedInventoryByScans_result)that);
20326
      return false;
20327
    }
20328
 
20329
    public boolean equals(getMovementNonSerializedInventoryByScans_result that) {
20330
      if (that == null)
20331
        return false;
20332
 
20333
      boolean this_present_success = true && this.isSetSuccess();
20334
      boolean that_present_success = true && that.isSetSuccess();
20335
      if (this_present_success || that_present_success) {
20336
        if (!(this_present_success && that_present_success))
20337
          return false;
20338
        if (!this.success.equals(that.success))
20339
          return false;
20340
      }
20341
 
20342
      return true;
20343
    }
20344
 
20345
    @Override
20346
    public int hashCode() {
20347
      return 0;
20348
    }
20349
 
20350
    public int compareTo(getMovementNonSerializedInventoryByScans_result other) {
20351
      if (!getClass().equals(other.getClass())) {
20352
        return getClass().getName().compareTo(other.getClass().getName());
20353
      }
20354
 
20355
      int lastComparison = 0;
20356
      getMovementNonSerializedInventoryByScans_result typedOther = (getMovementNonSerializedInventoryByScans_result)other;
20357
 
20358
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
20359
      if (lastComparison != 0) {
20360
        return lastComparison;
20361
      }
20362
      if (isSetSuccess()) {
20363
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
20364
        if (lastComparison != 0) {
20365
          return lastComparison;
20366
        }
20367
      }
20368
      return 0;
20369
    }
20370
 
20371
    public _Fields fieldForId(int fieldId) {
20372
      return _Fields.findByThriftId(fieldId);
20373
    }
20374
 
20375
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20376
      org.apache.thrift.protocol.TField field;
20377
      iprot.readStructBegin();
20378
      while (true)
20379
      {
20380
        field = iprot.readFieldBegin();
20381
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20382
          break;
20383
        }
20384
        switch (field.id) {
20385
          case 0: // SUCCESS
20386
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
20387
              {
20388
                org.apache.thrift.protocol.TList _list56 = iprot.readListBegin();
20389
                this.success = new ArrayList<InventoryMovement>(_list56.size);
20390
                for (int _i57 = 0; _i57 < _list56.size; ++_i57)
20391
                {
20392
                  InventoryMovement _elem58; // required
20393
                  _elem58 = new InventoryMovement();
20394
                  _elem58.read(iprot);
20395
                  this.success.add(_elem58);
20396
                }
20397
                iprot.readListEnd();
20398
              }
20399
            } else { 
20400
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20401
            }
20402
            break;
20403
          default:
20404
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20405
        }
20406
        iprot.readFieldEnd();
20407
      }
20408
      iprot.readStructEnd();
20409
      validate();
20410
    }
20411
 
20412
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20413
      oprot.writeStructBegin(STRUCT_DESC);
20414
 
20415
      if (this.isSetSuccess()) {
20416
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20417
        {
20418
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
20419
          for (InventoryMovement _iter59 : this.success)
20420
          {
20421
            _iter59.write(oprot);
20422
          }
20423
          oprot.writeListEnd();
20424
        }
20425
        oprot.writeFieldEnd();
20426
      }
20427
      oprot.writeFieldStop();
20428
      oprot.writeStructEnd();
20429
    }
20430
 
20431
    @Override
20432
    public String toString() {
20433
      StringBuilder sb = new StringBuilder("getMovementNonSerializedInventoryByScans_result(");
20434
      boolean first = true;
20435
 
20436
      sb.append("success:");
20437
      if (this.success == null) {
20438
        sb.append("null");
20439
      } else {
20440
        sb.append(this.success);
20441
      }
20442
      first = false;
20443
      sb.append(")");
20444
      return sb.toString();
20445
    }
20446
 
20447
    public void validate() throws org.apache.thrift.TException {
20448
      // check for required fields
20449
    }
20450
 
20451
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20452
      try {
20453
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20454
      } catch (org.apache.thrift.TException te) {
20455
        throw new java.io.IOException(te);
20456
      }
20457
    }
20458
 
20459
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20460
      try {
20461
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20462
      } catch (org.apache.thrift.TException te) {
20463
        throw new java.io.IOException(te);
20464
      }
20465
    }
20466
 
20467
  }
20468
 
20469
  public static class getMovementSerializedInventoryByScans_args implements org.apache.thrift.TBase<getMovementSerializedInventoryByScans_args, getMovementSerializedInventoryByScans_args._Fields>, java.io.Serializable, Cloneable   {
20470
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMovementSerializedInventoryByScans_args");
20471
 
20472
    private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.I64, (short)1);
20473
    private static final org.apache.thrift.protocol.TField END_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("endDate", org.apache.thrift.protocol.TType.I64, (short)2);
20474
 
20475
    private long startDate; // required
20476
    private long endDate; // required
20477
 
20478
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20479
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20480
      START_DATE((short)1, "startDate"),
20481
      END_DATE((short)2, "endDate");
20482
 
20483
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20484
 
20485
      static {
20486
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20487
          byName.put(field.getFieldName(), field);
20488
        }
20489
      }
20490
 
20491
      /**
20492
       * Find the _Fields constant that matches fieldId, or null if its not found.
20493
       */
20494
      public static _Fields findByThriftId(int fieldId) {
20495
        switch(fieldId) {
20496
          case 1: // START_DATE
20497
            return START_DATE;
20498
          case 2: // END_DATE
20499
            return END_DATE;
20500
          default:
20501
            return null;
20502
        }
20503
      }
20504
 
20505
      /**
20506
       * Find the _Fields constant that matches fieldId, throwing an exception
20507
       * if it is not found.
20508
       */
20509
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20510
        _Fields fields = findByThriftId(fieldId);
20511
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20512
        return fields;
20513
      }
20514
 
20515
      /**
20516
       * Find the _Fields constant that matches name, or null if its not found.
20517
       */
20518
      public static _Fields findByName(String name) {
20519
        return byName.get(name);
20520
      }
20521
 
20522
      private final short _thriftId;
20523
      private final String _fieldName;
20524
 
20525
      _Fields(short thriftId, String fieldName) {
20526
        _thriftId = thriftId;
20527
        _fieldName = fieldName;
20528
      }
20529
 
20530
      public short getThriftFieldId() {
20531
        return _thriftId;
20532
      }
20533
 
20534
      public String getFieldName() {
20535
        return _fieldName;
20536
      }
20537
    }
20538
 
20539
    // isset id assignments
20540
    private static final int __STARTDATE_ISSET_ID = 0;
20541
    private static final int __ENDDATE_ISSET_ID = 1;
20542
    private BitSet __isset_bit_vector = new BitSet(2);
20543
 
20544
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20545
    static {
20546
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20547
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20548
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20549
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20550
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
20551
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20552
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMovementSerializedInventoryByScans_args.class, metaDataMap);
20553
    }
20554
 
20555
    public getMovementSerializedInventoryByScans_args() {
20556
    }
20557
 
20558
    public getMovementSerializedInventoryByScans_args(
20559
      long startDate,
20560
      long endDate)
20561
    {
20562
      this();
20563
      this.startDate = startDate;
20564
      setStartDateIsSet(true);
20565
      this.endDate = endDate;
20566
      setEndDateIsSet(true);
20567
    }
20568
 
20569
    /**
20570
     * Performs a deep copy on <i>other</i>.
20571
     */
20572
    public getMovementSerializedInventoryByScans_args(getMovementSerializedInventoryByScans_args other) {
20573
      __isset_bit_vector.clear();
20574
      __isset_bit_vector.or(other.__isset_bit_vector);
20575
      this.startDate = other.startDate;
20576
      this.endDate = other.endDate;
20577
    }
20578
 
20579
    public getMovementSerializedInventoryByScans_args deepCopy() {
20580
      return new getMovementSerializedInventoryByScans_args(this);
20581
    }
20582
 
20583
    @Override
20584
    public void clear() {
20585
      setStartDateIsSet(false);
20586
      this.startDate = 0;
20587
      setEndDateIsSet(false);
20588
      this.endDate = 0;
20589
    }
20590
 
20591
    public long getStartDate() {
20592
      return this.startDate;
20593
    }
20594
 
20595
    public void setStartDate(long startDate) {
20596
      this.startDate = startDate;
20597
      setStartDateIsSet(true);
20598
    }
20599
 
20600
    public void unsetStartDate() {
20601
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
20602
    }
20603
 
20604
    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
20605
    public boolean isSetStartDate() {
20606
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
20607
    }
20608
 
20609
    public void setStartDateIsSet(boolean value) {
20610
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
20611
    }
20612
 
20613
    public long getEndDate() {
20614
      return this.endDate;
20615
    }
20616
 
20617
    public void setEndDate(long endDate) {
20618
      this.endDate = endDate;
20619
      setEndDateIsSet(true);
20620
    }
20621
 
20622
    public void unsetEndDate() {
20623
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
20624
    }
20625
 
20626
    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
20627
    public boolean isSetEndDate() {
20628
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
20629
    }
20630
 
20631
    public void setEndDateIsSet(boolean value) {
20632
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
20633
    }
20634
 
20635
    public void setFieldValue(_Fields field, Object value) {
20636
      switch (field) {
20637
      case START_DATE:
20638
        if (value == null) {
20639
          unsetStartDate();
20640
        } else {
20641
          setStartDate((Long)value);
20642
        }
20643
        break;
20644
 
20645
      case END_DATE:
20646
        if (value == null) {
20647
          unsetEndDate();
20648
        } else {
20649
          setEndDate((Long)value);
20650
        }
20651
        break;
20652
 
20653
      }
20654
    }
20655
 
20656
    public Object getFieldValue(_Fields field) {
20657
      switch (field) {
20658
      case START_DATE:
20659
        return Long.valueOf(getStartDate());
20660
 
20661
      case END_DATE:
20662
        return Long.valueOf(getEndDate());
20663
 
20664
      }
20665
      throw new IllegalStateException();
20666
    }
20667
 
20668
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
20669
    public boolean isSet(_Fields field) {
20670
      if (field == null) {
20671
        throw new IllegalArgumentException();
20672
      }
20673
 
20674
      switch (field) {
20675
      case START_DATE:
20676
        return isSetStartDate();
20677
      case END_DATE:
20678
        return isSetEndDate();
20679
      }
20680
      throw new IllegalStateException();
20681
    }
20682
 
20683
    @Override
20684
    public boolean equals(Object that) {
20685
      if (that == null)
20686
        return false;
20687
      if (that instanceof getMovementSerializedInventoryByScans_args)
20688
        return this.equals((getMovementSerializedInventoryByScans_args)that);
20689
      return false;
20690
    }
20691
 
20692
    public boolean equals(getMovementSerializedInventoryByScans_args that) {
20693
      if (that == null)
20694
        return false;
20695
 
20696
      boolean this_present_startDate = true;
20697
      boolean that_present_startDate = true;
20698
      if (this_present_startDate || that_present_startDate) {
20699
        if (!(this_present_startDate && that_present_startDate))
20700
          return false;
20701
        if (this.startDate != that.startDate)
20702
          return false;
20703
      }
20704
 
20705
      boolean this_present_endDate = true;
20706
      boolean that_present_endDate = true;
20707
      if (this_present_endDate || that_present_endDate) {
20708
        if (!(this_present_endDate && that_present_endDate))
20709
          return false;
20710
        if (this.endDate != that.endDate)
20711
          return false;
20712
      }
20713
 
20714
      return true;
20715
    }
20716
 
20717
    @Override
20718
    public int hashCode() {
20719
      return 0;
20720
    }
20721
 
20722
    public int compareTo(getMovementSerializedInventoryByScans_args other) {
20723
      if (!getClass().equals(other.getClass())) {
20724
        return getClass().getName().compareTo(other.getClass().getName());
20725
      }
20726
 
20727
      int lastComparison = 0;
20728
      getMovementSerializedInventoryByScans_args typedOther = (getMovementSerializedInventoryByScans_args)other;
20729
 
20730
      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
20731
      if (lastComparison != 0) {
20732
        return lastComparison;
20733
      }
20734
      if (isSetStartDate()) {
20735
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
20736
        if (lastComparison != 0) {
20737
          return lastComparison;
20738
        }
20739
      }
20740
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
20741
      if (lastComparison != 0) {
20742
        return lastComparison;
20743
      }
20744
      if (isSetEndDate()) {
20745
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
20746
        if (lastComparison != 0) {
20747
          return lastComparison;
20748
        }
20749
      }
20750
      return 0;
20751
    }
20752
 
20753
    public _Fields fieldForId(int fieldId) {
20754
      return _Fields.findByThriftId(fieldId);
20755
    }
20756
 
20757
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20758
      org.apache.thrift.protocol.TField field;
20759
      iprot.readStructBegin();
20760
      while (true)
20761
      {
20762
        field = iprot.readFieldBegin();
20763
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20764
          break;
20765
        }
20766
        switch (field.id) {
20767
          case 1: // START_DATE
20768
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20769
              this.startDate = iprot.readI64();
20770
              setStartDateIsSet(true);
20771
            } else { 
20772
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20773
            }
20774
            break;
20775
          case 2: // END_DATE
20776
            if (field.type == org.apache.thrift.protocol.TType.I64) {
20777
              this.endDate = iprot.readI64();
20778
              setEndDateIsSet(true);
20779
            } else { 
20780
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20781
            }
20782
            break;
20783
          default:
20784
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20785
        }
20786
        iprot.readFieldEnd();
20787
      }
20788
      iprot.readStructEnd();
20789
      validate();
20790
    }
20791
 
20792
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20793
      validate();
20794
 
20795
      oprot.writeStructBegin(STRUCT_DESC);
20796
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
20797
      oprot.writeI64(this.startDate);
20798
      oprot.writeFieldEnd();
20799
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
20800
      oprot.writeI64(this.endDate);
20801
      oprot.writeFieldEnd();
20802
      oprot.writeFieldStop();
20803
      oprot.writeStructEnd();
20804
    }
20805
 
20806
    @Override
20807
    public String toString() {
20808
      StringBuilder sb = new StringBuilder("getMovementSerializedInventoryByScans_args(");
20809
      boolean first = true;
20810
 
20811
      sb.append("startDate:");
20812
      sb.append(this.startDate);
20813
      first = false;
20814
      if (!first) sb.append(", ");
20815
      sb.append("endDate:");
20816
      sb.append(this.endDate);
20817
      first = false;
20818
      sb.append(")");
20819
      return sb.toString();
20820
    }
20821
 
20822
    public void validate() throws org.apache.thrift.TException {
20823
      // check for required fields
20824
    }
20825
 
20826
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20827
      try {
20828
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20829
      } catch (org.apache.thrift.TException te) {
20830
        throw new java.io.IOException(te);
20831
      }
20832
    }
20833
 
20834
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20835
      try {
20836
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
20837
        __isset_bit_vector = new BitSet(1);
20838
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20839
      } catch (org.apache.thrift.TException te) {
20840
        throw new java.io.IOException(te);
20841
      }
20842
    }
20843
 
20844
  }
20845
 
20846
  public static class getMovementSerializedInventoryByScans_result implements org.apache.thrift.TBase<getMovementSerializedInventoryByScans_result, getMovementSerializedInventoryByScans_result._Fields>, java.io.Serializable, Cloneable   {
20847
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getMovementSerializedInventoryByScans_result");
20848
 
20849
    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);
20850
 
20851
    private List<InventoryMovement> success; // required
20852
 
20853
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20854
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
20855
      SUCCESS((short)0, "success");
20856
 
20857
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20858
 
20859
      static {
20860
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20861
          byName.put(field.getFieldName(), field);
20862
        }
20863
      }
20864
 
20865
      /**
20866
       * Find the _Fields constant that matches fieldId, or null if its not found.
20867
       */
20868
      public static _Fields findByThriftId(int fieldId) {
20869
        switch(fieldId) {
20870
          case 0: // SUCCESS
20871
            return SUCCESS;
20872
          default:
20873
            return null;
20874
        }
20875
      }
20876
 
20877
      /**
20878
       * Find the _Fields constant that matches fieldId, throwing an exception
20879
       * if it is not found.
20880
       */
20881
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20882
        _Fields fields = findByThriftId(fieldId);
20883
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20884
        return fields;
20885
      }
20886
 
20887
      /**
20888
       * Find the _Fields constant that matches name, or null if its not found.
20889
       */
20890
      public static _Fields findByName(String name) {
20891
        return byName.get(name);
20892
      }
20893
 
20894
      private final short _thriftId;
20895
      private final String _fieldName;
20896
 
20897
      _Fields(short thriftId, String fieldName) {
20898
        _thriftId = thriftId;
20899
        _fieldName = fieldName;
20900
      }
20901
 
20902
      public short getThriftFieldId() {
20903
        return _thriftId;
20904
      }
20905
 
20906
      public String getFieldName() {
20907
        return _fieldName;
20908
      }
20909
    }
20910
 
20911
    // isset id assignments
20912
 
20913
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
20914
    static {
20915
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
20916
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
20917
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
20918
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryMovement.class))));
20919
      metaDataMap = Collections.unmodifiableMap(tmpMap);
20920
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getMovementSerializedInventoryByScans_result.class, metaDataMap);
20921
    }
20922
 
20923
    public getMovementSerializedInventoryByScans_result() {
20924
    }
20925
 
20926
    public getMovementSerializedInventoryByScans_result(
20927
      List<InventoryMovement> success)
20928
    {
20929
      this();
20930
      this.success = success;
20931
    }
20932
 
20933
    /**
20934
     * Performs a deep copy on <i>other</i>.
20935
     */
20936
    public getMovementSerializedInventoryByScans_result(getMovementSerializedInventoryByScans_result other) {
20937
      if (other.isSetSuccess()) {
20938
        List<InventoryMovement> __this__success = new ArrayList<InventoryMovement>();
20939
        for (InventoryMovement other_element : other.success) {
20940
          __this__success.add(new InventoryMovement(other_element));
20941
        }
20942
        this.success = __this__success;
20943
      }
20944
    }
20945
 
20946
    public getMovementSerializedInventoryByScans_result deepCopy() {
20947
      return new getMovementSerializedInventoryByScans_result(this);
20948
    }
20949
 
20950
    @Override
20951
    public void clear() {
20952
      this.success = null;
20953
    }
20954
 
20955
    public int getSuccessSize() {
20956
      return (this.success == null) ? 0 : this.success.size();
20957
    }
20958
 
20959
    public java.util.Iterator<InventoryMovement> getSuccessIterator() {
20960
      return (this.success == null) ? null : this.success.iterator();
20961
    }
20962
 
20963
    public void addToSuccess(InventoryMovement elem) {
20964
      if (this.success == null) {
20965
        this.success = new ArrayList<InventoryMovement>();
20966
      }
20967
      this.success.add(elem);
20968
    }
20969
 
20970
    public List<InventoryMovement> getSuccess() {
20971
      return this.success;
20972
    }
20973
 
20974
    public void setSuccess(List<InventoryMovement> success) {
20975
      this.success = success;
20976
    }
20977
 
20978
    public void unsetSuccess() {
20979
      this.success = null;
20980
    }
20981
 
20982
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
20983
    public boolean isSetSuccess() {
20984
      return this.success != null;
20985
    }
20986
 
20987
    public void setSuccessIsSet(boolean value) {
20988
      if (!value) {
20989
        this.success = null;
20990
      }
20991
    }
20992
 
20993
    public void setFieldValue(_Fields field, Object value) {
20994
      switch (field) {
20995
      case SUCCESS:
20996
        if (value == null) {
20997
          unsetSuccess();
20998
        } else {
20999
          setSuccess((List<InventoryMovement>)value);
21000
        }
21001
        break;
21002
 
21003
      }
21004
    }
21005
 
21006
    public Object getFieldValue(_Fields field) {
21007
      switch (field) {
21008
      case SUCCESS:
21009
        return getSuccess();
21010
 
21011
      }
21012
      throw new IllegalStateException();
21013
    }
21014
 
21015
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21016
    public boolean isSet(_Fields field) {
21017
      if (field == null) {
21018
        throw new IllegalArgumentException();
21019
      }
21020
 
21021
      switch (field) {
21022
      case SUCCESS:
21023
        return isSetSuccess();
21024
      }
21025
      throw new IllegalStateException();
21026
    }
21027
 
21028
    @Override
21029
    public boolean equals(Object that) {
21030
      if (that == null)
21031
        return false;
21032
      if (that instanceof getMovementSerializedInventoryByScans_result)
21033
        return this.equals((getMovementSerializedInventoryByScans_result)that);
21034
      return false;
21035
    }
21036
 
21037
    public boolean equals(getMovementSerializedInventoryByScans_result that) {
21038
      if (that == null)
21039
        return false;
21040
 
21041
      boolean this_present_success = true && this.isSetSuccess();
21042
      boolean that_present_success = true && that.isSetSuccess();
21043
      if (this_present_success || that_present_success) {
21044
        if (!(this_present_success && that_present_success))
21045
          return false;
21046
        if (!this.success.equals(that.success))
21047
          return false;
21048
      }
21049
 
21050
      return true;
21051
    }
21052
 
21053
    @Override
21054
    public int hashCode() {
21055
      return 0;
21056
    }
21057
 
21058
    public int compareTo(getMovementSerializedInventoryByScans_result other) {
21059
      if (!getClass().equals(other.getClass())) {
21060
        return getClass().getName().compareTo(other.getClass().getName());
21061
      }
21062
 
21063
      int lastComparison = 0;
21064
      getMovementSerializedInventoryByScans_result typedOther = (getMovementSerializedInventoryByScans_result)other;
21065
 
21066
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
21067
      if (lastComparison != 0) {
21068
        return lastComparison;
21069
      }
21070
      if (isSetSuccess()) {
21071
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
21072
        if (lastComparison != 0) {
21073
          return lastComparison;
21074
        }
21075
      }
21076
      return 0;
21077
    }
21078
 
21079
    public _Fields fieldForId(int fieldId) {
21080
      return _Fields.findByThriftId(fieldId);
21081
    }
21082
 
21083
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21084
      org.apache.thrift.protocol.TField field;
21085
      iprot.readStructBegin();
21086
      while (true)
21087
      {
21088
        field = iprot.readFieldBegin();
21089
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21090
          break;
21091
        }
21092
        switch (field.id) {
21093
          case 0: // SUCCESS
21094
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
21095
              {
21096
                org.apache.thrift.protocol.TList _list60 = iprot.readListBegin();
21097
                this.success = new ArrayList<InventoryMovement>(_list60.size);
21098
                for (int _i61 = 0; _i61 < _list60.size; ++_i61)
21099
                {
21100
                  InventoryMovement _elem62; // required
21101
                  _elem62 = new InventoryMovement();
21102
                  _elem62.read(iprot);
21103
                  this.success.add(_elem62);
21104
                }
21105
                iprot.readListEnd();
21106
              }
21107
            } else { 
21108
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21109
            }
21110
            break;
21111
          default:
21112
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21113
        }
21114
        iprot.readFieldEnd();
21115
      }
21116
      iprot.readStructEnd();
21117
      validate();
21118
    }
21119
 
21120
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21121
      oprot.writeStructBegin(STRUCT_DESC);
21122
 
21123
      if (this.isSetSuccess()) {
21124
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21125
        {
21126
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
21127
          for (InventoryMovement _iter63 : this.success)
21128
          {
21129
            _iter63.write(oprot);
21130
          }
21131
          oprot.writeListEnd();
21132
        }
21133
        oprot.writeFieldEnd();
21134
      }
21135
      oprot.writeFieldStop();
21136
      oprot.writeStructEnd();
21137
    }
21138
 
21139
    @Override
21140
    public String toString() {
21141
      StringBuilder sb = new StringBuilder("getMovementSerializedInventoryByScans_result(");
21142
      boolean first = true;
21143
 
21144
      sb.append("success:");
21145
      if (this.success == null) {
21146
        sb.append("null");
21147
      } else {
21148
        sb.append(this.success);
21149
      }
21150
      first = false;
21151
      sb.append(")");
21152
      return sb.toString();
21153
    }
21154
 
21155
    public void validate() throws org.apache.thrift.TException {
21156
      // check for required fields
21157
    }
21158
 
21159
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21160
      try {
21161
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21162
      } catch (org.apache.thrift.TException te) {
21163
        throw new java.io.IOException(te);
21164
      }
21165
    }
21166
 
21167
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21168
      try {
21169
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21170
      } catch (org.apache.thrift.TException te) {
21171
        throw new java.io.IOException(te);
21172
      }
21173
    }
21174
 
21175
  }
21176
 
7190 amar.kumar 21177
  public static class scanfreebie_args implements org.apache.thrift.TBase<scanfreebie_args, scanfreebie_args._Fields>, java.io.Serializable, Cloneable   {
21178
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanfreebie_args");
21179
 
21180
    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);
21181
    private static final org.apache.thrift.protocol.TField FREEBIE_ITEM_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("freebieItemId", org.apache.thrift.protocol.TType.I64, (short)2);
21182
    private static final org.apache.thrift.protocol.TField FREEBIE_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("freebieWarehouseId", org.apache.thrift.protocol.TType.I64, (short)3);
21183
    private static final org.apache.thrift.protocol.TField SCAN_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("scanType", org.apache.thrift.protocol.TType.I32, (short)4);
21184
 
21185
    private long orderId; // required
21186
    private long freebieItemId; // required
21187
    private long freebieWarehouseId; // required
21188
    private ScanType scanType; // required
21189
 
21190
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21191
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21192
      ORDER_ID((short)1, "orderId"),
21193
      FREEBIE_ITEM_ID((short)2, "freebieItemId"),
21194
      FREEBIE_WAREHOUSE_ID((short)3, "freebieWarehouseId"),
21195
      /**
21196
       * 
21197
       * @see ScanType
21198
       */
21199
      SCAN_TYPE((short)4, "scanType");
21200
 
21201
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21202
 
21203
      static {
21204
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21205
          byName.put(field.getFieldName(), field);
21206
        }
21207
      }
21208
 
21209
      /**
21210
       * Find the _Fields constant that matches fieldId, or null if its not found.
21211
       */
21212
      public static _Fields findByThriftId(int fieldId) {
21213
        switch(fieldId) {
21214
          case 1: // ORDER_ID
21215
            return ORDER_ID;
21216
          case 2: // FREEBIE_ITEM_ID
21217
            return FREEBIE_ITEM_ID;
21218
          case 3: // FREEBIE_WAREHOUSE_ID
21219
            return FREEBIE_WAREHOUSE_ID;
21220
          case 4: // SCAN_TYPE
21221
            return SCAN_TYPE;
21222
          default:
21223
            return null;
21224
        }
21225
      }
21226
 
21227
      /**
21228
       * Find the _Fields constant that matches fieldId, throwing an exception
21229
       * if it is not found.
21230
       */
21231
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21232
        _Fields fields = findByThriftId(fieldId);
21233
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21234
        return fields;
21235
      }
21236
 
21237
      /**
21238
       * Find the _Fields constant that matches name, or null if its not found.
21239
       */
21240
      public static _Fields findByName(String name) {
21241
        return byName.get(name);
21242
      }
21243
 
21244
      private final short _thriftId;
21245
      private final String _fieldName;
21246
 
21247
      _Fields(short thriftId, String fieldName) {
21248
        _thriftId = thriftId;
21249
        _fieldName = fieldName;
21250
      }
21251
 
21252
      public short getThriftFieldId() {
21253
        return _thriftId;
21254
      }
21255
 
21256
      public String getFieldName() {
21257
        return _fieldName;
21258
      }
21259
    }
21260
 
21261
    // isset id assignments
21262
    private static final int __ORDERID_ISSET_ID = 0;
21263
    private static final int __FREEBIEITEMID_ISSET_ID = 1;
21264
    private static final int __FREEBIEWAREHOUSEID_ISSET_ID = 2;
21265
    private BitSet __isset_bit_vector = new BitSet(3);
21266
 
21267
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21268
    static {
21269
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21270
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21271
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21272
      tmpMap.put(_Fields.FREEBIE_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("freebieItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21273
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21274
      tmpMap.put(_Fields.FREEBIE_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("freebieWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21275
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
21276
      tmpMap.put(_Fields.SCAN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("scanType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21277
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
21278
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21279
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanfreebie_args.class, metaDataMap);
21280
    }
21281
 
21282
    public scanfreebie_args() {
21283
    }
21284
 
21285
    public scanfreebie_args(
21286
      long orderId,
21287
      long freebieItemId,
21288
      long freebieWarehouseId,
21289
      ScanType scanType)
21290
    {
21291
      this();
21292
      this.orderId = orderId;
21293
      setOrderIdIsSet(true);
21294
      this.freebieItemId = freebieItemId;
21295
      setFreebieItemIdIsSet(true);
21296
      this.freebieWarehouseId = freebieWarehouseId;
21297
      setFreebieWarehouseIdIsSet(true);
21298
      this.scanType = scanType;
21299
    }
21300
 
21301
    /**
21302
     * Performs a deep copy on <i>other</i>.
21303
     */
21304
    public scanfreebie_args(scanfreebie_args other) {
21305
      __isset_bit_vector.clear();
21306
      __isset_bit_vector.or(other.__isset_bit_vector);
21307
      this.orderId = other.orderId;
21308
      this.freebieItemId = other.freebieItemId;
21309
      this.freebieWarehouseId = other.freebieWarehouseId;
21310
      if (other.isSetScanType()) {
21311
        this.scanType = other.scanType;
21312
      }
21313
    }
21314
 
21315
    public scanfreebie_args deepCopy() {
21316
      return new scanfreebie_args(this);
21317
    }
21318
 
21319
    @Override
21320
    public void clear() {
21321
      setOrderIdIsSet(false);
21322
      this.orderId = 0;
21323
      setFreebieItemIdIsSet(false);
21324
      this.freebieItemId = 0;
21325
      setFreebieWarehouseIdIsSet(false);
21326
      this.freebieWarehouseId = 0;
21327
      this.scanType = null;
21328
    }
21329
 
21330
    public long getOrderId() {
21331
      return this.orderId;
21332
    }
21333
 
21334
    public void setOrderId(long orderId) {
21335
      this.orderId = orderId;
21336
      setOrderIdIsSet(true);
21337
    }
21338
 
21339
    public void unsetOrderId() {
21340
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
21341
    }
21342
 
21343
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
21344
    public boolean isSetOrderId() {
21345
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
21346
    }
21347
 
21348
    public void setOrderIdIsSet(boolean value) {
21349
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
21350
    }
21351
 
21352
    public long getFreebieItemId() {
21353
      return this.freebieItemId;
21354
    }
21355
 
21356
    public void setFreebieItemId(long freebieItemId) {
21357
      this.freebieItemId = freebieItemId;
21358
      setFreebieItemIdIsSet(true);
21359
    }
21360
 
21361
    public void unsetFreebieItemId() {
21362
      __isset_bit_vector.clear(__FREEBIEITEMID_ISSET_ID);
21363
    }
21364
 
21365
    /** Returns true if field freebieItemId is set (has been assigned a value) and false otherwise */
21366
    public boolean isSetFreebieItemId() {
21367
      return __isset_bit_vector.get(__FREEBIEITEMID_ISSET_ID);
21368
    }
21369
 
21370
    public void setFreebieItemIdIsSet(boolean value) {
21371
      __isset_bit_vector.set(__FREEBIEITEMID_ISSET_ID, value);
21372
    }
21373
 
21374
    public long getFreebieWarehouseId() {
21375
      return this.freebieWarehouseId;
21376
    }
21377
 
21378
    public void setFreebieWarehouseId(long freebieWarehouseId) {
21379
      this.freebieWarehouseId = freebieWarehouseId;
21380
      setFreebieWarehouseIdIsSet(true);
21381
    }
21382
 
21383
    public void unsetFreebieWarehouseId() {
21384
      __isset_bit_vector.clear(__FREEBIEWAREHOUSEID_ISSET_ID);
21385
    }
21386
 
21387
    /** Returns true if field freebieWarehouseId is set (has been assigned a value) and false otherwise */
21388
    public boolean isSetFreebieWarehouseId() {
21389
      return __isset_bit_vector.get(__FREEBIEWAREHOUSEID_ISSET_ID);
21390
    }
21391
 
21392
    public void setFreebieWarehouseIdIsSet(boolean value) {
21393
      __isset_bit_vector.set(__FREEBIEWAREHOUSEID_ISSET_ID, value);
21394
    }
21395
 
21396
    /**
21397
     * 
21398
     * @see ScanType
21399
     */
21400
    public ScanType getScanType() {
21401
      return this.scanType;
21402
    }
21403
 
21404
    /**
21405
     * 
21406
     * @see ScanType
21407
     */
21408
    public void setScanType(ScanType scanType) {
21409
      this.scanType = scanType;
21410
    }
21411
 
21412
    public void unsetScanType() {
21413
      this.scanType = null;
21414
    }
21415
 
21416
    /** Returns true if field scanType is set (has been assigned a value) and false otherwise */
21417
    public boolean isSetScanType() {
21418
      return this.scanType != null;
21419
    }
21420
 
21421
    public void setScanTypeIsSet(boolean value) {
21422
      if (!value) {
21423
        this.scanType = null;
21424
      }
21425
    }
21426
 
21427
    public void setFieldValue(_Fields field, Object value) {
21428
      switch (field) {
21429
      case ORDER_ID:
21430
        if (value == null) {
21431
          unsetOrderId();
21432
        } else {
21433
          setOrderId((Long)value);
21434
        }
21435
        break;
21436
 
21437
      case FREEBIE_ITEM_ID:
21438
        if (value == null) {
21439
          unsetFreebieItemId();
21440
        } else {
21441
          setFreebieItemId((Long)value);
21442
        }
21443
        break;
21444
 
21445
      case FREEBIE_WAREHOUSE_ID:
21446
        if (value == null) {
21447
          unsetFreebieWarehouseId();
21448
        } else {
21449
          setFreebieWarehouseId((Long)value);
21450
        }
21451
        break;
21452
 
21453
      case SCAN_TYPE:
21454
        if (value == null) {
21455
          unsetScanType();
21456
        } else {
21457
          setScanType((ScanType)value);
21458
        }
21459
        break;
21460
 
21461
      }
21462
    }
21463
 
21464
    public Object getFieldValue(_Fields field) {
21465
      switch (field) {
21466
      case ORDER_ID:
21467
        return Long.valueOf(getOrderId());
21468
 
21469
      case FREEBIE_ITEM_ID:
21470
        return Long.valueOf(getFreebieItemId());
21471
 
21472
      case FREEBIE_WAREHOUSE_ID:
21473
        return Long.valueOf(getFreebieWarehouseId());
21474
 
21475
      case SCAN_TYPE:
21476
        return getScanType();
21477
 
21478
      }
21479
      throw new IllegalStateException();
21480
    }
21481
 
21482
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21483
    public boolean isSet(_Fields field) {
21484
      if (field == null) {
21485
        throw new IllegalArgumentException();
21486
      }
21487
 
21488
      switch (field) {
21489
      case ORDER_ID:
21490
        return isSetOrderId();
21491
      case FREEBIE_ITEM_ID:
21492
        return isSetFreebieItemId();
21493
      case FREEBIE_WAREHOUSE_ID:
21494
        return isSetFreebieWarehouseId();
21495
      case SCAN_TYPE:
21496
        return isSetScanType();
21497
      }
21498
      throw new IllegalStateException();
21499
    }
21500
 
21501
    @Override
21502
    public boolean equals(Object that) {
21503
      if (that == null)
21504
        return false;
21505
      if (that instanceof scanfreebie_args)
21506
        return this.equals((scanfreebie_args)that);
21507
      return false;
21508
    }
21509
 
21510
    public boolean equals(scanfreebie_args that) {
21511
      if (that == null)
21512
        return false;
21513
 
21514
      boolean this_present_orderId = true;
21515
      boolean that_present_orderId = true;
21516
      if (this_present_orderId || that_present_orderId) {
21517
        if (!(this_present_orderId && that_present_orderId))
21518
          return false;
21519
        if (this.orderId != that.orderId)
21520
          return false;
21521
      }
21522
 
21523
      boolean this_present_freebieItemId = true;
21524
      boolean that_present_freebieItemId = true;
21525
      if (this_present_freebieItemId || that_present_freebieItemId) {
21526
        if (!(this_present_freebieItemId && that_present_freebieItemId))
21527
          return false;
21528
        if (this.freebieItemId != that.freebieItemId)
21529
          return false;
21530
      }
21531
 
21532
      boolean this_present_freebieWarehouseId = true;
21533
      boolean that_present_freebieWarehouseId = true;
21534
      if (this_present_freebieWarehouseId || that_present_freebieWarehouseId) {
21535
        if (!(this_present_freebieWarehouseId && that_present_freebieWarehouseId))
21536
          return false;
21537
        if (this.freebieWarehouseId != that.freebieWarehouseId)
21538
          return false;
21539
      }
21540
 
21541
      boolean this_present_scanType = true && this.isSetScanType();
21542
      boolean that_present_scanType = true && that.isSetScanType();
21543
      if (this_present_scanType || that_present_scanType) {
21544
        if (!(this_present_scanType && that_present_scanType))
21545
          return false;
21546
        if (!this.scanType.equals(that.scanType))
21547
          return false;
21548
      }
21549
 
21550
      return true;
21551
    }
21552
 
21553
    @Override
21554
    public int hashCode() {
21555
      return 0;
21556
    }
21557
 
21558
    public int compareTo(scanfreebie_args other) {
21559
      if (!getClass().equals(other.getClass())) {
21560
        return getClass().getName().compareTo(other.getClass().getName());
21561
      }
21562
 
21563
      int lastComparison = 0;
21564
      scanfreebie_args typedOther = (scanfreebie_args)other;
21565
 
21566
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
21567
      if (lastComparison != 0) {
21568
        return lastComparison;
21569
      }
21570
      if (isSetOrderId()) {
21571
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
21572
        if (lastComparison != 0) {
21573
          return lastComparison;
21574
        }
21575
      }
21576
      lastComparison = Boolean.valueOf(isSetFreebieItemId()).compareTo(typedOther.isSetFreebieItemId());
21577
      if (lastComparison != 0) {
21578
        return lastComparison;
21579
      }
21580
      if (isSetFreebieItemId()) {
21581
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freebieItemId, typedOther.freebieItemId);
21582
        if (lastComparison != 0) {
21583
          return lastComparison;
21584
        }
21585
      }
21586
      lastComparison = Boolean.valueOf(isSetFreebieWarehouseId()).compareTo(typedOther.isSetFreebieWarehouseId());
21587
      if (lastComparison != 0) {
21588
        return lastComparison;
21589
      }
21590
      if (isSetFreebieWarehouseId()) {
21591
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.freebieWarehouseId, typedOther.freebieWarehouseId);
21592
        if (lastComparison != 0) {
21593
          return lastComparison;
21594
        }
21595
      }
21596
      lastComparison = Boolean.valueOf(isSetScanType()).compareTo(typedOther.isSetScanType());
21597
      if (lastComparison != 0) {
21598
        return lastComparison;
21599
      }
21600
      if (isSetScanType()) {
21601
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.scanType, typedOther.scanType);
21602
        if (lastComparison != 0) {
21603
          return lastComparison;
21604
        }
21605
      }
21606
      return 0;
21607
    }
21608
 
21609
    public _Fields fieldForId(int fieldId) {
21610
      return _Fields.findByThriftId(fieldId);
21611
    }
21612
 
21613
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
21614
      org.apache.thrift.protocol.TField field;
21615
      iprot.readStructBegin();
21616
      while (true)
21617
      {
21618
        field = iprot.readFieldBegin();
21619
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
21620
          break;
21621
        }
21622
        switch (field.id) {
21623
          case 1: // ORDER_ID
21624
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21625
              this.orderId = iprot.readI64();
21626
              setOrderIdIsSet(true);
21627
            } else { 
21628
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21629
            }
21630
            break;
21631
          case 2: // FREEBIE_ITEM_ID
21632
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21633
              this.freebieItemId = iprot.readI64();
21634
              setFreebieItemIdIsSet(true);
21635
            } else { 
21636
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21637
            }
21638
            break;
21639
          case 3: // FREEBIE_WAREHOUSE_ID
21640
            if (field.type == org.apache.thrift.protocol.TType.I64) {
21641
              this.freebieWarehouseId = iprot.readI64();
21642
              setFreebieWarehouseIdIsSet(true);
21643
            } else { 
21644
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21645
            }
21646
            break;
21647
          case 4: // SCAN_TYPE
21648
            if (field.type == org.apache.thrift.protocol.TType.I32) {
21649
              this.scanType = ScanType.findByValue(iprot.readI32());
21650
            } else { 
21651
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21652
            }
21653
            break;
21654
          default:
21655
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
21656
        }
21657
        iprot.readFieldEnd();
21658
      }
21659
      iprot.readStructEnd();
21660
      validate();
21661
    }
21662
 
21663
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
21664
      validate();
21665
 
21666
      oprot.writeStructBegin(STRUCT_DESC);
21667
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
21668
      oprot.writeI64(this.orderId);
21669
      oprot.writeFieldEnd();
21670
      oprot.writeFieldBegin(FREEBIE_ITEM_ID_FIELD_DESC);
21671
      oprot.writeI64(this.freebieItemId);
21672
      oprot.writeFieldEnd();
21673
      oprot.writeFieldBegin(FREEBIE_WAREHOUSE_ID_FIELD_DESC);
21674
      oprot.writeI64(this.freebieWarehouseId);
21675
      oprot.writeFieldEnd();
21676
      if (this.scanType != null) {
21677
        oprot.writeFieldBegin(SCAN_TYPE_FIELD_DESC);
21678
        oprot.writeI32(this.scanType.getValue());
21679
        oprot.writeFieldEnd();
21680
      }
21681
      oprot.writeFieldStop();
21682
      oprot.writeStructEnd();
21683
    }
21684
 
21685
    @Override
21686
    public String toString() {
21687
      StringBuilder sb = new StringBuilder("scanfreebie_args(");
21688
      boolean first = true;
21689
 
21690
      sb.append("orderId:");
21691
      sb.append(this.orderId);
21692
      first = false;
21693
      if (!first) sb.append(", ");
21694
      sb.append("freebieItemId:");
21695
      sb.append(this.freebieItemId);
21696
      first = false;
21697
      if (!first) sb.append(", ");
21698
      sb.append("freebieWarehouseId:");
21699
      sb.append(this.freebieWarehouseId);
21700
      first = false;
21701
      if (!first) sb.append(", ");
21702
      sb.append("scanType:");
21703
      if (this.scanType == null) {
21704
        sb.append("null");
21705
      } else {
21706
        sb.append(this.scanType);
21707
      }
21708
      first = false;
21709
      sb.append(")");
21710
      return sb.toString();
21711
    }
21712
 
21713
    public void validate() throws org.apache.thrift.TException {
21714
      // check for required fields
21715
    }
21716
 
21717
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
21718
      try {
21719
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
21720
      } catch (org.apache.thrift.TException te) {
21721
        throw new java.io.IOException(te);
21722
      }
21723
    }
21724
 
21725
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
21726
      try {
21727
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
21728
        __isset_bit_vector = new BitSet(1);
21729
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
21730
      } catch (org.apache.thrift.TException te) {
21731
        throw new java.io.IOException(te);
21732
      }
21733
    }
21734
 
21735
  }
21736
 
21737
  public static class scanfreebie_result implements org.apache.thrift.TBase<scanfreebie_result, scanfreebie_result._Fields>, java.io.Serializable, Cloneable   {
21738
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanfreebie_result");
21739
 
21740
    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);
21741
    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);
21742
 
21743
    private InventoryItem success; // required
21744
    private WarehouseServiceException wex; // required
21745
 
21746
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21747
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
21748
      SUCCESS((short)0, "success"),
21749
      WEX((short)1, "wex");
21750
 
21751
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21752
 
21753
      static {
21754
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21755
          byName.put(field.getFieldName(), field);
21756
        }
21757
      }
21758
 
21759
      /**
21760
       * Find the _Fields constant that matches fieldId, or null if its not found.
21761
       */
21762
      public static _Fields findByThriftId(int fieldId) {
21763
        switch(fieldId) {
21764
          case 0: // SUCCESS
21765
            return SUCCESS;
21766
          case 1: // WEX
21767
            return WEX;
21768
          default:
21769
            return null;
21770
        }
21771
      }
21772
 
21773
      /**
21774
       * Find the _Fields constant that matches fieldId, throwing an exception
21775
       * if it is not found.
21776
       */
21777
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21778
        _Fields fields = findByThriftId(fieldId);
21779
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21780
        return fields;
21781
      }
21782
 
21783
      /**
21784
       * Find the _Fields constant that matches name, or null if its not found.
21785
       */
21786
      public static _Fields findByName(String name) {
21787
        return byName.get(name);
21788
      }
21789
 
21790
      private final short _thriftId;
21791
      private final String _fieldName;
21792
 
21793
      _Fields(short thriftId, String fieldName) {
21794
        _thriftId = thriftId;
21795
        _fieldName = fieldName;
21796
      }
21797
 
21798
      public short getThriftFieldId() {
21799
        return _thriftId;
21800
      }
21801
 
21802
      public String getFieldName() {
21803
        return _fieldName;
21804
      }
21805
    }
21806
 
21807
    // isset id assignments
21808
 
21809
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
21810
    static {
21811
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
21812
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21813
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
21814
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
21815
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
21816
      metaDataMap = Collections.unmodifiableMap(tmpMap);
21817
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanfreebie_result.class, metaDataMap);
21818
    }
21819
 
21820
    public scanfreebie_result() {
21821
    }
21822
 
21823
    public scanfreebie_result(
21824
      InventoryItem success,
21825
      WarehouseServiceException wex)
21826
    {
21827
      this();
21828
      this.success = success;
21829
      this.wex = wex;
21830
    }
21831
 
21832
    /**
21833
     * Performs a deep copy on <i>other</i>.
21834
     */
21835
    public scanfreebie_result(scanfreebie_result other) {
21836
      if (other.isSetSuccess()) {
21837
        this.success = new InventoryItem(other.success);
21838
      }
21839
      if (other.isSetWex()) {
21840
        this.wex = new WarehouseServiceException(other.wex);
21841
      }
21842
    }
21843
 
21844
    public scanfreebie_result deepCopy() {
21845
      return new scanfreebie_result(this);
21846
    }
21847
 
21848
    @Override
21849
    public void clear() {
21850
      this.success = null;
21851
      this.wex = null;
21852
    }
21853
 
21854
    public InventoryItem getSuccess() {
21855
      return this.success;
21856
    }
21857
 
21858
    public void setSuccess(InventoryItem success) {
21859
      this.success = success;
21860
    }
21861
 
21862
    public void unsetSuccess() {
21863
      this.success = null;
21864
    }
21865
 
21866
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
21867
    public boolean isSetSuccess() {
21868
      return this.success != null;
21869
    }
21870
 
21871
    public void setSuccessIsSet(boolean value) {
21872
      if (!value) {
21873
        this.success = null;
21874
      }
21875
    }
21876
 
21877
    public WarehouseServiceException getWex() {
21878
      return this.wex;
21879
    }
21880
 
21881
    public void setWex(WarehouseServiceException wex) {
21882
      this.wex = wex;
21883
    }
21884
 
21885
    public void unsetWex() {
21886
      this.wex = null;
21887
    }
21888
 
21889
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
21890
    public boolean isSetWex() {
21891
      return this.wex != null;
21892
    }
21893
 
21894
    public void setWexIsSet(boolean value) {
21895
      if (!value) {
21896
        this.wex = null;
21897
      }
21898
    }
21899
 
21900
    public void setFieldValue(_Fields field, Object value) {
21901
      switch (field) {
21902
      case SUCCESS:
21903
        if (value == null) {
21904
          unsetSuccess();
21905
        } else {
21906
          setSuccess((InventoryItem)value);
21907
        }
21908
        break;
21909
 
21910
      case WEX:
21911
        if (value == null) {
21912
          unsetWex();
21913
        } else {
21914
          setWex((WarehouseServiceException)value);
21915
        }
21916
        break;
21917
 
21918
      }
21919
    }
21920
 
21921
    public Object getFieldValue(_Fields field) {
21922
      switch (field) {
21923
      case SUCCESS:
21924
        return getSuccess();
21925
 
21926
      case WEX:
21927
        return getWex();
21928
 
21929
      }
21930
      throw new IllegalStateException();
21931
    }
21932
 
21933
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
21934
    public boolean isSet(_Fields field) {
21935
      if (field == null) {
21936
        throw new IllegalArgumentException();
21937
      }
21938
 
21939
      switch (field) {
21940
      case SUCCESS:
21941
        return isSetSuccess();
21942
      case WEX:
21943
        return isSetWex();
21944
      }
21945
      throw new IllegalStateException();
21946
    }
21947
 
21948
    @Override
21949
    public boolean equals(Object that) {
21950
      if (that == null)
21951
        return false;
21952
      if (that instanceof scanfreebie_result)
21953
        return this.equals((scanfreebie_result)that);
21954
      return false;
21955
    }
21956
 
21957
    public boolean equals(scanfreebie_result that) {
21958
      if (that == null)
21959
        return false;
21960
 
21961
      boolean this_present_success = true && this.isSetSuccess();
21962
      boolean that_present_success = true && that.isSetSuccess();
21963
      if (this_present_success || that_present_success) {
21964
        if (!(this_present_success && that_present_success))
21965
          return false;
21966
        if (!this.success.equals(that.success))
21967
          return false;
21968
      }
21969
 
21970
      boolean this_present_wex = true && this.isSetWex();
21971
      boolean that_present_wex = true && that.isSetWex();
21972
      if (this_present_wex || that_present_wex) {
21973
        if (!(this_present_wex && that_present_wex))
21974
          return false;
21975
        if (!this.wex.equals(that.wex))
21976
          return false;
21977
      }
21978
 
21979
      return true;
21980
    }
21981
 
21982
    @Override
21983
    public int hashCode() {
21984
      return 0;
21985
    }
21986
 
21987
    public int compareTo(scanfreebie_result other) {
21988
      if (!getClass().equals(other.getClass())) {
21989
        return getClass().getName().compareTo(other.getClass().getName());
21990
      }
21991
 
21992
      int lastComparison = 0;
21993
      scanfreebie_result typedOther = (scanfreebie_result)other;
21994
 
21995
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
21996
      if (lastComparison != 0) {
21997
        return lastComparison;
21998
      }
21999
      if (isSetSuccess()) {
22000
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
22001
        if (lastComparison != 0) {
22002
          return lastComparison;
22003
        }
22004
      }
22005
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
22006
      if (lastComparison != 0) {
22007
        return lastComparison;
22008
      }
22009
      if (isSetWex()) {
22010
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
22011
        if (lastComparison != 0) {
22012
          return lastComparison;
22013
        }
22014
      }
22015
      return 0;
22016
    }
22017
 
22018
    public _Fields fieldForId(int fieldId) {
22019
      return _Fields.findByThriftId(fieldId);
22020
    }
22021
 
22022
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
22023
      org.apache.thrift.protocol.TField field;
22024
      iprot.readStructBegin();
22025
      while (true)
22026
      {
22027
        field = iprot.readFieldBegin();
22028
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
22029
          break;
22030
        }
22031
        switch (field.id) {
22032
          case 0: // SUCCESS
22033
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22034
              this.success = new InventoryItem();
22035
              this.success.read(iprot);
22036
            } else { 
22037
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22038
            }
22039
            break;
22040
          case 1: // WEX
22041
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
22042
              this.wex = new WarehouseServiceException();
22043
              this.wex.read(iprot);
22044
            } else { 
22045
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22046
            }
22047
            break;
22048
          default:
22049
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
22050
        }
22051
        iprot.readFieldEnd();
22052
      }
22053
      iprot.readStructEnd();
22054
      validate();
22055
    }
22056
 
22057
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
22058
      oprot.writeStructBegin(STRUCT_DESC);
22059
 
22060
      if (this.isSetSuccess()) {
22061
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22062
        this.success.write(oprot);
22063
        oprot.writeFieldEnd();
22064
      } else if (this.isSetWex()) {
22065
        oprot.writeFieldBegin(WEX_FIELD_DESC);
22066
        this.wex.write(oprot);
22067
        oprot.writeFieldEnd();
22068
      }
22069
      oprot.writeFieldStop();
22070
      oprot.writeStructEnd();
22071
    }
22072
 
22073
    @Override
22074
    public String toString() {
22075
      StringBuilder sb = new StringBuilder("scanfreebie_result(");
22076
      boolean first = true;
22077
 
22078
      sb.append("success:");
22079
      if (this.success == null) {
22080
        sb.append("null");
22081
      } else {
22082
        sb.append(this.success);
22083
      }
22084
      first = false;
22085
      if (!first) sb.append(", ");
22086
      sb.append("wex:");
22087
      if (this.wex == null) {
22088
        sb.append("null");
22089
      } else {
22090
        sb.append(this.wex);
22091
      }
22092
      first = false;
22093
      sb.append(")");
22094
      return sb.toString();
22095
    }
22096
 
22097
    public void validate() throws org.apache.thrift.TException {
22098
      // check for required fields
22099
    }
22100
 
22101
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
22102
      try {
22103
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
22104
      } catch (org.apache.thrift.TException te) {
22105
        throw new java.io.IOException(te);
22106
      }
22107
    }
22108
 
22109
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
22110
      try {
22111
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
22112
      } catch (org.apache.thrift.TException te) {
22113
        throw new java.io.IOException(te);
22114
      }
22115
    }
22116
 
22117
  }
22118
 
2820 chandransh 22119
}