Subversion Repositories SmartDukaan

Rev

Rev 4846 | Rev 5185 | 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
     * Creating inventory for a serialized item
2820 chandransh 29
     * 
4496 mandeep.dh 30
     * @param itemId
4846 mandeep.dh 31
     * @param itemNumber
4496 mandeep.dh 32
     * @param serialNumber
33
     * @param purchaseId
2820 chandransh 34
     */
4846 mandeep.dh 35
    public InventoryItem createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException;
2820 chandransh 36
 
37
    /**
4496 mandeep.dh 38
     * Creating inventory for a serialized item using item number
2820 chandransh 39
     * 
4496 mandeep.dh 40
     * @param itemNumber
41
     * @param serialNumber
42
     * @param purchaseId
2820 chandransh 43
     */
4555 mandeep.dh 44
    public InventoryItem createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException;
2820 chandransh 45
 
46
    /**
4496 mandeep.dh 47
     * Creates inventory for an unserailized item
3383 chandransh 48
     * 
4496 mandeep.dh 49
     * @param itemId
50
     * @param quantity
51
     * @param purchaseId
3383 chandransh 52
     */
4555 mandeep.dh 53
    public InventoryItem createInventoryItem(long itemId, long quantity, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException;
3383 chandransh 54
 
55
    /**
4496 mandeep.dh 56
     * Retrieves serialized inventory item given a serial number
2832 chandransh 57
     * 
4496 mandeep.dh 58
     * @param serialNumber
2832 chandransh 59
     */
4541 mandeep.dh 60
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException;
2832 chandransh 61
 
62
    /**
4496 mandeep.dh 63
     * Retrieves non-serialized inventory items from a given supplier
2820 chandransh 64
     * 
4496 mandeep.dh 65
     * @param itemId
66
     * @param quantity
67
     * @param supplierId
2820 chandransh 68
     */
4496 mandeep.dh 69
    public List<InventoryItem> getNonSeralizedInventoryItems(long itemId, long quantity, long supplierId) throws org.apache.thrift.TException;
2820 chandransh 70
 
71
    /**
4496 mandeep.dh 72
     * Retrieves inventory items for a given item
2820 chandransh 73
     * 
4496 mandeep.dh 74
     * @param itemId
2820 chandransh 75
     */
4496 mandeep.dh 76
    public List<InventoryItem> getInventoryItems(long itemId) throws org.apache.thrift.TException;
2820 chandransh 77
 
78
    /**
4496 mandeep.dh 79
     * Retrieves scans for a given order
3383 chandransh 80
     * 
4496 mandeep.dh 81
     * @param orderId
3383 chandransh 82
     */
4496 mandeep.dh 83
    public List<Scan> getScanForOrder(long orderId) throws org.apache.thrift.TException;
3383 chandransh 84
 
85
    /**
4496 mandeep.dh 86
     * Retrieves scans for a given inventory item
2820 chandransh 87
     * 
4496 mandeep.dh 88
     * @param inventoryItemId
89
     */
90
    public List<Scan> getScan(long inventoryItemId) throws org.apache.thrift.TException;
91
 
92
    /**
93
     * Scan serialized items.
94
     * 
5110 mandeep.dh 95
     * @param inventoryItem
2820 chandransh 96
     * @param type
4496 mandeep.dh 97
     * @param warehouseId
2820 chandransh 98
     */
5110 mandeep.dh 99
    public void scanSerializedItem(InventoryItem inventoryItem, ScanType type, long warehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
2820 chandransh 100
 
101
    /**
4496 mandeep.dh 102
     * Scan non-serialized items.
2820 chandransh 103
     * 
4496 mandeep.dh 104
     * @param inventoryItemId
2820 chandransh 105
     * @param type
4496 mandeep.dh 106
     * @param quantity
107
     * @param warehouseId
2820 chandransh 108
     */
4496 mandeep.dh 109
    public void scan(long inventoryItemId, ScanType type, long quantity, long warehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
2820 chandransh 110
 
4496 mandeep.dh 111
    /**
112
     * Scan serialized items linked with an order. Returns its price.
113
     * 
4555 mandeep.dh 114
     * @param serialNumber
4496 mandeep.dh 115
     * @param type
116
     * @param orderId
5110 mandeep.dh 117
     * @param fulfilmentWarehouseId
118
     * @param quantity
119
     * @param billingWarehouseId
4496 mandeep.dh 120
     */
5110 mandeep.dh 121
    public InventoryItem scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
4496 mandeep.dh 122
 
123
    /**
124
     * Scan non-serialized items linked with an order.
125
     * 
126
     * @param inventoryItemId
127
     * @param type
128
     * @param quantity
129
     * @param orderId
5110 mandeep.dh 130
     * @param fulfilmentWarehouseId
4496 mandeep.dh 131
     */
5110 mandeep.dh 132
    public void scanForOrder(long inventoryItemId, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
4496 mandeep.dh 133
 
134
    /**
135
     * Created item number to item id mapping
136
     * 
137
     * @param itemNumber
138
     * @param itemId
139
     */
140
    public void createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException;
141
 
4622 amit.gupta 142
    /**
143
     * Get itemNumber mappings for itemId
144
     * 
145
     * @param itemId
146
     */
147
    public List<String> getItemNumbers(long itemId) throws org.apache.thrift.TException;
148
 
5110 mandeep.dh 149
    /**
150
     * Gets item ids for a given item number
151
     * 
152
     * @param itemNumber
153
     */
154
    public List<Long> getItemIds(String itemNumber) throws org.apache.thrift.TException;
155
 
2820 chandransh 156
  }
157
 
3430 rajveer 158
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
159
 
4846 mandeep.dh 160
    public void createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createSerializedInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 161
 
4496 mandeep.dh 162
    public void createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createSerializedInventoryItemFromItemNumber_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 163
 
4496 mandeep.dh 164
    public void createInventoryItem(long itemId, long quantity, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 165
 
4496 mandeep.dh 166
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 167
 
4496 mandeep.dh 168
    public void getNonSeralizedInventoryItems(long itemId, long quantity, long supplierId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getNonSeralizedInventoryItems_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 169
 
4496 mandeep.dh 170
    public void getInventoryItems(long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItems_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 171
 
4496 mandeep.dh 172
    public void getScanForOrder(long orderId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getScanForOrder_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 173
 
4496 mandeep.dh 174
    public void getScan(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getScan_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 175
 
5110 mandeep.dh 176
    public void scanSerializedItem(InventoryItem inventoryItem, ScanType type, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanSerializedItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 177
 
4496 mandeep.dh 178
    public void scan(long inventoryItemId, ScanType type, long quantity, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scan_call> resultHandler) throws org.apache.thrift.TException;
179
 
5110 mandeep.dh 180
    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 181
 
5110 mandeep.dh 182
    public void scanForOrder(long inventoryItemId, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForOrder_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 183
 
184
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException;
185
 
4622 amit.gupta 186
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemNumbers_call> resultHandler) throws org.apache.thrift.TException;
187
 
5110 mandeep.dh 188
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemIds_call> resultHandler) throws org.apache.thrift.TException;
189
 
3430 rajveer 190
  }
191
 
3374 rajveer 192
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
3430 rajveer 193
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
194
      public Factory() {}
195
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
196
        return new Client(prot);
197
      }
198
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
199
        return new Client(iprot, oprot);
200
      }
201
    }
202
 
203
    public Client(org.apache.thrift.protocol.TProtocol prot)
2820 chandransh 204
    {
3430 rajveer 205
      super(prot, prot);
2820 chandransh 206
    }
207
 
3430 rajveer 208
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
3374 rajveer 209
      super(iprot, oprot);
2820 chandransh 210
    }
211
 
4846 mandeep.dh 212
    public InventoryItem createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 213
    {
4846 mandeep.dh 214
      send_createSerializedInventoryItem(itemId, itemNumber, serialNumber, purchaseId);
4496 mandeep.dh 215
      return recv_createSerializedInventoryItem();
2820 chandransh 216
    }
217
 
4846 mandeep.dh 218
    public void send_createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId) throws org.apache.thrift.TException
2820 chandransh 219
    {
4496 mandeep.dh 220
      createSerializedInventoryItem_args args = new createSerializedInventoryItem_args();
221
      args.setItemId(itemId);
4846 mandeep.dh 222
      args.setItemNumber(itemNumber);
4496 mandeep.dh 223
      args.setSerialNumber(serialNumber);
224
      args.setPurchaseId(purchaseId);
225
      sendBase("createSerializedInventoryItem", args);
2820 chandransh 226
    }
227
 
4555 mandeep.dh 228
    public InventoryItem recv_createSerializedInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 229
    {
4496 mandeep.dh 230
      createSerializedInventoryItem_result result = new createSerializedInventoryItem_result();
231
      receiveBase(result, "createSerializedInventoryItem");
2820 chandransh 232
      if (result.isSetSuccess()) {
233
        return result.success;
234
      }
235
      if (result.wex != null) {
236
        throw result.wex;
237
      }
4496 mandeep.dh 238
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createSerializedInventoryItem failed: unknown result");
2820 chandransh 239
    }
240
 
4555 mandeep.dh 241
    public InventoryItem createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 242
    {
4496 mandeep.dh 243
      send_createSerializedInventoryItemFromItemNumber(itemNumber, serialNumber, purchaseId);
244
      return recv_createSerializedInventoryItemFromItemNumber();
2820 chandransh 245
    }
246
 
4496 mandeep.dh 247
    public void send_createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId) throws org.apache.thrift.TException
2820 chandransh 248
    {
4496 mandeep.dh 249
      createSerializedInventoryItemFromItemNumber_args args = new createSerializedInventoryItemFromItemNumber_args();
250
      args.setItemNumber(itemNumber);
251
      args.setSerialNumber(serialNumber);
252
      args.setPurchaseId(purchaseId);
253
      sendBase("createSerializedInventoryItemFromItemNumber", args);
2820 chandransh 254
    }
255
 
4555 mandeep.dh 256
    public InventoryItem recv_createSerializedInventoryItemFromItemNumber() throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 257
    {
4496 mandeep.dh 258
      createSerializedInventoryItemFromItemNumber_result result = new createSerializedInventoryItemFromItemNumber_result();
259
      receiveBase(result, "createSerializedInventoryItemFromItemNumber");
2820 chandransh 260
      if (result.isSetSuccess()) {
261
        return result.success;
262
      }
263
      if (result.wex != null) {
264
        throw result.wex;
265
      }
4496 mandeep.dh 266
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createSerializedInventoryItemFromItemNumber failed: unknown result");
2820 chandransh 267
    }
268
 
4555 mandeep.dh 269
    public InventoryItem createInventoryItem(long itemId, long quantity, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 270
    {
4496 mandeep.dh 271
      send_createInventoryItem(itemId, quantity, purchaseId);
272
      return recv_createInventoryItem();
3383 chandransh 273
    }
274
 
4496 mandeep.dh 275
    public void send_createInventoryItem(long itemId, long quantity, long purchaseId) throws org.apache.thrift.TException
3383 chandransh 276
    {
4496 mandeep.dh 277
      createInventoryItem_args args = new createInventoryItem_args();
278
      args.setItemId(itemId);
279
      args.setQuantity(quantity);
280
      args.setPurchaseId(purchaseId);
281
      sendBase("createInventoryItem", args);
3383 chandransh 282
    }
283
 
4555 mandeep.dh 284
    public InventoryItem recv_createInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 285
    {
4496 mandeep.dh 286
      createInventoryItem_result result = new createInventoryItem_result();
287
      receiveBase(result, "createInventoryItem");
3383 chandransh 288
      if (result.isSetSuccess()) {
289
        return result.success;
290
      }
291
      if (result.wex != null) {
292
        throw result.wex;
293
      }
4496 mandeep.dh 294
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createInventoryItem failed: unknown result");
3383 chandransh 295
    }
296
 
4541 mandeep.dh 297
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 298
    {
4496 mandeep.dh 299
      send_getInventoryItem(serialNumber);
300
      return recv_getInventoryItem();
2832 chandransh 301
    }
302
 
4496 mandeep.dh 303
    public void send_getInventoryItem(String serialNumber) throws org.apache.thrift.TException
2832 chandransh 304
    {
4496 mandeep.dh 305
      getInventoryItem_args args = new getInventoryItem_args();
306
      args.setSerialNumber(serialNumber);
307
      sendBase("getInventoryItem", args);
2832 chandransh 308
    }
309
 
4541 mandeep.dh 310
    public InventoryItem recv_getInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 311
    {
4496 mandeep.dh 312
      getInventoryItem_result result = new getInventoryItem_result();
313
      receiveBase(result, "getInventoryItem");
2832 chandransh 314
      if (result.isSetSuccess()) {
315
        return result.success;
316
      }
4541 mandeep.dh 317
      if (result.wex != null) {
318
        throw result.wex;
319
      }
4496 mandeep.dh 320
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItem failed: unknown result");
321
    }
322
 
323
    public List<InventoryItem> getNonSeralizedInventoryItems(long itemId, long quantity, long supplierId) throws org.apache.thrift.TException
324
    {
325
      send_getNonSeralizedInventoryItems(itemId, quantity, supplierId);
326
      return recv_getNonSeralizedInventoryItems();
327
    }
328
 
329
    public void send_getNonSeralizedInventoryItems(long itemId, long quantity, long supplierId) throws org.apache.thrift.TException
330
    {
331
      getNonSeralizedInventoryItems_args args = new getNonSeralizedInventoryItems_args();
332
      args.setItemId(itemId);
333
      args.setQuantity(quantity);
334
      args.setSupplierId(supplierId);
335
      sendBase("getNonSeralizedInventoryItems", args);
336
    }
337
 
338
    public List<InventoryItem> recv_getNonSeralizedInventoryItems() throws org.apache.thrift.TException
339
    {
340
      getNonSeralizedInventoryItems_result result = new getNonSeralizedInventoryItems_result();
341
      receiveBase(result, "getNonSeralizedInventoryItems");
342
      if (result.isSetSuccess()) {
343
        return result.success;
2832 chandransh 344
      }
4496 mandeep.dh 345
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNonSeralizedInventoryItems failed: unknown result");
2832 chandransh 346
    }
347
 
4496 mandeep.dh 348
    public List<InventoryItem> getInventoryItems(long itemId) throws org.apache.thrift.TException
2820 chandransh 349
    {
4496 mandeep.dh 350
      send_getInventoryItems(itemId);
351
      return recv_getInventoryItems();
2820 chandransh 352
    }
353
 
4496 mandeep.dh 354
    public void send_getInventoryItems(long itemId) throws org.apache.thrift.TException
2820 chandransh 355
    {
4496 mandeep.dh 356
      getInventoryItems_args args = new getInventoryItems_args();
357
      args.setItemId(itemId);
358
      sendBase("getInventoryItems", args);
2820 chandransh 359
    }
360
 
4496 mandeep.dh 361
    public List<InventoryItem> recv_getInventoryItems() throws org.apache.thrift.TException
2820 chandransh 362
    {
4496 mandeep.dh 363
      getInventoryItems_result result = new getInventoryItems_result();
364
      receiveBase(result, "getInventoryItems");
2820 chandransh 365
      if (result.isSetSuccess()) {
366
        return result.success;
367
      }
4496 mandeep.dh 368
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItems failed: unknown result");
369
    }
370
 
371
    public List<Scan> getScanForOrder(long orderId) throws org.apache.thrift.TException
372
    {
373
      send_getScanForOrder(orderId);
374
      return recv_getScanForOrder();
375
    }
376
 
377
    public void send_getScanForOrder(long orderId) throws org.apache.thrift.TException
378
    {
379
      getScanForOrder_args args = new getScanForOrder_args();
380
      args.setOrderId(orderId);
381
      sendBase("getScanForOrder", args);
382
    }
383
 
384
    public List<Scan> recv_getScanForOrder() throws org.apache.thrift.TException
385
    {
386
      getScanForOrder_result result = new getScanForOrder_result();
387
      receiveBase(result, "getScanForOrder");
388
      if (result.isSetSuccess()) {
389
        return result.success;
2820 chandransh 390
      }
4496 mandeep.dh 391
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getScanForOrder failed: unknown result");
2820 chandransh 392
    }
393
 
4496 mandeep.dh 394
    public List<Scan> getScan(long inventoryItemId) throws org.apache.thrift.TException
2820 chandransh 395
    {
4496 mandeep.dh 396
      send_getScan(inventoryItemId);
397
      return recv_getScan();
2820 chandransh 398
    }
399
 
4496 mandeep.dh 400
    public void send_getScan(long inventoryItemId) throws org.apache.thrift.TException
2820 chandransh 401
    {
4496 mandeep.dh 402
      getScan_args args = new getScan_args();
403
      args.setInventoryItemId(inventoryItemId);
404
      sendBase("getScan", args);
2820 chandransh 405
    }
406
 
4496 mandeep.dh 407
    public List<Scan> recv_getScan() throws org.apache.thrift.TException
2820 chandransh 408
    {
4496 mandeep.dh 409
      getScan_result result = new getScan_result();
410
      receiveBase(result, "getScan");
2820 chandransh 411
      if (result.isSetSuccess()) {
412
        return result.success;
413
      }
4496 mandeep.dh 414
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getScan failed: unknown result");
415
    }
416
 
5110 mandeep.dh 417
    public void scanSerializedItem(InventoryItem inventoryItem, ScanType type, long warehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 418
    {
5110 mandeep.dh 419
      send_scanSerializedItem(inventoryItem, type, warehouseId);
4496 mandeep.dh 420
      recv_scanSerializedItem();
421
    }
422
 
5110 mandeep.dh 423
    public void send_scanSerializedItem(InventoryItem inventoryItem, ScanType type, long warehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 424
    {
425
      scanSerializedItem_args args = new scanSerializedItem_args();
5110 mandeep.dh 426
      args.setInventoryItem(inventoryItem);
4496 mandeep.dh 427
      args.setType(type);
428
      args.setWarehouseId(warehouseId);
429
      sendBase("scanSerializedItem", args);
430
    }
431
 
432
    public void recv_scanSerializedItem() throws WarehouseServiceException, org.apache.thrift.TException
433
    {
434
      scanSerializedItem_result result = new scanSerializedItem_result();
435
      receiveBase(result, "scanSerializedItem");
2820 chandransh 436
      if (result.wex != null) {
437
        throw result.wex;
438
      }
4496 mandeep.dh 439
      return;
2820 chandransh 440
    }
441
 
4496 mandeep.dh 442
    public void scan(long inventoryItemId, ScanType type, long quantity, long warehouseId) throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 443
    {
4496 mandeep.dh 444
      send_scan(inventoryItemId, type, quantity, warehouseId);
445
      recv_scan();
3383 chandransh 446
    }
447
 
4496 mandeep.dh 448
    public void send_scan(long inventoryItemId, ScanType type, long quantity, long warehouseId) throws org.apache.thrift.TException
3383 chandransh 449
    {
4496 mandeep.dh 450
      scan_args args = new scan_args();
451
      args.setInventoryItemId(inventoryItemId);
452
      args.setType(type);
453
      args.setQuantity(quantity);
454
      args.setWarehouseId(warehouseId);
455
      sendBase("scan", args);
3383 chandransh 456
    }
457
 
4496 mandeep.dh 458
    public void recv_scan() throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 459
    {
4496 mandeep.dh 460
      scan_result result = new scan_result();
461
      receiveBase(result, "scan");
462
      if (result.wex != null) {
463
        throw result.wex;
464
      }
465
      return;
466
    }
467
 
5110 mandeep.dh 468
    public InventoryItem scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 469
    {
5110 mandeep.dh 470
      send_scanSerializedItemForOrder(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId);
4496 mandeep.dh 471
      return recv_scanSerializedItemForOrder();
472
    }
473
 
5110 mandeep.dh 474
    public void send_scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 475
    {
476
      scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 477
      args.setSerialNumber(serialNumber);
4496 mandeep.dh 478
      args.setType(type);
479
      args.setOrderId(orderId);
5110 mandeep.dh 480
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
481
      args.setQuantity(quantity);
482
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 483
      sendBase("scanSerializedItemForOrder", args);
484
    }
485
 
4555 mandeep.dh 486
    public InventoryItem recv_scanSerializedItemForOrder() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 487
    {
488
      scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
489
      receiveBase(result, "scanSerializedItemForOrder");
3383 chandransh 490
      if (result.isSetSuccess()) {
491
        return result.success;
492
      }
493
      if (result.wex != null) {
494
        throw result.wex;
495
      }
4496 mandeep.dh 496
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanSerializedItemForOrder failed: unknown result");
3383 chandransh 497
    }
498
 
5110 mandeep.dh 499
    public void scanForOrder(long inventoryItemId, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 500
    {
5110 mandeep.dh 501
      send_scanForOrder(inventoryItemId, type, quantity, orderId, fulfilmentWarehouseId);
4496 mandeep.dh 502
      recv_scanForOrder();
2820 chandransh 503
    }
504
 
5110 mandeep.dh 505
    public void send_scanForOrder(long inventoryItemId, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId) throws org.apache.thrift.TException
2820 chandransh 506
    {
4496 mandeep.dh 507
      scanForOrder_args args = new scanForOrder_args();
508
      args.setInventoryItemId(inventoryItemId);
3430 rajveer 509
      args.setType(type);
4496 mandeep.dh 510
      args.setQuantity(quantity);
511
      args.setOrderId(orderId);
5110 mandeep.dh 512
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
4496 mandeep.dh 513
      sendBase("scanForOrder", args);
2820 chandransh 514
    }
515
 
4496 mandeep.dh 516
    public void recv_scanForOrder() throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 517
    {
4496 mandeep.dh 518
      scanForOrder_result result = new scanForOrder_result();
519
      receiveBase(result, "scanForOrder");
2820 chandransh 520
      if (result.wex != null) {
521
        throw result.wex;
522
      }
523
      return;
524
    }
525
 
4496 mandeep.dh 526
    public void createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 527
    {
4496 mandeep.dh 528
      send_createItemNumberMapping(itemNumber, itemId);
529
      recv_createItemNumberMapping();
2820 chandransh 530
    }
531
 
4496 mandeep.dh 532
    public void send_createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 533
    {
4496 mandeep.dh 534
      createItemNumberMapping_args args = new createItemNumberMapping_args();
3430 rajveer 535
      args.setItemNumber(itemNumber);
4496 mandeep.dh 536
      args.setItemId(itemId);
537
      sendBase("createItemNumberMapping", args);
2820 chandransh 538
    }
539
 
4496 mandeep.dh 540
    public void recv_createItemNumberMapping() throws org.apache.thrift.TException
2820 chandransh 541
    {
4496 mandeep.dh 542
      createItemNumberMapping_result result = new createItemNumberMapping_result();
543
      receiveBase(result, "createItemNumberMapping");
2820 chandransh 544
      return;
545
    }
546
 
4622 amit.gupta 547
    public List<String> getItemNumbers(long itemId) throws org.apache.thrift.TException
548
    {
549
      send_getItemNumbers(itemId);
550
      return recv_getItemNumbers();
551
    }
552
 
553
    public void send_getItemNumbers(long itemId) throws org.apache.thrift.TException
554
    {
555
      getItemNumbers_args args = new getItemNumbers_args();
556
      args.setItemId(itemId);
557
      sendBase("getItemNumbers", args);
558
    }
559
 
560
    public List<String> recv_getItemNumbers() throws org.apache.thrift.TException
561
    {
562
      getItemNumbers_result result = new getItemNumbers_result();
563
      receiveBase(result, "getItemNumbers");
564
      if (result.isSetSuccess()) {
565
        return result.success;
566
      }
567
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemNumbers failed: unknown result");
568
    }
569
 
5110 mandeep.dh 570
    public List<Long> getItemIds(String itemNumber) throws org.apache.thrift.TException
571
    {
572
      send_getItemIds(itemNumber);
573
      return recv_getItemIds();
574
    }
575
 
576
    public void send_getItemIds(String itemNumber) throws org.apache.thrift.TException
577
    {
578
      getItemIds_args args = new getItemIds_args();
579
      args.setItemNumber(itemNumber);
580
      sendBase("getItemIds", args);
581
    }
582
 
583
    public List<Long> recv_getItemIds() throws org.apache.thrift.TException
584
    {
585
      getItemIds_result result = new getItemIds_result();
586
      receiveBase(result, "getItemIds");
587
      if (result.isSetSuccess()) {
588
        return result.success;
589
      }
590
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemIds failed: unknown result");
591
    }
592
 
2820 chandransh 593
  }
3430 rajveer 594
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
595
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
596
      private org.apache.thrift.async.TAsyncClientManager clientManager;
597
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
598
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
599
        this.clientManager = clientManager;
600
        this.protocolFactory = protocolFactory;
601
      }
602
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
603
        return new AsyncClient(protocolFactory, clientManager, transport);
604
      }
2820 chandransh 605
    }
606
 
3430 rajveer 607
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
608
      super(protocolFactory, clientManager, transport);
609
    }
2820 chandransh 610
 
4846 mandeep.dh 611
    public void createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createSerializedInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 612
      checkReady();
4846 mandeep.dh 613
      createSerializedInventoryItem_call method_call = new createSerializedInventoryItem_call(itemId, itemNumber, serialNumber, purchaseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 614
      this.___currentMethod = method_call;
615
      ___manager.call(method_call);
616
    }
617
 
4496 mandeep.dh 618
    public static class createSerializedInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
619
      private long itemId;
4846 mandeep.dh 620
      private String itemNumber;
4496 mandeep.dh 621
      private String serialNumber;
622
      private long purchaseId;
4846 mandeep.dh 623
      public createSerializedInventoryItem_call(long itemId, String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createSerializedInventoryItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
3430 rajveer 624
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 625
        this.itemId = itemId;
4846 mandeep.dh 626
        this.itemNumber = itemNumber;
4496 mandeep.dh 627
        this.serialNumber = serialNumber;
628
        this.purchaseId = purchaseId;
2820 chandransh 629
      }
3430 rajveer 630
 
631
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 632
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createSerializedInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
633
        createSerializedInventoryItem_args args = new createSerializedInventoryItem_args();
634
        args.setItemId(itemId);
4846 mandeep.dh 635
        args.setItemNumber(itemNumber);
4496 mandeep.dh 636
        args.setSerialNumber(serialNumber);
637
        args.setPurchaseId(purchaseId);
3430 rajveer 638
        args.write(prot);
639
        prot.writeMessageEnd();
640
      }
641
 
4555 mandeep.dh 642
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 643
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
644
          throw new IllegalStateException("Method call not finished!");
645
        }
646
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
647
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 648
        return (new Client(prot)).recv_createSerializedInventoryItem();
3430 rajveer 649
      }
2820 chandransh 650
    }
651
 
4496 mandeep.dh 652
    public void createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createSerializedInventoryItemFromItemNumber_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 653
      checkReady();
4496 mandeep.dh 654
      createSerializedInventoryItemFromItemNumber_call method_call = new createSerializedInventoryItemFromItemNumber_call(itemNumber, serialNumber, purchaseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 655
      this.___currentMethod = method_call;
656
      ___manager.call(method_call);
657
    }
658
 
4496 mandeep.dh 659
    public static class createSerializedInventoryItemFromItemNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
660
      private String itemNumber;
661
      private String serialNumber;
662
      private long purchaseId;
663
      public createSerializedInventoryItemFromItemNumber_call(String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createSerializedInventoryItemFromItemNumber_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
3430 rajveer 664
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 665
        this.itemNumber = itemNumber;
666
        this.serialNumber = serialNumber;
667
        this.purchaseId = purchaseId;
3430 rajveer 668
      }
669
 
670
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 671
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createSerializedInventoryItemFromItemNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
672
        createSerializedInventoryItemFromItemNumber_args args = new createSerializedInventoryItemFromItemNumber_args();
673
        args.setItemNumber(itemNumber);
674
        args.setSerialNumber(serialNumber);
675
        args.setPurchaseId(purchaseId);
3430 rajveer 676
        args.write(prot);
677
        prot.writeMessageEnd();
678
      }
679
 
4555 mandeep.dh 680
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 681
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
682
          throw new IllegalStateException("Method call not finished!");
683
        }
684
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
685
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 686
        return (new Client(prot)).recv_createSerializedInventoryItemFromItemNumber();
3430 rajveer 687
      }
688
    }
689
 
4496 mandeep.dh 690
    public void createInventoryItem(long itemId, long quantity, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 691
      checkReady();
4496 mandeep.dh 692
      createInventoryItem_call method_call = new createInventoryItem_call(itemId, quantity, purchaseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 693
      this.___currentMethod = method_call;
694
      ___manager.call(method_call);
695
    }
696
 
4496 mandeep.dh 697
    public static class createInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
698
      private long itemId;
699
      private long quantity;
700
      private long purchaseId;
701
      public createInventoryItem_call(long itemId, long quantity, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createInventoryItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
3430 rajveer 702
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 703
        this.itemId = itemId;
704
        this.quantity = quantity;
705
        this.purchaseId = purchaseId;
3430 rajveer 706
      }
707
 
708
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 709
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
710
        createInventoryItem_args args = new createInventoryItem_args();
711
        args.setItemId(itemId);
712
        args.setQuantity(quantity);
713
        args.setPurchaseId(purchaseId);
3430 rajveer 714
        args.write(prot);
715
        prot.writeMessageEnd();
716
      }
717
 
4555 mandeep.dh 718
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 719
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
720
          throw new IllegalStateException("Method call not finished!");
721
        }
722
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
723
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 724
        return (new Client(prot)).recv_createInventoryItem();
3430 rajveer 725
      }
726
    }
727
 
4496 mandeep.dh 728
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<getInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 729
      checkReady();
4496 mandeep.dh 730
      getInventoryItem_call method_call = new getInventoryItem_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 731
      this.___currentMethod = method_call;
732
      ___manager.call(method_call);
733
    }
734
 
4496 mandeep.dh 735
    public static class getInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
736
      private String serialNumber;
737
      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 738
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 739
        this.serialNumber = serialNumber;
3430 rajveer 740
      }
741
 
742
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 743
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
744
        getInventoryItem_args args = new getInventoryItem_args();
745
        args.setSerialNumber(serialNumber);
3430 rajveer 746
        args.write(prot);
747
        prot.writeMessageEnd();
748
      }
749
 
4541 mandeep.dh 750
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 751
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
752
          throw new IllegalStateException("Method call not finished!");
753
        }
754
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
755
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 756
        return (new Client(prot)).recv_getInventoryItem();
3430 rajveer 757
      }
758
    }
759
 
4496 mandeep.dh 760
    public void getNonSeralizedInventoryItems(long itemId, long quantity, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getNonSeralizedInventoryItems_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 761
      checkReady();
4496 mandeep.dh 762
      getNonSeralizedInventoryItems_call method_call = new getNonSeralizedInventoryItems_call(itemId, quantity, supplierId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 763
      this.___currentMethod = method_call;
764
      ___manager.call(method_call);
765
    }
766
 
4496 mandeep.dh 767
    public static class getNonSeralizedInventoryItems_call extends org.apache.thrift.async.TAsyncMethodCall {
768
      private long itemId;
769
      private long quantity;
770
      private long supplierId;
771
      public getNonSeralizedInventoryItems_call(long itemId, long quantity, long supplierId, org.apache.thrift.async.AsyncMethodCallback<getNonSeralizedInventoryItems_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
3430 rajveer 772
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 773
        this.itemId = itemId;
774
        this.quantity = quantity;
775
        this.supplierId = supplierId;
3430 rajveer 776
      }
777
 
778
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 779
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNonSeralizedInventoryItems", org.apache.thrift.protocol.TMessageType.CALL, 0));
780
        getNonSeralizedInventoryItems_args args = new getNonSeralizedInventoryItems_args();
781
        args.setItemId(itemId);
782
        args.setQuantity(quantity);
783
        args.setSupplierId(supplierId);
3430 rajveer 784
        args.write(prot);
785
        prot.writeMessageEnd();
786
      }
787
 
4496 mandeep.dh 788
      public List<InventoryItem> getResult() throws org.apache.thrift.TException {
3430 rajveer 789
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
790
          throw new IllegalStateException("Method call not finished!");
791
        }
792
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
793
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 794
        return (new Client(prot)).recv_getNonSeralizedInventoryItems();
3430 rajveer 795
      }
796
    }
797
 
4496 mandeep.dh 798
    public void getInventoryItems(long itemId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItems_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 799
      checkReady();
4496 mandeep.dh 800
      getInventoryItems_call method_call = new getInventoryItems_call(itemId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 801
      this.___currentMethod = method_call;
802
      ___manager.call(method_call);
803
    }
804
 
4496 mandeep.dh 805
    public static class getInventoryItems_call extends org.apache.thrift.async.TAsyncMethodCall {
806
      private long itemId;
807
      public getInventoryItems_call(long itemId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItems_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
3430 rajveer 808
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 809
        this.itemId = itemId;
3430 rajveer 810
      }
811
 
812
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 813
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItems", org.apache.thrift.protocol.TMessageType.CALL, 0));
814
        getInventoryItems_args args = new getInventoryItems_args();
815
        args.setItemId(itemId);
3430 rajveer 816
        args.write(prot);
817
        prot.writeMessageEnd();
818
      }
819
 
4496 mandeep.dh 820
      public List<InventoryItem> getResult() throws org.apache.thrift.TException {
3430 rajveer 821
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
822
          throw new IllegalStateException("Method call not finished!");
823
        }
824
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
825
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 826
        return (new Client(prot)).recv_getInventoryItems();
3430 rajveer 827
      }
828
    }
829
 
4496 mandeep.dh 830
    public void getScanForOrder(long orderId, org.apache.thrift.async.AsyncMethodCallback<getScanForOrder_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 831
      checkReady();
4496 mandeep.dh 832
      getScanForOrder_call method_call = new getScanForOrder_call(orderId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 833
      this.___currentMethod = method_call;
834
      ___manager.call(method_call);
835
    }
836
 
4496 mandeep.dh 837
    public static class getScanForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
838
      private long orderId;
839
      public getScanForOrder_call(long orderId, org.apache.thrift.async.AsyncMethodCallback<getScanForOrder_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
3430 rajveer 840
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 841
        this.orderId = orderId;
3430 rajveer 842
      }
843
 
844
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 845
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getScanForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
846
        getScanForOrder_args args = new getScanForOrder_args();
847
        args.setOrderId(orderId);
3430 rajveer 848
        args.write(prot);
849
        prot.writeMessageEnd();
850
      }
851
 
4496 mandeep.dh 852
      public List<Scan> getResult() throws org.apache.thrift.TException {
3430 rajveer 853
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
854
          throw new IllegalStateException("Method call not finished!");
855
        }
856
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
857
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 858
        return (new Client(prot)).recv_getScanForOrder();
3430 rajveer 859
      }
860
    }
861
 
4496 mandeep.dh 862
    public void getScan(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<getScan_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 863
      checkReady();
4496 mandeep.dh 864
      getScan_call method_call = new getScan_call(inventoryItemId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 865
      this.___currentMethod = method_call;
866
      ___manager.call(method_call);
867
    }
868
 
4496 mandeep.dh 869
    public static class getScan_call extends org.apache.thrift.async.TAsyncMethodCall {
870
      private long inventoryItemId;
871
      public getScan_call(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<getScan_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
872
        super(client, protocolFactory, transport, resultHandler, false);
873
        this.inventoryItemId = inventoryItemId;
874
      }
875
 
876
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
877
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getScan", org.apache.thrift.protocol.TMessageType.CALL, 0));
878
        getScan_args args = new getScan_args();
879
        args.setInventoryItemId(inventoryItemId);
880
        args.write(prot);
881
        prot.writeMessageEnd();
882
      }
883
 
884
      public List<Scan> getResult() throws org.apache.thrift.TException {
885
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
886
          throw new IllegalStateException("Method call not finished!");
887
        }
888
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
889
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
890
        return (new Client(prot)).recv_getScan();
891
      }
892
    }
893
 
5110 mandeep.dh 894
    public void scanSerializedItem(InventoryItem inventoryItem, ScanType type, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<scanSerializedItem_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 895
      checkReady();
5110 mandeep.dh 896
      scanSerializedItem_call method_call = new scanSerializedItem_call(inventoryItem, type, warehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 897
      this.___currentMethod = method_call;
898
      ___manager.call(method_call);
899
    }
900
 
901
    public static class scanSerializedItem_call extends org.apache.thrift.async.TAsyncMethodCall {
5110 mandeep.dh 902
      private InventoryItem inventoryItem;
3430 rajveer 903
      private ScanType type;
4496 mandeep.dh 904
      private long warehouseId;
5110 mandeep.dh 905
      public scanSerializedItem_call(InventoryItem inventoryItem, ScanType type, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<scanSerializedItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
3430 rajveer 906
        super(client, protocolFactory, transport, resultHandler, false);
5110 mandeep.dh 907
        this.inventoryItem = inventoryItem;
3430 rajveer 908
        this.type = type;
4496 mandeep.dh 909
        this.warehouseId = warehouseId;
3430 rajveer 910
      }
911
 
912
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 913
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanSerializedItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
914
        scanSerializedItem_args args = new scanSerializedItem_args();
5110 mandeep.dh 915
        args.setInventoryItem(inventoryItem);
3430 rajveer 916
        args.setType(type);
4496 mandeep.dh 917
        args.setWarehouseId(warehouseId);
3430 rajveer 918
        args.write(prot);
919
        prot.writeMessageEnd();
920
      }
921
 
922
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
923
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
924
          throw new IllegalStateException("Method call not finished!");
925
        }
926
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
927
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 928
        (new Client(prot)).recv_scanSerializedItem();
3430 rajveer 929
      }
930
    }
931
 
4496 mandeep.dh 932
    public void scan(long inventoryItemId, ScanType type, long quantity, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<scan_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 933
      checkReady();
4496 mandeep.dh 934
      scan_call method_call = new scan_call(inventoryItemId, type, quantity, warehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 935
      this.___currentMethod = method_call;
936
      ___manager.call(method_call);
937
    }
938
 
4496 mandeep.dh 939
    public static class scan_call extends org.apache.thrift.async.TAsyncMethodCall {
940
      private long inventoryItemId;
3430 rajveer 941
      private ScanType type;
4496 mandeep.dh 942
      private long quantity;
943
      private long warehouseId;
944
      public scan_call(long inventoryItemId, ScanType type, long quantity, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<scan_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
3430 rajveer 945
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 946
        this.inventoryItemId = inventoryItemId;
3430 rajveer 947
        this.type = type;
4496 mandeep.dh 948
        this.quantity = quantity;
949
        this.warehouseId = warehouseId;
3430 rajveer 950
      }
951
 
952
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 953
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scan", org.apache.thrift.protocol.TMessageType.CALL, 0));
954
        scan_args args = new scan_args();
955
        args.setInventoryItemId(inventoryItemId);
3430 rajveer 956
        args.setType(type);
4496 mandeep.dh 957
        args.setQuantity(quantity);
958
        args.setWarehouseId(warehouseId);
3430 rajveer 959
        args.write(prot);
960
        prot.writeMessageEnd();
961
      }
962
 
963
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
964
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
965
          throw new IllegalStateException("Method call not finished!");
966
        }
967
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
968
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 969
        (new Client(prot)).recv_scan();
3430 rajveer 970
      }
971
    }
972
 
5110 mandeep.dh 973
    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 974
      checkReady();
5110 mandeep.dh 975
      scanSerializedItemForOrder_call method_call = new scanSerializedItemForOrder_call(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 976
      this.___currentMethod = method_call;
977
      ___manager.call(method_call);
978
    }
979
 
980
    public static class scanSerializedItemForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
4555 mandeep.dh 981
      private String serialNumber;
4496 mandeep.dh 982
      private ScanType type;
983
      private long orderId;
5110 mandeep.dh 984
      private long fulfilmentWarehouseId;
985
      private double quantity;
986
      private long billingWarehouseId;
987
      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 988
        super(client, protocolFactory, transport, resultHandler, false);
4555 mandeep.dh 989
        this.serialNumber = serialNumber;
4496 mandeep.dh 990
        this.type = type;
991
        this.orderId = orderId;
5110 mandeep.dh 992
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
993
        this.quantity = quantity;
994
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 995
      }
996
 
997
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
998
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanSerializedItemForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
999
        scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 1000
        args.setSerialNumber(serialNumber);
4496 mandeep.dh 1001
        args.setType(type);
1002
        args.setOrderId(orderId);
5110 mandeep.dh 1003
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
1004
        args.setQuantity(quantity);
1005
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 1006
        args.write(prot);
1007
        prot.writeMessageEnd();
1008
      }
1009
 
4555 mandeep.dh 1010
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 1011
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1012
          throw new IllegalStateException("Method call not finished!");
1013
        }
1014
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1015
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1016
        return (new Client(prot)).recv_scanSerializedItemForOrder();
1017
      }
1018
    }
1019
 
5110 mandeep.dh 1020
    public void scanForOrder(long inventoryItemId, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, org.apache.thrift.async.AsyncMethodCallback<scanForOrder_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 1021
      checkReady();
5110 mandeep.dh 1022
      scanForOrder_call method_call = new scanForOrder_call(inventoryItemId, type, quantity, orderId, fulfilmentWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 1023
      this.___currentMethod = method_call;
1024
      ___manager.call(method_call);
1025
    }
1026
 
1027
    public static class scanForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1028
      private long inventoryItemId;
1029
      private ScanType type;
1030
      private long quantity;
1031
      private long orderId;
5110 mandeep.dh 1032
      private long fulfilmentWarehouseId;
1033
      public scanForOrder_call(long inventoryItemId, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, 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 1034
        super(client, protocolFactory, transport, resultHandler, false);
1035
        this.inventoryItemId = inventoryItemId;
1036
        this.type = type;
1037
        this.quantity = quantity;
1038
        this.orderId = orderId;
5110 mandeep.dh 1039
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
4496 mandeep.dh 1040
      }
1041
 
1042
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1043
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1044
        scanForOrder_args args = new scanForOrder_args();
1045
        args.setInventoryItemId(inventoryItemId);
1046
        args.setType(type);
1047
        args.setQuantity(quantity);
1048
        args.setOrderId(orderId);
5110 mandeep.dh 1049
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
4496 mandeep.dh 1050
        args.write(prot);
1051
        prot.writeMessageEnd();
1052
      }
1053
 
1054
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1055
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1056
          throw new IllegalStateException("Method call not finished!");
1057
        }
1058
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1059
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1060
        (new Client(prot)).recv_scanForOrder();
1061
      }
1062
    }
1063
 
1064
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException {
1065
      checkReady();
1066
      createItemNumberMapping_call method_call = new createItemNumberMapping_call(itemNumber, itemId, resultHandler, this, ___protocolFactory, ___transport);
1067
      this.___currentMethod = method_call;
1068
      ___manager.call(method_call);
1069
    }
1070
 
1071
    public static class createItemNumberMapping_call extends org.apache.thrift.async.TAsyncMethodCall {
1072
      private String itemNumber;
1073
      private long itemId;
1074
      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 {
1075
        super(client, protocolFactory, transport, resultHandler, false);
1076
        this.itemNumber = itemNumber;
1077
        this.itemId = itemId;
1078
      }
1079
 
1080
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1081
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createItemNumberMapping", org.apache.thrift.protocol.TMessageType.CALL, 0));
1082
        createItemNumberMapping_args args = new createItemNumberMapping_args();
1083
        args.setItemNumber(itemNumber);
1084
        args.setItemId(itemId);
1085
        args.write(prot);
1086
        prot.writeMessageEnd();
1087
      }
1088
 
1089
      public void getResult() throws org.apache.thrift.TException {
1090
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1091
          throw new IllegalStateException("Method call not finished!");
1092
        }
1093
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1094
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1095
        (new Client(prot)).recv_createItemNumberMapping();
1096
      }
1097
    }
1098
 
4622 amit.gupta 1099
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<getItemNumbers_call> resultHandler) throws org.apache.thrift.TException {
1100
      checkReady();
1101
      getItemNumbers_call method_call = new getItemNumbers_call(itemId, resultHandler, this, ___protocolFactory, ___transport);
1102
      this.___currentMethod = method_call;
1103
      ___manager.call(method_call);
1104
    }
1105
 
1106
    public static class getItemNumbers_call extends org.apache.thrift.async.TAsyncMethodCall {
1107
      private long itemId;
1108
      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 {
1109
        super(client, protocolFactory, transport, resultHandler, false);
1110
        this.itemId = itemId;
1111
      }
1112
 
1113
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1114
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemNumbers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1115
        getItemNumbers_args args = new getItemNumbers_args();
1116
        args.setItemId(itemId);
1117
        args.write(prot);
1118
        prot.writeMessageEnd();
1119
      }
1120
 
1121
      public List<String> getResult() throws org.apache.thrift.TException {
1122
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1123
          throw new IllegalStateException("Method call not finished!");
1124
        }
1125
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1126
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1127
        return (new Client(prot)).recv_getItemNumbers();
1128
      }
1129
    }
1130
 
5110 mandeep.dh 1131
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<getItemIds_call> resultHandler) throws org.apache.thrift.TException {
1132
      checkReady();
1133
      getItemIds_call method_call = new getItemIds_call(itemNumber, resultHandler, this, ___protocolFactory, ___transport);
1134
      this.___currentMethod = method_call;
1135
      ___manager.call(method_call);
1136
    }
1137
 
1138
    public static class getItemIds_call extends org.apache.thrift.async.TAsyncMethodCall {
1139
      private String itemNumber;
1140
      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 {
1141
        super(client, protocolFactory, transport, resultHandler, false);
1142
        this.itemNumber = itemNumber;
1143
      }
1144
 
1145
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1146
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemIds", org.apache.thrift.protocol.TMessageType.CALL, 0));
1147
        getItemIds_args args = new getItemIds_args();
1148
        args.setItemNumber(itemNumber);
1149
        args.write(prot);
1150
        prot.writeMessageEnd();
1151
      }
1152
 
1153
      public List<Long> getResult() throws org.apache.thrift.TException {
1154
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1155
          throw new IllegalStateException("Method call not finished!");
1156
        }
1157
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1158
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1159
        return (new Client(prot)).recv_getItemIds();
1160
      }
1161
    }
1162
 
3430 rajveer 1163
  }
1164
 
1165
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1166
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1167
    public Processor(I iface) {
1168
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
1169
    }
1170
 
1171
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1172
      super(iface, getProcessMap(processMap));
1173
    }
1174
 
1175
    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 1176
      processMap.put("createSerializedInventoryItem", new createSerializedInventoryItem());
1177
      processMap.put("createSerializedInventoryItemFromItemNumber", new createSerializedInventoryItemFromItemNumber());
1178
      processMap.put("createInventoryItem", new createInventoryItem());
1179
      processMap.put("getInventoryItem", new getInventoryItem());
1180
      processMap.put("getNonSeralizedInventoryItems", new getNonSeralizedInventoryItems());
1181
      processMap.put("getInventoryItems", new getInventoryItems());
1182
      processMap.put("getScanForOrder", new getScanForOrder());
1183
      processMap.put("getScan", new getScan());
1184
      processMap.put("scanSerializedItem", new scanSerializedItem());
1185
      processMap.put("scan", new scan());
1186
      processMap.put("scanSerializedItemForOrder", new scanSerializedItemForOrder());
1187
      processMap.put("scanForOrder", new scanForOrder());
1188
      processMap.put("createItemNumberMapping", new createItemNumberMapping());
4622 amit.gupta 1189
      processMap.put("getItemNumbers", new getItemNumbers());
5110 mandeep.dh 1190
      processMap.put("getItemIds", new getItemIds());
3430 rajveer 1191
      return processMap;
1192
    }
1193
 
4496 mandeep.dh 1194
    private static class createSerializedInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createSerializedInventoryItem_args> {
1195
      public createSerializedInventoryItem() {
1196
        super("createSerializedInventoryItem");
3430 rajveer 1197
      }
1198
 
4496 mandeep.dh 1199
      protected createSerializedInventoryItem_args getEmptyArgsInstance() {
1200
        return new createSerializedInventoryItem_args();
3430 rajveer 1201
      }
1202
 
4496 mandeep.dh 1203
      protected createSerializedInventoryItem_result getResult(I iface, createSerializedInventoryItem_args args) throws org.apache.thrift.TException {
1204
        createSerializedInventoryItem_result result = new createSerializedInventoryItem_result();
2820 chandransh 1205
        try {
4846 mandeep.dh 1206
          result.success = iface.createSerializedInventoryItem(args.itemId, args.itemNumber, args.serialNumber, args.purchaseId);
2820 chandransh 1207
        } catch (WarehouseServiceException wex) {
1208
          result.wex = wex;
1209
        }
3430 rajveer 1210
        return result;
2820 chandransh 1211
      }
1212
    }
1213
 
4496 mandeep.dh 1214
    private static class createSerializedInventoryItemFromItemNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createSerializedInventoryItemFromItemNumber_args> {
1215
      public createSerializedInventoryItemFromItemNumber() {
1216
        super("createSerializedInventoryItemFromItemNumber");
3430 rajveer 1217
      }
1218
 
4496 mandeep.dh 1219
      protected createSerializedInventoryItemFromItemNumber_args getEmptyArgsInstance() {
1220
        return new createSerializedInventoryItemFromItemNumber_args();
3430 rajveer 1221
      }
1222
 
4496 mandeep.dh 1223
      protected createSerializedInventoryItemFromItemNumber_result getResult(I iface, createSerializedInventoryItemFromItemNumber_args args) throws org.apache.thrift.TException {
1224
        createSerializedInventoryItemFromItemNumber_result result = new createSerializedInventoryItemFromItemNumber_result();
2820 chandransh 1225
        try {
4496 mandeep.dh 1226
          result.success = iface.createSerializedInventoryItemFromItemNumber(args.itemNumber, args.serialNumber, args.purchaseId);
2820 chandransh 1227
        } catch (WarehouseServiceException wex) {
1228
          result.wex = wex;
1229
        }
3430 rajveer 1230
        return result;
2820 chandransh 1231
      }
1232
    }
1233
 
4496 mandeep.dh 1234
    private static class createInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInventoryItem_args> {
1235
      public createInventoryItem() {
1236
        super("createInventoryItem");
3430 rajveer 1237
      }
1238
 
4496 mandeep.dh 1239
      protected createInventoryItem_args getEmptyArgsInstance() {
1240
        return new createInventoryItem_args();
3430 rajveer 1241
      }
1242
 
4496 mandeep.dh 1243
      protected createInventoryItem_result getResult(I iface, createInventoryItem_args args) throws org.apache.thrift.TException {
1244
        createInventoryItem_result result = new createInventoryItem_result();
3383 chandransh 1245
        try {
4496 mandeep.dh 1246
          result.success = iface.createInventoryItem(args.itemId, args.quantity, args.purchaseId);
3383 chandransh 1247
        } catch (WarehouseServiceException wex) {
1248
          result.wex = wex;
1249
        }
3430 rajveer 1250
        return result;
3383 chandransh 1251
      }
1252
    }
1253
 
4496 mandeep.dh 1254
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
1255
      public getInventoryItem() {
1256
        super("getInventoryItem");
3430 rajveer 1257
      }
1258
 
4496 mandeep.dh 1259
      protected getInventoryItem_args getEmptyArgsInstance() {
1260
        return new getInventoryItem_args();
3430 rajveer 1261
      }
1262
 
4496 mandeep.dh 1263
      protected getInventoryItem_result getResult(I iface, getInventoryItem_args args) throws org.apache.thrift.TException {
1264
        getInventoryItem_result result = new getInventoryItem_result();
4541 mandeep.dh 1265
        try {
1266
          result.success = iface.getInventoryItem(args.serialNumber);
1267
        } catch (WarehouseServiceException wex) {
1268
          result.wex = wex;
1269
        }
3430 rajveer 1270
        return result;
2832 chandransh 1271
      }
1272
    }
1273
 
4496 mandeep.dh 1274
    private static class getNonSeralizedInventoryItems<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getNonSeralizedInventoryItems_args> {
1275
      public getNonSeralizedInventoryItems() {
1276
        super("getNonSeralizedInventoryItems");
3430 rajveer 1277
      }
1278
 
4496 mandeep.dh 1279
      protected getNonSeralizedInventoryItems_args getEmptyArgsInstance() {
1280
        return new getNonSeralizedInventoryItems_args();
3430 rajveer 1281
      }
1282
 
4496 mandeep.dh 1283
      protected getNonSeralizedInventoryItems_result getResult(I iface, getNonSeralizedInventoryItems_args args) throws org.apache.thrift.TException {
1284
        getNonSeralizedInventoryItems_result result = new getNonSeralizedInventoryItems_result();
1285
        result.success = iface.getNonSeralizedInventoryItems(args.itemId, args.quantity, args.supplierId);
3430 rajveer 1286
        return result;
2820 chandransh 1287
      }
1288
    }
1289
 
4496 mandeep.dh 1290
    private static class getInventoryItems<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItems_args> {
1291
      public getInventoryItems() {
1292
        super("getInventoryItems");
3430 rajveer 1293
      }
1294
 
4496 mandeep.dh 1295
      protected getInventoryItems_args getEmptyArgsInstance() {
1296
        return new getInventoryItems_args();
3430 rajveer 1297
      }
1298
 
4496 mandeep.dh 1299
      protected getInventoryItems_result getResult(I iface, getInventoryItems_args args) throws org.apache.thrift.TException {
1300
        getInventoryItems_result result = new getInventoryItems_result();
1301
        result.success = iface.getInventoryItems(args.itemId);
1302
        return result;
1303
      }
1304
    }
1305
 
1306
    private static class getScanForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getScanForOrder_args> {
1307
      public getScanForOrder() {
1308
        super("getScanForOrder");
1309
      }
1310
 
1311
      protected getScanForOrder_args getEmptyArgsInstance() {
1312
        return new getScanForOrder_args();
1313
      }
1314
 
1315
      protected getScanForOrder_result getResult(I iface, getScanForOrder_args args) throws org.apache.thrift.TException {
1316
        getScanForOrder_result result = new getScanForOrder_result();
1317
        result.success = iface.getScanForOrder(args.orderId);
1318
        return result;
1319
      }
1320
    }
1321
 
1322
    private static class getScan<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getScan_args> {
1323
      public getScan() {
1324
        super("getScan");
1325
      }
1326
 
1327
      protected getScan_args getEmptyArgsInstance() {
1328
        return new getScan_args();
1329
      }
1330
 
1331
      protected getScan_result getResult(I iface, getScan_args args) throws org.apache.thrift.TException {
1332
        getScan_result result = new getScan_result();
1333
        result.success = iface.getScan(args.inventoryItemId);
1334
        return result;
1335
      }
1336
    }
1337
 
1338
    private static class scanSerializedItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanSerializedItem_args> {
1339
      public scanSerializedItem() {
1340
        super("scanSerializedItem");
1341
      }
1342
 
1343
      protected scanSerializedItem_args getEmptyArgsInstance() {
1344
        return new scanSerializedItem_args();
1345
      }
1346
 
1347
      protected scanSerializedItem_result getResult(I iface, scanSerializedItem_args args) throws org.apache.thrift.TException {
1348
        scanSerializedItem_result result = new scanSerializedItem_result();
2820 chandransh 1349
        try {
5110 mandeep.dh 1350
          iface.scanSerializedItem(args.inventoryItem, args.type, args.warehouseId);
2820 chandransh 1351
        } catch (WarehouseServiceException wex) {
1352
          result.wex = wex;
1353
        }
3430 rajveer 1354
        return result;
2820 chandransh 1355
      }
1356
    }
1357
 
4496 mandeep.dh 1358
    private static class scan<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scan_args> {
1359
      public scan() {
1360
        super("scan");
3430 rajveer 1361
      }
1362
 
4496 mandeep.dh 1363
      protected scan_args getEmptyArgsInstance() {
1364
        return new scan_args();
3430 rajveer 1365
      }
1366
 
4496 mandeep.dh 1367
      protected scan_result getResult(I iface, scan_args args) throws org.apache.thrift.TException {
1368
        scan_result result = new scan_result();
3383 chandransh 1369
        try {
4496 mandeep.dh 1370
          iface.scan(args.inventoryItemId, args.type, args.quantity, args.warehouseId);
3383 chandransh 1371
        } catch (WarehouseServiceException wex) {
1372
          result.wex = wex;
1373
        }
3430 rajveer 1374
        return result;
3383 chandransh 1375
      }
1376
    }
1377
 
4496 mandeep.dh 1378
    private static class scanSerializedItemForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanSerializedItemForOrder_args> {
1379
      public scanSerializedItemForOrder() {
1380
        super("scanSerializedItemForOrder");
3430 rajveer 1381
      }
1382
 
4496 mandeep.dh 1383
      protected scanSerializedItemForOrder_args getEmptyArgsInstance() {
1384
        return new scanSerializedItemForOrder_args();
3430 rajveer 1385
      }
1386
 
4496 mandeep.dh 1387
      protected scanSerializedItemForOrder_result getResult(I iface, scanSerializedItemForOrder_args args) throws org.apache.thrift.TException {
1388
        scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
2820 chandransh 1389
        try {
5110 mandeep.dh 1390
          result.success = iface.scanSerializedItemForOrder(args.serialNumber, args.type, args.orderId, args.fulfilmentWarehouseId, args.quantity, args.billingWarehouseId);
2820 chandransh 1391
        } catch (WarehouseServiceException wex) {
1392
          result.wex = wex;
1393
        }
3430 rajveer 1394
        return result;
2820 chandransh 1395
      }
1396
    }
1397
 
4496 mandeep.dh 1398
    private static class scanForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForOrder_args> {
1399
      public scanForOrder() {
1400
        super("scanForOrder");
3430 rajveer 1401
      }
1402
 
4496 mandeep.dh 1403
      protected scanForOrder_args getEmptyArgsInstance() {
1404
        return new scanForOrder_args();
3430 rajveer 1405
      }
1406
 
4496 mandeep.dh 1407
      protected scanForOrder_result getResult(I iface, scanForOrder_args args) throws org.apache.thrift.TException {
1408
        scanForOrder_result result = new scanForOrder_result();
2820 chandransh 1409
        try {
5110 mandeep.dh 1410
          iface.scanForOrder(args.inventoryItemId, args.type, args.quantity, args.orderId, args.fulfilmentWarehouseId);
2820 chandransh 1411
        } catch (WarehouseServiceException wex) {
1412
          result.wex = wex;
1413
        }
3430 rajveer 1414
        return result;
2820 chandransh 1415
      }
1416
    }
1417
 
4496 mandeep.dh 1418
    private static class createItemNumberMapping<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createItemNumberMapping_args> {
1419
      public createItemNumberMapping() {
1420
        super("createItemNumberMapping");
1421
      }
1422
 
1423
      protected createItemNumberMapping_args getEmptyArgsInstance() {
1424
        return new createItemNumberMapping_args();
1425
      }
1426
 
1427
      protected createItemNumberMapping_result getResult(I iface, createItemNumberMapping_args args) throws org.apache.thrift.TException {
1428
        createItemNumberMapping_result result = new createItemNumberMapping_result();
1429
        iface.createItemNumberMapping(args.itemNumber, args.itemId);
1430
        return result;
1431
      }
1432
    }
1433
 
4622 amit.gupta 1434
    private static class getItemNumbers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemNumbers_args> {
1435
      public getItemNumbers() {
1436
        super("getItemNumbers");
1437
      }
1438
 
1439
      protected getItemNumbers_args getEmptyArgsInstance() {
1440
        return new getItemNumbers_args();
1441
      }
1442
 
1443
      protected getItemNumbers_result getResult(I iface, getItemNumbers_args args) throws org.apache.thrift.TException {
1444
        getItemNumbers_result result = new getItemNumbers_result();
1445
        result.success = iface.getItemNumbers(args.itemId);
1446
        return result;
1447
      }
1448
    }
1449
 
5110 mandeep.dh 1450
    private static class getItemIds<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemIds_args> {
1451
      public getItemIds() {
1452
        super("getItemIds");
1453
      }
1454
 
1455
      protected getItemIds_args getEmptyArgsInstance() {
1456
        return new getItemIds_args();
1457
      }
1458
 
1459
      protected getItemIds_result getResult(I iface, getItemIds_args args) throws org.apache.thrift.TException {
1460
        getItemIds_result result = new getItemIds_result();
1461
        result.success = iface.getItemIds(args.itemNumber);
1462
        return result;
1463
      }
1464
    }
1465
 
2820 chandransh 1466
  }
1467
 
4496 mandeep.dh 1468
  public static class createSerializedInventoryItem_args implements org.apache.thrift.TBase<createSerializedInventoryItem_args, createSerializedInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
1469
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItem_args");
2820 chandransh 1470
 
4496 mandeep.dh 1471
    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);
4846 mandeep.dh 1472
    private static final org.apache.thrift.protocol.TField ITEM_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("itemNumber", org.apache.thrift.protocol.TType.STRING, (short)2);
1473
    private static final org.apache.thrift.protocol.TField SERIAL_NUMBER_FIELD_DESC = new org.apache.thrift.protocol.TField("serialNumber", org.apache.thrift.protocol.TType.STRING, (short)3);
1474
    private static final org.apache.thrift.protocol.TField PURCHASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseId", org.apache.thrift.protocol.TType.I64, (short)4);
2820 chandransh 1475
 
4496 mandeep.dh 1476
    private long itemId; // required
4846 mandeep.dh 1477
    private String itemNumber; // required
4496 mandeep.dh 1478
    private String serialNumber; // required
1479
    private long purchaseId; // required
2820 chandransh 1480
 
1481
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 1482
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 1483
      ITEM_ID((short)1, "itemId"),
4846 mandeep.dh 1484
      ITEM_NUMBER((short)2, "itemNumber"),
1485
      SERIAL_NUMBER((short)3, "serialNumber"),
1486
      PURCHASE_ID((short)4, "purchaseId");
2820 chandransh 1487
 
1488
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1489
 
1490
      static {
1491
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1492
          byName.put(field.getFieldName(), field);
1493
        }
1494
      }
1495
 
1496
      /**
1497
       * Find the _Fields constant that matches fieldId, or null if its not found.
1498
       */
1499
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 1500
        switch(fieldId) {
4496 mandeep.dh 1501
          case 1: // ITEM_ID
1502
            return ITEM_ID;
4846 mandeep.dh 1503
          case 2: // ITEM_NUMBER
1504
            return ITEM_NUMBER;
1505
          case 3: // SERIAL_NUMBER
4496 mandeep.dh 1506
            return SERIAL_NUMBER;
4846 mandeep.dh 1507
          case 4: // PURCHASE_ID
4496 mandeep.dh 1508
            return PURCHASE_ID;
3430 rajveer 1509
          default:
1510
            return null;
1511
        }
2820 chandransh 1512
      }
1513
 
1514
      /**
1515
       * Find the _Fields constant that matches fieldId, throwing an exception
1516
       * if it is not found.
1517
       */
1518
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1519
        _Fields fields = findByThriftId(fieldId);
1520
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1521
        return fields;
1522
      }
1523
 
1524
      /**
1525
       * Find the _Fields constant that matches name, or null if its not found.
1526
       */
1527
      public static _Fields findByName(String name) {
1528
        return byName.get(name);
1529
      }
1530
 
1531
      private final short _thriftId;
1532
      private final String _fieldName;
1533
 
1534
      _Fields(short thriftId, String fieldName) {
1535
        _thriftId = thriftId;
1536
        _fieldName = fieldName;
1537
      }
1538
 
1539
      public short getThriftFieldId() {
1540
        return _thriftId;
1541
      }
1542
 
1543
      public String getFieldName() {
1544
        return _fieldName;
1545
      }
1546
    }
1547
 
1548
    // isset id assignments
4496 mandeep.dh 1549
    private static final int __ITEMID_ISSET_ID = 0;
1550
    private static final int __PURCHASEID_ISSET_ID = 1;
1551
    private BitSet __isset_bit_vector = new BitSet(2);
2820 chandransh 1552
 
3430 rajveer 1553
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 1554
    static {
3430 rajveer 1555
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 1556
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1557
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4846 mandeep.dh 1558
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1559
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4496 mandeep.dh 1560
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1561
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
1562
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1563
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 1564
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 1565
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSerializedInventoryItem_args.class, metaDataMap);
2820 chandransh 1566
    }
1567
 
4496 mandeep.dh 1568
    public createSerializedInventoryItem_args() {
2820 chandransh 1569
    }
1570
 
4496 mandeep.dh 1571
    public createSerializedInventoryItem_args(
1572
      long itemId,
4846 mandeep.dh 1573
      String itemNumber,
4496 mandeep.dh 1574
      String serialNumber,
1575
      long purchaseId)
2820 chandransh 1576
    {
1577
      this();
4496 mandeep.dh 1578
      this.itemId = itemId;
1579
      setItemIdIsSet(true);
4846 mandeep.dh 1580
      this.itemNumber = itemNumber;
4496 mandeep.dh 1581
      this.serialNumber = serialNumber;
1582
      this.purchaseId = purchaseId;
1583
      setPurchaseIdIsSet(true);
2820 chandransh 1584
    }
1585
 
1586
    /**
1587
     * Performs a deep copy on <i>other</i>.
1588
     */
4496 mandeep.dh 1589
    public createSerializedInventoryItem_args(createSerializedInventoryItem_args other) {
1590
      __isset_bit_vector.clear();
1591
      __isset_bit_vector.or(other.__isset_bit_vector);
1592
      this.itemId = other.itemId;
4846 mandeep.dh 1593
      if (other.isSetItemNumber()) {
1594
        this.itemNumber = other.itemNumber;
1595
      }
4496 mandeep.dh 1596
      if (other.isSetSerialNumber()) {
1597
        this.serialNumber = other.serialNumber;
2820 chandransh 1598
      }
4496 mandeep.dh 1599
      this.purchaseId = other.purchaseId;
2820 chandransh 1600
    }
1601
 
4496 mandeep.dh 1602
    public createSerializedInventoryItem_args deepCopy() {
1603
      return new createSerializedInventoryItem_args(this);
2820 chandransh 1604
    }
1605
 
3430 rajveer 1606
    @Override
1607
    public void clear() {
4496 mandeep.dh 1608
      setItemIdIsSet(false);
1609
      this.itemId = 0;
4846 mandeep.dh 1610
      this.itemNumber = null;
4496 mandeep.dh 1611
      this.serialNumber = null;
1612
      setPurchaseIdIsSet(false);
1613
      this.purchaseId = 0;
2820 chandransh 1614
    }
1615
 
4496 mandeep.dh 1616
    public long getItemId() {
1617
      return this.itemId;
2820 chandransh 1618
    }
1619
 
4496 mandeep.dh 1620
    public void setItemId(long itemId) {
1621
      this.itemId = itemId;
1622
      setItemIdIsSet(true);
2820 chandransh 1623
    }
1624
 
4496 mandeep.dh 1625
    public void unsetItemId() {
1626
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
2820 chandransh 1627
    }
1628
 
4496 mandeep.dh 1629
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
1630
    public boolean isSetItemId() {
1631
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
2820 chandransh 1632
    }
1633
 
4496 mandeep.dh 1634
    public void setItemIdIsSet(boolean value) {
1635
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
1636
    }
1637
 
4846 mandeep.dh 1638
    public String getItemNumber() {
1639
      return this.itemNumber;
1640
    }
1641
 
1642
    public void setItemNumber(String itemNumber) {
1643
      this.itemNumber = itemNumber;
1644
    }
1645
 
1646
    public void unsetItemNumber() {
1647
      this.itemNumber = null;
1648
    }
1649
 
1650
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
1651
    public boolean isSetItemNumber() {
1652
      return this.itemNumber != null;
1653
    }
1654
 
1655
    public void setItemNumberIsSet(boolean value) {
1656
      if (!value) {
1657
        this.itemNumber = null;
1658
      }
1659
    }
1660
 
4496 mandeep.dh 1661
    public String getSerialNumber() {
1662
      return this.serialNumber;
1663
    }
1664
 
1665
    public void setSerialNumber(String serialNumber) {
1666
      this.serialNumber = serialNumber;
1667
    }
1668
 
1669
    public void unsetSerialNumber() {
1670
      this.serialNumber = null;
1671
    }
1672
 
1673
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
1674
    public boolean isSetSerialNumber() {
1675
      return this.serialNumber != null;
1676
    }
1677
 
1678
    public void setSerialNumberIsSet(boolean value) {
2820 chandransh 1679
      if (!value) {
4496 mandeep.dh 1680
        this.serialNumber = null;
2820 chandransh 1681
      }
1682
    }
1683
 
4496 mandeep.dh 1684
    public long getPurchaseId() {
1685
      return this.purchaseId;
1686
    }
1687
 
1688
    public void setPurchaseId(long purchaseId) {
1689
      this.purchaseId = purchaseId;
1690
      setPurchaseIdIsSet(true);
1691
    }
1692
 
1693
    public void unsetPurchaseId() {
1694
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
1695
    }
1696
 
1697
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
1698
    public boolean isSetPurchaseId() {
1699
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
1700
    }
1701
 
1702
    public void setPurchaseIdIsSet(boolean value) {
1703
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
1704
    }
1705
 
2820 chandransh 1706
    public void setFieldValue(_Fields field, Object value) {
1707
      switch (field) {
4496 mandeep.dh 1708
      case ITEM_ID:
2820 chandransh 1709
        if (value == null) {
4496 mandeep.dh 1710
          unsetItemId();
2820 chandransh 1711
        } else {
4496 mandeep.dh 1712
          setItemId((Long)value);
2820 chandransh 1713
        }
1714
        break;
1715
 
4846 mandeep.dh 1716
      case ITEM_NUMBER:
1717
        if (value == null) {
1718
          unsetItemNumber();
1719
        } else {
1720
          setItemNumber((String)value);
1721
        }
1722
        break;
1723
 
4496 mandeep.dh 1724
      case SERIAL_NUMBER:
1725
        if (value == null) {
1726
          unsetSerialNumber();
1727
        } else {
1728
          setSerialNumber((String)value);
1729
        }
1730
        break;
1731
 
1732
      case PURCHASE_ID:
1733
        if (value == null) {
1734
          unsetPurchaseId();
1735
        } else {
1736
          setPurchaseId((Long)value);
1737
        }
1738
        break;
1739
 
2820 chandransh 1740
      }
1741
    }
1742
 
1743
    public Object getFieldValue(_Fields field) {
1744
      switch (field) {
4496 mandeep.dh 1745
      case ITEM_ID:
1746
        return Long.valueOf(getItemId());
2820 chandransh 1747
 
4846 mandeep.dh 1748
      case ITEM_NUMBER:
1749
        return getItemNumber();
1750
 
4496 mandeep.dh 1751
      case SERIAL_NUMBER:
1752
        return getSerialNumber();
1753
 
1754
      case PURCHASE_ID:
1755
        return Long.valueOf(getPurchaseId());
1756
 
2820 chandransh 1757
      }
1758
      throw new IllegalStateException();
1759
    }
1760
 
3430 rajveer 1761
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1762
    public boolean isSet(_Fields field) {
1763
      if (field == null) {
1764
        throw new IllegalArgumentException();
1765
      }
2820 chandransh 1766
 
1767
      switch (field) {
4496 mandeep.dh 1768
      case ITEM_ID:
1769
        return isSetItemId();
4846 mandeep.dh 1770
      case ITEM_NUMBER:
1771
        return isSetItemNumber();
4496 mandeep.dh 1772
      case SERIAL_NUMBER:
1773
        return isSetSerialNumber();
1774
      case PURCHASE_ID:
1775
        return isSetPurchaseId();
2820 chandransh 1776
      }
1777
      throw new IllegalStateException();
1778
    }
1779
 
1780
    @Override
1781
    public boolean equals(Object that) {
1782
      if (that == null)
1783
        return false;
4496 mandeep.dh 1784
      if (that instanceof createSerializedInventoryItem_args)
1785
        return this.equals((createSerializedInventoryItem_args)that);
2820 chandransh 1786
      return false;
1787
    }
1788
 
4496 mandeep.dh 1789
    public boolean equals(createSerializedInventoryItem_args that) {
2820 chandransh 1790
      if (that == null)
1791
        return false;
1792
 
4496 mandeep.dh 1793
      boolean this_present_itemId = true;
1794
      boolean that_present_itemId = true;
1795
      if (this_present_itemId || that_present_itemId) {
1796
        if (!(this_present_itemId && that_present_itemId))
2820 chandransh 1797
          return false;
4496 mandeep.dh 1798
        if (this.itemId != that.itemId)
2820 chandransh 1799
          return false;
1800
      }
1801
 
4846 mandeep.dh 1802
      boolean this_present_itemNumber = true && this.isSetItemNumber();
1803
      boolean that_present_itemNumber = true && that.isSetItemNumber();
1804
      if (this_present_itemNumber || that_present_itemNumber) {
1805
        if (!(this_present_itemNumber && that_present_itemNumber))
1806
          return false;
1807
        if (!this.itemNumber.equals(that.itemNumber))
1808
          return false;
1809
      }
1810
 
4496 mandeep.dh 1811
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
1812
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
1813
      if (this_present_serialNumber || that_present_serialNumber) {
1814
        if (!(this_present_serialNumber && that_present_serialNumber))
1815
          return false;
1816
        if (!this.serialNumber.equals(that.serialNumber))
1817
          return false;
1818
      }
1819
 
1820
      boolean this_present_purchaseId = true;
1821
      boolean that_present_purchaseId = true;
1822
      if (this_present_purchaseId || that_present_purchaseId) {
1823
        if (!(this_present_purchaseId && that_present_purchaseId))
1824
          return false;
1825
        if (this.purchaseId != that.purchaseId)
1826
          return false;
1827
      }
1828
 
2820 chandransh 1829
      return true;
1830
    }
1831
 
1832
    @Override
1833
    public int hashCode() {
1834
      return 0;
1835
    }
1836
 
4496 mandeep.dh 1837
    public int compareTo(createSerializedInventoryItem_args other) {
2820 chandransh 1838
      if (!getClass().equals(other.getClass())) {
1839
        return getClass().getName().compareTo(other.getClass().getName());
1840
      }
1841
 
1842
      int lastComparison = 0;
4496 mandeep.dh 1843
      createSerializedInventoryItem_args typedOther = (createSerializedInventoryItem_args)other;
2820 chandransh 1844
 
4496 mandeep.dh 1845
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
2820 chandransh 1846
      if (lastComparison != 0) {
1847
        return lastComparison;
1848
      }
4496 mandeep.dh 1849
      if (isSetItemId()) {
1850
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
3430 rajveer 1851
        if (lastComparison != 0) {
1852
          return lastComparison;
1853
        }
2820 chandransh 1854
      }
4846 mandeep.dh 1855
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
1856
      if (lastComparison != 0) {
1857
        return lastComparison;
1858
      }
1859
      if (isSetItemNumber()) {
1860
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
1861
        if (lastComparison != 0) {
1862
          return lastComparison;
1863
        }
1864
      }
4496 mandeep.dh 1865
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
1866
      if (lastComparison != 0) {
1867
        return lastComparison;
1868
      }
1869
      if (isSetSerialNumber()) {
1870
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
1871
        if (lastComparison != 0) {
1872
          return lastComparison;
1873
        }
1874
      }
1875
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
1876
      if (lastComparison != 0) {
1877
        return lastComparison;
1878
      }
1879
      if (isSetPurchaseId()) {
1880
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
1881
        if (lastComparison != 0) {
1882
          return lastComparison;
1883
        }
1884
      }
2820 chandransh 1885
      return 0;
1886
    }
1887
 
3430 rajveer 1888
    public _Fields fieldForId(int fieldId) {
1889
      return _Fields.findByThriftId(fieldId);
1890
    }
1891
 
1892
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1893
      org.apache.thrift.protocol.TField field;
2820 chandransh 1894
      iprot.readStructBegin();
1895
      while (true)
1896
      {
1897
        field = iprot.readFieldBegin();
3430 rajveer 1898
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 1899
          break;
1900
        }
3430 rajveer 1901
        switch (field.id) {
4496 mandeep.dh 1902
          case 1: // ITEM_ID
1903
            if (field.type == org.apache.thrift.protocol.TType.I64) {
1904
              this.itemId = iprot.readI64();
1905
              setItemIdIsSet(true);
3430 rajveer 1906
            } else { 
1907
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1908
            }
1909
            break;
4846 mandeep.dh 1910
          case 2: // ITEM_NUMBER
4496 mandeep.dh 1911
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
4846 mandeep.dh 1912
              this.itemNumber = iprot.readString();
1913
            } else { 
1914
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1915
            }
1916
            break;
1917
          case 3: // SERIAL_NUMBER
1918
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
4496 mandeep.dh 1919
              this.serialNumber = iprot.readString();
1920
            } else { 
1921
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1922
            }
1923
            break;
4846 mandeep.dh 1924
          case 4: // PURCHASE_ID
4496 mandeep.dh 1925
            if (field.type == org.apache.thrift.protocol.TType.I64) {
1926
              this.purchaseId = iprot.readI64();
1927
              setPurchaseIdIsSet(true);
1928
            } else { 
1929
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1930
            }
1931
            break;
3430 rajveer 1932
          default:
1933
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 1934
        }
3430 rajveer 1935
        iprot.readFieldEnd();
2820 chandransh 1936
      }
1937
      iprot.readStructEnd();
1938
      validate();
1939
    }
1940
 
3430 rajveer 1941
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 1942
      validate();
1943
 
1944
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 1945
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
1946
      oprot.writeI64(this.itemId);
1947
      oprot.writeFieldEnd();
4846 mandeep.dh 1948
      if (this.itemNumber != null) {
1949
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
1950
        oprot.writeString(this.itemNumber);
1951
        oprot.writeFieldEnd();
1952
      }
4496 mandeep.dh 1953
      if (this.serialNumber != null) {
1954
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
1955
        oprot.writeString(this.serialNumber);
2820 chandransh 1956
        oprot.writeFieldEnd();
1957
      }
4496 mandeep.dh 1958
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
1959
      oprot.writeI64(this.purchaseId);
1960
      oprot.writeFieldEnd();
2820 chandransh 1961
      oprot.writeFieldStop();
1962
      oprot.writeStructEnd();
1963
    }
1964
 
1965
    @Override
1966
    public String toString() {
4496 mandeep.dh 1967
      StringBuilder sb = new StringBuilder("createSerializedInventoryItem_args(");
2820 chandransh 1968
      boolean first = true;
1969
 
4496 mandeep.dh 1970
      sb.append("itemId:");
1971
      sb.append(this.itemId);
1972
      first = false;
1973
      if (!first) sb.append(", ");
4846 mandeep.dh 1974
      sb.append("itemNumber:");
1975
      if (this.itemNumber == null) {
1976
        sb.append("null");
1977
      } else {
1978
        sb.append(this.itemNumber);
1979
      }
1980
      first = false;
1981
      if (!first) sb.append(", ");
4496 mandeep.dh 1982
      sb.append("serialNumber:");
1983
      if (this.serialNumber == null) {
2820 chandransh 1984
        sb.append("null");
1985
      } else {
4496 mandeep.dh 1986
        sb.append(this.serialNumber);
2820 chandransh 1987
      }
1988
      first = false;
4496 mandeep.dh 1989
      if (!first) sb.append(", ");
1990
      sb.append("purchaseId:");
1991
      sb.append(this.purchaseId);
1992
      first = false;
2820 chandransh 1993
      sb.append(")");
1994
      return sb.toString();
1995
    }
1996
 
3430 rajveer 1997
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 1998
      // check for required fields
1999
    }
2000
 
3430 rajveer 2001
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2002
      try {
2003
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2004
      } catch (org.apache.thrift.TException te) {
2005
        throw new java.io.IOException(te);
2006
      }
2007
    }
2008
 
2009
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2010
      try {
4496 mandeep.dh 2011
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
2012
        __isset_bit_vector = new BitSet(1);
3430 rajveer 2013
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2014
      } catch (org.apache.thrift.TException te) {
2015
        throw new java.io.IOException(te);
2016
      }
2017
    }
2018
 
2820 chandransh 2019
  }
2020
 
4496 mandeep.dh 2021
  public static class createSerializedInventoryItem_result implements org.apache.thrift.TBase<createSerializedInventoryItem_result, createSerializedInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
2022
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItem_result");
2820 chandransh 2023
 
4555 mandeep.dh 2024
    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 2025
    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 2026
 
4555 mandeep.dh 2027
    private InventoryItem success; // required
3430 rajveer 2028
    private WarehouseServiceException wex; // required
2820 chandransh 2029
 
2030
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2031
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2820 chandransh 2032
      SUCCESS((short)0, "success"),
2033
      WEX((short)1, "wex");
2034
 
2035
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2036
 
2037
      static {
2038
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2039
          byName.put(field.getFieldName(), field);
2040
        }
2041
      }
2042
 
2043
      /**
2044
       * Find the _Fields constant that matches fieldId, or null if its not found.
2045
       */
2046
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2047
        switch(fieldId) {
2048
          case 0: // SUCCESS
2049
            return SUCCESS;
2050
          case 1: // WEX
2051
            return WEX;
2052
          default:
2053
            return null;
2054
        }
2820 chandransh 2055
      }
2056
 
2057
      /**
2058
       * Find the _Fields constant that matches fieldId, throwing an exception
2059
       * if it is not found.
2060
       */
2061
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2062
        _Fields fields = findByThriftId(fieldId);
2063
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2064
        return fields;
2065
      }
2066
 
2067
      /**
2068
       * Find the _Fields constant that matches name, or null if its not found.
2069
       */
2070
      public static _Fields findByName(String name) {
2071
        return byName.get(name);
2072
      }
2073
 
2074
      private final short _thriftId;
2075
      private final String _fieldName;
2076
 
2077
      _Fields(short thriftId, String fieldName) {
2078
        _thriftId = thriftId;
2079
        _fieldName = fieldName;
2080
      }
2081
 
2082
      public short getThriftFieldId() {
2083
        return _thriftId;
2084
      }
2085
 
2086
      public String getFieldName() {
2087
        return _fieldName;
2088
      }
2089
    }
2090
 
2091
    // isset id assignments
2092
 
3430 rajveer 2093
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 2094
    static {
3430 rajveer 2095
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2096
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 2097
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 2098
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2099
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2100
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 2101
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSerializedInventoryItem_result.class, metaDataMap);
2820 chandransh 2102
    }
2103
 
4496 mandeep.dh 2104
    public createSerializedInventoryItem_result() {
2820 chandransh 2105
    }
2106
 
4496 mandeep.dh 2107
    public createSerializedInventoryItem_result(
4555 mandeep.dh 2108
      InventoryItem success,
2820 chandransh 2109
      WarehouseServiceException wex)
2110
    {
2111
      this();
2112
      this.success = success;
2113
      this.wex = wex;
2114
    }
2115
 
2116
    /**
2117
     * Performs a deep copy on <i>other</i>.
2118
     */
4496 mandeep.dh 2119
    public createSerializedInventoryItem_result(createSerializedInventoryItem_result other) {
4555 mandeep.dh 2120
      if (other.isSetSuccess()) {
2121
        this.success = new InventoryItem(other.success);
2122
      }
2820 chandransh 2123
      if (other.isSetWex()) {
2124
        this.wex = new WarehouseServiceException(other.wex);
2125
      }
2126
    }
2127
 
4496 mandeep.dh 2128
    public createSerializedInventoryItem_result deepCopy() {
2129
      return new createSerializedInventoryItem_result(this);
2820 chandransh 2130
    }
2131
 
3430 rajveer 2132
    @Override
2133
    public void clear() {
4555 mandeep.dh 2134
      this.success = null;
3430 rajveer 2135
      this.wex = null;
2820 chandransh 2136
    }
2137
 
4555 mandeep.dh 2138
    public InventoryItem getSuccess() {
2820 chandransh 2139
      return this.success;
2140
    }
2141
 
4555 mandeep.dh 2142
    public void setSuccess(InventoryItem success) {
2820 chandransh 2143
      this.success = success;
2144
    }
2145
 
2146
    public void unsetSuccess() {
4555 mandeep.dh 2147
      this.success = null;
2820 chandransh 2148
    }
2149
 
3430 rajveer 2150
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2820 chandransh 2151
    public boolean isSetSuccess() {
4555 mandeep.dh 2152
      return this.success != null;
2820 chandransh 2153
    }
2154
 
2155
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 2156
      if (!value) {
2157
        this.success = null;
2158
      }
2820 chandransh 2159
    }
2160
 
2161
    public WarehouseServiceException getWex() {
2162
      return this.wex;
2163
    }
2164
 
3430 rajveer 2165
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 2166
      this.wex = wex;
2167
    }
2168
 
2169
    public void unsetWex() {
2170
      this.wex = null;
2171
    }
2172
 
3430 rajveer 2173
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 2174
    public boolean isSetWex() {
2175
      return this.wex != null;
2176
    }
2177
 
2178
    public void setWexIsSet(boolean value) {
2179
      if (!value) {
2180
        this.wex = null;
2181
      }
2182
    }
2183
 
2184
    public void setFieldValue(_Fields field, Object value) {
2185
      switch (field) {
2186
      case SUCCESS:
2187
        if (value == null) {
2188
          unsetSuccess();
2189
        } else {
4555 mandeep.dh 2190
          setSuccess((InventoryItem)value);
2820 chandransh 2191
        }
2192
        break;
2193
 
2194
      case WEX:
2195
        if (value == null) {
2196
          unsetWex();
2197
        } else {
2198
          setWex((WarehouseServiceException)value);
2199
        }
2200
        break;
2201
 
2202
      }
2203
    }
2204
 
2205
    public Object getFieldValue(_Fields field) {
2206
      switch (field) {
2207
      case SUCCESS:
4555 mandeep.dh 2208
        return getSuccess();
2820 chandransh 2209
 
2210
      case WEX:
2211
        return getWex();
2212
 
2213
      }
2214
      throw new IllegalStateException();
2215
    }
2216
 
3430 rajveer 2217
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2218
    public boolean isSet(_Fields field) {
2219
      if (field == null) {
2220
        throw new IllegalArgumentException();
2221
      }
2820 chandransh 2222
 
2223
      switch (field) {
2224
      case SUCCESS:
2225
        return isSetSuccess();
2226
      case WEX:
2227
        return isSetWex();
2228
      }
2229
      throw new IllegalStateException();
2230
    }
2231
 
2232
    @Override
2233
    public boolean equals(Object that) {
2234
      if (that == null)
2235
        return false;
4496 mandeep.dh 2236
      if (that instanceof createSerializedInventoryItem_result)
2237
        return this.equals((createSerializedInventoryItem_result)that);
2820 chandransh 2238
      return false;
2239
    }
2240
 
4496 mandeep.dh 2241
    public boolean equals(createSerializedInventoryItem_result that) {
2820 chandransh 2242
      if (that == null)
2243
        return false;
2244
 
4555 mandeep.dh 2245
      boolean this_present_success = true && this.isSetSuccess();
2246
      boolean that_present_success = true && that.isSetSuccess();
2820 chandransh 2247
      if (this_present_success || that_present_success) {
2248
        if (!(this_present_success && that_present_success))
2249
          return false;
4555 mandeep.dh 2250
        if (!this.success.equals(that.success))
2820 chandransh 2251
          return false;
2252
      }
2253
 
2254
      boolean this_present_wex = true && this.isSetWex();
2255
      boolean that_present_wex = true && that.isSetWex();
2256
      if (this_present_wex || that_present_wex) {
2257
        if (!(this_present_wex && that_present_wex))
2258
          return false;
2259
        if (!this.wex.equals(that.wex))
2260
          return false;
2261
      }
2262
 
2263
      return true;
2264
    }
2265
 
2266
    @Override
2267
    public int hashCode() {
2268
      return 0;
2269
    }
2270
 
4496 mandeep.dh 2271
    public int compareTo(createSerializedInventoryItem_result other) {
2820 chandransh 2272
      if (!getClass().equals(other.getClass())) {
2273
        return getClass().getName().compareTo(other.getClass().getName());
2274
      }
2275
 
2276
      int lastComparison = 0;
4496 mandeep.dh 2277
      createSerializedInventoryItem_result typedOther = (createSerializedInventoryItem_result)other;
2820 chandransh 2278
 
3430 rajveer 2279
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2820 chandransh 2280
      if (lastComparison != 0) {
2281
        return lastComparison;
2282
      }
3430 rajveer 2283
      if (isSetSuccess()) {
2284
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2285
        if (lastComparison != 0) {
2286
          return lastComparison;
2287
        }
2820 chandransh 2288
      }
3430 rajveer 2289
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 2290
      if (lastComparison != 0) {
2291
        return lastComparison;
2292
      }
3430 rajveer 2293
      if (isSetWex()) {
2294
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
2295
        if (lastComparison != 0) {
2296
          return lastComparison;
2297
        }
2820 chandransh 2298
      }
2299
      return 0;
2300
    }
2301
 
3430 rajveer 2302
    public _Fields fieldForId(int fieldId) {
2303
      return _Fields.findByThriftId(fieldId);
2304
    }
2305
 
2306
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2307
      org.apache.thrift.protocol.TField field;
2820 chandransh 2308
      iprot.readStructBegin();
2309
      while (true)
2310
      {
2311
        field = iprot.readFieldBegin();
3430 rajveer 2312
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 2313
          break;
2314
        }
3430 rajveer 2315
        switch (field.id) {
2316
          case 0: // SUCCESS
4555 mandeep.dh 2317
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2318
              this.success = new InventoryItem();
2319
              this.success.read(iprot);
3430 rajveer 2320
            } else { 
2321
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2322
            }
2323
            break;
2324
          case 1: // WEX
2325
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2326
              this.wex = new WarehouseServiceException();
2327
              this.wex.read(iprot);
2328
            } else { 
2329
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2330
            }
2331
            break;
2332
          default:
2333
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 2334
        }
3430 rajveer 2335
        iprot.readFieldEnd();
2820 chandransh 2336
      }
2337
      iprot.readStructEnd();
2338
      validate();
2339
    }
2340
 
3430 rajveer 2341
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 2342
      oprot.writeStructBegin(STRUCT_DESC);
2343
 
2344
      if (this.isSetSuccess()) {
2345
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 2346
        this.success.write(oprot);
2820 chandransh 2347
        oprot.writeFieldEnd();
2348
      } else if (this.isSetWex()) {
2349
        oprot.writeFieldBegin(WEX_FIELD_DESC);
2350
        this.wex.write(oprot);
2351
        oprot.writeFieldEnd();
2352
      }
2353
      oprot.writeFieldStop();
2354
      oprot.writeStructEnd();
2355
    }
2356
 
2357
    @Override
2358
    public String toString() {
4496 mandeep.dh 2359
      StringBuilder sb = new StringBuilder("createSerializedInventoryItem_result(");
2820 chandransh 2360
      boolean first = true;
2361
 
2362
      sb.append("success:");
4555 mandeep.dh 2363
      if (this.success == null) {
2364
        sb.append("null");
2365
      } else {
2366
        sb.append(this.success);
2367
      }
2820 chandransh 2368
      first = false;
2369
      if (!first) sb.append(", ");
2370
      sb.append("wex:");
2371
      if (this.wex == null) {
2372
        sb.append("null");
2373
      } else {
2374
        sb.append(this.wex);
2375
      }
2376
      first = false;
2377
      sb.append(")");
2378
      return sb.toString();
2379
    }
2380
 
3430 rajveer 2381
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 2382
      // check for required fields
2383
    }
2384
 
3430 rajveer 2385
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2386
      try {
2387
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2388
      } catch (org.apache.thrift.TException te) {
2389
        throw new java.io.IOException(te);
2390
      }
2391
    }
2392
 
2393
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2394
      try {
2395
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2396
      } catch (org.apache.thrift.TException te) {
2397
        throw new java.io.IOException(te);
2398
      }
2399
    }
2400
 
2820 chandransh 2401
  }
2402
 
4496 mandeep.dh 2403
  public static class createSerializedInventoryItemFromItemNumber_args implements org.apache.thrift.TBase<createSerializedInventoryItemFromItemNumber_args, createSerializedInventoryItemFromItemNumber_args._Fields>, java.io.Serializable, Cloneable   {
2404
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItemFromItemNumber_args");
2820 chandransh 2405
 
4496 mandeep.dh 2406
    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);
2407
    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);
2408
    private static final org.apache.thrift.protocol.TField PURCHASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseId", org.apache.thrift.protocol.TType.I64, (short)3);
2820 chandransh 2409
 
4496 mandeep.dh 2410
    private String itemNumber; // required
2411
    private String serialNumber; // required
2412
    private long purchaseId; // required
2820 chandransh 2413
 
2414
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2415
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 2416
      ITEM_NUMBER((short)1, "itemNumber"),
2417
      SERIAL_NUMBER((short)2, "serialNumber"),
2418
      PURCHASE_ID((short)3, "purchaseId");
2820 chandransh 2419
 
2420
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2421
 
2422
      static {
2423
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2424
          byName.put(field.getFieldName(), field);
2425
        }
2426
      }
2427
 
2428
      /**
2429
       * Find the _Fields constant that matches fieldId, or null if its not found.
2430
       */
2431
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2432
        switch(fieldId) {
4496 mandeep.dh 2433
          case 1: // ITEM_NUMBER
2434
            return ITEM_NUMBER;
2435
          case 2: // SERIAL_NUMBER
2436
            return SERIAL_NUMBER;
2437
          case 3: // PURCHASE_ID
2438
            return PURCHASE_ID;
3430 rajveer 2439
          default:
2440
            return null;
2441
        }
2820 chandransh 2442
      }
2443
 
2444
      /**
2445
       * Find the _Fields constant that matches fieldId, throwing an exception
2446
       * if it is not found.
2447
       */
2448
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2449
        _Fields fields = findByThriftId(fieldId);
2450
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2451
        return fields;
2452
      }
2453
 
2454
      /**
2455
       * Find the _Fields constant that matches name, or null if its not found.
2456
       */
2457
      public static _Fields findByName(String name) {
2458
        return byName.get(name);
2459
      }
2460
 
2461
      private final short _thriftId;
2462
      private final String _fieldName;
2463
 
2464
      _Fields(short thriftId, String fieldName) {
2465
        _thriftId = thriftId;
2466
        _fieldName = fieldName;
2467
      }
2468
 
2469
      public short getThriftFieldId() {
2470
        return _thriftId;
2471
      }
2472
 
2473
      public String getFieldName() {
2474
        return _fieldName;
2475
      }
2476
    }
2477
 
2478
    // isset id assignments
4496 mandeep.dh 2479
    private static final int __PURCHASEID_ISSET_ID = 0;
2820 chandransh 2480
    private BitSet __isset_bit_vector = new BitSet(1);
2481
 
3430 rajveer 2482
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 2483
    static {
3430 rajveer 2484
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 2485
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2486
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
2487
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2488
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
2489
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3430 rajveer 2490
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2491
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 2492
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSerializedInventoryItemFromItemNumber_args.class, metaDataMap);
2820 chandransh 2493
    }
2494
 
4496 mandeep.dh 2495
    public createSerializedInventoryItemFromItemNumber_args() {
2820 chandransh 2496
    }
2497
 
4496 mandeep.dh 2498
    public createSerializedInventoryItemFromItemNumber_args(
2499
      String itemNumber,
2500
      String serialNumber,
2501
      long purchaseId)
2820 chandransh 2502
    {
2503
      this();
4496 mandeep.dh 2504
      this.itemNumber = itemNumber;
2505
      this.serialNumber = serialNumber;
2506
      this.purchaseId = purchaseId;
2507
      setPurchaseIdIsSet(true);
2820 chandransh 2508
    }
2509
 
2510
    /**
2511
     * Performs a deep copy on <i>other</i>.
2512
     */
4496 mandeep.dh 2513
    public createSerializedInventoryItemFromItemNumber_args(createSerializedInventoryItemFromItemNumber_args other) {
2820 chandransh 2514
      __isset_bit_vector.clear();
2515
      __isset_bit_vector.or(other.__isset_bit_vector);
4496 mandeep.dh 2516
      if (other.isSetItemNumber()) {
2517
        this.itemNumber = other.itemNumber;
2518
      }
2519
      if (other.isSetSerialNumber()) {
2520
        this.serialNumber = other.serialNumber;
2521
      }
2522
      this.purchaseId = other.purchaseId;
2820 chandransh 2523
    }
2524
 
4496 mandeep.dh 2525
    public createSerializedInventoryItemFromItemNumber_args deepCopy() {
2526
      return new createSerializedInventoryItemFromItemNumber_args(this);
2820 chandransh 2527
    }
2528
 
3430 rajveer 2529
    @Override
2530
    public void clear() {
4496 mandeep.dh 2531
      this.itemNumber = null;
2532
      this.serialNumber = null;
2533
      setPurchaseIdIsSet(false);
2534
      this.purchaseId = 0;
2820 chandransh 2535
    }
2536
 
4496 mandeep.dh 2537
    public String getItemNumber() {
2538
      return this.itemNumber;
2820 chandransh 2539
    }
2540
 
4496 mandeep.dh 2541
    public void setItemNumber(String itemNumber) {
2542
      this.itemNumber = itemNumber;
2820 chandransh 2543
    }
2544
 
4496 mandeep.dh 2545
    public void unsetItemNumber() {
2546
      this.itemNumber = null;
2820 chandransh 2547
    }
2548
 
4496 mandeep.dh 2549
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
2550
    public boolean isSetItemNumber() {
2551
      return this.itemNumber != null;
2820 chandransh 2552
    }
2553
 
4496 mandeep.dh 2554
    public void setItemNumberIsSet(boolean value) {
2555
      if (!value) {
2556
        this.itemNumber = null;
2557
      }
2820 chandransh 2558
    }
2559
 
4496 mandeep.dh 2560
    public String getSerialNumber() {
2561
      return this.serialNumber;
2562
    }
2563
 
2564
    public void setSerialNumber(String serialNumber) {
2565
      this.serialNumber = serialNumber;
2566
    }
2567
 
2568
    public void unsetSerialNumber() {
2569
      this.serialNumber = null;
2570
    }
2571
 
2572
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
2573
    public boolean isSetSerialNumber() {
2574
      return this.serialNumber != null;
2575
    }
2576
 
2577
    public void setSerialNumberIsSet(boolean value) {
2578
      if (!value) {
2579
        this.serialNumber = null;
2580
      }
2581
    }
2582
 
2583
    public long getPurchaseId() {
2584
      return this.purchaseId;
2585
    }
2586
 
2587
    public void setPurchaseId(long purchaseId) {
2588
      this.purchaseId = purchaseId;
2589
      setPurchaseIdIsSet(true);
2590
    }
2591
 
2592
    public void unsetPurchaseId() {
2593
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
2594
    }
2595
 
2596
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
2597
    public boolean isSetPurchaseId() {
2598
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
2599
    }
2600
 
2601
    public void setPurchaseIdIsSet(boolean value) {
2602
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
2603
    }
2604
 
2820 chandransh 2605
    public void setFieldValue(_Fields field, Object value) {
2606
      switch (field) {
4496 mandeep.dh 2607
      case ITEM_NUMBER:
2820 chandransh 2608
        if (value == null) {
4496 mandeep.dh 2609
          unsetItemNumber();
2820 chandransh 2610
        } else {
4496 mandeep.dh 2611
          setItemNumber((String)value);
2820 chandransh 2612
        }
2613
        break;
2614
 
4496 mandeep.dh 2615
      case SERIAL_NUMBER:
2616
        if (value == null) {
2617
          unsetSerialNumber();
2618
        } else {
2619
          setSerialNumber((String)value);
2620
        }
2621
        break;
2622
 
2623
      case PURCHASE_ID:
2624
        if (value == null) {
2625
          unsetPurchaseId();
2626
        } else {
2627
          setPurchaseId((Long)value);
2628
        }
2629
        break;
2630
 
2820 chandransh 2631
      }
2632
    }
2633
 
2634
    public Object getFieldValue(_Fields field) {
2635
      switch (field) {
4496 mandeep.dh 2636
      case ITEM_NUMBER:
2637
        return getItemNumber();
2820 chandransh 2638
 
4496 mandeep.dh 2639
      case SERIAL_NUMBER:
2640
        return getSerialNumber();
2641
 
2642
      case PURCHASE_ID:
2643
        return Long.valueOf(getPurchaseId());
2644
 
2820 chandransh 2645
      }
2646
      throw new IllegalStateException();
2647
    }
2648
 
3430 rajveer 2649
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2650
    public boolean isSet(_Fields field) {
2651
      if (field == null) {
2652
        throw new IllegalArgumentException();
2653
      }
2820 chandransh 2654
 
2655
      switch (field) {
4496 mandeep.dh 2656
      case ITEM_NUMBER:
2657
        return isSetItemNumber();
2658
      case SERIAL_NUMBER:
2659
        return isSetSerialNumber();
2660
      case PURCHASE_ID:
2661
        return isSetPurchaseId();
2820 chandransh 2662
      }
2663
      throw new IllegalStateException();
2664
    }
2665
 
2666
    @Override
2667
    public boolean equals(Object that) {
2668
      if (that == null)
2669
        return false;
4496 mandeep.dh 2670
      if (that instanceof createSerializedInventoryItemFromItemNumber_args)
2671
        return this.equals((createSerializedInventoryItemFromItemNumber_args)that);
2820 chandransh 2672
      return false;
2673
    }
2674
 
4496 mandeep.dh 2675
    public boolean equals(createSerializedInventoryItemFromItemNumber_args that) {
2820 chandransh 2676
      if (that == null)
2677
        return false;
2678
 
4496 mandeep.dh 2679
      boolean this_present_itemNumber = true && this.isSetItemNumber();
2680
      boolean that_present_itemNumber = true && that.isSetItemNumber();
2681
      if (this_present_itemNumber || that_present_itemNumber) {
2682
        if (!(this_present_itemNumber && that_present_itemNumber))
2820 chandransh 2683
          return false;
4496 mandeep.dh 2684
        if (!this.itemNumber.equals(that.itemNumber))
2820 chandransh 2685
          return false;
2686
      }
2687
 
4496 mandeep.dh 2688
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
2689
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
2690
      if (this_present_serialNumber || that_present_serialNumber) {
2691
        if (!(this_present_serialNumber && that_present_serialNumber))
2692
          return false;
2693
        if (!this.serialNumber.equals(that.serialNumber))
2694
          return false;
2695
      }
2696
 
2697
      boolean this_present_purchaseId = true;
2698
      boolean that_present_purchaseId = true;
2699
      if (this_present_purchaseId || that_present_purchaseId) {
2700
        if (!(this_present_purchaseId && that_present_purchaseId))
2701
          return false;
2702
        if (this.purchaseId != that.purchaseId)
2703
          return false;
2704
      }
2705
 
2820 chandransh 2706
      return true;
2707
    }
2708
 
2709
    @Override
2710
    public int hashCode() {
2711
      return 0;
2712
    }
2713
 
4496 mandeep.dh 2714
    public int compareTo(createSerializedInventoryItemFromItemNumber_args other) {
2820 chandransh 2715
      if (!getClass().equals(other.getClass())) {
2716
        return getClass().getName().compareTo(other.getClass().getName());
2717
      }
2718
 
2719
      int lastComparison = 0;
4496 mandeep.dh 2720
      createSerializedInventoryItemFromItemNumber_args typedOther = (createSerializedInventoryItemFromItemNumber_args)other;
2820 chandransh 2721
 
4496 mandeep.dh 2722
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
2820 chandransh 2723
      if (lastComparison != 0) {
2724
        return lastComparison;
2725
      }
4496 mandeep.dh 2726
      if (isSetItemNumber()) {
2727
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
3430 rajveer 2728
        if (lastComparison != 0) {
2729
          return lastComparison;
2730
        }
2820 chandransh 2731
      }
4496 mandeep.dh 2732
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2733
      if (lastComparison != 0) {
2734
        return lastComparison;
2735
      }
2736
      if (isSetSerialNumber()) {
2737
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
2738
        if (lastComparison != 0) {
2739
          return lastComparison;
2740
        }
2741
      }
2742
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
2743
      if (lastComparison != 0) {
2744
        return lastComparison;
2745
      }
2746
      if (isSetPurchaseId()) {
2747
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
2748
        if (lastComparison != 0) {
2749
          return lastComparison;
2750
        }
2751
      }
2820 chandransh 2752
      return 0;
2753
    }
2754
 
3430 rajveer 2755
    public _Fields fieldForId(int fieldId) {
2756
      return _Fields.findByThriftId(fieldId);
2757
    }
2758
 
2759
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2760
      org.apache.thrift.protocol.TField field;
2820 chandransh 2761
      iprot.readStructBegin();
2762
      while (true)
2763
      {
2764
        field = iprot.readFieldBegin();
3430 rajveer 2765
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 2766
          break;
2767
        }
3430 rajveer 2768
        switch (field.id) {
4496 mandeep.dh 2769
          case 1: // ITEM_NUMBER
2770
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
2771
              this.itemNumber = iprot.readString();
2772
            } else { 
2773
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2774
            }
2775
            break;
2776
          case 2: // SERIAL_NUMBER
2777
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
2778
              this.serialNumber = iprot.readString();
2779
            } else { 
2780
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2781
            }
2782
            break;
2783
          case 3: // PURCHASE_ID
3430 rajveer 2784
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4496 mandeep.dh 2785
              this.purchaseId = iprot.readI64();
2786
              setPurchaseIdIsSet(true);
3430 rajveer 2787
            } else { 
2788
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2789
            }
2790
            break;
2791
          default:
2792
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 2793
        }
3430 rajveer 2794
        iprot.readFieldEnd();
2820 chandransh 2795
      }
2796
      iprot.readStructEnd();
2797
      validate();
2798
    }
2799
 
3430 rajveer 2800
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 2801
      validate();
2802
 
2803
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 2804
      if (this.itemNumber != null) {
2805
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
2806
        oprot.writeString(this.itemNumber);
2807
        oprot.writeFieldEnd();
2808
      }
2809
      if (this.serialNumber != null) {
2810
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
2811
        oprot.writeString(this.serialNumber);
2812
        oprot.writeFieldEnd();
2813
      }
2814
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
2815
      oprot.writeI64(this.purchaseId);
2820 chandransh 2816
      oprot.writeFieldEnd();
2817
      oprot.writeFieldStop();
2818
      oprot.writeStructEnd();
2819
    }
2820
 
2821
    @Override
2822
    public String toString() {
4496 mandeep.dh 2823
      StringBuilder sb = new StringBuilder("createSerializedInventoryItemFromItemNumber_args(");
2820 chandransh 2824
      boolean first = true;
2825
 
4496 mandeep.dh 2826
      sb.append("itemNumber:");
2827
      if (this.itemNumber == null) {
2828
        sb.append("null");
2829
      } else {
2830
        sb.append(this.itemNumber);
2831
      }
2820 chandransh 2832
      first = false;
4496 mandeep.dh 2833
      if (!first) sb.append(", ");
2834
      sb.append("serialNumber:");
2835
      if (this.serialNumber == null) {
2836
        sb.append("null");
2837
      } else {
2838
        sb.append(this.serialNumber);
2839
      }
2840
      first = false;
2841
      if (!first) sb.append(", ");
2842
      sb.append("purchaseId:");
2843
      sb.append(this.purchaseId);
2844
      first = false;
2820 chandransh 2845
      sb.append(")");
2846
      return sb.toString();
2847
    }
2848
 
3430 rajveer 2849
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 2850
      // check for required fields
2851
    }
2852
 
3430 rajveer 2853
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2854
      try {
2855
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2856
      } catch (org.apache.thrift.TException te) {
2857
        throw new java.io.IOException(te);
2858
      }
2859
    }
2860
 
2861
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2862
      try {
4496 mandeep.dh 2863
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
2864
        __isset_bit_vector = new BitSet(1);
3430 rajveer 2865
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2866
      } catch (org.apache.thrift.TException te) {
2867
        throw new java.io.IOException(te);
2868
      }
2869
    }
2870
 
2820 chandransh 2871
  }
2872
 
4496 mandeep.dh 2873
  public static class createSerializedInventoryItemFromItemNumber_result implements org.apache.thrift.TBase<createSerializedInventoryItemFromItemNumber_result, createSerializedInventoryItemFromItemNumber_result._Fields>, java.io.Serializable, Cloneable   {
2874
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItemFromItemNumber_result");
2820 chandransh 2875
 
4555 mandeep.dh 2876
    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 2877
    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 2878
 
4555 mandeep.dh 2879
    private InventoryItem success; // required
3430 rajveer 2880
    private WarehouseServiceException wex; // required
2820 chandransh 2881
 
2882
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2883
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2820 chandransh 2884
      SUCCESS((short)0, "success"),
2885
      WEX((short)1, "wex");
2886
 
2887
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2888
 
2889
      static {
2890
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2891
          byName.put(field.getFieldName(), field);
2892
        }
2893
      }
2894
 
2895
      /**
2896
       * Find the _Fields constant that matches fieldId, or null if its not found.
2897
       */
2898
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2899
        switch(fieldId) {
2900
          case 0: // SUCCESS
2901
            return SUCCESS;
2902
          case 1: // WEX
2903
            return WEX;
2904
          default:
2905
            return null;
2906
        }
2820 chandransh 2907
      }
2908
 
2909
      /**
2910
       * Find the _Fields constant that matches fieldId, throwing an exception
2911
       * if it is not found.
2912
       */
2913
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2914
        _Fields fields = findByThriftId(fieldId);
2915
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2916
        return fields;
2917
      }
2918
 
2919
      /**
2920
       * Find the _Fields constant that matches name, or null if its not found.
2921
       */
2922
      public static _Fields findByName(String name) {
2923
        return byName.get(name);
2924
      }
2925
 
2926
      private final short _thriftId;
2927
      private final String _fieldName;
2928
 
2929
      _Fields(short thriftId, String fieldName) {
2930
        _thriftId = thriftId;
2931
        _fieldName = fieldName;
2932
      }
2933
 
2934
      public short getThriftFieldId() {
2935
        return _thriftId;
2936
      }
2937
 
2938
      public String getFieldName() {
2939
        return _fieldName;
2940
      }
2941
    }
2942
 
2943
    // isset id assignments
2944
 
3430 rajveer 2945
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 2946
    static {
3430 rajveer 2947
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2948
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 2949
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 2950
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2951
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2952
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 2953
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSerializedInventoryItemFromItemNumber_result.class, metaDataMap);
2820 chandransh 2954
    }
2955
 
4496 mandeep.dh 2956
    public createSerializedInventoryItemFromItemNumber_result() {
2820 chandransh 2957
    }
2958
 
4496 mandeep.dh 2959
    public createSerializedInventoryItemFromItemNumber_result(
4555 mandeep.dh 2960
      InventoryItem success,
2820 chandransh 2961
      WarehouseServiceException wex)
2962
    {
2963
      this();
2964
      this.success = success;
2965
      this.wex = wex;
2966
    }
2967
 
2968
    /**
2969
     * Performs a deep copy on <i>other</i>.
2970
     */
4496 mandeep.dh 2971
    public createSerializedInventoryItemFromItemNumber_result(createSerializedInventoryItemFromItemNumber_result other) {
4555 mandeep.dh 2972
      if (other.isSetSuccess()) {
2973
        this.success = new InventoryItem(other.success);
2974
      }
2820 chandransh 2975
      if (other.isSetWex()) {
2976
        this.wex = new WarehouseServiceException(other.wex);
2977
      }
2978
    }
2979
 
4496 mandeep.dh 2980
    public createSerializedInventoryItemFromItemNumber_result deepCopy() {
2981
      return new createSerializedInventoryItemFromItemNumber_result(this);
2820 chandransh 2982
    }
2983
 
3430 rajveer 2984
    @Override
2985
    public void clear() {
4555 mandeep.dh 2986
      this.success = null;
3430 rajveer 2987
      this.wex = null;
2820 chandransh 2988
    }
2989
 
4555 mandeep.dh 2990
    public InventoryItem getSuccess() {
2820 chandransh 2991
      return this.success;
2992
    }
2993
 
4555 mandeep.dh 2994
    public void setSuccess(InventoryItem success) {
2820 chandransh 2995
      this.success = success;
2996
    }
2997
 
2998
    public void unsetSuccess() {
4555 mandeep.dh 2999
      this.success = null;
2820 chandransh 3000
    }
3001
 
3430 rajveer 3002
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2820 chandransh 3003
    public boolean isSetSuccess() {
4555 mandeep.dh 3004
      return this.success != null;
2820 chandransh 3005
    }
3006
 
3007
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 3008
      if (!value) {
3009
        this.success = null;
3010
      }
2820 chandransh 3011
    }
3012
 
3013
    public WarehouseServiceException getWex() {
3014
      return this.wex;
3015
    }
3016
 
3430 rajveer 3017
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 3018
      this.wex = wex;
3019
    }
3020
 
3021
    public void unsetWex() {
3022
      this.wex = null;
3023
    }
3024
 
3430 rajveer 3025
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 3026
    public boolean isSetWex() {
3027
      return this.wex != null;
3028
    }
3029
 
3030
    public void setWexIsSet(boolean value) {
3031
      if (!value) {
3032
        this.wex = null;
3033
      }
3034
    }
3035
 
3036
    public void setFieldValue(_Fields field, Object value) {
3037
      switch (field) {
3038
      case SUCCESS:
3039
        if (value == null) {
3040
          unsetSuccess();
3041
        } else {
4555 mandeep.dh 3042
          setSuccess((InventoryItem)value);
2820 chandransh 3043
        }
3044
        break;
3045
 
3046
      case WEX:
3047
        if (value == null) {
3048
          unsetWex();
3049
        } else {
3050
          setWex((WarehouseServiceException)value);
3051
        }
3052
        break;
3053
 
3054
      }
3055
    }
3056
 
3057
    public Object getFieldValue(_Fields field) {
3058
      switch (field) {
3059
      case SUCCESS:
4555 mandeep.dh 3060
        return getSuccess();
2820 chandransh 3061
 
3062
      case WEX:
3063
        return getWex();
3064
 
3065
      }
3066
      throw new IllegalStateException();
3067
    }
3068
 
3430 rajveer 3069
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3070
    public boolean isSet(_Fields field) {
3071
      if (field == null) {
3072
        throw new IllegalArgumentException();
3073
      }
2820 chandransh 3074
 
3075
      switch (field) {
3076
      case SUCCESS:
3077
        return isSetSuccess();
3078
      case WEX:
3079
        return isSetWex();
3080
      }
3081
      throw new IllegalStateException();
3082
    }
3083
 
3084
    @Override
3085
    public boolean equals(Object that) {
3086
      if (that == null)
3087
        return false;
4496 mandeep.dh 3088
      if (that instanceof createSerializedInventoryItemFromItemNumber_result)
3089
        return this.equals((createSerializedInventoryItemFromItemNumber_result)that);
2820 chandransh 3090
      return false;
3091
    }
3092
 
4496 mandeep.dh 3093
    public boolean equals(createSerializedInventoryItemFromItemNumber_result that) {
2820 chandransh 3094
      if (that == null)
3095
        return false;
3096
 
4555 mandeep.dh 3097
      boolean this_present_success = true && this.isSetSuccess();
3098
      boolean that_present_success = true && that.isSetSuccess();
2820 chandransh 3099
      if (this_present_success || that_present_success) {
3100
        if (!(this_present_success && that_present_success))
3101
          return false;
4555 mandeep.dh 3102
        if (!this.success.equals(that.success))
2820 chandransh 3103
          return false;
3104
      }
3105
 
3106
      boolean this_present_wex = true && this.isSetWex();
3107
      boolean that_present_wex = true && that.isSetWex();
3108
      if (this_present_wex || that_present_wex) {
3109
        if (!(this_present_wex && that_present_wex))
3110
          return false;
3111
        if (!this.wex.equals(that.wex))
3112
          return false;
3113
      }
3114
 
3115
      return true;
3116
    }
3117
 
3118
    @Override
3119
    public int hashCode() {
3120
      return 0;
3121
    }
3122
 
4496 mandeep.dh 3123
    public int compareTo(createSerializedInventoryItemFromItemNumber_result other) {
2820 chandransh 3124
      if (!getClass().equals(other.getClass())) {
3125
        return getClass().getName().compareTo(other.getClass().getName());
3126
      }
3127
 
3128
      int lastComparison = 0;
4496 mandeep.dh 3129
      createSerializedInventoryItemFromItemNumber_result typedOther = (createSerializedInventoryItemFromItemNumber_result)other;
2820 chandransh 3130
 
3430 rajveer 3131
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2820 chandransh 3132
      if (lastComparison != 0) {
3133
        return lastComparison;
3134
      }
3430 rajveer 3135
      if (isSetSuccess()) {
3136
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3137
        if (lastComparison != 0) {
3138
          return lastComparison;
3139
        }
2820 chandransh 3140
      }
3430 rajveer 3141
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 3142
      if (lastComparison != 0) {
3143
        return lastComparison;
3144
      }
3430 rajveer 3145
      if (isSetWex()) {
3146
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3147
        if (lastComparison != 0) {
3148
          return lastComparison;
3149
        }
2820 chandransh 3150
      }
3151
      return 0;
3152
    }
3153
 
3430 rajveer 3154
    public _Fields fieldForId(int fieldId) {
3155
      return _Fields.findByThriftId(fieldId);
3156
    }
3157
 
3158
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3159
      org.apache.thrift.protocol.TField field;
2820 chandransh 3160
      iprot.readStructBegin();
3161
      while (true)
3162
      {
3163
        field = iprot.readFieldBegin();
3430 rajveer 3164
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 3165
          break;
3166
        }
3430 rajveer 3167
        switch (field.id) {
3168
          case 0: // SUCCESS
4555 mandeep.dh 3169
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3170
              this.success = new InventoryItem();
3171
              this.success.read(iprot);
3430 rajveer 3172
            } else { 
3173
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3174
            }
3175
            break;
3176
          case 1: // WEX
3177
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3178
              this.wex = new WarehouseServiceException();
3179
              this.wex.read(iprot);
3180
            } else { 
3181
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3182
            }
3183
            break;
3184
          default:
3185
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 3186
        }
3430 rajveer 3187
        iprot.readFieldEnd();
2820 chandransh 3188
      }
3189
      iprot.readStructEnd();
3190
      validate();
3191
    }
3192
 
3430 rajveer 3193
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 3194
      oprot.writeStructBegin(STRUCT_DESC);
3195
 
3196
      if (this.isSetSuccess()) {
3197
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 3198
        this.success.write(oprot);
2820 chandransh 3199
        oprot.writeFieldEnd();
3200
      } else if (this.isSetWex()) {
3201
        oprot.writeFieldBegin(WEX_FIELD_DESC);
3202
        this.wex.write(oprot);
3203
        oprot.writeFieldEnd();
3204
      }
3205
      oprot.writeFieldStop();
3206
      oprot.writeStructEnd();
3207
    }
3208
 
3209
    @Override
3210
    public String toString() {
4496 mandeep.dh 3211
      StringBuilder sb = new StringBuilder("createSerializedInventoryItemFromItemNumber_result(");
2820 chandransh 3212
      boolean first = true;
3213
 
3214
      sb.append("success:");
4555 mandeep.dh 3215
      if (this.success == null) {
3216
        sb.append("null");
3217
      } else {
3218
        sb.append(this.success);
3219
      }
2820 chandransh 3220
      first = false;
3221
      if (!first) sb.append(", ");
3222
      sb.append("wex:");
3223
      if (this.wex == null) {
3224
        sb.append("null");
3225
      } else {
3226
        sb.append(this.wex);
3227
      }
3228
      first = false;
3229
      sb.append(")");
3230
      return sb.toString();
3231
    }
3232
 
3430 rajveer 3233
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 3234
      // check for required fields
3235
    }
3236
 
3430 rajveer 3237
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3238
      try {
3239
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3240
      } catch (org.apache.thrift.TException te) {
3241
        throw new java.io.IOException(te);
3242
      }
3243
    }
3244
 
3245
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3246
      try {
3247
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3248
      } catch (org.apache.thrift.TException te) {
3249
        throw new java.io.IOException(te);
3250
      }
3251
    }
3252
 
2820 chandransh 3253
  }
3254
 
4496 mandeep.dh 3255
  public static class createInventoryItem_args implements org.apache.thrift.TBase<createInventoryItem_args, createInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
3256
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInventoryItem_args");
3383 chandransh 3257
 
4496 mandeep.dh 3258
    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);
3259
    private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.I64, (short)2);
3260
    private static final org.apache.thrift.protocol.TField PURCHASE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("purchaseId", org.apache.thrift.protocol.TType.I64, (short)3);
3383 chandransh 3261
 
4496 mandeep.dh 3262
    private long itemId; // required
3263
    private long quantity; // required
3264
    private long purchaseId; // required
3383 chandransh 3265
 
3266
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3267
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 3268
      ITEM_ID((short)1, "itemId"),
3269
      QUANTITY((short)2, "quantity"),
3270
      PURCHASE_ID((short)3, "purchaseId");
3383 chandransh 3271
 
3272
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3273
 
3274
      static {
3275
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3276
          byName.put(field.getFieldName(), field);
3277
        }
3278
      }
3279
 
3280
      /**
3281
       * Find the _Fields constant that matches fieldId, or null if its not found.
3282
       */
3283
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3284
        switch(fieldId) {
4496 mandeep.dh 3285
          case 1: // ITEM_ID
3286
            return ITEM_ID;
3287
          case 2: // QUANTITY
3288
            return QUANTITY;
3289
          case 3: // PURCHASE_ID
3290
            return PURCHASE_ID;
3430 rajveer 3291
          default:
3292
            return null;
3293
        }
3383 chandransh 3294
      }
3295
 
3296
      /**
3297
       * Find the _Fields constant that matches fieldId, throwing an exception
3298
       * if it is not found.
3299
       */
3300
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3301
        _Fields fields = findByThriftId(fieldId);
3302
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3303
        return fields;
3304
      }
3305
 
3306
      /**
3307
       * Find the _Fields constant that matches name, or null if its not found.
3308
       */
3309
      public static _Fields findByName(String name) {
3310
        return byName.get(name);
3311
      }
3312
 
3313
      private final short _thriftId;
3314
      private final String _fieldName;
3315
 
3316
      _Fields(short thriftId, String fieldName) {
3317
        _thriftId = thriftId;
3318
        _fieldName = fieldName;
3319
      }
3320
 
3321
      public short getThriftFieldId() {
3322
        return _thriftId;
3323
      }
3324
 
3325
      public String getFieldName() {
3326
        return _fieldName;
3327
      }
3328
    }
3329
 
3330
    // isset id assignments
4496 mandeep.dh 3331
    private static final int __ITEMID_ISSET_ID = 0;
3332
    private static final int __QUANTITY_ISSET_ID = 1;
3333
    private static final int __PURCHASEID_ISSET_ID = 2;
3334
    private BitSet __isset_bit_vector = new BitSet(3);
3383 chandransh 3335
 
3430 rajveer 3336
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 3337
    static {
3430 rajveer 3338
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 3339
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3340
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3341
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3342
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3343
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3344
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 3345
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 3346
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInventoryItem_args.class, metaDataMap);
3383 chandransh 3347
    }
3348
 
4496 mandeep.dh 3349
    public createInventoryItem_args() {
3383 chandransh 3350
    }
3351
 
4496 mandeep.dh 3352
    public createInventoryItem_args(
3353
      long itemId,
3354
      long quantity,
3355
      long purchaseId)
3383 chandransh 3356
    {
3357
      this();
4496 mandeep.dh 3358
      this.itemId = itemId;
3359
      setItemIdIsSet(true);
3360
      this.quantity = quantity;
3361
      setQuantityIsSet(true);
3362
      this.purchaseId = purchaseId;
3363
      setPurchaseIdIsSet(true);
3383 chandransh 3364
    }
3365
 
3366
    /**
3367
     * Performs a deep copy on <i>other</i>.
3368
     */
4496 mandeep.dh 3369
    public createInventoryItem_args(createInventoryItem_args other) {
3370
      __isset_bit_vector.clear();
3371
      __isset_bit_vector.or(other.__isset_bit_vector);
3372
      this.itemId = other.itemId;
3373
      this.quantity = other.quantity;
3374
      this.purchaseId = other.purchaseId;
3383 chandransh 3375
    }
3376
 
4496 mandeep.dh 3377
    public createInventoryItem_args deepCopy() {
3378
      return new createInventoryItem_args(this);
3383 chandransh 3379
    }
3380
 
3430 rajveer 3381
    @Override
3382
    public void clear() {
4496 mandeep.dh 3383
      setItemIdIsSet(false);
3384
      this.itemId = 0;
3385
      setQuantityIsSet(false);
3386
      this.quantity = 0;
3387
      setPurchaseIdIsSet(false);
3388
      this.purchaseId = 0;
3383 chandransh 3389
    }
3390
 
4496 mandeep.dh 3391
    public long getItemId() {
3392
      return this.itemId;
3383 chandransh 3393
    }
3394
 
4496 mandeep.dh 3395
    public void setItemId(long itemId) {
3396
      this.itemId = itemId;
3397
      setItemIdIsSet(true);
3383 chandransh 3398
    }
3399
 
4496 mandeep.dh 3400
    public void unsetItemId() {
3401
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
3383 chandransh 3402
    }
3403
 
4496 mandeep.dh 3404
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
3405
    public boolean isSetItemId() {
3406
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
3383 chandransh 3407
    }
3408
 
4496 mandeep.dh 3409
    public void setItemIdIsSet(boolean value) {
3410
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
3383 chandransh 3411
    }
3412
 
4496 mandeep.dh 3413
    public long getQuantity() {
3414
      return this.quantity;
3415
    }
3416
 
3417
    public void setQuantity(long quantity) {
3418
      this.quantity = quantity;
3419
      setQuantityIsSet(true);
3420
    }
3421
 
3422
    public void unsetQuantity() {
3423
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
3424
    }
3425
 
3426
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
3427
    public boolean isSetQuantity() {
3428
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
3429
    }
3430
 
3431
    public void setQuantityIsSet(boolean value) {
3432
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
3433
    }
3434
 
3435
    public long getPurchaseId() {
3436
      return this.purchaseId;
3437
    }
3438
 
3439
    public void setPurchaseId(long purchaseId) {
3440
      this.purchaseId = purchaseId;
3441
      setPurchaseIdIsSet(true);
3442
    }
3443
 
3444
    public void unsetPurchaseId() {
3445
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
3446
    }
3447
 
3448
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
3449
    public boolean isSetPurchaseId() {
3450
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
3451
    }
3452
 
3453
    public void setPurchaseIdIsSet(boolean value) {
3454
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
3455
    }
3456
 
3383 chandransh 3457
    public void setFieldValue(_Fields field, Object value) {
3458
      switch (field) {
4496 mandeep.dh 3459
      case ITEM_ID:
3383 chandransh 3460
        if (value == null) {
4496 mandeep.dh 3461
          unsetItemId();
3383 chandransh 3462
        } else {
4496 mandeep.dh 3463
          setItemId((Long)value);
3383 chandransh 3464
        }
3465
        break;
3466
 
4496 mandeep.dh 3467
      case QUANTITY:
3468
        if (value == null) {
3469
          unsetQuantity();
3470
        } else {
3471
          setQuantity((Long)value);
3472
        }
3473
        break;
3474
 
3475
      case PURCHASE_ID:
3476
        if (value == null) {
3477
          unsetPurchaseId();
3478
        } else {
3479
          setPurchaseId((Long)value);
3480
        }
3481
        break;
3482
 
3383 chandransh 3483
      }
3484
    }
3485
 
3486
    public Object getFieldValue(_Fields field) {
3487
      switch (field) {
4496 mandeep.dh 3488
      case ITEM_ID:
3489
        return Long.valueOf(getItemId());
3383 chandransh 3490
 
4496 mandeep.dh 3491
      case QUANTITY:
3492
        return Long.valueOf(getQuantity());
3493
 
3494
      case PURCHASE_ID:
3495
        return Long.valueOf(getPurchaseId());
3496
 
3383 chandransh 3497
      }
3498
      throw new IllegalStateException();
3499
    }
3500
 
3430 rajveer 3501
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3502
    public boolean isSet(_Fields field) {
3503
      if (field == null) {
3504
        throw new IllegalArgumentException();
3505
      }
3383 chandransh 3506
 
3507
      switch (field) {
4496 mandeep.dh 3508
      case ITEM_ID:
3509
        return isSetItemId();
3510
      case QUANTITY:
3511
        return isSetQuantity();
3512
      case PURCHASE_ID:
3513
        return isSetPurchaseId();
3383 chandransh 3514
      }
3515
      throw new IllegalStateException();
3516
    }
3517
 
3518
    @Override
3519
    public boolean equals(Object that) {
3520
      if (that == null)
3521
        return false;
4496 mandeep.dh 3522
      if (that instanceof createInventoryItem_args)
3523
        return this.equals((createInventoryItem_args)that);
3383 chandransh 3524
      return false;
3525
    }
3526
 
4496 mandeep.dh 3527
    public boolean equals(createInventoryItem_args that) {
3383 chandransh 3528
      if (that == null)
3529
        return false;
3530
 
4496 mandeep.dh 3531
      boolean this_present_itemId = true;
3532
      boolean that_present_itemId = true;
3533
      if (this_present_itemId || that_present_itemId) {
3534
        if (!(this_present_itemId && that_present_itemId))
3383 chandransh 3535
          return false;
4496 mandeep.dh 3536
        if (this.itemId != that.itemId)
3383 chandransh 3537
          return false;
3538
      }
3539
 
4496 mandeep.dh 3540
      boolean this_present_quantity = true;
3541
      boolean that_present_quantity = true;
3542
      if (this_present_quantity || that_present_quantity) {
3543
        if (!(this_present_quantity && that_present_quantity))
3544
          return false;
3545
        if (this.quantity != that.quantity)
3546
          return false;
3547
      }
3548
 
3549
      boolean this_present_purchaseId = true;
3550
      boolean that_present_purchaseId = true;
3551
      if (this_present_purchaseId || that_present_purchaseId) {
3552
        if (!(this_present_purchaseId && that_present_purchaseId))
3553
          return false;
3554
        if (this.purchaseId != that.purchaseId)
3555
          return false;
3556
      }
3557
 
3383 chandransh 3558
      return true;
3559
    }
3560
 
3561
    @Override
3562
    public int hashCode() {
3563
      return 0;
3564
    }
3565
 
4496 mandeep.dh 3566
    public int compareTo(createInventoryItem_args other) {
3383 chandransh 3567
      if (!getClass().equals(other.getClass())) {
3568
        return getClass().getName().compareTo(other.getClass().getName());
3569
      }
3570
 
3571
      int lastComparison = 0;
4496 mandeep.dh 3572
      createInventoryItem_args typedOther = (createInventoryItem_args)other;
3383 chandransh 3573
 
4496 mandeep.dh 3574
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
3383 chandransh 3575
      if (lastComparison != 0) {
3576
        return lastComparison;
3577
      }
4496 mandeep.dh 3578
      if (isSetItemId()) {
3579
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
3430 rajveer 3580
        if (lastComparison != 0) {
3581
          return lastComparison;
3582
        }
3383 chandransh 3583
      }
4496 mandeep.dh 3584
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
3585
      if (lastComparison != 0) {
3586
        return lastComparison;
3587
      }
3588
      if (isSetQuantity()) {
3589
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
3590
        if (lastComparison != 0) {
3591
          return lastComparison;
3592
        }
3593
      }
3594
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
3595
      if (lastComparison != 0) {
3596
        return lastComparison;
3597
      }
3598
      if (isSetPurchaseId()) {
3599
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
3600
        if (lastComparison != 0) {
3601
          return lastComparison;
3602
        }
3603
      }
3383 chandransh 3604
      return 0;
3605
    }
3606
 
3430 rajveer 3607
    public _Fields fieldForId(int fieldId) {
3608
      return _Fields.findByThriftId(fieldId);
3609
    }
3610
 
3611
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3612
      org.apache.thrift.protocol.TField field;
3383 chandransh 3613
      iprot.readStructBegin();
3614
      while (true)
3615
      {
3616
        field = iprot.readFieldBegin();
3430 rajveer 3617
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 3618
          break;
3619
        }
3430 rajveer 3620
        switch (field.id) {
4496 mandeep.dh 3621
          case 1: // ITEM_ID
3622
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3623
              this.itemId = iprot.readI64();
3624
              setItemIdIsSet(true);
3430 rajveer 3625
            } else { 
3626
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3627
            }
3628
            break;
4496 mandeep.dh 3629
          case 2: // QUANTITY
3630
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3631
              this.quantity = iprot.readI64();
3632
              setQuantityIsSet(true);
3633
            } else { 
3634
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3635
            }
3636
            break;
3637
          case 3: // PURCHASE_ID
3638
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3639
              this.purchaseId = iprot.readI64();
3640
              setPurchaseIdIsSet(true);
3641
            } else { 
3642
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3643
            }
3644
            break;
3430 rajveer 3645
          default:
3646
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 3647
        }
3430 rajveer 3648
        iprot.readFieldEnd();
3383 chandransh 3649
      }
3650
      iprot.readStructEnd();
3651
      validate();
3652
    }
3653
 
3430 rajveer 3654
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 3655
      validate();
3656
 
3657
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 3658
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
3659
      oprot.writeI64(this.itemId);
3660
      oprot.writeFieldEnd();
3661
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
3662
      oprot.writeI64(this.quantity);
3663
      oprot.writeFieldEnd();
3664
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
3665
      oprot.writeI64(this.purchaseId);
3666
      oprot.writeFieldEnd();
3383 chandransh 3667
      oprot.writeFieldStop();
3668
      oprot.writeStructEnd();
3669
    }
3670
 
3671
    @Override
3672
    public String toString() {
4496 mandeep.dh 3673
      StringBuilder sb = new StringBuilder("createInventoryItem_args(");
3383 chandransh 3674
      boolean first = true;
3675
 
4496 mandeep.dh 3676
      sb.append("itemId:");
3677
      sb.append(this.itemId);
3383 chandransh 3678
      first = false;
4496 mandeep.dh 3679
      if (!first) sb.append(", ");
3680
      sb.append("quantity:");
3681
      sb.append(this.quantity);
3682
      first = false;
3683
      if (!first) sb.append(", ");
3684
      sb.append("purchaseId:");
3685
      sb.append(this.purchaseId);
3686
      first = false;
3383 chandransh 3687
      sb.append(")");
3688
      return sb.toString();
3689
    }
3690
 
3430 rajveer 3691
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 3692
      // check for required fields
3693
    }
3694
 
3430 rajveer 3695
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3696
      try {
3697
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3698
      } catch (org.apache.thrift.TException te) {
3699
        throw new java.io.IOException(te);
3700
      }
3701
    }
3702
 
3703
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3704
      try {
4496 mandeep.dh 3705
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
3706
        __isset_bit_vector = new BitSet(1);
3430 rajveer 3707
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3708
      } catch (org.apache.thrift.TException te) {
3709
        throw new java.io.IOException(te);
3710
      }
3711
    }
3712
 
3383 chandransh 3713
  }
3714
 
4496 mandeep.dh 3715
  public static class createInventoryItem_result implements org.apache.thrift.TBase<createInventoryItem_result, createInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
3716
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInventoryItem_result");
3383 chandransh 3717
 
4555 mandeep.dh 3718
    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 3719
    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 3720
 
4555 mandeep.dh 3721
    private InventoryItem success; // required
3430 rajveer 3722
    private WarehouseServiceException wex; // required
3383 chandransh 3723
 
3724
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3725
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3383 chandransh 3726
      SUCCESS((short)0, "success"),
3727
      WEX((short)1, "wex");
3728
 
3729
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3730
 
3731
      static {
3732
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3733
          byName.put(field.getFieldName(), field);
3734
        }
3735
      }
3736
 
3737
      /**
3738
       * Find the _Fields constant that matches fieldId, or null if its not found.
3739
       */
3740
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3741
        switch(fieldId) {
3742
          case 0: // SUCCESS
3743
            return SUCCESS;
3744
          case 1: // WEX
3745
            return WEX;
3746
          default:
3747
            return null;
3748
        }
3383 chandransh 3749
      }
3750
 
3751
      /**
3752
       * Find the _Fields constant that matches fieldId, throwing an exception
3753
       * if it is not found.
3754
       */
3755
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3756
        _Fields fields = findByThriftId(fieldId);
3757
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3758
        return fields;
3759
      }
3760
 
3761
      /**
3762
       * Find the _Fields constant that matches name, or null if its not found.
3763
       */
3764
      public static _Fields findByName(String name) {
3765
        return byName.get(name);
3766
      }
3767
 
3768
      private final short _thriftId;
3769
      private final String _fieldName;
3770
 
3771
      _Fields(short thriftId, String fieldName) {
3772
        _thriftId = thriftId;
3773
        _fieldName = fieldName;
3774
      }
3775
 
3776
      public short getThriftFieldId() {
3777
        return _thriftId;
3778
      }
3779
 
3780
      public String getFieldName() {
3781
        return _fieldName;
3782
      }
3783
    }
3784
 
3785
    // isset id assignments
3786
 
3430 rajveer 3787
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 3788
    static {
3430 rajveer 3789
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3790
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 3791
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 3792
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3793
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3794
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 3795
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInventoryItem_result.class, metaDataMap);
3383 chandransh 3796
    }
3797
 
4496 mandeep.dh 3798
    public createInventoryItem_result() {
3383 chandransh 3799
    }
3800
 
4496 mandeep.dh 3801
    public createInventoryItem_result(
4555 mandeep.dh 3802
      InventoryItem success,
3383 chandransh 3803
      WarehouseServiceException wex)
3804
    {
3805
      this();
3806
      this.success = success;
3807
      this.wex = wex;
3808
    }
3809
 
3810
    /**
3811
     * Performs a deep copy on <i>other</i>.
3812
     */
4496 mandeep.dh 3813
    public createInventoryItem_result(createInventoryItem_result other) {
4555 mandeep.dh 3814
      if (other.isSetSuccess()) {
3815
        this.success = new InventoryItem(other.success);
3816
      }
3383 chandransh 3817
      if (other.isSetWex()) {
3818
        this.wex = new WarehouseServiceException(other.wex);
3819
      }
3820
    }
3821
 
4496 mandeep.dh 3822
    public createInventoryItem_result deepCopy() {
3823
      return new createInventoryItem_result(this);
3383 chandransh 3824
    }
3825
 
3430 rajveer 3826
    @Override
3827
    public void clear() {
4555 mandeep.dh 3828
      this.success = null;
3430 rajveer 3829
      this.wex = null;
3383 chandransh 3830
    }
3831
 
4555 mandeep.dh 3832
    public InventoryItem getSuccess() {
3383 chandransh 3833
      return this.success;
3834
    }
3835
 
4555 mandeep.dh 3836
    public void setSuccess(InventoryItem success) {
3383 chandransh 3837
      this.success = success;
3838
    }
3839
 
3840
    public void unsetSuccess() {
4555 mandeep.dh 3841
      this.success = null;
3383 chandransh 3842
    }
3843
 
3430 rajveer 3844
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3383 chandransh 3845
    public boolean isSetSuccess() {
4555 mandeep.dh 3846
      return this.success != null;
3383 chandransh 3847
    }
3848
 
3849
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 3850
      if (!value) {
3851
        this.success = null;
3852
      }
3383 chandransh 3853
    }
3854
 
3855
    public WarehouseServiceException getWex() {
3856
      return this.wex;
3857
    }
3858
 
3430 rajveer 3859
    public void setWex(WarehouseServiceException wex) {
3383 chandransh 3860
      this.wex = wex;
3861
    }
3862
 
3863
    public void unsetWex() {
3864
      this.wex = null;
3865
    }
3866
 
3430 rajveer 3867
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3383 chandransh 3868
    public boolean isSetWex() {
3869
      return this.wex != null;
3870
    }
3871
 
3872
    public void setWexIsSet(boolean value) {
3873
      if (!value) {
3874
        this.wex = null;
3875
      }
3876
    }
3877
 
3878
    public void setFieldValue(_Fields field, Object value) {
3879
      switch (field) {
3880
      case SUCCESS:
3881
        if (value == null) {
3882
          unsetSuccess();
3883
        } else {
4555 mandeep.dh 3884
          setSuccess((InventoryItem)value);
3383 chandransh 3885
        }
3886
        break;
3887
 
3888
      case WEX:
3889
        if (value == null) {
3890
          unsetWex();
3891
        } else {
3892
          setWex((WarehouseServiceException)value);
3893
        }
3894
        break;
3895
 
3896
      }
3897
    }
3898
 
3899
    public Object getFieldValue(_Fields field) {
3900
      switch (field) {
3901
      case SUCCESS:
4555 mandeep.dh 3902
        return getSuccess();
3383 chandransh 3903
 
3904
      case WEX:
3905
        return getWex();
3906
 
3907
      }
3908
      throw new IllegalStateException();
3909
    }
3910
 
3430 rajveer 3911
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3912
    public boolean isSet(_Fields field) {
3913
      if (field == null) {
3914
        throw new IllegalArgumentException();
3915
      }
3383 chandransh 3916
 
3917
      switch (field) {
3918
      case SUCCESS:
3919
        return isSetSuccess();
3920
      case WEX:
3921
        return isSetWex();
3922
      }
3923
      throw new IllegalStateException();
3924
    }
3925
 
3926
    @Override
3927
    public boolean equals(Object that) {
3928
      if (that == null)
3929
        return false;
4496 mandeep.dh 3930
      if (that instanceof createInventoryItem_result)
3931
        return this.equals((createInventoryItem_result)that);
3383 chandransh 3932
      return false;
3933
    }
3934
 
4496 mandeep.dh 3935
    public boolean equals(createInventoryItem_result that) {
3383 chandransh 3936
      if (that == null)
3937
        return false;
3938
 
4555 mandeep.dh 3939
      boolean this_present_success = true && this.isSetSuccess();
3940
      boolean that_present_success = true && that.isSetSuccess();
3383 chandransh 3941
      if (this_present_success || that_present_success) {
3942
        if (!(this_present_success && that_present_success))
3943
          return false;
4555 mandeep.dh 3944
        if (!this.success.equals(that.success))
3383 chandransh 3945
          return false;
3946
      }
3947
 
3948
      boolean this_present_wex = true && this.isSetWex();
3949
      boolean that_present_wex = true && that.isSetWex();
3950
      if (this_present_wex || that_present_wex) {
3951
        if (!(this_present_wex && that_present_wex))
3952
          return false;
3953
        if (!this.wex.equals(that.wex))
3954
          return false;
3955
      }
3956
 
3957
      return true;
3958
    }
3959
 
3960
    @Override
3961
    public int hashCode() {
3962
      return 0;
3963
    }
3964
 
4496 mandeep.dh 3965
    public int compareTo(createInventoryItem_result other) {
3383 chandransh 3966
      if (!getClass().equals(other.getClass())) {
3967
        return getClass().getName().compareTo(other.getClass().getName());
3968
      }
3969
 
3970
      int lastComparison = 0;
4496 mandeep.dh 3971
      createInventoryItem_result typedOther = (createInventoryItem_result)other;
3383 chandransh 3972
 
3430 rajveer 3973
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3383 chandransh 3974
      if (lastComparison != 0) {
3975
        return lastComparison;
3976
      }
3430 rajveer 3977
      if (isSetSuccess()) {
3978
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3979
        if (lastComparison != 0) {
3980
          return lastComparison;
3981
        }
3383 chandransh 3982
      }
3430 rajveer 3983
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
3383 chandransh 3984
      if (lastComparison != 0) {
3985
        return lastComparison;
3986
      }
3430 rajveer 3987
      if (isSetWex()) {
3988
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3989
        if (lastComparison != 0) {
3990
          return lastComparison;
3991
        }
3383 chandransh 3992
      }
3993
      return 0;
3994
    }
3995
 
3430 rajveer 3996
    public _Fields fieldForId(int fieldId) {
3997
      return _Fields.findByThriftId(fieldId);
3998
    }
3999
 
4000
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4001
      org.apache.thrift.protocol.TField field;
3383 chandransh 4002
      iprot.readStructBegin();
4003
      while (true)
4004
      {
4005
        field = iprot.readFieldBegin();
3430 rajveer 4006
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 4007
          break;
4008
        }
3430 rajveer 4009
        switch (field.id) {
4010
          case 0: // SUCCESS
4555 mandeep.dh 4011
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4012
              this.success = new InventoryItem();
4013
              this.success.read(iprot);
3430 rajveer 4014
            } else { 
4015
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4016
            }
4017
            break;
4018
          case 1: // WEX
4019
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4020
              this.wex = new WarehouseServiceException();
4021
              this.wex.read(iprot);
4022
            } else { 
4023
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4024
            }
4025
            break;
4026
          default:
4027
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 4028
        }
3430 rajveer 4029
        iprot.readFieldEnd();
3383 chandransh 4030
      }
4031
      iprot.readStructEnd();
4032
      validate();
4033
    }
4034
 
3430 rajveer 4035
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 4036
      oprot.writeStructBegin(STRUCT_DESC);
4037
 
4038
      if (this.isSetSuccess()) {
4039
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 4040
        this.success.write(oprot);
3383 chandransh 4041
        oprot.writeFieldEnd();
4042
      } else if (this.isSetWex()) {
4043
        oprot.writeFieldBegin(WEX_FIELD_DESC);
4044
        this.wex.write(oprot);
4045
        oprot.writeFieldEnd();
4046
      }
4047
      oprot.writeFieldStop();
4048
      oprot.writeStructEnd();
4049
    }
4050
 
4051
    @Override
4052
    public String toString() {
4496 mandeep.dh 4053
      StringBuilder sb = new StringBuilder("createInventoryItem_result(");
3383 chandransh 4054
      boolean first = true;
4055
 
4056
      sb.append("success:");
4555 mandeep.dh 4057
      if (this.success == null) {
4058
        sb.append("null");
4059
      } else {
4060
        sb.append(this.success);
4061
      }
3383 chandransh 4062
      first = false;
4063
      if (!first) sb.append(", ");
4064
      sb.append("wex:");
4065
      if (this.wex == null) {
4066
        sb.append("null");
4067
      } else {
4068
        sb.append(this.wex);
4069
      }
4070
      first = false;
4071
      sb.append(")");
4072
      return sb.toString();
4073
    }
4074
 
3430 rajveer 4075
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 4076
      // check for required fields
4077
    }
4078
 
3430 rajveer 4079
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4080
      try {
4081
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4082
      } catch (org.apache.thrift.TException te) {
4083
        throw new java.io.IOException(te);
4084
      }
4085
    }
4086
 
4087
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4088
      try {
4089
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4090
      } catch (org.apache.thrift.TException te) {
4091
        throw new java.io.IOException(te);
4092
      }
4093
    }
4094
 
3383 chandransh 4095
  }
4096
 
4496 mandeep.dh 4097
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
4098
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
2832 chandransh 4099
 
4496 mandeep.dh 4100
    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 4101
 
4496 mandeep.dh 4102
    private String serialNumber; // required
2832 chandransh 4103
 
4104
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4105
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 4106
      SERIAL_NUMBER((short)1, "serialNumber");
2832 chandransh 4107
 
4108
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4109
 
4110
      static {
4111
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4112
          byName.put(field.getFieldName(), field);
4113
        }
4114
      }
4115
 
4116
      /**
4117
       * Find the _Fields constant that matches fieldId, or null if its not found.
4118
       */
4119
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4120
        switch(fieldId) {
4496 mandeep.dh 4121
          case 1: // SERIAL_NUMBER
4122
            return SERIAL_NUMBER;
3430 rajveer 4123
          default:
4124
            return null;
4125
        }
2832 chandransh 4126
      }
4127
 
4128
      /**
4129
       * Find the _Fields constant that matches fieldId, throwing an exception
4130
       * if it is not found.
4131
       */
4132
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4133
        _Fields fields = findByThriftId(fieldId);
4134
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4135
        return fields;
4136
      }
4137
 
4138
      /**
4139
       * Find the _Fields constant that matches name, or null if its not found.
4140
       */
4141
      public static _Fields findByName(String name) {
4142
        return byName.get(name);
4143
      }
4144
 
4145
      private final short _thriftId;
4146
      private final String _fieldName;
4147
 
4148
      _Fields(short thriftId, String fieldName) {
4149
        _thriftId = thriftId;
4150
        _fieldName = fieldName;
4151
      }
4152
 
4153
      public short getThriftFieldId() {
4154
        return _thriftId;
4155
      }
4156
 
4157
      public String getFieldName() {
4158
        return _fieldName;
4159
      }
4160
    }
4161
 
4162
    // isset id assignments
4163
 
3430 rajveer 4164
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 4165
    static {
3430 rajveer 4166
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 4167
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4168
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 4169
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4170
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_args.class, metaDataMap);
2832 chandransh 4171
    }
4172
 
4496 mandeep.dh 4173
    public getInventoryItem_args() {
2832 chandransh 4174
    }
4175
 
4496 mandeep.dh 4176
    public getInventoryItem_args(
4177
      String serialNumber)
2832 chandransh 4178
    {
4179
      this();
4496 mandeep.dh 4180
      this.serialNumber = serialNumber;
2832 chandransh 4181
    }
4182
 
4183
    /**
4184
     * Performs a deep copy on <i>other</i>.
4185
     */
4496 mandeep.dh 4186
    public getInventoryItem_args(getInventoryItem_args other) {
4187
      if (other.isSetSerialNumber()) {
4188
        this.serialNumber = other.serialNumber;
4189
      }
2832 chandransh 4190
    }
4191
 
4496 mandeep.dh 4192
    public getInventoryItem_args deepCopy() {
4193
      return new getInventoryItem_args(this);
2832 chandransh 4194
    }
4195
 
3430 rajveer 4196
    @Override
4197
    public void clear() {
4496 mandeep.dh 4198
      this.serialNumber = null;
2832 chandransh 4199
    }
4200
 
4496 mandeep.dh 4201
    public String getSerialNumber() {
4202
      return this.serialNumber;
2832 chandransh 4203
    }
4204
 
4496 mandeep.dh 4205
    public void setSerialNumber(String serialNumber) {
4206
      this.serialNumber = serialNumber;
2832 chandransh 4207
    }
4208
 
4496 mandeep.dh 4209
    public void unsetSerialNumber() {
4210
      this.serialNumber = null;
2832 chandransh 4211
    }
4212
 
4496 mandeep.dh 4213
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
4214
    public boolean isSetSerialNumber() {
4215
      return this.serialNumber != null;
2832 chandransh 4216
    }
4217
 
4496 mandeep.dh 4218
    public void setSerialNumberIsSet(boolean value) {
4219
      if (!value) {
4220
        this.serialNumber = null;
4221
      }
2832 chandransh 4222
    }
4223
 
4224
    public void setFieldValue(_Fields field, Object value) {
4225
      switch (field) {
4496 mandeep.dh 4226
      case SERIAL_NUMBER:
2832 chandransh 4227
        if (value == null) {
4496 mandeep.dh 4228
          unsetSerialNumber();
2832 chandransh 4229
        } else {
4496 mandeep.dh 4230
          setSerialNumber((String)value);
2832 chandransh 4231
        }
4232
        break;
4233
 
4234
      }
4235
    }
4236
 
4237
    public Object getFieldValue(_Fields field) {
4238
      switch (field) {
4496 mandeep.dh 4239
      case SERIAL_NUMBER:
4240
        return getSerialNumber();
2832 chandransh 4241
 
4242
      }
4243
      throw new IllegalStateException();
4244
    }
4245
 
3430 rajveer 4246
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4247
    public boolean isSet(_Fields field) {
4248
      if (field == null) {
4249
        throw new IllegalArgumentException();
4250
      }
2832 chandransh 4251
 
4252
      switch (field) {
4496 mandeep.dh 4253
      case SERIAL_NUMBER:
4254
        return isSetSerialNumber();
2832 chandransh 4255
      }
4256
      throw new IllegalStateException();
4257
    }
4258
 
4259
    @Override
4260
    public boolean equals(Object that) {
4261
      if (that == null)
4262
        return false;
4496 mandeep.dh 4263
      if (that instanceof getInventoryItem_args)
4264
        return this.equals((getInventoryItem_args)that);
2832 chandransh 4265
      return false;
4266
    }
4267
 
4496 mandeep.dh 4268
    public boolean equals(getInventoryItem_args that) {
2832 chandransh 4269
      if (that == null)
4270
        return false;
4271
 
4496 mandeep.dh 4272
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
4273
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
4274
      if (this_present_serialNumber || that_present_serialNumber) {
4275
        if (!(this_present_serialNumber && that_present_serialNumber))
2832 chandransh 4276
          return false;
4496 mandeep.dh 4277
        if (!this.serialNumber.equals(that.serialNumber))
2832 chandransh 4278
          return false;
4279
      }
4280
 
4281
      return true;
4282
    }
4283
 
4284
    @Override
4285
    public int hashCode() {
4286
      return 0;
4287
    }
4288
 
4496 mandeep.dh 4289
    public int compareTo(getInventoryItem_args other) {
2832 chandransh 4290
      if (!getClass().equals(other.getClass())) {
4291
        return getClass().getName().compareTo(other.getClass().getName());
4292
      }
4293
 
4294
      int lastComparison = 0;
4496 mandeep.dh 4295
      getInventoryItem_args typedOther = (getInventoryItem_args)other;
2832 chandransh 4296
 
4496 mandeep.dh 4297
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2832 chandransh 4298
      if (lastComparison != 0) {
4299
        return lastComparison;
4300
      }
4496 mandeep.dh 4301
      if (isSetSerialNumber()) {
4302
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 4303
        if (lastComparison != 0) {
4304
          return lastComparison;
4305
        }
2832 chandransh 4306
      }
4307
      return 0;
4308
    }
4309
 
3430 rajveer 4310
    public _Fields fieldForId(int fieldId) {
4311
      return _Fields.findByThriftId(fieldId);
4312
    }
4313
 
4314
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4315
      org.apache.thrift.protocol.TField field;
2832 chandransh 4316
      iprot.readStructBegin();
4317
      while (true)
4318
      {
4319
        field = iprot.readFieldBegin();
3430 rajveer 4320
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 4321
          break;
4322
        }
3430 rajveer 4323
        switch (field.id) {
4496 mandeep.dh 4324
          case 1: // SERIAL_NUMBER
4325
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
4326
              this.serialNumber = iprot.readString();
3430 rajveer 4327
            } else { 
4328
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4329
            }
4330
            break;
4331
          default:
4332
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 4333
        }
3430 rajveer 4334
        iprot.readFieldEnd();
2832 chandransh 4335
      }
4336
      iprot.readStructEnd();
4337
      validate();
4338
    }
4339
 
3430 rajveer 4340
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 4341
      validate();
4342
 
4343
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 4344
      if (this.serialNumber != null) {
4345
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
4346
        oprot.writeString(this.serialNumber);
4347
        oprot.writeFieldEnd();
4348
      }
2832 chandransh 4349
      oprot.writeFieldStop();
4350
      oprot.writeStructEnd();
4351
    }
4352
 
4353
    @Override
4354
    public String toString() {
4496 mandeep.dh 4355
      StringBuilder sb = new StringBuilder("getInventoryItem_args(");
2832 chandransh 4356
      boolean first = true;
4357
 
4496 mandeep.dh 4358
      sb.append("serialNumber:");
4359
      if (this.serialNumber == null) {
4360
        sb.append("null");
4361
      } else {
4362
        sb.append(this.serialNumber);
4363
      }
2832 chandransh 4364
      first = false;
4365
      sb.append(")");
4366
      return sb.toString();
4367
    }
4368
 
3430 rajveer 4369
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 4370
      // check for required fields
4371
    }
4372
 
3430 rajveer 4373
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4374
      try {
4375
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4376
      } catch (org.apache.thrift.TException te) {
4377
        throw new java.io.IOException(te);
4378
      }
4379
    }
4380
 
4381
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4382
      try {
4383
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4384
      } catch (org.apache.thrift.TException te) {
4385
        throw new java.io.IOException(te);
4386
      }
4387
    }
4388
 
2832 chandransh 4389
  }
4390
 
4496 mandeep.dh 4391
  public static class getInventoryItem_result implements org.apache.thrift.TBase<getInventoryItem_result, getInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
4392
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_result");
2832 chandransh 4393
 
3430 rajveer 4394
    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 4395
    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 4396
 
4496 mandeep.dh 4397
    private InventoryItem success; // required
4541 mandeep.dh 4398
    private WarehouseServiceException wex; // required
2832 chandransh 4399
 
4400
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4401
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4541 mandeep.dh 4402
      SUCCESS((short)0, "success"),
4403
      WEX((short)1, "wex");
2832 chandransh 4404
 
4405
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4406
 
4407
      static {
4408
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4409
          byName.put(field.getFieldName(), field);
4410
        }
4411
      }
4412
 
4413
      /**
4414
       * Find the _Fields constant that matches fieldId, or null if its not found.
4415
       */
4416
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4417
        switch(fieldId) {
4418
          case 0: // SUCCESS
4419
            return SUCCESS;
4541 mandeep.dh 4420
          case 1: // WEX
4421
            return WEX;
3430 rajveer 4422
          default:
4423
            return null;
4424
        }
2832 chandransh 4425
      }
4426
 
4427
      /**
4428
       * Find the _Fields constant that matches fieldId, throwing an exception
4429
       * if it is not found.
4430
       */
4431
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4432
        _Fields fields = findByThriftId(fieldId);
4433
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4434
        return fields;
4435
      }
4436
 
4437
      /**
4438
       * Find the _Fields constant that matches name, or null if its not found.
4439
       */
4440
      public static _Fields findByName(String name) {
4441
        return byName.get(name);
4442
      }
4443
 
4444
      private final short _thriftId;
4445
      private final String _fieldName;
4446
 
4447
      _Fields(short thriftId, String fieldName) {
4448
        _thriftId = thriftId;
4449
        _fieldName = fieldName;
4450
      }
4451
 
4452
      public short getThriftFieldId() {
4453
        return _thriftId;
4454
      }
4455
 
4456
      public String getFieldName() {
4457
        return _fieldName;
4458
      }
4459
    }
4460
 
4461
    // isset id assignments
4462
 
3430 rajveer 4463
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 4464
    static {
3430 rajveer 4465
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4466
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 4467
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4541 mandeep.dh 4468
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4469
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 4470
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4471
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_result.class, metaDataMap);
2832 chandransh 4472
    }
4473
 
4496 mandeep.dh 4474
    public getInventoryItem_result() {
2832 chandransh 4475
    }
4476
 
4496 mandeep.dh 4477
    public getInventoryItem_result(
4541 mandeep.dh 4478
      InventoryItem success,
4479
      WarehouseServiceException wex)
2832 chandransh 4480
    {
4481
      this();
4482
      this.success = success;
4541 mandeep.dh 4483
      this.wex = wex;
2832 chandransh 4484
    }
4485
 
4486
    /**
4487
     * Performs a deep copy on <i>other</i>.
4488
     */
4496 mandeep.dh 4489
    public getInventoryItem_result(getInventoryItem_result other) {
2832 chandransh 4490
      if (other.isSetSuccess()) {
4496 mandeep.dh 4491
        this.success = new InventoryItem(other.success);
2832 chandransh 4492
      }
4541 mandeep.dh 4493
      if (other.isSetWex()) {
4494
        this.wex = new WarehouseServiceException(other.wex);
4495
      }
2832 chandransh 4496
    }
4497
 
4496 mandeep.dh 4498
    public getInventoryItem_result deepCopy() {
4499
      return new getInventoryItem_result(this);
2832 chandransh 4500
    }
4501
 
3430 rajveer 4502
    @Override
4503
    public void clear() {
4504
      this.success = null;
4541 mandeep.dh 4505
      this.wex = null;
2832 chandransh 4506
    }
4507
 
4496 mandeep.dh 4508
    public InventoryItem getSuccess() {
2832 chandransh 4509
      return this.success;
4510
    }
4511
 
4496 mandeep.dh 4512
    public void setSuccess(InventoryItem success) {
2832 chandransh 4513
      this.success = success;
4514
    }
4515
 
4516
    public void unsetSuccess() {
4517
      this.success = null;
4518
    }
4519
 
3430 rajveer 4520
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2832 chandransh 4521
    public boolean isSetSuccess() {
4522
      return this.success != null;
4523
    }
4524
 
4525
    public void setSuccessIsSet(boolean value) {
4526
      if (!value) {
4527
        this.success = null;
4528
      }
4529
    }
4530
 
4541 mandeep.dh 4531
    public WarehouseServiceException getWex() {
4532
      return this.wex;
4533
    }
4534
 
4535
    public void setWex(WarehouseServiceException wex) {
4536
      this.wex = wex;
4537
    }
4538
 
4539
    public void unsetWex() {
4540
      this.wex = null;
4541
    }
4542
 
4543
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
4544
    public boolean isSetWex() {
4545
      return this.wex != null;
4546
    }
4547
 
4548
    public void setWexIsSet(boolean value) {
4549
      if (!value) {
4550
        this.wex = null;
4551
      }
4552
    }
4553
 
2832 chandransh 4554
    public void setFieldValue(_Fields field, Object value) {
4555
      switch (field) {
4556
      case SUCCESS:
4557
        if (value == null) {
4558
          unsetSuccess();
4559
        } else {
4496 mandeep.dh 4560
          setSuccess((InventoryItem)value);
2832 chandransh 4561
        }
4562
        break;
4563
 
4541 mandeep.dh 4564
      case WEX:
4565
        if (value == null) {
4566
          unsetWex();
4567
        } else {
4568
          setWex((WarehouseServiceException)value);
4569
        }
4570
        break;
4571
 
2832 chandransh 4572
      }
4573
    }
4574
 
4575
    public Object getFieldValue(_Fields field) {
4576
      switch (field) {
4577
      case SUCCESS:
4578
        return getSuccess();
4579
 
4541 mandeep.dh 4580
      case WEX:
4581
        return getWex();
4582
 
2832 chandransh 4583
      }
4584
      throw new IllegalStateException();
4585
    }
4586
 
3430 rajveer 4587
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4588
    public boolean isSet(_Fields field) {
4589
      if (field == null) {
4590
        throw new IllegalArgumentException();
4591
      }
2832 chandransh 4592
 
4593
      switch (field) {
4594
      case SUCCESS:
4595
        return isSetSuccess();
4541 mandeep.dh 4596
      case WEX:
4597
        return isSetWex();
2832 chandransh 4598
      }
4599
      throw new IllegalStateException();
4600
    }
4601
 
4602
    @Override
4603
    public boolean equals(Object that) {
4604
      if (that == null)
4605
        return false;
4496 mandeep.dh 4606
      if (that instanceof getInventoryItem_result)
4607
        return this.equals((getInventoryItem_result)that);
2832 chandransh 4608
      return false;
4609
    }
4610
 
4496 mandeep.dh 4611
    public boolean equals(getInventoryItem_result that) {
2832 chandransh 4612
      if (that == null)
4613
        return false;
4614
 
4615
      boolean this_present_success = true && this.isSetSuccess();
4616
      boolean that_present_success = true && that.isSetSuccess();
4617
      if (this_present_success || that_present_success) {
4618
        if (!(this_present_success && that_present_success))
4619
          return false;
4620
        if (!this.success.equals(that.success))
4621
          return false;
4622
      }
4623
 
4541 mandeep.dh 4624
      boolean this_present_wex = true && this.isSetWex();
4625
      boolean that_present_wex = true && that.isSetWex();
4626
      if (this_present_wex || that_present_wex) {
4627
        if (!(this_present_wex && that_present_wex))
4628
          return false;
4629
        if (!this.wex.equals(that.wex))
4630
          return false;
4631
      }
4632
 
2832 chandransh 4633
      return true;
4634
    }
4635
 
4636
    @Override
4637
    public int hashCode() {
4638
      return 0;
4639
    }
4640
 
4496 mandeep.dh 4641
    public int compareTo(getInventoryItem_result other) {
2832 chandransh 4642
      if (!getClass().equals(other.getClass())) {
4643
        return getClass().getName().compareTo(other.getClass().getName());
4644
      }
4645
 
4646
      int lastComparison = 0;
4496 mandeep.dh 4647
      getInventoryItem_result typedOther = (getInventoryItem_result)other;
2832 chandransh 4648
 
3430 rajveer 4649
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2832 chandransh 4650
      if (lastComparison != 0) {
4651
        return lastComparison;
4652
      }
3430 rajveer 4653
      if (isSetSuccess()) {
4654
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4655
        if (lastComparison != 0) {
4656
          return lastComparison;
4657
        }
2832 chandransh 4658
      }
4541 mandeep.dh 4659
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
4660
      if (lastComparison != 0) {
4661
        return lastComparison;
4662
      }
4663
      if (isSetWex()) {
4664
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
4665
        if (lastComparison != 0) {
4666
          return lastComparison;
4667
        }
4668
      }
2832 chandransh 4669
      return 0;
4670
    }
4671
 
3430 rajveer 4672
    public _Fields fieldForId(int fieldId) {
4673
      return _Fields.findByThriftId(fieldId);
4674
    }
4675
 
4676
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4677
      org.apache.thrift.protocol.TField field;
2832 chandransh 4678
      iprot.readStructBegin();
4679
      while (true)
4680
      {
4681
        field = iprot.readFieldBegin();
3430 rajveer 4682
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 4683
          break;
4684
        }
3430 rajveer 4685
        switch (field.id) {
4686
          case 0: // SUCCESS
4687
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4496 mandeep.dh 4688
              this.success = new InventoryItem();
3430 rajveer 4689
              this.success.read(iprot);
4690
            } else { 
4691
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4692
            }
4693
            break;
4541 mandeep.dh 4694
          case 1: // WEX
4695
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4696
              this.wex = new WarehouseServiceException();
4697
              this.wex.read(iprot);
4698
            } else { 
4699
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4700
            }
4701
            break;
3430 rajveer 4702
          default:
4703
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 4704
        }
3430 rajveer 4705
        iprot.readFieldEnd();
2832 chandransh 4706
      }
4707
      iprot.readStructEnd();
4708
      validate();
4709
    }
4710
 
3430 rajveer 4711
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 4712
      oprot.writeStructBegin(STRUCT_DESC);
4713
 
4714
      if (this.isSetSuccess()) {
4715
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4716
        this.success.write(oprot);
4717
        oprot.writeFieldEnd();
4541 mandeep.dh 4718
      } else if (this.isSetWex()) {
4719
        oprot.writeFieldBegin(WEX_FIELD_DESC);
4720
        this.wex.write(oprot);
4721
        oprot.writeFieldEnd();
2832 chandransh 4722
      }
4723
      oprot.writeFieldStop();
4724
      oprot.writeStructEnd();
4725
    }
4726
 
4727
    @Override
4728
    public String toString() {
4496 mandeep.dh 4729
      StringBuilder sb = new StringBuilder("getInventoryItem_result(");
2832 chandransh 4730
      boolean first = true;
4731
 
4732
      sb.append("success:");
4733
      if (this.success == null) {
4734
        sb.append("null");
4735
      } else {
4736
        sb.append(this.success);
4737
      }
4738
      first = false;
4541 mandeep.dh 4739
      if (!first) sb.append(", ");
4740
      sb.append("wex:");
4741
      if (this.wex == null) {
4742
        sb.append("null");
4743
      } else {
4744
        sb.append(this.wex);
4745
      }
4746
      first = false;
2832 chandransh 4747
      sb.append(")");
4748
      return sb.toString();
4749
    }
4750
 
3430 rajveer 4751
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 4752
      // check for required fields
4753
    }
4754
 
3430 rajveer 4755
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4756
      try {
4757
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4758
      } catch (org.apache.thrift.TException te) {
4759
        throw new java.io.IOException(te);
4760
      }
4761
    }
4762
 
4763
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4764
      try {
4765
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4766
      } catch (org.apache.thrift.TException te) {
4767
        throw new java.io.IOException(te);
4768
      }
4769
    }
4770
 
2832 chandransh 4771
  }
4772
 
4496 mandeep.dh 4773
  public static class getNonSeralizedInventoryItems_args implements org.apache.thrift.TBase<getNonSeralizedInventoryItems_args, getNonSeralizedInventoryItems_args._Fields>, java.io.Serializable, Cloneable   {
4774
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItems_args");
2820 chandransh 4775
 
4496 mandeep.dh 4776
    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);
4777
    private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.I64, (short)2);
4778
    private static final org.apache.thrift.protocol.TField SUPPLIER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("supplierId", org.apache.thrift.protocol.TType.I64, (short)3);
2820 chandransh 4779
 
4496 mandeep.dh 4780
    private long itemId; // required
4781
    private long quantity; // required
4782
    private long supplierId; // required
2820 chandransh 4783
 
4784
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4785
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 4786
      ITEM_ID((short)1, "itemId"),
4787
      QUANTITY((short)2, "quantity"),
4788
      SUPPLIER_ID((short)3, "supplierId");
2820 chandransh 4789
 
4790
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4791
 
4792
      static {
4793
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4794
          byName.put(field.getFieldName(), field);
4795
        }
4796
      }
4797
 
4798
      /**
4799
       * Find the _Fields constant that matches fieldId, or null if its not found.
4800
       */
4801
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4802
        switch(fieldId) {
4496 mandeep.dh 4803
          case 1: // ITEM_ID
4804
            return ITEM_ID;
4805
          case 2: // QUANTITY
4806
            return QUANTITY;
4807
          case 3: // SUPPLIER_ID
4808
            return SUPPLIER_ID;
3430 rajveer 4809
          default:
4810
            return null;
4811
        }
2820 chandransh 4812
      }
4813
 
4814
      /**
4815
       * Find the _Fields constant that matches fieldId, throwing an exception
4816
       * if it is not found.
4817
       */
4818
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4819
        _Fields fields = findByThriftId(fieldId);
4820
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4821
        return fields;
4822
      }
4823
 
4824
      /**
4825
       * Find the _Fields constant that matches name, or null if its not found.
4826
       */
4827
      public static _Fields findByName(String name) {
4828
        return byName.get(name);
4829
      }
4830
 
4831
      private final short _thriftId;
4832
      private final String _fieldName;
4833
 
4834
      _Fields(short thriftId, String fieldName) {
4835
        _thriftId = thriftId;
4836
        _fieldName = fieldName;
4837
      }
4838
 
4839
      public short getThriftFieldId() {
4840
        return _thriftId;
4841
      }
4842
 
4843
      public String getFieldName() {
4844
        return _fieldName;
4845
      }
4846
    }
4847
 
4848
    // isset id assignments
4496 mandeep.dh 4849
    private static final int __ITEMID_ISSET_ID = 0;
4850
    private static final int __QUANTITY_ISSET_ID = 1;
4851
    private static final int __SUPPLIERID_ISSET_ID = 2;
4852
    private BitSet __isset_bit_vector = new BitSet(3);
2820 chandransh 4853
 
3430 rajveer 4854
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 4855
    static {
3430 rajveer 4856
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 4857
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3430 rajveer 4858
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4496 mandeep.dh 4859
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4860
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4861
      tmpMap.put(_Fields.SUPPLIER_ID, new org.apache.thrift.meta_data.FieldMetaData("supplierId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4862
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 4863
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4864
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItems_args.class, metaDataMap);
2820 chandransh 4865
    }
4866
 
4496 mandeep.dh 4867
    public getNonSeralizedInventoryItems_args() {
2820 chandransh 4868
    }
4869
 
4496 mandeep.dh 4870
    public getNonSeralizedInventoryItems_args(
4871
      long itemId,
4872
      long quantity,
4873
      long supplierId)
2820 chandransh 4874
    {
4875
      this();
4496 mandeep.dh 4876
      this.itemId = itemId;
4877
      setItemIdIsSet(true);
4878
      this.quantity = quantity;
4879
      setQuantityIsSet(true);
4880
      this.supplierId = supplierId;
4881
      setSupplierIdIsSet(true);
2820 chandransh 4882
    }
4883
 
4884
    /**
4885
     * Performs a deep copy on <i>other</i>.
4886
     */
4496 mandeep.dh 4887
    public getNonSeralizedInventoryItems_args(getNonSeralizedInventoryItems_args other) {
2820 chandransh 4888
      __isset_bit_vector.clear();
4889
      __isset_bit_vector.or(other.__isset_bit_vector);
4496 mandeep.dh 4890
      this.itemId = other.itemId;
4891
      this.quantity = other.quantity;
4892
      this.supplierId = other.supplierId;
2820 chandransh 4893
    }
4894
 
4496 mandeep.dh 4895
    public getNonSeralizedInventoryItems_args deepCopy() {
4896
      return new getNonSeralizedInventoryItems_args(this);
2820 chandransh 4897
    }
4898
 
3430 rajveer 4899
    @Override
4900
    public void clear() {
4496 mandeep.dh 4901
      setItemIdIsSet(false);
4902
      this.itemId = 0;
4903
      setQuantityIsSet(false);
4904
      this.quantity = 0;
4905
      setSupplierIdIsSet(false);
4906
      this.supplierId = 0;
2820 chandransh 4907
    }
4908
 
4496 mandeep.dh 4909
    public long getItemId() {
4910
      return this.itemId;
2820 chandransh 4911
    }
4912
 
4496 mandeep.dh 4913
    public void setItemId(long itemId) {
4914
      this.itemId = itemId;
4915
      setItemIdIsSet(true);
2820 chandransh 4916
    }
4917
 
4496 mandeep.dh 4918
    public void unsetItemId() {
4919
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
2820 chandransh 4920
    }
4921
 
4496 mandeep.dh 4922
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
4923
    public boolean isSetItemId() {
4924
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
2820 chandransh 4925
    }
4926
 
4496 mandeep.dh 4927
    public void setItemIdIsSet(boolean value) {
4928
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
2820 chandransh 4929
    }
4930
 
4496 mandeep.dh 4931
    public long getQuantity() {
4932
      return this.quantity;
2820 chandransh 4933
    }
4934
 
4496 mandeep.dh 4935
    public void setQuantity(long quantity) {
4936
      this.quantity = quantity;
4937
      setQuantityIsSet(true);
2820 chandransh 4938
    }
4939
 
4496 mandeep.dh 4940
    public void unsetQuantity() {
4941
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
2820 chandransh 4942
    }
4943
 
4496 mandeep.dh 4944
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
4945
    public boolean isSetQuantity() {
4946
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
2820 chandransh 4947
    }
4948
 
4496 mandeep.dh 4949
    public void setQuantityIsSet(boolean value) {
4950
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
2820 chandransh 4951
    }
4952
 
4496 mandeep.dh 4953
    public long getSupplierId() {
4954
      return this.supplierId;
2820 chandransh 4955
    }
4956
 
4496 mandeep.dh 4957
    public void setSupplierId(long supplierId) {
4958
      this.supplierId = supplierId;
4959
      setSupplierIdIsSet(true);
2820 chandransh 4960
    }
4961
 
4496 mandeep.dh 4962
    public void unsetSupplierId() {
4963
      __isset_bit_vector.clear(__SUPPLIERID_ISSET_ID);
2820 chandransh 4964
    }
4965
 
4496 mandeep.dh 4966
    /** Returns true if field supplierId is set (has been assigned a value) and false otherwise */
4967
    public boolean isSetSupplierId() {
4968
      return __isset_bit_vector.get(__SUPPLIERID_ISSET_ID);
2820 chandransh 4969
    }
4970
 
4496 mandeep.dh 4971
    public void setSupplierIdIsSet(boolean value) {
4972
      __isset_bit_vector.set(__SUPPLIERID_ISSET_ID, value);
2820 chandransh 4973
    }
4974
 
4975
    public void setFieldValue(_Fields field, Object value) {
4976
      switch (field) {
4496 mandeep.dh 4977
      case ITEM_ID:
2820 chandransh 4978
        if (value == null) {
4496 mandeep.dh 4979
          unsetItemId();
2820 chandransh 4980
        } else {
4496 mandeep.dh 4981
          setItemId((Long)value);
2820 chandransh 4982
        }
4983
        break;
4984
 
4496 mandeep.dh 4985
      case QUANTITY:
2820 chandransh 4986
        if (value == null) {
4496 mandeep.dh 4987
          unsetQuantity();
2820 chandransh 4988
        } else {
4496 mandeep.dh 4989
          setQuantity((Long)value);
2820 chandransh 4990
        }
4991
        break;
4992
 
4496 mandeep.dh 4993
      case SUPPLIER_ID:
2820 chandransh 4994
        if (value == null) {
4496 mandeep.dh 4995
          unsetSupplierId();
2820 chandransh 4996
        } else {
4496 mandeep.dh 4997
          setSupplierId((Long)value);
2820 chandransh 4998
        }
4999
        break;
5000
 
5001
      }
5002
    }
5003
 
5004
    public Object getFieldValue(_Fields field) {
5005
      switch (field) {
4496 mandeep.dh 5006
      case ITEM_ID:
5007
        return Long.valueOf(getItemId());
2820 chandransh 5008
 
4496 mandeep.dh 5009
      case QUANTITY:
5010
        return Long.valueOf(getQuantity());
2820 chandransh 5011
 
4496 mandeep.dh 5012
      case SUPPLIER_ID:
5013
        return Long.valueOf(getSupplierId());
2820 chandransh 5014
 
5015
      }
5016
      throw new IllegalStateException();
5017
    }
5018
 
3430 rajveer 5019
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5020
    public boolean isSet(_Fields field) {
5021
      if (field == null) {
5022
        throw new IllegalArgumentException();
5023
      }
2820 chandransh 5024
 
5025
      switch (field) {
4496 mandeep.dh 5026
      case ITEM_ID:
5027
        return isSetItemId();
5028
      case QUANTITY:
5029
        return isSetQuantity();
5030
      case SUPPLIER_ID:
5031
        return isSetSupplierId();
2820 chandransh 5032
      }
5033
      throw new IllegalStateException();
5034
    }
5035
 
5036
    @Override
5037
    public boolean equals(Object that) {
5038
      if (that == null)
5039
        return false;
4496 mandeep.dh 5040
      if (that instanceof getNonSeralizedInventoryItems_args)
5041
        return this.equals((getNonSeralizedInventoryItems_args)that);
2820 chandransh 5042
      return false;
5043
    }
5044
 
4496 mandeep.dh 5045
    public boolean equals(getNonSeralizedInventoryItems_args that) {
2820 chandransh 5046
      if (that == null)
5047
        return false;
5048
 
4496 mandeep.dh 5049
      boolean this_present_itemId = true;
5050
      boolean that_present_itemId = true;
5051
      if (this_present_itemId || that_present_itemId) {
5052
        if (!(this_present_itemId && that_present_itemId))
2820 chandransh 5053
          return false;
4496 mandeep.dh 5054
        if (this.itemId != that.itemId)
2820 chandransh 5055
          return false;
5056
      }
5057
 
4496 mandeep.dh 5058
      boolean this_present_quantity = true;
5059
      boolean that_present_quantity = true;
5060
      if (this_present_quantity || that_present_quantity) {
5061
        if (!(this_present_quantity && that_present_quantity))
2820 chandransh 5062
          return false;
4496 mandeep.dh 5063
        if (this.quantity != that.quantity)
2820 chandransh 5064
          return false;
5065
      }
5066
 
4496 mandeep.dh 5067
      boolean this_present_supplierId = true;
5068
      boolean that_present_supplierId = true;
5069
      if (this_present_supplierId || that_present_supplierId) {
5070
        if (!(this_present_supplierId && that_present_supplierId))
2820 chandransh 5071
          return false;
4496 mandeep.dh 5072
        if (this.supplierId != that.supplierId)
2820 chandransh 5073
          return false;
5074
      }
5075
 
5076
      return true;
5077
    }
5078
 
5079
    @Override
5080
    public int hashCode() {
5081
      return 0;
5082
    }
5083
 
4496 mandeep.dh 5084
    public int compareTo(getNonSeralizedInventoryItems_args other) {
2820 chandransh 5085
      if (!getClass().equals(other.getClass())) {
5086
        return getClass().getName().compareTo(other.getClass().getName());
5087
      }
5088
 
5089
      int lastComparison = 0;
4496 mandeep.dh 5090
      getNonSeralizedInventoryItems_args typedOther = (getNonSeralizedInventoryItems_args)other;
2820 chandransh 5091
 
4496 mandeep.dh 5092
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
2820 chandransh 5093
      if (lastComparison != 0) {
5094
        return lastComparison;
5095
      }
4496 mandeep.dh 5096
      if (isSetItemId()) {
5097
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
3430 rajveer 5098
        if (lastComparison != 0) {
5099
          return lastComparison;
5100
        }
2820 chandransh 5101
      }
4496 mandeep.dh 5102
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
2820 chandransh 5103
      if (lastComparison != 0) {
5104
        return lastComparison;
5105
      }
4496 mandeep.dh 5106
      if (isSetQuantity()) {
5107
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
3430 rajveer 5108
        if (lastComparison != 0) {
5109
          return lastComparison;
5110
        }
2820 chandransh 5111
      }
4496 mandeep.dh 5112
      lastComparison = Boolean.valueOf(isSetSupplierId()).compareTo(typedOther.isSetSupplierId());
2820 chandransh 5113
      if (lastComparison != 0) {
5114
        return lastComparison;
5115
      }
4496 mandeep.dh 5116
      if (isSetSupplierId()) {
5117
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.supplierId, typedOther.supplierId);
3430 rajveer 5118
        if (lastComparison != 0) {
5119
          return lastComparison;
5120
        }
2820 chandransh 5121
      }
5122
      return 0;
5123
    }
5124
 
3430 rajveer 5125
    public _Fields fieldForId(int fieldId) {
5126
      return _Fields.findByThriftId(fieldId);
5127
    }
5128
 
5129
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5130
      org.apache.thrift.protocol.TField field;
2820 chandransh 5131
      iprot.readStructBegin();
5132
      while (true)
5133
      {
5134
        field = iprot.readFieldBegin();
3430 rajveer 5135
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 5136
          break;
5137
        }
3430 rajveer 5138
        switch (field.id) {
4496 mandeep.dh 5139
          case 1: // ITEM_ID
3430 rajveer 5140
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4496 mandeep.dh 5141
              this.itemId = iprot.readI64();
5142
              setItemIdIsSet(true);
3430 rajveer 5143
            } else { 
5144
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5145
            }
5146
            break;
4496 mandeep.dh 5147
          case 2: // QUANTITY
5148
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5149
              this.quantity = iprot.readI64();
5150
              setQuantityIsSet(true);
3430 rajveer 5151
            } else { 
5152
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5153
            }
5154
            break;
4496 mandeep.dh 5155
          case 3: // SUPPLIER_ID
5156
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5157
              this.supplierId = iprot.readI64();
5158
              setSupplierIdIsSet(true);
3430 rajveer 5159
            } else { 
5160
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5161
            }
5162
            break;
5163
          default:
5164
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 5165
        }
3430 rajveer 5166
        iprot.readFieldEnd();
2820 chandransh 5167
      }
5168
      iprot.readStructEnd();
5169
      validate();
5170
    }
5171
 
3430 rajveer 5172
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 5173
      validate();
5174
 
5175
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 5176
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
5177
      oprot.writeI64(this.itemId);
2820 chandransh 5178
      oprot.writeFieldEnd();
4496 mandeep.dh 5179
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
5180
      oprot.writeI64(this.quantity);
2820 chandransh 5181
      oprot.writeFieldEnd();
4496 mandeep.dh 5182
      oprot.writeFieldBegin(SUPPLIER_ID_FIELD_DESC);
5183
      oprot.writeI64(this.supplierId);
5184
      oprot.writeFieldEnd();
2820 chandransh 5185
      oprot.writeFieldStop();
5186
      oprot.writeStructEnd();
5187
    }
5188
 
5189
    @Override
5190
    public String toString() {
4496 mandeep.dh 5191
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItems_args(");
2820 chandransh 5192
      boolean first = true;
5193
 
4496 mandeep.dh 5194
      sb.append("itemId:");
5195
      sb.append(this.itemId);
2820 chandransh 5196
      first = false;
5197
      if (!first) sb.append(", ");
4496 mandeep.dh 5198
      sb.append("quantity:");
5199
      sb.append(this.quantity);
2820 chandransh 5200
      first = false;
5201
      if (!first) sb.append(", ");
4496 mandeep.dh 5202
      sb.append("supplierId:");
5203
      sb.append(this.supplierId);
2820 chandransh 5204
      first = false;
5205
      sb.append(")");
5206
      return sb.toString();
5207
    }
5208
 
3430 rajveer 5209
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 5210
      // check for required fields
5211
    }
5212
 
3430 rajveer 5213
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5214
      try {
5215
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5216
      } catch (org.apache.thrift.TException te) {
5217
        throw new java.io.IOException(te);
5218
      }
5219
    }
5220
 
5221
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5222
      try {
4496 mandeep.dh 5223
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
5224
        __isset_bit_vector = new BitSet(1);
3430 rajveer 5225
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5226
      } catch (org.apache.thrift.TException te) {
5227
        throw new java.io.IOException(te);
5228
      }
5229
    }
5230
 
2820 chandransh 5231
  }
5232
 
4496 mandeep.dh 5233
  public static class getNonSeralizedInventoryItems_result implements org.apache.thrift.TBase<getNonSeralizedInventoryItems_result, getNonSeralizedInventoryItems_result._Fields>, java.io.Serializable, Cloneable   {
5234
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItems_result");
2820 chandransh 5235
 
4496 mandeep.dh 5236
    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);
2820 chandransh 5237
 
4496 mandeep.dh 5238
    private List<InventoryItem> success; // required
2820 chandransh 5239
 
5240
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 5241
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 5242
      SUCCESS((short)0, "success");
2820 chandransh 5243
 
5244
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5245
 
5246
      static {
5247
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5248
          byName.put(field.getFieldName(), field);
5249
        }
5250
      }
5251
 
5252
      /**
5253
       * Find the _Fields constant that matches fieldId, or null if its not found.
5254
       */
5255
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 5256
        switch(fieldId) {
5257
          case 0: // SUCCESS
5258
            return SUCCESS;
5259
          default:
5260
            return null;
5261
        }
2820 chandransh 5262
      }
5263
 
5264
      /**
5265
       * Find the _Fields constant that matches fieldId, throwing an exception
5266
       * if it is not found.
5267
       */
5268
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5269
        _Fields fields = findByThriftId(fieldId);
5270
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5271
        return fields;
5272
      }
5273
 
5274
      /**
5275
       * Find the _Fields constant that matches name, or null if its not found.
5276
       */
5277
      public static _Fields findByName(String name) {
5278
        return byName.get(name);
5279
      }
5280
 
5281
      private final short _thriftId;
5282
      private final String _fieldName;
5283
 
5284
      _Fields(short thriftId, String fieldName) {
5285
        _thriftId = thriftId;
5286
        _fieldName = fieldName;
5287
      }
5288
 
5289
      public short getThriftFieldId() {
5290
        return _thriftId;
5291
      }
5292
 
5293
      public String getFieldName() {
5294
        return _fieldName;
5295
      }
5296
    }
5297
 
5298
    // isset id assignments
5299
 
3430 rajveer 5300
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 5301
    static {
3430 rajveer 5302
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5303
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 5304
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
5305
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
3430 rajveer 5306
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 5307
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItems_result.class, metaDataMap);
2820 chandransh 5308
    }
5309
 
4496 mandeep.dh 5310
    public getNonSeralizedInventoryItems_result() {
2820 chandransh 5311
    }
5312
 
4496 mandeep.dh 5313
    public getNonSeralizedInventoryItems_result(
5314
      List<InventoryItem> success)
2820 chandransh 5315
    {
5316
      this();
5317
      this.success = success;
5318
    }
5319
 
5320
    /**
5321
     * Performs a deep copy on <i>other</i>.
5322
     */
4496 mandeep.dh 5323
    public getNonSeralizedInventoryItems_result(getNonSeralizedInventoryItems_result other) {
5324
      if (other.isSetSuccess()) {
5325
        List<InventoryItem> __this__success = new ArrayList<InventoryItem>();
5326
        for (InventoryItem other_element : other.success) {
5327
          __this__success.add(new InventoryItem(other_element));
5328
        }
5329
        this.success = __this__success;
2820 chandransh 5330
      }
5331
    }
5332
 
4496 mandeep.dh 5333
    public getNonSeralizedInventoryItems_result deepCopy() {
5334
      return new getNonSeralizedInventoryItems_result(this);
2820 chandransh 5335
    }
5336
 
3430 rajveer 5337
    @Override
5338
    public void clear() {
4496 mandeep.dh 5339
      this.success = null;
2820 chandransh 5340
    }
5341
 
4496 mandeep.dh 5342
    public int getSuccessSize() {
5343
      return (this.success == null) ? 0 : this.success.size();
5344
    }
5345
 
5346
    public java.util.Iterator<InventoryItem> getSuccessIterator() {
5347
      return (this.success == null) ? null : this.success.iterator();
5348
    }
5349
 
5350
    public void addToSuccess(InventoryItem elem) {
5351
      if (this.success == null) {
5352
        this.success = new ArrayList<InventoryItem>();
5353
      }
5354
      this.success.add(elem);
5355
    }
5356
 
5357
    public List<InventoryItem> getSuccess() {
2820 chandransh 5358
      return this.success;
5359
    }
5360
 
4496 mandeep.dh 5361
    public void setSuccess(List<InventoryItem> success) {
2820 chandransh 5362
      this.success = success;
5363
    }
5364
 
5365
    public void unsetSuccess() {
4496 mandeep.dh 5366
      this.success = null;
2820 chandransh 5367
    }
5368
 
3430 rajveer 5369
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2820 chandransh 5370
    public boolean isSetSuccess() {
4496 mandeep.dh 5371
      return this.success != null;
2820 chandransh 5372
    }
5373
 
5374
    public void setSuccessIsSet(boolean value) {
4496 mandeep.dh 5375
      if (!value) {
5376
        this.success = null;
5377
      }
2820 chandransh 5378
    }
5379
 
4496 mandeep.dh 5380
    public void setFieldValue(_Fields field, Object value) {
5381
      switch (field) {
5382
      case SUCCESS:
5383
        if (value == null) {
5384
          unsetSuccess();
5385
        } else {
5386
          setSuccess((List<InventoryItem>)value);
5387
        }
5388
        break;
5389
 
5390
      }
2820 chandransh 5391
    }
5392
 
4496 mandeep.dh 5393
    public Object getFieldValue(_Fields field) {
5394
      switch (field) {
5395
      case SUCCESS:
5396
        return getSuccess();
5397
 
5398
      }
5399
      throw new IllegalStateException();
2820 chandransh 5400
    }
5401
 
4496 mandeep.dh 5402
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5403
    public boolean isSet(_Fields field) {
5404
      if (field == null) {
5405
        throw new IllegalArgumentException();
5406
      }
5407
 
5408
      switch (field) {
5409
      case SUCCESS:
5410
        return isSetSuccess();
5411
      }
5412
      throw new IllegalStateException();
2820 chandransh 5413
    }
5414
 
4496 mandeep.dh 5415
    @Override
5416
    public boolean equals(Object that) {
5417
      if (that == null)
5418
        return false;
5419
      if (that instanceof getNonSeralizedInventoryItems_result)
5420
        return this.equals((getNonSeralizedInventoryItems_result)that);
5421
      return false;
2820 chandransh 5422
    }
5423
 
4496 mandeep.dh 5424
    public boolean equals(getNonSeralizedInventoryItems_result that) {
5425
      if (that == null)
5426
        return false;
5427
 
5428
      boolean this_present_success = true && this.isSetSuccess();
5429
      boolean that_present_success = true && that.isSetSuccess();
5430
      if (this_present_success || that_present_success) {
5431
        if (!(this_present_success && that_present_success))
5432
          return false;
5433
        if (!this.success.equals(that.success))
5434
          return false;
2820 chandransh 5435
      }
4496 mandeep.dh 5436
 
5437
      return true;
2820 chandransh 5438
    }
5439
 
4496 mandeep.dh 5440
    @Override
5441
    public int hashCode() {
5442
      return 0;
5443
    }
5444
 
5445
    public int compareTo(getNonSeralizedInventoryItems_result other) {
5446
      if (!getClass().equals(other.getClass())) {
5447
        return getClass().getName().compareTo(other.getClass().getName());
5448
      }
5449
 
5450
      int lastComparison = 0;
5451
      getNonSeralizedInventoryItems_result typedOther = (getNonSeralizedInventoryItems_result)other;
5452
 
5453
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5454
      if (lastComparison != 0) {
5455
        return lastComparison;
5456
      }
5457
      if (isSetSuccess()) {
5458
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5459
        if (lastComparison != 0) {
5460
          return lastComparison;
5461
        }
5462
      }
5463
      return 0;
5464
    }
5465
 
5466
    public _Fields fieldForId(int fieldId) {
5467
      return _Fields.findByThriftId(fieldId);
5468
    }
5469
 
5470
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5471
      org.apache.thrift.protocol.TField field;
5472
      iprot.readStructBegin();
5473
      while (true)
5474
      {
5475
        field = iprot.readFieldBegin();
5476
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5477
          break;
5478
        }
5479
        switch (field.id) {
5480
          case 0: // SUCCESS
5481
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
5482
              {
5483
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
5484
                this.success = new ArrayList<InventoryItem>(_list0.size);
5485
                for (int _i1 = 0; _i1 < _list0.size; ++_i1)
5486
                {
5487
                  InventoryItem _elem2; // required
5488
                  _elem2 = new InventoryItem();
5489
                  _elem2.read(iprot);
5490
                  this.success.add(_elem2);
5491
                }
5492
                iprot.readListEnd();
5493
              }
5494
            } else { 
5495
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5496
            }
5497
            break;
5498
          default:
5499
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5500
        }
5501
        iprot.readFieldEnd();
5502
      }
5503
      iprot.readStructEnd();
5504
      validate();
5505
    }
5506
 
5507
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5508
      oprot.writeStructBegin(STRUCT_DESC);
5509
 
5510
      if (this.isSetSuccess()) {
5511
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5512
        {
5513
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
5514
          for (InventoryItem _iter3 : this.success)
5515
          {
5516
            _iter3.write(oprot);
5517
          }
5518
          oprot.writeListEnd();
5519
        }
5520
        oprot.writeFieldEnd();
5521
      }
5522
      oprot.writeFieldStop();
5523
      oprot.writeStructEnd();
5524
    }
5525
 
5526
    @Override
5527
    public String toString() {
5528
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItems_result(");
5529
      boolean first = true;
5530
 
5531
      sb.append("success:");
5532
      if (this.success == null) {
5533
        sb.append("null");
5534
      } else {
5535
        sb.append(this.success);
5536
      }
5537
      first = false;
5538
      sb.append(")");
5539
      return sb.toString();
5540
    }
5541
 
5542
    public void validate() throws org.apache.thrift.TException {
5543
      // check for required fields
5544
    }
5545
 
5546
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5547
      try {
5548
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5549
      } catch (org.apache.thrift.TException te) {
5550
        throw new java.io.IOException(te);
5551
      }
5552
    }
5553
 
5554
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5555
      try {
5556
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5557
      } catch (org.apache.thrift.TException te) {
5558
        throw new java.io.IOException(te);
5559
      }
5560
    }
5561
 
5562
  }
5563
 
5564
  public static class getInventoryItems_args implements org.apache.thrift.TBase<getInventoryItems_args, getInventoryItems_args._Fields>, java.io.Serializable, Cloneable   {
5565
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItems_args");
5566
 
5567
    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);
5568
 
5569
    private long itemId; // required
5570
 
5571
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5572
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5573
      ITEM_ID((short)1, "itemId");
5574
 
5575
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5576
 
5577
      static {
5578
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5579
          byName.put(field.getFieldName(), field);
5580
        }
5581
      }
5582
 
5583
      /**
5584
       * Find the _Fields constant that matches fieldId, or null if its not found.
5585
       */
5586
      public static _Fields findByThriftId(int fieldId) {
5587
        switch(fieldId) {
5588
          case 1: // ITEM_ID
5589
            return ITEM_ID;
5590
          default:
5591
            return null;
5592
        }
5593
      }
5594
 
5595
      /**
5596
       * Find the _Fields constant that matches fieldId, throwing an exception
5597
       * if it is not found.
5598
       */
5599
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5600
        _Fields fields = findByThriftId(fieldId);
5601
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5602
        return fields;
5603
      }
5604
 
5605
      /**
5606
       * Find the _Fields constant that matches name, or null if its not found.
5607
       */
5608
      public static _Fields findByName(String name) {
5609
        return byName.get(name);
5610
      }
5611
 
5612
      private final short _thriftId;
5613
      private final String _fieldName;
5614
 
5615
      _Fields(short thriftId, String fieldName) {
5616
        _thriftId = thriftId;
5617
        _fieldName = fieldName;
5618
      }
5619
 
5620
      public short getThriftFieldId() {
5621
        return _thriftId;
5622
      }
5623
 
5624
      public String getFieldName() {
5625
        return _fieldName;
5626
      }
5627
    }
5628
 
5629
    // isset id assignments
5630
    private static final int __ITEMID_ISSET_ID = 0;
5631
    private BitSet __isset_bit_vector = new BitSet(1);
5632
 
5633
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5634
    static {
5635
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5636
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5637
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5638
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5639
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItems_args.class, metaDataMap);
5640
    }
5641
 
5642
    public getInventoryItems_args() {
5643
    }
5644
 
5645
    public getInventoryItems_args(
5646
      long itemId)
5647
    {
5648
      this();
5649
      this.itemId = itemId;
5650
      setItemIdIsSet(true);
5651
    }
5652
 
5653
    /**
5654
     * Performs a deep copy on <i>other</i>.
5655
     */
5656
    public getInventoryItems_args(getInventoryItems_args other) {
5657
      __isset_bit_vector.clear();
5658
      __isset_bit_vector.or(other.__isset_bit_vector);
5659
      this.itemId = other.itemId;
5660
    }
5661
 
5662
    public getInventoryItems_args deepCopy() {
5663
      return new getInventoryItems_args(this);
5664
    }
5665
 
5666
    @Override
5667
    public void clear() {
5668
      setItemIdIsSet(false);
5669
      this.itemId = 0;
5670
    }
5671
 
5672
    public long getItemId() {
5673
      return this.itemId;
5674
    }
5675
 
5676
    public void setItemId(long itemId) {
5677
      this.itemId = itemId;
5678
      setItemIdIsSet(true);
5679
    }
5680
 
5681
    public void unsetItemId() {
5682
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
5683
    }
5684
 
5685
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
5686
    public boolean isSetItemId() {
5687
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
5688
    }
5689
 
5690
    public void setItemIdIsSet(boolean value) {
5691
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
5692
    }
5693
 
2820 chandransh 5694
    public void setFieldValue(_Fields field, Object value) {
5695
      switch (field) {
4496 mandeep.dh 5696
      case ITEM_ID:
2820 chandransh 5697
        if (value == null) {
4496 mandeep.dh 5698
          unsetItemId();
2820 chandransh 5699
        } else {
4496 mandeep.dh 5700
          setItemId((Long)value);
2820 chandransh 5701
        }
5702
        break;
5703
 
4496 mandeep.dh 5704
      }
5705
    }
5706
 
5707
    public Object getFieldValue(_Fields field) {
5708
      switch (field) {
5709
      case ITEM_ID:
5710
        return Long.valueOf(getItemId());
5711
 
5712
      }
5713
      throw new IllegalStateException();
5714
    }
5715
 
5716
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5717
    public boolean isSet(_Fields field) {
5718
      if (field == null) {
5719
        throw new IllegalArgumentException();
5720
      }
5721
 
5722
      switch (field) {
5723
      case ITEM_ID:
5724
        return isSetItemId();
5725
      }
5726
      throw new IllegalStateException();
5727
    }
5728
 
5729
    @Override
5730
    public boolean equals(Object that) {
5731
      if (that == null)
5732
        return false;
5733
      if (that instanceof getInventoryItems_args)
5734
        return this.equals((getInventoryItems_args)that);
5735
      return false;
5736
    }
5737
 
5738
    public boolean equals(getInventoryItems_args that) {
5739
      if (that == null)
5740
        return false;
5741
 
5742
      boolean this_present_itemId = true;
5743
      boolean that_present_itemId = true;
5744
      if (this_present_itemId || that_present_itemId) {
5745
        if (!(this_present_itemId && that_present_itemId))
5746
          return false;
5747
        if (this.itemId != that.itemId)
5748
          return false;
5749
      }
5750
 
5751
      return true;
5752
    }
5753
 
5754
    @Override
5755
    public int hashCode() {
5756
      return 0;
5757
    }
5758
 
5759
    public int compareTo(getInventoryItems_args other) {
5760
      if (!getClass().equals(other.getClass())) {
5761
        return getClass().getName().compareTo(other.getClass().getName());
5762
      }
5763
 
5764
      int lastComparison = 0;
5765
      getInventoryItems_args typedOther = (getInventoryItems_args)other;
5766
 
5767
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
5768
      if (lastComparison != 0) {
5769
        return lastComparison;
5770
      }
5771
      if (isSetItemId()) {
5772
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
5773
        if (lastComparison != 0) {
5774
          return lastComparison;
5775
        }
5776
      }
5777
      return 0;
5778
    }
5779
 
5780
    public _Fields fieldForId(int fieldId) {
5781
      return _Fields.findByThriftId(fieldId);
5782
    }
5783
 
5784
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5785
      org.apache.thrift.protocol.TField field;
5786
      iprot.readStructBegin();
5787
      while (true)
5788
      {
5789
        field = iprot.readFieldBegin();
5790
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5791
          break;
5792
        }
5793
        switch (field.id) {
5794
          case 1: // ITEM_ID
5795
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5796
              this.itemId = iprot.readI64();
5797
              setItemIdIsSet(true);
5798
            } else { 
5799
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5800
            }
5801
            break;
5802
          default:
5803
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5804
        }
5805
        iprot.readFieldEnd();
5806
      }
5807
      iprot.readStructEnd();
5808
      validate();
5809
    }
5810
 
5811
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5812
      validate();
5813
 
5814
      oprot.writeStructBegin(STRUCT_DESC);
5815
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
5816
      oprot.writeI64(this.itemId);
5817
      oprot.writeFieldEnd();
5818
      oprot.writeFieldStop();
5819
      oprot.writeStructEnd();
5820
    }
5821
 
5822
    @Override
5823
    public String toString() {
5824
      StringBuilder sb = new StringBuilder("getInventoryItems_args(");
5825
      boolean first = true;
5826
 
5827
      sb.append("itemId:");
5828
      sb.append(this.itemId);
5829
      first = false;
5830
      sb.append(")");
5831
      return sb.toString();
5832
    }
5833
 
5834
    public void validate() throws org.apache.thrift.TException {
5835
      // check for required fields
5836
    }
5837
 
5838
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5839
      try {
5840
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5841
      } catch (org.apache.thrift.TException te) {
5842
        throw new java.io.IOException(te);
5843
      }
5844
    }
5845
 
5846
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5847
      try {
5848
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
5849
        __isset_bit_vector = new BitSet(1);
5850
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5851
      } catch (org.apache.thrift.TException te) {
5852
        throw new java.io.IOException(te);
5853
      }
5854
    }
5855
 
5856
  }
5857
 
5858
  public static class getInventoryItems_result implements org.apache.thrift.TBase<getInventoryItems_result, getInventoryItems_result._Fields>, java.io.Serializable, Cloneable   {
5859
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItems_result");
5860
 
5861
    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);
5862
 
5863
    private List<InventoryItem> success; // required
5864
 
5865
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5866
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5867
      SUCCESS((short)0, "success");
5868
 
5869
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5870
 
5871
      static {
5872
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5873
          byName.put(field.getFieldName(), field);
5874
        }
5875
      }
5876
 
5877
      /**
5878
       * Find the _Fields constant that matches fieldId, or null if its not found.
5879
       */
5880
      public static _Fields findByThriftId(int fieldId) {
5881
        switch(fieldId) {
5882
          case 0: // SUCCESS
5883
            return SUCCESS;
5884
          default:
5885
            return null;
5886
        }
5887
      }
5888
 
5889
      /**
5890
       * Find the _Fields constant that matches fieldId, throwing an exception
5891
       * if it is not found.
5892
       */
5893
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5894
        _Fields fields = findByThriftId(fieldId);
5895
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5896
        return fields;
5897
      }
5898
 
5899
      /**
5900
       * Find the _Fields constant that matches name, or null if its not found.
5901
       */
5902
      public static _Fields findByName(String name) {
5903
        return byName.get(name);
5904
      }
5905
 
5906
      private final short _thriftId;
5907
      private final String _fieldName;
5908
 
5909
      _Fields(short thriftId, String fieldName) {
5910
        _thriftId = thriftId;
5911
        _fieldName = fieldName;
5912
      }
5913
 
5914
      public short getThriftFieldId() {
5915
        return _thriftId;
5916
      }
5917
 
5918
      public String getFieldName() {
5919
        return _fieldName;
5920
      }
5921
    }
5922
 
5923
    // isset id assignments
5924
 
5925
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5926
    static {
5927
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5928
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5929
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
5930
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
5931
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5932
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItems_result.class, metaDataMap);
5933
    }
5934
 
5935
    public getInventoryItems_result() {
5936
    }
5937
 
5938
    public getInventoryItems_result(
5939
      List<InventoryItem> success)
5940
    {
5941
      this();
5942
      this.success = success;
5943
    }
5944
 
5945
    /**
5946
     * Performs a deep copy on <i>other</i>.
5947
     */
5948
    public getInventoryItems_result(getInventoryItems_result other) {
5949
      if (other.isSetSuccess()) {
5950
        List<InventoryItem> __this__success = new ArrayList<InventoryItem>();
5951
        for (InventoryItem other_element : other.success) {
5952
          __this__success.add(new InventoryItem(other_element));
5953
        }
5954
        this.success = __this__success;
5955
      }
5956
    }
5957
 
5958
    public getInventoryItems_result deepCopy() {
5959
      return new getInventoryItems_result(this);
5960
    }
5961
 
5962
    @Override
5963
    public void clear() {
5964
      this.success = null;
5965
    }
5966
 
5967
    public int getSuccessSize() {
5968
      return (this.success == null) ? 0 : this.success.size();
5969
    }
5970
 
5971
    public java.util.Iterator<InventoryItem> getSuccessIterator() {
5972
      return (this.success == null) ? null : this.success.iterator();
5973
    }
5974
 
5975
    public void addToSuccess(InventoryItem elem) {
5976
      if (this.success == null) {
5977
        this.success = new ArrayList<InventoryItem>();
5978
      }
5979
      this.success.add(elem);
5980
    }
5981
 
5982
    public List<InventoryItem> getSuccess() {
5983
      return this.success;
5984
    }
5985
 
5986
    public void setSuccess(List<InventoryItem> success) {
5987
      this.success = success;
5988
    }
5989
 
5990
    public void unsetSuccess() {
5991
      this.success = null;
5992
    }
5993
 
5994
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5995
    public boolean isSetSuccess() {
5996
      return this.success != null;
5997
    }
5998
 
5999
    public void setSuccessIsSet(boolean value) {
6000
      if (!value) {
6001
        this.success = null;
6002
      }
6003
    }
6004
 
6005
    public void setFieldValue(_Fields field, Object value) {
6006
      switch (field) {
6007
      case SUCCESS:
2820 chandransh 6008
        if (value == null) {
4496 mandeep.dh 6009
          unsetSuccess();
2820 chandransh 6010
        } else {
4496 mandeep.dh 6011
          setSuccess((List<InventoryItem>)value);
2820 chandransh 6012
        }
6013
        break;
6014
 
6015
      }
6016
    }
6017
 
6018
    public Object getFieldValue(_Fields field) {
6019
      switch (field) {
6020
      case SUCCESS:
4496 mandeep.dh 6021
        return getSuccess();
2820 chandransh 6022
 
6023
      }
6024
      throw new IllegalStateException();
6025
    }
6026
 
3430 rajveer 6027
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6028
    public boolean isSet(_Fields field) {
6029
      if (field == null) {
6030
        throw new IllegalArgumentException();
6031
      }
2820 chandransh 6032
 
6033
      switch (field) {
6034
      case SUCCESS:
6035
        return isSetSuccess();
6036
      }
6037
      throw new IllegalStateException();
6038
    }
6039
 
6040
    @Override
6041
    public boolean equals(Object that) {
6042
      if (that == null)
6043
        return false;
4496 mandeep.dh 6044
      if (that instanceof getInventoryItems_result)
6045
        return this.equals((getInventoryItems_result)that);
2820 chandransh 6046
      return false;
6047
    }
6048
 
4496 mandeep.dh 6049
    public boolean equals(getInventoryItems_result that) {
2820 chandransh 6050
      if (that == null)
6051
        return false;
6052
 
4496 mandeep.dh 6053
      boolean this_present_success = true && this.isSetSuccess();
6054
      boolean that_present_success = true && that.isSetSuccess();
2820 chandransh 6055
      if (this_present_success || that_present_success) {
6056
        if (!(this_present_success && that_present_success))
6057
          return false;
4496 mandeep.dh 6058
        if (!this.success.equals(that.success))
2820 chandransh 6059
          return false;
6060
      }
6061
 
6062
      return true;
6063
    }
6064
 
6065
    @Override
6066
    public int hashCode() {
6067
      return 0;
6068
    }
6069
 
4496 mandeep.dh 6070
    public int compareTo(getInventoryItems_result other) {
2820 chandransh 6071
      if (!getClass().equals(other.getClass())) {
6072
        return getClass().getName().compareTo(other.getClass().getName());
6073
      }
6074
 
6075
      int lastComparison = 0;
4496 mandeep.dh 6076
      getInventoryItems_result typedOther = (getInventoryItems_result)other;
2820 chandransh 6077
 
3430 rajveer 6078
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2820 chandransh 6079
      if (lastComparison != 0) {
6080
        return lastComparison;
6081
      }
3430 rajveer 6082
      if (isSetSuccess()) {
6083
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6084
        if (lastComparison != 0) {
6085
          return lastComparison;
6086
        }
2820 chandransh 6087
      }
4496 mandeep.dh 6088
      return 0;
6089
    }
6090
 
6091
    public _Fields fieldForId(int fieldId) {
6092
      return _Fields.findByThriftId(fieldId);
6093
    }
6094
 
6095
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6096
      org.apache.thrift.protocol.TField field;
6097
      iprot.readStructBegin();
6098
      while (true)
6099
      {
6100
        field = iprot.readFieldBegin();
6101
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6102
          break;
6103
        }
6104
        switch (field.id) {
6105
          case 0: // SUCCESS
6106
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
6107
              {
6108
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
6109
                this.success = new ArrayList<InventoryItem>(_list4.size);
6110
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
6111
                {
6112
                  InventoryItem _elem6; // required
6113
                  _elem6 = new InventoryItem();
6114
                  _elem6.read(iprot);
6115
                  this.success.add(_elem6);
6116
                }
6117
                iprot.readListEnd();
6118
              }
6119
            } else { 
6120
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6121
            }
6122
            break;
6123
          default:
6124
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6125
        }
6126
        iprot.readFieldEnd();
6127
      }
6128
      iprot.readStructEnd();
6129
      validate();
6130
    }
6131
 
6132
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6133
      oprot.writeStructBegin(STRUCT_DESC);
6134
 
6135
      if (this.isSetSuccess()) {
6136
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6137
        {
6138
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6139
          for (InventoryItem _iter7 : this.success)
6140
          {
6141
            _iter7.write(oprot);
6142
          }
6143
          oprot.writeListEnd();
6144
        }
6145
        oprot.writeFieldEnd();
6146
      }
6147
      oprot.writeFieldStop();
6148
      oprot.writeStructEnd();
6149
    }
6150
 
6151
    @Override
6152
    public String toString() {
6153
      StringBuilder sb = new StringBuilder("getInventoryItems_result(");
6154
      boolean first = true;
6155
 
6156
      sb.append("success:");
6157
      if (this.success == null) {
6158
        sb.append("null");
6159
      } else {
6160
        sb.append(this.success);
6161
      }
6162
      first = false;
6163
      sb.append(")");
6164
      return sb.toString();
6165
    }
6166
 
6167
    public void validate() throws org.apache.thrift.TException {
6168
      // check for required fields
6169
    }
6170
 
6171
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6172
      try {
6173
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6174
      } catch (org.apache.thrift.TException te) {
6175
        throw new java.io.IOException(te);
6176
      }
6177
    }
6178
 
6179
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6180
      try {
6181
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6182
      } catch (org.apache.thrift.TException te) {
6183
        throw new java.io.IOException(te);
6184
      }
6185
    }
6186
 
6187
  }
6188
 
6189
  public static class getScanForOrder_args implements org.apache.thrift.TBase<getScanForOrder_args, getScanForOrder_args._Fields>, java.io.Serializable, Cloneable   {
6190
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScanForOrder_args");
6191
 
6192
    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);
6193
 
6194
    private long orderId; // required
6195
 
6196
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6197
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6198
      ORDER_ID((short)1, "orderId");
6199
 
6200
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6201
 
6202
      static {
6203
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6204
          byName.put(field.getFieldName(), field);
6205
        }
6206
      }
6207
 
6208
      /**
6209
       * Find the _Fields constant that matches fieldId, or null if its not found.
6210
       */
6211
      public static _Fields findByThriftId(int fieldId) {
6212
        switch(fieldId) {
6213
          case 1: // ORDER_ID
6214
            return ORDER_ID;
6215
          default:
6216
            return null;
6217
        }
6218
      }
6219
 
6220
      /**
6221
       * Find the _Fields constant that matches fieldId, throwing an exception
6222
       * if it is not found.
6223
       */
6224
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6225
        _Fields fields = findByThriftId(fieldId);
6226
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6227
        return fields;
6228
      }
6229
 
6230
      /**
6231
       * Find the _Fields constant that matches name, or null if its not found.
6232
       */
6233
      public static _Fields findByName(String name) {
6234
        return byName.get(name);
6235
      }
6236
 
6237
      private final short _thriftId;
6238
      private final String _fieldName;
6239
 
6240
      _Fields(short thriftId, String fieldName) {
6241
        _thriftId = thriftId;
6242
        _fieldName = fieldName;
6243
      }
6244
 
6245
      public short getThriftFieldId() {
6246
        return _thriftId;
6247
      }
6248
 
6249
      public String getFieldName() {
6250
        return _fieldName;
6251
      }
6252
    }
6253
 
6254
    // isset id assignments
6255
    private static final int __ORDERID_ISSET_ID = 0;
6256
    private BitSet __isset_bit_vector = new BitSet(1);
6257
 
6258
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6259
    static {
6260
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6261
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6262
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6263
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6264
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScanForOrder_args.class, metaDataMap);
6265
    }
6266
 
6267
    public getScanForOrder_args() {
6268
    }
6269
 
6270
    public getScanForOrder_args(
6271
      long orderId)
6272
    {
6273
      this();
6274
      this.orderId = orderId;
6275
      setOrderIdIsSet(true);
6276
    }
6277
 
6278
    /**
6279
     * Performs a deep copy on <i>other</i>.
6280
     */
6281
    public getScanForOrder_args(getScanForOrder_args other) {
6282
      __isset_bit_vector.clear();
6283
      __isset_bit_vector.or(other.__isset_bit_vector);
6284
      this.orderId = other.orderId;
6285
    }
6286
 
6287
    public getScanForOrder_args deepCopy() {
6288
      return new getScanForOrder_args(this);
6289
    }
6290
 
6291
    @Override
6292
    public void clear() {
6293
      setOrderIdIsSet(false);
6294
      this.orderId = 0;
6295
    }
6296
 
6297
    public long getOrderId() {
6298
      return this.orderId;
6299
    }
6300
 
6301
    public void setOrderId(long orderId) {
6302
      this.orderId = orderId;
6303
      setOrderIdIsSet(true);
6304
    }
6305
 
6306
    public void unsetOrderId() {
6307
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
6308
    }
6309
 
6310
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
6311
    public boolean isSetOrderId() {
6312
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
6313
    }
6314
 
6315
    public void setOrderIdIsSet(boolean value) {
6316
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
6317
    }
6318
 
6319
    public void setFieldValue(_Fields field, Object value) {
6320
      switch (field) {
6321
      case ORDER_ID:
6322
        if (value == null) {
6323
          unsetOrderId();
6324
        } else {
6325
          setOrderId((Long)value);
6326
        }
6327
        break;
6328
 
6329
      }
6330
    }
6331
 
6332
    public Object getFieldValue(_Fields field) {
6333
      switch (field) {
6334
      case ORDER_ID:
6335
        return Long.valueOf(getOrderId());
6336
 
6337
      }
6338
      throw new IllegalStateException();
6339
    }
6340
 
6341
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6342
    public boolean isSet(_Fields field) {
6343
      if (field == null) {
6344
        throw new IllegalArgumentException();
6345
      }
6346
 
6347
      switch (field) {
6348
      case ORDER_ID:
6349
        return isSetOrderId();
6350
      }
6351
      throw new IllegalStateException();
6352
    }
6353
 
6354
    @Override
6355
    public boolean equals(Object that) {
6356
      if (that == null)
6357
        return false;
6358
      if (that instanceof getScanForOrder_args)
6359
        return this.equals((getScanForOrder_args)that);
6360
      return false;
6361
    }
6362
 
6363
    public boolean equals(getScanForOrder_args that) {
6364
      if (that == null)
6365
        return false;
6366
 
6367
      boolean this_present_orderId = true;
6368
      boolean that_present_orderId = true;
6369
      if (this_present_orderId || that_present_orderId) {
6370
        if (!(this_present_orderId && that_present_orderId))
6371
          return false;
6372
        if (this.orderId != that.orderId)
6373
          return false;
6374
      }
6375
 
6376
      return true;
6377
    }
6378
 
6379
    @Override
6380
    public int hashCode() {
6381
      return 0;
6382
    }
6383
 
6384
    public int compareTo(getScanForOrder_args other) {
6385
      if (!getClass().equals(other.getClass())) {
6386
        return getClass().getName().compareTo(other.getClass().getName());
6387
      }
6388
 
6389
      int lastComparison = 0;
6390
      getScanForOrder_args typedOther = (getScanForOrder_args)other;
6391
 
6392
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
2820 chandransh 6393
      if (lastComparison != 0) {
6394
        return lastComparison;
6395
      }
4496 mandeep.dh 6396
      if (isSetOrderId()) {
6397
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
3430 rajveer 6398
        if (lastComparison != 0) {
6399
          return lastComparison;
6400
        }
2820 chandransh 6401
      }
6402
      return 0;
6403
    }
6404
 
3430 rajveer 6405
    public _Fields fieldForId(int fieldId) {
6406
      return _Fields.findByThriftId(fieldId);
6407
    }
6408
 
6409
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6410
      org.apache.thrift.protocol.TField field;
2820 chandransh 6411
      iprot.readStructBegin();
6412
      while (true)
6413
      {
6414
        field = iprot.readFieldBegin();
3430 rajveer 6415
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 6416
          break;
6417
        }
3430 rajveer 6418
        switch (field.id) {
4496 mandeep.dh 6419
          case 1: // ORDER_ID
3430 rajveer 6420
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4496 mandeep.dh 6421
              this.orderId = iprot.readI64();
6422
              setOrderIdIsSet(true);
3430 rajveer 6423
            } else { 
6424
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6425
            }
6426
            break;
4496 mandeep.dh 6427
          default:
6428
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6429
        }
6430
        iprot.readFieldEnd();
6431
      }
6432
      iprot.readStructEnd();
6433
      validate();
6434
    }
6435
 
6436
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6437
      validate();
6438
 
6439
      oprot.writeStructBegin(STRUCT_DESC);
6440
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
6441
      oprot.writeI64(this.orderId);
6442
      oprot.writeFieldEnd();
6443
      oprot.writeFieldStop();
6444
      oprot.writeStructEnd();
6445
    }
6446
 
6447
    @Override
6448
    public String toString() {
6449
      StringBuilder sb = new StringBuilder("getScanForOrder_args(");
6450
      boolean first = true;
6451
 
6452
      sb.append("orderId:");
6453
      sb.append(this.orderId);
6454
      first = false;
6455
      sb.append(")");
6456
      return sb.toString();
6457
    }
6458
 
6459
    public void validate() throws org.apache.thrift.TException {
6460
      // check for required fields
6461
    }
6462
 
6463
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6464
      try {
6465
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6466
      } catch (org.apache.thrift.TException te) {
6467
        throw new java.io.IOException(te);
6468
      }
6469
    }
6470
 
6471
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6472
      try {
6473
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6474
        __isset_bit_vector = new BitSet(1);
6475
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6476
      } catch (org.apache.thrift.TException te) {
6477
        throw new java.io.IOException(te);
6478
      }
6479
    }
6480
 
6481
  }
6482
 
6483
  public static class getScanForOrder_result implements org.apache.thrift.TBase<getScanForOrder_result, getScanForOrder_result._Fields>, java.io.Serializable, Cloneable   {
6484
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScanForOrder_result");
6485
 
6486
    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);
6487
 
6488
    private List<Scan> success; // required
6489
 
6490
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6491
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6492
      SUCCESS((short)0, "success");
6493
 
6494
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6495
 
6496
      static {
6497
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6498
          byName.put(field.getFieldName(), field);
6499
        }
6500
      }
6501
 
6502
      /**
6503
       * Find the _Fields constant that matches fieldId, or null if its not found.
6504
       */
6505
      public static _Fields findByThriftId(int fieldId) {
6506
        switch(fieldId) {
6507
          case 0: // SUCCESS
6508
            return SUCCESS;
6509
          default:
6510
            return null;
6511
        }
6512
      }
6513
 
6514
      /**
6515
       * Find the _Fields constant that matches fieldId, throwing an exception
6516
       * if it is not found.
6517
       */
6518
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6519
        _Fields fields = findByThriftId(fieldId);
6520
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6521
        return fields;
6522
      }
6523
 
6524
      /**
6525
       * Find the _Fields constant that matches name, or null if its not found.
6526
       */
6527
      public static _Fields findByName(String name) {
6528
        return byName.get(name);
6529
      }
6530
 
6531
      private final short _thriftId;
6532
      private final String _fieldName;
6533
 
6534
      _Fields(short thriftId, String fieldName) {
6535
        _thriftId = thriftId;
6536
        _fieldName = fieldName;
6537
      }
6538
 
6539
      public short getThriftFieldId() {
6540
        return _thriftId;
6541
      }
6542
 
6543
      public String getFieldName() {
6544
        return _fieldName;
6545
      }
6546
    }
6547
 
6548
    // isset id assignments
6549
 
6550
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6551
    static {
6552
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6553
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6554
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
6555
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Scan.class))));
6556
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6557
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScanForOrder_result.class, metaDataMap);
6558
    }
6559
 
6560
    public getScanForOrder_result() {
6561
    }
6562
 
6563
    public getScanForOrder_result(
6564
      List<Scan> success)
6565
    {
6566
      this();
6567
      this.success = success;
6568
    }
6569
 
6570
    /**
6571
     * Performs a deep copy on <i>other</i>.
6572
     */
6573
    public getScanForOrder_result(getScanForOrder_result other) {
6574
      if (other.isSetSuccess()) {
6575
        List<Scan> __this__success = new ArrayList<Scan>();
6576
        for (Scan other_element : other.success) {
6577
          __this__success.add(new Scan(other_element));
6578
        }
6579
        this.success = __this__success;
6580
      }
6581
    }
6582
 
6583
    public getScanForOrder_result deepCopy() {
6584
      return new getScanForOrder_result(this);
6585
    }
6586
 
6587
    @Override
6588
    public void clear() {
6589
      this.success = null;
6590
    }
6591
 
6592
    public int getSuccessSize() {
6593
      return (this.success == null) ? 0 : this.success.size();
6594
    }
6595
 
6596
    public java.util.Iterator<Scan> getSuccessIterator() {
6597
      return (this.success == null) ? null : this.success.iterator();
6598
    }
6599
 
6600
    public void addToSuccess(Scan elem) {
6601
      if (this.success == null) {
6602
        this.success = new ArrayList<Scan>();
6603
      }
6604
      this.success.add(elem);
6605
    }
6606
 
6607
    public List<Scan> getSuccess() {
6608
      return this.success;
6609
    }
6610
 
6611
    public void setSuccess(List<Scan> success) {
6612
      this.success = success;
6613
    }
6614
 
6615
    public void unsetSuccess() {
6616
      this.success = null;
6617
    }
6618
 
6619
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
6620
    public boolean isSetSuccess() {
6621
      return this.success != null;
6622
    }
6623
 
6624
    public void setSuccessIsSet(boolean value) {
6625
      if (!value) {
6626
        this.success = null;
6627
      }
6628
    }
6629
 
6630
    public void setFieldValue(_Fields field, Object value) {
6631
      switch (field) {
6632
      case SUCCESS:
6633
        if (value == null) {
6634
          unsetSuccess();
6635
        } else {
6636
          setSuccess((List<Scan>)value);
6637
        }
6638
        break;
6639
 
6640
      }
6641
    }
6642
 
6643
    public Object getFieldValue(_Fields field) {
6644
      switch (field) {
6645
      case SUCCESS:
6646
        return getSuccess();
6647
 
6648
      }
6649
      throw new IllegalStateException();
6650
    }
6651
 
6652
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6653
    public boolean isSet(_Fields field) {
6654
      if (field == null) {
6655
        throw new IllegalArgumentException();
6656
      }
6657
 
6658
      switch (field) {
6659
      case SUCCESS:
6660
        return isSetSuccess();
6661
      }
6662
      throw new IllegalStateException();
6663
    }
6664
 
6665
    @Override
6666
    public boolean equals(Object that) {
6667
      if (that == null)
6668
        return false;
6669
      if (that instanceof getScanForOrder_result)
6670
        return this.equals((getScanForOrder_result)that);
6671
      return false;
6672
    }
6673
 
6674
    public boolean equals(getScanForOrder_result that) {
6675
      if (that == null)
6676
        return false;
6677
 
6678
      boolean this_present_success = true && this.isSetSuccess();
6679
      boolean that_present_success = true && that.isSetSuccess();
6680
      if (this_present_success || that_present_success) {
6681
        if (!(this_present_success && that_present_success))
6682
          return false;
6683
        if (!this.success.equals(that.success))
6684
          return false;
6685
      }
6686
 
6687
      return true;
6688
    }
6689
 
6690
    @Override
6691
    public int hashCode() {
6692
      return 0;
6693
    }
6694
 
6695
    public int compareTo(getScanForOrder_result other) {
6696
      if (!getClass().equals(other.getClass())) {
6697
        return getClass().getName().compareTo(other.getClass().getName());
6698
      }
6699
 
6700
      int lastComparison = 0;
6701
      getScanForOrder_result typedOther = (getScanForOrder_result)other;
6702
 
6703
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
6704
      if (lastComparison != 0) {
6705
        return lastComparison;
6706
      }
6707
      if (isSetSuccess()) {
6708
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6709
        if (lastComparison != 0) {
6710
          return lastComparison;
6711
        }
6712
      }
6713
      return 0;
6714
    }
6715
 
6716
    public _Fields fieldForId(int fieldId) {
6717
      return _Fields.findByThriftId(fieldId);
6718
    }
6719
 
6720
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6721
      org.apache.thrift.protocol.TField field;
6722
      iprot.readStructBegin();
6723
      while (true)
6724
      {
6725
        field = iprot.readFieldBegin();
6726
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6727
          break;
6728
        }
6729
        switch (field.id) {
6730
          case 0: // SUCCESS
6731
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
6732
              {
6733
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
6734
                this.success = new ArrayList<Scan>(_list8.size);
6735
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
6736
                {
6737
                  Scan _elem10; // required
6738
                  _elem10 = new Scan();
6739
                  _elem10.read(iprot);
6740
                  this.success.add(_elem10);
6741
                }
6742
                iprot.readListEnd();
6743
              }
3430 rajveer 6744
            } else { 
6745
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6746
            }
6747
            break;
6748
          default:
6749
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 6750
        }
3430 rajveer 6751
        iprot.readFieldEnd();
2820 chandransh 6752
      }
6753
      iprot.readStructEnd();
6754
      validate();
6755
    }
6756
 
3430 rajveer 6757
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 6758
      oprot.writeStructBegin(STRUCT_DESC);
6759
 
6760
      if (this.isSetSuccess()) {
6761
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4496 mandeep.dh 6762
        {
6763
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6764
          for (Scan _iter11 : this.success)
6765
          {
6766
            _iter11.write(oprot);
6767
          }
6768
          oprot.writeListEnd();
6769
        }
2820 chandransh 6770
        oprot.writeFieldEnd();
6771
      }
6772
      oprot.writeFieldStop();
6773
      oprot.writeStructEnd();
6774
    }
6775
 
6776
    @Override
6777
    public String toString() {
4496 mandeep.dh 6778
      StringBuilder sb = new StringBuilder("getScanForOrder_result(");
2820 chandransh 6779
      boolean first = true;
6780
 
6781
      sb.append("success:");
4496 mandeep.dh 6782
      if (this.success == null) {
2820 chandransh 6783
        sb.append("null");
6784
      } else {
4496 mandeep.dh 6785
        sb.append(this.success);
2820 chandransh 6786
      }
6787
      first = false;
6788
      sb.append(")");
6789
      return sb.toString();
6790
    }
6791
 
3430 rajveer 6792
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 6793
      // check for required fields
6794
    }
6795
 
3430 rajveer 6796
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6797
      try {
6798
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6799
      } catch (org.apache.thrift.TException te) {
6800
        throw new java.io.IOException(te);
6801
      }
6802
    }
6803
 
6804
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6805
      try {
6806
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6807
      } catch (org.apache.thrift.TException te) {
6808
        throw new java.io.IOException(te);
6809
      }
6810
    }
6811
 
2820 chandransh 6812
  }
6813
 
4496 mandeep.dh 6814
  public static class getScan_args implements org.apache.thrift.TBase<getScan_args, getScan_args._Fields>, java.io.Serializable, Cloneable   {
6815
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScan_args");
2820 chandransh 6816
 
4496 mandeep.dh 6817
    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);
2820 chandransh 6818
 
4496 mandeep.dh 6819
    private long inventoryItemId; // required
2820 chandransh 6820
 
6821
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6822
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 6823
      INVENTORY_ITEM_ID((short)1, "inventoryItemId");
2820 chandransh 6824
 
6825
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6826
 
6827
      static {
6828
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6829
          byName.put(field.getFieldName(), field);
6830
        }
6831
      }
6832
 
6833
      /**
6834
       * Find the _Fields constant that matches fieldId, or null if its not found.
6835
       */
6836
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6837
        switch(fieldId) {
4496 mandeep.dh 6838
          case 1: // INVENTORY_ITEM_ID
6839
            return INVENTORY_ITEM_ID;
3430 rajveer 6840
          default:
6841
            return null;
6842
        }
2820 chandransh 6843
      }
6844
 
6845
      /**
6846
       * Find the _Fields constant that matches fieldId, throwing an exception
6847
       * if it is not found.
6848
       */
6849
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6850
        _Fields fields = findByThriftId(fieldId);
6851
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6852
        return fields;
6853
      }
6854
 
6855
      /**
6856
       * Find the _Fields constant that matches name, or null if its not found.
6857
       */
6858
      public static _Fields findByName(String name) {
6859
        return byName.get(name);
6860
      }
6861
 
6862
      private final short _thriftId;
6863
      private final String _fieldName;
6864
 
6865
      _Fields(short thriftId, String fieldName) {
6866
        _thriftId = thriftId;
6867
        _fieldName = fieldName;
6868
      }
6869
 
6870
      public short getThriftFieldId() {
6871
        return _thriftId;
6872
      }
6873
 
6874
      public String getFieldName() {
6875
        return _fieldName;
6876
      }
6877
    }
6878
 
6879
    // isset id assignments
4496 mandeep.dh 6880
    private static final int __INVENTORYITEMID_ISSET_ID = 0;
2820 chandransh 6881
    private BitSet __isset_bit_vector = new BitSet(1);
6882
 
3430 rajveer 6883
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 6884
    static {
3430 rajveer 6885
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 6886
      tmpMap.put(_Fields.INVENTORY_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("inventoryItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3430 rajveer 6887
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6888
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 6889
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScan_args.class, metaDataMap);
2820 chandransh 6890
    }
6891
 
4496 mandeep.dh 6892
    public getScan_args() {
2820 chandransh 6893
    }
6894
 
4496 mandeep.dh 6895
    public getScan_args(
6896
      long inventoryItemId)
2820 chandransh 6897
    {
6898
      this();
4496 mandeep.dh 6899
      this.inventoryItemId = inventoryItemId;
6900
      setInventoryItemIdIsSet(true);
2820 chandransh 6901
    }
6902
 
6903
    /**
6904
     * Performs a deep copy on <i>other</i>.
6905
     */
4496 mandeep.dh 6906
    public getScan_args(getScan_args other) {
2820 chandransh 6907
      __isset_bit_vector.clear();
6908
      __isset_bit_vector.or(other.__isset_bit_vector);
4496 mandeep.dh 6909
      this.inventoryItemId = other.inventoryItemId;
2820 chandransh 6910
    }
6911
 
4496 mandeep.dh 6912
    public getScan_args deepCopy() {
6913
      return new getScan_args(this);
2820 chandransh 6914
    }
6915
 
3430 rajveer 6916
    @Override
6917
    public void clear() {
4496 mandeep.dh 6918
      setInventoryItemIdIsSet(false);
6919
      this.inventoryItemId = 0;
2820 chandransh 6920
    }
6921
 
4496 mandeep.dh 6922
    public long getInventoryItemId() {
6923
      return this.inventoryItemId;
2820 chandransh 6924
    }
6925
 
4496 mandeep.dh 6926
    public void setInventoryItemId(long inventoryItemId) {
6927
      this.inventoryItemId = inventoryItemId;
6928
      setInventoryItemIdIsSet(true);
2820 chandransh 6929
    }
6930
 
4496 mandeep.dh 6931
    public void unsetInventoryItemId() {
6932
      __isset_bit_vector.clear(__INVENTORYITEMID_ISSET_ID);
2820 chandransh 6933
    }
6934
 
4496 mandeep.dh 6935
    /** Returns true if field inventoryItemId is set (has been assigned a value) and false otherwise */
6936
    public boolean isSetInventoryItemId() {
6937
      return __isset_bit_vector.get(__INVENTORYITEMID_ISSET_ID);
2820 chandransh 6938
    }
6939
 
4496 mandeep.dh 6940
    public void setInventoryItemIdIsSet(boolean value) {
6941
      __isset_bit_vector.set(__INVENTORYITEMID_ISSET_ID, value);
2820 chandransh 6942
    }
6943
 
6944
    public void setFieldValue(_Fields field, Object value) {
6945
      switch (field) {
4496 mandeep.dh 6946
      case INVENTORY_ITEM_ID:
2820 chandransh 6947
        if (value == null) {
4496 mandeep.dh 6948
          unsetInventoryItemId();
2820 chandransh 6949
        } else {
4496 mandeep.dh 6950
          setInventoryItemId((Long)value);
2820 chandransh 6951
        }
6952
        break;
6953
 
6954
      }
6955
    }
6956
 
6957
    public Object getFieldValue(_Fields field) {
6958
      switch (field) {
4496 mandeep.dh 6959
      case INVENTORY_ITEM_ID:
6960
        return Long.valueOf(getInventoryItemId());
2820 chandransh 6961
 
6962
      }
6963
      throw new IllegalStateException();
6964
    }
6965
 
3430 rajveer 6966
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6967
    public boolean isSet(_Fields field) {
6968
      if (field == null) {
6969
        throw new IllegalArgumentException();
6970
      }
2820 chandransh 6971
 
6972
      switch (field) {
4496 mandeep.dh 6973
      case INVENTORY_ITEM_ID:
6974
        return isSetInventoryItemId();
2820 chandransh 6975
      }
6976
      throw new IllegalStateException();
6977
    }
6978
 
6979
    @Override
6980
    public boolean equals(Object that) {
6981
      if (that == null)
6982
        return false;
4496 mandeep.dh 6983
      if (that instanceof getScan_args)
6984
        return this.equals((getScan_args)that);
2820 chandransh 6985
      return false;
6986
    }
6987
 
4496 mandeep.dh 6988
    public boolean equals(getScan_args that) {
2820 chandransh 6989
      if (that == null)
6990
        return false;
6991
 
4496 mandeep.dh 6992
      boolean this_present_inventoryItemId = true;
6993
      boolean that_present_inventoryItemId = true;
6994
      if (this_present_inventoryItemId || that_present_inventoryItemId) {
6995
        if (!(this_present_inventoryItemId && that_present_inventoryItemId))
2820 chandransh 6996
          return false;
4496 mandeep.dh 6997
        if (this.inventoryItemId != that.inventoryItemId)
2820 chandransh 6998
          return false;
6999
      }
7000
 
7001
      return true;
7002
    }
7003
 
7004
    @Override
7005
    public int hashCode() {
7006
      return 0;
7007
    }
7008
 
4496 mandeep.dh 7009
    public int compareTo(getScan_args other) {
2820 chandransh 7010
      if (!getClass().equals(other.getClass())) {
7011
        return getClass().getName().compareTo(other.getClass().getName());
7012
      }
7013
 
7014
      int lastComparison = 0;
4496 mandeep.dh 7015
      getScan_args typedOther = (getScan_args)other;
2820 chandransh 7016
 
4496 mandeep.dh 7017
      lastComparison = Boolean.valueOf(isSetInventoryItemId()).compareTo(typedOther.isSetInventoryItemId());
2820 chandransh 7018
      if (lastComparison != 0) {
7019
        return lastComparison;
7020
      }
4496 mandeep.dh 7021
      if (isSetInventoryItemId()) {
7022
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItemId, typedOther.inventoryItemId);
3430 rajveer 7023
        if (lastComparison != 0) {
7024
          return lastComparison;
7025
        }
2820 chandransh 7026
      }
7027
      return 0;
7028
    }
7029
 
3430 rajveer 7030
    public _Fields fieldForId(int fieldId) {
7031
      return _Fields.findByThriftId(fieldId);
7032
    }
7033
 
7034
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7035
      org.apache.thrift.protocol.TField field;
2820 chandransh 7036
      iprot.readStructBegin();
7037
      while (true)
7038
      {
7039
        field = iprot.readFieldBegin();
3430 rajveer 7040
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 7041
          break;
7042
        }
3430 rajveer 7043
        switch (field.id) {
4496 mandeep.dh 7044
          case 1: // INVENTORY_ITEM_ID
3430 rajveer 7045
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4496 mandeep.dh 7046
              this.inventoryItemId = iprot.readI64();
7047
              setInventoryItemIdIsSet(true);
3430 rajveer 7048
            } else { 
7049
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7050
            }
7051
            break;
7052
          default:
7053
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 7054
        }
3430 rajveer 7055
        iprot.readFieldEnd();
2820 chandransh 7056
      }
7057
      iprot.readStructEnd();
7058
      validate();
7059
    }
7060
 
3430 rajveer 7061
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 7062
      validate();
7063
 
7064
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 7065
      oprot.writeFieldBegin(INVENTORY_ITEM_ID_FIELD_DESC);
7066
      oprot.writeI64(this.inventoryItemId);
2820 chandransh 7067
      oprot.writeFieldEnd();
7068
      oprot.writeFieldStop();
7069
      oprot.writeStructEnd();
7070
    }
7071
 
7072
    @Override
7073
    public String toString() {
4496 mandeep.dh 7074
      StringBuilder sb = new StringBuilder("getScan_args(");
2820 chandransh 7075
      boolean first = true;
7076
 
4496 mandeep.dh 7077
      sb.append("inventoryItemId:");
7078
      sb.append(this.inventoryItemId);
2820 chandransh 7079
      first = false;
7080
      sb.append(")");
7081
      return sb.toString();
7082
    }
7083
 
3430 rajveer 7084
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 7085
      // check for required fields
7086
    }
7087
 
3430 rajveer 7088
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7089
      try {
7090
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7091
      } catch (org.apache.thrift.TException te) {
7092
        throw new java.io.IOException(te);
7093
      }
7094
    }
7095
 
7096
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7097
      try {
4496 mandeep.dh 7098
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7099
        __isset_bit_vector = new BitSet(1);
3430 rajveer 7100
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7101
      } catch (org.apache.thrift.TException te) {
7102
        throw new java.io.IOException(te);
7103
      }
7104
    }
7105
 
2820 chandransh 7106
  }
7107
 
4496 mandeep.dh 7108
  public static class getScan_result implements org.apache.thrift.TBase<getScan_result, getScan_result._Fields>, java.io.Serializable, Cloneable   {
7109
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getScan_result");
2820 chandransh 7110
 
4496 mandeep.dh 7111
    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);
2820 chandransh 7112
 
4496 mandeep.dh 7113
    private List<Scan> success; // required
2820 chandransh 7114
 
7115
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 7116
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 7117
      SUCCESS((short)0, "success");
2820 chandransh 7118
 
7119
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7120
 
7121
      static {
7122
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7123
          byName.put(field.getFieldName(), field);
7124
        }
7125
      }
7126
 
7127
      /**
7128
       * Find the _Fields constant that matches fieldId, or null if its not found.
7129
       */
7130
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 7131
        switch(fieldId) {
7132
          case 0: // SUCCESS
7133
            return SUCCESS;
7134
          default:
7135
            return null;
7136
        }
2820 chandransh 7137
      }
7138
 
7139
      /**
7140
       * Find the _Fields constant that matches fieldId, throwing an exception
7141
       * if it is not found.
7142
       */
7143
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7144
        _Fields fields = findByThriftId(fieldId);
7145
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7146
        return fields;
7147
      }
7148
 
7149
      /**
7150
       * Find the _Fields constant that matches name, or null if its not found.
7151
       */
7152
      public static _Fields findByName(String name) {
7153
        return byName.get(name);
7154
      }
7155
 
7156
      private final short _thriftId;
7157
      private final String _fieldName;
7158
 
7159
      _Fields(short thriftId, String fieldName) {
7160
        _thriftId = thriftId;
7161
        _fieldName = fieldName;
7162
      }
7163
 
7164
      public short getThriftFieldId() {
7165
        return _thriftId;
7166
      }
7167
 
7168
      public String getFieldName() {
7169
        return _fieldName;
7170
      }
7171
    }
7172
 
7173
    // isset id assignments
7174
 
3430 rajveer 7175
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 7176
    static {
3430 rajveer 7177
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7178
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 7179
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7180
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Scan.class))));
3430 rajveer 7181
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 7182
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getScan_result.class, metaDataMap);
2820 chandransh 7183
    }
7184
 
4496 mandeep.dh 7185
    public getScan_result() {
2820 chandransh 7186
    }
7187
 
4496 mandeep.dh 7188
    public getScan_result(
7189
      List<Scan> success)
2820 chandransh 7190
    {
7191
      this();
7192
      this.success = success;
7193
    }
7194
 
7195
    /**
7196
     * Performs a deep copy on <i>other</i>.
7197
     */
4496 mandeep.dh 7198
    public getScan_result(getScan_result other) {
7199
      if (other.isSetSuccess()) {
7200
        List<Scan> __this__success = new ArrayList<Scan>();
7201
        for (Scan other_element : other.success) {
7202
          __this__success.add(new Scan(other_element));
7203
        }
7204
        this.success = __this__success;
2820 chandransh 7205
      }
7206
    }
7207
 
4496 mandeep.dh 7208
    public getScan_result deepCopy() {
7209
      return new getScan_result(this);
2820 chandransh 7210
    }
7211
 
3430 rajveer 7212
    @Override
7213
    public void clear() {
4496 mandeep.dh 7214
      this.success = null;
2820 chandransh 7215
    }
7216
 
4496 mandeep.dh 7217
    public int getSuccessSize() {
7218
      return (this.success == null) ? 0 : this.success.size();
7219
    }
7220
 
7221
    public java.util.Iterator<Scan> getSuccessIterator() {
7222
      return (this.success == null) ? null : this.success.iterator();
7223
    }
7224
 
7225
    public void addToSuccess(Scan elem) {
7226
      if (this.success == null) {
7227
        this.success = new ArrayList<Scan>();
7228
      }
7229
      this.success.add(elem);
7230
    }
7231
 
7232
    public List<Scan> getSuccess() {
2820 chandransh 7233
      return this.success;
7234
    }
7235
 
4496 mandeep.dh 7236
    public void setSuccess(List<Scan> success) {
2820 chandransh 7237
      this.success = success;
7238
    }
7239
 
7240
    public void unsetSuccess() {
4496 mandeep.dh 7241
      this.success = null;
2820 chandransh 7242
    }
7243
 
3430 rajveer 7244
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2820 chandransh 7245
    public boolean isSetSuccess() {
4496 mandeep.dh 7246
      return this.success != null;
2820 chandransh 7247
    }
7248
 
7249
    public void setSuccessIsSet(boolean value) {
4496 mandeep.dh 7250
      if (!value) {
7251
        this.success = null;
7252
      }
2820 chandransh 7253
    }
7254
 
4496 mandeep.dh 7255
    public void setFieldValue(_Fields field, Object value) {
7256
      switch (field) {
7257
      case SUCCESS:
7258
        if (value == null) {
7259
          unsetSuccess();
7260
        } else {
7261
          setSuccess((List<Scan>)value);
7262
        }
7263
        break;
7264
 
7265
      }
7266
    }
7267
 
7268
    public Object getFieldValue(_Fields field) {
7269
      switch (field) {
7270
      case SUCCESS:
7271
        return getSuccess();
7272
 
7273
      }
7274
      throw new IllegalStateException();
7275
    }
7276
 
7277
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7278
    public boolean isSet(_Fields field) {
7279
      if (field == null) {
7280
        throw new IllegalArgumentException();
7281
      }
7282
 
7283
      switch (field) {
7284
      case SUCCESS:
7285
        return isSetSuccess();
7286
      }
7287
      throw new IllegalStateException();
7288
    }
7289
 
7290
    @Override
7291
    public boolean equals(Object that) {
7292
      if (that == null)
7293
        return false;
7294
      if (that instanceof getScan_result)
7295
        return this.equals((getScan_result)that);
7296
      return false;
7297
    }
7298
 
7299
    public boolean equals(getScan_result that) {
7300
      if (that == null)
7301
        return false;
7302
 
7303
      boolean this_present_success = true && this.isSetSuccess();
7304
      boolean that_present_success = true && that.isSetSuccess();
7305
      if (this_present_success || that_present_success) {
7306
        if (!(this_present_success && that_present_success))
7307
          return false;
7308
        if (!this.success.equals(that.success))
7309
          return false;
7310
      }
7311
 
7312
      return true;
7313
    }
7314
 
7315
    @Override
7316
    public int hashCode() {
7317
      return 0;
7318
    }
7319
 
7320
    public int compareTo(getScan_result other) {
7321
      if (!getClass().equals(other.getClass())) {
7322
        return getClass().getName().compareTo(other.getClass().getName());
7323
      }
7324
 
7325
      int lastComparison = 0;
7326
      getScan_result typedOther = (getScan_result)other;
7327
 
7328
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7329
      if (lastComparison != 0) {
7330
        return lastComparison;
7331
      }
7332
      if (isSetSuccess()) {
7333
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7334
        if (lastComparison != 0) {
7335
          return lastComparison;
7336
        }
7337
      }
7338
      return 0;
7339
    }
7340
 
7341
    public _Fields fieldForId(int fieldId) {
7342
      return _Fields.findByThriftId(fieldId);
7343
    }
7344
 
7345
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7346
      org.apache.thrift.protocol.TField field;
7347
      iprot.readStructBegin();
7348
      while (true)
7349
      {
7350
        field = iprot.readFieldBegin();
7351
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7352
          break;
7353
        }
7354
        switch (field.id) {
7355
          case 0: // SUCCESS
7356
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7357
              {
7358
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
7359
                this.success = new ArrayList<Scan>(_list12.size);
7360
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
7361
                {
7362
                  Scan _elem14; // required
7363
                  _elem14 = new Scan();
7364
                  _elem14.read(iprot);
7365
                  this.success.add(_elem14);
7366
                }
7367
                iprot.readListEnd();
7368
              }
7369
            } else { 
7370
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7371
            }
7372
            break;
7373
          default:
7374
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7375
        }
7376
        iprot.readFieldEnd();
7377
      }
7378
      iprot.readStructEnd();
7379
      validate();
7380
    }
7381
 
7382
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7383
      oprot.writeStructBegin(STRUCT_DESC);
7384
 
7385
      if (this.isSetSuccess()) {
7386
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7387
        {
7388
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7389
          for (Scan _iter15 : this.success)
7390
          {
7391
            _iter15.write(oprot);
7392
          }
7393
          oprot.writeListEnd();
7394
        }
7395
        oprot.writeFieldEnd();
7396
      }
7397
      oprot.writeFieldStop();
7398
      oprot.writeStructEnd();
7399
    }
7400
 
7401
    @Override
7402
    public String toString() {
7403
      StringBuilder sb = new StringBuilder("getScan_result(");
7404
      boolean first = true;
7405
 
7406
      sb.append("success:");
7407
      if (this.success == null) {
7408
        sb.append("null");
7409
      } else {
7410
        sb.append(this.success);
7411
      }
7412
      first = false;
7413
      sb.append(")");
7414
      return sb.toString();
7415
    }
7416
 
7417
    public void validate() throws org.apache.thrift.TException {
7418
      // check for required fields
7419
    }
7420
 
7421
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7422
      try {
7423
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7424
      } catch (org.apache.thrift.TException te) {
7425
        throw new java.io.IOException(te);
7426
      }
7427
    }
7428
 
7429
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7430
      try {
7431
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7432
      } catch (org.apache.thrift.TException te) {
7433
        throw new java.io.IOException(te);
7434
      }
7435
    }
7436
 
7437
  }
7438
 
7439
  public static class scanSerializedItem_args implements org.apache.thrift.TBase<scanSerializedItem_args, scanSerializedItem_args._Fields>, java.io.Serializable, Cloneable   {
7440
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItem_args");
7441
 
5110 mandeep.dh 7442
    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 7443
    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);
7444
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)3);
7445
 
5110 mandeep.dh 7446
    private InventoryItem inventoryItem; // required
4496 mandeep.dh 7447
    private ScanType type; // required
7448
    private long warehouseId; // required
7449
 
7450
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7451
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5110 mandeep.dh 7452
      INVENTORY_ITEM((short)1, "inventoryItem"),
4496 mandeep.dh 7453
      /**
7454
       * 
7455
       * @see ScanType
7456
       */
7457
      TYPE((short)2, "type"),
7458
      WAREHOUSE_ID((short)3, "warehouseId");
7459
 
7460
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7461
 
7462
      static {
7463
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7464
          byName.put(field.getFieldName(), field);
7465
        }
7466
      }
7467
 
7468
      /**
7469
       * Find the _Fields constant that matches fieldId, or null if its not found.
7470
       */
7471
      public static _Fields findByThriftId(int fieldId) {
7472
        switch(fieldId) {
5110 mandeep.dh 7473
          case 1: // INVENTORY_ITEM
7474
            return INVENTORY_ITEM;
4496 mandeep.dh 7475
          case 2: // TYPE
7476
            return TYPE;
7477
          case 3: // WAREHOUSE_ID
7478
            return WAREHOUSE_ID;
7479
          default:
7480
            return null;
7481
        }
7482
      }
7483
 
7484
      /**
7485
       * Find the _Fields constant that matches fieldId, throwing an exception
7486
       * if it is not found.
7487
       */
7488
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7489
        _Fields fields = findByThriftId(fieldId);
7490
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7491
        return fields;
7492
      }
7493
 
7494
      /**
7495
       * Find the _Fields constant that matches name, or null if its not found.
7496
       */
7497
      public static _Fields findByName(String name) {
7498
        return byName.get(name);
7499
      }
7500
 
7501
      private final short _thriftId;
7502
      private final String _fieldName;
7503
 
7504
      _Fields(short thriftId, String fieldName) {
7505
        _thriftId = thriftId;
7506
        _fieldName = fieldName;
7507
      }
7508
 
7509
      public short getThriftFieldId() {
7510
        return _thriftId;
7511
      }
7512
 
7513
      public String getFieldName() {
7514
        return _fieldName;
7515
      }
7516
    }
7517
 
7518
    // isset id assignments
5110 mandeep.dh 7519
    private static final int __WAREHOUSEID_ISSET_ID = 0;
7520
    private BitSet __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 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);
5110 mandeep.dh 7525
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7526
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4496 mandeep.dh 7527
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7528
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
7529
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7530
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7531
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7532
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItem_args.class, metaDataMap);
7533
    }
7534
 
7535
    public scanSerializedItem_args() {
7536
    }
7537
 
7538
    public scanSerializedItem_args(
5110 mandeep.dh 7539
      InventoryItem inventoryItem,
4496 mandeep.dh 7540
      ScanType type,
7541
      long warehouseId)
7542
    {
7543
      this();
5110 mandeep.dh 7544
      this.inventoryItem = inventoryItem;
4496 mandeep.dh 7545
      this.type = type;
7546
      this.warehouseId = warehouseId;
7547
      setWarehouseIdIsSet(true);
7548
    }
7549
 
7550
    /**
7551
     * Performs a deep copy on <i>other</i>.
7552
     */
7553
    public scanSerializedItem_args(scanSerializedItem_args other) {
7554
      __isset_bit_vector.clear();
7555
      __isset_bit_vector.or(other.__isset_bit_vector);
5110 mandeep.dh 7556
      if (other.isSetInventoryItem()) {
7557
        this.inventoryItem = new InventoryItem(other.inventoryItem);
7558
      }
4496 mandeep.dh 7559
      if (other.isSetType()) {
7560
        this.type = other.type;
7561
      }
7562
      this.warehouseId = other.warehouseId;
7563
    }
7564
 
7565
    public scanSerializedItem_args deepCopy() {
7566
      return new scanSerializedItem_args(this);
7567
    }
7568
 
7569
    @Override
7570
    public void clear() {
5110 mandeep.dh 7571
      this.inventoryItem = null;
4496 mandeep.dh 7572
      this.type = null;
7573
      setWarehouseIdIsSet(false);
7574
      this.warehouseId = 0;
7575
    }
7576
 
5110 mandeep.dh 7577
    public InventoryItem getInventoryItem() {
7578
      return this.inventoryItem;
4496 mandeep.dh 7579
    }
7580
 
5110 mandeep.dh 7581
    public void setInventoryItem(InventoryItem inventoryItem) {
7582
      this.inventoryItem = inventoryItem;
4496 mandeep.dh 7583
    }
7584
 
5110 mandeep.dh 7585
    public void unsetInventoryItem() {
7586
      this.inventoryItem = null;
4496 mandeep.dh 7587
    }
7588
 
5110 mandeep.dh 7589
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
7590
    public boolean isSetInventoryItem() {
7591
      return this.inventoryItem != null;
4496 mandeep.dh 7592
    }
7593
 
5110 mandeep.dh 7594
    public void setInventoryItemIsSet(boolean value) {
7595
      if (!value) {
7596
        this.inventoryItem = null;
7597
      }
4496 mandeep.dh 7598
    }
7599
 
7600
    /**
7601
     * 
7602
     * @see ScanType
7603
     */
7604
    public ScanType getType() {
7605
      return this.type;
7606
    }
7607
 
7608
    /**
7609
     * 
7610
     * @see ScanType
7611
     */
7612
    public void setType(ScanType type) {
7613
      this.type = type;
7614
    }
7615
 
7616
    public void unsetType() {
7617
      this.type = null;
7618
    }
7619
 
7620
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
7621
    public boolean isSetType() {
7622
      return this.type != null;
7623
    }
7624
 
7625
    public void setTypeIsSet(boolean value) {
7626
      if (!value) {
7627
        this.type = null;
7628
      }
7629
    }
7630
 
7631
    public long getWarehouseId() {
7632
      return this.warehouseId;
7633
    }
7634
 
7635
    public void setWarehouseId(long warehouseId) {
7636
      this.warehouseId = warehouseId;
7637
      setWarehouseIdIsSet(true);
7638
    }
7639
 
7640
    public void unsetWarehouseId() {
7641
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
7642
    }
7643
 
7644
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
7645
    public boolean isSetWarehouseId() {
7646
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
7647
    }
7648
 
7649
    public void setWarehouseIdIsSet(boolean value) {
7650
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
7651
    }
7652
 
7653
    public void setFieldValue(_Fields field, Object value) {
7654
      switch (field) {
5110 mandeep.dh 7655
      case INVENTORY_ITEM:
4496 mandeep.dh 7656
        if (value == null) {
5110 mandeep.dh 7657
          unsetInventoryItem();
4496 mandeep.dh 7658
        } else {
5110 mandeep.dh 7659
          setInventoryItem((InventoryItem)value);
4496 mandeep.dh 7660
        }
7661
        break;
7662
 
7663
      case TYPE:
7664
        if (value == null) {
7665
          unsetType();
7666
        } else {
7667
          setType((ScanType)value);
7668
        }
7669
        break;
7670
 
7671
      case WAREHOUSE_ID:
7672
        if (value == null) {
7673
          unsetWarehouseId();
7674
        } else {
7675
          setWarehouseId((Long)value);
7676
        }
7677
        break;
7678
 
7679
      }
7680
    }
7681
 
7682
    public Object getFieldValue(_Fields field) {
7683
      switch (field) {
5110 mandeep.dh 7684
      case INVENTORY_ITEM:
7685
        return getInventoryItem();
4496 mandeep.dh 7686
 
7687
      case TYPE:
7688
        return getType();
7689
 
7690
      case WAREHOUSE_ID:
7691
        return Long.valueOf(getWarehouseId());
7692
 
7693
      }
7694
      throw new IllegalStateException();
7695
    }
7696
 
7697
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7698
    public boolean isSet(_Fields field) {
7699
      if (field == null) {
7700
        throw new IllegalArgumentException();
7701
      }
7702
 
7703
      switch (field) {
5110 mandeep.dh 7704
      case INVENTORY_ITEM:
7705
        return isSetInventoryItem();
4496 mandeep.dh 7706
      case TYPE:
7707
        return isSetType();
7708
      case WAREHOUSE_ID:
7709
        return isSetWarehouseId();
7710
      }
7711
      throw new IllegalStateException();
7712
    }
7713
 
7714
    @Override
7715
    public boolean equals(Object that) {
7716
      if (that == null)
7717
        return false;
7718
      if (that instanceof scanSerializedItem_args)
7719
        return this.equals((scanSerializedItem_args)that);
7720
      return false;
7721
    }
7722
 
7723
    public boolean equals(scanSerializedItem_args that) {
7724
      if (that == null)
7725
        return false;
7726
 
5110 mandeep.dh 7727
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
7728
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
7729
      if (this_present_inventoryItem || that_present_inventoryItem) {
7730
        if (!(this_present_inventoryItem && that_present_inventoryItem))
4496 mandeep.dh 7731
          return false;
5110 mandeep.dh 7732
        if (!this.inventoryItem.equals(that.inventoryItem))
4496 mandeep.dh 7733
          return false;
7734
      }
7735
 
7736
      boolean this_present_type = true && this.isSetType();
7737
      boolean that_present_type = true && that.isSetType();
7738
      if (this_present_type || that_present_type) {
7739
        if (!(this_present_type && that_present_type))
7740
          return false;
7741
        if (!this.type.equals(that.type))
7742
          return false;
7743
      }
7744
 
7745
      boolean this_present_warehouseId = true;
7746
      boolean that_present_warehouseId = true;
7747
      if (this_present_warehouseId || that_present_warehouseId) {
7748
        if (!(this_present_warehouseId && that_present_warehouseId))
7749
          return false;
7750
        if (this.warehouseId != that.warehouseId)
7751
          return false;
7752
      }
7753
 
7754
      return true;
7755
    }
7756
 
7757
    @Override
7758
    public int hashCode() {
7759
      return 0;
7760
    }
7761
 
7762
    public int compareTo(scanSerializedItem_args other) {
7763
      if (!getClass().equals(other.getClass())) {
7764
        return getClass().getName().compareTo(other.getClass().getName());
7765
      }
7766
 
7767
      int lastComparison = 0;
7768
      scanSerializedItem_args typedOther = (scanSerializedItem_args)other;
7769
 
5110 mandeep.dh 7770
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
4496 mandeep.dh 7771
      if (lastComparison != 0) {
7772
        return lastComparison;
7773
      }
5110 mandeep.dh 7774
      if (isSetInventoryItem()) {
7775
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
4496 mandeep.dh 7776
        if (lastComparison != 0) {
7777
          return lastComparison;
7778
        }
7779
      }
7780
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
7781
      if (lastComparison != 0) {
7782
        return lastComparison;
7783
      }
7784
      if (isSetType()) {
7785
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
7786
        if (lastComparison != 0) {
7787
          return lastComparison;
7788
        }
7789
      }
7790
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
7791
      if (lastComparison != 0) {
7792
        return lastComparison;
7793
      }
7794
      if (isSetWarehouseId()) {
7795
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
7796
        if (lastComparison != 0) {
7797
          return lastComparison;
7798
        }
7799
      }
7800
      return 0;
7801
    }
7802
 
7803
    public _Fields fieldForId(int fieldId) {
7804
      return _Fields.findByThriftId(fieldId);
7805
    }
7806
 
7807
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7808
      org.apache.thrift.protocol.TField field;
7809
      iprot.readStructBegin();
7810
      while (true)
7811
      {
7812
        field = iprot.readFieldBegin();
7813
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7814
          break;
7815
        }
7816
        switch (field.id) {
5110 mandeep.dh 7817
          case 1: // INVENTORY_ITEM
7818
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7819
              this.inventoryItem = new InventoryItem();
7820
              this.inventoryItem.read(iprot);
4496 mandeep.dh 7821
            } else { 
7822
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7823
            }
7824
            break;
7825
          case 2: // TYPE
7826
            if (field.type == org.apache.thrift.protocol.TType.I32) {
7827
              this.type = ScanType.findByValue(iprot.readI32());
7828
            } else { 
7829
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7830
            }
7831
            break;
7832
          case 3: // WAREHOUSE_ID
7833
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7834
              this.warehouseId = iprot.readI64();
7835
              setWarehouseIdIsSet(true);
7836
            } else { 
7837
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7838
            }
7839
            break;
7840
          default:
7841
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7842
        }
7843
        iprot.readFieldEnd();
7844
      }
7845
      iprot.readStructEnd();
7846
      validate();
7847
    }
7848
 
7849
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7850
      validate();
7851
 
7852
      oprot.writeStructBegin(STRUCT_DESC);
5110 mandeep.dh 7853
      if (this.inventoryItem != null) {
7854
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
7855
        this.inventoryItem.write(oprot);
7856
        oprot.writeFieldEnd();
7857
      }
4496 mandeep.dh 7858
      if (this.type != null) {
7859
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
7860
        oprot.writeI32(this.type.getValue());
7861
        oprot.writeFieldEnd();
7862
      }
7863
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
7864
      oprot.writeI64(this.warehouseId);
7865
      oprot.writeFieldEnd();
7866
      oprot.writeFieldStop();
7867
      oprot.writeStructEnd();
7868
    }
7869
 
7870
    @Override
7871
    public String toString() {
7872
      StringBuilder sb = new StringBuilder("scanSerializedItem_args(");
7873
      boolean first = true;
7874
 
5110 mandeep.dh 7875
      sb.append("inventoryItem:");
7876
      if (this.inventoryItem == null) {
7877
        sb.append("null");
7878
      } else {
7879
        sb.append(this.inventoryItem);
7880
      }
4496 mandeep.dh 7881
      first = false;
7882
      if (!first) sb.append(", ");
7883
      sb.append("type:");
7884
      if (this.type == null) {
7885
        sb.append("null");
7886
      } else {
7887
        sb.append(this.type);
7888
      }
7889
      first = false;
7890
      if (!first) sb.append(", ");
7891
      sb.append("warehouseId:");
7892
      sb.append(this.warehouseId);
7893
      first = false;
7894
      sb.append(")");
7895
      return sb.toString();
7896
    }
7897
 
7898
    public void validate() throws org.apache.thrift.TException {
7899
      // check for required fields
7900
    }
7901
 
7902
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7903
      try {
7904
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7905
      } catch (org.apache.thrift.TException te) {
7906
        throw new java.io.IOException(te);
7907
      }
7908
    }
7909
 
7910
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7911
      try {
7912
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7913
        __isset_bit_vector = new BitSet(1);
7914
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7915
      } catch (org.apache.thrift.TException te) {
7916
        throw new java.io.IOException(te);
7917
      }
7918
    }
7919
 
7920
  }
7921
 
7922
  public static class scanSerializedItem_result implements org.apache.thrift.TBase<scanSerializedItem_result, scanSerializedItem_result._Fields>, java.io.Serializable, Cloneable   {
7923
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItem_result");
7924
 
7925
    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);
7926
 
7927
    private WarehouseServiceException wex; // required
7928
 
7929
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7930
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7931
      WEX((short)1, "wex");
7932
 
7933
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7934
 
7935
      static {
7936
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7937
          byName.put(field.getFieldName(), field);
7938
        }
7939
      }
7940
 
7941
      /**
7942
       * Find the _Fields constant that matches fieldId, or null if its not found.
7943
       */
7944
      public static _Fields findByThriftId(int fieldId) {
7945
        switch(fieldId) {
7946
          case 1: // WEX
7947
            return WEX;
7948
          default:
7949
            return null;
7950
        }
7951
      }
7952
 
7953
      /**
7954
       * Find the _Fields constant that matches fieldId, throwing an exception
7955
       * if it is not found.
7956
       */
7957
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7958
        _Fields fields = findByThriftId(fieldId);
7959
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7960
        return fields;
7961
      }
7962
 
7963
      /**
7964
       * Find the _Fields constant that matches name, or null if its not found.
7965
       */
7966
      public static _Fields findByName(String name) {
7967
        return byName.get(name);
7968
      }
7969
 
7970
      private final short _thriftId;
7971
      private final String _fieldName;
7972
 
7973
      _Fields(short thriftId, String fieldName) {
7974
        _thriftId = thriftId;
7975
        _fieldName = fieldName;
7976
      }
7977
 
7978
      public short getThriftFieldId() {
7979
        return _thriftId;
7980
      }
7981
 
7982
      public String getFieldName() {
7983
        return _fieldName;
7984
      }
7985
    }
7986
 
7987
    // isset id assignments
7988
 
7989
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7990
    static {
7991
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7992
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7993
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7994
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7995
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItem_result.class, metaDataMap);
7996
    }
7997
 
7998
    public scanSerializedItem_result() {
7999
    }
8000
 
8001
    public scanSerializedItem_result(
8002
      WarehouseServiceException wex)
8003
    {
8004
      this();
8005
      this.wex = wex;
8006
    }
8007
 
8008
    /**
8009
     * Performs a deep copy on <i>other</i>.
8010
     */
8011
    public scanSerializedItem_result(scanSerializedItem_result other) {
8012
      if (other.isSetWex()) {
8013
        this.wex = new WarehouseServiceException(other.wex);
8014
      }
8015
    }
8016
 
8017
    public scanSerializedItem_result deepCopy() {
8018
      return new scanSerializedItem_result(this);
8019
    }
8020
 
8021
    @Override
8022
    public void clear() {
8023
      this.wex = null;
8024
    }
8025
 
2820 chandransh 8026
    public WarehouseServiceException getWex() {
8027
      return this.wex;
8028
    }
8029
 
3430 rajveer 8030
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 8031
      this.wex = wex;
8032
    }
8033
 
8034
    public void unsetWex() {
8035
      this.wex = null;
8036
    }
8037
 
3430 rajveer 8038
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 8039
    public boolean isSetWex() {
8040
      return this.wex != null;
8041
    }
8042
 
8043
    public void setWexIsSet(boolean value) {
8044
      if (!value) {
8045
        this.wex = null;
8046
      }
8047
    }
8048
 
8049
    public void setFieldValue(_Fields field, Object value) {
8050
      switch (field) {
8051
      case WEX:
8052
        if (value == null) {
8053
          unsetWex();
8054
        } else {
8055
          setWex((WarehouseServiceException)value);
8056
        }
8057
        break;
8058
 
8059
      }
8060
    }
8061
 
8062
    public Object getFieldValue(_Fields field) {
8063
      switch (field) {
8064
      case WEX:
8065
        return getWex();
8066
 
8067
      }
8068
      throw new IllegalStateException();
8069
    }
8070
 
3430 rajveer 8071
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8072
    public boolean isSet(_Fields field) {
8073
      if (field == null) {
8074
        throw new IllegalArgumentException();
8075
      }
2820 chandransh 8076
 
8077
      switch (field) {
8078
      case WEX:
8079
        return isSetWex();
8080
      }
8081
      throw new IllegalStateException();
8082
    }
8083
 
8084
    @Override
8085
    public boolean equals(Object that) {
8086
      if (that == null)
8087
        return false;
4496 mandeep.dh 8088
      if (that instanceof scanSerializedItem_result)
8089
        return this.equals((scanSerializedItem_result)that);
2820 chandransh 8090
      return false;
8091
    }
8092
 
4496 mandeep.dh 8093
    public boolean equals(scanSerializedItem_result that) {
2820 chandransh 8094
      if (that == null)
8095
        return false;
8096
 
8097
      boolean this_present_wex = true && this.isSetWex();
8098
      boolean that_present_wex = true && that.isSetWex();
8099
      if (this_present_wex || that_present_wex) {
8100
        if (!(this_present_wex && that_present_wex))
8101
          return false;
8102
        if (!this.wex.equals(that.wex))
8103
          return false;
8104
      }
8105
 
8106
      return true;
8107
    }
8108
 
8109
    @Override
8110
    public int hashCode() {
8111
      return 0;
8112
    }
8113
 
4496 mandeep.dh 8114
    public int compareTo(scanSerializedItem_result other) {
2820 chandransh 8115
      if (!getClass().equals(other.getClass())) {
8116
        return getClass().getName().compareTo(other.getClass().getName());
8117
      }
8118
 
8119
      int lastComparison = 0;
4496 mandeep.dh 8120
      scanSerializedItem_result typedOther = (scanSerializedItem_result)other;
2820 chandransh 8121
 
3430 rajveer 8122
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 8123
      if (lastComparison != 0) {
8124
        return lastComparison;
8125
      }
3430 rajveer 8126
      if (isSetWex()) {
8127
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
8128
        if (lastComparison != 0) {
8129
          return lastComparison;
8130
        }
2820 chandransh 8131
      }
8132
      return 0;
8133
    }
8134
 
3430 rajveer 8135
    public _Fields fieldForId(int fieldId) {
8136
      return _Fields.findByThriftId(fieldId);
8137
    }
8138
 
8139
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8140
      org.apache.thrift.protocol.TField field;
2820 chandransh 8141
      iprot.readStructBegin();
8142
      while (true)
8143
      {
8144
        field = iprot.readFieldBegin();
3430 rajveer 8145
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 8146
          break;
8147
        }
3430 rajveer 8148
        switch (field.id) {
8149
          case 1: // WEX
8150
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8151
              this.wex = new WarehouseServiceException();
8152
              this.wex.read(iprot);
8153
            } else { 
8154
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8155
            }
8156
            break;
8157
          default:
8158
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 8159
        }
3430 rajveer 8160
        iprot.readFieldEnd();
2820 chandransh 8161
      }
8162
      iprot.readStructEnd();
8163
      validate();
8164
    }
8165
 
3430 rajveer 8166
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 8167
      oprot.writeStructBegin(STRUCT_DESC);
8168
 
4496 mandeep.dh 8169
      if (this.isSetWex()) {
2820 chandransh 8170
        oprot.writeFieldBegin(WEX_FIELD_DESC);
8171
        this.wex.write(oprot);
8172
        oprot.writeFieldEnd();
8173
      }
8174
      oprot.writeFieldStop();
8175
      oprot.writeStructEnd();
8176
    }
8177
 
8178
    @Override
8179
    public String toString() {
4496 mandeep.dh 8180
      StringBuilder sb = new StringBuilder("scanSerializedItem_result(");
2820 chandransh 8181
      boolean first = true;
8182
 
8183
      sb.append("wex:");
8184
      if (this.wex == null) {
8185
        sb.append("null");
8186
      } else {
8187
        sb.append(this.wex);
8188
      }
8189
      first = false;
8190
      sb.append(")");
8191
      return sb.toString();
8192
    }
8193
 
3430 rajveer 8194
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 8195
      // check for required fields
8196
    }
8197
 
3430 rajveer 8198
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8199
      try {
8200
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8201
      } catch (org.apache.thrift.TException te) {
8202
        throw new java.io.IOException(te);
8203
      }
8204
    }
8205
 
8206
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8207
      try {
8208
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8209
      } catch (org.apache.thrift.TException te) {
8210
        throw new java.io.IOException(te);
8211
      }
8212
    }
8213
 
2820 chandransh 8214
  }
8215
 
4496 mandeep.dh 8216
  public static class scan_args implements org.apache.thrift.TBase<scan_args, scan_args._Fields>, java.io.Serializable, Cloneable   {
8217
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_args");
3383 chandransh 8218
 
4496 mandeep.dh 8219
    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);
8220
    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);
8221
    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);
8222
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)4);
3383 chandransh 8223
 
4496 mandeep.dh 8224
    private long inventoryItemId; // required
8225
    private ScanType type; // required
8226
    private long quantity; // required
8227
    private long warehouseId; // required
3383 chandransh 8228
 
8229
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 8230
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 8231
      INVENTORY_ITEM_ID((short)1, "inventoryItemId"),
8232
      /**
8233
       * 
8234
       * @see ScanType
8235
       */
8236
      TYPE((short)2, "type"),
8237
      QUANTITY((short)3, "quantity"),
8238
      WAREHOUSE_ID((short)4, "warehouseId");
3383 chandransh 8239
 
8240
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8241
 
8242
      static {
8243
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8244
          byName.put(field.getFieldName(), field);
8245
        }
8246
      }
8247
 
8248
      /**
8249
       * Find the _Fields constant that matches fieldId, or null if its not found.
8250
       */
8251
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 8252
        switch(fieldId) {
4496 mandeep.dh 8253
          case 1: // INVENTORY_ITEM_ID
8254
            return INVENTORY_ITEM_ID;
8255
          case 2: // TYPE
8256
            return TYPE;
8257
          case 3: // QUANTITY
8258
            return QUANTITY;
8259
          case 4: // WAREHOUSE_ID
8260
            return WAREHOUSE_ID;
3430 rajveer 8261
          default:
8262
            return null;
8263
        }
3383 chandransh 8264
      }
8265
 
8266
      /**
8267
       * Find the _Fields constant that matches fieldId, throwing an exception
8268
       * if it is not found.
8269
       */
8270
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8271
        _Fields fields = findByThriftId(fieldId);
8272
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8273
        return fields;
8274
      }
8275
 
8276
      /**
8277
       * Find the _Fields constant that matches name, or null if its not found.
8278
       */
8279
      public static _Fields findByName(String name) {
8280
        return byName.get(name);
8281
      }
8282
 
8283
      private final short _thriftId;
8284
      private final String _fieldName;
8285
 
8286
      _Fields(short thriftId, String fieldName) {
8287
        _thriftId = thriftId;
8288
        _fieldName = fieldName;
8289
      }
8290
 
8291
      public short getThriftFieldId() {
8292
        return _thriftId;
8293
      }
8294
 
8295
      public String getFieldName() {
8296
        return _fieldName;
8297
      }
8298
    }
8299
 
8300
    // isset id assignments
4496 mandeep.dh 8301
    private static final int __INVENTORYITEMID_ISSET_ID = 0;
8302
    private static final int __QUANTITY_ISSET_ID = 1;
8303
    private static final int __WAREHOUSEID_ISSET_ID = 2;
8304
    private BitSet __isset_bit_vector = new BitSet(3);
3383 chandransh 8305
 
3430 rajveer 8306
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 8307
    static {
3430 rajveer 8308
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 8309
      tmpMap.put(_Fields.INVENTORY_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("inventoryItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3430 rajveer 8310
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4496 mandeep.dh 8311
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8312
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
8313
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8314
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8315
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8316
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 8317
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 8318
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_args.class, metaDataMap);
3383 chandransh 8319
    }
8320
 
4496 mandeep.dh 8321
    public scan_args() {
3383 chandransh 8322
    }
8323
 
4496 mandeep.dh 8324
    public scan_args(
8325
      long inventoryItemId,
8326
      ScanType type,
8327
      long quantity,
8328
      long warehouseId)
3383 chandransh 8329
    {
8330
      this();
4496 mandeep.dh 8331
      this.inventoryItemId = inventoryItemId;
8332
      setInventoryItemIdIsSet(true);
8333
      this.type = type;
8334
      this.quantity = quantity;
8335
      setQuantityIsSet(true);
8336
      this.warehouseId = warehouseId;
8337
      setWarehouseIdIsSet(true);
3383 chandransh 8338
    }
8339
 
8340
    /**
8341
     * Performs a deep copy on <i>other</i>.
8342
     */
4496 mandeep.dh 8343
    public scan_args(scan_args other) {
3383 chandransh 8344
      __isset_bit_vector.clear();
8345
      __isset_bit_vector.or(other.__isset_bit_vector);
4496 mandeep.dh 8346
      this.inventoryItemId = other.inventoryItemId;
8347
      if (other.isSetType()) {
8348
        this.type = other.type;
8349
      }
8350
      this.quantity = other.quantity;
8351
      this.warehouseId = other.warehouseId;
3383 chandransh 8352
    }
8353
 
4496 mandeep.dh 8354
    public scan_args deepCopy() {
8355
      return new scan_args(this);
3383 chandransh 8356
    }
8357
 
3430 rajveer 8358
    @Override
8359
    public void clear() {
4496 mandeep.dh 8360
      setInventoryItemIdIsSet(false);
8361
      this.inventoryItemId = 0;
8362
      this.type = null;
8363
      setQuantityIsSet(false);
8364
      this.quantity = 0;
8365
      setWarehouseIdIsSet(false);
8366
      this.warehouseId = 0;
3383 chandransh 8367
    }
8368
 
4496 mandeep.dh 8369
    public long getInventoryItemId() {
8370
      return this.inventoryItemId;
3383 chandransh 8371
    }
8372
 
4496 mandeep.dh 8373
    public void setInventoryItemId(long inventoryItemId) {
8374
      this.inventoryItemId = inventoryItemId;
8375
      setInventoryItemIdIsSet(true);
3383 chandransh 8376
    }
8377
 
4496 mandeep.dh 8378
    public void unsetInventoryItemId() {
8379
      __isset_bit_vector.clear(__INVENTORYITEMID_ISSET_ID);
3383 chandransh 8380
    }
8381
 
4496 mandeep.dh 8382
    /** Returns true if field inventoryItemId is set (has been assigned a value) and false otherwise */
8383
    public boolean isSetInventoryItemId() {
8384
      return __isset_bit_vector.get(__INVENTORYITEMID_ISSET_ID);
3383 chandransh 8385
    }
8386
 
4496 mandeep.dh 8387
    public void setInventoryItemIdIsSet(boolean value) {
8388
      __isset_bit_vector.set(__INVENTORYITEMID_ISSET_ID, value);
3383 chandransh 8389
    }
8390
 
4496 mandeep.dh 8391
    /**
8392
     * 
8393
     * @see ScanType
8394
     */
8395
    public ScanType getType() {
8396
      return this.type;
3383 chandransh 8397
    }
8398
 
4496 mandeep.dh 8399
    /**
8400
     * 
8401
     * @see ScanType
8402
     */
8403
    public void setType(ScanType type) {
8404
      this.type = type;
3383 chandransh 8405
    }
8406
 
4496 mandeep.dh 8407
    public void unsetType() {
8408
      this.type = null;
3383 chandransh 8409
    }
8410
 
4496 mandeep.dh 8411
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
8412
    public boolean isSetType() {
8413
      return this.type != null;
3383 chandransh 8414
    }
8415
 
4496 mandeep.dh 8416
    public void setTypeIsSet(boolean value) {
8417
      if (!value) {
8418
        this.type = null;
8419
      }
3383 chandransh 8420
    }
8421
 
4496 mandeep.dh 8422
    public long getQuantity() {
8423
      return this.quantity;
8424
    }
8425
 
8426
    public void setQuantity(long quantity) {
8427
      this.quantity = quantity;
8428
      setQuantityIsSet(true);
8429
    }
8430
 
8431
    public void unsetQuantity() {
8432
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
8433
    }
8434
 
8435
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
8436
    public boolean isSetQuantity() {
8437
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
8438
    }
8439
 
8440
    public void setQuantityIsSet(boolean value) {
8441
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
8442
    }
8443
 
8444
    public long getWarehouseId() {
8445
      return this.warehouseId;
8446
    }
8447
 
8448
    public void setWarehouseId(long warehouseId) {
8449
      this.warehouseId = warehouseId;
8450
      setWarehouseIdIsSet(true);
8451
    }
8452
 
8453
    public void unsetWarehouseId() {
8454
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
8455
    }
8456
 
8457
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
8458
    public boolean isSetWarehouseId() {
8459
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
8460
    }
8461
 
8462
    public void setWarehouseIdIsSet(boolean value) {
8463
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
8464
    }
8465
 
3383 chandransh 8466
    public void setFieldValue(_Fields field, Object value) {
8467
      switch (field) {
4496 mandeep.dh 8468
      case INVENTORY_ITEM_ID:
3383 chandransh 8469
        if (value == null) {
4496 mandeep.dh 8470
          unsetInventoryItemId();
3383 chandransh 8471
        } else {
4496 mandeep.dh 8472
          setInventoryItemId((Long)value);
3383 chandransh 8473
        }
8474
        break;
8475
 
4496 mandeep.dh 8476
      case TYPE:
3383 chandransh 8477
        if (value == null) {
4496 mandeep.dh 8478
          unsetType();
3383 chandransh 8479
        } else {
4496 mandeep.dh 8480
          setType((ScanType)value);
3383 chandransh 8481
        }
8482
        break;
8483
 
4496 mandeep.dh 8484
      case QUANTITY:
8485
        if (value == null) {
8486
          unsetQuantity();
8487
        } else {
8488
          setQuantity((Long)value);
8489
        }
8490
        break;
8491
 
8492
      case WAREHOUSE_ID:
8493
        if (value == null) {
8494
          unsetWarehouseId();
8495
        } else {
8496
          setWarehouseId((Long)value);
8497
        }
8498
        break;
8499
 
3383 chandransh 8500
      }
8501
    }
8502
 
8503
    public Object getFieldValue(_Fields field) {
8504
      switch (field) {
4496 mandeep.dh 8505
      case INVENTORY_ITEM_ID:
8506
        return Long.valueOf(getInventoryItemId());
3383 chandransh 8507
 
4496 mandeep.dh 8508
      case TYPE:
8509
        return getType();
3383 chandransh 8510
 
4496 mandeep.dh 8511
      case QUANTITY:
8512
        return Long.valueOf(getQuantity());
8513
 
8514
      case WAREHOUSE_ID:
8515
        return Long.valueOf(getWarehouseId());
8516
 
3383 chandransh 8517
      }
8518
      throw new IllegalStateException();
8519
    }
8520
 
3430 rajveer 8521
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8522
    public boolean isSet(_Fields field) {
8523
      if (field == null) {
8524
        throw new IllegalArgumentException();
8525
      }
3383 chandransh 8526
 
8527
      switch (field) {
4496 mandeep.dh 8528
      case INVENTORY_ITEM_ID:
8529
        return isSetInventoryItemId();
8530
      case TYPE:
8531
        return isSetType();
8532
      case QUANTITY:
8533
        return isSetQuantity();
8534
      case WAREHOUSE_ID:
8535
        return isSetWarehouseId();
3383 chandransh 8536
      }
8537
      throw new IllegalStateException();
8538
    }
8539
 
8540
    @Override
8541
    public boolean equals(Object that) {
8542
      if (that == null)
8543
        return false;
4496 mandeep.dh 8544
      if (that instanceof scan_args)
8545
        return this.equals((scan_args)that);
3383 chandransh 8546
      return false;
8547
    }
8548
 
4496 mandeep.dh 8549
    public boolean equals(scan_args that) {
3383 chandransh 8550
      if (that == null)
8551
        return false;
8552
 
4496 mandeep.dh 8553
      boolean this_present_inventoryItemId = true;
8554
      boolean that_present_inventoryItemId = true;
8555
      if (this_present_inventoryItemId || that_present_inventoryItemId) {
8556
        if (!(this_present_inventoryItemId && that_present_inventoryItemId))
3383 chandransh 8557
          return false;
4496 mandeep.dh 8558
        if (this.inventoryItemId != that.inventoryItemId)
3383 chandransh 8559
          return false;
8560
      }
8561
 
4496 mandeep.dh 8562
      boolean this_present_type = true && this.isSetType();
8563
      boolean that_present_type = true && that.isSetType();
8564
      if (this_present_type || that_present_type) {
8565
        if (!(this_present_type && that_present_type))
3383 chandransh 8566
          return false;
4496 mandeep.dh 8567
        if (!this.type.equals(that.type))
3383 chandransh 8568
          return false;
8569
      }
8570
 
4496 mandeep.dh 8571
      boolean this_present_quantity = true;
8572
      boolean that_present_quantity = true;
8573
      if (this_present_quantity || that_present_quantity) {
8574
        if (!(this_present_quantity && that_present_quantity))
8575
          return false;
8576
        if (this.quantity != that.quantity)
8577
          return false;
8578
      }
8579
 
8580
      boolean this_present_warehouseId = true;
8581
      boolean that_present_warehouseId = true;
8582
      if (this_present_warehouseId || that_present_warehouseId) {
8583
        if (!(this_present_warehouseId && that_present_warehouseId))
8584
          return false;
8585
        if (this.warehouseId != that.warehouseId)
8586
          return false;
8587
      }
8588
 
3383 chandransh 8589
      return true;
8590
    }
8591
 
8592
    @Override
8593
    public int hashCode() {
8594
      return 0;
8595
    }
8596
 
4496 mandeep.dh 8597
    public int compareTo(scan_args other) {
3383 chandransh 8598
      if (!getClass().equals(other.getClass())) {
8599
        return getClass().getName().compareTo(other.getClass().getName());
8600
      }
8601
 
8602
      int lastComparison = 0;
4496 mandeep.dh 8603
      scan_args typedOther = (scan_args)other;
3383 chandransh 8604
 
4496 mandeep.dh 8605
      lastComparison = Boolean.valueOf(isSetInventoryItemId()).compareTo(typedOther.isSetInventoryItemId());
3383 chandransh 8606
      if (lastComparison != 0) {
8607
        return lastComparison;
8608
      }
4496 mandeep.dh 8609
      if (isSetInventoryItemId()) {
8610
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItemId, typedOther.inventoryItemId);
3430 rajveer 8611
        if (lastComparison != 0) {
8612
          return lastComparison;
8613
        }
3383 chandransh 8614
      }
4496 mandeep.dh 8615
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
3383 chandransh 8616
      if (lastComparison != 0) {
8617
        return lastComparison;
8618
      }
4496 mandeep.dh 8619
      if (isSetType()) {
8620
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 8621
        if (lastComparison != 0) {
8622
          return lastComparison;
8623
        }
3383 chandransh 8624
      }
4496 mandeep.dh 8625
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
8626
      if (lastComparison != 0) {
8627
        return lastComparison;
8628
      }
8629
      if (isSetQuantity()) {
8630
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
8631
        if (lastComparison != 0) {
8632
          return lastComparison;
8633
        }
8634
      }
8635
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
8636
      if (lastComparison != 0) {
8637
        return lastComparison;
8638
      }
8639
      if (isSetWarehouseId()) {
8640
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
8641
        if (lastComparison != 0) {
8642
          return lastComparison;
8643
        }
8644
      }
3383 chandransh 8645
      return 0;
8646
    }
8647
 
3430 rajveer 8648
    public _Fields fieldForId(int fieldId) {
8649
      return _Fields.findByThriftId(fieldId);
8650
    }
8651
 
8652
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8653
      org.apache.thrift.protocol.TField field;
3383 chandransh 8654
      iprot.readStructBegin();
8655
      while (true)
8656
      {
8657
        field = iprot.readFieldBegin();
3430 rajveer 8658
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 8659
          break;
8660
        }
3430 rajveer 8661
        switch (field.id) {
4496 mandeep.dh 8662
          case 1: // INVENTORY_ITEM_ID
3430 rajveer 8663
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4496 mandeep.dh 8664
              this.inventoryItemId = iprot.readI64();
8665
              setInventoryItemIdIsSet(true);
3430 rajveer 8666
            } else { 
8667
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8668
            }
8669
            break;
4496 mandeep.dh 8670
          case 2: // TYPE
8671
            if (field.type == org.apache.thrift.protocol.TType.I32) {
8672
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 8673
            } else { 
8674
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8675
            }
8676
            break;
4496 mandeep.dh 8677
          case 3: // QUANTITY
8678
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8679
              this.quantity = iprot.readI64();
8680
              setQuantityIsSet(true);
8681
            } else { 
8682
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8683
            }
8684
            break;
8685
          case 4: // WAREHOUSE_ID
8686
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8687
              this.warehouseId = iprot.readI64();
8688
              setWarehouseIdIsSet(true);
8689
            } else { 
8690
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8691
            }
8692
            break;
3430 rajveer 8693
          default:
8694
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 8695
        }
3430 rajveer 8696
        iprot.readFieldEnd();
3383 chandransh 8697
      }
8698
      iprot.readStructEnd();
8699
      validate();
8700
    }
8701
 
3430 rajveer 8702
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 8703
      validate();
8704
 
8705
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 8706
      oprot.writeFieldBegin(INVENTORY_ITEM_ID_FIELD_DESC);
8707
      oprot.writeI64(this.inventoryItemId);
3383 chandransh 8708
      oprot.writeFieldEnd();
4496 mandeep.dh 8709
      if (this.type != null) {
8710
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
8711
        oprot.writeI32(this.type.getValue());
8712
        oprot.writeFieldEnd();
8713
      }
8714
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
8715
      oprot.writeI64(this.quantity);
3383 chandransh 8716
      oprot.writeFieldEnd();
4496 mandeep.dh 8717
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
8718
      oprot.writeI64(this.warehouseId);
8719
      oprot.writeFieldEnd();
3383 chandransh 8720
      oprot.writeFieldStop();
8721
      oprot.writeStructEnd();
8722
    }
8723
 
8724
    @Override
8725
    public String toString() {
4496 mandeep.dh 8726
      StringBuilder sb = new StringBuilder("scan_args(");
3383 chandransh 8727
      boolean first = true;
8728
 
4496 mandeep.dh 8729
      sb.append("inventoryItemId:");
8730
      sb.append(this.inventoryItemId);
3383 chandransh 8731
      first = false;
8732
      if (!first) sb.append(", ");
4496 mandeep.dh 8733
      sb.append("type:");
8734
      if (this.type == null) {
8735
        sb.append("null");
8736
      } else {
8737
        sb.append(this.type);
8738
      }
3383 chandransh 8739
      first = false;
4496 mandeep.dh 8740
      if (!first) sb.append(", ");
8741
      sb.append("quantity:");
8742
      sb.append(this.quantity);
8743
      first = false;
8744
      if (!first) sb.append(", ");
8745
      sb.append("warehouseId:");
8746
      sb.append(this.warehouseId);
8747
      first = false;
3383 chandransh 8748
      sb.append(")");
8749
      return sb.toString();
8750
    }
8751
 
3430 rajveer 8752
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 8753
      // check for required fields
8754
    }
8755
 
3430 rajveer 8756
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8757
      try {
8758
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8759
      } catch (org.apache.thrift.TException te) {
8760
        throw new java.io.IOException(te);
8761
      }
8762
    }
8763
 
8764
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8765
      try {
4496 mandeep.dh 8766
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8767
        __isset_bit_vector = new BitSet(1);
3430 rajveer 8768
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8769
      } catch (org.apache.thrift.TException te) {
8770
        throw new java.io.IOException(te);
8771
      }
8772
    }
8773
 
3383 chandransh 8774
  }
8775
 
4496 mandeep.dh 8776
  public static class scan_result implements org.apache.thrift.TBase<scan_result, scan_result._Fields>, java.io.Serializable, Cloneable   {
8777
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_result");
3383 chandransh 8778
 
3430 rajveer 8779
    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 8780
 
3430 rajveer 8781
    private WarehouseServiceException wex; // required
3383 chandransh 8782
 
8783
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 8784
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3383 chandransh 8785
      WEX((short)1, "wex");
8786
 
8787
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8788
 
8789
      static {
8790
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8791
          byName.put(field.getFieldName(), field);
8792
        }
8793
      }
8794
 
8795
      /**
8796
       * Find the _Fields constant that matches fieldId, or null if its not found.
8797
       */
8798
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 8799
        switch(fieldId) {
8800
          case 1: // WEX
8801
            return WEX;
8802
          default:
8803
            return null;
8804
        }
3383 chandransh 8805
      }
8806
 
8807
      /**
8808
       * Find the _Fields constant that matches fieldId, throwing an exception
8809
       * if it is not found.
8810
       */
8811
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8812
        _Fields fields = findByThriftId(fieldId);
8813
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8814
        return fields;
8815
      }
8816
 
8817
      /**
8818
       * Find the _Fields constant that matches name, or null if its not found.
8819
       */
8820
      public static _Fields findByName(String name) {
8821
        return byName.get(name);
8822
      }
8823
 
8824
      private final short _thriftId;
8825
      private final String _fieldName;
8826
 
8827
      _Fields(short thriftId, String fieldName) {
8828
        _thriftId = thriftId;
8829
        _fieldName = fieldName;
8830
      }
8831
 
8832
      public short getThriftFieldId() {
8833
        return _thriftId;
8834
      }
8835
 
8836
      public String getFieldName() {
8837
        return _fieldName;
8838
      }
8839
    }
8840
 
8841
    // isset id assignments
8842
 
3430 rajveer 8843
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 8844
    static {
3430 rajveer 8845
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8846
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8847
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8848
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 8849
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_result.class, metaDataMap);
3383 chandransh 8850
    }
8851
 
4496 mandeep.dh 8852
    public scan_result() {
3383 chandransh 8853
    }
8854
 
4496 mandeep.dh 8855
    public scan_result(
3383 chandransh 8856
      WarehouseServiceException wex)
8857
    {
8858
      this();
8859
      this.wex = wex;
8860
    }
8861
 
8862
    /**
8863
     * Performs a deep copy on <i>other</i>.
8864
     */
4496 mandeep.dh 8865
    public scan_result(scan_result other) {
3383 chandransh 8866
      if (other.isSetWex()) {
8867
        this.wex = new WarehouseServiceException(other.wex);
8868
      }
8869
    }
8870
 
4496 mandeep.dh 8871
    public scan_result deepCopy() {
8872
      return new scan_result(this);
3383 chandransh 8873
    }
8874
 
3430 rajveer 8875
    @Override
8876
    public void clear() {
8877
      this.wex = null;
3383 chandransh 8878
    }
8879
 
8880
    public WarehouseServiceException getWex() {
8881
      return this.wex;
8882
    }
8883
 
3430 rajveer 8884
    public void setWex(WarehouseServiceException wex) {
3383 chandransh 8885
      this.wex = wex;
8886
    }
8887
 
8888
    public void unsetWex() {
8889
      this.wex = null;
8890
    }
8891
 
3430 rajveer 8892
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3383 chandransh 8893
    public boolean isSetWex() {
8894
      return this.wex != null;
8895
    }
8896
 
8897
    public void setWexIsSet(boolean value) {
8898
      if (!value) {
8899
        this.wex = null;
8900
      }
8901
    }
8902
 
8903
    public void setFieldValue(_Fields field, Object value) {
8904
      switch (field) {
8905
      case WEX:
8906
        if (value == null) {
8907
          unsetWex();
8908
        } else {
8909
          setWex((WarehouseServiceException)value);
8910
        }
8911
        break;
8912
 
8913
      }
8914
    }
8915
 
8916
    public Object getFieldValue(_Fields field) {
8917
      switch (field) {
8918
      case WEX:
8919
        return getWex();
8920
 
8921
      }
8922
      throw new IllegalStateException();
8923
    }
8924
 
3430 rajveer 8925
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8926
    public boolean isSet(_Fields field) {
8927
      if (field == null) {
8928
        throw new IllegalArgumentException();
8929
      }
3383 chandransh 8930
 
8931
      switch (field) {
8932
      case WEX:
8933
        return isSetWex();
8934
      }
8935
      throw new IllegalStateException();
8936
    }
8937
 
8938
    @Override
8939
    public boolean equals(Object that) {
8940
      if (that == null)
8941
        return false;
4496 mandeep.dh 8942
      if (that instanceof scan_result)
8943
        return this.equals((scan_result)that);
3383 chandransh 8944
      return false;
8945
    }
8946
 
4496 mandeep.dh 8947
    public boolean equals(scan_result that) {
3383 chandransh 8948
      if (that == null)
8949
        return false;
8950
 
8951
      boolean this_present_wex = true && this.isSetWex();
8952
      boolean that_present_wex = true && that.isSetWex();
8953
      if (this_present_wex || that_present_wex) {
8954
        if (!(this_present_wex && that_present_wex))
8955
          return false;
8956
        if (!this.wex.equals(that.wex))
8957
          return false;
8958
      }
8959
 
8960
      return true;
8961
    }
8962
 
8963
    @Override
8964
    public int hashCode() {
8965
      return 0;
8966
    }
8967
 
4496 mandeep.dh 8968
    public int compareTo(scan_result other) {
3383 chandransh 8969
      if (!getClass().equals(other.getClass())) {
8970
        return getClass().getName().compareTo(other.getClass().getName());
8971
      }
8972
 
8973
      int lastComparison = 0;
4496 mandeep.dh 8974
      scan_result typedOther = (scan_result)other;
3383 chandransh 8975
 
3430 rajveer 8976
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
3383 chandransh 8977
      if (lastComparison != 0) {
8978
        return lastComparison;
8979
      }
3430 rajveer 8980
      if (isSetWex()) {
8981
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
8982
        if (lastComparison != 0) {
8983
          return lastComparison;
8984
        }
3383 chandransh 8985
      }
8986
      return 0;
8987
    }
8988
 
3430 rajveer 8989
    public _Fields fieldForId(int fieldId) {
8990
      return _Fields.findByThriftId(fieldId);
8991
    }
8992
 
8993
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8994
      org.apache.thrift.protocol.TField field;
3383 chandransh 8995
      iprot.readStructBegin();
8996
      while (true)
8997
      {
8998
        field = iprot.readFieldBegin();
3430 rajveer 8999
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 9000
          break;
9001
        }
3430 rajveer 9002
        switch (field.id) {
9003
          case 1: // WEX
9004
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9005
              this.wex = new WarehouseServiceException();
9006
              this.wex.read(iprot);
9007
            } else { 
9008
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9009
            }
9010
            break;
9011
          default:
9012
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 9013
        }
3430 rajveer 9014
        iprot.readFieldEnd();
3383 chandransh 9015
      }
9016
      iprot.readStructEnd();
9017
      validate();
9018
    }
9019
 
3430 rajveer 9020
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 9021
      oprot.writeStructBegin(STRUCT_DESC);
9022
 
4496 mandeep.dh 9023
      if (this.isSetWex()) {
3383 chandransh 9024
        oprot.writeFieldBegin(WEX_FIELD_DESC);
9025
        this.wex.write(oprot);
9026
        oprot.writeFieldEnd();
9027
      }
9028
      oprot.writeFieldStop();
9029
      oprot.writeStructEnd();
9030
    }
9031
 
9032
    @Override
9033
    public String toString() {
4496 mandeep.dh 9034
      StringBuilder sb = new StringBuilder("scan_result(");
3383 chandransh 9035
      boolean first = true;
9036
 
9037
      sb.append("wex:");
9038
      if (this.wex == null) {
9039
        sb.append("null");
9040
      } else {
9041
        sb.append(this.wex);
9042
      }
9043
      first = false;
9044
      sb.append(")");
9045
      return sb.toString();
9046
    }
9047
 
3430 rajveer 9048
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 9049
      // check for required fields
9050
    }
9051
 
3430 rajveer 9052
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9053
      try {
9054
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9055
      } catch (org.apache.thrift.TException te) {
9056
        throw new java.io.IOException(te);
9057
      }
9058
    }
9059
 
9060
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9061
      try {
9062
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9063
      } catch (org.apache.thrift.TException te) {
9064
        throw new java.io.IOException(te);
9065
      }
9066
    }
9067
 
3383 chandransh 9068
  }
9069
 
4496 mandeep.dh 9070
  public static class scanSerializedItemForOrder_args implements org.apache.thrift.TBase<scanSerializedItemForOrder_args, scanSerializedItemForOrder_args._Fields>, java.io.Serializable, Cloneable   {
9071
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_args");
2820 chandransh 9072
 
4555 mandeep.dh 9073
    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 9074
    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);
9075
    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 9076
    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);
9077
    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);
9078
    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 9079
 
4555 mandeep.dh 9080
    private String serialNumber; // required
3430 rajveer 9081
    private ScanType type; // required
4496 mandeep.dh 9082
    private long orderId; // required
5110 mandeep.dh 9083
    private long fulfilmentWarehouseId; // required
9084
    private double quantity; // required
9085
    private long billingWarehouseId; // required
2820 chandransh 9086
 
9087
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 9088
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 9089
      SERIAL_NUMBER((short)1, "serialNumber"),
2820 chandransh 9090
      /**
9091
       * 
9092
       * @see ScanType
9093
       */
4496 mandeep.dh 9094
      TYPE((short)2, "type"),
9095
      ORDER_ID((short)3, "orderId"),
5110 mandeep.dh 9096
      FULFILMENT_WAREHOUSE_ID((short)4, "fulfilmentWarehouseId"),
9097
      QUANTITY((short)5, "quantity"),
9098
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 9099
 
9100
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9101
 
9102
      static {
9103
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9104
          byName.put(field.getFieldName(), field);
9105
        }
9106
      }
9107
 
9108
      /**
9109
       * Find the _Fields constant that matches fieldId, or null if its not found.
9110
       */
9111
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 9112
        switch(fieldId) {
4555 mandeep.dh 9113
          case 1: // SERIAL_NUMBER
9114
            return SERIAL_NUMBER;
4496 mandeep.dh 9115
          case 2: // TYPE
3430 rajveer 9116
            return TYPE;
4496 mandeep.dh 9117
          case 3: // ORDER_ID
9118
            return ORDER_ID;
5110 mandeep.dh 9119
          case 4: // FULFILMENT_WAREHOUSE_ID
9120
            return FULFILMENT_WAREHOUSE_ID;
9121
          case 5: // QUANTITY
9122
            return QUANTITY;
9123
          case 6: // BILLING_WAREHOUSE_ID
9124
            return BILLING_WAREHOUSE_ID;
3430 rajveer 9125
          default:
9126
            return null;
9127
        }
2820 chandransh 9128
      }
9129
 
9130
      /**
9131
       * Find the _Fields constant that matches fieldId, throwing an exception
9132
       * if it is not found.
9133
       */
9134
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9135
        _Fields fields = findByThriftId(fieldId);
9136
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9137
        return fields;
9138
      }
9139
 
9140
      /**
9141
       * Find the _Fields constant that matches name, or null if its not found.
9142
       */
9143
      public static _Fields findByName(String name) {
9144
        return byName.get(name);
9145
      }
9146
 
9147
      private final short _thriftId;
9148
      private final String _fieldName;
9149
 
9150
      _Fields(short thriftId, String fieldName) {
9151
        _thriftId = thriftId;
9152
        _fieldName = fieldName;
9153
      }
9154
 
9155
      public short getThriftFieldId() {
9156
        return _thriftId;
9157
      }
9158
 
9159
      public String getFieldName() {
9160
        return _fieldName;
9161
      }
9162
    }
9163
 
9164
    // isset id assignments
4555 mandeep.dh 9165
    private static final int __ORDERID_ISSET_ID = 0;
5110 mandeep.dh 9166
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 1;
9167
    private static final int __QUANTITY_ISSET_ID = 2;
9168
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
9169
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 9170
 
3430 rajveer 9171
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 9172
    static {
3430 rajveer 9173
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4555 mandeep.dh 9174
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9175
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 9176
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9177
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 9178
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9179
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 9180
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 9181
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 9182
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9183
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
9184
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9185
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 9186
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 9187
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_args.class, metaDataMap);
2820 chandransh 9188
    }
9189
 
4496 mandeep.dh 9190
    public scanSerializedItemForOrder_args() {
2820 chandransh 9191
    }
9192
 
4496 mandeep.dh 9193
    public scanSerializedItemForOrder_args(
4555 mandeep.dh 9194
      String serialNumber,
4496 mandeep.dh 9195
      ScanType type,
9196
      long orderId,
5110 mandeep.dh 9197
      long fulfilmentWarehouseId,
9198
      double quantity,
9199
      long billingWarehouseId)
2820 chandransh 9200
    {
9201
      this();
4555 mandeep.dh 9202
      this.serialNumber = serialNumber;
2820 chandransh 9203
      this.type = type;
4496 mandeep.dh 9204
      this.orderId = orderId;
9205
      setOrderIdIsSet(true);
5110 mandeep.dh 9206
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
9207
      setFulfilmentWarehouseIdIsSet(true);
9208
      this.quantity = quantity;
9209
      setQuantityIsSet(true);
9210
      this.billingWarehouseId = billingWarehouseId;
9211
      setBillingWarehouseIdIsSet(true);
2820 chandransh 9212
    }
9213
 
9214
    /**
9215
     * Performs a deep copy on <i>other</i>.
9216
     */
4496 mandeep.dh 9217
    public scanSerializedItemForOrder_args(scanSerializedItemForOrder_args other) {
2820 chandransh 9218
      __isset_bit_vector.clear();
9219
      __isset_bit_vector.or(other.__isset_bit_vector);
4555 mandeep.dh 9220
      if (other.isSetSerialNumber()) {
9221
        this.serialNumber = other.serialNumber;
9222
      }
2820 chandransh 9223
      if (other.isSetType()) {
9224
        this.type = other.type;
9225
      }
4496 mandeep.dh 9226
      this.orderId = other.orderId;
5110 mandeep.dh 9227
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
9228
      this.quantity = other.quantity;
9229
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 9230
    }
9231
 
4496 mandeep.dh 9232
    public scanSerializedItemForOrder_args deepCopy() {
9233
      return new scanSerializedItemForOrder_args(this);
2820 chandransh 9234
    }
9235
 
3430 rajveer 9236
    @Override
9237
    public void clear() {
4555 mandeep.dh 9238
      this.serialNumber = null;
3430 rajveer 9239
      this.type = null;
4496 mandeep.dh 9240
      setOrderIdIsSet(false);
9241
      this.orderId = 0;
5110 mandeep.dh 9242
      setFulfilmentWarehouseIdIsSet(false);
9243
      this.fulfilmentWarehouseId = 0;
9244
      setQuantityIsSet(false);
9245
      this.quantity = 0.0;
9246
      setBillingWarehouseIdIsSet(false);
9247
      this.billingWarehouseId = 0;
2820 chandransh 9248
    }
9249
 
4555 mandeep.dh 9250
    public String getSerialNumber() {
9251
      return this.serialNumber;
2820 chandransh 9252
    }
9253
 
4555 mandeep.dh 9254
    public void setSerialNumber(String serialNumber) {
9255
      this.serialNumber = serialNumber;
2820 chandransh 9256
    }
9257
 
4555 mandeep.dh 9258
    public void unsetSerialNumber() {
9259
      this.serialNumber = null;
2820 chandransh 9260
    }
9261
 
4555 mandeep.dh 9262
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
9263
    public boolean isSetSerialNumber() {
9264
      return this.serialNumber != null;
2820 chandransh 9265
    }
9266
 
4555 mandeep.dh 9267
    public void setSerialNumberIsSet(boolean value) {
9268
      if (!value) {
9269
        this.serialNumber = null;
9270
      }
2820 chandransh 9271
    }
9272
 
4496 mandeep.dh 9273
    /**
9274
     * 
9275
     * @see ScanType
9276
     */
9277
    public ScanType getType() {
9278
      return this.type;
2820 chandransh 9279
    }
9280
 
4496 mandeep.dh 9281
    /**
9282
     * 
9283
     * @see ScanType
9284
     */
9285
    public void setType(ScanType type) {
9286
      this.type = type;
2820 chandransh 9287
    }
9288
 
4496 mandeep.dh 9289
    public void unsetType() {
9290
      this.type = null;
2820 chandransh 9291
    }
9292
 
4496 mandeep.dh 9293
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
9294
    public boolean isSetType() {
9295
      return this.type != null;
2820 chandransh 9296
    }
9297
 
4496 mandeep.dh 9298
    public void setTypeIsSet(boolean value) {
2820 chandransh 9299
      if (!value) {
4496 mandeep.dh 9300
        this.type = null;
2820 chandransh 9301
      }
9302
    }
9303
 
4496 mandeep.dh 9304
    public long getOrderId() {
9305
      return this.orderId;
2820 chandransh 9306
    }
9307
 
4496 mandeep.dh 9308
    public void setOrderId(long orderId) {
9309
      this.orderId = orderId;
9310
      setOrderIdIsSet(true);
2820 chandransh 9311
    }
9312
 
4496 mandeep.dh 9313
    public void unsetOrderId() {
9314
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
2820 chandransh 9315
    }
9316
 
4496 mandeep.dh 9317
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
9318
    public boolean isSetOrderId() {
9319
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
2820 chandransh 9320
    }
9321
 
4496 mandeep.dh 9322
    public void setOrderIdIsSet(boolean value) {
9323
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
2820 chandransh 9324
    }
9325
 
5110 mandeep.dh 9326
    public long getFulfilmentWarehouseId() {
9327
      return this.fulfilmentWarehouseId;
2820 chandransh 9328
    }
9329
 
5110 mandeep.dh 9330
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
9331
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
9332
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 9333
    }
9334
 
5110 mandeep.dh 9335
    public void unsetFulfilmentWarehouseId() {
9336
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 9337
    }
9338
 
5110 mandeep.dh 9339
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
9340
    public boolean isSetFulfilmentWarehouseId() {
9341
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 9342
    }
9343
 
5110 mandeep.dh 9344
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
9345
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
2820 chandransh 9346
    }
9347
 
5110 mandeep.dh 9348
    public double getQuantity() {
9349
      return this.quantity;
9350
    }
9351
 
9352
    public void setQuantity(double quantity) {
9353
      this.quantity = quantity;
9354
      setQuantityIsSet(true);
9355
    }
9356
 
9357
    public void unsetQuantity() {
9358
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
9359
    }
9360
 
9361
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
9362
    public boolean isSetQuantity() {
9363
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
9364
    }
9365
 
9366
    public void setQuantityIsSet(boolean value) {
9367
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
9368
    }
9369
 
9370
    public long getBillingWarehouseId() {
9371
      return this.billingWarehouseId;
9372
    }
9373
 
9374
    public void setBillingWarehouseId(long billingWarehouseId) {
9375
      this.billingWarehouseId = billingWarehouseId;
9376
      setBillingWarehouseIdIsSet(true);
9377
    }
9378
 
9379
    public void unsetBillingWarehouseId() {
9380
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
9381
    }
9382
 
9383
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
9384
    public boolean isSetBillingWarehouseId() {
9385
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
9386
    }
9387
 
9388
    public void setBillingWarehouseIdIsSet(boolean value) {
9389
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
9390
    }
9391
 
2820 chandransh 9392
    public void setFieldValue(_Fields field, Object value) {
9393
      switch (field) {
4555 mandeep.dh 9394
      case SERIAL_NUMBER:
2820 chandransh 9395
        if (value == null) {
4555 mandeep.dh 9396
          unsetSerialNumber();
2820 chandransh 9397
        } else {
4555 mandeep.dh 9398
          setSerialNumber((String)value);
2820 chandransh 9399
        }
9400
        break;
9401
 
4496 mandeep.dh 9402
      case TYPE:
2820 chandransh 9403
        if (value == null) {
4496 mandeep.dh 9404
          unsetType();
2820 chandransh 9405
        } else {
4496 mandeep.dh 9406
          setType((ScanType)value);
2820 chandransh 9407
        }
9408
        break;
9409
 
4496 mandeep.dh 9410
      case ORDER_ID:
2820 chandransh 9411
        if (value == null) {
4496 mandeep.dh 9412
          unsetOrderId();
2820 chandransh 9413
        } else {
4496 mandeep.dh 9414
          setOrderId((Long)value);
2820 chandransh 9415
        }
9416
        break;
9417
 
5110 mandeep.dh 9418
      case FULFILMENT_WAREHOUSE_ID:
2820 chandransh 9419
        if (value == null) {
5110 mandeep.dh 9420
          unsetFulfilmentWarehouseId();
2820 chandransh 9421
        } else {
5110 mandeep.dh 9422
          setFulfilmentWarehouseId((Long)value);
2820 chandransh 9423
        }
9424
        break;
9425
 
5110 mandeep.dh 9426
      case QUANTITY:
9427
        if (value == null) {
9428
          unsetQuantity();
9429
        } else {
9430
          setQuantity((Double)value);
9431
        }
9432
        break;
9433
 
9434
      case BILLING_WAREHOUSE_ID:
9435
        if (value == null) {
9436
          unsetBillingWarehouseId();
9437
        } else {
9438
          setBillingWarehouseId((Long)value);
9439
        }
9440
        break;
9441
 
2820 chandransh 9442
      }
9443
    }
9444
 
9445
    public Object getFieldValue(_Fields field) {
9446
      switch (field) {
4555 mandeep.dh 9447
      case SERIAL_NUMBER:
9448
        return getSerialNumber();
2820 chandransh 9449
 
9450
      case TYPE:
9451
        return getType();
9452
 
4496 mandeep.dh 9453
      case ORDER_ID:
9454
        return Long.valueOf(getOrderId());
9455
 
5110 mandeep.dh 9456
      case FULFILMENT_WAREHOUSE_ID:
9457
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 9458
 
5110 mandeep.dh 9459
      case QUANTITY:
9460
        return Double.valueOf(getQuantity());
9461
 
9462
      case BILLING_WAREHOUSE_ID:
9463
        return Long.valueOf(getBillingWarehouseId());
9464
 
2820 chandransh 9465
      }
9466
      throw new IllegalStateException();
9467
    }
9468
 
3430 rajveer 9469
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9470
    public boolean isSet(_Fields field) {
9471
      if (field == null) {
9472
        throw new IllegalArgumentException();
9473
      }
2820 chandransh 9474
 
9475
      switch (field) {
4555 mandeep.dh 9476
      case SERIAL_NUMBER:
9477
        return isSetSerialNumber();
2820 chandransh 9478
      case TYPE:
9479
        return isSetType();
4496 mandeep.dh 9480
      case ORDER_ID:
9481
        return isSetOrderId();
5110 mandeep.dh 9482
      case FULFILMENT_WAREHOUSE_ID:
9483
        return isSetFulfilmentWarehouseId();
9484
      case QUANTITY:
9485
        return isSetQuantity();
9486
      case BILLING_WAREHOUSE_ID:
9487
        return isSetBillingWarehouseId();
2820 chandransh 9488
      }
9489
      throw new IllegalStateException();
9490
    }
9491
 
9492
    @Override
9493
    public boolean equals(Object that) {
9494
      if (that == null)
9495
        return false;
4496 mandeep.dh 9496
      if (that instanceof scanSerializedItemForOrder_args)
9497
        return this.equals((scanSerializedItemForOrder_args)that);
2820 chandransh 9498
      return false;
9499
    }
9500
 
4496 mandeep.dh 9501
    public boolean equals(scanSerializedItemForOrder_args that) {
2820 chandransh 9502
      if (that == null)
9503
        return false;
9504
 
4555 mandeep.dh 9505
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
9506
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
9507
      if (this_present_serialNumber || that_present_serialNumber) {
9508
        if (!(this_present_serialNumber && that_present_serialNumber))
2820 chandransh 9509
          return false;
4555 mandeep.dh 9510
        if (!this.serialNumber.equals(that.serialNumber))
2820 chandransh 9511
          return false;
9512
      }
9513
 
4496 mandeep.dh 9514
      boolean this_present_type = true && this.isSetType();
9515
      boolean that_present_type = true && that.isSetType();
9516
      if (this_present_type || that_present_type) {
9517
        if (!(this_present_type && that_present_type))
2820 chandransh 9518
          return false;
4496 mandeep.dh 9519
        if (!this.type.equals(that.type))
2820 chandransh 9520
          return false;
9521
      }
9522
 
4496 mandeep.dh 9523
      boolean this_present_orderId = true;
9524
      boolean that_present_orderId = true;
9525
      if (this_present_orderId || that_present_orderId) {
9526
        if (!(this_present_orderId && that_present_orderId))
2820 chandransh 9527
          return false;
4496 mandeep.dh 9528
        if (this.orderId != that.orderId)
2820 chandransh 9529
          return false;
9530
      }
9531
 
5110 mandeep.dh 9532
      boolean this_present_fulfilmentWarehouseId = true;
9533
      boolean that_present_fulfilmentWarehouseId = true;
9534
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
9535
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
2820 chandransh 9536
          return false;
5110 mandeep.dh 9537
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
2820 chandransh 9538
          return false;
9539
      }
9540
 
5110 mandeep.dh 9541
      boolean this_present_quantity = true;
9542
      boolean that_present_quantity = true;
9543
      if (this_present_quantity || that_present_quantity) {
9544
        if (!(this_present_quantity && that_present_quantity))
9545
          return false;
9546
        if (this.quantity != that.quantity)
9547
          return false;
9548
      }
9549
 
9550
      boolean this_present_billingWarehouseId = true;
9551
      boolean that_present_billingWarehouseId = true;
9552
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
9553
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
9554
          return false;
9555
        if (this.billingWarehouseId != that.billingWarehouseId)
9556
          return false;
9557
      }
9558
 
2820 chandransh 9559
      return true;
9560
    }
9561
 
9562
    @Override
9563
    public int hashCode() {
9564
      return 0;
9565
    }
9566
 
4496 mandeep.dh 9567
    public int compareTo(scanSerializedItemForOrder_args other) {
2820 chandransh 9568
      if (!getClass().equals(other.getClass())) {
9569
        return getClass().getName().compareTo(other.getClass().getName());
9570
      }
9571
 
9572
      int lastComparison = 0;
4496 mandeep.dh 9573
      scanSerializedItemForOrder_args typedOther = (scanSerializedItemForOrder_args)other;
2820 chandransh 9574
 
4555 mandeep.dh 9575
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2820 chandransh 9576
      if (lastComparison != 0) {
9577
        return lastComparison;
9578
      }
4555 mandeep.dh 9579
      if (isSetSerialNumber()) {
9580
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 9581
        if (lastComparison != 0) {
9582
          return lastComparison;
9583
        }
2820 chandransh 9584
      }
4496 mandeep.dh 9585
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 9586
      if (lastComparison != 0) {
9587
        return lastComparison;
9588
      }
4496 mandeep.dh 9589
      if (isSetType()) {
9590
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 9591
        if (lastComparison != 0) {
9592
          return lastComparison;
9593
        }
2820 chandransh 9594
      }
4496 mandeep.dh 9595
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
2820 chandransh 9596
      if (lastComparison != 0) {
9597
        return lastComparison;
9598
      }
4496 mandeep.dh 9599
      if (isSetOrderId()) {
9600
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
3430 rajveer 9601
        if (lastComparison != 0) {
9602
          return lastComparison;
9603
        }
2820 chandransh 9604
      }
5110 mandeep.dh 9605
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
2820 chandransh 9606
      if (lastComparison != 0) {
9607
        return lastComparison;
9608
      }
5110 mandeep.dh 9609
      if (isSetFulfilmentWarehouseId()) {
9610
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
3430 rajveer 9611
        if (lastComparison != 0) {
9612
          return lastComparison;
9613
        }
2820 chandransh 9614
      }
5110 mandeep.dh 9615
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
9616
      if (lastComparison != 0) {
9617
        return lastComparison;
9618
      }
9619
      if (isSetQuantity()) {
9620
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
9621
        if (lastComparison != 0) {
9622
          return lastComparison;
9623
        }
9624
      }
9625
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
9626
      if (lastComparison != 0) {
9627
        return lastComparison;
9628
      }
9629
      if (isSetBillingWarehouseId()) {
9630
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
9631
        if (lastComparison != 0) {
9632
          return lastComparison;
9633
        }
9634
      }
2820 chandransh 9635
      return 0;
9636
    }
9637
 
3430 rajveer 9638
    public _Fields fieldForId(int fieldId) {
9639
      return _Fields.findByThriftId(fieldId);
9640
    }
9641
 
9642
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9643
      org.apache.thrift.protocol.TField field;
2820 chandransh 9644
      iprot.readStructBegin();
9645
      while (true)
9646
      {
9647
        field = iprot.readFieldBegin();
3430 rajveer 9648
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 9649
          break;
9650
        }
3430 rajveer 9651
        switch (field.id) {
4555 mandeep.dh 9652
          case 1: // SERIAL_NUMBER
9653
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
9654
              this.serialNumber = iprot.readString();
3430 rajveer 9655
            } else { 
9656
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9657
            }
9658
            break;
4496 mandeep.dh 9659
          case 2: // TYPE
9660
            if (field.type == org.apache.thrift.protocol.TType.I32) {
9661
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 9662
            } else { 
9663
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9664
            }
9665
            break;
4496 mandeep.dh 9666
          case 3: // ORDER_ID
9667
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9668
              this.orderId = iprot.readI64();
9669
              setOrderIdIsSet(true);
3430 rajveer 9670
            } else { 
9671
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9672
            }
9673
            break;
5110 mandeep.dh 9674
          case 4: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 9675
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 9676
              this.fulfilmentWarehouseId = iprot.readI64();
9677
              setFulfilmentWarehouseIdIsSet(true);
3430 rajveer 9678
            } else { 
9679
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9680
            }
9681
            break;
5110 mandeep.dh 9682
          case 5: // QUANTITY
9683
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
9684
              this.quantity = iprot.readDouble();
9685
              setQuantityIsSet(true);
9686
            } else { 
9687
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9688
            }
9689
            break;
9690
          case 6: // BILLING_WAREHOUSE_ID
9691
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9692
              this.billingWarehouseId = iprot.readI64();
9693
              setBillingWarehouseIdIsSet(true);
9694
            } else { 
9695
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9696
            }
9697
            break;
3430 rajveer 9698
          default:
9699
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 9700
        }
3430 rajveer 9701
        iprot.readFieldEnd();
2820 chandransh 9702
      }
9703
      iprot.readStructEnd();
9704
      validate();
9705
    }
9706
 
3430 rajveer 9707
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 9708
      validate();
9709
 
9710
      oprot.writeStructBegin(STRUCT_DESC);
4555 mandeep.dh 9711
      if (this.serialNumber != null) {
9712
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
9713
        oprot.writeString(this.serialNumber);
9714
        oprot.writeFieldEnd();
9715
      }
2820 chandransh 9716
      if (this.type != null) {
9717
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
9718
        oprot.writeI32(this.type.getValue());
9719
        oprot.writeFieldEnd();
9720
      }
4496 mandeep.dh 9721
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
9722
      oprot.writeI64(this.orderId);
9723
      oprot.writeFieldEnd();
5110 mandeep.dh 9724
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
9725
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 9726
      oprot.writeFieldEnd();
5110 mandeep.dh 9727
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
9728
      oprot.writeDouble(this.quantity);
9729
      oprot.writeFieldEnd();
9730
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
9731
      oprot.writeI64(this.billingWarehouseId);
9732
      oprot.writeFieldEnd();
2820 chandransh 9733
      oprot.writeFieldStop();
9734
      oprot.writeStructEnd();
9735
    }
9736
 
9737
    @Override
9738
    public String toString() {
4496 mandeep.dh 9739
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_args(");
2820 chandransh 9740
      boolean first = true;
9741
 
4555 mandeep.dh 9742
      sb.append("serialNumber:");
9743
      if (this.serialNumber == null) {
9744
        sb.append("null");
9745
      } else {
9746
        sb.append(this.serialNumber);
9747
      }
2820 chandransh 9748
      first = false;
9749
      if (!first) sb.append(", ");
4496 mandeep.dh 9750
      sb.append("type:");
9751
      if (this.type == null) {
2820 chandransh 9752
        sb.append("null");
9753
      } else {
4496 mandeep.dh 9754
        sb.append(this.type);
2820 chandransh 9755
      }
9756
      first = false;
9757
      if (!first) sb.append(", ");
4496 mandeep.dh 9758
      sb.append("orderId:");
9759
      sb.append(this.orderId);
2820 chandransh 9760
      first = false;
9761
      if (!first) sb.append(", ");
5110 mandeep.dh 9762
      sb.append("fulfilmentWarehouseId:");
9763
      sb.append(this.fulfilmentWarehouseId);
2820 chandransh 9764
      first = false;
5110 mandeep.dh 9765
      if (!first) sb.append(", ");
9766
      sb.append("quantity:");
9767
      sb.append(this.quantity);
9768
      first = false;
9769
      if (!first) sb.append(", ");
9770
      sb.append("billingWarehouseId:");
9771
      sb.append(this.billingWarehouseId);
9772
      first = false;
2820 chandransh 9773
      sb.append(")");
9774
      return sb.toString();
9775
    }
9776
 
3430 rajveer 9777
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 9778
      // check for required fields
9779
    }
9780
 
3430 rajveer 9781
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9782
      try {
9783
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9784
      } catch (org.apache.thrift.TException te) {
9785
        throw new java.io.IOException(te);
9786
      }
9787
    }
9788
 
9789
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9790
      try {
9791
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9792
      } catch (org.apache.thrift.TException te) {
9793
        throw new java.io.IOException(te);
9794
      }
9795
    }
9796
 
2820 chandransh 9797
  }
9798
 
4496 mandeep.dh 9799
  public static class scanSerializedItemForOrder_result implements org.apache.thrift.TBase<scanSerializedItemForOrder_result, scanSerializedItemForOrder_result._Fields>, java.io.Serializable, Cloneable   {
9800
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_result");
2820 chandransh 9801
 
4555 mandeep.dh 9802
    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 9803
    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 9804
 
4555 mandeep.dh 9805
    private InventoryItem success; // required
3430 rajveer 9806
    private WarehouseServiceException wex; // required
2820 chandransh 9807
 
9808
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 9809
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 9810
      SUCCESS((short)0, "success"),
2820 chandransh 9811
      WEX((short)1, "wex");
9812
 
9813
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9814
 
9815
      static {
9816
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9817
          byName.put(field.getFieldName(), field);
9818
        }
9819
      }
9820
 
9821
      /**
9822
       * Find the _Fields constant that matches fieldId, or null if its not found.
9823
       */
9824
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 9825
        switch(fieldId) {
4496 mandeep.dh 9826
          case 0: // SUCCESS
9827
            return SUCCESS;
3430 rajveer 9828
          case 1: // WEX
9829
            return WEX;
9830
          default:
9831
            return null;
9832
        }
2820 chandransh 9833
      }
9834
 
9835
      /**
9836
       * Find the _Fields constant that matches fieldId, throwing an exception
9837
       * if it is not found.
9838
       */
9839
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9840
        _Fields fields = findByThriftId(fieldId);
9841
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9842
        return fields;
9843
      }
9844
 
9845
      /**
9846
       * Find the _Fields constant that matches name, or null if its not found.
9847
       */
9848
      public static _Fields findByName(String name) {
9849
        return byName.get(name);
9850
      }
9851
 
9852
      private final short _thriftId;
9853
      private final String _fieldName;
9854
 
9855
      _Fields(short thriftId, String fieldName) {
9856
        _thriftId = thriftId;
9857
        _fieldName = fieldName;
9858
      }
9859
 
9860
      public short getThriftFieldId() {
9861
        return _thriftId;
9862
      }
9863
 
9864
      public String getFieldName() {
9865
        return _fieldName;
9866
      }
9867
    }
9868
 
9869
    // isset id assignments
9870
 
3430 rajveer 9871
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 9872
    static {
3430 rajveer 9873
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 9874
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 9875
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 9876
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9877
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9878
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 9879
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_result.class, metaDataMap);
2820 chandransh 9880
    }
9881
 
4496 mandeep.dh 9882
    public scanSerializedItemForOrder_result() {
2820 chandransh 9883
    }
9884
 
4496 mandeep.dh 9885
    public scanSerializedItemForOrder_result(
4555 mandeep.dh 9886
      InventoryItem success,
2820 chandransh 9887
      WarehouseServiceException wex)
9888
    {
9889
      this();
4496 mandeep.dh 9890
      this.success = success;
2820 chandransh 9891
      this.wex = wex;
9892
    }
9893
 
9894
    /**
9895
     * Performs a deep copy on <i>other</i>.
9896
     */
4496 mandeep.dh 9897
    public scanSerializedItemForOrder_result(scanSerializedItemForOrder_result other) {
4555 mandeep.dh 9898
      if (other.isSetSuccess()) {
9899
        this.success = new InventoryItem(other.success);
9900
      }
2820 chandransh 9901
      if (other.isSetWex()) {
9902
        this.wex = new WarehouseServiceException(other.wex);
9903
      }
9904
    }
9905
 
4496 mandeep.dh 9906
    public scanSerializedItemForOrder_result deepCopy() {
9907
      return new scanSerializedItemForOrder_result(this);
2820 chandransh 9908
    }
9909
 
3430 rajveer 9910
    @Override
9911
    public void clear() {
4555 mandeep.dh 9912
      this.success = null;
3430 rajveer 9913
      this.wex = null;
2820 chandransh 9914
    }
9915
 
4555 mandeep.dh 9916
    public InventoryItem getSuccess() {
4496 mandeep.dh 9917
      return this.success;
9918
    }
9919
 
4555 mandeep.dh 9920
    public void setSuccess(InventoryItem success) {
4496 mandeep.dh 9921
      this.success = success;
9922
    }
9923
 
9924
    public void unsetSuccess() {
4555 mandeep.dh 9925
      this.success = null;
4496 mandeep.dh 9926
    }
9927
 
9928
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9929
    public boolean isSetSuccess() {
4555 mandeep.dh 9930
      return this.success != null;
4496 mandeep.dh 9931
    }
9932
 
9933
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 9934
      if (!value) {
9935
        this.success = null;
9936
      }
4496 mandeep.dh 9937
    }
9938
 
2820 chandransh 9939
    public WarehouseServiceException getWex() {
9940
      return this.wex;
9941
    }
9942
 
3430 rajveer 9943
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 9944
      this.wex = wex;
9945
    }
9946
 
9947
    public void unsetWex() {
9948
      this.wex = null;
9949
    }
9950
 
3430 rajveer 9951
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 9952
    public boolean isSetWex() {
9953
      return this.wex != null;
9954
    }
9955
 
9956
    public void setWexIsSet(boolean value) {
9957
      if (!value) {
9958
        this.wex = null;
9959
      }
9960
    }
9961
 
9962
    public void setFieldValue(_Fields field, Object value) {
9963
      switch (field) {
4496 mandeep.dh 9964
      case SUCCESS:
9965
        if (value == null) {
9966
          unsetSuccess();
9967
        } else {
4555 mandeep.dh 9968
          setSuccess((InventoryItem)value);
4496 mandeep.dh 9969
        }
9970
        break;
9971
 
2820 chandransh 9972
      case WEX:
9973
        if (value == null) {
9974
          unsetWex();
9975
        } else {
9976
          setWex((WarehouseServiceException)value);
9977
        }
9978
        break;
9979
 
9980
      }
9981
    }
9982
 
9983
    public Object getFieldValue(_Fields field) {
9984
      switch (field) {
4496 mandeep.dh 9985
      case SUCCESS:
4555 mandeep.dh 9986
        return getSuccess();
4496 mandeep.dh 9987
 
2820 chandransh 9988
      case WEX:
9989
        return getWex();
9990
 
9991
      }
9992
      throw new IllegalStateException();
9993
    }
9994
 
3430 rajveer 9995
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9996
    public boolean isSet(_Fields field) {
9997
      if (field == null) {
9998
        throw new IllegalArgumentException();
9999
      }
2820 chandransh 10000
 
10001
      switch (field) {
4496 mandeep.dh 10002
      case SUCCESS:
10003
        return isSetSuccess();
2820 chandransh 10004
      case WEX:
10005
        return isSetWex();
10006
      }
10007
      throw new IllegalStateException();
10008
    }
10009
 
10010
    @Override
10011
    public boolean equals(Object that) {
10012
      if (that == null)
10013
        return false;
4496 mandeep.dh 10014
      if (that instanceof scanSerializedItemForOrder_result)
10015
        return this.equals((scanSerializedItemForOrder_result)that);
2820 chandransh 10016
      return false;
10017
    }
10018
 
4496 mandeep.dh 10019
    public boolean equals(scanSerializedItemForOrder_result that) {
2820 chandransh 10020
      if (that == null)
10021
        return false;
10022
 
4555 mandeep.dh 10023
      boolean this_present_success = true && this.isSetSuccess();
10024
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 10025
      if (this_present_success || that_present_success) {
10026
        if (!(this_present_success && that_present_success))
10027
          return false;
4555 mandeep.dh 10028
        if (!this.success.equals(that.success))
4496 mandeep.dh 10029
          return false;
10030
      }
10031
 
2820 chandransh 10032
      boolean this_present_wex = true && this.isSetWex();
10033
      boolean that_present_wex = true && that.isSetWex();
10034
      if (this_present_wex || that_present_wex) {
10035
        if (!(this_present_wex && that_present_wex))
10036
          return false;
10037
        if (!this.wex.equals(that.wex))
10038
          return false;
10039
      }
10040
 
10041
      return true;
10042
    }
10043
 
10044
    @Override
10045
    public int hashCode() {
10046
      return 0;
10047
    }
10048
 
4496 mandeep.dh 10049
    public int compareTo(scanSerializedItemForOrder_result other) {
2820 chandransh 10050
      if (!getClass().equals(other.getClass())) {
10051
        return getClass().getName().compareTo(other.getClass().getName());
10052
      }
10053
 
10054
      int lastComparison = 0;
4496 mandeep.dh 10055
      scanSerializedItemForOrder_result typedOther = (scanSerializedItemForOrder_result)other;
2820 chandransh 10056
 
4496 mandeep.dh 10057
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10058
      if (lastComparison != 0) {
10059
        return lastComparison;
10060
      }
10061
      if (isSetSuccess()) {
10062
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10063
        if (lastComparison != 0) {
10064
          return lastComparison;
10065
        }
10066
      }
3430 rajveer 10067
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 10068
      if (lastComparison != 0) {
10069
        return lastComparison;
10070
      }
3430 rajveer 10071
      if (isSetWex()) {
10072
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
10073
        if (lastComparison != 0) {
10074
          return lastComparison;
10075
        }
2820 chandransh 10076
      }
10077
      return 0;
10078
    }
10079
 
3430 rajveer 10080
    public _Fields fieldForId(int fieldId) {
10081
      return _Fields.findByThriftId(fieldId);
10082
    }
10083
 
10084
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10085
      org.apache.thrift.protocol.TField field;
2820 chandransh 10086
      iprot.readStructBegin();
10087
      while (true)
10088
      {
10089
        field = iprot.readFieldBegin();
3430 rajveer 10090
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 10091
          break;
10092
        }
3430 rajveer 10093
        switch (field.id) {
4496 mandeep.dh 10094
          case 0: // SUCCESS
4555 mandeep.dh 10095
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10096
              this.success = new InventoryItem();
10097
              this.success.read(iprot);
4496 mandeep.dh 10098
            } else { 
10099
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10100
            }
10101
            break;
3430 rajveer 10102
          case 1: // WEX
10103
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10104
              this.wex = new WarehouseServiceException();
10105
              this.wex.read(iprot);
10106
            } else { 
10107
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10108
            }
10109
            break;
10110
          default:
10111
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 10112
        }
3430 rajveer 10113
        iprot.readFieldEnd();
2820 chandransh 10114
      }
10115
      iprot.readStructEnd();
10116
      validate();
10117
    }
10118
 
3430 rajveer 10119
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 10120
      oprot.writeStructBegin(STRUCT_DESC);
10121
 
4496 mandeep.dh 10122
      if (this.isSetSuccess()) {
10123
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 10124
        this.success.write(oprot);
4496 mandeep.dh 10125
        oprot.writeFieldEnd();
10126
      } else if (this.isSetWex()) {
2820 chandransh 10127
        oprot.writeFieldBegin(WEX_FIELD_DESC);
10128
        this.wex.write(oprot);
10129
        oprot.writeFieldEnd();
10130
      }
10131
      oprot.writeFieldStop();
10132
      oprot.writeStructEnd();
10133
    }
10134
 
10135
    @Override
10136
    public String toString() {
4496 mandeep.dh 10137
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_result(");
2820 chandransh 10138
      boolean first = true;
10139
 
4496 mandeep.dh 10140
      sb.append("success:");
4555 mandeep.dh 10141
      if (this.success == null) {
10142
        sb.append("null");
10143
      } else {
10144
        sb.append(this.success);
10145
      }
4496 mandeep.dh 10146
      first = false;
10147
      if (!first) sb.append(", ");
2820 chandransh 10148
      sb.append("wex:");
10149
      if (this.wex == null) {
10150
        sb.append("null");
10151
      } else {
10152
        sb.append(this.wex);
10153
      }
10154
      first = false;
10155
      sb.append(")");
10156
      return sb.toString();
10157
    }
10158
 
3430 rajveer 10159
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 10160
      // check for required fields
10161
    }
10162
 
3430 rajveer 10163
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10164
      try {
10165
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10166
      } catch (org.apache.thrift.TException te) {
10167
        throw new java.io.IOException(te);
10168
      }
10169
    }
10170
 
10171
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10172
      try {
10173
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10174
      } catch (org.apache.thrift.TException te) {
10175
        throw new java.io.IOException(te);
10176
      }
10177
    }
10178
 
2820 chandransh 10179
  }
10180
 
4496 mandeep.dh 10181
  public static class scanForOrder_args implements org.apache.thrift.TBase<scanForOrder_args, scanForOrder_args._Fields>, java.io.Serializable, Cloneable   {
10182
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_args");
2820 chandransh 10183
 
4496 mandeep.dh 10184
    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);
10185
    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);
10186
    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);
10187
    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 10188
    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);
2820 chandransh 10189
 
4496 mandeep.dh 10190
    private long inventoryItemId; // required
3430 rajveer 10191
    private ScanType type; // required
4496 mandeep.dh 10192
    private long quantity; // required
10193
    private long orderId; // required
5110 mandeep.dh 10194
    private long fulfilmentWarehouseId; // required
2820 chandransh 10195
 
10196
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 10197
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 10198
      INVENTORY_ITEM_ID((short)1, "inventoryItemId"),
2820 chandransh 10199
      /**
10200
       * 
10201
       * @see ScanType
10202
       */
4496 mandeep.dh 10203
      TYPE((short)2, "type"),
10204
      QUANTITY((short)3, "quantity"),
10205
      ORDER_ID((short)4, "orderId"),
5110 mandeep.dh 10206
      FULFILMENT_WAREHOUSE_ID((short)5, "fulfilmentWarehouseId");
2820 chandransh 10207
 
10208
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10209
 
10210
      static {
10211
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10212
          byName.put(field.getFieldName(), field);
10213
        }
10214
      }
10215
 
10216
      /**
10217
       * Find the _Fields constant that matches fieldId, or null if its not found.
10218
       */
10219
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 10220
        switch(fieldId) {
4496 mandeep.dh 10221
          case 1: // INVENTORY_ITEM_ID
10222
            return INVENTORY_ITEM_ID;
10223
          case 2: // TYPE
3430 rajveer 10224
            return TYPE;
4496 mandeep.dh 10225
          case 3: // QUANTITY
10226
            return QUANTITY;
10227
          case 4: // ORDER_ID
10228
            return ORDER_ID;
5110 mandeep.dh 10229
          case 5: // FULFILMENT_WAREHOUSE_ID
10230
            return FULFILMENT_WAREHOUSE_ID;
3430 rajveer 10231
          default:
10232
            return null;
10233
        }
2820 chandransh 10234
      }
10235
 
10236
      /**
10237
       * Find the _Fields constant that matches fieldId, throwing an exception
10238
       * if it is not found.
10239
       */
10240
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10241
        _Fields fields = findByThriftId(fieldId);
10242
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10243
        return fields;
10244
      }
10245
 
10246
      /**
10247
       * Find the _Fields constant that matches name, or null if its not found.
10248
       */
10249
      public static _Fields findByName(String name) {
10250
        return byName.get(name);
10251
      }
10252
 
10253
      private final short _thriftId;
10254
      private final String _fieldName;
10255
 
10256
      _Fields(short thriftId, String fieldName) {
10257
        _thriftId = thriftId;
10258
        _fieldName = fieldName;
10259
      }
10260
 
10261
      public short getThriftFieldId() {
10262
        return _thriftId;
10263
      }
10264
 
10265
      public String getFieldName() {
10266
        return _fieldName;
10267
      }
10268
    }
10269
 
10270
    // isset id assignments
4496 mandeep.dh 10271
    private static final int __INVENTORYITEMID_ISSET_ID = 0;
10272
    private static final int __QUANTITY_ISSET_ID = 1;
10273
    private static final int __ORDERID_ISSET_ID = 2;
5110 mandeep.dh 10274
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 3;
4496 mandeep.dh 10275
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 10276
 
3430 rajveer 10277
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 10278
    static {
3430 rajveer 10279
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 10280
      tmpMap.put(_Fields.INVENTORY_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("inventoryItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10281
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 10282
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10283
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 10284
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10285
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10286
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10287
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 10288
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 10289
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 10290
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 10291
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_args.class, metaDataMap);
2820 chandransh 10292
    }
10293
 
4496 mandeep.dh 10294
    public scanForOrder_args() {
2820 chandransh 10295
    }
10296
 
4496 mandeep.dh 10297
    public scanForOrder_args(
10298
      long inventoryItemId,
10299
      ScanType type,
10300
      long quantity,
10301
      long orderId,
5110 mandeep.dh 10302
      long fulfilmentWarehouseId)
2820 chandransh 10303
    {
10304
      this();
4496 mandeep.dh 10305
      this.inventoryItemId = inventoryItemId;
10306
      setInventoryItemIdIsSet(true);
2820 chandransh 10307
      this.type = type;
4496 mandeep.dh 10308
      this.quantity = quantity;
10309
      setQuantityIsSet(true);
10310
      this.orderId = orderId;
10311
      setOrderIdIsSet(true);
5110 mandeep.dh 10312
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
10313
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 10314
    }
10315
 
10316
    /**
10317
     * Performs a deep copy on <i>other</i>.
10318
     */
4496 mandeep.dh 10319
    public scanForOrder_args(scanForOrder_args other) {
10320
      __isset_bit_vector.clear();
10321
      __isset_bit_vector.or(other.__isset_bit_vector);
10322
      this.inventoryItemId = other.inventoryItemId;
2820 chandransh 10323
      if (other.isSetType()) {
10324
        this.type = other.type;
10325
      }
4496 mandeep.dh 10326
      this.quantity = other.quantity;
10327
      this.orderId = other.orderId;
5110 mandeep.dh 10328
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
2820 chandransh 10329
    }
10330
 
4496 mandeep.dh 10331
    public scanForOrder_args deepCopy() {
10332
      return new scanForOrder_args(this);
2820 chandransh 10333
    }
10334
 
3430 rajveer 10335
    @Override
10336
    public void clear() {
4496 mandeep.dh 10337
      setInventoryItemIdIsSet(false);
10338
      this.inventoryItemId = 0;
3430 rajveer 10339
      this.type = null;
4496 mandeep.dh 10340
      setQuantityIsSet(false);
10341
      this.quantity = 0;
10342
      setOrderIdIsSet(false);
10343
      this.orderId = 0;
5110 mandeep.dh 10344
      setFulfilmentWarehouseIdIsSet(false);
10345
      this.fulfilmentWarehouseId = 0;
2820 chandransh 10346
    }
10347
 
4496 mandeep.dh 10348
    public long getInventoryItemId() {
10349
      return this.inventoryItemId;
2820 chandransh 10350
    }
10351
 
4496 mandeep.dh 10352
    public void setInventoryItemId(long inventoryItemId) {
10353
      this.inventoryItemId = inventoryItemId;
10354
      setInventoryItemIdIsSet(true);
2820 chandransh 10355
    }
10356
 
4496 mandeep.dh 10357
    public void unsetInventoryItemId() {
10358
      __isset_bit_vector.clear(__INVENTORYITEMID_ISSET_ID);
2820 chandransh 10359
    }
10360
 
4496 mandeep.dh 10361
    /** Returns true if field inventoryItemId is set (has been assigned a value) and false otherwise */
10362
    public boolean isSetInventoryItemId() {
10363
      return __isset_bit_vector.get(__INVENTORYITEMID_ISSET_ID);
2820 chandransh 10364
    }
10365
 
4496 mandeep.dh 10366
    public void setInventoryItemIdIsSet(boolean value) {
10367
      __isset_bit_vector.set(__INVENTORYITEMID_ISSET_ID, value);
2820 chandransh 10368
    }
10369
 
10370
    /**
10371
     * 
10372
     * @see ScanType
10373
     */
10374
    public ScanType getType() {
10375
      return this.type;
10376
    }
10377
 
10378
    /**
10379
     * 
10380
     * @see ScanType
10381
     */
3430 rajveer 10382
    public void setType(ScanType type) {
2820 chandransh 10383
      this.type = type;
10384
    }
10385
 
10386
    public void unsetType() {
10387
      this.type = null;
10388
    }
10389
 
3430 rajveer 10390
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
2820 chandransh 10391
    public boolean isSetType() {
10392
      return this.type != null;
10393
    }
10394
 
10395
    public void setTypeIsSet(boolean value) {
10396
      if (!value) {
10397
        this.type = null;
10398
      }
10399
    }
10400
 
4496 mandeep.dh 10401
    public long getQuantity() {
10402
      return this.quantity;
10403
    }
10404
 
10405
    public void setQuantity(long quantity) {
10406
      this.quantity = quantity;
10407
      setQuantityIsSet(true);
10408
    }
10409
 
10410
    public void unsetQuantity() {
10411
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
10412
    }
10413
 
10414
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
10415
    public boolean isSetQuantity() {
10416
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
10417
    }
10418
 
10419
    public void setQuantityIsSet(boolean value) {
10420
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
10421
    }
10422
 
10423
    public long getOrderId() {
10424
      return this.orderId;
10425
    }
10426
 
10427
    public void setOrderId(long orderId) {
10428
      this.orderId = orderId;
10429
      setOrderIdIsSet(true);
10430
    }
10431
 
10432
    public void unsetOrderId() {
10433
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
10434
    }
10435
 
10436
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
10437
    public boolean isSetOrderId() {
10438
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
10439
    }
10440
 
10441
    public void setOrderIdIsSet(boolean value) {
10442
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
10443
    }
10444
 
5110 mandeep.dh 10445
    public long getFulfilmentWarehouseId() {
10446
      return this.fulfilmentWarehouseId;
4496 mandeep.dh 10447
    }
10448
 
5110 mandeep.dh 10449
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
10450
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
10451
      setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 10452
    }
10453
 
5110 mandeep.dh 10454
    public void unsetFulfilmentWarehouseId() {
10455
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 10456
    }
10457
 
5110 mandeep.dh 10458
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
10459
    public boolean isSetFulfilmentWarehouseId() {
10460
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 10461
    }
10462
 
5110 mandeep.dh 10463
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
10464
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 10465
    }
10466
 
2820 chandransh 10467
    public void setFieldValue(_Fields field, Object value) {
10468
      switch (field) {
4496 mandeep.dh 10469
      case INVENTORY_ITEM_ID:
2820 chandransh 10470
        if (value == null) {
4496 mandeep.dh 10471
          unsetInventoryItemId();
2820 chandransh 10472
        } else {
4496 mandeep.dh 10473
          setInventoryItemId((Long)value);
2820 chandransh 10474
        }
10475
        break;
10476
 
4496 mandeep.dh 10477
      case TYPE:
2820 chandransh 10478
        if (value == null) {
4496 mandeep.dh 10479
          unsetType();
2820 chandransh 10480
        } else {
4496 mandeep.dh 10481
          setType((ScanType)value);
2820 chandransh 10482
        }
10483
        break;
10484
 
4496 mandeep.dh 10485
      case QUANTITY:
2820 chandransh 10486
        if (value == null) {
4496 mandeep.dh 10487
          unsetQuantity();
2820 chandransh 10488
        } else {
4496 mandeep.dh 10489
          setQuantity((Long)value);
2820 chandransh 10490
        }
10491
        break;
10492
 
4496 mandeep.dh 10493
      case ORDER_ID:
10494
        if (value == null) {
10495
          unsetOrderId();
10496
        } else {
10497
          setOrderId((Long)value);
10498
        }
10499
        break;
10500
 
5110 mandeep.dh 10501
      case FULFILMENT_WAREHOUSE_ID:
4496 mandeep.dh 10502
        if (value == null) {
5110 mandeep.dh 10503
          unsetFulfilmentWarehouseId();
4496 mandeep.dh 10504
        } else {
5110 mandeep.dh 10505
          setFulfilmentWarehouseId((Long)value);
4496 mandeep.dh 10506
        }
10507
        break;
10508
 
2820 chandransh 10509
      }
10510
    }
10511
 
10512
    public Object getFieldValue(_Fields field) {
10513
      switch (field) {
4496 mandeep.dh 10514
      case INVENTORY_ITEM_ID:
10515
        return Long.valueOf(getInventoryItemId());
2820 chandransh 10516
 
10517
      case TYPE:
10518
        return getType();
10519
 
4496 mandeep.dh 10520
      case QUANTITY:
10521
        return Long.valueOf(getQuantity());
10522
 
10523
      case ORDER_ID:
10524
        return Long.valueOf(getOrderId());
10525
 
5110 mandeep.dh 10526
      case FULFILMENT_WAREHOUSE_ID:
10527
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 10528
 
2820 chandransh 10529
      }
10530
      throw new IllegalStateException();
10531
    }
10532
 
3430 rajveer 10533
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10534
    public boolean isSet(_Fields field) {
10535
      if (field == null) {
10536
        throw new IllegalArgumentException();
10537
      }
2820 chandransh 10538
 
10539
      switch (field) {
4496 mandeep.dh 10540
      case INVENTORY_ITEM_ID:
10541
        return isSetInventoryItemId();
2820 chandransh 10542
      case TYPE:
10543
        return isSetType();
4496 mandeep.dh 10544
      case QUANTITY:
10545
        return isSetQuantity();
10546
      case ORDER_ID:
10547
        return isSetOrderId();
5110 mandeep.dh 10548
      case FULFILMENT_WAREHOUSE_ID:
10549
        return isSetFulfilmentWarehouseId();
2820 chandransh 10550
      }
10551
      throw new IllegalStateException();
10552
    }
10553
 
10554
    @Override
10555
    public boolean equals(Object that) {
10556
      if (that == null)
10557
        return false;
4496 mandeep.dh 10558
      if (that instanceof scanForOrder_args)
10559
        return this.equals((scanForOrder_args)that);
2820 chandransh 10560
      return false;
10561
    }
10562
 
4496 mandeep.dh 10563
    public boolean equals(scanForOrder_args that) {
2820 chandransh 10564
      if (that == null)
10565
        return false;
10566
 
4496 mandeep.dh 10567
      boolean this_present_inventoryItemId = true;
10568
      boolean that_present_inventoryItemId = true;
10569
      if (this_present_inventoryItemId || that_present_inventoryItemId) {
10570
        if (!(this_present_inventoryItemId && that_present_inventoryItemId))
2820 chandransh 10571
          return false;
4496 mandeep.dh 10572
        if (this.inventoryItemId != that.inventoryItemId)
2820 chandransh 10573
          return false;
10574
      }
10575
 
10576
      boolean this_present_type = true && this.isSetType();
10577
      boolean that_present_type = true && that.isSetType();
10578
      if (this_present_type || that_present_type) {
10579
        if (!(this_present_type && that_present_type))
10580
          return false;
10581
        if (!this.type.equals(that.type))
10582
          return false;
10583
      }
10584
 
4496 mandeep.dh 10585
      boolean this_present_quantity = true;
10586
      boolean that_present_quantity = true;
10587
      if (this_present_quantity || that_present_quantity) {
10588
        if (!(this_present_quantity && that_present_quantity))
10589
          return false;
10590
        if (this.quantity != that.quantity)
10591
          return false;
10592
      }
10593
 
10594
      boolean this_present_orderId = true;
10595
      boolean that_present_orderId = true;
10596
      if (this_present_orderId || that_present_orderId) {
10597
        if (!(this_present_orderId && that_present_orderId))
10598
          return false;
10599
        if (this.orderId != that.orderId)
10600
          return false;
10601
      }
10602
 
5110 mandeep.dh 10603
      boolean this_present_fulfilmentWarehouseId = true;
10604
      boolean that_present_fulfilmentWarehouseId = true;
10605
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
10606
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
4496 mandeep.dh 10607
          return false;
5110 mandeep.dh 10608
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
4496 mandeep.dh 10609
          return false;
10610
      }
10611
 
2820 chandransh 10612
      return true;
10613
    }
10614
 
10615
    @Override
10616
    public int hashCode() {
10617
      return 0;
10618
    }
10619
 
4496 mandeep.dh 10620
    public int compareTo(scanForOrder_args other) {
2820 chandransh 10621
      if (!getClass().equals(other.getClass())) {
10622
        return getClass().getName().compareTo(other.getClass().getName());
10623
      }
10624
 
10625
      int lastComparison = 0;
4496 mandeep.dh 10626
      scanForOrder_args typedOther = (scanForOrder_args)other;
2820 chandransh 10627
 
4496 mandeep.dh 10628
      lastComparison = Boolean.valueOf(isSetInventoryItemId()).compareTo(typedOther.isSetInventoryItemId());
2820 chandransh 10629
      if (lastComparison != 0) {
10630
        return lastComparison;
10631
      }
4496 mandeep.dh 10632
      if (isSetInventoryItemId()) {
10633
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItemId, typedOther.inventoryItemId);
3430 rajveer 10634
        if (lastComparison != 0) {
10635
          return lastComparison;
10636
        }
2820 chandransh 10637
      }
4496 mandeep.dh 10638
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 10639
      if (lastComparison != 0) {
10640
        return lastComparison;
10641
      }
4496 mandeep.dh 10642
      if (isSetType()) {
10643
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 10644
        if (lastComparison != 0) {
10645
          return lastComparison;
10646
        }
2820 chandransh 10647
      }
4496 mandeep.dh 10648
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
2820 chandransh 10649
      if (lastComparison != 0) {
10650
        return lastComparison;
10651
      }
4496 mandeep.dh 10652
      if (isSetQuantity()) {
10653
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
3430 rajveer 10654
        if (lastComparison != 0) {
10655
          return lastComparison;
10656
        }
2820 chandransh 10657
      }
4496 mandeep.dh 10658
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
10659
      if (lastComparison != 0) {
10660
        return lastComparison;
10661
      }
10662
      if (isSetOrderId()) {
10663
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
10664
        if (lastComparison != 0) {
10665
          return lastComparison;
10666
        }
10667
      }
5110 mandeep.dh 10668
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
4496 mandeep.dh 10669
      if (lastComparison != 0) {
10670
        return lastComparison;
10671
      }
5110 mandeep.dh 10672
      if (isSetFulfilmentWarehouseId()) {
10673
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
4496 mandeep.dh 10674
        if (lastComparison != 0) {
10675
          return lastComparison;
10676
        }
10677
      }
2820 chandransh 10678
      return 0;
10679
    }
10680
 
3430 rajveer 10681
    public _Fields fieldForId(int fieldId) {
10682
      return _Fields.findByThriftId(fieldId);
10683
    }
10684
 
10685
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10686
      org.apache.thrift.protocol.TField field;
2820 chandransh 10687
      iprot.readStructBegin();
10688
      while (true)
10689
      {
10690
        field = iprot.readFieldBegin();
3430 rajveer 10691
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 10692
          break;
10693
        }
3430 rajveer 10694
        switch (field.id) {
4496 mandeep.dh 10695
          case 1: // INVENTORY_ITEM_ID
10696
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10697
              this.inventoryItemId = iprot.readI64();
10698
              setInventoryItemIdIsSet(true);
3430 rajveer 10699
            } else { 
10700
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10701
            }
10702
            break;
4496 mandeep.dh 10703
          case 2: // TYPE
10704
            if (field.type == org.apache.thrift.protocol.TType.I32) {
10705
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 10706
            } else { 
10707
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10708
            }
10709
            break;
4496 mandeep.dh 10710
          case 3: // QUANTITY
10711
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10712
              this.quantity = iprot.readI64();
10713
              setQuantityIsSet(true);
3430 rajveer 10714
            } else { 
10715
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10716
            }
10717
            break;
4496 mandeep.dh 10718
          case 4: // ORDER_ID
10719
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10720
              this.orderId = iprot.readI64();
10721
              setOrderIdIsSet(true);
10722
            } else { 
10723
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10724
            }
10725
            break;
5110 mandeep.dh 10726
          case 5: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 10727
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 10728
              this.fulfilmentWarehouseId = iprot.readI64();
10729
              setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 10730
            } else { 
10731
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10732
            }
10733
            break;
3430 rajveer 10734
          default:
10735
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 10736
        }
3430 rajveer 10737
        iprot.readFieldEnd();
2820 chandransh 10738
      }
10739
      iprot.readStructEnd();
10740
      validate();
10741
    }
10742
 
3430 rajveer 10743
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 10744
      validate();
10745
 
10746
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 10747
      oprot.writeFieldBegin(INVENTORY_ITEM_ID_FIELD_DESC);
10748
      oprot.writeI64(this.inventoryItemId);
10749
      oprot.writeFieldEnd();
2820 chandransh 10750
      if (this.type != null) {
10751
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
10752
        oprot.writeI32(this.type.getValue());
10753
        oprot.writeFieldEnd();
10754
      }
4496 mandeep.dh 10755
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
10756
      oprot.writeI64(this.quantity);
10757
      oprot.writeFieldEnd();
10758
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
10759
      oprot.writeI64(this.orderId);
10760
      oprot.writeFieldEnd();
5110 mandeep.dh 10761
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
10762
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 10763
      oprot.writeFieldEnd();
2820 chandransh 10764
      oprot.writeFieldStop();
10765
      oprot.writeStructEnd();
10766
    }
10767
 
10768
    @Override
10769
    public String toString() {
4496 mandeep.dh 10770
      StringBuilder sb = new StringBuilder("scanForOrder_args(");
2820 chandransh 10771
      boolean first = true;
10772
 
4496 mandeep.dh 10773
      sb.append("inventoryItemId:");
10774
      sb.append(this.inventoryItemId);
2820 chandransh 10775
      first = false;
10776
      if (!first) sb.append(", ");
10777
      sb.append("type:");
10778
      if (this.type == null) {
10779
        sb.append("null");
10780
      } else {
10781
        sb.append(this.type);
10782
      }
10783
      first = false;
4496 mandeep.dh 10784
      if (!first) sb.append(", ");
10785
      sb.append("quantity:");
10786
      sb.append(this.quantity);
10787
      first = false;
10788
      if (!first) sb.append(", ");
10789
      sb.append("orderId:");
10790
      sb.append(this.orderId);
10791
      first = false;
10792
      if (!first) sb.append(", ");
5110 mandeep.dh 10793
      sb.append("fulfilmentWarehouseId:");
10794
      sb.append(this.fulfilmentWarehouseId);
4496 mandeep.dh 10795
      first = false;
2820 chandransh 10796
      sb.append(")");
10797
      return sb.toString();
10798
    }
10799
 
3430 rajveer 10800
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 10801
      // check for required fields
10802
    }
10803
 
3430 rajveer 10804
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10805
      try {
10806
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10807
      } catch (org.apache.thrift.TException te) {
10808
        throw new java.io.IOException(te);
10809
      }
10810
    }
10811
 
10812
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10813
      try {
4496 mandeep.dh 10814
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10815
        __isset_bit_vector = new BitSet(1);
3430 rajveer 10816
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10817
      } catch (org.apache.thrift.TException te) {
10818
        throw new java.io.IOException(te);
10819
      }
10820
    }
10821
 
2820 chandransh 10822
  }
10823
 
4496 mandeep.dh 10824
  public static class scanForOrder_result implements org.apache.thrift.TBase<scanForOrder_result, scanForOrder_result._Fields>, java.io.Serializable, Cloneable   {
10825
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_result");
2820 chandransh 10826
 
3430 rajveer 10827
    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 10828
 
3430 rajveer 10829
    private WarehouseServiceException wex; // required
2820 chandransh 10830
 
10831
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 10832
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2820 chandransh 10833
      WEX((short)1, "wex");
10834
 
10835
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10836
 
10837
      static {
10838
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10839
          byName.put(field.getFieldName(), field);
10840
        }
10841
      }
10842
 
10843
      /**
10844
       * Find the _Fields constant that matches fieldId, or null if its not found.
10845
       */
10846
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 10847
        switch(fieldId) {
10848
          case 1: // WEX
10849
            return WEX;
10850
          default:
10851
            return null;
10852
        }
2820 chandransh 10853
      }
10854
 
10855
      /**
10856
       * Find the _Fields constant that matches fieldId, throwing an exception
10857
       * if it is not found.
10858
       */
10859
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10860
        _Fields fields = findByThriftId(fieldId);
10861
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10862
        return fields;
10863
      }
10864
 
10865
      /**
10866
       * Find the _Fields constant that matches name, or null if its not found.
10867
       */
10868
      public static _Fields findByName(String name) {
10869
        return byName.get(name);
10870
      }
10871
 
10872
      private final short _thriftId;
10873
      private final String _fieldName;
10874
 
10875
      _Fields(short thriftId, String fieldName) {
10876
        _thriftId = thriftId;
10877
        _fieldName = fieldName;
10878
      }
10879
 
10880
      public short getThriftFieldId() {
10881
        return _thriftId;
10882
      }
10883
 
10884
      public String getFieldName() {
10885
        return _fieldName;
10886
      }
10887
    }
10888
 
10889
    // isset id assignments
10890
 
3430 rajveer 10891
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 10892
    static {
3430 rajveer 10893
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10894
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10895
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
10896
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 10897
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_result.class, metaDataMap);
2820 chandransh 10898
    }
10899
 
4496 mandeep.dh 10900
    public scanForOrder_result() {
2820 chandransh 10901
    }
10902
 
4496 mandeep.dh 10903
    public scanForOrder_result(
2820 chandransh 10904
      WarehouseServiceException wex)
10905
    {
10906
      this();
10907
      this.wex = wex;
10908
    }
10909
 
10910
    /**
10911
     * Performs a deep copy on <i>other</i>.
10912
     */
4496 mandeep.dh 10913
    public scanForOrder_result(scanForOrder_result other) {
2820 chandransh 10914
      if (other.isSetWex()) {
10915
        this.wex = new WarehouseServiceException(other.wex);
10916
      }
10917
    }
10918
 
4496 mandeep.dh 10919
    public scanForOrder_result deepCopy() {
10920
      return new scanForOrder_result(this);
2820 chandransh 10921
    }
10922
 
3430 rajveer 10923
    @Override
10924
    public void clear() {
10925
      this.wex = null;
2820 chandransh 10926
    }
10927
 
10928
    public WarehouseServiceException getWex() {
10929
      return this.wex;
10930
    }
10931
 
3430 rajveer 10932
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 10933
      this.wex = wex;
10934
    }
10935
 
10936
    public void unsetWex() {
10937
      this.wex = null;
10938
    }
10939
 
3430 rajveer 10940
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 10941
    public boolean isSetWex() {
10942
      return this.wex != null;
10943
    }
10944
 
10945
    public void setWexIsSet(boolean value) {
10946
      if (!value) {
10947
        this.wex = null;
10948
      }
10949
    }
10950
 
10951
    public void setFieldValue(_Fields field, Object value) {
10952
      switch (field) {
10953
      case WEX:
10954
        if (value == null) {
10955
          unsetWex();
10956
        } else {
10957
          setWex((WarehouseServiceException)value);
10958
        }
10959
        break;
10960
 
10961
      }
10962
    }
10963
 
10964
    public Object getFieldValue(_Fields field) {
10965
      switch (field) {
10966
      case WEX:
10967
        return getWex();
10968
 
10969
      }
10970
      throw new IllegalStateException();
10971
    }
10972
 
3430 rajveer 10973
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10974
    public boolean isSet(_Fields field) {
10975
      if (field == null) {
10976
        throw new IllegalArgumentException();
10977
      }
2820 chandransh 10978
 
10979
      switch (field) {
10980
      case WEX:
10981
        return isSetWex();
10982
      }
10983
      throw new IllegalStateException();
10984
    }
10985
 
10986
    @Override
10987
    public boolean equals(Object that) {
10988
      if (that == null)
10989
        return false;
4496 mandeep.dh 10990
      if (that instanceof scanForOrder_result)
10991
        return this.equals((scanForOrder_result)that);
2820 chandransh 10992
      return false;
10993
    }
10994
 
4496 mandeep.dh 10995
    public boolean equals(scanForOrder_result that) {
2820 chandransh 10996
      if (that == null)
10997
        return false;
10998
 
10999
      boolean this_present_wex = true && this.isSetWex();
11000
      boolean that_present_wex = true && that.isSetWex();
11001
      if (this_present_wex || that_present_wex) {
11002
        if (!(this_present_wex && that_present_wex))
11003
          return false;
11004
        if (!this.wex.equals(that.wex))
11005
          return false;
11006
      }
11007
 
11008
      return true;
11009
    }
11010
 
11011
    @Override
11012
    public int hashCode() {
11013
      return 0;
11014
    }
11015
 
4496 mandeep.dh 11016
    public int compareTo(scanForOrder_result other) {
2820 chandransh 11017
      if (!getClass().equals(other.getClass())) {
11018
        return getClass().getName().compareTo(other.getClass().getName());
11019
      }
11020
 
11021
      int lastComparison = 0;
4496 mandeep.dh 11022
      scanForOrder_result typedOther = (scanForOrder_result)other;
2820 chandransh 11023
 
3430 rajveer 11024
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 11025
      if (lastComparison != 0) {
11026
        return lastComparison;
11027
      }
3430 rajveer 11028
      if (isSetWex()) {
11029
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
11030
        if (lastComparison != 0) {
11031
          return lastComparison;
11032
        }
2820 chandransh 11033
      }
11034
      return 0;
11035
    }
11036
 
3430 rajveer 11037
    public _Fields fieldForId(int fieldId) {
11038
      return _Fields.findByThriftId(fieldId);
11039
    }
11040
 
11041
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11042
      org.apache.thrift.protocol.TField field;
2820 chandransh 11043
      iprot.readStructBegin();
11044
      while (true)
11045
      {
11046
        field = iprot.readFieldBegin();
3430 rajveer 11047
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 11048
          break;
11049
        }
3430 rajveer 11050
        switch (field.id) {
11051
          case 1: // WEX
11052
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11053
              this.wex = new WarehouseServiceException();
11054
              this.wex.read(iprot);
11055
            } else { 
11056
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11057
            }
11058
            break;
11059
          default:
11060
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 11061
        }
3430 rajveer 11062
        iprot.readFieldEnd();
2820 chandransh 11063
      }
11064
      iprot.readStructEnd();
11065
      validate();
11066
    }
11067
 
3430 rajveer 11068
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 11069
      oprot.writeStructBegin(STRUCT_DESC);
11070
 
11071
      if (this.isSetWex()) {
11072
        oprot.writeFieldBegin(WEX_FIELD_DESC);
11073
        this.wex.write(oprot);
11074
        oprot.writeFieldEnd();
11075
      }
11076
      oprot.writeFieldStop();
11077
      oprot.writeStructEnd();
11078
    }
11079
 
11080
    @Override
11081
    public String toString() {
4496 mandeep.dh 11082
      StringBuilder sb = new StringBuilder("scanForOrder_result(");
2820 chandransh 11083
      boolean first = true;
11084
 
11085
      sb.append("wex:");
11086
      if (this.wex == null) {
11087
        sb.append("null");
11088
      } else {
11089
        sb.append(this.wex);
11090
      }
11091
      first = false;
11092
      sb.append(")");
11093
      return sb.toString();
11094
    }
11095
 
3430 rajveer 11096
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 11097
      // check for required fields
11098
    }
11099
 
3430 rajveer 11100
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11101
      try {
11102
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11103
      } catch (org.apache.thrift.TException te) {
11104
        throw new java.io.IOException(te);
11105
      }
11106
    }
11107
 
11108
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11109
      try {
11110
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11111
      } catch (org.apache.thrift.TException te) {
11112
        throw new java.io.IOException(te);
11113
      }
11114
    }
11115
 
2820 chandransh 11116
  }
11117
 
4496 mandeep.dh 11118
  public static class createItemNumberMapping_args implements org.apache.thrift.TBase<createItemNumberMapping_args, createItemNumberMapping_args._Fields>, java.io.Serializable, Cloneable   {
11119
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_args");
11120
 
11121
    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);
11122
    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);
11123
 
11124
    private String itemNumber; // required
11125
    private long itemId; // required
11126
 
11127
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11128
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11129
      ITEM_NUMBER((short)1, "itemNumber"),
11130
      ITEM_ID((short)2, "itemId");
11131
 
11132
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11133
 
11134
      static {
11135
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11136
          byName.put(field.getFieldName(), field);
11137
        }
11138
      }
11139
 
11140
      /**
11141
       * Find the _Fields constant that matches fieldId, or null if its not found.
11142
       */
11143
      public static _Fields findByThriftId(int fieldId) {
11144
        switch(fieldId) {
11145
          case 1: // ITEM_NUMBER
11146
            return ITEM_NUMBER;
11147
          case 2: // ITEM_ID
11148
            return ITEM_ID;
11149
          default:
11150
            return null;
11151
        }
11152
      }
11153
 
11154
      /**
11155
       * Find the _Fields constant that matches fieldId, throwing an exception
11156
       * if it is not found.
11157
       */
11158
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11159
        _Fields fields = findByThriftId(fieldId);
11160
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11161
        return fields;
11162
      }
11163
 
11164
      /**
11165
       * Find the _Fields constant that matches name, or null if its not found.
11166
       */
11167
      public static _Fields findByName(String name) {
11168
        return byName.get(name);
11169
      }
11170
 
11171
      private final short _thriftId;
11172
      private final String _fieldName;
11173
 
11174
      _Fields(short thriftId, String fieldName) {
11175
        _thriftId = thriftId;
11176
        _fieldName = fieldName;
11177
      }
11178
 
11179
      public short getThriftFieldId() {
11180
        return _thriftId;
11181
      }
11182
 
11183
      public String getFieldName() {
11184
        return _fieldName;
11185
      }
11186
    }
11187
 
11188
    // isset id assignments
11189
    private static final int __ITEMID_ISSET_ID = 0;
11190
    private BitSet __isset_bit_vector = new BitSet(1);
11191
 
11192
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11193
    static {
11194
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11195
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11196
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
11197
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11198
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11199
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11200
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_args.class, metaDataMap);
11201
    }
11202
 
11203
    public createItemNumberMapping_args() {
11204
    }
11205
 
11206
    public createItemNumberMapping_args(
11207
      String itemNumber,
11208
      long itemId)
11209
    {
11210
      this();
11211
      this.itemNumber = itemNumber;
11212
      this.itemId = itemId;
11213
      setItemIdIsSet(true);
11214
    }
11215
 
11216
    /**
11217
     * Performs a deep copy on <i>other</i>.
11218
     */
11219
    public createItemNumberMapping_args(createItemNumberMapping_args other) {
11220
      __isset_bit_vector.clear();
11221
      __isset_bit_vector.or(other.__isset_bit_vector);
11222
      if (other.isSetItemNumber()) {
11223
        this.itemNumber = other.itemNumber;
11224
      }
11225
      this.itemId = other.itemId;
11226
    }
11227
 
11228
    public createItemNumberMapping_args deepCopy() {
11229
      return new createItemNumberMapping_args(this);
11230
    }
11231
 
11232
    @Override
11233
    public void clear() {
11234
      this.itemNumber = null;
11235
      setItemIdIsSet(false);
11236
      this.itemId = 0;
11237
    }
11238
 
11239
    public String getItemNumber() {
11240
      return this.itemNumber;
11241
    }
11242
 
11243
    public void setItemNumber(String itemNumber) {
11244
      this.itemNumber = itemNumber;
11245
    }
11246
 
11247
    public void unsetItemNumber() {
11248
      this.itemNumber = null;
11249
    }
11250
 
11251
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
11252
    public boolean isSetItemNumber() {
11253
      return this.itemNumber != null;
11254
    }
11255
 
11256
    public void setItemNumberIsSet(boolean value) {
11257
      if (!value) {
11258
        this.itemNumber = null;
11259
      }
11260
    }
11261
 
11262
    public long getItemId() {
11263
      return this.itemId;
11264
    }
11265
 
11266
    public void setItemId(long itemId) {
11267
      this.itemId = itemId;
11268
      setItemIdIsSet(true);
11269
    }
11270
 
11271
    public void unsetItemId() {
11272
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
11273
    }
11274
 
11275
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
11276
    public boolean isSetItemId() {
11277
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
11278
    }
11279
 
11280
    public void setItemIdIsSet(boolean value) {
11281
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
11282
    }
11283
 
11284
    public void setFieldValue(_Fields field, Object value) {
11285
      switch (field) {
11286
      case ITEM_NUMBER:
11287
        if (value == null) {
11288
          unsetItemNumber();
11289
        } else {
11290
          setItemNumber((String)value);
11291
        }
11292
        break;
11293
 
11294
      case ITEM_ID:
11295
        if (value == null) {
11296
          unsetItemId();
11297
        } else {
11298
          setItemId((Long)value);
11299
        }
11300
        break;
11301
 
11302
      }
11303
    }
11304
 
11305
    public Object getFieldValue(_Fields field) {
11306
      switch (field) {
11307
      case ITEM_NUMBER:
11308
        return getItemNumber();
11309
 
11310
      case ITEM_ID:
11311
        return Long.valueOf(getItemId());
11312
 
11313
      }
11314
      throw new IllegalStateException();
11315
    }
11316
 
11317
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11318
    public boolean isSet(_Fields field) {
11319
      if (field == null) {
11320
        throw new IllegalArgumentException();
11321
      }
11322
 
11323
      switch (field) {
11324
      case ITEM_NUMBER:
11325
        return isSetItemNumber();
11326
      case ITEM_ID:
11327
        return isSetItemId();
11328
      }
11329
      throw new IllegalStateException();
11330
    }
11331
 
11332
    @Override
11333
    public boolean equals(Object that) {
11334
      if (that == null)
11335
        return false;
11336
      if (that instanceof createItemNumberMapping_args)
11337
        return this.equals((createItemNumberMapping_args)that);
11338
      return false;
11339
    }
11340
 
11341
    public boolean equals(createItemNumberMapping_args that) {
11342
      if (that == null)
11343
        return false;
11344
 
11345
      boolean this_present_itemNumber = true && this.isSetItemNumber();
11346
      boolean that_present_itemNumber = true && that.isSetItemNumber();
11347
      if (this_present_itemNumber || that_present_itemNumber) {
11348
        if (!(this_present_itemNumber && that_present_itemNumber))
11349
          return false;
11350
        if (!this.itemNumber.equals(that.itemNumber))
11351
          return false;
11352
      }
11353
 
11354
      boolean this_present_itemId = true;
11355
      boolean that_present_itemId = true;
11356
      if (this_present_itemId || that_present_itemId) {
11357
        if (!(this_present_itemId && that_present_itemId))
11358
          return false;
11359
        if (this.itemId != that.itemId)
11360
          return false;
11361
      }
11362
 
11363
      return true;
11364
    }
11365
 
11366
    @Override
11367
    public int hashCode() {
11368
      return 0;
11369
    }
11370
 
11371
    public int compareTo(createItemNumberMapping_args other) {
11372
      if (!getClass().equals(other.getClass())) {
11373
        return getClass().getName().compareTo(other.getClass().getName());
11374
      }
11375
 
11376
      int lastComparison = 0;
11377
      createItemNumberMapping_args typedOther = (createItemNumberMapping_args)other;
11378
 
11379
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
11380
      if (lastComparison != 0) {
11381
        return lastComparison;
11382
      }
11383
      if (isSetItemNumber()) {
11384
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
11385
        if (lastComparison != 0) {
11386
          return lastComparison;
11387
        }
11388
      }
11389
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
11390
      if (lastComparison != 0) {
11391
        return lastComparison;
11392
      }
11393
      if (isSetItemId()) {
11394
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
11395
        if (lastComparison != 0) {
11396
          return lastComparison;
11397
        }
11398
      }
11399
      return 0;
11400
    }
11401
 
11402
    public _Fields fieldForId(int fieldId) {
11403
      return _Fields.findByThriftId(fieldId);
11404
    }
11405
 
11406
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11407
      org.apache.thrift.protocol.TField field;
11408
      iprot.readStructBegin();
11409
      while (true)
11410
      {
11411
        field = iprot.readFieldBegin();
11412
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11413
          break;
11414
        }
11415
        switch (field.id) {
11416
          case 1: // ITEM_NUMBER
11417
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11418
              this.itemNumber = iprot.readString();
11419
            } else { 
11420
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11421
            }
11422
            break;
11423
          case 2: // ITEM_ID
11424
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11425
              this.itemId = iprot.readI64();
11426
              setItemIdIsSet(true);
11427
            } else { 
11428
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11429
            }
11430
            break;
11431
          default:
11432
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11433
        }
11434
        iprot.readFieldEnd();
11435
      }
11436
      iprot.readStructEnd();
11437
      validate();
11438
    }
11439
 
11440
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11441
      validate();
11442
 
11443
      oprot.writeStructBegin(STRUCT_DESC);
11444
      if (this.itemNumber != null) {
11445
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
11446
        oprot.writeString(this.itemNumber);
11447
        oprot.writeFieldEnd();
11448
      }
11449
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
11450
      oprot.writeI64(this.itemId);
11451
      oprot.writeFieldEnd();
11452
      oprot.writeFieldStop();
11453
      oprot.writeStructEnd();
11454
    }
11455
 
11456
    @Override
11457
    public String toString() {
11458
      StringBuilder sb = new StringBuilder("createItemNumberMapping_args(");
11459
      boolean first = true;
11460
 
11461
      sb.append("itemNumber:");
11462
      if (this.itemNumber == null) {
11463
        sb.append("null");
11464
      } else {
11465
        sb.append(this.itemNumber);
11466
      }
11467
      first = false;
11468
      if (!first) sb.append(", ");
11469
      sb.append("itemId:");
11470
      sb.append(this.itemId);
11471
      first = false;
11472
      sb.append(")");
11473
      return sb.toString();
11474
    }
11475
 
11476
    public void validate() throws org.apache.thrift.TException {
11477
      // check for required fields
11478
    }
11479
 
11480
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11481
      try {
11482
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11483
      } catch (org.apache.thrift.TException te) {
11484
        throw new java.io.IOException(te);
11485
      }
11486
    }
11487
 
11488
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11489
      try {
11490
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11491
        __isset_bit_vector = new BitSet(1);
11492
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11493
      } catch (org.apache.thrift.TException te) {
11494
        throw new java.io.IOException(te);
11495
      }
11496
    }
11497
 
11498
  }
11499
 
11500
  public static class createItemNumberMapping_result implements org.apache.thrift.TBase<createItemNumberMapping_result, createItemNumberMapping_result._Fields>, java.io.Serializable, Cloneable   {
11501
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_result");
11502
 
11503
 
11504
 
11505
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11506
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11507
;
11508
 
11509
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11510
 
11511
      static {
11512
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11513
          byName.put(field.getFieldName(), field);
11514
        }
11515
      }
11516
 
11517
      /**
11518
       * Find the _Fields constant that matches fieldId, or null if its not found.
11519
       */
11520
      public static _Fields findByThriftId(int fieldId) {
11521
        switch(fieldId) {
11522
          default:
11523
            return null;
11524
        }
11525
      }
11526
 
11527
      /**
11528
       * Find the _Fields constant that matches fieldId, throwing an exception
11529
       * if it is not found.
11530
       */
11531
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11532
        _Fields fields = findByThriftId(fieldId);
11533
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11534
        return fields;
11535
      }
11536
 
11537
      /**
11538
       * Find the _Fields constant that matches name, or null if its not found.
11539
       */
11540
      public static _Fields findByName(String name) {
11541
        return byName.get(name);
11542
      }
11543
 
11544
      private final short _thriftId;
11545
      private final String _fieldName;
11546
 
11547
      _Fields(short thriftId, String fieldName) {
11548
        _thriftId = thriftId;
11549
        _fieldName = fieldName;
11550
      }
11551
 
11552
      public short getThriftFieldId() {
11553
        return _thriftId;
11554
      }
11555
 
11556
      public String getFieldName() {
11557
        return _fieldName;
11558
      }
11559
    }
11560
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11561
    static {
11562
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11563
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11564
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_result.class, metaDataMap);
11565
    }
11566
 
11567
    public createItemNumberMapping_result() {
11568
    }
11569
 
11570
    /**
11571
     * Performs a deep copy on <i>other</i>.
11572
     */
11573
    public createItemNumberMapping_result(createItemNumberMapping_result other) {
11574
    }
11575
 
11576
    public createItemNumberMapping_result deepCopy() {
11577
      return new createItemNumberMapping_result(this);
11578
    }
11579
 
11580
    @Override
11581
    public void clear() {
11582
    }
11583
 
11584
    public void setFieldValue(_Fields field, Object value) {
11585
      switch (field) {
11586
      }
11587
    }
11588
 
11589
    public Object getFieldValue(_Fields field) {
11590
      switch (field) {
11591
      }
11592
      throw new IllegalStateException();
11593
    }
11594
 
11595
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11596
    public boolean isSet(_Fields field) {
11597
      if (field == null) {
11598
        throw new IllegalArgumentException();
11599
      }
11600
 
11601
      switch (field) {
11602
      }
11603
      throw new IllegalStateException();
11604
    }
11605
 
11606
    @Override
11607
    public boolean equals(Object that) {
11608
      if (that == null)
11609
        return false;
11610
      if (that instanceof createItemNumberMapping_result)
11611
        return this.equals((createItemNumberMapping_result)that);
11612
      return false;
11613
    }
11614
 
11615
    public boolean equals(createItemNumberMapping_result that) {
11616
      if (that == null)
11617
        return false;
11618
 
11619
      return true;
11620
    }
11621
 
11622
    @Override
11623
    public int hashCode() {
11624
      return 0;
11625
    }
11626
 
11627
    public int compareTo(createItemNumberMapping_result other) {
11628
      if (!getClass().equals(other.getClass())) {
11629
        return getClass().getName().compareTo(other.getClass().getName());
11630
      }
11631
 
11632
      int lastComparison = 0;
11633
      createItemNumberMapping_result typedOther = (createItemNumberMapping_result)other;
11634
 
11635
      return 0;
11636
    }
11637
 
11638
    public _Fields fieldForId(int fieldId) {
11639
      return _Fields.findByThriftId(fieldId);
11640
    }
11641
 
11642
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11643
      org.apache.thrift.protocol.TField field;
11644
      iprot.readStructBegin();
11645
      while (true)
11646
      {
11647
        field = iprot.readFieldBegin();
11648
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11649
          break;
11650
        }
11651
        switch (field.id) {
11652
          default:
11653
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11654
        }
11655
        iprot.readFieldEnd();
11656
      }
11657
      iprot.readStructEnd();
11658
      validate();
11659
    }
11660
 
11661
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11662
      oprot.writeStructBegin(STRUCT_DESC);
11663
 
11664
      oprot.writeFieldStop();
11665
      oprot.writeStructEnd();
11666
    }
11667
 
11668
    @Override
11669
    public String toString() {
11670
      StringBuilder sb = new StringBuilder("createItemNumberMapping_result(");
11671
      boolean first = true;
11672
 
11673
      sb.append(")");
11674
      return sb.toString();
11675
    }
11676
 
11677
    public void validate() throws org.apache.thrift.TException {
11678
      // check for required fields
11679
    }
11680
 
11681
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11682
      try {
11683
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11684
      } catch (org.apache.thrift.TException te) {
11685
        throw new java.io.IOException(te);
11686
      }
11687
    }
11688
 
11689
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11690
      try {
11691
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11692
      } catch (org.apache.thrift.TException te) {
11693
        throw new java.io.IOException(te);
11694
      }
11695
    }
11696
 
11697
  }
11698
 
4622 amit.gupta 11699
  public static class getItemNumbers_args implements org.apache.thrift.TBase<getItemNumbers_args, getItemNumbers_args._Fields>, java.io.Serializable, Cloneable   {
11700
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_args");
11701
 
11702
    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);
11703
 
11704
    private long itemId; // required
11705
 
11706
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11707
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11708
      ITEM_ID((short)1, "itemId");
11709
 
11710
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11711
 
11712
      static {
11713
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11714
          byName.put(field.getFieldName(), field);
11715
        }
11716
      }
11717
 
11718
      /**
11719
       * Find the _Fields constant that matches fieldId, or null if its not found.
11720
       */
11721
      public static _Fields findByThriftId(int fieldId) {
11722
        switch(fieldId) {
11723
          case 1: // ITEM_ID
11724
            return ITEM_ID;
11725
          default:
11726
            return null;
11727
        }
11728
      }
11729
 
11730
      /**
11731
       * Find the _Fields constant that matches fieldId, throwing an exception
11732
       * if it is not found.
11733
       */
11734
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11735
        _Fields fields = findByThriftId(fieldId);
11736
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11737
        return fields;
11738
      }
11739
 
11740
      /**
11741
       * Find the _Fields constant that matches name, or null if its not found.
11742
       */
11743
      public static _Fields findByName(String name) {
11744
        return byName.get(name);
11745
      }
11746
 
11747
      private final short _thriftId;
11748
      private final String _fieldName;
11749
 
11750
      _Fields(short thriftId, String fieldName) {
11751
        _thriftId = thriftId;
11752
        _fieldName = fieldName;
11753
      }
11754
 
11755
      public short getThriftFieldId() {
11756
        return _thriftId;
11757
      }
11758
 
11759
      public String getFieldName() {
11760
        return _fieldName;
11761
      }
11762
    }
11763
 
11764
    // isset id assignments
11765
    private static final int __ITEMID_ISSET_ID = 0;
11766
    private BitSet __isset_bit_vector = new BitSet(1);
11767
 
11768
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11769
    static {
11770
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11771
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11772
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11773
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11774
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_args.class, metaDataMap);
11775
    }
11776
 
11777
    public getItemNumbers_args() {
11778
    }
11779
 
11780
    public getItemNumbers_args(
11781
      long itemId)
11782
    {
11783
      this();
11784
      this.itemId = itemId;
11785
      setItemIdIsSet(true);
11786
    }
11787
 
11788
    /**
11789
     * Performs a deep copy on <i>other</i>.
11790
     */
11791
    public getItemNumbers_args(getItemNumbers_args other) {
11792
      __isset_bit_vector.clear();
11793
      __isset_bit_vector.or(other.__isset_bit_vector);
11794
      this.itemId = other.itemId;
11795
    }
11796
 
11797
    public getItemNumbers_args deepCopy() {
11798
      return new getItemNumbers_args(this);
11799
    }
11800
 
11801
    @Override
11802
    public void clear() {
11803
      setItemIdIsSet(false);
11804
      this.itemId = 0;
11805
    }
11806
 
11807
    public long getItemId() {
11808
      return this.itemId;
11809
    }
11810
 
11811
    public void setItemId(long itemId) {
11812
      this.itemId = itemId;
11813
      setItemIdIsSet(true);
11814
    }
11815
 
11816
    public void unsetItemId() {
11817
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
11818
    }
11819
 
11820
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
11821
    public boolean isSetItemId() {
11822
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
11823
    }
11824
 
11825
    public void setItemIdIsSet(boolean value) {
11826
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
11827
    }
11828
 
11829
    public void setFieldValue(_Fields field, Object value) {
11830
      switch (field) {
11831
      case ITEM_ID:
11832
        if (value == null) {
11833
          unsetItemId();
11834
        } else {
11835
          setItemId((Long)value);
11836
        }
11837
        break;
11838
 
11839
      }
11840
    }
11841
 
11842
    public Object getFieldValue(_Fields field) {
11843
      switch (field) {
11844
      case ITEM_ID:
11845
        return Long.valueOf(getItemId());
11846
 
11847
      }
11848
      throw new IllegalStateException();
11849
    }
11850
 
11851
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11852
    public boolean isSet(_Fields field) {
11853
      if (field == null) {
11854
        throw new IllegalArgumentException();
11855
      }
11856
 
11857
      switch (field) {
11858
      case ITEM_ID:
11859
        return isSetItemId();
11860
      }
11861
      throw new IllegalStateException();
11862
    }
11863
 
11864
    @Override
11865
    public boolean equals(Object that) {
11866
      if (that == null)
11867
        return false;
11868
      if (that instanceof getItemNumbers_args)
11869
        return this.equals((getItemNumbers_args)that);
11870
      return false;
11871
    }
11872
 
11873
    public boolean equals(getItemNumbers_args that) {
11874
      if (that == null)
11875
        return false;
11876
 
11877
      boolean this_present_itemId = true;
11878
      boolean that_present_itemId = true;
11879
      if (this_present_itemId || that_present_itemId) {
11880
        if (!(this_present_itemId && that_present_itemId))
11881
          return false;
11882
        if (this.itemId != that.itemId)
11883
          return false;
11884
      }
11885
 
11886
      return true;
11887
    }
11888
 
11889
    @Override
11890
    public int hashCode() {
11891
      return 0;
11892
    }
11893
 
11894
    public int compareTo(getItemNumbers_args other) {
11895
      if (!getClass().equals(other.getClass())) {
11896
        return getClass().getName().compareTo(other.getClass().getName());
11897
      }
11898
 
11899
      int lastComparison = 0;
11900
      getItemNumbers_args typedOther = (getItemNumbers_args)other;
11901
 
11902
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
11903
      if (lastComparison != 0) {
11904
        return lastComparison;
11905
      }
11906
      if (isSetItemId()) {
11907
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
11908
        if (lastComparison != 0) {
11909
          return lastComparison;
11910
        }
11911
      }
11912
      return 0;
11913
    }
11914
 
11915
    public _Fields fieldForId(int fieldId) {
11916
      return _Fields.findByThriftId(fieldId);
11917
    }
11918
 
11919
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11920
      org.apache.thrift.protocol.TField field;
11921
      iprot.readStructBegin();
11922
      while (true)
11923
      {
11924
        field = iprot.readFieldBegin();
11925
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11926
          break;
11927
        }
11928
        switch (field.id) {
11929
          case 1: // ITEM_ID
11930
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11931
              this.itemId = iprot.readI64();
11932
              setItemIdIsSet(true);
11933
            } else { 
11934
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11935
            }
11936
            break;
11937
          default:
11938
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11939
        }
11940
        iprot.readFieldEnd();
11941
      }
11942
      iprot.readStructEnd();
11943
      validate();
11944
    }
11945
 
11946
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11947
      validate();
11948
 
11949
      oprot.writeStructBegin(STRUCT_DESC);
11950
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
11951
      oprot.writeI64(this.itemId);
11952
      oprot.writeFieldEnd();
11953
      oprot.writeFieldStop();
11954
      oprot.writeStructEnd();
11955
    }
11956
 
11957
    @Override
11958
    public String toString() {
11959
      StringBuilder sb = new StringBuilder("getItemNumbers_args(");
11960
      boolean first = true;
11961
 
11962
      sb.append("itemId:");
11963
      sb.append(this.itemId);
11964
      first = false;
11965
      sb.append(")");
11966
      return sb.toString();
11967
    }
11968
 
11969
    public void validate() throws org.apache.thrift.TException {
11970
      // check for required fields
11971
    }
11972
 
11973
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11974
      try {
11975
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11976
      } catch (org.apache.thrift.TException te) {
11977
        throw new java.io.IOException(te);
11978
      }
11979
    }
11980
 
11981
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11982
      try {
11983
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11984
        __isset_bit_vector = new BitSet(1);
11985
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11986
      } catch (org.apache.thrift.TException te) {
11987
        throw new java.io.IOException(te);
11988
      }
11989
    }
11990
 
11991
  }
11992
 
11993
  public static class getItemNumbers_result implements org.apache.thrift.TBase<getItemNumbers_result, getItemNumbers_result._Fields>, java.io.Serializable, Cloneable   {
11994
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_result");
11995
 
11996
    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);
11997
 
11998
    private List<String> success; // required
11999
 
12000
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12001
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12002
      SUCCESS((short)0, "success");
12003
 
12004
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12005
 
12006
      static {
12007
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12008
          byName.put(field.getFieldName(), field);
12009
        }
12010
      }
12011
 
12012
      /**
12013
       * Find the _Fields constant that matches fieldId, or null if its not found.
12014
       */
12015
      public static _Fields findByThriftId(int fieldId) {
12016
        switch(fieldId) {
12017
          case 0: // SUCCESS
12018
            return SUCCESS;
12019
          default:
12020
            return null;
12021
        }
12022
      }
12023
 
12024
      /**
12025
       * Find the _Fields constant that matches fieldId, throwing an exception
12026
       * if it is not found.
12027
       */
12028
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12029
        _Fields fields = findByThriftId(fieldId);
12030
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12031
        return fields;
12032
      }
12033
 
12034
      /**
12035
       * Find the _Fields constant that matches name, or null if its not found.
12036
       */
12037
      public static _Fields findByName(String name) {
12038
        return byName.get(name);
12039
      }
12040
 
12041
      private final short _thriftId;
12042
      private final String _fieldName;
12043
 
12044
      _Fields(short thriftId, String fieldName) {
12045
        _thriftId = thriftId;
12046
        _fieldName = fieldName;
12047
      }
12048
 
12049
      public short getThriftFieldId() {
12050
        return _thriftId;
12051
      }
12052
 
12053
      public String getFieldName() {
12054
        return _fieldName;
12055
      }
12056
    }
12057
 
12058
    // isset id assignments
12059
 
12060
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12061
    static {
12062
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12063
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12064
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12065
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
12066
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12067
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_result.class, metaDataMap);
12068
    }
12069
 
12070
    public getItemNumbers_result() {
12071
    }
12072
 
12073
    public getItemNumbers_result(
12074
      List<String> success)
12075
    {
12076
      this();
12077
      this.success = success;
12078
    }
12079
 
12080
    /**
12081
     * Performs a deep copy on <i>other</i>.
12082
     */
12083
    public getItemNumbers_result(getItemNumbers_result other) {
12084
      if (other.isSetSuccess()) {
12085
        List<String> __this__success = new ArrayList<String>();
12086
        for (String other_element : other.success) {
12087
          __this__success.add(other_element);
12088
        }
12089
        this.success = __this__success;
12090
      }
12091
    }
12092
 
12093
    public getItemNumbers_result deepCopy() {
12094
      return new getItemNumbers_result(this);
12095
    }
12096
 
12097
    @Override
12098
    public void clear() {
12099
      this.success = null;
12100
    }
12101
 
12102
    public int getSuccessSize() {
12103
      return (this.success == null) ? 0 : this.success.size();
12104
    }
12105
 
12106
    public java.util.Iterator<String> getSuccessIterator() {
12107
      return (this.success == null) ? null : this.success.iterator();
12108
    }
12109
 
12110
    public void addToSuccess(String elem) {
12111
      if (this.success == null) {
12112
        this.success = new ArrayList<String>();
12113
      }
12114
      this.success.add(elem);
12115
    }
12116
 
12117
    public List<String> getSuccess() {
12118
      return this.success;
12119
    }
12120
 
12121
    public void setSuccess(List<String> success) {
12122
      this.success = success;
12123
    }
12124
 
12125
    public void unsetSuccess() {
12126
      this.success = null;
12127
    }
12128
 
12129
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12130
    public boolean isSetSuccess() {
12131
      return this.success != null;
12132
    }
12133
 
12134
    public void setSuccessIsSet(boolean value) {
12135
      if (!value) {
12136
        this.success = null;
12137
      }
12138
    }
12139
 
12140
    public void setFieldValue(_Fields field, Object value) {
12141
      switch (field) {
12142
      case SUCCESS:
12143
        if (value == null) {
12144
          unsetSuccess();
12145
        } else {
12146
          setSuccess((List<String>)value);
12147
        }
12148
        break;
12149
 
12150
      }
12151
    }
12152
 
12153
    public Object getFieldValue(_Fields field) {
12154
      switch (field) {
12155
      case SUCCESS:
12156
        return getSuccess();
12157
 
12158
      }
12159
      throw new IllegalStateException();
12160
    }
12161
 
12162
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12163
    public boolean isSet(_Fields field) {
12164
      if (field == null) {
12165
        throw new IllegalArgumentException();
12166
      }
12167
 
12168
      switch (field) {
12169
      case SUCCESS:
12170
        return isSetSuccess();
12171
      }
12172
      throw new IllegalStateException();
12173
    }
12174
 
12175
    @Override
12176
    public boolean equals(Object that) {
12177
      if (that == null)
12178
        return false;
12179
      if (that instanceof getItemNumbers_result)
12180
        return this.equals((getItemNumbers_result)that);
12181
      return false;
12182
    }
12183
 
12184
    public boolean equals(getItemNumbers_result that) {
12185
      if (that == null)
12186
        return false;
12187
 
12188
      boolean this_present_success = true && this.isSetSuccess();
12189
      boolean that_present_success = true && that.isSetSuccess();
12190
      if (this_present_success || that_present_success) {
12191
        if (!(this_present_success && that_present_success))
12192
          return false;
12193
        if (!this.success.equals(that.success))
12194
          return false;
12195
      }
12196
 
12197
      return true;
12198
    }
12199
 
12200
    @Override
12201
    public int hashCode() {
12202
      return 0;
12203
    }
12204
 
12205
    public int compareTo(getItemNumbers_result other) {
12206
      if (!getClass().equals(other.getClass())) {
12207
        return getClass().getName().compareTo(other.getClass().getName());
12208
      }
12209
 
12210
      int lastComparison = 0;
12211
      getItemNumbers_result typedOther = (getItemNumbers_result)other;
12212
 
12213
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12214
      if (lastComparison != 0) {
12215
        return lastComparison;
12216
      }
12217
      if (isSetSuccess()) {
12218
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12219
        if (lastComparison != 0) {
12220
          return lastComparison;
12221
        }
12222
      }
12223
      return 0;
12224
    }
12225
 
12226
    public _Fields fieldForId(int fieldId) {
12227
      return _Fields.findByThriftId(fieldId);
12228
    }
12229
 
12230
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12231
      org.apache.thrift.protocol.TField field;
12232
      iprot.readStructBegin();
12233
      while (true)
12234
      {
12235
        field = iprot.readFieldBegin();
12236
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12237
          break;
12238
        }
12239
        switch (field.id) {
12240
          case 0: // SUCCESS
12241
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12242
              {
12243
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
12244
                this.success = new ArrayList<String>(_list16.size);
12245
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
12246
                {
12247
                  String _elem18; // required
12248
                  _elem18 = iprot.readString();
12249
                  this.success.add(_elem18);
12250
                }
12251
                iprot.readListEnd();
12252
              }
12253
            } else { 
12254
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12255
            }
12256
            break;
12257
          default:
12258
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12259
        }
12260
        iprot.readFieldEnd();
12261
      }
12262
      iprot.readStructEnd();
12263
      validate();
12264
    }
12265
 
12266
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12267
      oprot.writeStructBegin(STRUCT_DESC);
12268
 
12269
      if (this.isSetSuccess()) {
12270
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12271
        {
12272
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
12273
          for (String _iter19 : this.success)
12274
          {
12275
            oprot.writeString(_iter19);
12276
          }
12277
          oprot.writeListEnd();
12278
        }
12279
        oprot.writeFieldEnd();
12280
      }
12281
      oprot.writeFieldStop();
12282
      oprot.writeStructEnd();
12283
    }
12284
 
12285
    @Override
12286
    public String toString() {
12287
      StringBuilder sb = new StringBuilder("getItemNumbers_result(");
12288
      boolean first = true;
12289
 
12290
      sb.append("success:");
12291
      if (this.success == null) {
12292
        sb.append("null");
12293
      } else {
12294
        sb.append(this.success);
12295
      }
12296
      first = false;
12297
      sb.append(")");
12298
      return sb.toString();
12299
    }
12300
 
12301
    public void validate() throws org.apache.thrift.TException {
12302
      // check for required fields
12303
    }
12304
 
12305
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12306
      try {
12307
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12308
      } catch (org.apache.thrift.TException te) {
12309
        throw new java.io.IOException(te);
12310
      }
12311
    }
12312
 
12313
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12314
      try {
12315
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12316
      } catch (org.apache.thrift.TException te) {
12317
        throw new java.io.IOException(te);
12318
      }
12319
    }
12320
 
12321
  }
12322
 
5110 mandeep.dh 12323
  public static class getItemIds_args implements org.apache.thrift.TBase<getItemIds_args, getItemIds_args._Fields>, java.io.Serializable, Cloneable   {
12324
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_args");
12325
 
12326
    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);
12327
 
12328
    private String itemNumber; // required
12329
 
12330
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12331
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12332
      ITEM_NUMBER((short)1, "itemNumber");
12333
 
12334
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12335
 
12336
      static {
12337
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12338
          byName.put(field.getFieldName(), field);
12339
        }
12340
      }
12341
 
12342
      /**
12343
       * Find the _Fields constant that matches fieldId, or null if its not found.
12344
       */
12345
      public static _Fields findByThriftId(int fieldId) {
12346
        switch(fieldId) {
12347
          case 1: // ITEM_NUMBER
12348
            return ITEM_NUMBER;
12349
          default:
12350
            return null;
12351
        }
12352
      }
12353
 
12354
      /**
12355
       * Find the _Fields constant that matches fieldId, throwing an exception
12356
       * if it is not found.
12357
       */
12358
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12359
        _Fields fields = findByThriftId(fieldId);
12360
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12361
        return fields;
12362
      }
12363
 
12364
      /**
12365
       * Find the _Fields constant that matches name, or null if its not found.
12366
       */
12367
      public static _Fields findByName(String name) {
12368
        return byName.get(name);
12369
      }
12370
 
12371
      private final short _thriftId;
12372
      private final String _fieldName;
12373
 
12374
      _Fields(short thriftId, String fieldName) {
12375
        _thriftId = thriftId;
12376
        _fieldName = fieldName;
12377
      }
12378
 
12379
      public short getThriftFieldId() {
12380
        return _thriftId;
12381
      }
12382
 
12383
      public String getFieldName() {
12384
        return _fieldName;
12385
      }
12386
    }
12387
 
12388
    // isset id assignments
12389
 
12390
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12391
    static {
12392
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12393
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12394
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
12395
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12396
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_args.class, metaDataMap);
12397
    }
12398
 
12399
    public getItemIds_args() {
12400
    }
12401
 
12402
    public getItemIds_args(
12403
      String itemNumber)
12404
    {
12405
      this();
12406
      this.itemNumber = itemNumber;
12407
    }
12408
 
12409
    /**
12410
     * Performs a deep copy on <i>other</i>.
12411
     */
12412
    public getItemIds_args(getItemIds_args other) {
12413
      if (other.isSetItemNumber()) {
12414
        this.itemNumber = other.itemNumber;
12415
      }
12416
    }
12417
 
12418
    public getItemIds_args deepCopy() {
12419
      return new getItemIds_args(this);
12420
    }
12421
 
12422
    @Override
12423
    public void clear() {
12424
      this.itemNumber = null;
12425
    }
12426
 
12427
    public String getItemNumber() {
12428
      return this.itemNumber;
12429
    }
12430
 
12431
    public void setItemNumber(String itemNumber) {
12432
      this.itemNumber = itemNumber;
12433
    }
12434
 
12435
    public void unsetItemNumber() {
12436
      this.itemNumber = null;
12437
    }
12438
 
12439
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
12440
    public boolean isSetItemNumber() {
12441
      return this.itemNumber != null;
12442
    }
12443
 
12444
    public void setItemNumberIsSet(boolean value) {
12445
      if (!value) {
12446
        this.itemNumber = null;
12447
      }
12448
    }
12449
 
12450
    public void setFieldValue(_Fields field, Object value) {
12451
      switch (field) {
12452
      case ITEM_NUMBER:
12453
        if (value == null) {
12454
          unsetItemNumber();
12455
        } else {
12456
          setItemNumber((String)value);
12457
        }
12458
        break;
12459
 
12460
      }
12461
    }
12462
 
12463
    public Object getFieldValue(_Fields field) {
12464
      switch (field) {
12465
      case ITEM_NUMBER:
12466
        return getItemNumber();
12467
 
12468
      }
12469
      throw new IllegalStateException();
12470
    }
12471
 
12472
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12473
    public boolean isSet(_Fields field) {
12474
      if (field == null) {
12475
        throw new IllegalArgumentException();
12476
      }
12477
 
12478
      switch (field) {
12479
      case ITEM_NUMBER:
12480
        return isSetItemNumber();
12481
      }
12482
      throw new IllegalStateException();
12483
    }
12484
 
12485
    @Override
12486
    public boolean equals(Object that) {
12487
      if (that == null)
12488
        return false;
12489
      if (that instanceof getItemIds_args)
12490
        return this.equals((getItemIds_args)that);
12491
      return false;
12492
    }
12493
 
12494
    public boolean equals(getItemIds_args that) {
12495
      if (that == null)
12496
        return false;
12497
 
12498
      boolean this_present_itemNumber = true && this.isSetItemNumber();
12499
      boolean that_present_itemNumber = true && that.isSetItemNumber();
12500
      if (this_present_itemNumber || that_present_itemNumber) {
12501
        if (!(this_present_itemNumber && that_present_itemNumber))
12502
          return false;
12503
        if (!this.itemNumber.equals(that.itemNumber))
12504
          return false;
12505
      }
12506
 
12507
      return true;
12508
    }
12509
 
12510
    @Override
12511
    public int hashCode() {
12512
      return 0;
12513
    }
12514
 
12515
    public int compareTo(getItemIds_args other) {
12516
      if (!getClass().equals(other.getClass())) {
12517
        return getClass().getName().compareTo(other.getClass().getName());
12518
      }
12519
 
12520
      int lastComparison = 0;
12521
      getItemIds_args typedOther = (getItemIds_args)other;
12522
 
12523
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
12524
      if (lastComparison != 0) {
12525
        return lastComparison;
12526
      }
12527
      if (isSetItemNumber()) {
12528
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
12529
        if (lastComparison != 0) {
12530
          return lastComparison;
12531
        }
12532
      }
12533
      return 0;
12534
    }
12535
 
12536
    public _Fields fieldForId(int fieldId) {
12537
      return _Fields.findByThriftId(fieldId);
12538
    }
12539
 
12540
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12541
      org.apache.thrift.protocol.TField field;
12542
      iprot.readStructBegin();
12543
      while (true)
12544
      {
12545
        field = iprot.readFieldBegin();
12546
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12547
          break;
12548
        }
12549
        switch (field.id) {
12550
          case 1: // ITEM_NUMBER
12551
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
12552
              this.itemNumber = iprot.readString();
12553
            } else { 
12554
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12555
            }
12556
            break;
12557
          default:
12558
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12559
        }
12560
        iprot.readFieldEnd();
12561
      }
12562
      iprot.readStructEnd();
12563
      validate();
12564
    }
12565
 
12566
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12567
      validate();
12568
 
12569
      oprot.writeStructBegin(STRUCT_DESC);
12570
      if (this.itemNumber != null) {
12571
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
12572
        oprot.writeString(this.itemNumber);
12573
        oprot.writeFieldEnd();
12574
      }
12575
      oprot.writeFieldStop();
12576
      oprot.writeStructEnd();
12577
    }
12578
 
12579
    @Override
12580
    public String toString() {
12581
      StringBuilder sb = new StringBuilder("getItemIds_args(");
12582
      boolean first = true;
12583
 
12584
      sb.append("itemNumber:");
12585
      if (this.itemNumber == null) {
12586
        sb.append("null");
12587
      } else {
12588
        sb.append(this.itemNumber);
12589
      }
12590
      first = false;
12591
      sb.append(")");
12592
      return sb.toString();
12593
    }
12594
 
12595
    public void validate() throws org.apache.thrift.TException {
12596
      // check for required fields
12597
    }
12598
 
12599
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12600
      try {
12601
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12602
      } catch (org.apache.thrift.TException te) {
12603
        throw new java.io.IOException(te);
12604
      }
12605
    }
12606
 
12607
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12608
      try {
12609
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12610
      } catch (org.apache.thrift.TException te) {
12611
        throw new java.io.IOException(te);
12612
      }
12613
    }
12614
 
12615
  }
12616
 
12617
  public static class getItemIds_result implements org.apache.thrift.TBase<getItemIds_result, getItemIds_result._Fields>, java.io.Serializable, Cloneable   {
12618
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_result");
12619
 
12620
    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);
12621
 
12622
    private List<Long> success; // required
12623
 
12624
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12625
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12626
      SUCCESS((short)0, "success");
12627
 
12628
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12629
 
12630
      static {
12631
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12632
          byName.put(field.getFieldName(), field);
12633
        }
12634
      }
12635
 
12636
      /**
12637
       * Find the _Fields constant that matches fieldId, or null if its not found.
12638
       */
12639
      public static _Fields findByThriftId(int fieldId) {
12640
        switch(fieldId) {
12641
          case 0: // SUCCESS
12642
            return SUCCESS;
12643
          default:
12644
            return null;
12645
        }
12646
      }
12647
 
12648
      /**
12649
       * Find the _Fields constant that matches fieldId, throwing an exception
12650
       * if it is not found.
12651
       */
12652
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12653
        _Fields fields = findByThriftId(fieldId);
12654
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12655
        return fields;
12656
      }
12657
 
12658
      /**
12659
       * Find the _Fields constant that matches name, or null if its not found.
12660
       */
12661
      public static _Fields findByName(String name) {
12662
        return byName.get(name);
12663
      }
12664
 
12665
      private final short _thriftId;
12666
      private final String _fieldName;
12667
 
12668
      _Fields(short thriftId, String fieldName) {
12669
        _thriftId = thriftId;
12670
        _fieldName = fieldName;
12671
      }
12672
 
12673
      public short getThriftFieldId() {
12674
        return _thriftId;
12675
      }
12676
 
12677
      public String getFieldName() {
12678
        return _fieldName;
12679
      }
12680
    }
12681
 
12682
    // isset id assignments
12683
 
12684
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12685
    static {
12686
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12687
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12688
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12689
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
12690
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12691
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_result.class, metaDataMap);
12692
    }
12693
 
12694
    public getItemIds_result() {
12695
    }
12696
 
12697
    public getItemIds_result(
12698
      List<Long> success)
12699
    {
12700
      this();
12701
      this.success = success;
12702
    }
12703
 
12704
    /**
12705
     * Performs a deep copy on <i>other</i>.
12706
     */
12707
    public getItemIds_result(getItemIds_result other) {
12708
      if (other.isSetSuccess()) {
12709
        List<Long> __this__success = new ArrayList<Long>();
12710
        for (Long other_element : other.success) {
12711
          __this__success.add(other_element);
12712
        }
12713
        this.success = __this__success;
12714
      }
12715
    }
12716
 
12717
    public getItemIds_result deepCopy() {
12718
      return new getItemIds_result(this);
12719
    }
12720
 
12721
    @Override
12722
    public void clear() {
12723
      this.success = null;
12724
    }
12725
 
12726
    public int getSuccessSize() {
12727
      return (this.success == null) ? 0 : this.success.size();
12728
    }
12729
 
12730
    public java.util.Iterator<Long> getSuccessIterator() {
12731
      return (this.success == null) ? null : this.success.iterator();
12732
    }
12733
 
12734
    public void addToSuccess(long elem) {
12735
      if (this.success == null) {
12736
        this.success = new ArrayList<Long>();
12737
      }
12738
      this.success.add(elem);
12739
    }
12740
 
12741
    public List<Long> getSuccess() {
12742
      return this.success;
12743
    }
12744
 
12745
    public void setSuccess(List<Long> success) {
12746
      this.success = success;
12747
    }
12748
 
12749
    public void unsetSuccess() {
12750
      this.success = null;
12751
    }
12752
 
12753
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12754
    public boolean isSetSuccess() {
12755
      return this.success != null;
12756
    }
12757
 
12758
    public void setSuccessIsSet(boolean value) {
12759
      if (!value) {
12760
        this.success = null;
12761
      }
12762
    }
12763
 
12764
    public void setFieldValue(_Fields field, Object value) {
12765
      switch (field) {
12766
      case SUCCESS:
12767
        if (value == null) {
12768
          unsetSuccess();
12769
        } else {
12770
          setSuccess((List<Long>)value);
12771
        }
12772
        break;
12773
 
12774
      }
12775
    }
12776
 
12777
    public Object getFieldValue(_Fields field) {
12778
      switch (field) {
12779
      case SUCCESS:
12780
        return getSuccess();
12781
 
12782
      }
12783
      throw new IllegalStateException();
12784
    }
12785
 
12786
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12787
    public boolean isSet(_Fields field) {
12788
      if (field == null) {
12789
        throw new IllegalArgumentException();
12790
      }
12791
 
12792
      switch (field) {
12793
      case SUCCESS:
12794
        return isSetSuccess();
12795
      }
12796
      throw new IllegalStateException();
12797
    }
12798
 
12799
    @Override
12800
    public boolean equals(Object that) {
12801
      if (that == null)
12802
        return false;
12803
      if (that instanceof getItemIds_result)
12804
        return this.equals((getItemIds_result)that);
12805
      return false;
12806
    }
12807
 
12808
    public boolean equals(getItemIds_result that) {
12809
      if (that == null)
12810
        return false;
12811
 
12812
      boolean this_present_success = true && this.isSetSuccess();
12813
      boolean that_present_success = true && that.isSetSuccess();
12814
      if (this_present_success || that_present_success) {
12815
        if (!(this_present_success && that_present_success))
12816
          return false;
12817
        if (!this.success.equals(that.success))
12818
          return false;
12819
      }
12820
 
12821
      return true;
12822
    }
12823
 
12824
    @Override
12825
    public int hashCode() {
12826
      return 0;
12827
    }
12828
 
12829
    public int compareTo(getItemIds_result other) {
12830
      if (!getClass().equals(other.getClass())) {
12831
        return getClass().getName().compareTo(other.getClass().getName());
12832
      }
12833
 
12834
      int lastComparison = 0;
12835
      getItemIds_result typedOther = (getItemIds_result)other;
12836
 
12837
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12838
      if (lastComparison != 0) {
12839
        return lastComparison;
12840
      }
12841
      if (isSetSuccess()) {
12842
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12843
        if (lastComparison != 0) {
12844
          return lastComparison;
12845
        }
12846
      }
12847
      return 0;
12848
    }
12849
 
12850
    public _Fields fieldForId(int fieldId) {
12851
      return _Fields.findByThriftId(fieldId);
12852
    }
12853
 
12854
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12855
      org.apache.thrift.protocol.TField field;
12856
      iprot.readStructBegin();
12857
      while (true)
12858
      {
12859
        field = iprot.readFieldBegin();
12860
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12861
          break;
12862
        }
12863
        switch (field.id) {
12864
          case 0: // SUCCESS
12865
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12866
              {
12867
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
12868
                this.success = new ArrayList<Long>(_list20.size);
12869
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
12870
                {
12871
                  long _elem22; // required
12872
                  _elem22 = iprot.readI64();
12873
                  this.success.add(_elem22);
12874
                }
12875
                iprot.readListEnd();
12876
              }
12877
            } else { 
12878
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12879
            }
12880
            break;
12881
          default:
12882
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12883
        }
12884
        iprot.readFieldEnd();
12885
      }
12886
      iprot.readStructEnd();
12887
      validate();
12888
    }
12889
 
12890
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12891
      oprot.writeStructBegin(STRUCT_DESC);
12892
 
12893
      if (this.isSetSuccess()) {
12894
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12895
        {
12896
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
12897
          for (long _iter23 : this.success)
12898
          {
12899
            oprot.writeI64(_iter23);
12900
          }
12901
          oprot.writeListEnd();
12902
        }
12903
        oprot.writeFieldEnd();
12904
      }
12905
      oprot.writeFieldStop();
12906
      oprot.writeStructEnd();
12907
    }
12908
 
12909
    @Override
12910
    public String toString() {
12911
      StringBuilder sb = new StringBuilder("getItemIds_result(");
12912
      boolean first = true;
12913
 
12914
      sb.append("success:");
12915
      if (this.success == null) {
12916
        sb.append("null");
12917
      } else {
12918
        sb.append(this.success);
12919
      }
12920
      first = false;
12921
      sb.append(")");
12922
      return sb.toString();
12923
    }
12924
 
12925
    public void validate() throws org.apache.thrift.TException {
12926
      // check for required fields
12927
    }
12928
 
12929
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12930
      try {
12931
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12932
      } catch (org.apache.thrift.TException te) {
12933
        throw new java.io.IOException(te);
12934
      }
12935
    }
12936
 
12937
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12938
      try {
12939
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12940
      } catch (org.apache.thrift.TException te) {
12941
        throw new java.io.IOException(te);
12942
      }
12943
    }
12944
 
12945
  }
12946
 
2820 chandransh 12947
}