Subversion Repositories SmartDukaan

Rev

Rev 5185 | Rev 5372 | 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
    /**
5361 mandeep.dh 63
     * Retrieves non-serialized inventory item from a given supplier
2820 chandransh 64
     * 
4496 mandeep.dh 65
     * @param itemId
5361 mandeep.dh 66
     * @param warehouseId
2820 chandransh 67
     */
5361 mandeep.dh 68
    public InventoryItem getNonSeralizedInventoryItem(long itemId, long warehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
2820 chandransh 69
 
70
    /**
4496 mandeep.dh 71
     * Scan serialized items.
72
     * 
5110 mandeep.dh 73
     * @param inventoryItem
2820 chandransh 74
     * @param type
5361 mandeep.dh 75
     * @param billingWarehouseId
2820 chandransh 76
     */
5361 mandeep.dh 77
    public void scanSerializedItem(InventoryItem inventoryItem, ScanType type, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
2820 chandransh 78
 
79
    /**
4496 mandeep.dh 80
     * Scan non-serialized items.
2820 chandransh 81
     * 
5361 mandeep.dh 82
     * @param inventoryItem
2820 chandransh 83
     * @param type
4496 mandeep.dh 84
     * @param quantity
5361 mandeep.dh 85
     * @param billingWarehouseId
2820 chandransh 86
     */
5361 mandeep.dh 87
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
2820 chandransh 88
 
4496 mandeep.dh 89
    /**
90
     * Scan serialized items linked with an order. Returns its price.
91
     * 
4555 mandeep.dh 92
     * @param serialNumber
4496 mandeep.dh 93
     * @param type
94
     * @param orderId
5110 mandeep.dh 95
     * @param fulfilmentWarehouseId
96
     * @param quantity
97
     * @param billingWarehouseId
4496 mandeep.dh 98
     */
5110 mandeep.dh 99
    public InventoryItem scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
4496 mandeep.dh 100
 
101
    /**
102
     * Scan non-serialized items linked with an order.
103
     * 
5361 mandeep.dh 104
     * @param inventoryItem
4496 mandeep.dh 105
     * @param type
106
     * @param quantity
107
     * @param orderId
5110 mandeep.dh 108
     * @param fulfilmentWarehouseId
5361 mandeep.dh 109
     * @param billingWarehouseId
4496 mandeep.dh 110
     */
5361 mandeep.dh 111
    public InventoryItem scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException;
4496 mandeep.dh 112
 
113
    /**
114
     * Created item number to item id mapping
115
     * 
116
     * @param itemNumber
117
     * @param itemId
118
     */
119
    public void createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException;
120
 
4622 amit.gupta 121
    /**
122
     * Get itemNumber mappings for itemId
123
     * 
124
     * @param itemId
125
     */
126
    public List<String> getItemNumbers(long itemId) throws org.apache.thrift.TException;
127
 
5110 mandeep.dh 128
    /**
129
     * Gets item ids for a given item number
130
     * 
131
     * @param itemNumber
132
     */
133
    public List<Long> getItemIds(String itemNumber) throws org.apache.thrift.TException;
134
 
5185 mandeep.dh 135
    /**
136
     * Retrieves all inventory items given a last scan type
137
     * 
138
     * @param lastScanType
139
     */
140
    public List<InventoryItem> getInventoryItemsFromLastScanType(ScanType lastScanType) throws WarehouseServiceException, org.apache.thrift.TException;
141
 
142
    /**
143
     * Retrieves inventory item given a inventoryItem id
144
     * 
145
     * @param inventoryItemId
146
     */
147
    public InventoryItem getInventoryItemFromId(long inventoryItemId) throws WarehouseServiceException, org.apache.thrift.TException;
148
 
2820 chandransh 149
  }
150
 
3430 rajveer 151
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
152
 
4846 mandeep.dh 153
    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 154
 
4496 mandeep.dh 155
    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 156
 
4496 mandeep.dh 157
    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 158
 
4496 mandeep.dh 159
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 160
 
5361 mandeep.dh 161
    public void getNonSeralizedInventoryItem(long itemId, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getNonSeralizedInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 162
 
5361 mandeep.dh 163
    public void scanSerializedItem(InventoryItem inventoryItem, ScanType type, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanSerializedItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 164
 
5361 mandeep.dh 165
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scan_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 166
 
5110 mandeep.dh 167
    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 168
 
5361 mandeep.dh 169
    public void scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.scanForOrder_call> resultHandler) throws org.apache.thrift.TException;
4496 mandeep.dh 170
 
171
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException;
172
 
4622 amit.gupta 173
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemNumbers_call> resultHandler) throws org.apache.thrift.TException;
174
 
5110 mandeep.dh 175
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemIds_call> resultHandler) throws org.apache.thrift.TException;
176
 
5185 mandeep.dh 177
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException;
178
 
179
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException;
180
 
3430 rajveer 181
  }
182
 
3374 rajveer 183
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
3430 rajveer 184
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
185
      public Factory() {}
186
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
187
        return new Client(prot);
188
      }
189
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
190
        return new Client(iprot, oprot);
191
      }
192
    }
193
 
194
    public Client(org.apache.thrift.protocol.TProtocol prot)
2820 chandransh 195
    {
3430 rajveer 196
      super(prot, prot);
2820 chandransh 197
    }
198
 
3430 rajveer 199
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
3374 rajveer 200
      super(iprot, oprot);
2820 chandransh 201
    }
202
 
4846 mandeep.dh 203
    public InventoryItem createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 204
    {
4846 mandeep.dh 205
      send_createSerializedInventoryItem(itemId, itemNumber, serialNumber, purchaseId);
4496 mandeep.dh 206
      return recv_createSerializedInventoryItem();
2820 chandransh 207
    }
208
 
4846 mandeep.dh 209
    public void send_createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId) throws org.apache.thrift.TException
2820 chandransh 210
    {
4496 mandeep.dh 211
      createSerializedInventoryItem_args args = new createSerializedInventoryItem_args();
212
      args.setItemId(itemId);
4846 mandeep.dh 213
      args.setItemNumber(itemNumber);
4496 mandeep.dh 214
      args.setSerialNumber(serialNumber);
215
      args.setPurchaseId(purchaseId);
216
      sendBase("createSerializedInventoryItem", args);
2820 chandransh 217
    }
218
 
4555 mandeep.dh 219
    public InventoryItem recv_createSerializedInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 220
    {
4496 mandeep.dh 221
      createSerializedInventoryItem_result result = new createSerializedInventoryItem_result();
222
      receiveBase(result, "createSerializedInventoryItem");
2820 chandransh 223
      if (result.isSetSuccess()) {
224
        return result.success;
225
      }
226
      if (result.wex != null) {
227
        throw result.wex;
228
      }
4496 mandeep.dh 229
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createSerializedInventoryItem failed: unknown result");
2820 chandransh 230
    }
231
 
4555 mandeep.dh 232
    public InventoryItem createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 233
    {
4496 mandeep.dh 234
      send_createSerializedInventoryItemFromItemNumber(itemNumber, serialNumber, purchaseId);
235
      return recv_createSerializedInventoryItemFromItemNumber();
2820 chandransh 236
    }
237
 
4496 mandeep.dh 238
    public void send_createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId) throws org.apache.thrift.TException
2820 chandransh 239
    {
4496 mandeep.dh 240
      createSerializedInventoryItemFromItemNumber_args args = new createSerializedInventoryItemFromItemNumber_args();
241
      args.setItemNumber(itemNumber);
242
      args.setSerialNumber(serialNumber);
243
      args.setPurchaseId(purchaseId);
244
      sendBase("createSerializedInventoryItemFromItemNumber", args);
2820 chandransh 245
    }
246
 
4555 mandeep.dh 247
    public InventoryItem recv_createSerializedInventoryItemFromItemNumber() throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 248
    {
4496 mandeep.dh 249
      createSerializedInventoryItemFromItemNumber_result result = new createSerializedInventoryItemFromItemNumber_result();
250
      receiveBase(result, "createSerializedInventoryItemFromItemNumber");
2820 chandransh 251
      if (result.isSetSuccess()) {
252
        return result.success;
253
      }
254
      if (result.wex != null) {
255
        throw result.wex;
256
      }
4496 mandeep.dh 257
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createSerializedInventoryItemFromItemNumber failed: unknown result");
2820 chandransh 258
    }
259
 
4555 mandeep.dh 260
    public InventoryItem createInventoryItem(long itemId, long quantity, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 261
    {
4496 mandeep.dh 262
      send_createInventoryItem(itemId, quantity, purchaseId);
263
      return recv_createInventoryItem();
3383 chandransh 264
    }
265
 
4496 mandeep.dh 266
    public void send_createInventoryItem(long itemId, long quantity, long purchaseId) throws org.apache.thrift.TException
3383 chandransh 267
    {
4496 mandeep.dh 268
      createInventoryItem_args args = new createInventoryItem_args();
269
      args.setItemId(itemId);
270
      args.setQuantity(quantity);
271
      args.setPurchaseId(purchaseId);
272
      sendBase("createInventoryItem", args);
3383 chandransh 273
    }
274
 
4555 mandeep.dh 275
    public InventoryItem recv_createInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 276
    {
4496 mandeep.dh 277
      createInventoryItem_result result = new createInventoryItem_result();
278
      receiveBase(result, "createInventoryItem");
3383 chandransh 279
      if (result.isSetSuccess()) {
280
        return result.success;
281
      }
282
      if (result.wex != null) {
283
        throw result.wex;
284
      }
4496 mandeep.dh 285
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createInventoryItem failed: unknown result");
3383 chandransh 286
    }
287
 
4541 mandeep.dh 288
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 289
    {
4496 mandeep.dh 290
      send_getInventoryItem(serialNumber);
291
      return recv_getInventoryItem();
2832 chandransh 292
    }
293
 
4496 mandeep.dh 294
    public void send_getInventoryItem(String serialNumber) throws org.apache.thrift.TException
2832 chandransh 295
    {
4496 mandeep.dh 296
      getInventoryItem_args args = new getInventoryItem_args();
297
      args.setSerialNumber(serialNumber);
298
      sendBase("getInventoryItem", args);
2832 chandransh 299
    }
300
 
4541 mandeep.dh 301
    public InventoryItem recv_getInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 302
    {
4496 mandeep.dh 303
      getInventoryItem_result result = new getInventoryItem_result();
304
      receiveBase(result, "getInventoryItem");
2832 chandransh 305
      if (result.isSetSuccess()) {
306
        return result.success;
307
      }
4541 mandeep.dh 308
      if (result.wex != null) {
309
        throw result.wex;
310
      }
4496 mandeep.dh 311
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItem failed: unknown result");
312
    }
313
 
5361 mandeep.dh 314
    public InventoryItem getNonSeralizedInventoryItem(long itemId, long warehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 315
    {
5361 mandeep.dh 316
      send_getNonSeralizedInventoryItem(itemId, warehouseId);
317
      return recv_getNonSeralizedInventoryItem();
4496 mandeep.dh 318
    }
319
 
5361 mandeep.dh 320
    public void send_getNonSeralizedInventoryItem(long itemId, long warehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 321
    {
5361 mandeep.dh 322
      getNonSeralizedInventoryItem_args args = new getNonSeralizedInventoryItem_args();
4496 mandeep.dh 323
      args.setItemId(itemId);
5361 mandeep.dh 324
      args.setWarehouseId(warehouseId);
325
      sendBase("getNonSeralizedInventoryItem", args);
4496 mandeep.dh 326
    }
327
 
5361 mandeep.dh 328
    public InventoryItem recv_getNonSeralizedInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 329
    {
5361 mandeep.dh 330
      getNonSeralizedInventoryItem_result result = new getNonSeralizedInventoryItem_result();
331
      receiveBase(result, "getNonSeralizedInventoryItem");
4496 mandeep.dh 332
      if (result.isSetSuccess()) {
333
        return result.success;
2832 chandransh 334
      }
5361 mandeep.dh 335
      if (result.wex != null) {
336
        throw result.wex;
2820 chandransh 337
      }
5361 mandeep.dh 338
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNonSeralizedInventoryItem failed: unknown result");
4496 mandeep.dh 339
    }
340
 
5361 mandeep.dh 341
    public void scanSerializedItem(InventoryItem inventoryItem, ScanType type, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 342
    {
5361 mandeep.dh 343
      send_scanSerializedItem(inventoryItem, type, billingWarehouseId);
4496 mandeep.dh 344
      recv_scanSerializedItem();
345
    }
346
 
5361 mandeep.dh 347
    public void send_scanSerializedItem(InventoryItem inventoryItem, ScanType type, long billingWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 348
    {
349
      scanSerializedItem_args args = new scanSerializedItem_args();
5110 mandeep.dh 350
      args.setInventoryItem(inventoryItem);
4496 mandeep.dh 351
      args.setType(type);
5361 mandeep.dh 352
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 353
      sendBase("scanSerializedItem", args);
354
    }
355
 
356
    public void recv_scanSerializedItem() throws WarehouseServiceException, org.apache.thrift.TException
357
    {
358
      scanSerializedItem_result result = new scanSerializedItem_result();
359
      receiveBase(result, "scanSerializedItem");
2820 chandransh 360
      if (result.wex != null) {
361
        throw result.wex;
362
      }
4496 mandeep.dh 363
      return;
2820 chandransh 364
    }
365
 
5361 mandeep.dh 366
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 367
    {
5361 mandeep.dh 368
      send_scan(inventoryItem, type, quantity, billingWarehouseId);
4496 mandeep.dh 369
      recv_scan();
3383 chandransh 370
    }
371
 
5361 mandeep.dh 372
    public void send_scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws org.apache.thrift.TException
3383 chandransh 373
    {
4496 mandeep.dh 374
      scan_args args = new scan_args();
5361 mandeep.dh 375
      args.setInventoryItem(inventoryItem);
4496 mandeep.dh 376
      args.setType(type);
377
      args.setQuantity(quantity);
5361 mandeep.dh 378
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 379
      sendBase("scan", args);
3383 chandransh 380
    }
381
 
4496 mandeep.dh 382
    public void recv_scan() throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 383
    {
4496 mandeep.dh 384
      scan_result result = new scan_result();
385
      receiveBase(result, "scan");
386
      if (result.wex != null) {
387
        throw result.wex;
388
      }
389
      return;
390
    }
391
 
5110 mandeep.dh 392
    public InventoryItem scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 393
    {
5110 mandeep.dh 394
      send_scanSerializedItemForOrder(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId);
4496 mandeep.dh 395
      return recv_scanSerializedItemForOrder();
396
    }
397
 
5110 mandeep.dh 398
    public void send_scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 399
    {
400
      scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 401
      args.setSerialNumber(serialNumber);
4496 mandeep.dh 402
      args.setType(type);
403
      args.setOrderId(orderId);
5110 mandeep.dh 404
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
405
      args.setQuantity(quantity);
406
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 407
      sendBase("scanSerializedItemForOrder", args);
408
    }
409
 
4555 mandeep.dh 410
    public InventoryItem recv_scanSerializedItemForOrder() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 411
    {
412
      scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
413
      receiveBase(result, "scanSerializedItemForOrder");
3383 chandransh 414
      if (result.isSetSuccess()) {
415
        return result.success;
416
      }
417
      if (result.wex != null) {
418
        throw result.wex;
419
      }
4496 mandeep.dh 420
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanSerializedItemForOrder failed: unknown result");
3383 chandransh 421
    }
422
 
5361 mandeep.dh 423
    public InventoryItem scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 424
    {
5361 mandeep.dh 425
      send_scanForOrder(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId);
426
      return recv_scanForOrder();
2820 chandransh 427
    }
428
 
5361 mandeep.dh 429
    public void send_scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws org.apache.thrift.TException
2820 chandransh 430
    {
4496 mandeep.dh 431
      scanForOrder_args args = new scanForOrder_args();
5361 mandeep.dh 432
      args.setInventoryItem(inventoryItem);
3430 rajveer 433
      args.setType(type);
4496 mandeep.dh 434
      args.setQuantity(quantity);
435
      args.setOrderId(orderId);
5110 mandeep.dh 436
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 437
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 438
      sendBase("scanForOrder", args);
2820 chandransh 439
    }
440
 
5361 mandeep.dh 441
    public InventoryItem recv_scanForOrder() throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 442
    {
4496 mandeep.dh 443
      scanForOrder_result result = new scanForOrder_result();
444
      receiveBase(result, "scanForOrder");
5361 mandeep.dh 445
      if (result.isSetSuccess()) {
446
        return result.success;
447
      }
2820 chandransh 448
      if (result.wex != null) {
449
        throw result.wex;
450
      }
5361 mandeep.dh 451
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanForOrder failed: unknown result");
2820 chandransh 452
    }
453
 
4496 mandeep.dh 454
    public void createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 455
    {
4496 mandeep.dh 456
      send_createItemNumberMapping(itemNumber, itemId);
457
      recv_createItemNumberMapping();
2820 chandransh 458
    }
459
 
4496 mandeep.dh 460
    public void send_createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 461
    {
4496 mandeep.dh 462
      createItemNumberMapping_args args = new createItemNumberMapping_args();
3430 rajveer 463
      args.setItemNumber(itemNumber);
4496 mandeep.dh 464
      args.setItemId(itemId);
465
      sendBase("createItemNumberMapping", args);
2820 chandransh 466
    }
467
 
4496 mandeep.dh 468
    public void recv_createItemNumberMapping() throws org.apache.thrift.TException
2820 chandransh 469
    {
4496 mandeep.dh 470
      createItemNumberMapping_result result = new createItemNumberMapping_result();
471
      receiveBase(result, "createItemNumberMapping");
2820 chandransh 472
      return;
473
    }
474
 
4622 amit.gupta 475
    public List<String> getItemNumbers(long itemId) throws org.apache.thrift.TException
476
    {
477
      send_getItemNumbers(itemId);
478
      return recv_getItemNumbers();
479
    }
480
 
481
    public void send_getItemNumbers(long itemId) throws org.apache.thrift.TException
482
    {
483
      getItemNumbers_args args = new getItemNumbers_args();
484
      args.setItemId(itemId);
485
      sendBase("getItemNumbers", args);
486
    }
487
 
488
    public List<String> recv_getItemNumbers() throws org.apache.thrift.TException
489
    {
490
      getItemNumbers_result result = new getItemNumbers_result();
491
      receiveBase(result, "getItemNumbers");
492
      if (result.isSetSuccess()) {
493
        return result.success;
494
      }
495
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemNumbers failed: unknown result");
496
    }
497
 
5110 mandeep.dh 498
    public List<Long> getItemIds(String itemNumber) throws org.apache.thrift.TException
499
    {
500
      send_getItemIds(itemNumber);
501
      return recv_getItemIds();
502
    }
503
 
504
    public void send_getItemIds(String itemNumber) throws org.apache.thrift.TException
505
    {
506
      getItemIds_args args = new getItemIds_args();
507
      args.setItemNumber(itemNumber);
508
      sendBase("getItemIds", args);
509
    }
510
 
511
    public List<Long> recv_getItemIds() throws org.apache.thrift.TException
512
    {
513
      getItemIds_result result = new getItemIds_result();
514
      receiveBase(result, "getItemIds");
515
      if (result.isSetSuccess()) {
516
        return result.success;
517
      }
518
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemIds failed: unknown result");
519
    }
520
 
5185 mandeep.dh 521
    public List<InventoryItem> getInventoryItemsFromLastScanType(ScanType lastScanType) throws WarehouseServiceException, org.apache.thrift.TException
522
    {
523
      send_getInventoryItemsFromLastScanType(lastScanType);
524
      return recv_getInventoryItemsFromLastScanType();
525
    }
526
 
527
    public void send_getInventoryItemsFromLastScanType(ScanType lastScanType) throws org.apache.thrift.TException
528
    {
529
      getInventoryItemsFromLastScanType_args args = new getInventoryItemsFromLastScanType_args();
530
      args.setLastScanType(lastScanType);
531
      sendBase("getInventoryItemsFromLastScanType", args);
532
    }
533
 
534
    public List<InventoryItem> recv_getInventoryItemsFromLastScanType() throws WarehouseServiceException, org.apache.thrift.TException
535
    {
536
      getInventoryItemsFromLastScanType_result result = new getInventoryItemsFromLastScanType_result();
537
      receiveBase(result, "getInventoryItemsFromLastScanType");
538
      if (result.isSetSuccess()) {
539
        return result.success;
540
      }
541
      if (result.wex != null) {
542
        throw result.wex;
543
      }
544
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemsFromLastScanType failed: unknown result");
545
    }
546
 
547
    public InventoryItem getInventoryItemFromId(long inventoryItemId) throws WarehouseServiceException, org.apache.thrift.TException
548
    {
549
      send_getInventoryItemFromId(inventoryItemId);
550
      return recv_getInventoryItemFromId();
551
    }
552
 
553
    public void send_getInventoryItemFromId(long inventoryItemId) throws org.apache.thrift.TException
554
    {
555
      getInventoryItemFromId_args args = new getInventoryItemFromId_args();
556
      args.setInventoryItemId(inventoryItemId);
557
      sendBase("getInventoryItemFromId", args);
558
    }
559
 
560
    public InventoryItem recv_getInventoryItemFromId() throws WarehouseServiceException, org.apache.thrift.TException
561
    {
562
      getInventoryItemFromId_result result = new getInventoryItemFromId_result();
563
      receiveBase(result, "getInventoryItemFromId");
564
      if (result.isSetSuccess()) {
565
        return result.success;
566
      }
567
      if (result.wex != null) {
568
        throw result.wex;
569
      }
570
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromId failed: unknown result");
571
    }
572
 
2820 chandransh 573
  }
3430 rajveer 574
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
575
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
576
      private org.apache.thrift.async.TAsyncClientManager clientManager;
577
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
578
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
579
        this.clientManager = clientManager;
580
        this.protocolFactory = protocolFactory;
581
      }
582
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
583
        return new AsyncClient(protocolFactory, clientManager, transport);
584
      }
2820 chandransh 585
    }
586
 
3430 rajveer 587
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
588
      super(protocolFactory, clientManager, transport);
589
    }
2820 chandransh 590
 
4846 mandeep.dh 591
    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 592
      checkReady();
4846 mandeep.dh 593
      createSerializedInventoryItem_call method_call = new createSerializedInventoryItem_call(itemId, itemNumber, serialNumber, purchaseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 594
      this.___currentMethod = method_call;
595
      ___manager.call(method_call);
596
    }
597
 
4496 mandeep.dh 598
    public static class createSerializedInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
599
      private long itemId;
4846 mandeep.dh 600
      private String itemNumber;
4496 mandeep.dh 601
      private String serialNumber;
602
      private long purchaseId;
4846 mandeep.dh 603
      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 604
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 605
        this.itemId = itemId;
4846 mandeep.dh 606
        this.itemNumber = itemNumber;
4496 mandeep.dh 607
        this.serialNumber = serialNumber;
608
        this.purchaseId = purchaseId;
2820 chandransh 609
      }
3430 rajveer 610
 
611
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 612
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createSerializedInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
613
        createSerializedInventoryItem_args args = new createSerializedInventoryItem_args();
614
        args.setItemId(itemId);
4846 mandeep.dh 615
        args.setItemNumber(itemNumber);
4496 mandeep.dh 616
        args.setSerialNumber(serialNumber);
617
        args.setPurchaseId(purchaseId);
3430 rajveer 618
        args.write(prot);
619
        prot.writeMessageEnd();
620
      }
621
 
4555 mandeep.dh 622
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 623
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
624
          throw new IllegalStateException("Method call not finished!");
625
        }
626
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
627
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 628
        return (new Client(prot)).recv_createSerializedInventoryItem();
3430 rajveer 629
      }
2820 chandransh 630
    }
631
 
4496 mandeep.dh 632
    public void createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createSerializedInventoryItemFromItemNumber_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 633
      checkReady();
4496 mandeep.dh 634
      createSerializedInventoryItemFromItemNumber_call method_call = new createSerializedInventoryItemFromItemNumber_call(itemNumber, serialNumber, purchaseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 635
      this.___currentMethod = method_call;
636
      ___manager.call(method_call);
637
    }
638
 
4496 mandeep.dh 639
    public static class createSerializedInventoryItemFromItemNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
640
      private String itemNumber;
641
      private String serialNumber;
642
      private long purchaseId;
643
      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 644
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 645
        this.itemNumber = itemNumber;
646
        this.serialNumber = serialNumber;
647
        this.purchaseId = purchaseId;
3430 rajveer 648
      }
649
 
650
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 651
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createSerializedInventoryItemFromItemNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
652
        createSerializedInventoryItemFromItemNumber_args args = new createSerializedInventoryItemFromItemNumber_args();
653
        args.setItemNumber(itemNumber);
654
        args.setSerialNumber(serialNumber);
655
        args.setPurchaseId(purchaseId);
3430 rajveer 656
        args.write(prot);
657
        prot.writeMessageEnd();
658
      }
659
 
4555 mandeep.dh 660
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 661
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
662
          throw new IllegalStateException("Method call not finished!");
663
        }
664
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
665
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 666
        return (new Client(prot)).recv_createSerializedInventoryItemFromItemNumber();
3430 rajveer 667
      }
668
    }
669
 
4496 mandeep.dh 670
    public void createInventoryItem(long itemId, long quantity, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 671
      checkReady();
4496 mandeep.dh 672
      createInventoryItem_call method_call = new createInventoryItem_call(itemId, quantity, purchaseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 673
      this.___currentMethod = method_call;
674
      ___manager.call(method_call);
675
    }
676
 
4496 mandeep.dh 677
    public static class createInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
678
      private long itemId;
679
      private long quantity;
680
      private long purchaseId;
681
      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 682
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 683
        this.itemId = itemId;
684
        this.quantity = quantity;
685
        this.purchaseId = purchaseId;
3430 rajveer 686
      }
687
 
688
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 689
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
690
        createInventoryItem_args args = new createInventoryItem_args();
691
        args.setItemId(itemId);
692
        args.setQuantity(quantity);
693
        args.setPurchaseId(purchaseId);
3430 rajveer 694
        args.write(prot);
695
        prot.writeMessageEnd();
696
      }
697
 
4555 mandeep.dh 698
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 699
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
700
          throw new IllegalStateException("Method call not finished!");
701
        }
702
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
703
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 704
        return (new Client(prot)).recv_createInventoryItem();
3430 rajveer 705
      }
706
    }
707
 
4496 mandeep.dh 708
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<getInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 709
      checkReady();
4496 mandeep.dh 710
      getInventoryItem_call method_call = new getInventoryItem_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 711
      this.___currentMethod = method_call;
712
      ___manager.call(method_call);
713
    }
714
 
4496 mandeep.dh 715
    public static class getInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
716
      private String serialNumber;
717
      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 718
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 719
        this.serialNumber = serialNumber;
3430 rajveer 720
      }
721
 
722
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 723
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
724
        getInventoryItem_args args = new getInventoryItem_args();
725
        args.setSerialNumber(serialNumber);
3430 rajveer 726
        args.write(prot);
727
        prot.writeMessageEnd();
728
      }
729
 
4541 mandeep.dh 730
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 731
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
732
          throw new IllegalStateException("Method call not finished!");
733
        }
734
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
735
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 736
        return (new Client(prot)).recv_getInventoryItem();
3430 rajveer 737
      }
738
    }
739
 
5361 mandeep.dh 740
    public void getNonSeralizedInventoryItem(long itemId, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getNonSeralizedInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 741
      checkReady();
5361 mandeep.dh 742
      getNonSeralizedInventoryItem_call method_call = new getNonSeralizedInventoryItem_call(itemId, warehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 743
      this.___currentMethod = method_call;
744
      ___manager.call(method_call);
745
    }
746
 
5361 mandeep.dh 747
    public static class getNonSeralizedInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
4496 mandeep.dh 748
      private long itemId;
5361 mandeep.dh 749
      private long warehouseId;
750
      public getNonSeralizedInventoryItem_call(long itemId, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getNonSeralizedInventoryItem_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
3430 rajveer 751
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 752
        this.itemId = itemId;
5361 mandeep.dh 753
        this.warehouseId = warehouseId;
3430 rajveer 754
      }
755
 
756
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
5361 mandeep.dh 757
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNonSeralizedInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
758
        getNonSeralizedInventoryItem_args args = new getNonSeralizedInventoryItem_args();
4496 mandeep.dh 759
        args.setItemId(itemId);
5361 mandeep.dh 760
        args.setWarehouseId(warehouseId);
3430 rajveer 761
        args.write(prot);
762
        prot.writeMessageEnd();
763
      }
764
 
5361 mandeep.dh 765
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 766
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
767
          throw new IllegalStateException("Method call not finished!");
768
        }
769
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
770
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5361 mandeep.dh 771
        return (new Client(prot)).recv_getNonSeralizedInventoryItem();
3430 rajveer 772
      }
773
    }
774
 
5361 mandeep.dh 775
    public void scanSerializedItem(InventoryItem inventoryItem, ScanType type, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<scanSerializedItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 776
      checkReady();
5361 mandeep.dh 777
      scanSerializedItem_call method_call = new scanSerializedItem_call(inventoryItem, type, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 778
      this.___currentMethod = method_call;
779
      ___manager.call(method_call);
780
    }
781
 
4496 mandeep.dh 782
    public static class scanSerializedItem_call extends org.apache.thrift.async.TAsyncMethodCall {
5110 mandeep.dh 783
      private InventoryItem inventoryItem;
3430 rajveer 784
      private ScanType type;
5361 mandeep.dh 785
      private long billingWarehouseId;
786
      public scanSerializedItem_call(InventoryItem inventoryItem, ScanType type, long billingWarehouseId, 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 787
        super(client, protocolFactory, transport, resultHandler, false);
5110 mandeep.dh 788
        this.inventoryItem = inventoryItem;
3430 rajveer 789
        this.type = type;
5361 mandeep.dh 790
        this.billingWarehouseId = billingWarehouseId;
3430 rajveer 791
      }
792
 
793
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 794
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanSerializedItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
795
        scanSerializedItem_args args = new scanSerializedItem_args();
5110 mandeep.dh 796
        args.setInventoryItem(inventoryItem);
3430 rajveer 797
        args.setType(type);
5361 mandeep.dh 798
        args.setBillingWarehouseId(billingWarehouseId);
3430 rajveer 799
        args.write(prot);
800
        prot.writeMessageEnd();
801
      }
802
 
803
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
804
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
805
          throw new IllegalStateException("Method call not finished!");
806
        }
807
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
808
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 809
        (new Client(prot)).recv_scanSerializedItem();
3430 rajveer 810
      }
811
    }
812
 
5361 mandeep.dh 813
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<scan_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 814
      checkReady();
5361 mandeep.dh 815
      scan_call method_call = new scan_call(inventoryItem, type, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 816
      this.___currentMethod = method_call;
817
      ___manager.call(method_call);
818
    }
819
 
4496 mandeep.dh 820
    public static class scan_call extends org.apache.thrift.async.TAsyncMethodCall {
5361 mandeep.dh 821
      private InventoryItem inventoryItem;
3430 rajveer 822
      private ScanType type;
4496 mandeep.dh 823
      private long quantity;
5361 mandeep.dh 824
      private long billingWarehouseId;
825
      public scan_call(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<scan_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
3430 rajveer 826
        super(client, protocolFactory, transport, resultHandler, false);
5361 mandeep.dh 827
        this.inventoryItem = inventoryItem;
3430 rajveer 828
        this.type = type;
4496 mandeep.dh 829
        this.quantity = quantity;
5361 mandeep.dh 830
        this.billingWarehouseId = billingWarehouseId;
3430 rajveer 831
      }
832
 
833
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 834
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scan", org.apache.thrift.protocol.TMessageType.CALL, 0));
835
        scan_args args = new scan_args();
5361 mandeep.dh 836
        args.setInventoryItem(inventoryItem);
3430 rajveer 837
        args.setType(type);
4496 mandeep.dh 838
        args.setQuantity(quantity);
5361 mandeep.dh 839
        args.setBillingWarehouseId(billingWarehouseId);
3430 rajveer 840
        args.write(prot);
841
        prot.writeMessageEnd();
842
      }
843
 
844
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
845
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
846
          throw new IllegalStateException("Method call not finished!");
847
        }
848
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
849
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 850
        (new Client(prot)).recv_scan();
3430 rajveer 851
      }
852
    }
853
 
5110 mandeep.dh 854
    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 855
      checkReady();
5110 mandeep.dh 856
      scanSerializedItemForOrder_call method_call = new scanSerializedItemForOrder_call(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 857
      this.___currentMethod = method_call;
858
      ___manager.call(method_call);
859
    }
860
 
861
    public static class scanSerializedItemForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
4555 mandeep.dh 862
      private String serialNumber;
4496 mandeep.dh 863
      private ScanType type;
864
      private long orderId;
5110 mandeep.dh 865
      private long fulfilmentWarehouseId;
866
      private double quantity;
867
      private long billingWarehouseId;
868
      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 869
        super(client, protocolFactory, transport, resultHandler, false);
4555 mandeep.dh 870
        this.serialNumber = serialNumber;
4496 mandeep.dh 871
        this.type = type;
872
        this.orderId = orderId;
5110 mandeep.dh 873
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
874
        this.quantity = quantity;
875
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 876
      }
877
 
878
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
879
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanSerializedItemForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
880
        scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 881
        args.setSerialNumber(serialNumber);
4496 mandeep.dh 882
        args.setType(type);
883
        args.setOrderId(orderId);
5110 mandeep.dh 884
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
885
        args.setQuantity(quantity);
886
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 887
        args.write(prot);
888
        prot.writeMessageEnd();
889
      }
890
 
4555 mandeep.dh 891
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 892
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
893
          throw new IllegalStateException("Method call not finished!");
894
        }
895
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
896
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
897
        return (new Client(prot)).recv_scanSerializedItemForOrder();
898
      }
899
    }
900
 
5361 mandeep.dh 901
    public void scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<scanForOrder_call> resultHandler) throws org.apache.thrift.TException {
4496 mandeep.dh 902
      checkReady();
5361 mandeep.dh 903
      scanForOrder_call method_call = new scanForOrder_call(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 904
      this.___currentMethod = method_call;
905
      ___manager.call(method_call);
906
    }
907
 
908
    public static class scanForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
5361 mandeep.dh 909
      private InventoryItem inventoryItem;
4496 mandeep.dh 910
      private ScanType type;
911
      private long quantity;
912
      private long orderId;
5110 mandeep.dh 913
      private long fulfilmentWarehouseId;
5361 mandeep.dh 914
      private long billingWarehouseId;
915
      public scanForOrder_call(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<scanForOrder_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
4496 mandeep.dh 916
        super(client, protocolFactory, transport, resultHandler, false);
5361 mandeep.dh 917
        this.inventoryItem = inventoryItem;
4496 mandeep.dh 918
        this.type = type;
919
        this.quantity = quantity;
920
        this.orderId = orderId;
5110 mandeep.dh 921
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5361 mandeep.dh 922
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 923
      }
924
 
925
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
926
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
927
        scanForOrder_args args = new scanForOrder_args();
5361 mandeep.dh 928
        args.setInventoryItem(inventoryItem);
4496 mandeep.dh 929
        args.setType(type);
930
        args.setQuantity(quantity);
931
        args.setOrderId(orderId);
5110 mandeep.dh 932
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 933
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 934
        args.write(prot);
935
        prot.writeMessageEnd();
936
      }
937
 
5361 mandeep.dh 938
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 939
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
940
          throw new IllegalStateException("Method call not finished!");
941
        }
942
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
943
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5361 mandeep.dh 944
        return (new Client(prot)).recv_scanForOrder();
4496 mandeep.dh 945
      }
946
    }
947
 
948
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException {
949
      checkReady();
950
      createItemNumberMapping_call method_call = new createItemNumberMapping_call(itemNumber, itemId, resultHandler, this, ___protocolFactory, ___transport);
951
      this.___currentMethod = method_call;
952
      ___manager.call(method_call);
953
    }
954
 
955
    public static class createItemNumberMapping_call extends org.apache.thrift.async.TAsyncMethodCall {
956
      private String itemNumber;
957
      private long itemId;
958
      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 {
959
        super(client, protocolFactory, transport, resultHandler, false);
960
        this.itemNumber = itemNumber;
961
        this.itemId = itemId;
962
      }
963
 
964
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
965
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createItemNumberMapping", org.apache.thrift.protocol.TMessageType.CALL, 0));
966
        createItemNumberMapping_args args = new createItemNumberMapping_args();
967
        args.setItemNumber(itemNumber);
968
        args.setItemId(itemId);
969
        args.write(prot);
970
        prot.writeMessageEnd();
971
      }
972
 
973
      public void getResult() throws org.apache.thrift.TException {
974
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
975
          throw new IllegalStateException("Method call not finished!");
976
        }
977
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
978
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
979
        (new Client(prot)).recv_createItemNumberMapping();
980
      }
981
    }
982
 
4622 amit.gupta 983
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<getItemNumbers_call> resultHandler) throws org.apache.thrift.TException {
984
      checkReady();
985
      getItemNumbers_call method_call = new getItemNumbers_call(itemId, resultHandler, this, ___protocolFactory, ___transport);
986
      this.___currentMethod = method_call;
987
      ___manager.call(method_call);
988
    }
989
 
990
    public static class getItemNumbers_call extends org.apache.thrift.async.TAsyncMethodCall {
991
      private long itemId;
992
      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 {
993
        super(client, protocolFactory, transport, resultHandler, false);
994
        this.itemId = itemId;
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("getItemNumbers", org.apache.thrift.protocol.TMessageType.CALL, 0));
999
        getItemNumbers_args args = new getItemNumbers_args();
1000
        args.setItemId(itemId);
1001
        args.write(prot);
1002
        prot.writeMessageEnd();
1003
      }
1004
 
1005
      public List<String> getResult() throws org.apache.thrift.TException {
1006
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1007
          throw new IllegalStateException("Method call not finished!");
1008
        }
1009
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1010
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1011
        return (new Client(prot)).recv_getItemNumbers();
1012
      }
1013
    }
1014
 
5110 mandeep.dh 1015
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<getItemIds_call> resultHandler) throws org.apache.thrift.TException {
1016
      checkReady();
1017
      getItemIds_call method_call = new getItemIds_call(itemNumber, resultHandler, this, ___protocolFactory, ___transport);
1018
      this.___currentMethod = method_call;
1019
      ___manager.call(method_call);
1020
    }
1021
 
1022
    public static class getItemIds_call extends org.apache.thrift.async.TAsyncMethodCall {
1023
      private String itemNumber;
1024
      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 {
1025
        super(client, protocolFactory, transport, resultHandler, false);
1026
        this.itemNumber = itemNumber;
1027
      }
1028
 
1029
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1030
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemIds", org.apache.thrift.protocol.TMessageType.CALL, 0));
1031
        getItemIds_args args = new getItemIds_args();
1032
        args.setItemNumber(itemNumber);
1033
        args.write(prot);
1034
        prot.writeMessageEnd();
1035
      }
1036
 
1037
      public List<Long> getResult() throws org.apache.thrift.TException {
1038
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1039
          throw new IllegalStateException("Method call not finished!");
1040
        }
1041
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1042
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1043
        return (new Client(prot)).recv_getItemIds();
1044
      }
1045
    }
1046
 
5185 mandeep.dh 1047
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException {
1048
      checkReady();
1049
      getInventoryItemsFromLastScanType_call method_call = new getInventoryItemsFromLastScanType_call(lastScanType, resultHandler, this, ___protocolFactory, ___transport);
1050
      this.___currentMethod = method_call;
1051
      ___manager.call(method_call);
1052
    }
1053
 
1054
    public static class getInventoryItemsFromLastScanType_call extends org.apache.thrift.async.TAsyncMethodCall {
1055
      private ScanType lastScanType;
1056
      public getInventoryItemsFromLastScanType_call(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemsFromLastScanType_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1057
        super(client, protocolFactory, transport, resultHandler, false);
1058
        this.lastScanType = lastScanType;
1059
      }
1060
 
1061
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1062
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemsFromLastScanType", org.apache.thrift.protocol.TMessageType.CALL, 0));
1063
        getInventoryItemsFromLastScanType_args args = new getInventoryItemsFromLastScanType_args();
1064
        args.setLastScanType(lastScanType);
1065
        args.write(prot);
1066
        prot.writeMessageEnd();
1067
      }
1068
 
1069
      public List<InventoryItem> getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1070
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1071
          throw new IllegalStateException("Method call not finished!");
1072
        }
1073
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1074
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1075
        return (new Client(prot)).recv_getInventoryItemsFromLastScanType();
1076
      }
1077
    }
1078
 
1079
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException {
1080
      checkReady();
1081
      getInventoryItemFromId_call method_call = new getInventoryItemFromId_call(inventoryItemId, resultHandler, this, ___protocolFactory, ___transport);
1082
      this.___currentMethod = method_call;
1083
      ___manager.call(method_call);
1084
    }
1085
 
1086
    public static class getInventoryItemFromId_call extends org.apache.thrift.async.TAsyncMethodCall {
1087
      private long inventoryItemId;
1088
      public getInventoryItemFromId_call(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromId_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1089
        super(client, protocolFactory, transport, resultHandler, false);
1090
        this.inventoryItemId = inventoryItemId;
1091
      }
1092
 
1093
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1094
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemFromId", org.apache.thrift.protocol.TMessageType.CALL, 0));
1095
        getInventoryItemFromId_args args = new getInventoryItemFromId_args();
1096
        args.setInventoryItemId(inventoryItemId);
1097
        args.write(prot);
1098
        prot.writeMessageEnd();
1099
      }
1100
 
1101
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1102
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1103
          throw new IllegalStateException("Method call not finished!");
1104
        }
1105
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1106
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1107
        return (new Client(prot)).recv_getInventoryItemFromId();
1108
      }
1109
    }
1110
 
3430 rajveer 1111
  }
1112
 
1113
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1114
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1115
    public Processor(I iface) {
1116
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
1117
    }
1118
 
1119
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1120
      super(iface, getProcessMap(processMap));
1121
    }
1122
 
1123
    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 1124
      processMap.put("createSerializedInventoryItem", new createSerializedInventoryItem());
1125
      processMap.put("createSerializedInventoryItemFromItemNumber", new createSerializedInventoryItemFromItemNumber());
1126
      processMap.put("createInventoryItem", new createInventoryItem());
1127
      processMap.put("getInventoryItem", new getInventoryItem());
5361 mandeep.dh 1128
      processMap.put("getNonSeralizedInventoryItem", new getNonSeralizedInventoryItem());
4496 mandeep.dh 1129
      processMap.put("scanSerializedItem", new scanSerializedItem());
1130
      processMap.put("scan", new scan());
1131
      processMap.put("scanSerializedItemForOrder", new scanSerializedItemForOrder());
1132
      processMap.put("scanForOrder", new scanForOrder());
1133
      processMap.put("createItemNumberMapping", new createItemNumberMapping());
4622 amit.gupta 1134
      processMap.put("getItemNumbers", new getItemNumbers());
5110 mandeep.dh 1135
      processMap.put("getItemIds", new getItemIds());
5185 mandeep.dh 1136
      processMap.put("getInventoryItemsFromLastScanType", new getInventoryItemsFromLastScanType());
1137
      processMap.put("getInventoryItemFromId", new getInventoryItemFromId());
3430 rajveer 1138
      return processMap;
1139
    }
1140
 
4496 mandeep.dh 1141
    private static class createSerializedInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createSerializedInventoryItem_args> {
1142
      public createSerializedInventoryItem() {
1143
        super("createSerializedInventoryItem");
3430 rajveer 1144
      }
1145
 
4496 mandeep.dh 1146
      protected createSerializedInventoryItem_args getEmptyArgsInstance() {
1147
        return new createSerializedInventoryItem_args();
3430 rajveer 1148
      }
1149
 
4496 mandeep.dh 1150
      protected createSerializedInventoryItem_result getResult(I iface, createSerializedInventoryItem_args args) throws org.apache.thrift.TException {
1151
        createSerializedInventoryItem_result result = new createSerializedInventoryItem_result();
2820 chandransh 1152
        try {
4846 mandeep.dh 1153
          result.success = iface.createSerializedInventoryItem(args.itemId, args.itemNumber, args.serialNumber, args.purchaseId);
2820 chandransh 1154
        } catch (WarehouseServiceException wex) {
1155
          result.wex = wex;
1156
        }
3430 rajveer 1157
        return result;
2820 chandransh 1158
      }
1159
    }
1160
 
4496 mandeep.dh 1161
    private static class createSerializedInventoryItemFromItemNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createSerializedInventoryItemFromItemNumber_args> {
1162
      public createSerializedInventoryItemFromItemNumber() {
1163
        super("createSerializedInventoryItemFromItemNumber");
3430 rajveer 1164
      }
1165
 
4496 mandeep.dh 1166
      protected createSerializedInventoryItemFromItemNumber_args getEmptyArgsInstance() {
1167
        return new createSerializedInventoryItemFromItemNumber_args();
3430 rajveer 1168
      }
1169
 
4496 mandeep.dh 1170
      protected createSerializedInventoryItemFromItemNumber_result getResult(I iface, createSerializedInventoryItemFromItemNumber_args args) throws org.apache.thrift.TException {
1171
        createSerializedInventoryItemFromItemNumber_result result = new createSerializedInventoryItemFromItemNumber_result();
2820 chandransh 1172
        try {
4496 mandeep.dh 1173
          result.success = iface.createSerializedInventoryItemFromItemNumber(args.itemNumber, args.serialNumber, args.purchaseId);
2820 chandransh 1174
        } catch (WarehouseServiceException wex) {
1175
          result.wex = wex;
1176
        }
3430 rajveer 1177
        return result;
2820 chandransh 1178
      }
1179
    }
1180
 
4496 mandeep.dh 1181
    private static class createInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInventoryItem_args> {
1182
      public createInventoryItem() {
1183
        super("createInventoryItem");
3430 rajveer 1184
      }
1185
 
4496 mandeep.dh 1186
      protected createInventoryItem_args getEmptyArgsInstance() {
1187
        return new createInventoryItem_args();
3430 rajveer 1188
      }
1189
 
4496 mandeep.dh 1190
      protected createInventoryItem_result getResult(I iface, createInventoryItem_args args) throws org.apache.thrift.TException {
1191
        createInventoryItem_result result = new createInventoryItem_result();
3383 chandransh 1192
        try {
4496 mandeep.dh 1193
          result.success = iface.createInventoryItem(args.itemId, args.quantity, args.purchaseId);
3383 chandransh 1194
        } catch (WarehouseServiceException wex) {
1195
          result.wex = wex;
1196
        }
3430 rajveer 1197
        return result;
3383 chandransh 1198
      }
1199
    }
1200
 
4496 mandeep.dh 1201
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
1202
      public getInventoryItem() {
1203
        super("getInventoryItem");
3430 rajveer 1204
      }
1205
 
4496 mandeep.dh 1206
      protected getInventoryItem_args getEmptyArgsInstance() {
1207
        return new getInventoryItem_args();
3430 rajveer 1208
      }
1209
 
4496 mandeep.dh 1210
      protected getInventoryItem_result getResult(I iface, getInventoryItem_args args) throws org.apache.thrift.TException {
1211
        getInventoryItem_result result = new getInventoryItem_result();
4541 mandeep.dh 1212
        try {
1213
          result.success = iface.getInventoryItem(args.serialNumber);
1214
        } catch (WarehouseServiceException wex) {
1215
          result.wex = wex;
1216
        }
3430 rajveer 1217
        return result;
2832 chandransh 1218
      }
1219
    }
1220
 
5361 mandeep.dh 1221
    private static class getNonSeralizedInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getNonSeralizedInventoryItem_args> {
1222
      public getNonSeralizedInventoryItem() {
1223
        super("getNonSeralizedInventoryItem");
3430 rajveer 1224
      }
1225
 
5361 mandeep.dh 1226
      protected getNonSeralizedInventoryItem_args getEmptyArgsInstance() {
1227
        return new getNonSeralizedInventoryItem_args();
3430 rajveer 1228
      }
1229
 
5361 mandeep.dh 1230
      protected getNonSeralizedInventoryItem_result getResult(I iface, getNonSeralizedInventoryItem_args args) throws org.apache.thrift.TException {
1231
        getNonSeralizedInventoryItem_result result = new getNonSeralizedInventoryItem_result();
1232
        try {
1233
          result.success = iface.getNonSeralizedInventoryItem(args.itemId, args.warehouseId);
1234
        } catch (WarehouseServiceException wex) {
1235
          result.wex = wex;
1236
        }
3430 rajveer 1237
        return result;
2820 chandransh 1238
      }
1239
    }
1240
 
4496 mandeep.dh 1241
    private static class scanSerializedItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanSerializedItem_args> {
1242
      public scanSerializedItem() {
1243
        super("scanSerializedItem");
1244
      }
1245
 
1246
      protected scanSerializedItem_args getEmptyArgsInstance() {
1247
        return new scanSerializedItem_args();
1248
      }
1249
 
1250
      protected scanSerializedItem_result getResult(I iface, scanSerializedItem_args args) throws org.apache.thrift.TException {
1251
        scanSerializedItem_result result = new scanSerializedItem_result();
2820 chandransh 1252
        try {
5361 mandeep.dh 1253
          iface.scanSerializedItem(args.inventoryItem, args.type, args.billingWarehouseId);
2820 chandransh 1254
        } catch (WarehouseServiceException wex) {
1255
          result.wex = wex;
1256
        }
3430 rajveer 1257
        return result;
2820 chandransh 1258
      }
1259
    }
1260
 
4496 mandeep.dh 1261
    private static class scan<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scan_args> {
1262
      public scan() {
1263
        super("scan");
3430 rajveer 1264
      }
1265
 
4496 mandeep.dh 1266
      protected scan_args getEmptyArgsInstance() {
1267
        return new scan_args();
3430 rajveer 1268
      }
1269
 
4496 mandeep.dh 1270
      protected scan_result getResult(I iface, scan_args args) throws org.apache.thrift.TException {
1271
        scan_result result = new scan_result();
3383 chandransh 1272
        try {
5361 mandeep.dh 1273
          iface.scan(args.inventoryItem, args.type, args.quantity, args.billingWarehouseId);
3383 chandransh 1274
        } catch (WarehouseServiceException wex) {
1275
          result.wex = wex;
1276
        }
3430 rajveer 1277
        return result;
3383 chandransh 1278
      }
1279
    }
1280
 
4496 mandeep.dh 1281
    private static class scanSerializedItemForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanSerializedItemForOrder_args> {
1282
      public scanSerializedItemForOrder() {
1283
        super("scanSerializedItemForOrder");
3430 rajveer 1284
      }
1285
 
4496 mandeep.dh 1286
      protected scanSerializedItemForOrder_args getEmptyArgsInstance() {
1287
        return new scanSerializedItemForOrder_args();
3430 rajveer 1288
      }
1289
 
4496 mandeep.dh 1290
      protected scanSerializedItemForOrder_result getResult(I iface, scanSerializedItemForOrder_args args) throws org.apache.thrift.TException {
1291
        scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
2820 chandransh 1292
        try {
5110 mandeep.dh 1293
          result.success = iface.scanSerializedItemForOrder(args.serialNumber, args.type, args.orderId, args.fulfilmentWarehouseId, args.quantity, args.billingWarehouseId);
2820 chandransh 1294
        } catch (WarehouseServiceException wex) {
1295
          result.wex = wex;
1296
        }
3430 rajveer 1297
        return result;
2820 chandransh 1298
      }
1299
    }
1300
 
4496 mandeep.dh 1301
    private static class scanForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForOrder_args> {
1302
      public scanForOrder() {
1303
        super("scanForOrder");
3430 rajveer 1304
      }
1305
 
4496 mandeep.dh 1306
      protected scanForOrder_args getEmptyArgsInstance() {
1307
        return new scanForOrder_args();
3430 rajveer 1308
      }
1309
 
4496 mandeep.dh 1310
      protected scanForOrder_result getResult(I iface, scanForOrder_args args) throws org.apache.thrift.TException {
1311
        scanForOrder_result result = new scanForOrder_result();
2820 chandransh 1312
        try {
5361 mandeep.dh 1313
          result.success = iface.scanForOrder(args.inventoryItem, args.type, args.quantity, args.orderId, args.fulfilmentWarehouseId, args.billingWarehouseId);
2820 chandransh 1314
        } catch (WarehouseServiceException wex) {
1315
          result.wex = wex;
1316
        }
3430 rajveer 1317
        return result;
2820 chandransh 1318
      }
1319
    }
1320
 
4496 mandeep.dh 1321
    private static class createItemNumberMapping<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createItemNumberMapping_args> {
1322
      public createItemNumberMapping() {
1323
        super("createItemNumberMapping");
1324
      }
1325
 
1326
      protected createItemNumberMapping_args getEmptyArgsInstance() {
1327
        return new createItemNumberMapping_args();
1328
      }
1329
 
1330
      protected createItemNumberMapping_result getResult(I iface, createItemNumberMapping_args args) throws org.apache.thrift.TException {
1331
        createItemNumberMapping_result result = new createItemNumberMapping_result();
1332
        iface.createItemNumberMapping(args.itemNumber, args.itemId);
1333
        return result;
1334
      }
1335
    }
1336
 
4622 amit.gupta 1337
    private static class getItemNumbers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemNumbers_args> {
1338
      public getItemNumbers() {
1339
        super("getItemNumbers");
1340
      }
1341
 
1342
      protected getItemNumbers_args getEmptyArgsInstance() {
1343
        return new getItemNumbers_args();
1344
      }
1345
 
1346
      protected getItemNumbers_result getResult(I iface, getItemNumbers_args args) throws org.apache.thrift.TException {
1347
        getItemNumbers_result result = new getItemNumbers_result();
1348
        result.success = iface.getItemNumbers(args.itemId);
1349
        return result;
1350
      }
1351
    }
1352
 
5110 mandeep.dh 1353
    private static class getItemIds<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemIds_args> {
1354
      public getItemIds() {
1355
        super("getItemIds");
1356
      }
1357
 
1358
      protected getItemIds_args getEmptyArgsInstance() {
1359
        return new getItemIds_args();
1360
      }
1361
 
1362
      protected getItemIds_result getResult(I iface, getItemIds_args args) throws org.apache.thrift.TException {
1363
        getItemIds_result result = new getItemIds_result();
1364
        result.success = iface.getItemIds(args.itemNumber);
1365
        return result;
1366
      }
1367
    }
1368
 
5185 mandeep.dh 1369
    private static class getInventoryItemsFromLastScanType<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemsFromLastScanType_args> {
1370
      public getInventoryItemsFromLastScanType() {
1371
        super("getInventoryItemsFromLastScanType");
1372
      }
1373
 
1374
      protected getInventoryItemsFromLastScanType_args getEmptyArgsInstance() {
1375
        return new getInventoryItemsFromLastScanType_args();
1376
      }
1377
 
1378
      protected getInventoryItemsFromLastScanType_result getResult(I iface, getInventoryItemsFromLastScanType_args args) throws org.apache.thrift.TException {
1379
        getInventoryItemsFromLastScanType_result result = new getInventoryItemsFromLastScanType_result();
1380
        try {
1381
          result.success = iface.getInventoryItemsFromLastScanType(args.lastScanType);
1382
        } catch (WarehouseServiceException wex) {
1383
          result.wex = wex;
1384
        }
1385
        return result;
1386
      }
1387
    }
1388
 
1389
    private static class getInventoryItemFromId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemFromId_args> {
1390
      public getInventoryItemFromId() {
1391
        super("getInventoryItemFromId");
1392
      }
1393
 
1394
      protected getInventoryItemFromId_args getEmptyArgsInstance() {
1395
        return new getInventoryItemFromId_args();
1396
      }
1397
 
1398
      protected getInventoryItemFromId_result getResult(I iface, getInventoryItemFromId_args args) throws org.apache.thrift.TException {
1399
        getInventoryItemFromId_result result = new getInventoryItemFromId_result();
1400
        try {
1401
          result.success = iface.getInventoryItemFromId(args.inventoryItemId);
1402
        } catch (WarehouseServiceException wex) {
1403
          result.wex = wex;
1404
        }
1405
        return result;
1406
      }
1407
    }
1408
 
2820 chandransh 1409
  }
1410
 
4496 mandeep.dh 1411
  public static class createSerializedInventoryItem_args implements org.apache.thrift.TBase<createSerializedInventoryItem_args, createSerializedInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
1412
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItem_args");
2820 chandransh 1413
 
4496 mandeep.dh 1414
    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 1415
    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);
1416
    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);
1417
    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 1418
 
4496 mandeep.dh 1419
    private long itemId; // required
4846 mandeep.dh 1420
    private String itemNumber; // required
4496 mandeep.dh 1421
    private String serialNumber; // required
1422
    private long purchaseId; // required
2820 chandransh 1423
 
1424
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 1425
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 1426
      ITEM_ID((short)1, "itemId"),
4846 mandeep.dh 1427
      ITEM_NUMBER((short)2, "itemNumber"),
1428
      SERIAL_NUMBER((short)3, "serialNumber"),
1429
      PURCHASE_ID((short)4, "purchaseId");
2820 chandransh 1430
 
1431
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1432
 
1433
      static {
1434
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1435
          byName.put(field.getFieldName(), field);
1436
        }
1437
      }
1438
 
1439
      /**
1440
       * Find the _Fields constant that matches fieldId, or null if its not found.
1441
       */
1442
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 1443
        switch(fieldId) {
4496 mandeep.dh 1444
          case 1: // ITEM_ID
1445
            return ITEM_ID;
4846 mandeep.dh 1446
          case 2: // ITEM_NUMBER
1447
            return ITEM_NUMBER;
1448
          case 3: // SERIAL_NUMBER
4496 mandeep.dh 1449
            return SERIAL_NUMBER;
4846 mandeep.dh 1450
          case 4: // PURCHASE_ID
4496 mandeep.dh 1451
            return PURCHASE_ID;
3430 rajveer 1452
          default:
1453
            return null;
1454
        }
2820 chandransh 1455
      }
1456
 
1457
      /**
1458
       * Find the _Fields constant that matches fieldId, throwing an exception
1459
       * if it is not found.
1460
       */
1461
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1462
        _Fields fields = findByThriftId(fieldId);
1463
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1464
        return fields;
1465
      }
1466
 
1467
      /**
1468
       * Find the _Fields constant that matches name, or null if its not found.
1469
       */
1470
      public static _Fields findByName(String name) {
1471
        return byName.get(name);
1472
      }
1473
 
1474
      private final short _thriftId;
1475
      private final String _fieldName;
1476
 
1477
      _Fields(short thriftId, String fieldName) {
1478
        _thriftId = thriftId;
1479
        _fieldName = fieldName;
1480
      }
1481
 
1482
      public short getThriftFieldId() {
1483
        return _thriftId;
1484
      }
1485
 
1486
      public String getFieldName() {
1487
        return _fieldName;
1488
      }
1489
    }
1490
 
1491
    // isset id assignments
4496 mandeep.dh 1492
    private static final int __ITEMID_ISSET_ID = 0;
1493
    private static final int __PURCHASEID_ISSET_ID = 1;
1494
    private BitSet __isset_bit_vector = new BitSet(2);
2820 chandransh 1495
 
3430 rajveer 1496
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 1497
    static {
3430 rajveer 1498
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 1499
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1500
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4846 mandeep.dh 1501
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1502
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4496 mandeep.dh 1503
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1504
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
1505
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1506
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 1507
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 1508
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSerializedInventoryItem_args.class, metaDataMap);
2820 chandransh 1509
    }
1510
 
4496 mandeep.dh 1511
    public createSerializedInventoryItem_args() {
2820 chandransh 1512
    }
1513
 
4496 mandeep.dh 1514
    public createSerializedInventoryItem_args(
1515
      long itemId,
4846 mandeep.dh 1516
      String itemNumber,
4496 mandeep.dh 1517
      String serialNumber,
1518
      long purchaseId)
2820 chandransh 1519
    {
1520
      this();
4496 mandeep.dh 1521
      this.itemId = itemId;
1522
      setItemIdIsSet(true);
4846 mandeep.dh 1523
      this.itemNumber = itemNumber;
4496 mandeep.dh 1524
      this.serialNumber = serialNumber;
1525
      this.purchaseId = purchaseId;
1526
      setPurchaseIdIsSet(true);
2820 chandransh 1527
    }
1528
 
1529
    /**
1530
     * Performs a deep copy on <i>other</i>.
1531
     */
4496 mandeep.dh 1532
    public createSerializedInventoryItem_args(createSerializedInventoryItem_args other) {
1533
      __isset_bit_vector.clear();
1534
      __isset_bit_vector.or(other.__isset_bit_vector);
1535
      this.itemId = other.itemId;
4846 mandeep.dh 1536
      if (other.isSetItemNumber()) {
1537
        this.itemNumber = other.itemNumber;
1538
      }
4496 mandeep.dh 1539
      if (other.isSetSerialNumber()) {
1540
        this.serialNumber = other.serialNumber;
2820 chandransh 1541
      }
4496 mandeep.dh 1542
      this.purchaseId = other.purchaseId;
2820 chandransh 1543
    }
1544
 
4496 mandeep.dh 1545
    public createSerializedInventoryItem_args deepCopy() {
1546
      return new createSerializedInventoryItem_args(this);
2820 chandransh 1547
    }
1548
 
3430 rajveer 1549
    @Override
1550
    public void clear() {
4496 mandeep.dh 1551
      setItemIdIsSet(false);
1552
      this.itemId = 0;
4846 mandeep.dh 1553
      this.itemNumber = null;
4496 mandeep.dh 1554
      this.serialNumber = null;
1555
      setPurchaseIdIsSet(false);
1556
      this.purchaseId = 0;
2820 chandransh 1557
    }
1558
 
4496 mandeep.dh 1559
    public long getItemId() {
1560
      return this.itemId;
2820 chandransh 1561
    }
1562
 
4496 mandeep.dh 1563
    public void setItemId(long itemId) {
1564
      this.itemId = itemId;
1565
      setItemIdIsSet(true);
2820 chandransh 1566
    }
1567
 
4496 mandeep.dh 1568
    public void unsetItemId() {
1569
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
2820 chandransh 1570
    }
1571
 
4496 mandeep.dh 1572
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
1573
    public boolean isSetItemId() {
1574
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
2820 chandransh 1575
    }
1576
 
4496 mandeep.dh 1577
    public void setItemIdIsSet(boolean value) {
1578
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
1579
    }
1580
 
4846 mandeep.dh 1581
    public String getItemNumber() {
1582
      return this.itemNumber;
1583
    }
1584
 
1585
    public void setItemNumber(String itemNumber) {
1586
      this.itemNumber = itemNumber;
1587
    }
1588
 
1589
    public void unsetItemNumber() {
1590
      this.itemNumber = null;
1591
    }
1592
 
1593
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
1594
    public boolean isSetItemNumber() {
1595
      return this.itemNumber != null;
1596
    }
1597
 
1598
    public void setItemNumberIsSet(boolean value) {
1599
      if (!value) {
1600
        this.itemNumber = null;
1601
      }
1602
    }
1603
 
4496 mandeep.dh 1604
    public String getSerialNumber() {
1605
      return this.serialNumber;
1606
    }
1607
 
1608
    public void setSerialNumber(String serialNumber) {
1609
      this.serialNumber = serialNumber;
1610
    }
1611
 
1612
    public void unsetSerialNumber() {
1613
      this.serialNumber = null;
1614
    }
1615
 
1616
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
1617
    public boolean isSetSerialNumber() {
1618
      return this.serialNumber != null;
1619
    }
1620
 
1621
    public void setSerialNumberIsSet(boolean value) {
2820 chandransh 1622
      if (!value) {
4496 mandeep.dh 1623
        this.serialNumber = null;
2820 chandransh 1624
      }
1625
    }
1626
 
4496 mandeep.dh 1627
    public long getPurchaseId() {
1628
      return this.purchaseId;
1629
    }
1630
 
1631
    public void setPurchaseId(long purchaseId) {
1632
      this.purchaseId = purchaseId;
1633
      setPurchaseIdIsSet(true);
1634
    }
1635
 
1636
    public void unsetPurchaseId() {
1637
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
1638
    }
1639
 
1640
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
1641
    public boolean isSetPurchaseId() {
1642
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
1643
    }
1644
 
1645
    public void setPurchaseIdIsSet(boolean value) {
1646
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
1647
    }
1648
 
2820 chandransh 1649
    public void setFieldValue(_Fields field, Object value) {
1650
      switch (field) {
4496 mandeep.dh 1651
      case ITEM_ID:
2820 chandransh 1652
        if (value == null) {
4496 mandeep.dh 1653
          unsetItemId();
2820 chandransh 1654
        } else {
4496 mandeep.dh 1655
          setItemId((Long)value);
2820 chandransh 1656
        }
1657
        break;
1658
 
4846 mandeep.dh 1659
      case ITEM_NUMBER:
1660
        if (value == null) {
1661
          unsetItemNumber();
1662
        } else {
1663
          setItemNumber((String)value);
1664
        }
1665
        break;
1666
 
4496 mandeep.dh 1667
      case SERIAL_NUMBER:
1668
        if (value == null) {
1669
          unsetSerialNumber();
1670
        } else {
1671
          setSerialNumber((String)value);
1672
        }
1673
        break;
1674
 
1675
      case PURCHASE_ID:
1676
        if (value == null) {
1677
          unsetPurchaseId();
1678
        } else {
1679
          setPurchaseId((Long)value);
1680
        }
1681
        break;
1682
 
2820 chandransh 1683
      }
1684
    }
1685
 
1686
    public Object getFieldValue(_Fields field) {
1687
      switch (field) {
4496 mandeep.dh 1688
      case ITEM_ID:
1689
        return Long.valueOf(getItemId());
2820 chandransh 1690
 
4846 mandeep.dh 1691
      case ITEM_NUMBER:
1692
        return getItemNumber();
1693
 
4496 mandeep.dh 1694
      case SERIAL_NUMBER:
1695
        return getSerialNumber();
1696
 
1697
      case PURCHASE_ID:
1698
        return Long.valueOf(getPurchaseId());
1699
 
2820 chandransh 1700
      }
1701
      throw new IllegalStateException();
1702
    }
1703
 
3430 rajveer 1704
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1705
    public boolean isSet(_Fields field) {
1706
      if (field == null) {
1707
        throw new IllegalArgumentException();
1708
      }
2820 chandransh 1709
 
1710
      switch (field) {
4496 mandeep.dh 1711
      case ITEM_ID:
1712
        return isSetItemId();
4846 mandeep.dh 1713
      case ITEM_NUMBER:
1714
        return isSetItemNumber();
4496 mandeep.dh 1715
      case SERIAL_NUMBER:
1716
        return isSetSerialNumber();
1717
      case PURCHASE_ID:
1718
        return isSetPurchaseId();
2820 chandransh 1719
      }
1720
      throw new IllegalStateException();
1721
    }
1722
 
1723
    @Override
1724
    public boolean equals(Object that) {
1725
      if (that == null)
1726
        return false;
4496 mandeep.dh 1727
      if (that instanceof createSerializedInventoryItem_args)
1728
        return this.equals((createSerializedInventoryItem_args)that);
2820 chandransh 1729
      return false;
1730
    }
1731
 
4496 mandeep.dh 1732
    public boolean equals(createSerializedInventoryItem_args that) {
2820 chandransh 1733
      if (that == null)
1734
        return false;
1735
 
4496 mandeep.dh 1736
      boolean this_present_itemId = true;
1737
      boolean that_present_itemId = true;
1738
      if (this_present_itemId || that_present_itemId) {
1739
        if (!(this_present_itemId && that_present_itemId))
2820 chandransh 1740
          return false;
4496 mandeep.dh 1741
        if (this.itemId != that.itemId)
2820 chandransh 1742
          return false;
1743
      }
1744
 
4846 mandeep.dh 1745
      boolean this_present_itemNumber = true && this.isSetItemNumber();
1746
      boolean that_present_itemNumber = true && that.isSetItemNumber();
1747
      if (this_present_itemNumber || that_present_itemNumber) {
1748
        if (!(this_present_itemNumber && that_present_itemNumber))
1749
          return false;
1750
        if (!this.itemNumber.equals(that.itemNumber))
1751
          return false;
1752
      }
1753
 
4496 mandeep.dh 1754
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
1755
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
1756
      if (this_present_serialNumber || that_present_serialNumber) {
1757
        if (!(this_present_serialNumber && that_present_serialNumber))
1758
          return false;
1759
        if (!this.serialNumber.equals(that.serialNumber))
1760
          return false;
1761
      }
1762
 
1763
      boolean this_present_purchaseId = true;
1764
      boolean that_present_purchaseId = true;
1765
      if (this_present_purchaseId || that_present_purchaseId) {
1766
        if (!(this_present_purchaseId && that_present_purchaseId))
1767
          return false;
1768
        if (this.purchaseId != that.purchaseId)
1769
          return false;
1770
      }
1771
 
2820 chandransh 1772
      return true;
1773
    }
1774
 
1775
    @Override
1776
    public int hashCode() {
1777
      return 0;
1778
    }
1779
 
4496 mandeep.dh 1780
    public int compareTo(createSerializedInventoryItem_args other) {
2820 chandransh 1781
      if (!getClass().equals(other.getClass())) {
1782
        return getClass().getName().compareTo(other.getClass().getName());
1783
      }
1784
 
1785
      int lastComparison = 0;
4496 mandeep.dh 1786
      createSerializedInventoryItem_args typedOther = (createSerializedInventoryItem_args)other;
2820 chandransh 1787
 
4496 mandeep.dh 1788
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
2820 chandransh 1789
      if (lastComparison != 0) {
1790
        return lastComparison;
1791
      }
4496 mandeep.dh 1792
      if (isSetItemId()) {
1793
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
3430 rajveer 1794
        if (lastComparison != 0) {
1795
          return lastComparison;
1796
        }
2820 chandransh 1797
      }
4846 mandeep.dh 1798
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
1799
      if (lastComparison != 0) {
1800
        return lastComparison;
1801
      }
1802
      if (isSetItemNumber()) {
1803
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
1804
        if (lastComparison != 0) {
1805
          return lastComparison;
1806
        }
1807
      }
4496 mandeep.dh 1808
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
1809
      if (lastComparison != 0) {
1810
        return lastComparison;
1811
      }
1812
      if (isSetSerialNumber()) {
1813
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
1814
        if (lastComparison != 0) {
1815
          return lastComparison;
1816
        }
1817
      }
1818
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
1819
      if (lastComparison != 0) {
1820
        return lastComparison;
1821
      }
1822
      if (isSetPurchaseId()) {
1823
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
1824
        if (lastComparison != 0) {
1825
          return lastComparison;
1826
        }
1827
      }
2820 chandransh 1828
      return 0;
1829
    }
1830
 
3430 rajveer 1831
    public _Fields fieldForId(int fieldId) {
1832
      return _Fields.findByThriftId(fieldId);
1833
    }
1834
 
1835
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1836
      org.apache.thrift.protocol.TField field;
2820 chandransh 1837
      iprot.readStructBegin();
1838
      while (true)
1839
      {
1840
        field = iprot.readFieldBegin();
3430 rajveer 1841
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 1842
          break;
1843
        }
3430 rajveer 1844
        switch (field.id) {
4496 mandeep.dh 1845
          case 1: // ITEM_ID
1846
            if (field.type == org.apache.thrift.protocol.TType.I64) {
1847
              this.itemId = iprot.readI64();
1848
              setItemIdIsSet(true);
3430 rajveer 1849
            } else { 
1850
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1851
            }
1852
            break;
4846 mandeep.dh 1853
          case 2: // ITEM_NUMBER
4496 mandeep.dh 1854
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
4846 mandeep.dh 1855
              this.itemNumber = iprot.readString();
1856
            } else { 
1857
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1858
            }
1859
            break;
1860
          case 3: // SERIAL_NUMBER
1861
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
4496 mandeep.dh 1862
              this.serialNumber = iprot.readString();
1863
            } else { 
1864
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1865
            }
1866
            break;
4846 mandeep.dh 1867
          case 4: // PURCHASE_ID
4496 mandeep.dh 1868
            if (field.type == org.apache.thrift.protocol.TType.I64) {
1869
              this.purchaseId = iprot.readI64();
1870
              setPurchaseIdIsSet(true);
1871
            } else { 
1872
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1873
            }
1874
            break;
3430 rajveer 1875
          default:
1876
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 1877
        }
3430 rajveer 1878
        iprot.readFieldEnd();
2820 chandransh 1879
      }
1880
      iprot.readStructEnd();
1881
      validate();
1882
    }
1883
 
3430 rajveer 1884
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 1885
      validate();
1886
 
1887
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 1888
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
1889
      oprot.writeI64(this.itemId);
1890
      oprot.writeFieldEnd();
4846 mandeep.dh 1891
      if (this.itemNumber != null) {
1892
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
1893
        oprot.writeString(this.itemNumber);
1894
        oprot.writeFieldEnd();
1895
      }
4496 mandeep.dh 1896
      if (this.serialNumber != null) {
1897
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
1898
        oprot.writeString(this.serialNumber);
2820 chandransh 1899
        oprot.writeFieldEnd();
1900
      }
4496 mandeep.dh 1901
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
1902
      oprot.writeI64(this.purchaseId);
1903
      oprot.writeFieldEnd();
2820 chandransh 1904
      oprot.writeFieldStop();
1905
      oprot.writeStructEnd();
1906
    }
1907
 
1908
    @Override
1909
    public String toString() {
4496 mandeep.dh 1910
      StringBuilder sb = new StringBuilder("createSerializedInventoryItem_args(");
2820 chandransh 1911
      boolean first = true;
1912
 
4496 mandeep.dh 1913
      sb.append("itemId:");
1914
      sb.append(this.itemId);
1915
      first = false;
1916
      if (!first) sb.append(", ");
4846 mandeep.dh 1917
      sb.append("itemNumber:");
1918
      if (this.itemNumber == null) {
1919
        sb.append("null");
1920
      } else {
1921
        sb.append(this.itemNumber);
1922
      }
1923
      first = false;
1924
      if (!first) sb.append(", ");
4496 mandeep.dh 1925
      sb.append("serialNumber:");
1926
      if (this.serialNumber == null) {
2820 chandransh 1927
        sb.append("null");
1928
      } else {
4496 mandeep.dh 1929
        sb.append(this.serialNumber);
2820 chandransh 1930
      }
1931
      first = false;
4496 mandeep.dh 1932
      if (!first) sb.append(", ");
1933
      sb.append("purchaseId:");
1934
      sb.append(this.purchaseId);
1935
      first = false;
2820 chandransh 1936
      sb.append(")");
1937
      return sb.toString();
1938
    }
1939
 
3430 rajveer 1940
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 1941
      // check for required fields
1942
    }
1943
 
3430 rajveer 1944
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
1945
      try {
1946
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
1947
      } catch (org.apache.thrift.TException te) {
1948
        throw new java.io.IOException(te);
1949
      }
1950
    }
1951
 
1952
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
1953
      try {
4496 mandeep.dh 1954
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
1955
        __isset_bit_vector = new BitSet(1);
3430 rajveer 1956
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
1957
      } catch (org.apache.thrift.TException te) {
1958
        throw new java.io.IOException(te);
1959
      }
1960
    }
1961
 
2820 chandransh 1962
  }
1963
 
4496 mandeep.dh 1964
  public static class createSerializedInventoryItem_result implements org.apache.thrift.TBase<createSerializedInventoryItem_result, createSerializedInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
1965
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItem_result");
2820 chandransh 1966
 
4555 mandeep.dh 1967
    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 1968
    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 1969
 
4555 mandeep.dh 1970
    private InventoryItem success; // required
3430 rajveer 1971
    private WarehouseServiceException wex; // required
2820 chandransh 1972
 
1973
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 1974
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2820 chandransh 1975
      SUCCESS((short)0, "success"),
1976
      WEX((short)1, "wex");
1977
 
1978
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1979
 
1980
      static {
1981
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1982
          byName.put(field.getFieldName(), field);
1983
        }
1984
      }
1985
 
1986
      /**
1987
       * Find the _Fields constant that matches fieldId, or null if its not found.
1988
       */
1989
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 1990
        switch(fieldId) {
1991
          case 0: // SUCCESS
1992
            return SUCCESS;
1993
          case 1: // WEX
1994
            return WEX;
1995
          default:
1996
            return null;
1997
        }
2820 chandransh 1998
      }
1999
 
2000
      /**
2001
       * Find the _Fields constant that matches fieldId, throwing an exception
2002
       * if it is not found.
2003
       */
2004
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2005
        _Fields fields = findByThriftId(fieldId);
2006
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2007
        return fields;
2008
      }
2009
 
2010
      /**
2011
       * Find the _Fields constant that matches name, or null if its not found.
2012
       */
2013
      public static _Fields findByName(String name) {
2014
        return byName.get(name);
2015
      }
2016
 
2017
      private final short _thriftId;
2018
      private final String _fieldName;
2019
 
2020
      _Fields(short thriftId, String fieldName) {
2021
        _thriftId = thriftId;
2022
        _fieldName = fieldName;
2023
      }
2024
 
2025
      public short getThriftFieldId() {
2026
        return _thriftId;
2027
      }
2028
 
2029
      public String getFieldName() {
2030
        return _fieldName;
2031
      }
2032
    }
2033
 
2034
    // isset id assignments
2035
 
3430 rajveer 2036
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 2037
    static {
3430 rajveer 2038
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2039
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 2040
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 2041
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2042
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2043
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 2044
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSerializedInventoryItem_result.class, metaDataMap);
2820 chandransh 2045
    }
2046
 
4496 mandeep.dh 2047
    public createSerializedInventoryItem_result() {
2820 chandransh 2048
    }
2049
 
4496 mandeep.dh 2050
    public createSerializedInventoryItem_result(
4555 mandeep.dh 2051
      InventoryItem success,
2820 chandransh 2052
      WarehouseServiceException wex)
2053
    {
2054
      this();
2055
      this.success = success;
2056
      this.wex = wex;
2057
    }
2058
 
2059
    /**
2060
     * Performs a deep copy on <i>other</i>.
2061
     */
4496 mandeep.dh 2062
    public createSerializedInventoryItem_result(createSerializedInventoryItem_result other) {
4555 mandeep.dh 2063
      if (other.isSetSuccess()) {
2064
        this.success = new InventoryItem(other.success);
2065
      }
2820 chandransh 2066
      if (other.isSetWex()) {
2067
        this.wex = new WarehouseServiceException(other.wex);
2068
      }
2069
    }
2070
 
4496 mandeep.dh 2071
    public createSerializedInventoryItem_result deepCopy() {
2072
      return new createSerializedInventoryItem_result(this);
2820 chandransh 2073
    }
2074
 
3430 rajveer 2075
    @Override
2076
    public void clear() {
4555 mandeep.dh 2077
      this.success = null;
3430 rajveer 2078
      this.wex = null;
2820 chandransh 2079
    }
2080
 
4555 mandeep.dh 2081
    public InventoryItem getSuccess() {
2820 chandransh 2082
      return this.success;
2083
    }
2084
 
4555 mandeep.dh 2085
    public void setSuccess(InventoryItem success) {
2820 chandransh 2086
      this.success = success;
2087
    }
2088
 
2089
    public void unsetSuccess() {
4555 mandeep.dh 2090
      this.success = null;
2820 chandransh 2091
    }
2092
 
3430 rajveer 2093
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2820 chandransh 2094
    public boolean isSetSuccess() {
4555 mandeep.dh 2095
      return this.success != null;
2820 chandransh 2096
    }
2097
 
2098
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 2099
      if (!value) {
2100
        this.success = null;
2101
      }
2820 chandransh 2102
    }
2103
 
2104
    public WarehouseServiceException getWex() {
2105
      return this.wex;
2106
    }
2107
 
3430 rajveer 2108
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 2109
      this.wex = wex;
2110
    }
2111
 
2112
    public void unsetWex() {
2113
      this.wex = null;
2114
    }
2115
 
3430 rajveer 2116
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 2117
    public boolean isSetWex() {
2118
      return this.wex != null;
2119
    }
2120
 
2121
    public void setWexIsSet(boolean value) {
2122
      if (!value) {
2123
        this.wex = null;
2124
      }
2125
    }
2126
 
2127
    public void setFieldValue(_Fields field, Object value) {
2128
      switch (field) {
2129
      case SUCCESS:
2130
        if (value == null) {
2131
          unsetSuccess();
2132
        } else {
4555 mandeep.dh 2133
          setSuccess((InventoryItem)value);
2820 chandransh 2134
        }
2135
        break;
2136
 
2137
      case WEX:
2138
        if (value == null) {
2139
          unsetWex();
2140
        } else {
2141
          setWex((WarehouseServiceException)value);
2142
        }
2143
        break;
2144
 
2145
      }
2146
    }
2147
 
2148
    public Object getFieldValue(_Fields field) {
2149
      switch (field) {
2150
      case SUCCESS:
4555 mandeep.dh 2151
        return getSuccess();
2820 chandransh 2152
 
2153
      case WEX:
2154
        return getWex();
2155
 
2156
      }
2157
      throw new IllegalStateException();
2158
    }
2159
 
3430 rajveer 2160
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2161
    public boolean isSet(_Fields field) {
2162
      if (field == null) {
2163
        throw new IllegalArgumentException();
2164
      }
2820 chandransh 2165
 
2166
      switch (field) {
2167
      case SUCCESS:
2168
        return isSetSuccess();
2169
      case WEX:
2170
        return isSetWex();
2171
      }
2172
      throw new IllegalStateException();
2173
    }
2174
 
2175
    @Override
2176
    public boolean equals(Object that) {
2177
      if (that == null)
2178
        return false;
4496 mandeep.dh 2179
      if (that instanceof createSerializedInventoryItem_result)
2180
        return this.equals((createSerializedInventoryItem_result)that);
2820 chandransh 2181
      return false;
2182
    }
2183
 
4496 mandeep.dh 2184
    public boolean equals(createSerializedInventoryItem_result that) {
2820 chandransh 2185
      if (that == null)
2186
        return false;
2187
 
4555 mandeep.dh 2188
      boolean this_present_success = true && this.isSetSuccess();
2189
      boolean that_present_success = true && that.isSetSuccess();
2820 chandransh 2190
      if (this_present_success || that_present_success) {
2191
        if (!(this_present_success && that_present_success))
2192
          return false;
4555 mandeep.dh 2193
        if (!this.success.equals(that.success))
2820 chandransh 2194
          return false;
2195
      }
2196
 
2197
      boolean this_present_wex = true && this.isSetWex();
2198
      boolean that_present_wex = true && that.isSetWex();
2199
      if (this_present_wex || that_present_wex) {
2200
        if (!(this_present_wex && that_present_wex))
2201
          return false;
2202
        if (!this.wex.equals(that.wex))
2203
          return false;
2204
      }
2205
 
2206
      return true;
2207
    }
2208
 
2209
    @Override
2210
    public int hashCode() {
2211
      return 0;
2212
    }
2213
 
4496 mandeep.dh 2214
    public int compareTo(createSerializedInventoryItem_result other) {
2820 chandransh 2215
      if (!getClass().equals(other.getClass())) {
2216
        return getClass().getName().compareTo(other.getClass().getName());
2217
      }
2218
 
2219
      int lastComparison = 0;
4496 mandeep.dh 2220
      createSerializedInventoryItem_result typedOther = (createSerializedInventoryItem_result)other;
2820 chandransh 2221
 
3430 rajveer 2222
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2820 chandransh 2223
      if (lastComparison != 0) {
2224
        return lastComparison;
2225
      }
3430 rajveer 2226
      if (isSetSuccess()) {
2227
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2228
        if (lastComparison != 0) {
2229
          return lastComparison;
2230
        }
2820 chandransh 2231
      }
3430 rajveer 2232
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 2233
      if (lastComparison != 0) {
2234
        return lastComparison;
2235
      }
3430 rajveer 2236
      if (isSetWex()) {
2237
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
2238
        if (lastComparison != 0) {
2239
          return lastComparison;
2240
        }
2820 chandransh 2241
      }
2242
      return 0;
2243
    }
2244
 
3430 rajveer 2245
    public _Fields fieldForId(int fieldId) {
2246
      return _Fields.findByThriftId(fieldId);
2247
    }
2248
 
2249
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2250
      org.apache.thrift.protocol.TField field;
2820 chandransh 2251
      iprot.readStructBegin();
2252
      while (true)
2253
      {
2254
        field = iprot.readFieldBegin();
3430 rajveer 2255
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 2256
          break;
2257
        }
3430 rajveer 2258
        switch (field.id) {
2259
          case 0: // SUCCESS
4555 mandeep.dh 2260
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2261
              this.success = new InventoryItem();
2262
              this.success.read(iprot);
3430 rajveer 2263
            } else { 
2264
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2265
            }
2266
            break;
2267
          case 1: // WEX
2268
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2269
              this.wex = new WarehouseServiceException();
2270
              this.wex.read(iprot);
2271
            } else { 
2272
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2273
            }
2274
            break;
2275
          default:
2276
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 2277
        }
3430 rajveer 2278
        iprot.readFieldEnd();
2820 chandransh 2279
      }
2280
      iprot.readStructEnd();
2281
      validate();
2282
    }
2283
 
3430 rajveer 2284
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 2285
      oprot.writeStructBegin(STRUCT_DESC);
2286
 
2287
      if (this.isSetSuccess()) {
2288
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 2289
        this.success.write(oprot);
2820 chandransh 2290
        oprot.writeFieldEnd();
2291
      } else if (this.isSetWex()) {
2292
        oprot.writeFieldBegin(WEX_FIELD_DESC);
2293
        this.wex.write(oprot);
2294
        oprot.writeFieldEnd();
2295
      }
2296
      oprot.writeFieldStop();
2297
      oprot.writeStructEnd();
2298
    }
2299
 
2300
    @Override
2301
    public String toString() {
4496 mandeep.dh 2302
      StringBuilder sb = new StringBuilder("createSerializedInventoryItem_result(");
2820 chandransh 2303
      boolean first = true;
2304
 
2305
      sb.append("success:");
4555 mandeep.dh 2306
      if (this.success == null) {
2307
        sb.append("null");
2308
      } else {
2309
        sb.append(this.success);
2310
      }
2820 chandransh 2311
      first = false;
2312
      if (!first) sb.append(", ");
2313
      sb.append("wex:");
2314
      if (this.wex == null) {
2315
        sb.append("null");
2316
      } else {
2317
        sb.append(this.wex);
2318
      }
2319
      first = false;
2320
      sb.append(")");
2321
      return sb.toString();
2322
    }
2323
 
3430 rajveer 2324
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 2325
      // check for required fields
2326
    }
2327
 
3430 rajveer 2328
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2329
      try {
2330
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2331
      } catch (org.apache.thrift.TException te) {
2332
        throw new java.io.IOException(te);
2333
      }
2334
    }
2335
 
2336
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2337
      try {
2338
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2339
      } catch (org.apache.thrift.TException te) {
2340
        throw new java.io.IOException(te);
2341
      }
2342
    }
2343
 
2820 chandransh 2344
  }
2345
 
4496 mandeep.dh 2346
  public static class createSerializedInventoryItemFromItemNumber_args implements org.apache.thrift.TBase<createSerializedInventoryItemFromItemNumber_args, createSerializedInventoryItemFromItemNumber_args._Fields>, java.io.Serializable, Cloneable   {
2347
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItemFromItemNumber_args");
2820 chandransh 2348
 
4496 mandeep.dh 2349
    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);
2350
    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);
2351
    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 2352
 
4496 mandeep.dh 2353
    private String itemNumber; // required
2354
    private String serialNumber; // required
2355
    private long purchaseId; // required
2820 chandransh 2356
 
2357
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2358
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 2359
      ITEM_NUMBER((short)1, "itemNumber"),
2360
      SERIAL_NUMBER((short)2, "serialNumber"),
2361
      PURCHASE_ID((short)3, "purchaseId");
2820 chandransh 2362
 
2363
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2364
 
2365
      static {
2366
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2367
          byName.put(field.getFieldName(), field);
2368
        }
2369
      }
2370
 
2371
      /**
2372
       * Find the _Fields constant that matches fieldId, or null if its not found.
2373
       */
2374
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2375
        switch(fieldId) {
4496 mandeep.dh 2376
          case 1: // ITEM_NUMBER
2377
            return ITEM_NUMBER;
2378
          case 2: // SERIAL_NUMBER
2379
            return SERIAL_NUMBER;
2380
          case 3: // PURCHASE_ID
2381
            return PURCHASE_ID;
3430 rajveer 2382
          default:
2383
            return null;
2384
        }
2820 chandransh 2385
      }
2386
 
2387
      /**
2388
       * Find the _Fields constant that matches fieldId, throwing an exception
2389
       * if it is not found.
2390
       */
2391
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2392
        _Fields fields = findByThriftId(fieldId);
2393
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2394
        return fields;
2395
      }
2396
 
2397
      /**
2398
       * Find the _Fields constant that matches name, or null if its not found.
2399
       */
2400
      public static _Fields findByName(String name) {
2401
        return byName.get(name);
2402
      }
2403
 
2404
      private final short _thriftId;
2405
      private final String _fieldName;
2406
 
2407
      _Fields(short thriftId, String fieldName) {
2408
        _thriftId = thriftId;
2409
        _fieldName = fieldName;
2410
      }
2411
 
2412
      public short getThriftFieldId() {
2413
        return _thriftId;
2414
      }
2415
 
2416
      public String getFieldName() {
2417
        return _fieldName;
2418
      }
2419
    }
2420
 
2421
    // isset id assignments
4496 mandeep.dh 2422
    private static final int __PURCHASEID_ISSET_ID = 0;
2820 chandransh 2423
    private BitSet __isset_bit_vector = new BitSet(1);
2424
 
3430 rajveer 2425
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 2426
    static {
3430 rajveer 2427
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 2428
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2429
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
2430
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2431
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
2432
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3430 rajveer 2433
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2434
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 2435
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSerializedInventoryItemFromItemNumber_args.class, metaDataMap);
2820 chandransh 2436
    }
2437
 
4496 mandeep.dh 2438
    public createSerializedInventoryItemFromItemNumber_args() {
2820 chandransh 2439
    }
2440
 
4496 mandeep.dh 2441
    public createSerializedInventoryItemFromItemNumber_args(
2442
      String itemNumber,
2443
      String serialNumber,
2444
      long purchaseId)
2820 chandransh 2445
    {
2446
      this();
4496 mandeep.dh 2447
      this.itemNumber = itemNumber;
2448
      this.serialNumber = serialNumber;
2449
      this.purchaseId = purchaseId;
2450
      setPurchaseIdIsSet(true);
2820 chandransh 2451
    }
2452
 
2453
    /**
2454
     * Performs a deep copy on <i>other</i>.
2455
     */
4496 mandeep.dh 2456
    public createSerializedInventoryItemFromItemNumber_args(createSerializedInventoryItemFromItemNumber_args other) {
2820 chandransh 2457
      __isset_bit_vector.clear();
2458
      __isset_bit_vector.or(other.__isset_bit_vector);
4496 mandeep.dh 2459
      if (other.isSetItemNumber()) {
2460
        this.itemNumber = other.itemNumber;
2461
      }
2462
      if (other.isSetSerialNumber()) {
2463
        this.serialNumber = other.serialNumber;
2464
      }
2465
      this.purchaseId = other.purchaseId;
2820 chandransh 2466
    }
2467
 
4496 mandeep.dh 2468
    public createSerializedInventoryItemFromItemNumber_args deepCopy() {
2469
      return new createSerializedInventoryItemFromItemNumber_args(this);
2820 chandransh 2470
    }
2471
 
3430 rajveer 2472
    @Override
2473
    public void clear() {
4496 mandeep.dh 2474
      this.itemNumber = null;
2475
      this.serialNumber = null;
2476
      setPurchaseIdIsSet(false);
2477
      this.purchaseId = 0;
2820 chandransh 2478
    }
2479
 
4496 mandeep.dh 2480
    public String getItemNumber() {
2481
      return this.itemNumber;
2820 chandransh 2482
    }
2483
 
4496 mandeep.dh 2484
    public void setItemNumber(String itemNumber) {
2485
      this.itemNumber = itemNumber;
2820 chandransh 2486
    }
2487
 
4496 mandeep.dh 2488
    public void unsetItemNumber() {
2489
      this.itemNumber = null;
2820 chandransh 2490
    }
2491
 
4496 mandeep.dh 2492
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
2493
    public boolean isSetItemNumber() {
2494
      return this.itemNumber != null;
2820 chandransh 2495
    }
2496
 
4496 mandeep.dh 2497
    public void setItemNumberIsSet(boolean value) {
2498
      if (!value) {
2499
        this.itemNumber = null;
2500
      }
2820 chandransh 2501
    }
2502
 
4496 mandeep.dh 2503
    public String getSerialNumber() {
2504
      return this.serialNumber;
2505
    }
2506
 
2507
    public void setSerialNumber(String serialNumber) {
2508
      this.serialNumber = serialNumber;
2509
    }
2510
 
2511
    public void unsetSerialNumber() {
2512
      this.serialNumber = null;
2513
    }
2514
 
2515
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
2516
    public boolean isSetSerialNumber() {
2517
      return this.serialNumber != null;
2518
    }
2519
 
2520
    public void setSerialNumberIsSet(boolean value) {
2521
      if (!value) {
2522
        this.serialNumber = null;
2523
      }
2524
    }
2525
 
2526
    public long getPurchaseId() {
2527
      return this.purchaseId;
2528
    }
2529
 
2530
    public void setPurchaseId(long purchaseId) {
2531
      this.purchaseId = purchaseId;
2532
      setPurchaseIdIsSet(true);
2533
    }
2534
 
2535
    public void unsetPurchaseId() {
2536
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
2537
    }
2538
 
2539
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
2540
    public boolean isSetPurchaseId() {
2541
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
2542
    }
2543
 
2544
    public void setPurchaseIdIsSet(boolean value) {
2545
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
2546
    }
2547
 
2820 chandransh 2548
    public void setFieldValue(_Fields field, Object value) {
2549
      switch (field) {
4496 mandeep.dh 2550
      case ITEM_NUMBER:
2820 chandransh 2551
        if (value == null) {
4496 mandeep.dh 2552
          unsetItemNumber();
2820 chandransh 2553
        } else {
4496 mandeep.dh 2554
          setItemNumber((String)value);
2820 chandransh 2555
        }
2556
        break;
2557
 
4496 mandeep.dh 2558
      case SERIAL_NUMBER:
2559
        if (value == null) {
2560
          unsetSerialNumber();
2561
        } else {
2562
          setSerialNumber((String)value);
2563
        }
2564
        break;
2565
 
2566
      case PURCHASE_ID:
2567
        if (value == null) {
2568
          unsetPurchaseId();
2569
        } else {
2570
          setPurchaseId((Long)value);
2571
        }
2572
        break;
2573
 
2820 chandransh 2574
      }
2575
    }
2576
 
2577
    public Object getFieldValue(_Fields field) {
2578
      switch (field) {
4496 mandeep.dh 2579
      case ITEM_NUMBER:
2580
        return getItemNumber();
2820 chandransh 2581
 
4496 mandeep.dh 2582
      case SERIAL_NUMBER:
2583
        return getSerialNumber();
2584
 
2585
      case PURCHASE_ID:
2586
        return Long.valueOf(getPurchaseId());
2587
 
2820 chandransh 2588
      }
2589
      throw new IllegalStateException();
2590
    }
2591
 
3430 rajveer 2592
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2593
    public boolean isSet(_Fields field) {
2594
      if (field == null) {
2595
        throw new IllegalArgumentException();
2596
      }
2820 chandransh 2597
 
2598
      switch (field) {
4496 mandeep.dh 2599
      case ITEM_NUMBER:
2600
        return isSetItemNumber();
2601
      case SERIAL_NUMBER:
2602
        return isSetSerialNumber();
2603
      case PURCHASE_ID:
2604
        return isSetPurchaseId();
2820 chandransh 2605
      }
2606
      throw new IllegalStateException();
2607
    }
2608
 
2609
    @Override
2610
    public boolean equals(Object that) {
2611
      if (that == null)
2612
        return false;
4496 mandeep.dh 2613
      if (that instanceof createSerializedInventoryItemFromItemNumber_args)
2614
        return this.equals((createSerializedInventoryItemFromItemNumber_args)that);
2820 chandransh 2615
      return false;
2616
    }
2617
 
4496 mandeep.dh 2618
    public boolean equals(createSerializedInventoryItemFromItemNumber_args that) {
2820 chandransh 2619
      if (that == null)
2620
        return false;
2621
 
4496 mandeep.dh 2622
      boolean this_present_itemNumber = true && this.isSetItemNumber();
2623
      boolean that_present_itemNumber = true && that.isSetItemNumber();
2624
      if (this_present_itemNumber || that_present_itemNumber) {
2625
        if (!(this_present_itemNumber && that_present_itemNumber))
2820 chandransh 2626
          return false;
4496 mandeep.dh 2627
        if (!this.itemNumber.equals(that.itemNumber))
2820 chandransh 2628
          return false;
2629
      }
2630
 
4496 mandeep.dh 2631
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
2632
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
2633
      if (this_present_serialNumber || that_present_serialNumber) {
2634
        if (!(this_present_serialNumber && that_present_serialNumber))
2635
          return false;
2636
        if (!this.serialNumber.equals(that.serialNumber))
2637
          return false;
2638
      }
2639
 
2640
      boolean this_present_purchaseId = true;
2641
      boolean that_present_purchaseId = true;
2642
      if (this_present_purchaseId || that_present_purchaseId) {
2643
        if (!(this_present_purchaseId && that_present_purchaseId))
2644
          return false;
2645
        if (this.purchaseId != that.purchaseId)
2646
          return false;
2647
      }
2648
 
2820 chandransh 2649
      return true;
2650
    }
2651
 
2652
    @Override
2653
    public int hashCode() {
2654
      return 0;
2655
    }
2656
 
4496 mandeep.dh 2657
    public int compareTo(createSerializedInventoryItemFromItemNumber_args other) {
2820 chandransh 2658
      if (!getClass().equals(other.getClass())) {
2659
        return getClass().getName().compareTo(other.getClass().getName());
2660
      }
2661
 
2662
      int lastComparison = 0;
4496 mandeep.dh 2663
      createSerializedInventoryItemFromItemNumber_args typedOther = (createSerializedInventoryItemFromItemNumber_args)other;
2820 chandransh 2664
 
4496 mandeep.dh 2665
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
2820 chandransh 2666
      if (lastComparison != 0) {
2667
        return lastComparison;
2668
      }
4496 mandeep.dh 2669
      if (isSetItemNumber()) {
2670
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
3430 rajveer 2671
        if (lastComparison != 0) {
2672
          return lastComparison;
2673
        }
2820 chandransh 2674
      }
4496 mandeep.dh 2675
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2676
      if (lastComparison != 0) {
2677
        return lastComparison;
2678
      }
2679
      if (isSetSerialNumber()) {
2680
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
2681
        if (lastComparison != 0) {
2682
          return lastComparison;
2683
        }
2684
      }
2685
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
2686
      if (lastComparison != 0) {
2687
        return lastComparison;
2688
      }
2689
      if (isSetPurchaseId()) {
2690
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
2691
        if (lastComparison != 0) {
2692
          return lastComparison;
2693
        }
2694
      }
2820 chandransh 2695
      return 0;
2696
    }
2697
 
3430 rajveer 2698
    public _Fields fieldForId(int fieldId) {
2699
      return _Fields.findByThriftId(fieldId);
2700
    }
2701
 
2702
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2703
      org.apache.thrift.protocol.TField field;
2820 chandransh 2704
      iprot.readStructBegin();
2705
      while (true)
2706
      {
2707
        field = iprot.readFieldBegin();
3430 rajveer 2708
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 2709
          break;
2710
        }
3430 rajveer 2711
        switch (field.id) {
4496 mandeep.dh 2712
          case 1: // ITEM_NUMBER
2713
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
2714
              this.itemNumber = iprot.readString();
2715
            } else { 
2716
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2717
            }
2718
            break;
2719
          case 2: // SERIAL_NUMBER
2720
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
2721
              this.serialNumber = iprot.readString();
2722
            } else { 
2723
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2724
            }
2725
            break;
2726
          case 3: // PURCHASE_ID
3430 rajveer 2727
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4496 mandeep.dh 2728
              this.purchaseId = iprot.readI64();
2729
              setPurchaseIdIsSet(true);
3430 rajveer 2730
            } else { 
2731
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2732
            }
2733
            break;
2734
          default:
2735
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 2736
        }
3430 rajveer 2737
        iprot.readFieldEnd();
2820 chandransh 2738
      }
2739
      iprot.readStructEnd();
2740
      validate();
2741
    }
2742
 
3430 rajveer 2743
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 2744
      validate();
2745
 
2746
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 2747
      if (this.itemNumber != null) {
2748
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
2749
        oprot.writeString(this.itemNumber);
2750
        oprot.writeFieldEnd();
2751
      }
2752
      if (this.serialNumber != null) {
2753
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
2754
        oprot.writeString(this.serialNumber);
2755
        oprot.writeFieldEnd();
2756
      }
2757
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
2758
      oprot.writeI64(this.purchaseId);
2820 chandransh 2759
      oprot.writeFieldEnd();
2760
      oprot.writeFieldStop();
2761
      oprot.writeStructEnd();
2762
    }
2763
 
2764
    @Override
2765
    public String toString() {
4496 mandeep.dh 2766
      StringBuilder sb = new StringBuilder("createSerializedInventoryItemFromItemNumber_args(");
2820 chandransh 2767
      boolean first = true;
2768
 
4496 mandeep.dh 2769
      sb.append("itemNumber:");
2770
      if (this.itemNumber == null) {
2771
        sb.append("null");
2772
      } else {
2773
        sb.append(this.itemNumber);
2774
      }
2820 chandransh 2775
      first = false;
4496 mandeep.dh 2776
      if (!first) sb.append(", ");
2777
      sb.append("serialNumber:");
2778
      if (this.serialNumber == null) {
2779
        sb.append("null");
2780
      } else {
2781
        sb.append(this.serialNumber);
2782
      }
2783
      first = false;
2784
      if (!first) sb.append(", ");
2785
      sb.append("purchaseId:");
2786
      sb.append(this.purchaseId);
2787
      first = false;
2820 chandransh 2788
      sb.append(")");
2789
      return sb.toString();
2790
    }
2791
 
3430 rajveer 2792
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 2793
      // check for required fields
2794
    }
2795
 
3430 rajveer 2796
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2797
      try {
2798
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2799
      } catch (org.apache.thrift.TException te) {
2800
        throw new java.io.IOException(te);
2801
      }
2802
    }
2803
 
2804
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2805
      try {
4496 mandeep.dh 2806
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
2807
        __isset_bit_vector = new BitSet(1);
3430 rajveer 2808
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2809
      } catch (org.apache.thrift.TException te) {
2810
        throw new java.io.IOException(te);
2811
      }
2812
    }
2813
 
2820 chandransh 2814
  }
2815
 
4496 mandeep.dh 2816
  public static class createSerializedInventoryItemFromItemNumber_result implements org.apache.thrift.TBase<createSerializedInventoryItemFromItemNumber_result, createSerializedInventoryItemFromItemNumber_result._Fields>, java.io.Serializable, Cloneable   {
2817
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItemFromItemNumber_result");
2820 chandransh 2818
 
4555 mandeep.dh 2819
    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 2820
    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 2821
 
4555 mandeep.dh 2822
    private InventoryItem success; // required
3430 rajveer 2823
    private WarehouseServiceException wex; // required
2820 chandransh 2824
 
2825
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2826
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2820 chandransh 2827
      SUCCESS((short)0, "success"),
2828
      WEX((short)1, "wex");
2829
 
2830
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2831
 
2832
      static {
2833
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2834
          byName.put(field.getFieldName(), field);
2835
        }
2836
      }
2837
 
2838
      /**
2839
       * Find the _Fields constant that matches fieldId, or null if its not found.
2840
       */
2841
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2842
        switch(fieldId) {
2843
          case 0: // SUCCESS
2844
            return SUCCESS;
2845
          case 1: // WEX
2846
            return WEX;
2847
          default:
2848
            return null;
2849
        }
2820 chandransh 2850
      }
2851
 
2852
      /**
2853
       * Find the _Fields constant that matches fieldId, throwing an exception
2854
       * if it is not found.
2855
       */
2856
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2857
        _Fields fields = findByThriftId(fieldId);
2858
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2859
        return fields;
2860
      }
2861
 
2862
      /**
2863
       * Find the _Fields constant that matches name, or null if its not found.
2864
       */
2865
      public static _Fields findByName(String name) {
2866
        return byName.get(name);
2867
      }
2868
 
2869
      private final short _thriftId;
2870
      private final String _fieldName;
2871
 
2872
      _Fields(short thriftId, String fieldName) {
2873
        _thriftId = thriftId;
2874
        _fieldName = fieldName;
2875
      }
2876
 
2877
      public short getThriftFieldId() {
2878
        return _thriftId;
2879
      }
2880
 
2881
      public String getFieldName() {
2882
        return _fieldName;
2883
      }
2884
    }
2885
 
2886
    // isset id assignments
2887
 
3430 rajveer 2888
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 2889
    static {
3430 rajveer 2890
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2891
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 2892
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 2893
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2894
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2895
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 2896
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSerializedInventoryItemFromItemNumber_result.class, metaDataMap);
2820 chandransh 2897
    }
2898
 
4496 mandeep.dh 2899
    public createSerializedInventoryItemFromItemNumber_result() {
2820 chandransh 2900
    }
2901
 
4496 mandeep.dh 2902
    public createSerializedInventoryItemFromItemNumber_result(
4555 mandeep.dh 2903
      InventoryItem success,
2820 chandransh 2904
      WarehouseServiceException wex)
2905
    {
2906
      this();
2907
      this.success = success;
2908
      this.wex = wex;
2909
    }
2910
 
2911
    /**
2912
     * Performs a deep copy on <i>other</i>.
2913
     */
4496 mandeep.dh 2914
    public createSerializedInventoryItemFromItemNumber_result(createSerializedInventoryItemFromItemNumber_result other) {
4555 mandeep.dh 2915
      if (other.isSetSuccess()) {
2916
        this.success = new InventoryItem(other.success);
2917
      }
2820 chandransh 2918
      if (other.isSetWex()) {
2919
        this.wex = new WarehouseServiceException(other.wex);
2920
      }
2921
    }
2922
 
4496 mandeep.dh 2923
    public createSerializedInventoryItemFromItemNumber_result deepCopy() {
2924
      return new createSerializedInventoryItemFromItemNumber_result(this);
2820 chandransh 2925
    }
2926
 
3430 rajveer 2927
    @Override
2928
    public void clear() {
4555 mandeep.dh 2929
      this.success = null;
3430 rajveer 2930
      this.wex = null;
2820 chandransh 2931
    }
2932
 
4555 mandeep.dh 2933
    public InventoryItem getSuccess() {
2820 chandransh 2934
      return this.success;
2935
    }
2936
 
4555 mandeep.dh 2937
    public void setSuccess(InventoryItem success) {
2820 chandransh 2938
      this.success = success;
2939
    }
2940
 
2941
    public void unsetSuccess() {
4555 mandeep.dh 2942
      this.success = null;
2820 chandransh 2943
    }
2944
 
3430 rajveer 2945
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2820 chandransh 2946
    public boolean isSetSuccess() {
4555 mandeep.dh 2947
      return this.success != null;
2820 chandransh 2948
    }
2949
 
2950
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 2951
      if (!value) {
2952
        this.success = null;
2953
      }
2820 chandransh 2954
    }
2955
 
2956
    public WarehouseServiceException getWex() {
2957
      return this.wex;
2958
    }
2959
 
3430 rajveer 2960
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 2961
      this.wex = wex;
2962
    }
2963
 
2964
    public void unsetWex() {
2965
      this.wex = null;
2966
    }
2967
 
3430 rajveer 2968
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 2969
    public boolean isSetWex() {
2970
      return this.wex != null;
2971
    }
2972
 
2973
    public void setWexIsSet(boolean value) {
2974
      if (!value) {
2975
        this.wex = null;
2976
      }
2977
    }
2978
 
2979
    public void setFieldValue(_Fields field, Object value) {
2980
      switch (field) {
2981
      case SUCCESS:
2982
        if (value == null) {
2983
          unsetSuccess();
2984
        } else {
4555 mandeep.dh 2985
          setSuccess((InventoryItem)value);
2820 chandransh 2986
        }
2987
        break;
2988
 
2989
      case WEX:
2990
        if (value == null) {
2991
          unsetWex();
2992
        } else {
2993
          setWex((WarehouseServiceException)value);
2994
        }
2995
        break;
2996
 
2997
      }
2998
    }
2999
 
3000
    public Object getFieldValue(_Fields field) {
3001
      switch (field) {
3002
      case SUCCESS:
4555 mandeep.dh 3003
        return getSuccess();
2820 chandransh 3004
 
3005
      case WEX:
3006
        return getWex();
3007
 
3008
      }
3009
      throw new IllegalStateException();
3010
    }
3011
 
3430 rajveer 3012
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3013
    public boolean isSet(_Fields field) {
3014
      if (field == null) {
3015
        throw new IllegalArgumentException();
3016
      }
2820 chandransh 3017
 
3018
      switch (field) {
3019
      case SUCCESS:
3020
        return isSetSuccess();
3021
      case WEX:
3022
        return isSetWex();
3023
      }
3024
      throw new IllegalStateException();
3025
    }
3026
 
3027
    @Override
3028
    public boolean equals(Object that) {
3029
      if (that == null)
3030
        return false;
4496 mandeep.dh 3031
      if (that instanceof createSerializedInventoryItemFromItemNumber_result)
3032
        return this.equals((createSerializedInventoryItemFromItemNumber_result)that);
2820 chandransh 3033
      return false;
3034
    }
3035
 
4496 mandeep.dh 3036
    public boolean equals(createSerializedInventoryItemFromItemNumber_result that) {
2820 chandransh 3037
      if (that == null)
3038
        return false;
3039
 
4555 mandeep.dh 3040
      boolean this_present_success = true && this.isSetSuccess();
3041
      boolean that_present_success = true && that.isSetSuccess();
2820 chandransh 3042
      if (this_present_success || that_present_success) {
3043
        if (!(this_present_success && that_present_success))
3044
          return false;
4555 mandeep.dh 3045
        if (!this.success.equals(that.success))
2820 chandransh 3046
          return false;
3047
      }
3048
 
3049
      boolean this_present_wex = true && this.isSetWex();
3050
      boolean that_present_wex = true && that.isSetWex();
3051
      if (this_present_wex || that_present_wex) {
3052
        if (!(this_present_wex && that_present_wex))
3053
          return false;
3054
        if (!this.wex.equals(that.wex))
3055
          return false;
3056
      }
3057
 
3058
      return true;
3059
    }
3060
 
3061
    @Override
3062
    public int hashCode() {
3063
      return 0;
3064
    }
3065
 
4496 mandeep.dh 3066
    public int compareTo(createSerializedInventoryItemFromItemNumber_result other) {
2820 chandransh 3067
      if (!getClass().equals(other.getClass())) {
3068
        return getClass().getName().compareTo(other.getClass().getName());
3069
      }
3070
 
3071
      int lastComparison = 0;
4496 mandeep.dh 3072
      createSerializedInventoryItemFromItemNumber_result typedOther = (createSerializedInventoryItemFromItemNumber_result)other;
2820 chandransh 3073
 
3430 rajveer 3074
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2820 chandransh 3075
      if (lastComparison != 0) {
3076
        return lastComparison;
3077
      }
3430 rajveer 3078
      if (isSetSuccess()) {
3079
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3080
        if (lastComparison != 0) {
3081
          return lastComparison;
3082
        }
2820 chandransh 3083
      }
3430 rajveer 3084
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 3085
      if (lastComparison != 0) {
3086
        return lastComparison;
3087
      }
3430 rajveer 3088
      if (isSetWex()) {
3089
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3090
        if (lastComparison != 0) {
3091
          return lastComparison;
3092
        }
2820 chandransh 3093
      }
3094
      return 0;
3095
    }
3096
 
3430 rajveer 3097
    public _Fields fieldForId(int fieldId) {
3098
      return _Fields.findByThriftId(fieldId);
3099
    }
3100
 
3101
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3102
      org.apache.thrift.protocol.TField field;
2820 chandransh 3103
      iprot.readStructBegin();
3104
      while (true)
3105
      {
3106
        field = iprot.readFieldBegin();
3430 rajveer 3107
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 3108
          break;
3109
        }
3430 rajveer 3110
        switch (field.id) {
3111
          case 0: // SUCCESS
4555 mandeep.dh 3112
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3113
              this.success = new InventoryItem();
3114
              this.success.read(iprot);
3430 rajveer 3115
            } else { 
3116
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3117
            }
3118
            break;
3119
          case 1: // WEX
3120
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3121
              this.wex = new WarehouseServiceException();
3122
              this.wex.read(iprot);
3123
            } else { 
3124
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3125
            }
3126
            break;
3127
          default:
3128
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 3129
        }
3430 rajveer 3130
        iprot.readFieldEnd();
2820 chandransh 3131
      }
3132
      iprot.readStructEnd();
3133
      validate();
3134
    }
3135
 
3430 rajveer 3136
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 3137
      oprot.writeStructBegin(STRUCT_DESC);
3138
 
3139
      if (this.isSetSuccess()) {
3140
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 3141
        this.success.write(oprot);
2820 chandransh 3142
        oprot.writeFieldEnd();
3143
      } else if (this.isSetWex()) {
3144
        oprot.writeFieldBegin(WEX_FIELD_DESC);
3145
        this.wex.write(oprot);
3146
        oprot.writeFieldEnd();
3147
      }
3148
      oprot.writeFieldStop();
3149
      oprot.writeStructEnd();
3150
    }
3151
 
3152
    @Override
3153
    public String toString() {
4496 mandeep.dh 3154
      StringBuilder sb = new StringBuilder("createSerializedInventoryItemFromItemNumber_result(");
2820 chandransh 3155
      boolean first = true;
3156
 
3157
      sb.append("success:");
4555 mandeep.dh 3158
      if (this.success == null) {
3159
        sb.append("null");
3160
      } else {
3161
        sb.append(this.success);
3162
      }
2820 chandransh 3163
      first = false;
3164
      if (!first) sb.append(", ");
3165
      sb.append("wex:");
3166
      if (this.wex == null) {
3167
        sb.append("null");
3168
      } else {
3169
        sb.append(this.wex);
3170
      }
3171
      first = false;
3172
      sb.append(")");
3173
      return sb.toString();
3174
    }
3175
 
3430 rajveer 3176
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 3177
      // check for required fields
3178
    }
3179
 
3430 rajveer 3180
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3181
      try {
3182
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3183
      } catch (org.apache.thrift.TException te) {
3184
        throw new java.io.IOException(te);
3185
      }
3186
    }
3187
 
3188
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3189
      try {
3190
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3191
      } catch (org.apache.thrift.TException te) {
3192
        throw new java.io.IOException(te);
3193
      }
3194
    }
3195
 
2820 chandransh 3196
  }
3197
 
4496 mandeep.dh 3198
  public static class createInventoryItem_args implements org.apache.thrift.TBase<createInventoryItem_args, createInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
3199
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInventoryItem_args");
3383 chandransh 3200
 
4496 mandeep.dh 3201
    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);
3202
    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);
3203
    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 3204
 
4496 mandeep.dh 3205
    private long itemId; // required
3206
    private long quantity; // required
3207
    private long purchaseId; // required
3383 chandransh 3208
 
3209
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3210
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 3211
      ITEM_ID((short)1, "itemId"),
3212
      QUANTITY((short)2, "quantity"),
3213
      PURCHASE_ID((short)3, "purchaseId");
3383 chandransh 3214
 
3215
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3216
 
3217
      static {
3218
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3219
          byName.put(field.getFieldName(), field);
3220
        }
3221
      }
3222
 
3223
      /**
3224
       * Find the _Fields constant that matches fieldId, or null if its not found.
3225
       */
3226
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3227
        switch(fieldId) {
4496 mandeep.dh 3228
          case 1: // ITEM_ID
3229
            return ITEM_ID;
3230
          case 2: // QUANTITY
3231
            return QUANTITY;
3232
          case 3: // PURCHASE_ID
3233
            return PURCHASE_ID;
3430 rajveer 3234
          default:
3235
            return null;
3236
        }
3383 chandransh 3237
      }
3238
 
3239
      /**
3240
       * Find the _Fields constant that matches fieldId, throwing an exception
3241
       * if it is not found.
3242
       */
3243
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3244
        _Fields fields = findByThriftId(fieldId);
3245
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3246
        return fields;
3247
      }
3248
 
3249
      /**
3250
       * Find the _Fields constant that matches name, or null if its not found.
3251
       */
3252
      public static _Fields findByName(String name) {
3253
        return byName.get(name);
3254
      }
3255
 
3256
      private final short _thriftId;
3257
      private final String _fieldName;
3258
 
3259
      _Fields(short thriftId, String fieldName) {
3260
        _thriftId = thriftId;
3261
        _fieldName = fieldName;
3262
      }
3263
 
3264
      public short getThriftFieldId() {
3265
        return _thriftId;
3266
      }
3267
 
3268
      public String getFieldName() {
3269
        return _fieldName;
3270
      }
3271
    }
3272
 
3273
    // isset id assignments
4496 mandeep.dh 3274
    private static final int __ITEMID_ISSET_ID = 0;
3275
    private static final int __QUANTITY_ISSET_ID = 1;
3276
    private static final int __PURCHASEID_ISSET_ID = 2;
3277
    private BitSet __isset_bit_vector = new BitSet(3);
3383 chandransh 3278
 
3430 rajveer 3279
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 3280
    static {
3430 rajveer 3281
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 3282
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3283
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3284
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3285
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3286
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3287
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 3288
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 3289
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInventoryItem_args.class, metaDataMap);
3383 chandransh 3290
    }
3291
 
4496 mandeep.dh 3292
    public createInventoryItem_args() {
3383 chandransh 3293
    }
3294
 
4496 mandeep.dh 3295
    public createInventoryItem_args(
3296
      long itemId,
3297
      long quantity,
3298
      long purchaseId)
3383 chandransh 3299
    {
3300
      this();
4496 mandeep.dh 3301
      this.itemId = itemId;
3302
      setItemIdIsSet(true);
3303
      this.quantity = quantity;
3304
      setQuantityIsSet(true);
3305
      this.purchaseId = purchaseId;
3306
      setPurchaseIdIsSet(true);
3383 chandransh 3307
    }
3308
 
3309
    /**
3310
     * Performs a deep copy on <i>other</i>.
3311
     */
4496 mandeep.dh 3312
    public createInventoryItem_args(createInventoryItem_args other) {
3313
      __isset_bit_vector.clear();
3314
      __isset_bit_vector.or(other.__isset_bit_vector);
3315
      this.itemId = other.itemId;
3316
      this.quantity = other.quantity;
3317
      this.purchaseId = other.purchaseId;
3383 chandransh 3318
    }
3319
 
4496 mandeep.dh 3320
    public createInventoryItem_args deepCopy() {
3321
      return new createInventoryItem_args(this);
3383 chandransh 3322
    }
3323
 
3430 rajveer 3324
    @Override
3325
    public void clear() {
4496 mandeep.dh 3326
      setItemIdIsSet(false);
3327
      this.itemId = 0;
3328
      setQuantityIsSet(false);
3329
      this.quantity = 0;
3330
      setPurchaseIdIsSet(false);
3331
      this.purchaseId = 0;
3383 chandransh 3332
    }
3333
 
4496 mandeep.dh 3334
    public long getItemId() {
3335
      return this.itemId;
3383 chandransh 3336
    }
3337
 
4496 mandeep.dh 3338
    public void setItemId(long itemId) {
3339
      this.itemId = itemId;
3340
      setItemIdIsSet(true);
3383 chandransh 3341
    }
3342
 
4496 mandeep.dh 3343
    public void unsetItemId() {
3344
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
3383 chandransh 3345
    }
3346
 
4496 mandeep.dh 3347
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
3348
    public boolean isSetItemId() {
3349
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
3383 chandransh 3350
    }
3351
 
4496 mandeep.dh 3352
    public void setItemIdIsSet(boolean value) {
3353
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
3383 chandransh 3354
    }
3355
 
4496 mandeep.dh 3356
    public long getQuantity() {
3357
      return this.quantity;
3358
    }
3359
 
3360
    public void setQuantity(long quantity) {
3361
      this.quantity = quantity;
3362
      setQuantityIsSet(true);
3363
    }
3364
 
3365
    public void unsetQuantity() {
3366
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
3367
    }
3368
 
3369
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
3370
    public boolean isSetQuantity() {
3371
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
3372
    }
3373
 
3374
    public void setQuantityIsSet(boolean value) {
3375
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
3376
    }
3377
 
3378
    public long getPurchaseId() {
3379
      return this.purchaseId;
3380
    }
3381
 
3382
    public void setPurchaseId(long purchaseId) {
3383
      this.purchaseId = purchaseId;
3384
      setPurchaseIdIsSet(true);
3385
    }
3386
 
3387
    public void unsetPurchaseId() {
3388
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
3389
    }
3390
 
3391
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
3392
    public boolean isSetPurchaseId() {
3393
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
3394
    }
3395
 
3396
    public void setPurchaseIdIsSet(boolean value) {
3397
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
3398
    }
3399
 
3383 chandransh 3400
    public void setFieldValue(_Fields field, Object value) {
3401
      switch (field) {
4496 mandeep.dh 3402
      case ITEM_ID:
3383 chandransh 3403
        if (value == null) {
4496 mandeep.dh 3404
          unsetItemId();
3383 chandransh 3405
        } else {
4496 mandeep.dh 3406
          setItemId((Long)value);
3383 chandransh 3407
        }
3408
        break;
3409
 
4496 mandeep.dh 3410
      case QUANTITY:
3411
        if (value == null) {
3412
          unsetQuantity();
3413
        } else {
3414
          setQuantity((Long)value);
3415
        }
3416
        break;
3417
 
3418
      case PURCHASE_ID:
3419
        if (value == null) {
3420
          unsetPurchaseId();
3421
        } else {
3422
          setPurchaseId((Long)value);
3423
        }
3424
        break;
3425
 
3383 chandransh 3426
      }
3427
    }
3428
 
3429
    public Object getFieldValue(_Fields field) {
3430
      switch (field) {
4496 mandeep.dh 3431
      case ITEM_ID:
3432
        return Long.valueOf(getItemId());
3383 chandransh 3433
 
4496 mandeep.dh 3434
      case QUANTITY:
3435
        return Long.valueOf(getQuantity());
3436
 
3437
      case PURCHASE_ID:
3438
        return Long.valueOf(getPurchaseId());
3439
 
3383 chandransh 3440
      }
3441
      throw new IllegalStateException();
3442
    }
3443
 
3430 rajveer 3444
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3445
    public boolean isSet(_Fields field) {
3446
      if (field == null) {
3447
        throw new IllegalArgumentException();
3448
      }
3383 chandransh 3449
 
3450
      switch (field) {
4496 mandeep.dh 3451
      case ITEM_ID:
3452
        return isSetItemId();
3453
      case QUANTITY:
3454
        return isSetQuantity();
3455
      case PURCHASE_ID:
3456
        return isSetPurchaseId();
3383 chandransh 3457
      }
3458
      throw new IllegalStateException();
3459
    }
3460
 
3461
    @Override
3462
    public boolean equals(Object that) {
3463
      if (that == null)
3464
        return false;
4496 mandeep.dh 3465
      if (that instanceof createInventoryItem_args)
3466
        return this.equals((createInventoryItem_args)that);
3383 chandransh 3467
      return false;
3468
    }
3469
 
4496 mandeep.dh 3470
    public boolean equals(createInventoryItem_args that) {
3383 chandransh 3471
      if (that == null)
3472
        return false;
3473
 
4496 mandeep.dh 3474
      boolean this_present_itemId = true;
3475
      boolean that_present_itemId = true;
3476
      if (this_present_itemId || that_present_itemId) {
3477
        if (!(this_present_itemId && that_present_itemId))
3383 chandransh 3478
          return false;
4496 mandeep.dh 3479
        if (this.itemId != that.itemId)
3383 chandransh 3480
          return false;
3481
      }
3482
 
4496 mandeep.dh 3483
      boolean this_present_quantity = true;
3484
      boolean that_present_quantity = true;
3485
      if (this_present_quantity || that_present_quantity) {
3486
        if (!(this_present_quantity && that_present_quantity))
3487
          return false;
3488
        if (this.quantity != that.quantity)
3489
          return false;
3490
      }
3491
 
3492
      boolean this_present_purchaseId = true;
3493
      boolean that_present_purchaseId = true;
3494
      if (this_present_purchaseId || that_present_purchaseId) {
3495
        if (!(this_present_purchaseId && that_present_purchaseId))
3496
          return false;
3497
        if (this.purchaseId != that.purchaseId)
3498
          return false;
3499
      }
3500
 
3383 chandransh 3501
      return true;
3502
    }
3503
 
3504
    @Override
3505
    public int hashCode() {
3506
      return 0;
3507
    }
3508
 
4496 mandeep.dh 3509
    public int compareTo(createInventoryItem_args other) {
3383 chandransh 3510
      if (!getClass().equals(other.getClass())) {
3511
        return getClass().getName().compareTo(other.getClass().getName());
3512
      }
3513
 
3514
      int lastComparison = 0;
4496 mandeep.dh 3515
      createInventoryItem_args typedOther = (createInventoryItem_args)other;
3383 chandransh 3516
 
4496 mandeep.dh 3517
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
3383 chandransh 3518
      if (lastComparison != 0) {
3519
        return lastComparison;
3520
      }
4496 mandeep.dh 3521
      if (isSetItemId()) {
3522
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
3430 rajveer 3523
        if (lastComparison != 0) {
3524
          return lastComparison;
3525
        }
3383 chandransh 3526
      }
4496 mandeep.dh 3527
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
3528
      if (lastComparison != 0) {
3529
        return lastComparison;
3530
      }
3531
      if (isSetQuantity()) {
3532
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
3533
        if (lastComparison != 0) {
3534
          return lastComparison;
3535
        }
3536
      }
3537
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
3538
      if (lastComparison != 0) {
3539
        return lastComparison;
3540
      }
3541
      if (isSetPurchaseId()) {
3542
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
3543
        if (lastComparison != 0) {
3544
          return lastComparison;
3545
        }
3546
      }
3383 chandransh 3547
      return 0;
3548
    }
3549
 
3430 rajveer 3550
    public _Fields fieldForId(int fieldId) {
3551
      return _Fields.findByThriftId(fieldId);
3552
    }
3553
 
3554
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3555
      org.apache.thrift.protocol.TField field;
3383 chandransh 3556
      iprot.readStructBegin();
3557
      while (true)
3558
      {
3559
        field = iprot.readFieldBegin();
3430 rajveer 3560
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 3561
          break;
3562
        }
3430 rajveer 3563
        switch (field.id) {
4496 mandeep.dh 3564
          case 1: // ITEM_ID
3565
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3566
              this.itemId = iprot.readI64();
3567
              setItemIdIsSet(true);
3430 rajveer 3568
            } else { 
3569
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3570
            }
3571
            break;
4496 mandeep.dh 3572
          case 2: // QUANTITY
3573
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3574
              this.quantity = iprot.readI64();
3575
              setQuantityIsSet(true);
3576
            } else { 
3577
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3578
            }
3579
            break;
3580
          case 3: // PURCHASE_ID
3581
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3582
              this.purchaseId = iprot.readI64();
3583
              setPurchaseIdIsSet(true);
3584
            } else { 
3585
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3586
            }
3587
            break;
3430 rajveer 3588
          default:
3589
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 3590
        }
3430 rajveer 3591
        iprot.readFieldEnd();
3383 chandransh 3592
      }
3593
      iprot.readStructEnd();
3594
      validate();
3595
    }
3596
 
3430 rajveer 3597
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 3598
      validate();
3599
 
3600
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 3601
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
3602
      oprot.writeI64(this.itemId);
3603
      oprot.writeFieldEnd();
3604
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
3605
      oprot.writeI64(this.quantity);
3606
      oprot.writeFieldEnd();
3607
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
3608
      oprot.writeI64(this.purchaseId);
3609
      oprot.writeFieldEnd();
3383 chandransh 3610
      oprot.writeFieldStop();
3611
      oprot.writeStructEnd();
3612
    }
3613
 
3614
    @Override
3615
    public String toString() {
4496 mandeep.dh 3616
      StringBuilder sb = new StringBuilder("createInventoryItem_args(");
3383 chandransh 3617
      boolean first = true;
3618
 
4496 mandeep.dh 3619
      sb.append("itemId:");
3620
      sb.append(this.itemId);
3383 chandransh 3621
      first = false;
4496 mandeep.dh 3622
      if (!first) sb.append(", ");
3623
      sb.append("quantity:");
3624
      sb.append(this.quantity);
3625
      first = false;
3626
      if (!first) sb.append(", ");
3627
      sb.append("purchaseId:");
3628
      sb.append(this.purchaseId);
3629
      first = false;
3383 chandransh 3630
      sb.append(")");
3631
      return sb.toString();
3632
    }
3633
 
3430 rajveer 3634
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 3635
      // check for required fields
3636
    }
3637
 
3430 rajveer 3638
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3639
      try {
3640
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3641
      } catch (org.apache.thrift.TException te) {
3642
        throw new java.io.IOException(te);
3643
      }
3644
    }
3645
 
3646
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3647
      try {
4496 mandeep.dh 3648
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
3649
        __isset_bit_vector = new BitSet(1);
3430 rajveer 3650
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3651
      } catch (org.apache.thrift.TException te) {
3652
        throw new java.io.IOException(te);
3653
      }
3654
    }
3655
 
3383 chandransh 3656
  }
3657
 
4496 mandeep.dh 3658
  public static class createInventoryItem_result implements org.apache.thrift.TBase<createInventoryItem_result, createInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
3659
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInventoryItem_result");
3383 chandransh 3660
 
4555 mandeep.dh 3661
    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 3662
    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 3663
 
4555 mandeep.dh 3664
    private InventoryItem success; // required
3430 rajveer 3665
    private WarehouseServiceException wex; // required
3383 chandransh 3666
 
3667
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3668
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3383 chandransh 3669
      SUCCESS((short)0, "success"),
3670
      WEX((short)1, "wex");
3671
 
3672
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3673
 
3674
      static {
3675
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3676
          byName.put(field.getFieldName(), field);
3677
        }
3678
      }
3679
 
3680
      /**
3681
       * Find the _Fields constant that matches fieldId, or null if its not found.
3682
       */
3683
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3684
        switch(fieldId) {
3685
          case 0: // SUCCESS
3686
            return SUCCESS;
3687
          case 1: // WEX
3688
            return WEX;
3689
          default:
3690
            return null;
3691
        }
3383 chandransh 3692
      }
3693
 
3694
      /**
3695
       * Find the _Fields constant that matches fieldId, throwing an exception
3696
       * if it is not found.
3697
       */
3698
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3699
        _Fields fields = findByThriftId(fieldId);
3700
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3701
        return fields;
3702
      }
3703
 
3704
      /**
3705
       * Find the _Fields constant that matches name, or null if its not found.
3706
       */
3707
      public static _Fields findByName(String name) {
3708
        return byName.get(name);
3709
      }
3710
 
3711
      private final short _thriftId;
3712
      private final String _fieldName;
3713
 
3714
      _Fields(short thriftId, String fieldName) {
3715
        _thriftId = thriftId;
3716
        _fieldName = fieldName;
3717
      }
3718
 
3719
      public short getThriftFieldId() {
3720
        return _thriftId;
3721
      }
3722
 
3723
      public String getFieldName() {
3724
        return _fieldName;
3725
      }
3726
    }
3727
 
3728
    // isset id assignments
3729
 
3430 rajveer 3730
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 3731
    static {
3430 rajveer 3732
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3733
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 3734
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 3735
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3736
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3737
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 3738
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInventoryItem_result.class, metaDataMap);
3383 chandransh 3739
    }
3740
 
4496 mandeep.dh 3741
    public createInventoryItem_result() {
3383 chandransh 3742
    }
3743
 
4496 mandeep.dh 3744
    public createInventoryItem_result(
4555 mandeep.dh 3745
      InventoryItem success,
3383 chandransh 3746
      WarehouseServiceException wex)
3747
    {
3748
      this();
3749
      this.success = success;
3750
      this.wex = wex;
3751
    }
3752
 
3753
    /**
3754
     * Performs a deep copy on <i>other</i>.
3755
     */
4496 mandeep.dh 3756
    public createInventoryItem_result(createInventoryItem_result other) {
4555 mandeep.dh 3757
      if (other.isSetSuccess()) {
3758
        this.success = new InventoryItem(other.success);
3759
      }
3383 chandransh 3760
      if (other.isSetWex()) {
3761
        this.wex = new WarehouseServiceException(other.wex);
3762
      }
3763
    }
3764
 
4496 mandeep.dh 3765
    public createInventoryItem_result deepCopy() {
3766
      return new createInventoryItem_result(this);
3383 chandransh 3767
    }
3768
 
3430 rajveer 3769
    @Override
3770
    public void clear() {
4555 mandeep.dh 3771
      this.success = null;
3430 rajveer 3772
      this.wex = null;
3383 chandransh 3773
    }
3774
 
4555 mandeep.dh 3775
    public InventoryItem getSuccess() {
3383 chandransh 3776
      return this.success;
3777
    }
3778
 
4555 mandeep.dh 3779
    public void setSuccess(InventoryItem success) {
3383 chandransh 3780
      this.success = success;
3781
    }
3782
 
3783
    public void unsetSuccess() {
4555 mandeep.dh 3784
      this.success = null;
3383 chandransh 3785
    }
3786
 
3430 rajveer 3787
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3383 chandransh 3788
    public boolean isSetSuccess() {
4555 mandeep.dh 3789
      return this.success != null;
3383 chandransh 3790
    }
3791
 
3792
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 3793
      if (!value) {
3794
        this.success = null;
3795
      }
3383 chandransh 3796
    }
3797
 
3798
    public WarehouseServiceException getWex() {
3799
      return this.wex;
3800
    }
3801
 
3430 rajveer 3802
    public void setWex(WarehouseServiceException wex) {
3383 chandransh 3803
      this.wex = wex;
3804
    }
3805
 
3806
    public void unsetWex() {
3807
      this.wex = null;
3808
    }
3809
 
3430 rajveer 3810
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3383 chandransh 3811
    public boolean isSetWex() {
3812
      return this.wex != null;
3813
    }
3814
 
3815
    public void setWexIsSet(boolean value) {
3816
      if (!value) {
3817
        this.wex = null;
3818
      }
3819
    }
3820
 
3821
    public void setFieldValue(_Fields field, Object value) {
3822
      switch (field) {
3823
      case SUCCESS:
3824
        if (value == null) {
3825
          unsetSuccess();
3826
        } else {
4555 mandeep.dh 3827
          setSuccess((InventoryItem)value);
3383 chandransh 3828
        }
3829
        break;
3830
 
3831
      case WEX:
3832
        if (value == null) {
3833
          unsetWex();
3834
        } else {
3835
          setWex((WarehouseServiceException)value);
3836
        }
3837
        break;
3838
 
3839
      }
3840
    }
3841
 
3842
    public Object getFieldValue(_Fields field) {
3843
      switch (field) {
3844
      case SUCCESS:
4555 mandeep.dh 3845
        return getSuccess();
3383 chandransh 3846
 
3847
      case WEX:
3848
        return getWex();
3849
 
3850
      }
3851
      throw new IllegalStateException();
3852
    }
3853
 
3430 rajveer 3854
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3855
    public boolean isSet(_Fields field) {
3856
      if (field == null) {
3857
        throw new IllegalArgumentException();
3858
      }
3383 chandransh 3859
 
3860
      switch (field) {
3861
      case SUCCESS:
3862
        return isSetSuccess();
3863
      case WEX:
3864
        return isSetWex();
3865
      }
3866
      throw new IllegalStateException();
3867
    }
3868
 
3869
    @Override
3870
    public boolean equals(Object that) {
3871
      if (that == null)
3872
        return false;
4496 mandeep.dh 3873
      if (that instanceof createInventoryItem_result)
3874
        return this.equals((createInventoryItem_result)that);
3383 chandransh 3875
      return false;
3876
    }
3877
 
4496 mandeep.dh 3878
    public boolean equals(createInventoryItem_result that) {
3383 chandransh 3879
      if (that == null)
3880
        return false;
3881
 
4555 mandeep.dh 3882
      boolean this_present_success = true && this.isSetSuccess();
3883
      boolean that_present_success = true && that.isSetSuccess();
3383 chandransh 3884
      if (this_present_success || that_present_success) {
3885
        if (!(this_present_success && that_present_success))
3886
          return false;
4555 mandeep.dh 3887
        if (!this.success.equals(that.success))
3383 chandransh 3888
          return false;
3889
      }
3890
 
3891
      boolean this_present_wex = true && this.isSetWex();
3892
      boolean that_present_wex = true && that.isSetWex();
3893
      if (this_present_wex || that_present_wex) {
3894
        if (!(this_present_wex && that_present_wex))
3895
          return false;
3896
        if (!this.wex.equals(that.wex))
3897
          return false;
3898
      }
3899
 
3900
      return true;
3901
    }
3902
 
3903
    @Override
3904
    public int hashCode() {
3905
      return 0;
3906
    }
3907
 
4496 mandeep.dh 3908
    public int compareTo(createInventoryItem_result other) {
3383 chandransh 3909
      if (!getClass().equals(other.getClass())) {
3910
        return getClass().getName().compareTo(other.getClass().getName());
3911
      }
3912
 
3913
      int lastComparison = 0;
4496 mandeep.dh 3914
      createInventoryItem_result typedOther = (createInventoryItem_result)other;
3383 chandransh 3915
 
3430 rajveer 3916
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3383 chandransh 3917
      if (lastComparison != 0) {
3918
        return lastComparison;
3919
      }
3430 rajveer 3920
      if (isSetSuccess()) {
3921
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3922
        if (lastComparison != 0) {
3923
          return lastComparison;
3924
        }
3383 chandransh 3925
      }
3430 rajveer 3926
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
3383 chandransh 3927
      if (lastComparison != 0) {
3928
        return lastComparison;
3929
      }
3430 rajveer 3930
      if (isSetWex()) {
3931
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3932
        if (lastComparison != 0) {
3933
          return lastComparison;
3934
        }
3383 chandransh 3935
      }
3936
      return 0;
3937
    }
3938
 
3430 rajveer 3939
    public _Fields fieldForId(int fieldId) {
3940
      return _Fields.findByThriftId(fieldId);
3941
    }
3942
 
3943
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3944
      org.apache.thrift.protocol.TField field;
3383 chandransh 3945
      iprot.readStructBegin();
3946
      while (true)
3947
      {
3948
        field = iprot.readFieldBegin();
3430 rajveer 3949
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 3950
          break;
3951
        }
3430 rajveer 3952
        switch (field.id) {
3953
          case 0: // SUCCESS
4555 mandeep.dh 3954
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3955
              this.success = new InventoryItem();
3956
              this.success.read(iprot);
3430 rajveer 3957
            } else { 
3958
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3959
            }
3960
            break;
3961
          case 1: // WEX
3962
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3963
              this.wex = new WarehouseServiceException();
3964
              this.wex.read(iprot);
3965
            } else { 
3966
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3967
            }
3968
            break;
3969
          default:
3970
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 3971
        }
3430 rajveer 3972
        iprot.readFieldEnd();
3383 chandransh 3973
      }
3974
      iprot.readStructEnd();
3975
      validate();
3976
    }
3977
 
3430 rajveer 3978
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 3979
      oprot.writeStructBegin(STRUCT_DESC);
3980
 
3981
      if (this.isSetSuccess()) {
3982
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 3983
        this.success.write(oprot);
3383 chandransh 3984
        oprot.writeFieldEnd();
3985
      } else if (this.isSetWex()) {
3986
        oprot.writeFieldBegin(WEX_FIELD_DESC);
3987
        this.wex.write(oprot);
3988
        oprot.writeFieldEnd();
3989
      }
3990
      oprot.writeFieldStop();
3991
      oprot.writeStructEnd();
3992
    }
3993
 
3994
    @Override
3995
    public String toString() {
4496 mandeep.dh 3996
      StringBuilder sb = new StringBuilder("createInventoryItem_result(");
3383 chandransh 3997
      boolean first = true;
3998
 
3999
      sb.append("success:");
4555 mandeep.dh 4000
      if (this.success == null) {
4001
        sb.append("null");
4002
      } else {
4003
        sb.append(this.success);
4004
      }
3383 chandransh 4005
      first = false;
4006
      if (!first) sb.append(", ");
4007
      sb.append("wex:");
4008
      if (this.wex == null) {
4009
        sb.append("null");
4010
      } else {
4011
        sb.append(this.wex);
4012
      }
4013
      first = false;
4014
      sb.append(")");
4015
      return sb.toString();
4016
    }
4017
 
3430 rajveer 4018
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 4019
      // check for required fields
4020
    }
4021
 
3430 rajveer 4022
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4023
      try {
4024
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4025
      } catch (org.apache.thrift.TException te) {
4026
        throw new java.io.IOException(te);
4027
      }
4028
    }
4029
 
4030
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4031
      try {
4032
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4033
      } catch (org.apache.thrift.TException te) {
4034
        throw new java.io.IOException(te);
4035
      }
4036
    }
4037
 
3383 chandransh 4038
  }
4039
 
4496 mandeep.dh 4040
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
4041
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
2832 chandransh 4042
 
4496 mandeep.dh 4043
    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 4044
 
4496 mandeep.dh 4045
    private String serialNumber; // required
2832 chandransh 4046
 
4047
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4048
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 4049
      SERIAL_NUMBER((short)1, "serialNumber");
2832 chandransh 4050
 
4051
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4052
 
4053
      static {
4054
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4055
          byName.put(field.getFieldName(), field);
4056
        }
4057
      }
4058
 
4059
      /**
4060
       * Find the _Fields constant that matches fieldId, or null if its not found.
4061
       */
4062
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4063
        switch(fieldId) {
4496 mandeep.dh 4064
          case 1: // SERIAL_NUMBER
4065
            return SERIAL_NUMBER;
3430 rajveer 4066
          default:
4067
            return null;
4068
        }
2832 chandransh 4069
      }
4070
 
4071
      /**
4072
       * Find the _Fields constant that matches fieldId, throwing an exception
4073
       * if it is not found.
4074
       */
4075
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4076
        _Fields fields = findByThriftId(fieldId);
4077
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4078
        return fields;
4079
      }
4080
 
4081
      /**
4082
       * Find the _Fields constant that matches name, or null if its not found.
4083
       */
4084
      public static _Fields findByName(String name) {
4085
        return byName.get(name);
4086
      }
4087
 
4088
      private final short _thriftId;
4089
      private final String _fieldName;
4090
 
4091
      _Fields(short thriftId, String fieldName) {
4092
        _thriftId = thriftId;
4093
        _fieldName = fieldName;
4094
      }
4095
 
4096
      public short getThriftFieldId() {
4097
        return _thriftId;
4098
      }
4099
 
4100
      public String getFieldName() {
4101
        return _fieldName;
4102
      }
4103
    }
4104
 
4105
    // isset id assignments
4106
 
3430 rajveer 4107
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 4108
    static {
3430 rajveer 4109
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 4110
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4111
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 4112
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4113
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_args.class, metaDataMap);
2832 chandransh 4114
    }
4115
 
4496 mandeep.dh 4116
    public getInventoryItem_args() {
2832 chandransh 4117
    }
4118
 
4496 mandeep.dh 4119
    public getInventoryItem_args(
4120
      String serialNumber)
2832 chandransh 4121
    {
4122
      this();
4496 mandeep.dh 4123
      this.serialNumber = serialNumber;
2832 chandransh 4124
    }
4125
 
4126
    /**
4127
     * Performs a deep copy on <i>other</i>.
4128
     */
4496 mandeep.dh 4129
    public getInventoryItem_args(getInventoryItem_args other) {
4130
      if (other.isSetSerialNumber()) {
4131
        this.serialNumber = other.serialNumber;
4132
      }
2832 chandransh 4133
    }
4134
 
4496 mandeep.dh 4135
    public getInventoryItem_args deepCopy() {
4136
      return new getInventoryItem_args(this);
2832 chandransh 4137
    }
4138
 
3430 rajveer 4139
    @Override
4140
    public void clear() {
4496 mandeep.dh 4141
      this.serialNumber = null;
2832 chandransh 4142
    }
4143
 
4496 mandeep.dh 4144
    public String getSerialNumber() {
4145
      return this.serialNumber;
2832 chandransh 4146
    }
4147
 
4496 mandeep.dh 4148
    public void setSerialNumber(String serialNumber) {
4149
      this.serialNumber = serialNumber;
2832 chandransh 4150
    }
4151
 
4496 mandeep.dh 4152
    public void unsetSerialNumber() {
4153
      this.serialNumber = null;
2832 chandransh 4154
    }
4155
 
4496 mandeep.dh 4156
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
4157
    public boolean isSetSerialNumber() {
4158
      return this.serialNumber != null;
2832 chandransh 4159
    }
4160
 
4496 mandeep.dh 4161
    public void setSerialNumberIsSet(boolean value) {
4162
      if (!value) {
4163
        this.serialNumber = null;
4164
      }
2832 chandransh 4165
    }
4166
 
4167
    public void setFieldValue(_Fields field, Object value) {
4168
      switch (field) {
4496 mandeep.dh 4169
      case SERIAL_NUMBER:
2832 chandransh 4170
        if (value == null) {
4496 mandeep.dh 4171
          unsetSerialNumber();
2832 chandransh 4172
        } else {
4496 mandeep.dh 4173
          setSerialNumber((String)value);
2832 chandransh 4174
        }
4175
        break;
4176
 
4177
      }
4178
    }
4179
 
4180
    public Object getFieldValue(_Fields field) {
4181
      switch (field) {
4496 mandeep.dh 4182
      case SERIAL_NUMBER:
4183
        return getSerialNumber();
2832 chandransh 4184
 
4185
      }
4186
      throw new IllegalStateException();
4187
    }
4188
 
3430 rajveer 4189
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4190
    public boolean isSet(_Fields field) {
4191
      if (field == null) {
4192
        throw new IllegalArgumentException();
4193
      }
2832 chandransh 4194
 
4195
      switch (field) {
4496 mandeep.dh 4196
      case SERIAL_NUMBER:
4197
        return isSetSerialNumber();
2832 chandransh 4198
      }
4199
      throw new IllegalStateException();
4200
    }
4201
 
4202
    @Override
4203
    public boolean equals(Object that) {
4204
      if (that == null)
4205
        return false;
4496 mandeep.dh 4206
      if (that instanceof getInventoryItem_args)
4207
        return this.equals((getInventoryItem_args)that);
2832 chandransh 4208
      return false;
4209
    }
4210
 
4496 mandeep.dh 4211
    public boolean equals(getInventoryItem_args that) {
2832 chandransh 4212
      if (that == null)
4213
        return false;
4214
 
4496 mandeep.dh 4215
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
4216
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
4217
      if (this_present_serialNumber || that_present_serialNumber) {
4218
        if (!(this_present_serialNumber && that_present_serialNumber))
2832 chandransh 4219
          return false;
4496 mandeep.dh 4220
        if (!this.serialNumber.equals(that.serialNumber))
2832 chandransh 4221
          return false;
4222
      }
4223
 
4224
      return true;
4225
    }
4226
 
4227
    @Override
4228
    public int hashCode() {
4229
      return 0;
4230
    }
4231
 
4496 mandeep.dh 4232
    public int compareTo(getInventoryItem_args other) {
2832 chandransh 4233
      if (!getClass().equals(other.getClass())) {
4234
        return getClass().getName().compareTo(other.getClass().getName());
4235
      }
4236
 
4237
      int lastComparison = 0;
4496 mandeep.dh 4238
      getInventoryItem_args typedOther = (getInventoryItem_args)other;
2832 chandransh 4239
 
4496 mandeep.dh 4240
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2832 chandransh 4241
      if (lastComparison != 0) {
4242
        return lastComparison;
4243
      }
4496 mandeep.dh 4244
      if (isSetSerialNumber()) {
4245
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 4246
        if (lastComparison != 0) {
4247
          return lastComparison;
4248
        }
2832 chandransh 4249
      }
4250
      return 0;
4251
    }
4252
 
3430 rajveer 4253
    public _Fields fieldForId(int fieldId) {
4254
      return _Fields.findByThriftId(fieldId);
4255
    }
4256
 
4257
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4258
      org.apache.thrift.protocol.TField field;
2832 chandransh 4259
      iprot.readStructBegin();
4260
      while (true)
4261
      {
4262
        field = iprot.readFieldBegin();
3430 rajveer 4263
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 4264
          break;
4265
        }
3430 rajveer 4266
        switch (field.id) {
4496 mandeep.dh 4267
          case 1: // SERIAL_NUMBER
4268
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
4269
              this.serialNumber = iprot.readString();
3430 rajveer 4270
            } else { 
4271
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4272
            }
4273
            break;
4274
          default:
4275
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 4276
        }
3430 rajveer 4277
        iprot.readFieldEnd();
2832 chandransh 4278
      }
4279
      iprot.readStructEnd();
4280
      validate();
4281
    }
4282
 
3430 rajveer 4283
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 4284
      validate();
4285
 
4286
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 4287
      if (this.serialNumber != null) {
4288
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
4289
        oprot.writeString(this.serialNumber);
4290
        oprot.writeFieldEnd();
4291
      }
2832 chandransh 4292
      oprot.writeFieldStop();
4293
      oprot.writeStructEnd();
4294
    }
4295
 
4296
    @Override
4297
    public String toString() {
4496 mandeep.dh 4298
      StringBuilder sb = new StringBuilder("getInventoryItem_args(");
2832 chandransh 4299
      boolean first = true;
4300
 
4496 mandeep.dh 4301
      sb.append("serialNumber:");
4302
      if (this.serialNumber == null) {
4303
        sb.append("null");
4304
      } else {
4305
        sb.append(this.serialNumber);
4306
      }
2832 chandransh 4307
      first = false;
4308
      sb.append(")");
4309
      return sb.toString();
4310
    }
4311
 
3430 rajveer 4312
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 4313
      // check for required fields
4314
    }
4315
 
3430 rajveer 4316
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4317
      try {
4318
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4319
      } catch (org.apache.thrift.TException te) {
4320
        throw new java.io.IOException(te);
4321
      }
4322
    }
4323
 
4324
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4325
      try {
4326
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4327
      } catch (org.apache.thrift.TException te) {
4328
        throw new java.io.IOException(te);
4329
      }
4330
    }
4331
 
2832 chandransh 4332
  }
4333
 
4496 mandeep.dh 4334
  public static class getInventoryItem_result implements org.apache.thrift.TBase<getInventoryItem_result, getInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
4335
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_result");
2832 chandransh 4336
 
3430 rajveer 4337
    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 4338
    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 4339
 
4496 mandeep.dh 4340
    private InventoryItem success; // required
4541 mandeep.dh 4341
    private WarehouseServiceException wex; // required
2832 chandransh 4342
 
4343
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4344
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4541 mandeep.dh 4345
      SUCCESS((short)0, "success"),
4346
      WEX((short)1, "wex");
2832 chandransh 4347
 
4348
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4349
 
4350
      static {
4351
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4352
          byName.put(field.getFieldName(), field);
4353
        }
4354
      }
4355
 
4356
      /**
4357
       * Find the _Fields constant that matches fieldId, or null if its not found.
4358
       */
4359
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4360
        switch(fieldId) {
4361
          case 0: // SUCCESS
4362
            return SUCCESS;
4541 mandeep.dh 4363
          case 1: // WEX
4364
            return WEX;
3430 rajveer 4365
          default:
4366
            return null;
4367
        }
2832 chandransh 4368
      }
4369
 
4370
      /**
4371
       * Find the _Fields constant that matches fieldId, throwing an exception
4372
       * if it is not found.
4373
       */
4374
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4375
        _Fields fields = findByThriftId(fieldId);
4376
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4377
        return fields;
4378
      }
4379
 
4380
      /**
4381
       * Find the _Fields constant that matches name, or null if its not found.
4382
       */
4383
      public static _Fields findByName(String name) {
4384
        return byName.get(name);
4385
      }
4386
 
4387
      private final short _thriftId;
4388
      private final String _fieldName;
4389
 
4390
      _Fields(short thriftId, String fieldName) {
4391
        _thriftId = thriftId;
4392
        _fieldName = fieldName;
4393
      }
4394
 
4395
      public short getThriftFieldId() {
4396
        return _thriftId;
4397
      }
4398
 
4399
      public String getFieldName() {
4400
        return _fieldName;
4401
      }
4402
    }
4403
 
4404
    // isset id assignments
4405
 
3430 rajveer 4406
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 4407
    static {
3430 rajveer 4408
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4409
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 4410
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4541 mandeep.dh 4411
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4412
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 4413
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4414
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_result.class, metaDataMap);
2832 chandransh 4415
    }
4416
 
4496 mandeep.dh 4417
    public getInventoryItem_result() {
2832 chandransh 4418
    }
4419
 
4496 mandeep.dh 4420
    public getInventoryItem_result(
4541 mandeep.dh 4421
      InventoryItem success,
4422
      WarehouseServiceException wex)
2832 chandransh 4423
    {
4424
      this();
4425
      this.success = success;
4541 mandeep.dh 4426
      this.wex = wex;
2832 chandransh 4427
    }
4428
 
4429
    /**
4430
     * Performs a deep copy on <i>other</i>.
4431
     */
4496 mandeep.dh 4432
    public getInventoryItem_result(getInventoryItem_result other) {
2832 chandransh 4433
      if (other.isSetSuccess()) {
4496 mandeep.dh 4434
        this.success = new InventoryItem(other.success);
2832 chandransh 4435
      }
4541 mandeep.dh 4436
      if (other.isSetWex()) {
4437
        this.wex = new WarehouseServiceException(other.wex);
4438
      }
2832 chandransh 4439
    }
4440
 
4496 mandeep.dh 4441
    public getInventoryItem_result deepCopy() {
4442
      return new getInventoryItem_result(this);
2832 chandransh 4443
    }
4444
 
3430 rajveer 4445
    @Override
4446
    public void clear() {
4447
      this.success = null;
4541 mandeep.dh 4448
      this.wex = null;
2832 chandransh 4449
    }
4450
 
4496 mandeep.dh 4451
    public InventoryItem getSuccess() {
2832 chandransh 4452
      return this.success;
4453
    }
4454
 
4496 mandeep.dh 4455
    public void setSuccess(InventoryItem success) {
2832 chandransh 4456
      this.success = success;
4457
    }
4458
 
4459
    public void unsetSuccess() {
4460
      this.success = null;
4461
    }
4462
 
3430 rajveer 4463
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2832 chandransh 4464
    public boolean isSetSuccess() {
4465
      return this.success != null;
4466
    }
4467
 
4468
    public void setSuccessIsSet(boolean value) {
4469
      if (!value) {
4470
        this.success = null;
4471
      }
4472
    }
4473
 
4541 mandeep.dh 4474
    public WarehouseServiceException getWex() {
4475
      return this.wex;
4476
    }
4477
 
4478
    public void setWex(WarehouseServiceException wex) {
4479
      this.wex = wex;
4480
    }
4481
 
4482
    public void unsetWex() {
4483
      this.wex = null;
4484
    }
4485
 
4486
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
4487
    public boolean isSetWex() {
4488
      return this.wex != null;
4489
    }
4490
 
4491
    public void setWexIsSet(boolean value) {
4492
      if (!value) {
4493
        this.wex = null;
4494
      }
4495
    }
4496
 
2832 chandransh 4497
    public void setFieldValue(_Fields field, Object value) {
4498
      switch (field) {
4499
      case SUCCESS:
4500
        if (value == null) {
4501
          unsetSuccess();
4502
        } else {
4496 mandeep.dh 4503
          setSuccess((InventoryItem)value);
2832 chandransh 4504
        }
4505
        break;
4506
 
4541 mandeep.dh 4507
      case WEX:
4508
        if (value == null) {
4509
          unsetWex();
4510
        } else {
4511
          setWex((WarehouseServiceException)value);
4512
        }
4513
        break;
4514
 
2832 chandransh 4515
      }
4516
    }
4517
 
4518
    public Object getFieldValue(_Fields field) {
4519
      switch (field) {
4520
      case SUCCESS:
4521
        return getSuccess();
4522
 
4541 mandeep.dh 4523
      case WEX:
4524
        return getWex();
4525
 
2832 chandransh 4526
      }
4527
      throw new IllegalStateException();
4528
    }
4529
 
3430 rajveer 4530
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4531
    public boolean isSet(_Fields field) {
4532
      if (field == null) {
4533
        throw new IllegalArgumentException();
4534
      }
2832 chandransh 4535
 
4536
      switch (field) {
4537
      case SUCCESS:
4538
        return isSetSuccess();
4541 mandeep.dh 4539
      case WEX:
4540
        return isSetWex();
2832 chandransh 4541
      }
4542
      throw new IllegalStateException();
4543
    }
4544
 
4545
    @Override
4546
    public boolean equals(Object that) {
4547
      if (that == null)
4548
        return false;
4496 mandeep.dh 4549
      if (that instanceof getInventoryItem_result)
4550
        return this.equals((getInventoryItem_result)that);
2832 chandransh 4551
      return false;
4552
    }
4553
 
4496 mandeep.dh 4554
    public boolean equals(getInventoryItem_result that) {
2832 chandransh 4555
      if (that == null)
4556
        return false;
4557
 
4558
      boolean this_present_success = true && this.isSetSuccess();
4559
      boolean that_present_success = true && that.isSetSuccess();
4560
      if (this_present_success || that_present_success) {
4561
        if (!(this_present_success && that_present_success))
4562
          return false;
4563
        if (!this.success.equals(that.success))
4564
          return false;
4565
      }
4566
 
4541 mandeep.dh 4567
      boolean this_present_wex = true && this.isSetWex();
4568
      boolean that_present_wex = true && that.isSetWex();
4569
      if (this_present_wex || that_present_wex) {
4570
        if (!(this_present_wex && that_present_wex))
4571
          return false;
4572
        if (!this.wex.equals(that.wex))
4573
          return false;
4574
      }
4575
 
2832 chandransh 4576
      return true;
4577
    }
4578
 
4579
    @Override
4580
    public int hashCode() {
4581
      return 0;
4582
    }
4583
 
4496 mandeep.dh 4584
    public int compareTo(getInventoryItem_result other) {
2832 chandransh 4585
      if (!getClass().equals(other.getClass())) {
4586
        return getClass().getName().compareTo(other.getClass().getName());
4587
      }
4588
 
4589
      int lastComparison = 0;
4496 mandeep.dh 4590
      getInventoryItem_result typedOther = (getInventoryItem_result)other;
2832 chandransh 4591
 
3430 rajveer 4592
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2832 chandransh 4593
      if (lastComparison != 0) {
4594
        return lastComparison;
4595
      }
3430 rajveer 4596
      if (isSetSuccess()) {
4597
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4598
        if (lastComparison != 0) {
4599
          return lastComparison;
4600
        }
2832 chandransh 4601
      }
4541 mandeep.dh 4602
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
4603
      if (lastComparison != 0) {
4604
        return lastComparison;
4605
      }
4606
      if (isSetWex()) {
4607
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
4608
        if (lastComparison != 0) {
4609
          return lastComparison;
4610
        }
4611
      }
2832 chandransh 4612
      return 0;
4613
    }
4614
 
3430 rajveer 4615
    public _Fields fieldForId(int fieldId) {
4616
      return _Fields.findByThriftId(fieldId);
4617
    }
4618
 
4619
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4620
      org.apache.thrift.protocol.TField field;
2832 chandransh 4621
      iprot.readStructBegin();
4622
      while (true)
4623
      {
4624
        field = iprot.readFieldBegin();
3430 rajveer 4625
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 4626
          break;
4627
        }
3430 rajveer 4628
        switch (field.id) {
4629
          case 0: // SUCCESS
4630
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4496 mandeep.dh 4631
              this.success = new InventoryItem();
3430 rajveer 4632
              this.success.read(iprot);
4633
            } else { 
4634
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4635
            }
4636
            break;
4541 mandeep.dh 4637
          case 1: // WEX
4638
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4639
              this.wex = new WarehouseServiceException();
4640
              this.wex.read(iprot);
4641
            } else { 
4642
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4643
            }
4644
            break;
3430 rajveer 4645
          default:
4646
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 4647
        }
3430 rajveer 4648
        iprot.readFieldEnd();
2832 chandransh 4649
      }
4650
      iprot.readStructEnd();
4651
      validate();
4652
    }
4653
 
3430 rajveer 4654
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 4655
      oprot.writeStructBegin(STRUCT_DESC);
4656
 
4657
      if (this.isSetSuccess()) {
4658
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4659
        this.success.write(oprot);
4660
        oprot.writeFieldEnd();
4541 mandeep.dh 4661
      } else if (this.isSetWex()) {
4662
        oprot.writeFieldBegin(WEX_FIELD_DESC);
4663
        this.wex.write(oprot);
4664
        oprot.writeFieldEnd();
2832 chandransh 4665
      }
4666
      oprot.writeFieldStop();
4667
      oprot.writeStructEnd();
4668
    }
4669
 
4670
    @Override
4671
    public String toString() {
4496 mandeep.dh 4672
      StringBuilder sb = new StringBuilder("getInventoryItem_result(");
2832 chandransh 4673
      boolean first = true;
4674
 
4675
      sb.append("success:");
4676
      if (this.success == null) {
4677
        sb.append("null");
4678
      } else {
4679
        sb.append(this.success);
4680
      }
4681
      first = false;
4541 mandeep.dh 4682
      if (!first) sb.append(", ");
4683
      sb.append("wex:");
4684
      if (this.wex == null) {
4685
        sb.append("null");
4686
      } else {
4687
        sb.append(this.wex);
4688
      }
4689
      first = false;
2832 chandransh 4690
      sb.append(")");
4691
      return sb.toString();
4692
    }
4693
 
3430 rajveer 4694
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 4695
      // check for required fields
4696
    }
4697
 
3430 rajveer 4698
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4699
      try {
4700
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4701
      } catch (org.apache.thrift.TException te) {
4702
        throw new java.io.IOException(te);
4703
      }
4704
    }
4705
 
4706
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4707
      try {
4708
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4709
      } catch (org.apache.thrift.TException te) {
4710
        throw new java.io.IOException(te);
4711
      }
4712
    }
4713
 
2832 chandransh 4714
  }
4715
 
5361 mandeep.dh 4716
  public static class getNonSeralizedInventoryItem_args implements org.apache.thrift.TBase<getNonSeralizedInventoryItem_args, getNonSeralizedInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
4717
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItem_args");
2820 chandransh 4718
 
4496 mandeep.dh 4719
    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);
5361 mandeep.dh 4720
    private static final org.apache.thrift.protocol.TField WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("warehouseId", org.apache.thrift.protocol.TType.I64, (short)2);
2820 chandransh 4721
 
4496 mandeep.dh 4722
    private long itemId; // required
5361 mandeep.dh 4723
    private long warehouseId; // required
2820 chandransh 4724
 
4725
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4726
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 4727
      ITEM_ID((short)1, "itemId"),
5361 mandeep.dh 4728
      WAREHOUSE_ID((short)2, "warehouseId");
2820 chandransh 4729
 
4730
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4731
 
4732
      static {
4733
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4734
          byName.put(field.getFieldName(), field);
4735
        }
4736
      }
4737
 
4738
      /**
4739
       * Find the _Fields constant that matches fieldId, or null if its not found.
4740
       */
4741
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4742
        switch(fieldId) {
4496 mandeep.dh 4743
          case 1: // ITEM_ID
4744
            return ITEM_ID;
5361 mandeep.dh 4745
          case 2: // WAREHOUSE_ID
4746
            return WAREHOUSE_ID;
3430 rajveer 4747
          default:
4748
            return null;
4749
        }
2820 chandransh 4750
      }
4751
 
4752
      /**
4753
       * Find the _Fields constant that matches fieldId, throwing an exception
4754
       * if it is not found.
4755
       */
4756
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4757
        _Fields fields = findByThriftId(fieldId);
4758
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4759
        return fields;
4760
      }
4761
 
4762
      /**
4763
       * Find the _Fields constant that matches name, or null if its not found.
4764
       */
4765
      public static _Fields findByName(String name) {
4766
        return byName.get(name);
4767
      }
4768
 
4769
      private final short _thriftId;
4770
      private final String _fieldName;
4771
 
4772
      _Fields(short thriftId, String fieldName) {
4773
        _thriftId = thriftId;
4774
        _fieldName = fieldName;
4775
      }
4776
 
4777
      public short getThriftFieldId() {
4778
        return _thriftId;
4779
      }
4780
 
4781
      public String getFieldName() {
4782
        return _fieldName;
4783
      }
4784
    }
4785
 
4786
    // isset id assignments
4496 mandeep.dh 4787
    private static final int __ITEMID_ISSET_ID = 0;
5361 mandeep.dh 4788
    private static final int __WAREHOUSEID_ISSET_ID = 1;
4789
    private BitSet __isset_bit_vector = new BitSet(2);
2820 chandransh 4790
 
3430 rajveer 4791
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 4792
    static {
3430 rajveer 4793
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 4794
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3430 rajveer 4795
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 4796
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 4797
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 4798
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5361 mandeep.dh 4799
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItem_args.class, metaDataMap);
2820 chandransh 4800
    }
4801
 
5361 mandeep.dh 4802
    public getNonSeralizedInventoryItem_args() {
2820 chandransh 4803
    }
4804
 
5361 mandeep.dh 4805
    public getNonSeralizedInventoryItem_args(
4496 mandeep.dh 4806
      long itemId,
5361 mandeep.dh 4807
      long warehouseId)
2820 chandransh 4808
    {
4809
      this();
4496 mandeep.dh 4810
      this.itemId = itemId;
4811
      setItemIdIsSet(true);
5361 mandeep.dh 4812
      this.warehouseId = warehouseId;
4813
      setWarehouseIdIsSet(true);
2820 chandransh 4814
    }
4815
 
4816
    /**
4817
     * Performs a deep copy on <i>other</i>.
4818
     */
5361 mandeep.dh 4819
    public getNonSeralizedInventoryItem_args(getNonSeralizedInventoryItem_args other) {
2820 chandransh 4820
      __isset_bit_vector.clear();
4821
      __isset_bit_vector.or(other.__isset_bit_vector);
4496 mandeep.dh 4822
      this.itemId = other.itemId;
5361 mandeep.dh 4823
      this.warehouseId = other.warehouseId;
2820 chandransh 4824
    }
4825
 
5361 mandeep.dh 4826
    public getNonSeralizedInventoryItem_args deepCopy() {
4827
      return new getNonSeralizedInventoryItem_args(this);
2820 chandransh 4828
    }
4829
 
3430 rajveer 4830
    @Override
4831
    public void clear() {
4496 mandeep.dh 4832
      setItemIdIsSet(false);
4833
      this.itemId = 0;
5361 mandeep.dh 4834
      setWarehouseIdIsSet(false);
4835
      this.warehouseId = 0;
2820 chandransh 4836
    }
4837
 
4496 mandeep.dh 4838
    public long getItemId() {
4839
      return this.itemId;
2820 chandransh 4840
    }
4841
 
4496 mandeep.dh 4842
    public void setItemId(long itemId) {
4843
      this.itemId = itemId;
4844
      setItemIdIsSet(true);
2820 chandransh 4845
    }
4846
 
4496 mandeep.dh 4847
    public void unsetItemId() {
4848
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
2820 chandransh 4849
    }
4850
 
4496 mandeep.dh 4851
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
4852
    public boolean isSetItemId() {
4853
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
2820 chandransh 4854
    }
4855
 
4496 mandeep.dh 4856
    public void setItemIdIsSet(boolean value) {
4857
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
2820 chandransh 4858
    }
4859
 
5361 mandeep.dh 4860
    public long getWarehouseId() {
4861
      return this.warehouseId;
2820 chandransh 4862
    }
4863
 
5361 mandeep.dh 4864
    public void setWarehouseId(long warehouseId) {
4865
      this.warehouseId = warehouseId;
4866
      setWarehouseIdIsSet(true);
2820 chandransh 4867
    }
4868
 
5361 mandeep.dh 4869
    public void unsetWarehouseId() {
4870
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
2820 chandransh 4871
    }
4872
 
5361 mandeep.dh 4873
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
4874
    public boolean isSetWarehouseId() {
4875
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
2820 chandransh 4876
    }
4877
 
5361 mandeep.dh 4878
    public void setWarehouseIdIsSet(boolean value) {
4879
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
2820 chandransh 4880
    }
4881
 
4882
    public void setFieldValue(_Fields field, Object value) {
4883
      switch (field) {
4496 mandeep.dh 4884
      case ITEM_ID:
2820 chandransh 4885
        if (value == null) {
4496 mandeep.dh 4886
          unsetItemId();
2820 chandransh 4887
        } else {
4496 mandeep.dh 4888
          setItemId((Long)value);
2820 chandransh 4889
        }
4890
        break;
4891
 
5361 mandeep.dh 4892
      case WAREHOUSE_ID:
2820 chandransh 4893
        if (value == null) {
5361 mandeep.dh 4894
          unsetWarehouseId();
2820 chandransh 4895
        } else {
5361 mandeep.dh 4896
          setWarehouseId((Long)value);
2820 chandransh 4897
        }
4898
        break;
4899
 
4900
      }
4901
    }
4902
 
4903
    public Object getFieldValue(_Fields field) {
4904
      switch (field) {
4496 mandeep.dh 4905
      case ITEM_ID:
4906
        return Long.valueOf(getItemId());
2820 chandransh 4907
 
5361 mandeep.dh 4908
      case WAREHOUSE_ID:
4909
        return Long.valueOf(getWarehouseId());
2820 chandransh 4910
 
4911
      }
4912
      throw new IllegalStateException();
4913
    }
4914
 
3430 rajveer 4915
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4916
    public boolean isSet(_Fields field) {
4917
      if (field == null) {
4918
        throw new IllegalArgumentException();
4919
      }
2820 chandransh 4920
 
4921
      switch (field) {
4496 mandeep.dh 4922
      case ITEM_ID:
4923
        return isSetItemId();
5361 mandeep.dh 4924
      case WAREHOUSE_ID:
4925
        return isSetWarehouseId();
2820 chandransh 4926
      }
4927
      throw new IllegalStateException();
4928
    }
4929
 
4930
    @Override
4931
    public boolean equals(Object that) {
4932
      if (that == null)
4933
        return false;
5361 mandeep.dh 4934
      if (that instanceof getNonSeralizedInventoryItem_args)
4935
        return this.equals((getNonSeralizedInventoryItem_args)that);
2820 chandransh 4936
      return false;
4937
    }
4938
 
5361 mandeep.dh 4939
    public boolean equals(getNonSeralizedInventoryItem_args that) {
2820 chandransh 4940
      if (that == null)
4941
        return false;
4942
 
4496 mandeep.dh 4943
      boolean this_present_itemId = true;
4944
      boolean that_present_itemId = true;
4945
      if (this_present_itemId || that_present_itemId) {
4946
        if (!(this_present_itemId && that_present_itemId))
2820 chandransh 4947
          return false;
4496 mandeep.dh 4948
        if (this.itemId != that.itemId)
2820 chandransh 4949
          return false;
4950
      }
4951
 
5361 mandeep.dh 4952
      boolean this_present_warehouseId = true;
4953
      boolean that_present_warehouseId = true;
4954
      if (this_present_warehouseId || that_present_warehouseId) {
4955
        if (!(this_present_warehouseId && that_present_warehouseId))
2820 chandransh 4956
          return false;
5361 mandeep.dh 4957
        if (this.warehouseId != that.warehouseId)
2820 chandransh 4958
          return false;
4959
      }
4960
 
4961
      return true;
4962
    }
4963
 
4964
    @Override
4965
    public int hashCode() {
4966
      return 0;
4967
    }
4968
 
5361 mandeep.dh 4969
    public int compareTo(getNonSeralizedInventoryItem_args other) {
2820 chandransh 4970
      if (!getClass().equals(other.getClass())) {
4971
        return getClass().getName().compareTo(other.getClass().getName());
4972
      }
4973
 
4974
      int lastComparison = 0;
5361 mandeep.dh 4975
      getNonSeralizedInventoryItem_args typedOther = (getNonSeralizedInventoryItem_args)other;
2820 chandransh 4976
 
4496 mandeep.dh 4977
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
2820 chandransh 4978
      if (lastComparison != 0) {
4979
        return lastComparison;
4980
      }
4496 mandeep.dh 4981
      if (isSetItemId()) {
4982
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
3430 rajveer 4983
        if (lastComparison != 0) {
4984
          return lastComparison;
4985
        }
2820 chandransh 4986
      }
5361 mandeep.dh 4987
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
2820 chandransh 4988
      if (lastComparison != 0) {
4989
        return lastComparison;
4990
      }
5361 mandeep.dh 4991
      if (isSetWarehouseId()) {
4992
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
3430 rajveer 4993
        if (lastComparison != 0) {
4994
          return lastComparison;
4995
        }
2820 chandransh 4996
      }
4997
      return 0;
4998
    }
4999
 
3430 rajveer 5000
    public _Fields fieldForId(int fieldId) {
5001
      return _Fields.findByThriftId(fieldId);
5002
    }
5003
 
5004
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5005
      org.apache.thrift.protocol.TField field;
2820 chandransh 5006
      iprot.readStructBegin();
5007
      while (true)
5008
      {
5009
        field = iprot.readFieldBegin();
3430 rajveer 5010
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 5011
          break;
5012
        }
3430 rajveer 5013
        switch (field.id) {
4496 mandeep.dh 5014
          case 1: // ITEM_ID
3430 rajveer 5015
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4496 mandeep.dh 5016
              this.itemId = iprot.readI64();
5017
              setItemIdIsSet(true);
3430 rajveer 5018
            } else { 
5019
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5020
            }
5021
            break;
5361 mandeep.dh 5022
          case 2: // WAREHOUSE_ID
4496 mandeep.dh 5023
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5361 mandeep.dh 5024
              this.warehouseId = iprot.readI64();
5025
              setWarehouseIdIsSet(true);
3430 rajveer 5026
            } else { 
5027
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5028
            }
5029
            break;
5030
          default:
5031
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 5032
        }
3430 rajveer 5033
        iprot.readFieldEnd();
2820 chandransh 5034
      }
5035
      iprot.readStructEnd();
5036
      validate();
5037
    }
5038
 
3430 rajveer 5039
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 5040
      validate();
5041
 
5042
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 5043
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
5044
      oprot.writeI64(this.itemId);
2820 chandransh 5045
      oprot.writeFieldEnd();
5361 mandeep.dh 5046
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
5047
      oprot.writeI64(this.warehouseId);
2820 chandransh 5048
      oprot.writeFieldEnd();
5049
      oprot.writeFieldStop();
5050
      oprot.writeStructEnd();
5051
    }
5052
 
5053
    @Override
5054
    public String toString() {
5361 mandeep.dh 5055
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItem_args(");
2820 chandransh 5056
      boolean first = true;
5057
 
4496 mandeep.dh 5058
      sb.append("itemId:");
5059
      sb.append(this.itemId);
2820 chandransh 5060
      first = false;
5061
      if (!first) sb.append(", ");
5361 mandeep.dh 5062
      sb.append("warehouseId:");
5063
      sb.append(this.warehouseId);
2820 chandransh 5064
      first = false;
5065
      sb.append(")");
5066
      return sb.toString();
5067
    }
5068
 
3430 rajveer 5069
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 5070
      // check for required fields
5071
    }
5072
 
3430 rajveer 5073
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5074
      try {
5075
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5076
      } catch (org.apache.thrift.TException te) {
5077
        throw new java.io.IOException(te);
5078
      }
5079
    }
5080
 
5081
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5082
      try {
4496 mandeep.dh 5083
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
5084
        __isset_bit_vector = new BitSet(1);
3430 rajveer 5085
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5086
      } catch (org.apache.thrift.TException te) {
5087
        throw new java.io.IOException(te);
5088
      }
5089
    }
5090
 
2820 chandransh 5091
  }
5092
 
5361 mandeep.dh 5093
  public static class getNonSeralizedInventoryItem_result implements org.apache.thrift.TBase<getNonSeralizedInventoryItem_result, getNonSeralizedInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
5094
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItem_result");
2820 chandransh 5095
 
5361 mandeep.dh 5096
    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);
5097
    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 5098
 
5361 mandeep.dh 5099
    private InventoryItem success; // required
5100
    private WarehouseServiceException wex; // required
2820 chandransh 5101
 
5102
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 5103
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 5104
      SUCCESS((short)0, "success"),
5105
      WEX((short)1, "wex");
2820 chandransh 5106
 
5107
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5108
 
5109
      static {
5110
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5111
          byName.put(field.getFieldName(), field);
5112
        }
5113
      }
5114
 
5115
      /**
5116
       * Find the _Fields constant that matches fieldId, or null if its not found.
5117
       */
5118
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 5119
        switch(fieldId) {
5120
          case 0: // SUCCESS
5121
            return SUCCESS;
5361 mandeep.dh 5122
          case 1: // WEX
5123
            return WEX;
3430 rajveer 5124
          default:
5125
            return null;
5126
        }
2820 chandransh 5127
      }
5128
 
5129
      /**
5130
       * Find the _Fields constant that matches fieldId, throwing an exception
5131
       * if it is not found.
5132
       */
5133
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5134
        _Fields fields = findByThriftId(fieldId);
5135
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5136
        return fields;
5137
      }
5138
 
5139
      /**
5140
       * Find the _Fields constant that matches name, or null if its not found.
5141
       */
5142
      public static _Fields findByName(String name) {
5143
        return byName.get(name);
5144
      }
5145
 
5146
      private final short _thriftId;
5147
      private final String _fieldName;
5148
 
5149
      _Fields(short thriftId, String fieldName) {
5150
        _thriftId = thriftId;
5151
        _fieldName = fieldName;
5152
      }
5153
 
5154
      public short getThriftFieldId() {
5155
        return _thriftId;
5156
      }
5157
 
5158
      public String getFieldName() {
5159
        return _fieldName;
5160
      }
5161
    }
5162
 
5163
    // isset id assignments
5164
 
3430 rajveer 5165
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 5166
    static {
3430 rajveer 5167
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5168
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5361 mandeep.dh 5169
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
5170
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5171
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 5172
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5361 mandeep.dh 5173
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItem_result.class, metaDataMap);
2820 chandransh 5174
    }
5175
 
5361 mandeep.dh 5176
    public getNonSeralizedInventoryItem_result() {
2820 chandransh 5177
    }
5178
 
5361 mandeep.dh 5179
    public getNonSeralizedInventoryItem_result(
5180
      InventoryItem success,
5181
      WarehouseServiceException wex)
2820 chandransh 5182
    {
5183
      this();
5184
      this.success = success;
5361 mandeep.dh 5185
      this.wex = wex;
2820 chandransh 5186
    }
5187
 
5188
    /**
5189
     * Performs a deep copy on <i>other</i>.
5190
     */
5361 mandeep.dh 5191
    public getNonSeralizedInventoryItem_result(getNonSeralizedInventoryItem_result other) {
4496 mandeep.dh 5192
      if (other.isSetSuccess()) {
5361 mandeep.dh 5193
        this.success = new InventoryItem(other.success);
2820 chandransh 5194
      }
5361 mandeep.dh 5195
      if (other.isSetWex()) {
5196
        this.wex = new WarehouseServiceException(other.wex);
5197
      }
2820 chandransh 5198
    }
5199
 
5361 mandeep.dh 5200
    public getNonSeralizedInventoryItem_result deepCopy() {
5201
      return new getNonSeralizedInventoryItem_result(this);
2820 chandransh 5202
    }
5203
 
3430 rajveer 5204
    @Override
5205
    public void clear() {
4496 mandeep.dh 5206
      this.success = null;
5361 mandeep.dh 5207
      this.wex = null;
2820 chandransh 5208
    }
5209
 
5361 mandeep.dh 5210
    public InventoryItem getSuccess() {
2820 chandransh 5211
      return this.success;
5212
    }
5213
 
5361 mandeep.dh 5214
    public void setSuccess(InventoryItem success) {
2820 chandransh 5215
      this.success = success;
5216
    }
5217
 
5218
    public void unsetSuccess() {
4496 mandeep.dh 5219
      this.success = null;
2820 chandransh 5220
    }
5221
 
3430 rajveer 5222
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2820 chandransh 5223
    public boolean isSetSuccess() {
4496 mandeep.dh 5224
      return this.success != null;
2820 chandransh 5225
    }
5226
 
5227
    public void setSuccessIsSet(boolean value) {
4496 mandeep.dh 5228
      if (!value) {
5229
        this.success = null;
5230
      }
2820 chandransh 5231
    }
5232
 
5361 mandeep.dh 5233
    public WarehouseServiceException getWex() {
5234
      return this.wex;
2820 chandransh 5235
    }
5236
 
5361 mandeep.dh 5237
    public void setWex(WarehouseServiceException wex) {
5238
      this.wex = wex;
2820 chandransh 5239
    }
5240
 
5361 mandeep.dh 5241
    public void unsetWex() {
5242
      this.wex = null;
2820 chandransh 5243
    }
5244
 
5361 mandeep.dh 5245
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
5246
    public boolean isSetWex() {
5247
      return this.wex != null;
2820 chandransh 5248
    }
5249
 
5361 mandeep.dh 5250
    public void setWexIsSet(boolean value) {
5251
      if (!value) {
5252
        this.wex = null;
2820 chandransh 5253
      }
5254
    }
5255
 
5256
    public void setFieldValue(_Fields field, Object value) {
5257
      switch (field) {
5361 mandeep.dh 5258
      case SUCCESS:
2820 chandransh 5259
        if (value == null) {
5361 mandeep.dh 5260
          unsetSuccess();
2820 chandransh 5261
        } else {
5361 mandeep.dh 5262
          setSuccess((InventoryItem)value);
2820 chandransh 5263
        }
5264
        break;
5265
 
5361 mandeep.dh 5266
      case WEX:
2820 chandransh 5267
        if (value == null) {
5361 mandeep.dh 5268
          unsetWex();
2820 chandransh 5269
        } else {
5361 mandeep.dh 5270
          setWex((WarehouseServiceException)value);
2820 chandransh 5271
        }
5272
        break;
5273
 
5274
      }
5275
    }
5276
 
5277
    public Object getFieldValue(_Fields field) {
5278
      switch (field) {
5279
      case SUCCESS:
4496 mandeep.dh 5280
        return getSuccess();
2820 chandransh 5281
 
5361 mandeep.dh 5282
      case WEX:
5283
        return getWex();
5284
 
2820 chandransh 5285
      }
5286
      throw new IllegalStateException();
5287
    }
5288
 
3430 rajveer 5289
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5290
    public boolean isSet(_Fields field) {
5291
      if (field == null) {
5292
        throw new IllegalArgumentException();
5293
      }
2820 chandransh 5294
 
5295
      switch (field) {
5296
      case SUCCESS:
5297
        return isSetSuccess();
5361 mandeep.dh 5298
      case WEX:
5299
        return isSetWex();
2820 chandransh 5300
      }
5301
      throw new IllegalStateException();
5302
    }
5303
 
5304
    @Override
5305
    public boolean equals(Object that) {
5306
      if (that == null)
5307
        return false;
5361 mandeep.dh 5308
      if (that instanceof getNonSeralizedInventoryItem_result)
5309
        return this.equals((getNonSeralizedInventoryItem_result)that);
2820 chandransh 5310
      return false;
5311
    }
5312
 
5361 mandeep.dh 5313
    public boolean equals(getNonSeralizedInventoryItem_result that) {
2820 chandransh 5314
      if (that == null)
5315
        return false;
5316
 
4496 mandeep.dh 5317
      boolean this_present_success = true && this.isSetSuccess();
5318
      boolean that_present_success = true && that.isSetSuccess();
2820 chandransh 5319
      if (this_present_success || that_present_success) {
5320
        if (!(this_present_success && that_present_success))
5321
          return false;
4496 mandeep.dh 5322
        if (!this.success.equals(that.success))
2820 chandransh 5323
          return false;
5324
      }
5325
 
5361 mandeep.dh 5326
      boolean this_present_wex = true && this.isSetWex();
5327
      boolean that_present_wex = true && that.isSetWex();
5328
      if (this_present_wex || that_present_wex) {
5329
        if (!(this_present_wex && that_present_wex))
4496 mandeep.dh 5330
          return false;
5361 mandeep.dh 5331
        if (!this.wex.equals(that.wex))
4496 mandeep.dh 5332
          return false;
5333
      }
5334
 
5335
      return true;
5336
    }
5337
 
5338
    @Override
5339
    public int hashCode() {
5340
      return 0;
5341
    }
5342
 
5361 mandeep.dh 5343
    public int compareTo(getNonSeralizedInventoryItem_result other) {
4496 mandeep.dh 5344
      if (!getClass().equals(other.getClass())) {
5345
        return getClass().getName().compareTo(other.getClass().getName());
5346
      }
5347
 
5348
      int lastComparison = 0;
5361 mandeep.dh 5349
      getNonSeralizedInventoryItem_result typedOther = (getNonSeralizedInventoryItem_result)other;
4496 mandeep.dh 5350
 
5351
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5352
      if (lastComparison != 0) {
5353
        return lastComparison;
5354
      }
5355
      if (isSetSuccess()) {
5356
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5357
        if (lastComparison != 0) {
5358
          return lastComparison;
5359
        }
5360
      }
5361 mandeep.dh 5361
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 5362
      if (lastComparison != 0) {
5363
        return lastComparison;
5364
      }
5361 mandeep.dh 5365
      if (isSetWex()) {
5366
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3430 rajveer 5367
        if (lastComparison != 0) {
5368
          return lastComparison;
5369
        }
2820 chandransh 5370
      }
5371
      return 0;
5372
    }
5373
 
3430 rajveer 5374
    public _Fields fieldForId(int fieldId) {
5375
      return _Fields.findByThriftId(fieldId);
5376
    }
5377
 
5378
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5379
      org.apache.thrift.protocol.TField field;
2820 chandransh 5380
      iprot.readStructBegin();
5381
      while (true)
5382
      {
5383
        field = iprot.readFieldBegin();
3430 rajveer 5384
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 5385
          break;
5386
        }
3430 rajveer 5387
        switch (field.id) {
5361 mandeep.dh 5388
          case 0: // SUCCESS
5389
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5390
              this.success = new InventoryItem();
5391
              this.success.read(iprot);
3430 rajveer 5392
            } else { 
5393
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5394
            }
5395
            break;
5361 mandeep.dh 5396
          case 1: // WEX
5397
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5398
              this.wex = new WarehouseServiceException();
5399
              this.wex.read(iprot);
4496 mandeep.dh 5400
            } else { 
5401
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5402
            }
5403
            break;
5404
          default:
5405
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5406
        }
5407
        iprot.readFieldEnd();
5408
      }
5409
      iprot.readStructEnd();
5410
      validate();
5411
    }
5412
 
5413
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5414
      oprot.writeStructBegin(STRUCT_DESC);
5415
 
5416
      if (this.isSetSuccess()) {
5417
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5361 mandeep.dh 5418
        this.success.write(oprot);
4496 mandeep.dh 5419
        oprot.writeFieldEnd();
5361 mandeep.dh 5420
      } else if (this.isSetWex()) {
5421
        oprot.writeFieldBegin(WEX_FIELD_DESC);
5422
        this.wex.write(oprot);
5423
        oprot.writeFieldEnd();
4496 mandeep.dh 5424
      }
5425
      oprot.writeFieldStop();
5426
      oprot.writeStructEnd();
5427
    }
5428
 
5429
    @Override
5430
    public String toString() {
5361 mandeep.dh 5431
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItem_result(");
4496 mandeep.dh 5432
      boolean first = true;
5433
 
5434
      sb.append("success:");
5435
      if (this.success == null) {
5436
        sb.append("null");
5437
      } else {
5438
        sb.append(this.success);
5439
      }
5440
      first = false;
5361 mandeep.dh 5441
      if (!first) sb.append(", ");
5442
      sb.append("wex:");
5443
      if (this.wex == null) {
5444
        sb.append("null");
5445
      } else {
5446
        sb.append(this.wex);
5447
      }
5448
      first = false;
4496 mandeep.dh 5449
      sb.append(")");
5450
      return sb.toString();
5451
    }
5452
 
5453
    public void validate() throws org.apache.thrift.TException {
5454
      // check for required fields
5455
    }
5456
 
5457
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5458
      try {
5459
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5460
      } catch (org.apache.thrift.TException te) {
5461
        throw new java.io.IOException(te);
5462
      }
5463
    }
5464
 
5465
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5466
      try {
5467
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5468
      } catch (org.apache.thrift.TException te) {
5469
        throw new java.io.IOException(te);
5470
      }
5471
    }
5472
 
5473
  }
5474
 
5475
  public static class scanSerializedItem_args implements org.apache.thrift.TBase<scanSerializedItem_args, scanSerializedItem_args._Fields>, java.io.Serializable, Cloneable   {
5476
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItem_args");
5477
 
5110 mandeep.dh 5478
    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 5479
    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);
5361 mandeep.dh 5480
    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)3);
4496 mandeep.dh 5481
 
5110 mandeep.dh 5482
    private InventoryItem inventoryItem; // required
4496 mandeep.dh 5483
    private ScanType type; // required
5361 mandeep.dh 5484
    private long billingWarehouseId; // required
4496 mandeep.dh 5485
 
5486
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5487
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5110 mandeep.dh 5488
      INVENTORY_ITEM((short)1, "inventoryItem"),
4496 mandeep.dh 5489
      /**
5490
       * 
5491
       * @see ScanType
5492
       */
5493
      TYPE((short)2, "type"),
5361 mandeep.dh 5494
      BILLING_WAREHOUSE_ID((short)3, "billingWarehouseId");
4496 mandeep.dh 5495
 
5496
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5497
 
5498
      static {
5499
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5500
          byName.put(field.getFieldName(), field);
5501
        }
5502
      }
5503
 
5504
      /**
5505
       * Find the _Fields constant that matches fieldId, or null if its not found.
5506
       */
5507
      public static _Fields findByThriftId(int fieldId) {
5508
        switch(fieldId) {
5110 mandeep.dh 5509
          case 1: // INVENTORY_ITEM
5510
            return INVENTORY_ITEM;
4496 mandeep.dh 5511
          case 2: // TYPE
5512
            return TYPE;
5361 mandeep.dh 5513
          case 3: // BILLING_WAREHOUSE_ID
5514
            return BILLING_WAREHOUSE_ID;
4496 mandeep.dh 5515
          default:
5516
            return null;
5517
        }
5518
      }
5519
 
5520
      /**
5521
       * Find the _Fields constant that matches fieldId, throwing an exception
5522
       * if it is not found.
5523
       */
5524
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5525
        _Fields fields = findByThriftId(fieldId);
5526
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5527
        return fields;
5528
      }
5529
 
5530
      /**
5531
       * Find the _Fields constant that matches name, or null if its not found.
5532
       */
5533
      public static _Fields findByName(String name) {
5534
        return byName.get(name);
5535
      }
5536
 
5537
      private final short _thriftId;
5538
      private final String _fieldName;
5539
 
5540
      _Fields(short thriftId, String fieldName) {
5541
        _thriftId = thriftId;
5542
        _fieldName = fieldName;
5543
      }
5544
 
5545
      public short getThriftFieldId() {
5546
        return _thriftId;
5547
      }
5548
 
5549
      public String getFieldName() {
5550
        return _fieldName;
5551
      }
5552
    }
5553
 
5554
    // isset id assignments
5361 mandeep.dh 5555
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 0;
5110 mandeep.dh 5556
    private BitSet __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 5557
 
5558
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5559
    static {
5560
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5110 mandeep.dh 5561
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5562
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4496 mandeep.dh 5563
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5564
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
5361 mandeep.dh 5565
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 5566
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5567
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5568
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItem_args.class, metaDataMap);
5569
    }
5570
 
5571
    public scanSerializedItem_args() {
5572
    }
5573
 
5574
    public scanSerializedItem_args(
5110 mandeep.dh 5575
      InventoryItem inventoryItem,
4496 mandeep.dh 5576
      ScanType type,
5361 mandeep.dh 5577
      long billingWarehouseId)
4496 mandeep.dh 5578
    {
5579
      this();
5110 mandeep.dh 5580
      this.inventoryItem = inventoryItem;
4496 mandeep.dh 5581
      this.type = type;
5361 mandeep.dh 5582
      this.billingWarehouseId = billingWarehouseId;
5583
      setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 5584
    }
5585
 
5586
    /**
5587
     * Performs a deep copy on <i>other</i>.
5588
     */
5589
    public scanSerializedItem_args(scanSerializedItem_args other) {
5590
      __isset_bit_vector.clear();
5591
      __isset_bit_vector.or(other.__isset_bit_vector);
5110 mandeep.dh 5592
      if (other.isSetInventoryItem()) {
5593
        this.inventoryItem = new InventoryItem(other.inventoryItem);
5594
      }
4496 mandeep.dh 5595
      if (other.isSetType()) {
5596
        this.type = other.type;
5597
      }
5361 mandeep.dh 5598
      this.billingWarehouseId = other.billingWarehouseId;
4496 mandeep.dh 5599
    }
5600
 
5601
    public scanSerializedItem_args deepCopy() {
5602
      return new scanSerializedItem_args(this);
5603
    }
5604
 
5605
    @Override
5606
    public void clear() {
5110 mandeep.dh 5607
      this.inventoryItem = null;
4496 mandeep.dh 5608
      this.type = null;
5361 mandeep.dh 5609
      setBillingWarehouseIdIsSet(false);
5610
      this.billingWarehouseId = 0;
4496 mandeep.dh 5611
    }
5612
 
5110 mandeep.dh 5613
    public InventoryItem getInventoryItem() {
5614
      return this.inventoryItem;
4496 mandeep.dh 5615
    }
5616
 
5110 mandeep.dh 5617
    public void setInventoryItem(InventoryItem inventoryItem) {
5618
      this.inventoryItem = inventoryItem;
4496 mandeep.dh 5619
    }
5620
 
5110 mandeep.dh 5621
    public void unsetInventoryItem() {
5622
      this.inventoryItem = null;
4496 mandeep.dh 5623
    }
5624
 
5110 mandeep.dh 5625
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
5626
    public boolean isSetInventoryItem() {
5627
      return this.inventoryItem != null;
4496 mandeep.dh 5628
    }
5629
 
5110 mandeep.dh 5630
    public void setInventoryItemIsSet(boolean value) {
5631
      if (!value) {
5632
        this.inventoryItem = null;
5633
      }
4496 mandeep.dh 5634
    }
5635
 
5636
    /**
5637
     * 
5638
     * @see ScanType
5639
     */
5640
    public ScanType getType() {
5641
      return this.type;
5642
    }
5643
 
5644
    /**
5645
     * 
5646
     * @see ScanType
5647
     */
5648
    public void setType(ScanType type) {
5649
      this.type = type;
5650
    }
5651
 
5652
    public void unsetType() {
5653
      this.type = null;
5654
    }
5655
 
5656
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
5657
    public boolean isSetType() {
5658
      return this.type != null;
5659
    }
5660
 
5661
    public void setTypeIsSet(boolean value) {
5662
      if (!value) {
5663
        this.type = null;
5664
      }
5665
    }
5666
 
5361 mandeep.dh 5667
    public long getBillingWarehouseId() {
5668
      return this.billingWarehouseId;
4496 mandeep.dh 5669
    }
5670
 
5361 mandeep.dh 5671
    public void setBillingWarehouseId(long billingWarehouseId) {
5672
      this.billingWarehouseId = billingWarehouseId;
5673
      setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 5674
    }
5675
 
5361 mandeep.dh 5676
    public void unsetBillingWarehouseId() {
5677
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 5678
    }
5679
 
5361 mandeep.dh 5680
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
5681
    public boolean isSetBillingWarehouseId() {
5682
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 5683
    }
5684
 
5361 mandeep.dh 5685
    public void setBillingWarehouseIdIsSet(boolean value) {
5686
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 5687
    }
5688
 
5689
    public void setFieldValue(_Fields field, Object value) {
5690
      switch (field) {
5110 mandeep.dh 5691
      case INVENTORY_ITEM:
4496 mandeep.dh 5692
        if (value == null) {
5110 mandeep.dh 5693
          unsetInventoryItem();
4496 mandeep.dh 5694
        } else {
5110 mandeep.dh 5695
          setInventoryItem((InventoryItem)value);
4496 mandeep.dh 5696
        }
5697
        break;
5698
 
5699
      case TYPE:
5700
        if (value == null) {
5701
          unsetType();
5702
        } else {
5703
          setType((ScanType)value);
5704
        }
5705
        break;
5706
 
5361 mandeep.dh 5707
      case BILLING_WAREHOUSE_ID:
4496 mandeep.dh 5708
        if (value == null) {
5361 mandeep.dh 5709
          unsetBillingWarehouseId();
4496 mandeep.dh 5710
        } else {
5361 mandeep.dh 5711
          setBillingWarehouseId((Long)value);
4496 mandeep.dh 5712
        }
5713
        break;
5714
 
5715
      }
5716
    }
5717
 
5718
    public Object getFieldValue(_Fields field) {
5719
      switch (field) {
5110 mandeep.dh 5720
      case INVENTORY_ITEM:
5721
        return getInventoryItem();
4496 mandeep.dh 5722
 
5723
      case TYPE:
5724
        return getType();
5725
 
5361 mandeep.dh 5726
      case BILLING_WAREHOUSE_ID:
5727
        return Long.valueOf(getBillingWarehouseId());
4496 mandeep.dh 5728
 
5729
      }
5730
      throw new IllegalStateException();
5731
    }
5732
 
5733
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5734
    public boolean isSet(_Fields field) {
5735
      if (field == null) {
5736
        throw new IllegalArgumentException();
5737
      }
5738
 
5739
      switch (field) {
5110 mandeep.dh 5740
      case INVENTORY_ITEM:
5741
        return isSetInventoryItem();
4496 mandeep.dh 5742
      case TYPE:
5743
        return isSetType();
5361 mandeep.dh 5744
      case BILLING_WAREHOUSE_ID:
5745
        return isSetBillingWarehouseId();
4496 mandeep.dh 5746
      }
5747
      throw new IllegalStateException();
5748
    }
5749
 
5750
    @Override
5751
    public boolean equals(Object that) {
5752
      if (that == null)
5753
        return false;
5754
      if (that instanceof scanSerializedItem_args)
5755
        return this.equals((scanSerializedItem_args)that);
5756
      return false;
5757
    }
5758
 
5759
    public boolean equals(scanSerializedItem_args that) {
5760
      if (that == null)
5761
        return false;
5762
 
5110 mandeep.dh 5763
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
5764
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
5765
      if (this_present_inventoryItem || that_present_inventoryItem) {
5766
        if (!(this_present_inventoryItem && that_present_inventoryItem))
4496 mandeep.dh 5767
          return false;
5110 mandeep.dh 5768
        if (!this.inventoryItem.equals(that.inventoryItem))
4496 mandeep.dh 5769
          return false;
5770
      }
5771
 
5772
      boolean this_present_type = true && this.isSetType();
5773
      boolean that_present_type = true && that.isSetType();
5774
      if (this_present_type || that_present_type) {
5775
        if (!(this_present_type && that_present_type))
5776
          return false;
5777
        if (!this.type.equals(that.type))
5778
          return false;
5779
      }
5780
 
5361 mandeep.dh 5781
      boolean this_present_billingWarehouseId = true;
5782
      boolean that_present_billingWarehouseId = true;
5783
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
5784
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
4496 mandeep.dh 5785
          return false;
5361 mandeep.dh 5786
        if (this.billingWarehouseId != that.billingWarehouseId)
4496 mandeep.dh 5787
          return false;
5788
      }
5789
 
5790
      return true;
5791
    }
5792
 
5793
    @Override
5794
    public int hashCode() {
5795
      return 0;
5796
    }
5797
 
5798
    public int compareTo(scanSerializedItem_args other) {
5799
      if (!getClass().equals(other.getClass())) {
5800
        return getClass().getName().compareTo(other.getClass().getName());
5801
      }
5802
 
5803
      int lastComparison = 0;
5804
      scanSerializedItem_args typedOther = (scanSerializedItem_args)other;
5805
 
5110 mandeep.dh 5806
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
4496 mandeep.dh 5807
      if (lastComparison != 0) {
5808
        return lastComparison;
5809
      }
5110 mandeep.dh 5810
      if (isSetInventoryItem()) {
5811
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
4496 mandeep.dh 5812
        if (lastComparison != 0) {
5813
          return lastComparison;
5814
        }
5815
      }
5816
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
5817
      if (lastComparison != 0) {
5818
        return lastComparison;
5819
      }
5820
      if (isSetType()) {
5821
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
5822
        if (lastComparison != 0) {
5823
          return lastComparison;
5824
        }
5825
      }
5361 mandeep.dh 5826
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
4496 mandeep.dh 5827
      if (lastComparison != 0) {
5828
        return lastComparison;
5829
      }
5361 mandeep.dh 5830
      if (isSetBillingWarehouseId()) {
5831
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
4496 mandeep.dh 5832
        if (lastComparison != 0) {
5833
          return lastComparison;
5834
        }
5835
      }
5836
      return 0;
5837
    }
5838
 
5839
    public _Fields fieldForId(int fieldId) {
5840
      return _Fields.findByThriftId(fieldId);
5841
    }
5842
 
5843
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5844
      org.apache.thrift.protocol.TField field;
5845
      iprot.readStructBegin();
5846
      while (true)
5847
      {
5848
        field = iprot.readFieldBegin();
5849
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5850
          break;
5851
        }
5852
        switch (field.id) {
5110 mandeep.dh 5853
          case 1: // INVENTORY_ITEM
5854
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5855
              this.inventoryItem = new InventoryItem();
5856
              this.inventoryItem.read(iprot);
4496 mandeep.dh 5857
            } else { 
5858
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5859
            }
5860
            break;
5861
          case 2: // TYPE
5862
            if (field.type == org.apache.thrift.protocol.TType.I32) {
5863
              this.type = ScanType.findByValue(iprot.readI32());
5864
            } else { 
5865
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5866
            }
5867
            break;
5361 mandeep.dh 5868
          case 3: // BILLING_WAREHOUSE_ID
4496 mandeep.dh 5869
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5361 mandeep.dh 5870
              this.billingWarehouseId = iprot.readI64();
5871
              setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 5872
            } else { 
5873
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5874
            }
5875
            break;
5876
          default:
5877
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5878
        }
5879
        iprot.readFieldEnd();
5880
      }
5881
      iprot.readStructEnd();
5882
      validate();
5883
    }
5884
 
5885
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5886
      validate();
5887
 
5888
      oprot.writeStructBegin(STRUCT_DESC);
5110 mandeep.dh 5889
      if (this.inventoryItem != null) {
5890
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
5891
        this.inventoryItem.write(oprot);
5892
        oprot.writeFieldEnd();
5893
      }
4496 mandeep.dh 5894
      if (this.type != null) {
5895
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
5896
        oprot.writeI32(this.type.getValue());
5897
        oprot.writeFieldEnd();
5898
      }
5361 mandeep.dh 5899
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
5900
      oprot.writeI64(this.billingWarehouseId);
4496 mandeep.dh 5901
      oprot.writeFieldEnd();
5902
      oprot.writeFieldStop();
5903
      oprot.writeStructEnd();
5904
    }
5905
 
5906
    @Override
5907
    public String toString() {
5908
      StringBuilder sb = new StringBuilder("scanSerializedItem_args(");
5909
      boolean first = true;
5910
 
5110 mandeep.dh 5911
      sb.append("inventoryItem:");
5912
      if (this.inventoryItem == null) {
5913
        sb.append("null");
5914
      } else {
5915
        sb.append(this.inventoryItem);
5916
      }
4496 mandeep.dh 5917
      first = false;
5918
      if (!first) sb.append(", ");
5919
      sb.append("type:");
5920
      if (this.type == null) {
5921
        sb.append("null");
5922
      } else {
5923
        sb.append(this.type);
5924
      }
5925
      first = false;
5926
      if (!first) sb.append(", ");
5361 mandeep.dh 5927
      sb.append("billingWarehouseId:");
5928
      sb.append(this.billingWarehouseId);
4496 mandeep.dh 5929
      first = false;
5930
      sb.append(")");
5931
      return sb.toString();
5932
    }
5933
 
5934
    public void validate() throws org.apache.thrift.TException {
5935
      // check for required fields
5936
    }
5937
 
5938
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5939
      try {
5940
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5941
      } catch (org.apache.thrift.TException te) {
5942
        throw new java.io.IOException(te);
5943
      }
5944
    }
5945
 
5946
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5947
      try {
5948
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
5949
        __isset_bit_vector = new BitSet(1);
5950
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5951
      } catch (org.apache.thrift.TException te) {
5952
        throw new java.io.IOException(te);
5953
      }
5954
    }
5955
 
5956
  }
5957
 
5958
  public static class scanSerializedItem_result implements org.apache.thrift.TBase<scanSerializedItem_result, scanSerializedItem_result._Fields>, java.io.Serializable, Cloneable   {
5959
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItem_result");
5960
 
5961
    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);
5962
 
5963
    private WarehouseServiceException wex; // required
5964
 
5965
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5966
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5967
      WEX((short)1, "wex");
5968
 
5969
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5970
 
5971
      static {
5972
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5973
          byName.put(field.getFieldName(), field);
5974
        }
5975
      }
5976
 
5977
      /**
5978
       * Find the _Fields constant that matches fieldId, or null if its not found.
5979
       */
5980
      public static _Fields findByThriftId(int fieldId) {
5981
        switch(fieldId) {
5982
          case 1: // WEX
5983
            return WEX;
5984
          default:
5985
            return null;
5986
        }
5987
      }
5988
 
5989
      /**
5990
       * Find the _Fields constant that matches fieldId, throwing an exception
5991
       * if it is not found.
5992
       */
5993
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5994
        _Fields fields = findByThriftId(fieldId);
5995
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5996
        return fields;
5997
      }
5998
 
5999
      /**
6000
       * Find the _Fields constant that matches name, or null if its not found.
6001
       */
6002
      public static _Fields findByName(String name) {
6003
        return byName.get(name);
6004
      }
6005
 
6006
      private final short _thriftId;
6007
      private final String _fieldName;
6008
 
6009
      _Fields(short thriftId, String fieldName) {
6010
        _thriftId = thriftId;
6011
        _fieldName = fieldName;
6012
      }
6013
 
6014
      public short getThriftFieldId() {
6015
        return _thriftId;
6016
      }
6017
 
6018
      public String getFieldName() {
6019
        return _fieldName;
6020
      }
6021
    }
6022
 
6023
    // isset id assignments
6024
 
6025
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6026
    static {
6027
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6028
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6029
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6030
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6031
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItem_result.class, metaDataMap);
6032
    }
6033
 
6034
    public scanSerializedItem_result() {
6035
    }
6036
 
6037
    public scanSerializedItem_result(
6038
      WarehouseServiceException wex)
6039
    {
6040
      this();
6041
      this.wex = wex;
6042
    }
6043
 
6044
    /**
6045
     * Performs a deep copy on <i>other</i>.
6046
     */
6047
    public scanSerializedItem_result(scanSerializedItem_result other) {
6048
      if (other.isSetWex()) {
6049
        this.wex = new WarehouseServiceException(other.wex);
6050
      }
6051
    }
6052
 
6053
    public scanSerializedItem_result deepCopy() {
6054
      return new scanSerializedItem_result(this);
6055
    }
6056
 
6057
    @Override
6058
    public void clear() {
6059
      this.wex = null;
6060
    }
6061
 
2820 chandransh 6062
    public WarehouseServiceException getWex() {
6063
      return this.wex;
6064
    }
6065
 
3430 rajveer 6066
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 6067
      this.wex = wex;
6068
    }
6069
 
6070
    public void unsetWex() {
6071
      this.wex = null;
6072
    }
6073
 
3430 rajveer 6074
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 6075
    public boolean isSetWex() {
6076
      return this.wex != null;
6077
    }
6078
 
6079
    public void setWexIsSet(boolean value) {
6080
      if (!value) {
6081
        this.wex = null;
6082
      }
6083
    }
6084
 
6085
    public void setFieldValue(_Fields field, Object value) {
6086
      switch (field) {
6087
      case WEX:
6088
        if (value == null) {
6089
          unsetWex();
6090
        } else {
6091
          setWex((WarehouseServiceException)value);
6092
        }
6093
        break;
6094
 
6095
      }
6096
    }
6097
 
6098
    public Object getFieldValue(_Fields field) {
6099
      switch (field) {
6100
      case WEX:
6101
        return getWex();
6102
 
6103
      }
6104
      throw new IllegalStateException();
6105
    }
6106
 
3430 rajveer 6107
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6108
    public boolean isSet(_Fields field) {
6109
      if (field == null) {
6110
        throw new IllegalArgumentException();
6111
      }
2820 chandransh 6112
 
6113
      switch (field) {
6114
      case WEX:
6115
        return isSetWex();
6116
      }
6117
      throw new IllegalStateException();
6118
    }
6119
 
6120
    @Override
6121
    public boolean equals(Object that) {
6122
      if (that == null)
6123
        return false;
4496 mandeep.dh 6124
      if (that instanceof scanSerializedItem_result)
6125
        return this.equals((scanSerializedItem_result)that);
2820 chandransh 6126
      return false;
6127
    }
6128
 
4496 mandeep.dh 6129
    public boolean equals(scanSerializedItem_result that) {
2820 chandransh 6130
      if (that == null)
6131
        return false;
6132
 
6133
      boolean this_present_wex = true && this.isSetWex();
6134
      boolean that_present_wex = true && that.isSetWex();
6135
      if (this_present_wex || that_present_wex) {
6136
        if (!(this_present_wex && that_present_wex))
6137
          return false;
6138
        if (!this.wex.equals(that.wex))
6139
          return false;
6140
      }
6141
 
6142
      return true;
6143
    }
6144
 
6145
    @Override
6146
    public int hashCode() {
6147
      return 0;
6148
    }
6149
 
4496 mandeep.dh 6150
    public int compareTo(scanSerializedItem_result other) {
2820 chandransh 6151
      if (!getClass().equals(other.getClass())) {
6152
        return getClass().getName().compareTo(other.getClass().getName());
6153
      }
6154
 
6155
      int lastComparison = 0;
4496 mandeep.dh 6156
      scanSerializedItem_result typedOther = (scanSerializedItem_result)other;
2820 chandransh 6157
 
3430 rajveer 6158
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 6159
      if (lastComparison != 0) {
6160
        return lastComparison;
6161
      }
3430 rajveer 6162
      if (isSetWex()) {
6163
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
6164
        if (lastComparison != 0) {
6165
          return lastComparison;
6166
        }
2820 chandransh 6167
      }
6168
      return 0;
6169
    }
6170
 
3430 rajveer 6171
    public _Fields fieldForId(int fieldId) {
6172
      return _Fields.findByThriftId(fieldId);
6173
    }
6174
 
6175
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6176
      org.apache.thrift.protocol.TField field;
2820 chandransh 6177
      iprot.readStructBegin();
6178
      while (true)
6179
      {
6180
        field = iprot.readFieldBegin();
3430 rajveer 6181
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 6182
          break;
6183
        }
3430 rajveer 6184
        switch (field.id) {
6185
          case 1: // WEX
6186
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6187
              this.wex = new WarehouseServiceException();
6188
              this.wex.read(iprot);
6189
            } else { 
6190
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6191
            }
6192
            break;
6193
          default:
6194
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 6195
        }
3430 rajveer 6196
        iprot.readFieldEnd();
2820 chandransh 6197
      }
6198
      iprot.readStructEnd();
6199
      validate();
6200
    }
6201
 
3430 rajveer 6202
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 6203
      oprot.writeStructBegin(STRUCT_DESC);
6204
 
4496 mandeep.dh 6205
      if (this.isSetWex()) {
2820 chandransh 6206
        oprot.writeFieldBegin(WEX_FIELD_DESC);
6207
        this.wex.write(oprot);
6208
        oprot.writeFieldEnd();
6209
      }
6210
      oprot.writeFieldStop();
6211
      oprot.writeStructEnd();
6212
    }
6213
 
6214
    @Override
6215
    public String toString() {
4496 mandeep.dh 6216
      StringBuilder sb = new StringBuilder("scanSerializedItem_result(");
2820 chandransh 6217
      boolean first = true;
6218
 
6219
      sb.append("wex:");
6220
      if (this.wex == null) {
6221
        sb.append("null");
6222
      } else {
6223
        sb.append(this.wex);
6224
      }
6225
      first = false;
6226
      sb.append(")");
6227
      return sb.toString();
6228
    }
6229
 
3430 rajveer 6230
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 6231
      // check for required fields
6232
    }
6233
 
3430 rajveer 6234
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6235
      try {
6236
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6237
      } catch (org.apache.thrift.TException te) {
6238
        throw new java.io.IOException(te);
6239
      }
6240
    }
6241
 
6242
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6243
      try {
6244
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6245
      } catch (org.apache.thrift.TException te) {
6246
        throw new java.io.IOException(te);
6247
      }
6248
    }
6249
 
2820 chandransh 6250
  }
6251
 
4496 mandeep.dh 6252
  public static class scan_args implements org.apache.thrift.TBase<scan_args, scan_args._Fields>, java.io.Serializable, Cloneable   {
6253
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_args");
3383 chandransh 6254
 
5361 mandeep.dh 6255
    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 6256
    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);
6257
    private static final org.apache.thrift.protocol.TField QUANTITY_FIELD_DESC = new org.apache.thrift.protocol.TField("quantity", org.apache.thrift.protocol.TType.I64, (short)3);
5361 mandeep.dh 6258
    private static final org.apache.thrift.protocol.TField BILLING_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("billingWarehouseId", org.apache.thrift.protocol.TType.I64, (short)4);
3383 chandransh 6259
 
5361 mandeep.dh 6260
    private InventoryItem inventoryItem; // required
4496 mandeep.dh 6261
    private ScanType type; // required
6262
    private long quantity; // required
5361 mandeep.dh 6263
    private long billingWarehouseId; // required
3383 chandransh 6264
 
6265
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6266
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 6267
      INVENTORY_ITEM((short)1, "inventoryItem"),
4496 mandeep.dh 6268
      /**
6269
       * 
6270
       * @see ScanType
6271
       */
6272
      TYPE((short)2, "type"),
6273
      QUANTITY((short)3, "quantity"),
5361 mandeep.dh 6274
      BILLING_WAREHOUSE_ID((short)4, "billingWarehouseId");
3383 chandransh 6275
 
6276
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6277
 
6278
      static {
6279
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6280
          byName.put(field.getFieldName(), field);
6281
        }
6282
      }
6283
 
6284
      /**
6285
       * Find the _Fields constant that matches fieldId, or null if its not found.
6286
       */
6287
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6288
        switch(fieldId) {
5361 mandeep.dh 6289
          case 1: // INVENTORY_ITEM
6290
            return INVENTORY_ITEM;
4496 mandeep.dh 6291
          case 2: // TYPE
6292
            return TYPE;
6293
          case 3: // QUANTITY
6294
            return QUANTITY;
5361 mandeep.dh 6295
          case 4: // BILLING_WAREHOUSE_ID
6296
            return BILLING_WAREHOUSE_ID;
3430 rajveer 6297
          default:
6298
            return null;
6299
        }
3383 chandransh 6300
      }
6301
 
6302
      /**
6303
       * Find the _Fields constant that matches fieldId, throwing an exception
6304
       * if it is not found.
6305
       */
6306
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6307
        _Fields fields = findByThriftId(fieldId);
6308
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6309
        return fields;
6310
      }
6311
 
6312
      /**
6313
       * Find the _Fields constant that matches name, or null if its not found.
6314
       */
6315
      public static _Fields findByName(String name) {
6316
        return byName.get(name);
6317
      }
6318
 
6319
      private final short _thriftId;
6320
      private final String _fieldName;
6321
 
6322
      _Fields(short thriftId, String fieldName) {
6323
        _thriftId = thriftId;
6324
        _fieldName = fieldName;
6325
      }
6326
 
6327
      public short getThriftFieldId() {
6328
        return _thriftId;
6329
      }
6330
 
6331
      public String getFieldName() {
6332
        return _fieldName;
6333
      }
6334
    }
6335
 
6336
    // isset id assignments
5361 mandeep.dh 6337
    private static final int __QUANTITY_ISSET_ID = 0;
6338
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 1;
6339
    private BitSet __isset_bit_vector = new BitSet(2);
3383 chandransh 6340
 
3430 rajveer 6341
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 6342
    static {
3430 rajveer 6343
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 6344
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6345
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4496 mandeep.dh 6346
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6347
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
6348
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6349
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 6350
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 6351
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 6352
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 6353
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_args.class, metaDataMap);
3383 chandransh 6354
    }
6355
 
4496 mandeep.dh 6356
    public scan_args() {
3383 chandransh 6357
    }
6358
 
4496 mandeep.dh 6359
    public scan_args(
5361 mandeep.dh 6360
      InventoryItem inventoryItem,
4496 mandeep.dh 6361
      ScanType type,
6362
      long quantity,
5361 mandeep.dh 6363
      long billingWarehouseId)
3383 chandransh 6364
    {
6365
      this();
5361 mandeep.dh 6366
      this.inventoryItem = inventoryItem;
4496 mandeep.dh 6367
      this.type = type;
6368
      this.quantity = quantity;
6369
      setQuantityIsSet(true);
5361 mandeep.dh 6370
      this.billingWarehouseId = billingWarehouseId;
6371
      setBillingWarehouseIdIsSet(true);
3383 chandransh 6372
    }
6373
 
6374
    /**
6375
     * Performs a deep copy on <i>other</i>.
6376
     */
4496 mandeep.dh 6377
    public scan_args(scan_args other) {
3383 chandransh 6378
      __isset_bit_vector.clear();
6379
      __isset_bit_vector.or(other.__isset_bit_vector);
5361 mandeep.dh 6380
      if (other.isSetInventoryItem()) {
6381
        this.inventoryItem = new InventoryItem(other.inventoryItem);
6382
      }
4496 mandeep.dh 6383
      if (other.isSetType()) {
6384
        this.type = other.type;
6385
      }
6386
      this.quantity = other.quantity;
5361 mandeep.dh 6387
      this.billingWarehouseId = other.billingWarehouseId;
3383 chandransh 6388
    }
6389
 
4496 mandeep.dh 6390
    public scan_args deepCopy() {
6391
      return new scan_args(this);
3383 chandransh 6392
    }
6393
 
3430 rajveer 6394
    @Override
6395
    public void clear() {
5361 mandeep.dh 6396
      this.inventoryItem = null;
4496 mandeep.dh 6397
      this.type = null;
6398
      setQuantityIsSet(false);
6399
      this.quantity = 0;
5361 mandeep.dh 6400
      setBillingWarehouseIdIsSet(false);
6401
      this.billingWarehouseId = 0;
3383 chandransh 6402
    }
6403
 
5361 mandeep.dh 6404
    public InventoryItem getInventoryItem() {
6405
      return this.inventoryItem;
3383 chandransh 6406
    }
6407
 
5361 mandeep.dh 6408
    public void setInventoryItem(InventoryItem inventoryItem) {
6409
      this.inventoryItem = inventoryItem;
3383 chandransh 6410
    }
6411
 
5361 mandeep.dh 6412
    public void unsetInventoryItem() {
6413
      this.inventoryItem = null;
3383 chandransh 6414
    }
6415
 
5361 mandeep.dh 6416
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
6417
    public boolean isSetInventoryItem() {
6418
      return this.inventoryItem != null;
3383 chandransh 6419
    }
6420
 
5361 mandeep.dh 6421
    public void setInventoryItemIsSet(boolean value) {
6422
      if (!value) {
6423
        this.inventoryItem = null;
6424
      }
3383 chandransh 6425
    }
6426
 
4496 mandeep.dh 6427
    /**
6428
     * 
6429
     * @see ScanType
6430
     */
6431
    public ScanType getType() {
6432
      return this.type;
3383 chandransh 6433
    }
6434
 
4496 mandeep.dh 6435
    /**
6436
     * 
6437
     * @see ScanType
6438
     */
6439
    public void setType(ScanType type) {
6440
      this.type = type;
3383 chandransh 6441
    }
6442
 
4496 mandeep.dh 6443
    public void unsetType() {
6444
      this.type = null;
3383 chandransh 6445
    }
6446
 
4496 mandeep.dh 6447
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
6448
    public boolean isSetType() {
6449
      return this.type != null;
3383 chandransh 6450
    }
6451
 
4496 mandeep.dh 6452
    public void setTypeIsSet(boolean value) {
6453
      if (!value) {
6454
        this.type = null;
6455
      }
3383 chandransh 6456
    }
6457
 
4496 mandeep.dh 6458
    public long getQuantity() {
6459
      return this.quantity;
6460
    }
6461
 
6462
    public void setQuantity(long quantity) {
6463
      this.quantity = quantity;
6464
      setQuantityIsSet(true);
6465
    }
6466
 
6467
    public void unsetQuantity() {
6468
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
6469
    }
6470
 
6471
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
6472
    public boolean isSetQuantity() {
6473
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
6474
    }
6475
 
6476
    public void setQuantityIsSet(boolean value) {
6477
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
6478
    }
6479
 
5361 mandeep.dh 6480
    public long getBillingWarehouseId() {
6481
      return this.billingWarehouseId;
4496 mandeep.dh 6482
    }
6483
 
5361 mandeep.dh 6484
    public void setBillingWarehouseId(long billingWarehouseId) {
6485
      this.billingWarehouseId = billingWarehouseId;
6486
      setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 6487
    }
6488
 
5361 mandeep.dh 6489
    public void unsetBillingWarehouseId() {
6490
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 6491
    }
6492
 
5361 mandeep.dh 6493
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
6494
    public boolean isSetBillingWarehouseId() {
6495
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 6496
    }
6497
 
5361 mandeep.dh 6498
    public void setBillingWarehouseIdIsSet(boolean value) {
6499
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 6500
    }
6501
 
3383 chandransh 6502
    public void setFieldValue(_Fields field, Object value) {
6503
      switch (field) {
5361 mandeep.dh 6504
      case INVENTORY_ITEM:
3383 chandransh 6505
        if (value == null) {
5361 mandeep.dh 6506
          unsetInventoryItem();
3383 chandransh 6507
        } else {
5361 mandeep.dh 6508
          setInventoryItem((InventoryItem)value);
3383 chandransh 6509
        }
6510
        break;
6511
 
4496 mandeep.dh 6512
      case TYPE:
3383 chandransh 6513
        if (value == null) {
4496 mandeep.dh 6514
          unsetType();
3383 chandransh 6515
        } else {
4496 mandeep.dh 6516
          setType((ScanType)value);
3383 chandransh 6517
        }
6518
        break;
6519
 
4496 mandeep.dh 6520
      case QUANTITY:
6521
        if (value == null) {
6522
          unsetQuantity();
6523
        } else {
6524
          setQuantity((Long)value);
6525
        }
6526
        break;
6527
 
5361 mandeep.dh 6528
      case BILLING_WAREHOUSE_ID:
4496 mandeep.dh 6529
        if (value == null) {
5361 mandeep.dh 6530
          unsetBillingWarehouseId();
4496 mandeep.dh 6531
        } else {
5361 mandeep.dh 6532
          setBillingWarehouseId((Long)value);
4496 mandeep.dh 6533
        }
6534
        break;
6535
 
3383 chandransh 6536
      }
6537
    }
6538
 
6539
    public Object getFieldValue(_Fields field) {
6540
      switch (field) {
5361 mandeep.dh 6541
      case INVENTORY_ITEM:
6542
        return getInventoryItem();
3383 chandransh 6543
 
4496 mandeep.dh 6544
      case TYPE:
6545
        return getType();
3383 chandransh 6546
 
4496 mandeep.dh 6547
      case QUANTITY:
6548
        return Long.valueOf(getQuantity());
6549
 
5361 mandeep.dh 6550
      case BILLING_WAREHOUSE_ID:
6551
        return Long.valueOf(getBillingWarehouseId());
4496 mandeep.dh 6552
 
3383 chandransh 6553
      }
6554
      throw new IllegalStateException();
6555
    }
6556
 
3430 rajveer 6557
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6558
    public boolean isSet(_Fields field) {
6559
      if (field == null) {
6560
        throw new IllegalArgumentException();
6561
      }
3383 chandransh 6562
 
6563
      switch (field) {
5361 mandeep.dh 6564
      case INVENTORY_ITEM:
6565
        return isSetInventoryItem();
4496 mandeep.dh 6566
      case TYPE:
6567
        return isSetType();
6568
      case QUANTITY:
6569
        return isSetQuantity();
5361 mandeep.dh 6570
      case BILLING_WAREHOUSE_ID:
6571
        return isSetBillingWarehouseId();
3383 chandransh 6572
      }
6573
      throw new IllegalStateException();
6574
    }
6575
 
6576
    @Override
6577
    public boolean equals(Object that) {
6578
      if (that == null)
6579
        return false;
4496 mandeep.dh 6580
      if (that instanceof scan_args)
6581
        return this.equals((scan_args)that);
3383 chandransh 6582
      return false;
6583
    }
6584
 
4496 mandeep.dh 6585
    public boolean equals(scan_args that) {
3383 chandransh 6586
      if (that == null)
6587
        return false;
6588
 
5361 mandeep.dh 6589
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
6590
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
6591
      if (this_present_inventoryItem || that_present_inventoryItem) {
6592
        if (!(this_present_inventoryItem && that_present_inventoryItem))
3383 chandransh 6593
          return false;
5361 mandeep.dh 6594
        if (!this.inventoryItem.equals(that.inventoryItem))
3383 chandransh 6595
          return false;
6596
      }
6597
 
4496 mandeep.dh 6598
      boolean this_present_type = true && this.isSetType();
6599
      boolean that_present_type = true && that.isSetType();
6600
      if (this_present_type || that_present_type) {
6601
        if (!(this_present_type && that_present_type))
3383 chandransh 6602
          return false;
4496 mandeep.dh 6603
        if (!this.type.equals(that.type))
3383 chandransh 6604
          return false;
6605
      }
6606
 
4496 mandeep.dh 6607
      boolean this_present_quantity = true;
6608
      boolean that_present_quantity = true;
6609
      if (this_present_quantity || that_present_quantity) {
6610
        if (!(this_present_quantity && that_present_quantity))
6611
          return false;
6612
        if (this.quantity != that.quantity)
6613
          return false;
6614
      }
6615
 
5361 mandeep.dh 6616
      boolean this_present_billingWarehouseId = true;
6617
      boolean that_present_billingWarehouseId = true;
6618
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
6619
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
4496 mandeep.dh 6620
          return false;
5361 mandeep.dh 6621
        if (this.billingWarehouseId != that.billingWarehouseId)
4496 mandeep.dh 6622
          return false;
6623
      }
6624
 
3383 chandransh 6625
      return true;
6626
    }
6627
 
6628
    @Override
6629
    public int hashCode() {
6630
      return 0;
6631
    }
6632
 
4496 mandeep.dh 6633
    public int compareTo(scan_args other) {
3383 chandransh 6634
      if (!getClass().equals(other.getClass())) {
6635
        return getClass().getName().compareTo(other.getClass().getName());
6636
      }
6637
 
6638
      int lastComparison = 0;
4496 mandeep.dh 6639
      scan_args typedOther = (scan_args)other;
3383 chandransh 6640
 
5361 mandeep.dh 6641
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
3383 chandransh 6642
      if (lastComparison != 0) {
6643
        return lastComparison;
6644
      }
5361 mandeep.dh 6645
      if (isSetInventoryItem()) {
6646
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
3430 rajveer 6647
        if (lastComparison != 0) {
6648
          return lastComparison;
6649
        }
3383 chandransh 6650
      }
4496 mandeep.dh 6651
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
3383 chandransh 6652
      if (lastComparison != 0) {
6653
        return lastComparison;
6654
      }
4496 mandeep.dh 6655
      if (isSetType()) {
6656
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 6657
        if (lastComparison != 0) {
6658
          return lastComparison;
6659
        }
3383 chandransh 6660
      }
4496 mandeep.dh 6661
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
6662
      if (lastComparison != 0) {
6663
        return lastComparison;
6664
      }
6665
      if (isSetQuantity()) {
6666
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
6667
        if (lastComparison != 0) {
6668
          return lastComparison;
6669
        }
6670
      }
5361 mandeep.dh 6671
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
4496 mandeep.dh 6672
      if (lastComparison != 0) {
6673
        return lastComparison;
6674
      }
5361 mandeep.dh 6675
      if (isSetBillingWarehouseId()) {
6676
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
4496 mandeep.dh 6677
        if (lastComparison != 0) {
6678
          return lastComparison;
6679
        }
6680
      }
3383 chandransh 6681
      return 0;
6682
    }
6683
 
3430 rajveer 6684
    public _Fields fieldForId(int fieldId) {
6685
      return _Fields.findByThriftId(fieldId);
6686
    }
6687
 
6688
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6689
      org.apache.thrift.protocol.TField field;
3383 chandransh 6690
      iprot.readStructBegin();
6691
      while (true)
6692
      {
6693
        field = iprot.readFieldBegin();
3430 rajveer 6694
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 6695
          break;
6696
        }
3430 rajveer 6697
        switch (field.id) {
5361 mandeep.dh 6698
          case 1: // INVENTORY_ITEM
6699
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6700
              this.inventoryItem = new InventoryItem();
6701
              this.inventoryItem.read(iprot);
3430 rajveer 6702
            } else { 
6703
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6704
            }
6705
            break;
4496 mandeep.dh 6706
          case 2: // TYPE
6707
            if (field.type == org.apache.thrift.protocol.TType.I32) {
6708
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 6709
            } else { 
6710
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6711
            }
6712
            break;
4496 mandeep.dh 6713
          case 3: // QUANTITY
6714
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6715
              this.quantity = iprot.readI64();
6716
              setQuantityIsSet(true);
6717
            } else { 
6718
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6719
            }
6720
            break;
5361 mandeep.dh 6721
          case 4: // BILLING_WAREHOUSE_ID
4496 mandeep.dh 6722
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5361 mandeep.dh 6723
              this.billingWarehouseId = iprot.readI64();
6724
              setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 6725
            } else { 
6726
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6727
            }
6728
            break;
3430 rajveer 6729
          default:
6730
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 6731
        }
3430 rajveer 6732
        iprot.readFieldEnd();
3383 chandransh 6733
      }
6734
      iprot.readStructEnd();
6735
      validate();
6736
    }
6737
 
3430 rajveer 6738
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 6739
      validate();
6740
 
6741
      oprot.writeStructBegin(STRUCT_DESC);
5361 mandeep.dh 6742
      if (this.inventoryItem != null) {
6743
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
6744
        this.inventoryItem.write(oprot);
6745
        oprot.writeFieldEnd();
6746
      }
4496 mandeep.dh 6747
      if (this.type != null) {
6748
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
6749
        oprot.writeI32(this.type.getValue());
6750
        oprot.writeFieldEnd();
6751
      }
6752
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
6753
      oprot.writeI64(this.quantity);
3383 chandransh 6754
      oprot.writeFieldEnd();
5361 mandeep.dh 6755
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
6756
      oprot.writeI64(this.billingWarehouseId);
4496 mandeep.dh 6757
      oprot.writeFieldEnd();
3383 chandransh 6758
      oprot.writeFieldStop();
6759
      oprot.writeStructEnd();
6760
    }
6761
 
6762
    @Override
6763
    public String toString() {
4496 mandeep.dh 6764
      StringBuilder sb = new StringBuilder("scan_args(");
3383 chandransh 6765
      boolean first = true;
6766
 
5361 mandeep.dh 6767
      sb.append("inventoryItem:");
6768
      if (this.inventoryItem == null) {
6769
        sb.append("null");
6770
      } else {
6771
        sb.append(this.inventoryItem);
6772
      }
3383 chandransh 6773
      first = false;
6774
      if (!first) sb.append(", ");
4496 mandeep.dh 6775
      sb.append("type:");
6776
      if (this.type == null) {
6777
        sb.append("null");
6778
      } else {
6779
        sb.append(this.type);
6780
      }
3383 chandransh 6781
      first = false;
4496 mandeep.dh 6782
      if (!first) sb.append(", ");
6783
      sb.append("quantity:");
6784
      sb.append(this.quantity);
6785
      first = false;
6786
      if (!first) sb.append(", ");
5361 mandeep.dh 6787
      sb.append("billingWarehouseId:");
6788
      sb.append(this.billingWarehouseId);
4496 mandeep.dh 6789
      first = false;
3383 chandransh 6790
      sb.append(")");
6791
      return sb.toString();
6792
    }
6793
 
3430 rajveer 6794
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 6795
      // check for required fields
6796
    }
6797
 
3430 rajveer 6798
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6799
      try {
6800
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6801
      } catch (org.apache.thrift.TException te) {
6802
        throw new java.io.IOException(te);
6803
      }
6804
    }
6805
 
6806
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6807
      try {
4496 mandeep.dh 6808
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6809
        __isset_bit_vector = new BitSet(1);
3430 rajveer 6810
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6811
      } catch (org.apache.thrift.TException te) {
6812
        throw new java.io.IOException(te);
6813
      }
6814
    }
6815
 
3383 chandransh 6816
  }
6817
 
4496 mandeep.dh 6818
  public static class scan_result implements org.apache.thrift.TBase<scan_result, scan_result._Fields>, java.io.Serializable, Cloneable   {
6819
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_result");
3383 chandransh 6820
 
3430 rajveer 6821
    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 6822
 
3430 rajveer 6823
    private WarehouseServiceException wex; // required
3383 chandransh 6824
 
6825
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6826
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3383 chandransh 6827
      WEX((short)1, "wex");
6828
 
6829
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6830
 
6831
      static {
6832
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6833
          byName.put(field.getFieldName(), field);
6834
        }
6835
      }
6836
 
6837
      /**
6838
       * Find the _Fields constant that matches fieldId, or null if its not found.
6839
       */
6840
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6841
        switch(fieldId) {
6842
          case 1: // WEX
6843
            return WEX;
6844
          default:
6845
            return null;
6846
        }
3383 chandransh 6847
      }
6848
 
6849
      /**
6850
       * Find the _Fields constant that matches fieldId, throwing an exception
6851
       * if it is not found.
6852
       */
6853
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6854
        _Fields fields = findByThriftId(fieldId);
6855
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6856
        return fields;
6857
      }
6858
 
6859
      /**
6860
       * Find the _Fields constant that matches name, or null if its not found.
6861
       */
6862
      public static _Fields findByName(String name) {
6863
        return byName.get(name);
6864
      }
6865
 
6866
      private final short _thriftId;
6867
      private final String _fieldName;
6868
 
6869
      _Fields(short thriftId, String fieldName) {
6870
        _thriftId = thriftId;
6871
        _fieldName = fieldName;
6872
      }
6873
 
6874
      public short getThriftFieldId() {
6875
        return _thriftId;
6876
      }
6877
 
6878
      public String getFieldName() {
6879
        return _fieldName;
6880
      }
6881
    }
6882
 
6883
    // isset id assignments
6884
 
3430 rajveer 6885
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 6886
    static {
3430 rajveer 6887
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6888
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6889
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6890
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 6891
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_result.class, metaDataMap);
3383 chandransh 6892
    }
6893
 
4496 mandeep.dh 6894
    public scan_result() {
3383 chandransh 6895
    }
6896
 
4496 mandeep.dh 6897
    public scan_result(
3383 chandransh 6898
      WarehouseServiceException wex)
6899
    {
6900
      this();
6901
      this.wex = wex;
6902
    }
6903
 
6904
    /**
6905
     * Performs a deep copy on <i>other</i>.
6906
     */
4496 mandeep.dh 6907
    public scan_result(scan_result other) {
3383 chandransh 6908
      if (other.isSetWex()) {
6909
        this.wex = new WarehouseServiceException(other.wex);
6910
      }
6911
    }
6912
 
4496 mandeep.dh 6913
    public scan_result deepCopy() {
6914
      return new scan_result(this);
3383 chandransh 6915
    }
6916
 
3430 rajveer 6917
    @Override
6918
    public void clear() {
6919
      this.wex = null;
3383 chandransh 6920
    }
6921
 
6922
    public WarehouseServiceException getWex() {
6923
      return this.wex;
6924
    }
6925
 
3430 rajveer 6926
    public void setWex(WarehouseServiceException wex) {
3383 chandransh 6927
      this.wex = wex;
6928
    }
6929
 
6930
    public void unsetWex() {
6931
      this.wex = null;
6932
    }
6933
 
3430 rajveer 6934
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3383 chandransh 6935
    public boolean isSetWex() {
6936
      return this.wex != null;
6937
    }
6938
 
6939
    public void setWexIsSet(boolean value) {
6940
      if (!value) {
6941
        this.wex = null;
6942
      }
6943
    }
6944
 
6945
    public void setFieldValue(_Fields field, Object value) {
6946
      switch (field) {
6947
      case WEX:
6948
        if (value == null) {
6949
          unsetWex();
6950
        } else {
6951
          setWex((WarehouseServiceException)value);
6952
        }
6953
        break;
6954
 
6955
      }
6956
    }
6957
 
6958
    public Object getFieldValue(_Fields field) {
6959
      switch (field) {
6960
      case WEX:
6961
        return getWex();
6962
 
6963
      }
6964
      throw new IllegalStateException();
6965
    }
6966
 
3430 rajveer 6967
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6968
    public boolean isSet(_Fields field) {
6969
      if (field == null) {
6970
        throw new IllegalArgumentException();
6971
      }
3383 chandransh 6972
 
6973
      switch (field) {
6974
      case WEX:
6975
        return isSetWex();
6976
      }
6977
      throw new IllegalStateException();
6978
    }
6979
 
6980
    @Override
6981
    public boolean equals(Object that) {
6982
      if (that == null)
6983
        return false;
4496 mandeep.dh 6984
      if (that instanceof scan_result)
6985
        return this.equals((scan_result)that);
3383 chandransh 6986
      return false;
6987
    }
6988
 
4496 mandeep.dh 6989
    public boolean equals(scan_result that) {
3383 chandransh 6990
      if (that == null)
6991
        return false;
6992
 
6993
      boolean this_present_wex = true && this.isSetWex();
6994
      boolean that_present_wex = true && that.isSetWex();
6995
      if (this_present_wex || that_present_wex) {
6996
        if (!(this_present_wex && that_present_wex))
6997
          return false;
6998
        if (!this.wex.equals(that.wex))
6999
          return false;
7000
      }
7001
 
7002
      return true;
7003
    }
7004
 
7005
    @Override
7006
    public int hashCode() {
7007
      return 0;
7008
    }
7009
 
4496 mandeep.dh 7010
    public int compareTo(scan_result other) {
3383 chandransh 7011
      if (!getClass().equals(other.getClass())) {
7012
        return getClass().getName().compareTo(other.getClass().getName());
7013
      }
7014
 
7015
      int lastComparison = 0;
4496 mandeep.dh 7016
      scan_result typedOther = (scan_result)other;
3383 chandransh 7017
 
3430 rajveer 7018
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
3383 chandransh 7019
      if (lastComparison != 0) {
7020
        return lastComparison;
7021
      }
3430 rajveer 7022
      if (isSetWex()) {
7023
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
7024
        if (lastComparison != 0) {
7025
          return lastComparison;
7026
        }
3383 chandransh 7027
      }
7028
      return 0;
7029
    }
7030
 
3430 rajveer 7031
    public _Fields fieldForId(int fieldId) {
7032
      return _Fields.findByThriftId(fieldId);
7033
    }
7034
 
7035
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7036
      org.apache.thrift.protocol.TField field;
3383 chandransh 7037
      iprot.readStructBegin();
7038
      while (true)
7039
      {
7040
        field = iprot.readFieldBegin();
3430 rajveer 7041
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 7042
          break;
7043
        }
3430 rajveer 7044
        switch (field.id) {
7045
          case 1: // WEX
7046
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7047
              this.wex = new WarehouseServiceException();
7048
              this.wex.read(iprot);
7049
            } else { 
7050
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7051
            }
7052
            break;
7053
          default:
7054
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 7055
        }
3430 rajveer 7056
        iprot.readFieldEnd();
3383 chandransh 7057
      }
7058
      iprot.readStructEnd();
7059
      validate();
7060
    }
7061
 
3430 rajveer 7062
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 7063
      oprot.writeStructBegin(STRUCT_DESC);
7064
 
4496 mandeep.dh 7065
      if (this.isSetWex()) {
3383 chandransh 7066
        oprot.writeFieldBegin(WEX_FIELD_DESC);
7067
        this.wex.write(oprot);
7068
        oprot.writeFieldEnd();
7069
      }
7070
      oprot.writeFieldStop();
7071
      oprot.writeStructEnd();
7072
    }
7073
 
7074
    @Override
7075
    public String toString() {
4496 mandeep.dh 7076
      StringBuilder sb = new StringBuilder("scan_result(");
3383 chandransh 7077
      boolean first = true;
7078
 
7079
      sb.append("wex:");
7080
      if (this.wex == null) {
7081
        sb.append("null");
7082
      } else {
7083
        sb.append(this.wex);
7084
      }
7085
      first = false;
7086
      sb.append(")");
7087
      return sb.toString();
7088
    }
7089
 
3430 rajveer 7090
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 7091
      // check for required fields
7092
    }
7093
 
3430 rajveer 7094
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7095
      try {
7096
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7097
      } catch (org.apache.thrift.TException te) {
7098
        throw new java.io.IOException(te);
7099
      }
7100
    }
7101
 
7102
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7103
      try {
7104
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7105
      } catch (org.apache.thrift.TException te) {
7106
        throw new java.io.IOException(te);
7107
      }
7108
    }
7109
 
3383 chandransh 7110
  }
7111
 
4496 mandeep.dh 7112
  public static class scanSerializedItemForOrder_args implements org.apache.thrift.TBase<scanSerializedItemForOrder_args, scanSerializedItemForOrder_args._Fields>, java.io.Serializable, Cloneable   {
7113
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_args");
2820 chandransh 7114
 
4555 mandeep.dh 7115
    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 7116
    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);
7117
    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 7118
    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);
7119
    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);
7120
    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 7121
 
4555 mandeep.dh 7122
    private String serialNumber; // required
3430 rajveer 7123
    private ScanType type; // required
4496 mandeep.dh 7124
    private long orderId; // required
5110 mandeep.dh 7125
    private long fulfilmentWarehouseId; // required
7126
    private double quantity; // required
7127
    private long billingWarehouseId; // required
2820 chandransh 7128
 
7129
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 7130
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 7131
      SERIAL_NUMBER((short)1, "serialNumber"),
2820 chandransh 7132
      /**
7133
       * 
7134
       * @see ScanType
7135
       */
4496 mandeep.dh 7136
      TYPE((short)2, "type"),
7137
      ORDER_ID((short)3, "orderId"),
5110 mandeep.dh 7138
      FULFILMENT_WAREHOUSE_ID((short)4, "fulfilmentWarehouseId"),
7139
      QUANTITY((short)5, "quantity"),
7140
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 7141
 
7142
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7143
 
7144
      static {
7145
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7146
          byName.put(field.getFieldName(), field);
7147
        }
7148
      }
7149
 
7150
      /**
7151
       * Find the _Fields constant that matches fieldId, or null if its not found.
7152
       */
7153
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 7154
        switch(fieldId) {
4555 mandeep.dh 7155
          case 1: // SERIAL_NUMBER
7156
            return SERIAL_NUMBER;
4496 mandeep.dh 7157
          case 2: // TYPE
3430 rajveer 7158
            return TYPE;
4496 mandeep.dh 7159
          case 3: // ORDER_ID
7160
            return ORDER_ID;
5110 mandeep.dh 7161
          case 4: // FULFILMENT_WAREHOUSE_ID
7162
            return FULFILMENT_WAREHOUSE_ID;
7163
          case 5: // QUANTITY
7164
            return QUANTITY;
7165
          case 6: // BILLING_WAREHOUSE_ID
7166
            return BILLING_WAREHOUSE_ID;
3430 rajveer 7167
          default:
7168
            return null;
7169
        }
2820 chandransh 7170
      }
7171
 
7172
      /**
7173
       * Find the _Fields constant that matches fieldId, throwing an exception
7174
       * if it is not found.
7175
       */
7176
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7177
        _Fields fields = findByThriftId(fieldId);
7178
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7179
        return fields;
7180
      }
7181
 
7182
      /**
7183
       * Find the _Fields constant that matches name, or null if its not found.
7184
       */
7185
      public static _Fields findByName(String name) {
7186
        return byName.get(name);
7187
      }
7188
 
7189
      private final short _thriftId;
7190
      private final String _fieldName;
7191
 
7192
      _Fields(short thriftId, String fieldName) {
7193
        _thriftId = thriftId;
7194
        _fieldName = fieldName;
7195
      }
7196
 
7197
      public short getThriftFieldId() {
7198
        return _thriftId;
7199
      }
7200
 
7201
      public String getFieldName() {
7202
        return _fieldName;
7203
      }
7204
    }
7205
 
7206
    // isset id assignments
4555 mandeep.dh 7207
    private static final int __ORDERID_ISSET_ID = 0;
5110 mandeep.dh 7208
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 1;
7209
    private static final int __QUANTITY_ISSET_ID = 2;
7210
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
7211
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 7212
 
3430 rajveer 7213
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 7214
    static {
3430 rajveer 7215
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4555 mandeep.dh 7216
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7217
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 7218
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7219
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 7220
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7221
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 7222
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 7223
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 7224
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7225
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
7226
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7227
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 7228
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 7229
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_args.class, metaDataMap);
2820 chandransh 7230
    }
7231
 
4496 mandeep.dh 7232
    public scanSerializedItemForOrder_args() {
2820 chandransh 7233
    }
7234
 
4496 mandeep.dh 7235
    public scanSerializedItemForOrder_args(
4555 mandeep.dh 7236
      String serialNumber,
4496 mandeep.dh 7237
      ScanType type,
7238
      long orderId,
5110 mandeep.dh 7239
      long fulfilmentWarehouseId,
7240
      double quantity,
7241
      long billingWarehouseId)
2820 chandransh 7242
    {
7243
      this();
4555 mandeep.dh 7244
      this.serialNumber = serialNumber;
2820 chandransh 7245
      this.type = type;
4496 mandeep.dh 7246
      this.orderId = orderId;
7247
      setOrderIdIsSet(true);
5110 mandeep.dh 7248
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
7249
      setFulfilmentWarehouseIdIsSet(true);
7250
      this.quantity = quantity;
7251
      setQuantityIsSet(true);
7252
      this.billingWarehouseId = billingWarehouseId;
7253
      setBillingWarehouseIdIsSet(true);
2820 chandransh 7254
    }
7255
 
7256
    /**
7257
     * Performs a deep copy on <i>other</i>.
7258
     */
4496 mandeep.dh 7259
    public scanSerializedItemForOrder_args(scanSerializedItemForOrder_args other) {
2820 chandransh 7260
      __isset_bit_vector.clear();
7261
      __isset_bit_vector.or(other.__isset_bit_vector);
4555 mandeep.dh 7262
      if (other.isSetSerialNumber()) {
7263
        this.serialNumber = other.serialNumber;
7264
      }
2820 chandransh 7265
      if (other.isSetType()) {
7266
        this.type = other.type;
7267
      }
4496 mandeep.dh 7268
      this.orderId = other.orderId;
5110 mandeep.dh 7269
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
7270
      this.quantity = other.quantity;
7271
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 7272
    }
7273
 
4496 mandeep.dh 7274
    public scanSerializedItemForOrder_args deepCopy() {
7275
      return new scanSerializedItemForOrder_args(this);
2820 chandransh 7276
    }
7277
 
3430 rajveer 7278
    @Override
7279
    public void clear() {
4555 mandeep.dh 7280
      this.serialNumber = null;
3430 rajveer 7281
      this.type = null;
4496 mandeep.dh 7282
      setOrderIdIsSet(false);
7283
      this.orderId = 0;
5110 mandeep.dh 7284
      setFulfilmentWarehouseIdIsSet(false);
7285
      this.fulfilmentWarehouseId = 0;
7286
      setQuantityIsSet(false);
7287
      this.quantity = 0.0;
7288
      setBillingWarehouseIdIsSet(false);
7289
      this.billingWarehouseId = 0;
2820 chandransh 7290
    }
7291
 
4555 mandeep.dh 7292
    public String getSerialNumber() {
7293
      return this.serialNumber;
2820 chandransh 7294
    }
7295
 
4555 mandeep.dh 7296
    public void setSerialNumber(String serialNumber) {
7297
      this.serialNumber = serialNumber;
2820 chandransh 7298
    }
7299
 
4555 mandeep.dh 7300
    public void unsetSerialNumber() {
7301
      this.serialNumber = null;
2820 chandransh 7302
    }
7303
 
4555 mandeep.dh 7304
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
7305
    public boolean isSetSerialNumber() {
7306
      return this.serialNumber != null;
2820 chandransh 7307
    }
7308
 
4555 mandeep.dh 7309
    public void setSerialNumberIsSet(boolean value) {
7310
      if (!value) {
7311
        this.serialNumber = null;
7312
      }
2820 chandransh 7313
    }
7314
 
4496 mandeep.dh 7315
    /**
7316
     * 
7317
     * @see ScanType
7318
     */
7319
    public ScanType getType() {
7320
      return this.type;
2820 chandransh 7321
    }
7322
 
4496 mandeep.dh 7323
    /**
7324
     * 
7325
     * @see ScanType
7326
     */
7327
    public void setType(ScanType type) {
7328
      this.type = type;
2820 chandransh 7329
    }
7330
 
4496 mandeep.dh 7331
    public void unsetType() {
7332
      this.type = null;
2820 chandransh 7333
    }
7334
 
4496 mandeep.dh 7335
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
7336
    public boolean isSetType() {
7337
      return this.type != null;
2820 chandransh 7338
    }
7339
 
4496 mandeep.dh 7340
    public void setTypeIsSet(boolean value) {
2820 chandransh 7341
      if (!value) {
4496 mandeep.dh 7342
        this.type = null;
2820 chandransh 7343
      }
7344
    }
7345
 
4496 mandeep.dh 7346
    public long getOrderId() {
7347
      return this.orderId;
2820 chandransh 7348
    }
7349
 
4496 mandeep.dh 7350
    public void setOrderId(long orderId) {
7351
      this.orderId = orderId;
7352
      setOrderIdIsSet(true);
2820 chandransh 7353
    }
7354
 
4496 mandeep.dh 7355
    public void unsetOrderId() {
7356
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
2820 chandransh 7357
    }
7358
 
4496 mandeep.dh 7359
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
7360
    public boolean isSetOrderId() {
7361
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
2820 chandransh 7362
    }
7363
 
4496 mandeep.dh 7364
    public void setOrderIdIsSet(boolean value) {
7365
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
2820 chandransh 7366
    }
7367
 
5110 mandeep.dh 7368
    public long getFulfilmentWarehouseId() {
7369
      return this.fulfilmentWarehouseId;
2820 chandransh 7370
    }
7371
 
5110 mandeep.dh 7372
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
7373
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
7374
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 7375
    }
7376
 
5110 mandeep.dh 7377
    public void unsetFulfilmentWarehouseId() {
7378
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 7379
    }
7380
 
5110 mandeep.dh 7381
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
7382
    public boolean isSetFulfilmentWarehouseId() {
7383
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 7384
    }
7385
 
5110 mandeep.dh 7386
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
7387
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
2820 chandransh 7388
    }
7389
 
5110 mandeep.dh 7390
    public double getQuantity() {
7391
      return this.quantity;
7392
    }
7393
 
7394
    public void setQuantity(double quantity) {
7395
      this.quantity = quantity;
7396
      setQuantityIsSet(true);
7397
    }
7398
 
7399
    public void unsetQuantity() {
7400
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
7401
    }
7402
 
7403
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
7404
    public boolean isSetQuantity() {
7405
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
7406
    }
7407
 
7408
    public void setQuantityIsSet(boolean value) {
7409
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
7410
    }
7411
 
7412
    public long getBillingWarehouseId() {
7413
      return this.billingWarehouseId;
7414
    }
7415
 
7416
    public void setBillingWarehouseId(long billingWarehouseId) {
7417
      this.billingWarehouseId = billingWarehouseId;
7418
      setBillingWarehouseIdIsSet(true);
7419
    }
7420
 
7421
    public void unsetBillingWarehouseId() {
7422
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
7423
    }
7424
 
7425
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
7426
    public boolean isSetBillingWarehouseId() {
7427
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
7428
    }
7429
 
7430
    public void setBillingWarehouseIdIsSet(boolean value) {
7431
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
7432
    }
7433
 
2820 chandransh 7434
    public void setFieldValue(_Fields field, Object value) {
7435
      switch (field) {
4555 mandeep.dh 7436
      case SERIAL_NUMBER:
2820 chandransh 7437
        if (value == null) {
4555 mandeep.dh 7438
          unsetSerialNumber();
2820 chandransh 7439
        } else {
4555 mandeep.dh 7440
          setSerialNumber((String)value);
2820 chandransh 7441
        }
7442
        break;
7443
 
4496 mandeep.dh 7444
      case TYPE:
2820 chandransh 7445
        if (value == null) {
4496 mandeep.dh 7446
          unsetType();
2820 chandransh 7447
        } else {
4496 mandeep.dh 7448
          setType((ScanType)value);
2820 chandransh 7449
        }
7450
        break;
7451
 
4496 mandeep.dh 7452
      case ORDER_ID:
2820 chandransh 7453
        if (value == null) {
4496 mandeep.dh 7454
          unsetOrderId();
2820 chandransh 7455
        } else {
4496 mandeep.dh 7456
          setOrderId((Long)value);
2820 chandransh 7457
        }
7458
        break;
7459
 
5110 mandeep.dh 7460
      case FULFILMENT_WAREHOUSE_ID:
2820 chandransh 7461
        if (value == null) {
5110 mandeep.dh 7462
          unsetFulfilmentWarehouseId();
2820 chandransh 7463
        } else {
5110 mandeep.dh 7464
          setFulfilmentWarehouseId((Long)value);
2820 chandransh 7465
        }
7466
        break;
7467
 
5110 mandeep.dh 7468
      case QUANTITY:
7469
        if (value == null) {
7470
          unsetQuantity();
7471
        } else {
7472
          setQuantity((Double)value);
7473
        }
7474
        break;
7475
 
7476
      case BILLING_WAREHOUSE_ID:
7477
        if (value == null) {
7478
          unsetBillingWarehouseId();
7479
        } else {
7480
          setBillingWarehouseId((Long)value);
7481
        }
7482
        break;
7483
 
2820 chandransh 7484
      }
7485
    }
7486
 
7487
    public Object getFieldValue(_Fields field) {
7488
      switch (field) {
4555 mandeep.dh 7489
      case SERIAL_NUMBER:
7490
        return getSerialNumber();
2820 chandransh 7491
 
7492
      case TYPE:
7493
        return getType();
7494
 
4496 mandeep.dh 7495
      case ORDER_ID:
7496
        return Long.valueOf(getOrderId());
7497
 
5110 mandeep.dh 7498
      case FULFILMENT_WAREHOUSE_ID:
7499
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 7500
 
5110 mandeep.dh 7501
      case QUANTITY:
7502
        return Double.valueOf(getQuantity());
7503
 
7504
      case BILLING_WAREHOUSE_ID:
7505
        return Long.valueOf(getBillingWarehouseId());
7506
 
2820 chandransh 7507
      }
7508
      throw new IllegalStateException();
7509
    }
7510
 
3430 rajveer 7511
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7512
    public boolean isSet(_Fields field) {
7513
      if (field == null) {
7514
        throw new IllegalArgumentException();
7515
      }
2820 chandransh 7516
 
7517
      switch (field) {
4555 mandeep.dh 7518
      case SERIAL_NUMBER:
7519
        return isSetSerialNumber();
2820 chandransh 7520
      case TYPE:
7521
        return isSetType();
4496 mandeep.dh 7522
      case ORDER_ID:
7523
        return isSetOrderId();
5110 mandeep.dh 7524
      case FULFILMENT_WAREHOUSE_ID:
7525
        return isSetFulfilmentWarehouseId();
7526
      case QUANTITY:
7527
        return isSetQuantity();
7528
      case BILLING_WAREHOUSE_ID:
7529
        return isSetBillingWarehouseId();
2820 chandransh 7530
      }
7531
      throw new IllegalStateException();
7532
    }
7533
 
7534
    @Override
7535
    public boolean equals(Object that) {
7536
      if (that == null)
7537
        return false;
4496 mandeep.dh 7538
      if (that instanceof scanSerializedItemForOrder_args)
7539
        return this.equals((scanSerializedItemForOrder_args)that);
2820 chandransh 7540
      return false;
7541
    }
7542
 
4496 mandeep.dh 7543
    public boolean equals(scanSerializedItemForOrder_args that) {
2820 chandransh 7544
      if (that == null)
7545
        return false;
7546
 
4555 mandeep.dh 7547
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
7548
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
7549
      if (this_present_serialNumber || that_present_serialNumber) {
7550
        if (!(this_present_serialNumber && that_present_serialNumber))
2820 chandransh 7551
          return false;
4555 mandeep.dh 7552
        if (!this.serialNumber.equals(that.serialNumber))
2820 chandransh 7553
          return false;
7554
      }
7555
 
4496 mandeep.dh 7556
      boolean this_present_type = true && this.isSetType();
7557
      boolean that_present_type = true && that.isSetType();
7558
      if (this_present_type || that_present_type) {
7559
        if (!(this_present_type && that_present_type))
2820 chandransh 7560
          return false;
4496 mandeep.dh 7561
        if (!this.type.equals(that.type))
2820 chandransh 7562
          return false;
7563
      }
7564
 
4496 mandeep.dh 7565
      boolean this_present_orderId = true;
7566
      boolean that_present_orderId = true;
7567
      if (this_present_orderId || that_present_orderId) {
7568
        if (!(this_present_orderId && that_present_orderId))
2820 chandransh 7569
          return false;
4496 mandeep.dh 7570
        if (this.orderId != that.orderId)
2820 chandransh 7571
          return false;
7572
      }
7573
 
5110 mandeep.dh 7574
      boolean this_present_fulfilmentWarehouseId = true;
7575
      boolean that_present_fulfilmentWarehouseId = true;
7576
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
7577
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
2820 chandransh 7578
          return false;
5110 mandeep.dh 7579
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
2820 chandransh 7580
          return false;
7581
      }
7582
 
5110 mandeep.dh 7583
      boolean this_present_quantity = true;
7584
      boolean that_present_quantity = true;
7585
      if (this_present_quantity || that_present_quantity) {
7586
        if (!(this_present_quantity && that_present_quantity))
7587
          return false;
7588
        if (this.quantity != that.quantity)
7589
          return false;
7590
      }
7591
 
7592
      boolean this_present_billingWarehouseId = true;
7593
      boolean that_present_billingWarehouseId = true;
7594
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
7595
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
7596
          return false;
7597
        if (this.billingWarehouseId != that.billingWarehouseId)
7598
          return false;
7599
      }
7600
 
2820 chandransh 7601
      return true;
7602
    }
7603
 
7604
    @Override
7605
    public int hashCode() {
7606
      return 0;
7607
    }
7608
 
4496 mandeep.dh 7609
    public int compareTo(scanSerializedItemForOrder_args other) {
2820 chandransh 7610
      if (!getClass().equals(other.getClass())) {
7611
        return getClass().getName().compareTo(other.getClass().getName());
7612
      }
7613
 
7614
      int lastComparison = 0;
4496 mandeep.dh 7615
      scanSerializedItemForOrder_args typedOther = (scanSerializedItemForOrder_args)other;
2820 chandransh 7616
 
4555 mandeep.dh 7617
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2820 chandransh 7618
      if (lastComparison != 0) {
7619
        return lastComparison;
7620
      }
4555 mandeep.dh 7621
      if (isSetSerialNumber()) {
7622
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 7623
        if (lastComparison != 0) {
7624
          return lastComparison;
7625
        }
2820 chandransh 7626
      }
4496 mandeep.dh 7627
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 7628
      if (lastComparison != 0) {
7629
        return lastComparison;
7630
      }
4496 mandeep.dh 7631
      if (isSetType()) {
7632
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 7633
        if (lastComparison != 0) {
7634
          return lastComparison;
7635
        }
2820 chandransh 7636
      }
4496 mandeep.dh 7637
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
2820 chandransh 7638
      if (lastComparison != 0) {
7639
        return lastComparison;
7640
      }
4496 mandeep.dh 7641
      if (isSetOrderId()) {
7642
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
3430 rajveer 7643
        if (lastComparison != 0) {
7644
          return lastComparison;
7645
        }
2820 chandransh 7646
      }
5110 mandeep.dh 7647
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
2820 chandransh 7648
      if (lastComparison != 0) {
7649
        return lastComparison;
7650
      }
5110 mandeep.dh 7651
      if (isSetFulfilmentWarehouseId()) {
7652
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
3430 rajveer 7653
        if (lastComparison != 0) {
7654
          return lastComparison;
7655
        }
2820 chandransh 7656
      }
5110 mandeep.dh 7657
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
7658
      if (lastComparison != 0) {
7659
        return lastComparison;
7660
      }
7661
      if (isSetQuantity()) {
7662
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
7663
        if (lastComparison != 0) {
7664
          return lastComparison;
7665
        }
7666
      }
7667
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
7668
      if (lastComparison != 0) {
7669
        return lastComparison;
7670
      }
7671
      if (isSetBillingWarehouseId()) {
7672
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
7673
        if (lastComparison != 0) {
7674
          return lastComparison;
7675
        }
7676
      }
2820 chandransh 7677
      return 0;
7678
    }
7679
 
3430 rajveer 7680
    public _Fields fieldForId(int fieldId) {
7681
      return _Fields.findByThriftId(fieldId);
7682
    }
7683
 
7684
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7685
      org.apache.thrift.protocol.TField field;
2820 chandransh 7686
      iprot.readStructBegin();
7687
      while (true)
7688
      {
7689
        field = iprot.readFieldBegin();
3430 rajveer 7690
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 7691
          break;
7692
        }
3430 rajveer 7693
        switch (field.id) {
4555 mandeep.dh 7694
          case 1: // SERIAL_NUMBER
7695
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
7696
              this.serialNumber = iprot.readString();
3430 rajveer 7697
            } else { 
7698
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7699
            }
7700
            break;
4496 mandeep.dh 7701
          case 2: // TYPE
7702
            if (field.type == org.apache.thrift.protocol.TType.I32) {
7703
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 7704
            } else { 
7705
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7706
            }
7707
            break;
4496 mandeep.dh 7708
          case 3: // ORDER_ID
7709
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7710
              this.orderId = iprot.readI64();
7711
              setOrderIdIsSet(true);
3430 rajveer 7712
            } else { 
7713
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7714
            }
7715
            break;
5110 mandeep.dh 7716
          case 4: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 7717
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 7718
              this.fulfilmentWarehouseId = iprot.readI64();
7719
              setFulfilmentWarehouseIdIsSet(true);
3430 rajveer 7720
            } else { 
7721
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7722
            }
7723
            break;
5110 mandeep.dh 7724
          case 5: // QUANTITY
7725
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
7726
              this.quantity = iprot.readDouble();
7727
              setQuantityIsSet(true);
7728
            } else { 
7729
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7730
            }
7731
            break;
7732
          case 6: // BILLING_WAREHOUSE_ID
7733
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7734
              this.billingWarehouseId = iprot.readI64();
7735
              setBillingWarehouseIdIsSet(true);
7736
            } else { 
7737
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7738
            }
7739
            break;
3430 rajveer 7740
          default:
7741
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 7742
        }
3430 rajveer 7743
        iprot.readFieldEnd();
2820 chandransh 7744
      }
7745
      iprot.readStructEnd();
7746
      validate();
7747
    }
7748
 
3430 rajveer 7749
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 7750
      validate();
7751
 
7752
      oprot.writeStructBegin(STRUCT_DESC);
4555 mandeep.dh 7753
      if (this.serialNumber != null) {
7754
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
7755
        oprot.writeString(this.serialNumber);
7756
        oprot.writeFieldEnd();
7757
      }
2820 chandransh 7758
      if (this.type != null) {
7759
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
7760
        oprot.writeI32(this.type.getValue());
7761
        oprot.writeFieldEnd();
7762
      }
4496 mandeep.dh 7763
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
7764
      oprot.writeI64(this.orderId);
7765
      oprot.writeFieldEnd();
5110 mandeep.dh 7766
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
7767
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 7768
      oprot.writeFieldEnd();
5110 mandeep.dh 7769
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
7770
      oprot.writeDouble(this.quantity);
7771
      oprot.writeFieldEnd();
7772
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
7773
      oprot.writeI64(this.billingWarehouseId);
7774
      oprot.writeFieldEnd();
2820 chandransh 7775
      oprot.writeFieldStop();
7776
      oprot.writeStructEnd();
7777
    }
7778
 
7779
    @Override
7780
    public String toString() {
4496 mandeep.dh 7781
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_args(");
2820 chandransh 7782
      boolean first = true;
7783
 
4555 mandeep.dh 7784
      sb.append("serialNumber:");
7785
      if (this.serialNumber == null) {
7786
        sb.append("null");
7787
      } else {
7788
        sb.append(this.serialNumber);
7789
      }
2820 chandransh 7790
      first = false;
7791
      if (!first) sb.append(", ");
4496 mandeep.dh 7792
      sb.append("type:");
7793
      if (this.type == null) {
2820 chandransh 7794
        sb.append("null");
7795
      } else {
4496 mandeep.dh 7796
        sb.append(this.type);
2820 chandransh 7797
      }
7798
      first = false;
7799
      if (!first) sb.append(", ");
4496 mandeep.dh 7800
      sb.append("orderId:");
7801
      sb.append(this.orderId);
2820 chandransh 7802
      first = false;
7803
      if (!first) sb.append(", ");
5110 mandeep.dh 7804
      sb.append("fulfilmentWarehouseId:");
7805
      sb.append(this.fulfilmentWarehouseId);
2820 chandransh 7806
      first = false;
5110 mandeep.dh 7807
      if (!first) sb.append(", ");
7808
      sb.append("quantity:");
7809
      sb.append(this.quantity);
7810
      first = false;
7811
      if (!first) sb.append(", ");
7812
      sb.append("billingWarehouseId:");
7813
      sb.append(this.billingWarehouseId);
7814
      first = false;
2820 chandransh 7815
      sb.append(")");
7816
      return sb.toString();
7817
    }
7818
 
3430 rajveer 7819
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 7820
      // check for required fields
7821
    }
7822
 
3430 rajveer 7823
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7824
      try {
7825
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7826
      } catch (org.apache.thrift.TException te) {
7827
        throw new java.io.IOException(te);
7828
      }
7829
    }
7830
 
7831
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7832
      try {
7833
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7834
      } catch (org.apache.thrift.TException te) {
7835
        throw new java.io.IOException(te);
7836
      }
7837
    }
7838
 
2820 chandransh 7839
  }
7840
 
4496 mandeep.dh 7841
  public static class scanSerializedItemForOrder_result implements org.apache.thrift.TBase<scanSerializedItemForOrder_result, scanSerializedItemForOrder_result._Fields>, java.io.Serializable, Cloneable   {
7842
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_result");
2820 chandransh 7843
 
4555 mandeep.dh 7844
    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 7845
    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 7846
 
4555 mandeep.dh 7847
    private InventoryItem success; // required
3430 rajveer 7848
    private WarehouseServiceException wex; // required
2820 chandransh 7849
 
7850
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 7851
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 7852
      SUCCESS((short)0, "success"),
2820 chandransh 7853
      WEX((short)1, "wex");
7854
 
7855
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7856
 
7857
      static {
7858
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7859
          byName.put(field.getFieldName(), field);
7860
        }
7861
      }
7862
 
7863
      /**
7864
       * Find the _Fields constant that matches fieldId, or null if its not found.
7865
       */
7866
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 7867
        switch(fieldId) {
4496 mandeep.dh 7868
          case 0: // SUCCESS
7869
            return SUCCESS;
3430 rajveer 7870
          case 1: // WEX
7871
            return WEX;
7872
          default:
7873
            return null;
7874
        }
2820 chandransh 7875
      }
7876
 
7877
      /**
7878
       * Find the _Fields constant that matches fieldId, throwing an exception
7879
       * if it is not found.
7880
       */
7881
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7882
        _Fields fields = findByThriftId(fieldId);
7883
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7884
        return fields;
7885
      }
7886
 
7887
      /**
7888
       * Find the _Fields constant that matches name, or null if its not found.
7889
       */
7890
      public static _Fields findByName(String name) {
7891
        return byName.get(name);
7892
      }
7893
 
7894
      private final short _thriftId;
7895
      private final String _fieldName;
7896
 
7897
      _Fields(short thriftId, String fieldName) {
7898
        _thriftId = thriftId;
7899
        _fieldName = fieldName;
7900
      }
7901
 
7902
      public short getThriftFieldId() {
7903
        return _thriftId;
7904
      }
7905
 
7906
      public String getFieldName() {
7907
        return _fieldName;
7908
      }
7909
    }
7910
 
7911
    // isset id assignments
7912
 
3430 rajveer 7913
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 7914
    static {
3430 rajveer 7915
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 7916
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 7917
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 7918
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7919
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7920
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 7921
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_result.class, metaDataMap);
2820 chandransh 7922
    }
7923
 
4496 mandeep.dh 7924
    public scanSerializedItemForOrder_result() {
2820 chandransh 7925
    }
7926
 
4496 mandeep.dh 7927
    public scanSerializedItemForOrder_result(
4555 mandeep.dh 7928
      InventoryItem success,
2820 chandransh 7929
      WarehouseServiceException wex)
7930
    {
7931
      this();
4496 mandeep.dh 7932
      this.success = success;
2820 chandransh 7933
      this.wex = wex;
7934
    }
7935
 
7936
    /**
7937
     * Performs a deep copy on <i>other</i>.
7938
     */
4496 mandeep.dh 7939
    public scanSerializedItemForOrder_result(scanSerializedItemForOrder_result other) {
4555 mandeep.dh 7940
      if (other.isSetSuccess()) {
7941
        this.success = new InventoryItem(other.success);
7942
      }
2820 chandransh 7943
      if (other.isSetWex()) {
7944
        this.wex = new WarehouseServiceException(other.wex);
7945
      }
7946
    }
7947
 
4496 mandeep.dh 7948
    public scanSerializedItemForOrder_result deepCopy() {
7949
      return new scanSerializedItemForOrder_result(this);
2820 chandransh 7950
    }
7951
 
3430 rajveer 7952
    @Override
7953
    public void clear() {
4555 mandeep.dh 7954
      this.success = null;
3430 rajveer 7955
      this.wex = null;
2820 chandransh 7956
    }
7957
 
4555 mandeep.dh 7958
    public InventoryItem getSuccess() {
4496 mandeep.dh 7959
      return this.success;
7960
    }
7961
 
4555 mandeep.dh 7962
    public void setSuccess(InventoryItem success) {
4496 mandeep.dh 7963
      this.success = success;
7964
    }
7965
 
7966
    public void unsetSuccess() {
4555 mandeep.dh 7967
      this.success = null;
4496 mandeep.dh 7968
    }
7969
 
7970
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7971
    public boolean isSetSuccess() {
4555 mandeep.dh 7972
      return this.success != null;
4496 mandeep.dh 7973
    }
7974
 
7975
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 7976
      if (!value) {
7977
        this.success = null;
7978
      }
4496 mandeep.dh 7979
    }
7980
 
2820 chandransh 7981
    public WarehouseServiceException getWex() {
7982
      return this.wex;
7983
    }
7984
 
3430 rajveer 7985
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 7986
      this.wex = wex;
7987
    }
7988
 
7989
    public void unsetWex() {
7990
      this.wex = null;
7991
    }
7992
 
3430 rajveer 7993
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 7994
    public boolean isSetWex() {
7995
      return this.wex != null;
7996
    }
7997
 
7998
    public void setWexIsSet(boolean value) {
7999
      if (!value) {
8000
        this.wex = null;
8001
      }
8002
    }
8003
 
8004
    public void setFieldValue(_Fields field, Object value) {
8005
      switch (field) {
4496 mandeep.dh 8006
      case SUCCESS:
8007
        if (value == null) {
8008
          unsetSuccess();
8009
        } else {
4555 mandeep.dh 8010
          setSuccess((InventoryItem)value);
4496 mandeep.dh 8011
        }
8012
        break;
8013
 
2820 chandransh 8014
      case WEX:
8015
        if (value == null) {
8016
          unsetWex();
8017
        } else {
8018
          setWex((WarehouseServiceException)value);
8019
        }
8020
        break;
8021
 
8022
      }
8023
    }
8024
 
8025
    public Object getFieldValue(_Fields field) {
8026
      switch (field) {
4496 mandeep.dh 8027
      case SUCCESS:
4555 mandeep.dh 8028
        return getSuccess();
4496 mandeep.dh 8029
 
2820 chandransh 8030
      case WEX:
8031
        return getWex();
8032
 
8033
      }
8034
      throw new IllegalStateException();
8035
    }
8036
 
3430 rajveer 8037
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8038
    public boolean isSet(_Fields field) {
8039
      if (field == null) {
8040
        throw new IllegalArgumentException();
8041
      }
2820 chandransh 8042
 
8043
      switch (field) {
4496 mandeep.dh 8044
      case SUCCESS:
8045
        return isSetSuccess();
2820 chandransh 8046
      case WEX:
8047
        return isSetWex();
8048
      }
8049
      throw new IllegalStateException();
8050
    }
8051
 
8052
    @Override
8053
    public boolean equals(Object that) {
8054
      if (that == null)
8055
        return false;
4496 mandeep.dh 8056
      if (that instanceof scanSerializedItemForOrder_result)
8057
        return this.equals((scanSerializedItemForOrder_result)that);
2820 chandransh 8058
      return false;
8059
    }
8060
 
4496 mandeep.dh 8061
    public boolean equals(scanSerializedItemForOrder_result that) {
2820 chandransh 8062
      if (that == null)
8063
        return false;
8064
 
4555 mandeep.dh 8065
      boolean this_present_success = true && this.isSetSuccess();
8066
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 8067
      if (this_present_success || that_present_success) {
8068
        if (!(this_present_success && that_present_success))
8069
          return false;
4555 mandeep.dh 8070
        if (!this.success.equals(that.success))
4496 mandeep.dh 8071
          return false;
8072
      }
8073
 
2820 chandransh 8074
      boolean this_present_wex = true && this.isSetWex();
8075
      boolean that_present_wex = true && that.isSetWex();
8076
      if (this_present_wex || that_present_wex) {
8077
        if (!(this_present_wex && that_present_wex))
8078
          return false;
8079
        if (!this.wex.equals(that.wex))
8080
          return false;
8081
      }
8082
 
8083
      return true;
8084
    }
8085
 
8086
    @Override
8087
    public int hashCode() {
8088
      return 0;
8089
    }
8090
 
4496 mandeep.dh 8091
    public int compareTo(scanSerializedItemForOrder_result other) {
2820 chandransh 8092
      if (!getClass().equals(other.getClass())) {
8093
        return getClass().getName().compareTo(other.getClass().getName());
8094
      }
8095
 
8096
      int lastComparison = 0;
4496 mandeep.dh 8097
      scanSerializedItemForOrder_result typedOther = (scanSerializedItemForOrder_result)other;
2820 chandransh 8098
 
4496 mandeep.dh 8099
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8100
      if (lastComparison != 0) {
8101
        return lastComparison;
8102
      }
8103
      if (isSetSuccess()) {
8104
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8105
        if (lastComparison != 0) {
8106
          return lastComparison;
8107
        }
8108
      }
3430 rajveer 8109
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 8110
      if (lastComparison != 0) {
8111
        return lastComparison;
8112
      }
3430 rajveer 8113
      if (isSetWex()) {
8114
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
8115
        if (lastComparison != 0) {
8116
          return lastComparison;
8117
        }
2820 chandransh 8118
      }
8119
      return 0;
8120
    }
8121
 
3430 rajveer 8122
    public _Fields fieldForId(int fieldId) {
8123
      return _Fields.findByThriftId(fieldId);
8124
    }
8125
 
8126
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8127
      org.apache.thrift.protocol.TField field;
2820 chandransh 8128
      iprot.readStructBegin();
8129
      while (true)
8130
      {
8131
        field = iprot.readFieldBegin();
3430 rajveer 8132
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 8133
          break;
8134
        }
3430 rajveer 8135
        switch (field.id) {
4496 mandeep.dh 8136
          case 0: // SUCCESS
4555 mandeep.dh 8137
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8138
              this.success = new InventoryItem();
8139
              this.success.read(iprot);
4496 mandeep.dh 8140
            } else { 
8141
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8142
            }
8143
            break;
3430 rajveer 8144
          case 1: // WEX
8145
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8146
              this.wex = new WarehouseServiceException();
8147
              this.wex.read(iprot);
8148
            } else { 
8149
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8150
            }
8151
            break;
8152
          default:
8153
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 8154
        }
3430 rajveer 8155
        iprot.readFieldEnd();
2820 chandransh 8156
      }
8157
      iprot.readStructEnd();
8158
      validate();
8159
    }
8160
 
3430 rajveer 8161
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 8162
      oprot.writeStructBegin(STRUCT_DESC);
8163
 
4496 mandeep.dh 8164
      if (this.isSetSuccess()) {
8165
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 8166
        this.success.write(oprot);
4496 mandeep.dh 8167
        oprot.writeFieldEnd();
8168
      } else if (this.isSetWex()) {
2820 chandransh 8169
        oprot.writeFieldBegin(WEX_FIELD_DESC);
8170
        this.wex.write(oprot);
8171
        oprot.writeFieldEnd();
8172
      }
8173
      oprot.writeFieldStop();
8174
      oprot.writeStructEnd();
8175
    }
8176
 
8177
    @Override
8178
    public String toString() {
4496 mandeep.dh 8179
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_result(");
2820 chandransh 8180
      boolean first = true;
8181
 
4496 mandeep.dh 8182
      sb.append("success:");
4555 mandeep.dh 8183
      if (this.success == null) {
8184
        sb.append("null");
8185
      } else {
8186
        sb.append(this.success);
8187
      }
4496 mandeep.dh 8188
      first = false;
8189
      if (!first) sb.append(", ");
2820 chandransh 8190
      sb.append("wex:");
8191
      if (this.wex == null) {
8192
        sb.append("null");
8193
      } else {
8194
        sb.append(this.wex);
8195
      }
8196
      first = false;
8197
      sb.append(")");
8198
      return sb.toString();
8199
    }
8200
 
3430 rajveer 8201
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 8202
      // check for required fields
8203
    }
8204
 
3430 rajveer 8205
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8206
      try {
8207
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8208
      } catch (org.apache.thrift.TException te) {
8209
        throw new java.io.IOException(te);
8210
      }
8211
    }
8212
 
8213
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8214
      try {
8215
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8216
      } catch (org.apache.thrift.TException te) {
8217
        throw new java.io.IOException(te);
8218
      }
8219
    }
8220
 
2820 chandransh 8221
  }
8222
 
4496 mandeep.dh 8223
  public static class scanForOrder_args implements org.apache.thrift.TBase<scanForOrder_args, scanForOrder_args._Fields>, java.io.Serializable, Cloneable   {
8224
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_args");
2820 chandransh 8225
 
5361 mandeep.dh 8226
    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 8227
    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);
8228
    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);
8229
    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 8230
    private static final org.apache.thrift.protocol.TField FULFILMENT_WAREHOUSE_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("fulfilmentWarehouseId", org.apache.thrift.protocol.TType.I64, (short)5);
5361 mandeep.dh 8231
    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 8232
 
5361 mandeep.dh 8233
    private InventoryItem inventoryItem; // required
3430 rajveer 8234
    private ScanType type; // required
4496 mandeep.dh 8235
    private long quantity; // required
8236
    private long orderId; // required
5110 mandeep.dh 8237
    private long fulfilmentWarehouseId; // required
5361 mandeep.dh 8238
    private long billingWarehouseId; // required
2820 chandransh 8239
 
8240
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 8241
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 8242
      INVENTORY_ITEM((short)1, "inventoryItem"),
2820 chandransh 8243
      /**
8244
       * 
8245
       * @see ScanType
8246
       */
4496 mandeep.dh 8247
      TYPE((short)2, "type"),
8248
      QUANTITY((short)3, "quantity"),
8249
      ORDER_ID((short)4, "orderId"),
5361 mandeep.dh 8250
      FULFILMENT_WAREHOUSE_ID((short)5, "fulfilmentWarehouseId"),
8251
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 8252
 
8253
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8254
 
8255
      static {
8256
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8257
          byName.put(field.getFieldName(), field);
8258
        }
8259
      }
8260
 
8261
      /**
8262
       * Find the _Fields constant that matches fieldId, or null if its not found.
8263
       */
8264
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 8265
        switch(fieldId) {
5361 mandeep.dh 8266
          case 1: // INVENTORY_ITEM
8267
            return INVENTORY_ITEM;
4496 mandeep.dh 8268
          case 2: // TYPE
3430 rajveer 8269
            return TYPE;
4496 mandeep.dh 8270
          case 3: // QUANTITY
8271
            return QUANTITY;
8272
          case 4: // ORDER_ID
8273
            return ORDER_ID;
5110 mandeep.dh 8274
          case 5: // FULFILMENT_WAREHOUSE_ID
8275
            return FULFILMENT_WAREHOUSE_ID;
5361 mandeep.dh 8276
          case 6: // BILLING_WAREHOUSE_ID
8277
            return BILLING_WAREHOUSE_ID;
3430 rajveer 8278
          default:
8279
            return null;
8280
        }
2820 chandransh 8281
      }
8282
 
8283
      /**
8284
       * Find the _Fields constant that matches fieldId, throwing an exception
8285
       * if it is not found.
8286
       */
8287
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8288
        _Fields fields = findByThriftId(fieldId);
8289
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8290
        return fields;
8291
      }
8292
 
8293
      /**
8294
       * Find the _Fields constant that matches name, or null if its not found.
8295
       */
8296
      public static _Fields findByName(String name) {
8297
        return byName.get(name);
8298
      }
8299
 
8300
      private final short _thriftId;
8301
      private final String _fieldName;
8302
 
8303
      _Fields(short thriftId, String fieldName) {
8304
        _thriftId = thriftId;
8305
        _fieldName = fieldName;
8306
      }
8307
 
8308
      public short getThriftFieldId() {
8309
        return _thriftId;
8310
      }
8311
 
8312
      public String getFieldName() {
8313
        return _fieldName;
8314
      }
8315
    }
8316
 
8317
    // isset id assignments
5361 mandeep.dh 8318
    private static final int __QUANTITY_ISSET_ID = 0;
8319
    private static final int __ORDERID_ISSET_ID = 1;
8320
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 2;
8321
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
4496 mandeep.dh 8322
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 8323
 
3430 rajveer 8324
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 8325
    static {
3430 rajveer 8326
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 8327
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8328
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 8329
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8330
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 8331
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8332
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8333
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8334
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 8335
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 8336
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 8337
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8338
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 8339
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 8340
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_args.class, metaDataMap);
2820 chandransh 8341
    }
8342
 
4496 mandeep.dh 8343
    public scanForOrder_args() {
2820 chandransh 8344
    }
8345
 
4496 mandeep.dh 8346
    public scanForOrder_args(
5361 mandeep.dh 8347
      InventoryItem inventoryItem,
4496 mandeep.dh 8348
      ScanType type,
8349
      long quantity,
8350
      long orderId,
5361 mandeep.dh 8351
      long fulfilmentWarehouseId,
8352
      long billingWarehouseId)
2820 chandransh 8353
    {
8354
      this();
5361 mandeep.dh 8355
      this.inventoryItem = inventoryItem;
2820 chandransh 8356
      this.type = type;
4496 mandeep.dh 8357
      this.quantity = quantity;
8358
      setQuantityIsSet(true);
8359
      this.orderId = orderId;
8360
      setOrderIdIsSet(true);
5110 mandeep.dh 8361
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
8362
      setFulfilmentWarehouseIdIsSet(true);
5361 mandeep.dh 8363
      this.billingWarehouseId = billingWarehouseId;
8364
      setBillingWarehouseIdIsSet(true);
2820 chandransh 8365
    }
8366
 
8367
    /**
8368
     * Performs a deep copy on <i>other</i>.
8369
     */
4496 mandeep.dh 8370
    public scanForOrder_args(scanForOrder_args other) {
8371
      __isset_bit_vector.clear();
8372
      __isset_bit_vector.or(other.__isset_bit_vector);
5361 mandeep.dh 8373
      if (other.isSetInventoryItem()) {
8374
        this.inventoryItem = new InventoryItem(other.inventoryItem);
8375
      }
2820 chandransh 8376
      if (other.isSetType()) {
8377
        this.type = other.type;
8378
      }
4496 mandeep.dh 8379
      this.quantity = other.quantity;
8380
      this.orderId = other.orderId;
5110 mandeep.dh 8381
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
5361 mandeep.dh 8382
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 8383
    }
8384
 
4496 mandeep.dh 8385
    public scanForOrder_args deepCopy() {
8386
      return new scanForOrder_args(this);
2820 chandransh 8387
    }
8388
 
3430 rajveer 8389
    @Override
8390
    public void clear() {
5361 mandeep.dh 8391
      this.inventoryItem = null;
3430 rajveer 8392
      this.type = null;
4496 mandeep.dh 8393
      setQuantityIsSet(false);
8394
      this.quantity = 0;
8395
      setOrderIdIsSet(false);
8396
      this.orderId = 0;
5110 mandeep.dh 8397
      setFulfilmentWarehouseIdIsSet(false);
8398
      this.fulfilmentWarehouseId = 0;
5361 mandeep.dh 8399
      setBillingWarehouseIdIsSet(false);
8400
      this.billingWarehouseId = 0;
2820 chandransh 8401
    }
8402
 
5361 mandeep.dh 8403
    public InventoryItem getInventoryItem() {
8404
      return this.inventoryItem;
2820 chandransh 8405
    }
8406
 
5361 mandeep.dh 8407
    public void setInventoryItem(InventoryItem inventoryItem) {
8408
      this.inventoryItem = inventoryItem;
2820 chandransh 8409
    }
8410
 
5361 mandeep.dh 8411
    public void unsetInventoryItem() {
8412
      this.inventoryItem = null;
2820 chandransh 8413
    }
8414
 
5361 mandeep.dh 8415
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
8416
    public boolean isSetInventoryItem() {
8417
      return this.inventoryItem != null;
2820 chandransh 8418
    }
8419
 
5361 mandeep.dh 8420
    public void setInventoryItemIsSet(boolean value) {
8421
      if (!value) {
8422
        this.inventoryItem = null;
8423
      }
2820 chandransh 8424
    }
8425
 
8426
    /**
8427
     * 
8428
     * @see ScanType
8429
     */
8430
    public ScanType getType() {
8431
      return this.type;
8432
    }
8433
 
8434
    /**
8435
     * 
8436
     * @see ScanType
8437
     */
3430 rajveer 8438
    public void setType(ScanType type) {
2820 chandransh 8439
      this.type = type;
8440
    }
8441
 
8442
    public void unsetType() {
8443
      this.type = null;
8444
    }
8445
 
3430 rajveer 8446
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
2820 chandransh 8447
    public boolean isSetType() {
8448
      return this.type != null;
8449
    }
8450
 
8451
    public void setTypeIsSet(boolean value) {
8452
      if (!value) {
8453
        this.type = null;
8454
      }
8455
    }
8456
 
4496 mandeep.dh 8457
    public long getQuantity() {
8458
      return this.quantity;
8459
    }
8460
 
8461
    public void setQuantity(long quantity) {
8462
      this.quantity = quantity;
8463
      setQuantityIsSet(true);
8464
    }
8465
 
8466
    public void unsetQuantity() {
8467
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
8468
    }
8469
 
8470
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
8471
    public boolean isSetQuantity() {
8472
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
8473
    }
8474
 
8475
    public void setQuantityIsSet(boolean value) {
8476
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
8477
    }
8478
 
8479
    public long getOrderId() {
8480
      return this.orderId;
8481
    }
8482
 
8483
    public void setOrderId(long orderId) {
8484
      this.orderId = orderId;
8485
      setOrderIdIsSet(true);
8486
    }
8487
 
8488
    public void unsetOrderId() {
8489
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
8490
    }
8491
 
8492
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
8493
    public boolean isSetOrderId() {
8494
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
8495
    }
8496
 
8497
    public void setOrderIdIsSet(boolean value) {
8498
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
8499
    }
8500
 
5110 mandeep.dh 8501
    public long getFulfilmentWarehouseId() {
8502
      return this.fulfilmentWarehouseId;
4496 mandeep.dh 8503
    }
8504
 
5110 mandeep.dh 8505
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
8506
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
8507
      setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 8508
    }
8509
 
5110 mandeep.dh 8510
    public void unsetFulfilmentWarehouseId() {
8511
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 8512
    }
8513
 
5110 mandeep.dh 8514
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
8515
    public boolean isSetFulfilmentWarehouseId() {
8516
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 8517
    }
8518
 
5110 mandeep.dh 8519
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
8520
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 8521
    }
8522
 
5361 mandeep.dh 8523
    public long getBillingWarehouseId() {
8524
      return this.billingWarehouseId;
8525
    }
8526
 
8527
    public void setBillingWarehouseId(long billingWarehouseId) {
8528
      this.billingWarehouseId = billingWarehouseId;
8529
      setBillingWarehouseIdIsSet(true);
8530
    }
8531
 
8532
    public void unsetBillingWarehouseId() {
8533
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
8534
    }
8535
 
8536
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
8537
    public boolean isSetBillingWarehouseId() {
8538
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
8539
    }
8540
 
8541
    public void setBillingWarehouseIdIsSet(boolean value) {
8542
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
8543
    }
8544
 
2820 chandransh 8545
    public void setFieldValue(_Fields field, Object value) {
8546
      switch (field) {
5361 mandeep.dh 8547
      case INVENTORY_ITEM:
2820 chandransh 8548
        if (value == null) {
5361 mandeep.dh 8549
          unsetInventoryItem();
2820 chandransh 8550
        } else {
5361 mandeep.dh 8551
          setInventoryItem((InventoryItem)value);
2820 chandransh 8552
        }
8553
        break;
8554
 
4496 mandeep.dh 8555
      case TYPE:
2820 chandransh 8556
        if (value == null) {
4496 mandeep.dh 8557
          unsetType();
2820 chandransh 8558
        } else {
4496 mandeep.dh 8559
          setType((ScanType)value);
2820 chandransh 8560
        }
8561
        break;
8562
 
4496 mandeep.dh 8563
      case QUANTITY:
2820 chandransh 8564
        if (value == null) {
4496 mandeep.dh 8565
          unsetQuantity();
2820 chandransh 8566
        } else {
4496 mandeep.dh 8567
          setQuantity((Long)value);
2820 chandransh 8568
        }
8569
        break;
8570
 
4496 mandeep.dh 8571
      case ORDER_ID:
8572
        if (value == null) {
8573
          unsetOrderId();
8574
        } else {
8575
          setOrderId((Long)value);
8576
        }
8577
        break;
8578
 
5110 mandeep.dh 8579
      case FULFILMENT_WAREHOUSE_ID:
4496 mandeep.dh 8580
        if (value == null) {
5110 mandeep.dh 8581
          unsetFulfilmentWarehouseId();
4496 mandeep.dh 8582
        } else {
5110 mandeep.dh 8583
          setFulfilmentWarehouseId((Long)value);
4496 mandeep.dh 8584
        }
8585
        break;
8586
 
5361 mandeep.dh 8587
      case BILLING_WAREHOUSE_ID:
8588
        if (value == null) {
8589
          unsetBillingWarehouseId();
8590
        } else {
8591
          setBillingWarehouseId((Long)value);
8592
        }
8593
        break;
8594
 
2820 chandransh 8595
      }
8596
    }
8597
 
8598
    public Object getFieldValue(_Fields field) {
8599
      switch (field) {
5361 mandeep.dh 8600
      case INVENTORY_ITEM:
8601
        return getInventoryItem();
2820 chandransh 8602
 
8603
      case TYPE:
8604
        return getType();
8605
 
4496 mandeep.dh 8606
      case QUANTITY:
8607
        return Long.valueOf(getQuantity());
8608
 
8609
      case ORDER_ID:
8610
        return Long.valueOf(getOrderId());
8611
 
5110 mandeep.dh 8612
      case FULFILMENT_WAREHOUSE_ID:
8613
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 8614
 
5361 mandeep.dh 8615
      case BILLING_WAREHOUSE_ID:
8616
        return Long.valueOf(getBillingWarehouseId());
8617
 
2820 chandransh 8618
      }
8619
      throw new IllegalStateException();
8620
    }
8621
 
3430 rajveer 8622
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8623
    public boolean isSet(_Fields field) {
8624
      if (field == null) {
8625
        throw new IllegalArgumentException();
8626
      }
2820 chandransh 8627
 
8628
      switch (field) {
5361 mandeep.dh 8629
      case INVENTORY_ITEM:
8630
        return isSetInventoryItem();
2820 chandransh 8631
      case TYPE:
8632
        return isSetType();
4496 mandeep.dh 8633
      case QUANTITY:
8634
        return isSetQuantity();
8635
      case ORDER_ID:
8636
        return isSetOrderId();
5110 mandeep.dh 8637
      case FULFILMENT_WAREHOUSE_ID:
8638
        return isSetFulfilmentWarehouseId();
5361 mandeep.dh 8639
      case BILLING_WAREHOUSE_ID:
8640
        return isSetBillingWarehouseId();
2820 chandransh 8641
      }
8642
      throw new IllegalStateException();
8643
    }
8644
 
8645
    @Override
8646
    public boolean equals(Object that) {
8647
      if (that == null)
8648
        return false;
4496 mandeep.dh 8649
      if (that instanceof scanForOrder_args)
8650
        return this.equals((scanForOrder_args)that);
2820 chandransh 8651
      return false;
8652
    }
8653
 
4496 mandeep.dh 8654
    public boolean equals(scanForOrder_args that) {
2820 chandransh 8655
      if (that == null)
8656
        return false;
8657
 
5361 mandeep.dh 8658
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
8659
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
8660
      if (this_present_inventoryItem || that_present_inventoryItem) {
8661
        if (!(this_present_inventoryItem && that_present_inventoryItem))
2820 chandransh 8662
          return false;
5361 mandeep.dh 8663
        if (!this.inventoryItem.equals(that.inventoryItem))
2820 chandransh 8664
          return false;
8665
      }
8666
 
8667
      boolean this_present_type = true && this.isSetType();
8668
      boolean that_present_type = true && that.isSetType();
8669
      if (this_present_type || that_present_type) {
8670
        if (!(this_present_type && that_present_type))
8671
          return false;
8672
        if (!this.type.equals(that.type))
8673
          return false;
8674
      }
8675
 
4496 mandeep.dh 8676
      boolean this_present_quantity = true;
8677
      boolean that_present_quantity = true;
8678
      if (this_present_quantity || that_present_quantity) {
8679
        if (!(this_present_quantity && that_present_quantity))
8680
          return false;
8681
        if (this.quantity != that.quantity)
8682
          return false;
8683
      }
8684
 
8685
      boolean this_present_orderId = true;
8686
      boolean that_present_orderId = true;
8687
      if (this_present_orderId || that_present_orderId) {
8688
        if (!(this_present_orderId && that_present_orderId))
8689
          return false;
8690
        if (this.orderId != that.orderId)
8691
          return false;
8692
      }
8693
 
5110 mandeep.dh 8694
      boolean this_present_fulfilmentWarehouseId = true;
8695
      boolean that_present_fulfilmentWarehouseId = true;
8696
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
8697
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
4496 mandeep.dh 8698
          return false;
5110 mandeep.dh 8699
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
4496 mandeep.dh 8700
          return false;
8701
      }
8702
 
5361 mandeep.dh 8703
      boolean this_present_billingWarehouseId = true;
8704
      boolean that_present_billingWarehouseId = true;
8705
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
8706
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
8707
          return false;
8708
        if (this.billingWarehouseId != that.billingWarehouseId)
8709
          return false;
8710
      }
8711
 
2820 chandransh 8712
      return true;
8713
    }
8714
 
8715
    @Override
8716
    public int hashCode() {
8717
      return 0;
8718
    }
8719
 
4496 mandeep.dh 8720
    public int compareTo(scanForOrder_args other) {
2820 chandransh 8721
      if (!getClass().equals(other.getClass())) {
8722
        return getClass().getName().compareTo(other.getClass().getName());
8723
      }
8724
 
8725
      int lastComparison = 0;
4496 mandeep.dh 8726
      scanForOrder_args typedOther = (scanForOrder_args)other;
2820 chandransh 8727
 
5361 mandeep.dh 8728
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
2820 chandransh 8729
      if (lastComparison != 0) {
8730
        return lastComparison;
8731
      }
5361 mandeep.dh 8732
      if (isSetInventoryItem()) {
8733
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
3430 rajveer 8734
        if (lastComparison != 0) {
8735
          return lastComparison;
8736
        }
2820 chandransh 8737
      }
4496 mandeep.dh 8738
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 8739
      if (lastComparison != 0) {
8740
        return lastComparison;
8741
      }
4496 mandeep.dh 8742
      if (isSetType()) {
8743
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 8744
        if (lastComparison != 0) {
8745
          return lastComparison;
8746
        }
2820 chandransh 8747
      }
4496 mandeep.dh 8748
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
2820 chandransh 8749
      if (lastComparison != 0) {
8750
        return lastComparison;
8751
      }
4496 mandeep.dh 8752
      if (isSetQuantity()) {
8753
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
3430 rajveer 8754
        if (lastComparison != 0) {
8755
          return lastComparison;
8756
        }
2820 chandransh 8757
      }
4496 mandeep.dh 8758
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
8759
      if (lastComparison != 0) {
8760
        return lastComparison;
8761
      }
8762
      if (isSetOrderId()) {
8763
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
8764
        if (lastComparison != 0) {
8765
          return lastComparison;
8766
        }
8767
      }
5110 mandeep.dh 8768
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
4496 mandeep.dh 8769
      if (lastComparison != 0) {
8770
        return lastComparison;
8771
      }
5110 mandeep.dh 8772
      if (isSetFulfilmentWarehouseId()) {
8773
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
4496 mandeep.dh 8774
        if (lastComparison != 0) {
8775
          return lastComparison;
8776
        }
8777
      }
5361 mandeep.dh 8778
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
8779
      if (lastComparison != 0) {
8780
        return lastComparison;
8781
      }
8782
      if (isSetBillingWarehouseId()) {
8783
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
8784
        if (lastComparison != 0) {
8785
          return lastComparison;
8786
        }
8787
      }
2820 chandransh 8788
      return 0;
8789
    }
8790
 
3430 rajveer 8791
    public _Fields fieldForId(int fieldId) {
8792
      return _Fields.findByThriftId(fieldId);
8793
    }
8794
 
8795
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8796
      org.apache.thrift.protocol.TField field;
2820 chandransh 8797
      iprot.readStructBegin();
8798
      while (true)
8799
      {
8800
        field = iprot.readFieldBegin();
3430 rajveer 8801
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 8802
          break;
8803
        }
3430 rajveer 8804
        switch (field.id) {
5361 mandeep.dh 8805
          case 1: // INVENTORY_ITEM
8806
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8807
              this.inventoryItem = new InventoryItem();
8808
              this.inventoryItem.read(iprot);
3430 rajveer 8809
            } else { 
8810
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8811
            }
8812
            break;
4496 mandeep.dh 8813
          case 2: // TYPE
8814
            if (field.type == org.apache.thrift.protocol.TType.I32) {
8815
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 8816
            } else { 
8817
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8818
            }
8819
            break;
4496 mandeep.dh 8820
          case 3: // QUANTITY
8821
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8822
              this.quantity = iprot.readI64();
8823
              setQuantityIsSet(true);
3430 rajveer 8824
            } else { 
8825
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8826
            }
8827
            break;
4496 mandeep.dh 8828
          case 4: // ORDER_ID
8829
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8830
              this.orderId = iprot.readI64();
8831
              setOrderIdIsSet(true);
8832
            } else { 
8833
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8834
            }
8835
            break;
5110 mandeep.dh 8836
          case 5: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 8837
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 8838
              this.fulfilmentWarehouseId = iprot.readI64();
8839
              setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 8840
            } else { 
8841
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8842
            }
8843
            break;
5361 mandeep.dh 8844
          case 6: // BILLING_WAREHOUSE_ID
8845
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8846
              this.billingWarehouseId = iprot.readI64();
8847
              setBillingWarehouseIdIsSet(true);
8848
            } else { 
8849
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8850
            }
8851
            break;
3430 rajveer 8852
          default:
8853
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 8854
        }
3430 rajveer 8855
        iprot.readFieldEnd();
2820 chandransh 8856
      }
8857
      iprot.readStructEnd();
8858
      validate();
8859
    }
8860
 
3430 rajveer 8861
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 8862
      validate();
8863
 
8864
      oprot.writeStructBegin(STRUCT_DESC);
5361 mandeep.dh 8865
      if (this.inventoryItem != null) {
8866
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
8867
        this.inventoryItem.write(oprot);
8868
        oprot.writeFieldEnd();
8869
      }
2820 chandransh 8870
      if (this.type != null) {
8871
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
8872
        oprot.writeI32(this.type.getValue());
8873
        oprot.writeFieldEnd();
8874
      }
4496 mandeep.dh 8875
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
8876
      oprot.writeI64(this.quantity);
8877
      oprot.writeFieldEnd();
8878
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
8879
      oprot.writeI64(this.orderId);
8880
      oprot.writeFieldEnd();
5110 mandeep.dh 8881
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
8882
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 8883
      oprot.writeFieldEnd();
5361 mandeep.dh 8884
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
8885
      oprot.writeI64(this.billingWarehouseId);
8886
      oprot.writeFieldEnd();
2820 chandransh 8887
      oprot.writeFieldStop();
8888
      oprot.writeStructEnd();
8889
    }
8890
 
8891
    @Override
8892
    public String toString() {
4496 mandeep.dh 8893
      StringBuilder sb = new StringBuilder("scanForOrder_args(");
2820 chandransh 8894
      boolean first = true;
8895
 
5361 mandeep.dh 8896
      sb.append("inventoryItem:");
8897
      if (this.inventoryItem == null) {
8898
        sb.append("null");
8899
      } else {
8900
        sb.append(this.inventoryItem);
8901
      }
2820 chandransh 8902
      first = false;
8903
      if (!first) sb.append(", ");
8904
      sb.append("type:");
8905
      if (this.type == null) {
8906
        sb.append("null");
8907
      } else {
8908
        sb.append(this.type);
8909
      }
8910
      first = false;
4496 mandeep.dh 8911
      if (!first) sb.append(", ");
8912
      sb.append("quantity:");
8913
      sb.append(this.quantity);
8914
      first = false;
8915
      if (!first) sb.append(", ");
8916
      sb.append("orderId:");
8917
      sb.append(this.orderId);
8918
      first = false;
8919
      if (!first) sb.append(", ");
5110 mandeep.dh 8920
      sb.append("fulfilmentWarehouseId:");
8921
      sb.append(this.fulfilmentWarehouseId);
4496 mandeep.dh 8922
      first = false;
5361 mandeep.dh 8923
      if (!first) sb.append(", ");
8924
      sb.append("billingWarehouseId:");
8925
      sb.append(this.billingWarehouseId);
8926
      first = false;
2820 chandransh 8927
      sb.append(")");
8928
      return sb.toString();
8929
    }
8930
 
3430 rajveer 8931
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 8932
      // check for required fields
8933
    }
8934
 
3430 rajveer 8935
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8936
      try {
8937
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8938
      } catch (org.apache.thrift.TException te) {
8939
        throw new java.io.IOException(te);
8940
      }
8941
    }
8942
 
8943
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8944
      try {
4496 mandeep.dh 8945
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8946
        __isset_bit_vector = new BitSet(1);
3430 rajveer 8947
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8948
      } catch (org.apache.thrift.TException te) {
8949
        throw new java.io.IOException(te);
8950
      }
8951
    }
8952
 
2820 chandransh 8953
  }
8954
 
4496 mandeep.dh 8955
  public static class scanForOrder_result implements org.apache.thrift.TBase<scanForOrder_result, scanForOrder_result._Fields>, java.io.Serializable, Cloneable   {
8956
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_result");
2820 chandransh 8957
 
5361 mandeep.dh 8958
    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 8959
    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 8960
 
5361 mandeep.dh 8961
    private InventoryItem success; // required
3430 rajveer 8962
    private WarehouseServiceException wex; // required
2820 chandransh 8963
 
8964
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 8965
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 8966
      SUCCESS((short)0, "success"),
2820 chandransh 8967
      WEX((short)1, "wex");
8968
 
8969
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8970
 
8971
      static {
8972
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8973
          byName.put(field.getFieldName(), field);
8974
        }
8975
      }
8976
 
8977
      /**
8978
       * Find the _Fields constant that matches fieldId, or null if its not found.
8979
       */
8980
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 8981
        switch(fieldId) {
5361 mandeep.dh 8982
          case 0: // SUCCESS
8983
            return SUCCESS;
3430 rajveer 8984
          case 1: // WEX
8985
            return WEX;
8986
          default:
8987
            return null;
8988
        }
2820 chandransh 8989
      }
8990
 
8991
      /**
8992
       * Find the _Fields constant that matches fieldId, throwing an exception
8993
       * if it is not found.
8994
       */
8995
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8996
        _Fields fields = findByThriftId(fieldId);
8997
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8998
        return fields;
8999
      }
9000
 
9001
      /**
9002
       * Find the _Fields constant that matches name, or null if its not found.
9003
       */
9004
      public static _Fields findByName(String name) {
9005
        return byName.get(name);
9006
      }
9007
 
9008
      private final short _thriftId;
9009
      private final String _fieldName;
9010
 
9011
      _Fields(short thriftId, String fieldName) {
9012
        _thriftId = thriftId;
9013
        _fieldName = fieldName;
9014
      }
9015
 
9016
      public short getThriftFieldId() {
9017
        return _thriftId;
9018
      }
9019
 
9020
      public String getFieldName() {
9021
        return _fieldName;
9022
      }
9023
    }
9024
 
9025
    // isset id assignments
9026
 
3430 rajveer 9027
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 9028
    static {
3430 rajveer 9029
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 9030
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9031
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 9032
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9033
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9034
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 9035
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_result.class, metaDataMap);
2820 chandransh 9036
    }
9037
 
4496 mandeep.dh 9038
    public scanForOrder_result() {
2820 chandransh 9039
    }
9040
 
4496 mandeep.dh 9041
    public scanForOrder_result(
5361 mandeep.dh 9042
      InventoryItem success,
2820 chandransh 9043
      WarehouseServiceException wex)
9044
    {
9045
      this();
5361 mandeep.dh 9046
      this.success = success;
2820 chandransh 9047
      this.wex = wex;
9048
    }
9049
 
9050
    /**
9051
     * Performs a deep copy on <i>other</i>.
9052
     */
4496 mandeep.dh 9053
    public scanForOrder_result(scanForOrder_result other) {
5361 mandeep.dh 9054
      if (other.isSetSuccess()) {
9055
        this.success = new InventoryItem(other.success);
9056
      }
2820 chandransh 9057
      if (other.isSetWex()) {
9058
        this.wex = new WarehouseServiceException(other.wex);
9059
      }
9060
    }
9061
 
4496 mandeep.dh 9062
    public scanForOrder_result deepCopy() {
9063
      return new scanForOrder_result(this);
2820 chandransh 9064
    }
9065
 
3430 rajveer 9066
    @Override
9067
    public void clear() {
5361 mandeep.dh 9068
      this.success = null;
3430 rajveer 9069
      this.wex = null;
2820 chandransh 9070
    }
9071
 
5361 mandeep.dh 9072
    public InventoryItem getSuccess() {
9073
      return this.success;
9074
    }
9075
 
9076
    public void setSuccess(InventoryItem success) {
9077
      this.success = success;
9078
    }
9079
 
9080
    public void unsetSuccess() {
9081
      this.success = null;
9082
    }
9083
 
9084
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9085
    public boolean isSetSuccess() {
9086
      return this.success != null;
9087
    }
9088
 
9089
    public void setSuccessIsSet(boolean value) {
9090
      if (!value) {
9091
        this.success = null;
9092
      }
9093
    }
9094
 
2820 chandransh 9095
    public WarehouseServiceException getWex() {
9096
      return this.wex;
9097
    }
9098
 
3430 rajveer 9099
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 9100
      this.wex = wex;
9101
    }
9102
 
9103
    public void unsetWex() {
9104
      this.wex = null;
9105
    }
9106
 
3430 rajveer 9107
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 9108
    public boolean isSetWex() {
9109
      return this.wex != null;
9110
    }
9111
 
9112
    public void setWexIsSet(boolean value) {
9113
      if (!value) {
9114
        this.wex = null;
9115
      }
9116
    }
9117
 
9118
    public void setFieldValue(_Fields field, Object value) {
9119
      switch (field) {
5361 mandeep.dh 9120
      case SUCCESS:
9121
        if (value == null) {
9122
          unsetSuccess();
9123
        } else {
9124
          setSuccess((InventoryItem)value);
9125
        }
9126
        break;
9127
 
2820 chandransh 9128
      case WEX:
9129
        if (value == null) {
9130
          unsetWex();
9131
        } else {
9132
          setWex((WarehouseServiceException)value);
9133
        }
9134
        break;
9135
 
9136
      }
9137
    }
9138
 
9139
    public Object getFieldValue(_Fields field) {
9140
      switch (field) {
5361 mandeep.dh 9141
      case SUCCESS:
9142
        return getSuccess();
9143
 
2820 chandransh 9144
      case WEX:
9145
        return getWex();
9146
 
9147
      }
9148
      throw new IllegalStateException();
9149
    }
9150
 
3430 rajveer 9151
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9152
    public boolean isSet(_Fields field) {
9153
      if (field == null) {
9154
        throw new IllegalArgumentException();
9155
      }
2820 chandransh 9156
 
9157
      switch (field) {
5361 mandeep.dh 9158
      case SUCCESS:
9159
        return isSetSuccess();
2820 chandransh 9160
      case WEX:
9161
        return isSetWex();
9162
      }
9163
      throw new IllegalStateException();
9164
    }
9165
 
9166
    @Override
9167
    public boolean equals(Object that) {
9168
      if (that == null)
9169
        return false;
4496 mandeep.dh 9170
      if (that instanceof scanForOrder_result)
9171
        return this.equals((scanForOrder_result)that);
2820 chandransh 9172
      return false;
9173
    }
9174
 
4496 mandeep.dh 9175
    public boolean equals(scanForOrder_result that) {
2820 chandransh 9176
      if (that == null)
9177
        return false;
9178
 
5361 mandeep.dh 9179
      boolean this_present_success = true && this.isSetSuccess();
9180
      boolean that_present_success = true && that.isSetSuccess();
9181
      if (this_present_success || that_present_success) {
9182
        if (!(this_present_success && that_present_success))
9183
          return false;
9184
        if (!this.success.equals(that.success))
9185
          return false;
9186
      }
9187
 
2820 chandransh 9188
      boolean this_present_wex = true && this.isSetWex();
9189
      boolean that_present_wex = true && that.isSetWex();
9190
      if (this_present_wex || that_present_wex) {
9191
        if (!(this_present_wex && that_present_wex))
9192
          return false;
9193
        if (!this.wex.equals(that.wex))
9194
          return false;
9195
      }
9196
 
9197
      return true;
9198
    }
9199
 
9200
    @Override
9201
    public int hashCode() {
9202
      return 0;
9203
    }
9204
 
4496 mandeep.dh 9205
    public int compareTo(scanForOrder_result other) {
2820 chandransh 9206
      if (!getClass().equals(other.getClass())) {
9207
        return getClass().getName().compareTo(other.getClass().getName());
9208
      }
9209
 
9210
      int lastComparison = 0;
4496 mandeep.dh 9211
      scanForOrder_result typedOther = (scanForOrder_result)other;
2820 chandransh 9212
 
5361 mandeep.dh 9213
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9214
      if (lastComparison != 0) {
9215
        return lastComparison;
9216
      }
9217
      if (isSetSuccess()) {
9218
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9219
        if (lastComparison != 0) {
9220
          return lastComparison;
9221
        }
9222
      }
3430 rajveer 9223
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 9224
      if (lastComparison != 0) {
9225
        return lastComparison;
9226
      }
3430 rajveer 9227
      if (isSetWex()) {
9228
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
9229
        if (lastComparison != 0) {
9230
          return lastComparison;
9231
        }
2820 chandransh 9232
      }
9233
      return 0;
9234
    }
9235
 
3430 rajveer 9236
    public _Fields fieldForId(int fieldId) {
9237
      return _Fields.findByThriftId(fieldId);
9238
    }
9239
 
9240
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9241
      org.apache.thrift.protocol.TField field;
2820 chandransh 9242
      iprot.readStructBegin();
9243
      while (true)
9244
      {
9245
        field = iprot.readFieldBegin();
3430 rajveer 9246
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 9247
          break;
9248
        }
3430 rajveer 9249
        switch (field.id) {
5361 mandeep.dh 9250
          case 0: // SUCCESS
9251
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9252
              this.success = new InventoryItem();
9253
              this.success.read(iprot);
9254
            } else { 
9255
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9256
            }
9257
            break;
3430 rajveer 9258
          case 1: // WEX
9259
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9260
              this.wex = new WarehouseServiceException();
9261
              this.wex.read(iprot);
9262
            } else { 
9263
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9264
            }
9265
            break;
9266
          default:
9267
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 9268
        }
3430 rajveer 9269
        iprot.readFieldEnd();
2820 chandransh 9270
      }
9271
      iprot.readStructEnd();
9272
      validate();
9273
    }
9274
 
3430 rajveer 9275
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 9276
      oprot.writeStructBegin(STRUCT_DESC);
9277
 
5361 mandeep.dh 9278
      if (this.isSetSuccess()) {
9279
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9280
        this.success.write(oprot);
9281
        oprot.writeFieldEnd();
9282
      } else if (this.isSetWex()) {
2820 chandransh 9283
        oprot.writeFieldBegin(WEX_FIELD_DESC);
9284
        this.wex.write(oprot);
9285
        oprot.writeFieldEnd();
9286
      }
9287
      oprot.writeFieldStop();
9288
      oprot.writeStructEnd();
9289
    }
9290
 
9291
    @Override
9292
    public String toString() {
4496 mandeep.dh 9293
      StringBuilder sb = new StringBuilder("scanForOrder_result(");
2820 chandransh 9294
      boolean first = true;
9295
 
5361 mandeep.dh 9296
      sb.append("success:");
9297
      if (this.success == null) {
9298
        sb.append("null");
9299
      } else {
9300
        sb.append(this.success);
9301
      }
9302
      first = false;
9303
      if (!first) sb.append(", ");
2820 chandransh 9304
      sb.append("wex:");
9305
      if (this.wex == null) {
9306
        sb.append("null");
9307
      } else {
9308
        sb.append(this.wex);
9309
      }
9310
      first = false;
9311
      sb.append(")");
9312
      return sb.toString();
9313
    }
9314
 
3430 rajveer 9315
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 9316
      // check for required fields
9317
    }
9318
 
3430 rajveer 9319
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9320
      try {
9321
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9322
      } catch (org.apache.thrift.TException te) {
9323
        throw new java.io.IOException(te);
9324
      }
9325
    }
9326
 
9327
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9328
      try {
9329
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9330
      } catch (org.apache.thrift.TException te) {
9331
        throw new java.io.IOException(te);
9332
      }
9333
    }
9334
 
2820 chandransh 9335
  }
9336
 
4496 mandeep.dh 9337
  public static class createItemNumberMapping_args implements org.apache.thrift.TBase<createItemNumberMapping_args, createItemNumberMapping_args._Fields>, java.io.Serializable, Cloneable   {
9338
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_args");
9339
 
9340
    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);
9341
    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);
9342
 
9343
    private String itemNumber; // required
9344
    private long itemId; // required
9345
 
9346
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9347
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9348
      ITEM_NUMBER((short)1, "itemNumber"),
9349
      ITEM_ID((short)2, "itemId");
9350
 
9351
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9352
 
9353
      static {
9354
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9355
          byName.put(field.getFieldName(), field);
9356
        }
9357
      }
9358
 
9359
      /**
9360
       * Find the _Fields constant that matches fieldId, or null if its not found.
9361
       */
9362
      public static _Fields findByThriftId(int fieldId) {
9363
        switch(fieldId) {
9364
          case 1: // ITEM_NUMBER
9365
            return ITEM_NUMBER;
9366
          case 2: // ITEM_ID
9367
            return ITEM_ID;
9368
          default:
9369
            return null;
9370
        }
9371
      }
9372
 
9373
      /**
9374
       * Find the _Fields constant that matches fieldId, throwing an exception
9375
       * if it is not found.
9376
       */
9377
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9378
        _Fields fields = findByThriftId(fieldId);
9379
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9380
        return fields;
9381
      }
9382
 
9383
      /**
9384
       * Find the _Fields constant that matches name, or null if its not found.
9385
       */
9386
      public static _Fields findByName(String name) {
9387
        return byName.get(name);
9388
      }
9389
 
9390
      private final short _thriftId;
9391
      private final String _fieldName;
9392
 
9393
      _Fields(short thriftId, String fieldName) {
9394
        _thriftId = thriftId;
9395
        _fieldName = fieldName;
9396
      }
9397
 
9398
      public short getThriftFieldId() {
9399
        return _thriftId;
9400
      }
9401
 
9402
      public String getFieldName() {
9403
        return _fieldName;
9404
      }
9405
    }
9406
 
9407
    // isset id assignments
9408
    private static final int __ITEMID_ISSET_ID = 0;
9409
    private BitSet __isset_bit_vector = new BitSet(1);
9410
 
9411
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9412
    static {
9413
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9414
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9415
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
9416
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9417
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9418
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9419
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_args.class, metaDataMap);
9420
    }
9421
 
9422
    public createItemNumberMapping_args() {
9423
    }
9424
 
9425
    public createItemNumberMapping_args(
9426
      String itemNumber,
9427
      long itemId)
9428
    {
9429
      this();
9430
      this.itemNumber = itemNumber;
9431
      this.itemId = itemId;
9432
      setItemIdIsSet(true);
9433
    }
9434
 
9435
    /**
9436
     * Performs a deep copy on <i>other</i>.
9437
     */
9438
    public createItemNumberMapping_args(createItemNumberMapping_args other) {
9439
      __isset_bit_vector.clear();
9440
      __isset_bit_vector.or(other.__isset_bit_vector);
9441
      if (other.isSetItemNumber()) {
9442
        this.itemNumber = other.itemNumber;
9443
      }
9444
      this.itemId = other.itemId;
9445
    }
9446
 
9447
    public createItemNumberMapping_args deepCopy() {
9448
      return new createItemNumberMapping_args(this);
9449
    }
9450
 
9451
    @Override
9452
    public void clear() {
9453
      this.itemNumber = null;
9454
      setItemIdIsSet(false);
9455
      this.itemId = 0;
9456
    }
9457
 
9458
    public String getItemNumber() {
9459
      return this.itemNumber;
9460
    }
9461
 
9462
    public void setItemNumber(String itemNumber) {
9463
      this.itemNumber = itemNumber;
9464
    }
9465
 
9466
    public void unsetItemNumber() {
9467
      this.itemNumber = null;
9468
    }
9469
 
9470
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
9471
    public boolean isSetItemNumber() {
9472
      return this.itemNumber != null;
9473
    }
9474
 
9475
    public void setItemNumberIsSet(boolean value) {
9476
      if (!value) {
9477
        this.itemNumber = null;
9478
      }
9479
    }
9480
 
9481
    public long getItemId() {
9482
      return this.itemId;
9483
    }
9484
 
9485
    public void setItemId(long itemId) {
9486
      this.itemId = itemId;
9487
      setItemIdIsSet(true);
9488
    }
9489
 
9490
    public void unsetItemId() {
9491
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
9492
    }
9493
 
9494
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
9495
    public boolean isSetItemId() {
9496
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
9497
    }
9498
 
9499
    public void setItemIdIsSet(boolean value) {
9500
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
9501
    }
9502
 
9503
    public void setFieldValue(_Fields field, Object value) {
9504
      switch (field) {
9505
      case ITEM_NUMBER:
9506
        if (value == null) {
9507
          unsetItemNumber();
9508
        } else {
9509
          setItemNumber((String)value);
9510
        }
9511
        break;
9512
 
9513
      case ITEM_ID:
9514
        if (value == null) {
9515
          unsetItemId();
9516
        } else {
9517
          setItemId((Long)value);
9518
        }
9519
        break;
9520
 
9521
      }
9522
    }
9523
 
9524
    public Object getFieldValue(_Fields field) {
9525
      switch (field) {
9526
      case ITEM_NUMBER:
9527
        return getItemNumber();
9528
 
9529
      case ITEM_ID:
9530
        return Long.valueOf(getItemId());
9531
 
9532
      }
9533
      throw new IllegalStateException();
9534
    }
9535
 
9536
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9537
    public boolean isSet(_Fields field) {
9538
      if (field == null) {
9539
        throw new IllegalArgumentException();
9540
      }
9541
 
9542
      switch (field) {
9543
      case ITEM_NUMBER:
9544
        return isSetItemNumber();
9545
      case ITEM_ID:
9546
        return isSetItemId();
9547
      }
9548
      throw new IllegalStateException();
9549
    }
9550
 
9551
    @Override
9552
    public boolean equals(Object that) {
9553
      if (that == null)
9554
        return false;
9555
      if (that instanceof createItemNumberMapping_args)
9556
        return this.equals((createItemNumberMapping_args)that);
9557
      return false;
9558
    }
9559
 
9560
    public boolean equals(createItemNumberMapping_args that) {
9561
      if (that == null)
9562
        return false;
9563
 
9564
      boolean this_present_itemNumber = true && this.isSetItemNumber();
9565
      boolean that_present_itemNumber = true && that.isSetItemNumber();
9566
      if (this_present_itemNumber || that_present_itemNumber) {
9567
        if (!(this_present_itemNumber && that_present_itemNumber))
9568
          return false;
9569
        if (!this.itemNumber.equals(that.itemNumber))
9570
          return false;
9571
      }
9572
 
9573
      boolean this_present_itemId = true;
9574
      boolean that_present_itemId = true;
9575
      if (this_present_itemId || that_present_itemId) {
9576
        if (!(this_present_itemId && that_present_itemId))
9577
          return false;
9578
        if (this.itemId != that.itemId)
9579
          return false;
9580
      }
9581
 
9582
      return true;
9583
    }
9584
 
9585
    @Override
9586
    public int hashCode() {
9587
      return 0;
9588
    }
9589
 
9590
    public int compareTo(createItemNumberMapping_args other) {
9591
      if (!getClass().equals(other.getClass())) {
9592
        return getClass().getName().compareTo(other.getClass().getName());
9593
      }
9594
 
9595
      int lastComparison = 0;
9596
      createItemNumberMapping_args typedOther = (createItemNumberMapping_args)other;
9597
 
9598
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
9599
      if (lastComparison != 0) {
9600
        return lastComparison;
9601
      }
9602
      if (isSetItemNumber()) {
9603
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
9604
        if (lastComparison != 0) {
9605
          return lastComparison;
9606
        }
9607
      }
9608
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
9609
      if (lastComparison != 0) {
9610
        return lastComparison;
9611
      }
9612
      if (isSetItemId()) {
9613
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
9614
        if (lastComparison != 0) {
9615
          return lastComparison;
9616
        }
9617
      }
9618
      return 0;
9619
    }
9620
 
9621
    public _Fields fieldForId(int fieldId) {
9622
      return _Fields.findByThriftId(fieldId);
9623
    }
9624
 
9625
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9626
      org.apache.thrift.protocol.TField field;
9627
      iprot.readStructBegin();
9628
      while (true)
9629
      {
9630
        field = iprot.readFieldBegin();
9631
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9632
          break;
9633
        }
9634
        switch (field.id) {
9635
          case 1: // ITEM_NUMBER
9636
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
9637
              this.itemNumber = iprot.readString();
9638
            } else { 
9639
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9640
            }
9641
            break;
9642
          case 2: // ITEM_ID
9643
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9644
              this.itemId = iprot.readI64();
9645
              setItemIdIsSet(true);
9646
            } else { 
9647
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9648
            }
9649
            break;
9650
          default:
9651
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9652
        }
9653
        iprot.readFieldEnd();
9654
      }
9655
      iprot.readStructEnd();
9656
      validate();
9657
    }
9658
 
9659
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9660
      validate();
9661
 
9662
      oprot.writeStructBegin(STRUCT_DESC);
9663
      if (this.itemNumber != null) {
9664
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
9665
        oprot.writeString(this.itemNumber);
9666
        oprot.writeFieldEnd();
9667
      }
9668
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
9669
      oprot.writeI64(this.itemId);
9670
      oprot.writeFieldEnd();
9671
      oprot.writeFieldStop();
9672
      oprot.writeStructEnd();
9673
    }
9674
 
9675
    @Override
9676
    public String toString() {
9677
      StringBuilder sb = new StringBuilder("createItemNumberMapping_args(");
9678
      boolean first = true;
9679
 
9680
      sb.append("itemNumber:");
9681
      if (this.itemNumber == null) {
9682
        sb.append("null");
9683
      } else {
9684
        sb.append(this.itemNumber);
9685
      }
9686
      first = false;
9687
      if (!first) sb.append(", ");
9688
      sb.append("itemId:");
9689
      sb.append(this.itemId);
9690
      first = false;
9691
      sb.append(")");
9692
      return sb.toString();
9693
    }
9694
 
9695
    public void validate() throws org.apache.thrift.TException {
9696
      // check for required fields
9697
    }
9698
 
9699
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9700
      try {
9701
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9702
      } catch (org.apache.thrift.TException te) {
9703
        throw new java.io.IOException(te);
9704
      }
9705
    }
9706
 
9707
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9708
      try {
9709
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9710
        __isset_bit_vector = new BitSet(1);
9711
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9712
      } catch (org.apache.thrift.TException te) {
9713
        throw new java.io.IOException(te);
9714
      }
9715
    }
9716
 
9717
  }
9718
 
9719
  public static class createItemNumberMapping_result implements org.apache.thrift.TBase<createItemNumberMapping_result, createItemNumberMapping_result._Fields>, java.io.Serializable, Cloneable   {
9720
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_result");
9721
 
9722
 
9723
 
9724
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9725
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9726
;
9727
 
9728
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9729
 
9730
      static {
9731
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9732
          byName.put(field.getFieldName(), field);
9733
        }
9734
      }
9735
 
9736
      /**
9737
       * Find the _Fields constant that matches fieldId, or null if its not found.
9738
       */
9739
      public static _Fields findByThriftId(int fieldId) {
9740
        switch(fieldId) {
9741
          default:
9742
            return null;
9743
        }
9744
      }
9745
 
9746
      /**
9747
       * Find the _Fields constant that matches fieldId, throwing an exception
9748
       * if it is not found.
9749
       */
9750
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9751
        _Fields fields = findByThriftId(fieldId);
9752
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9753
        return fields;
9754
      }
9755
 
9756
      /**
9757
       * Find the _Fields constant that matches name, or null if its not found.
9758
       */
9759
      public static _Fields findByName(String name) {
9760
        return byName.get(name);
9761
      }
9762
 
9763
      private final short _thriftId;
9764
      private final String _fieldName;
9765
 
9766
      _Fields(short thriftId, String fieldName) {
9767
        _thriftId = thriftId;
9768
        _fieldName = fieldName;
9769
      }
9770
 
9771
      public short getThriftFieldId() {
9772
        return _thriftId;
9773
      }
9774
 
9775
      public String getFieldName() {
9776
        return _fieldName;
9777
      }
9778
    }
9779
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9780
    static {
9781
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9782
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9783
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_result.class, metaDataMap);
9784
    }
9785
 
9786
    public createItemNumberMapping_result() {
9787
    }
9788
 
9789
    /**
9790
     * Performs a deep copy on <i>other</i>.
9791
     */
9792
    public createItemNumberMapping_result(createItemNumberMapping_result other) {
9793
    }
9794
 
9795
    public createItemNumberMapping_result deepCopy() {
9796
      return new createItemNumberMapping_result(this);
9797
    }
9798
 
9799
    @Override
9800
    public void clear() {
9801
    }
9802
 
9803
    public void setFieldValue(_Fields field, Object value) {
9804
      switch (field) {
9805
      }
9806
    }
9807
 
9808
    public Object getFieldValue(_Fields field) {
9809
      switch (field) {
9810
      }
9811
      throw new IllegalStateException();
9812
    }
9813
 
9814
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9815
    public boolean isSet(_Fields field) {
9816
      if (field == null) {
9817
        throw new IllegalArgumentException();
9818
      }
9819
 
9820
      switch (field) {
9821
      }
9822
      throw new IllegalStateException();
9823
    }
9824
 
9825
    @Override
9826
    public boolean equals(Object that) {
9827
      if (that == null)
9828
        return false;
9829
      if (that instanceof createItemNumberMapping_result)
9830
        return this.equals((createItemNumberMapping_result)that);
9831
      return false;
9832
    }
9833
 
9834
    public boolean equals(createItemNumberMapping_result that) {
9835
      if (that == null)
9836
        return false;
9837
 
9838
      return true;
9839
    }
9840
 
9841
    @Override
9842
    public int hashCode() {
9843
      return 0;
9844
    }
9845
 
9846
    public int compareTo(createItemNumberMapping_result other) {
9847
      if (!getClass().equals(other.getClass())) {
9848
        return getClass().getName().compareTo(other.getClass().getName());
9849
      }
9850
 
9851
      int lastComparison = 0;
9852
      createItemNumberMapping_result typedOther = (createItemNumberMapping_result)other;
9853
 
9854
      return 0;
9855
    }
9856
 
9857
    public _Fields fieldForId(int fieldId) {
9858
      return _Fields.findByThriftId(fieldId);
9859
    }
9860
 
9861
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9862
      org.apache.thrift.protocol.TField field;
9863
      iprot.readStructBegin();
9864
      while (true)
9865
      {
9866
        field = iprot.readFieldBegin();
9867
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9868
          break;
9869
        }
9870
        switch (field.id) {
9871
          default:
9872
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9873
        }
9874
        iprot.readFieldEnd();
9875
      }
9876
      iprot.readStructEnd();
9877
      validate();
9878
    }
9879
 
9880
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9881
      oprot.writeStructBegin(STRUCT_DESC);
9882
 
9883
      oprot.writeFieldStop();
9884
      oprot.writeStructEnd();
9885
    }
9886
 
9887
    @Override
9888
    public String toString() {
9889
      StringBuilder sb = new StringBuilder("createItemNumberMapping_result(");
9890
      boolean first = true;
9891
 
9892
      sb.append(")");
9893
      return sb.toString();
9894
    }
9895
 
9896
    public void validate() throws org.apache.thrift.TException {
9897
      // check for required fields
9898
    }
9899
 
9900
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9901
      try {
9902
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9903
      } catch (org.apache.thrift.TException te) {
9904
        throw new java.io.IOException(te);
9905
      }
9906
    }
9907
 
9908
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9909
      try {
9910
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9911
      } catch (org.apache.thrift.TException te) {
9912
        throw new java.io.IOException(te);
9913
      }
9914
    }
9915
 
9916
  }
9917
 
4622 amit.gupta 9918
  public static class getItemNumbers_args implements org.apache.thrift.TBase<getItemNumbers_args, getItemNumbers_args._Fields>, java.io.Serializable, Cloneable   {
9919
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_args");
9920
 
9921
    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);
9922
 
9923
    private long itemId; // required
9924
 
9925
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9926
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9927
      ITEM_ID((short)1, "itemId");
9928
 
9929
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9930
 
9931
      static {
9932
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9933
          byName.put(field.getFieldName(), field);
9934
        }
9935
      }
9936
 
9937
      /**
9938
       * Find the _Fields constant that matches fieldId, or null if its not found.
9939
       */
9940
      public static _Fields findByThriftId(int fieldId) {
9941
        switch(fieldId) {
9942
          case 1: // ITEM_ID
9943
            return ITEM_ID;
9944
          default:
9945
            return null;
9946
        }
9947
      }
9948
 
9949
      /**
9950
       * Find the _Fields constant that matches fieldId, throwing an exception
9951
       * if it is not found.
9952
       */
9953
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9954
        _Fields fields = findByThriftId(fieldId);
9955
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9956
        return fields;
9957
      }
9958
 
9959
      /**
9960
       * Find the _Fields constant that matches name, or null if its not found.
9961
       */
9962
      public static _Fields findByName(String name) {
9963
        return byName.get(name);
9964
      }
9965
 
9966
      private final short _thriftId;
9967
      private final String _fieldName;
9968
 
9969
      _Fields(short thriftId, String fieldName) {
9970
        _thriftId = thriftId;
9971
        _fieldName = fieldName;
9972
      }
9973
 
9974
      public short getThriftFieldId() {
9975
        return _thriftId;
9976
      }
9977
 
9978
      public String getFieldName() {
9979
        return _fieldName;
9980
      }
9981
    }
9982
 
9983
    // isset id assignments
9984
    private static final int __ITEMID_ISSET_ID = 0;
9985
    private BitSet __isset_bit_vector = new BitSet(1);
9986
 
9987
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9988
    static {
9989
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9990
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9991
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9992
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9993
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_args.class, metaDataMap);
9994
    }
9995
 
9996
    public getItemNumbers_args() {
9997
    }
9998
 
9999
    public getItemNumbers_args(
10000
      long itemId)
10001
    {
10002
      this();
10003
      this.itemId = itemId;
10004
      setItemIdIsSet(true);
10005
    }
10006
 
10007
    /**
10008
     * Performs a deep copy on <i>other</i>.
10009
     */
10010
    public getItemNumbers_args(getItemNumbers_args other) {
10011
      __isset_bit_vector.clear();
10012
      __isset_bit_vector.or(other.__isset_bit_vector);
10013
      this.itemId = other.itemId;
10014
    }
10015
 
10016
    public getItemNumbers_args deepCopy() {
10017
      return new getItemNumbers_args(this);
10018
    }
10019
 
10020
    @Override
10021
    public void clear() {
10022
      setItemIdIsSet(false);
10023
      this.itemId = 0;
10024
    }
10025
 
10026
    public long getItemId() {
10027
      return this.itemId;
10028
    }
10029
 
10030
    public void setItemId(long itemId) {
10031
      this.itemId = itemId;
10032
      setItemIdIsSet(true);
10033
    }
10034
 
10035
    public void unsetItemId() {
10036
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
10037
    }
10038
 
10039
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
10040
    public boolean isSetItemId() {
10041
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
10042
    }
10043
 
10044
    public void setItemIdIsSet(boolean value) {
10045
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
10046
    }
10047
 
10048
    public void setFieldValue(_Fields field, Object value) {
10049
      switch (field) {
10050
      case ITEM_ID:
10051
        if (value == null) {
10052
          unsetItemId();
10053
        } else {
10054
          setItemId((Long)value);
10055
        }
10056
        break;
10057
 
10058
      }
10059
    }
10060
 
10061
    public Object getFieldValue(_Fields field) {
10062
      switch (field) {
10063
      case ITEM_ID:
10064
        return Long.valueOf(getItemId());
10065
 
10066
      }
10067
      throw new IllegalStateException();
10068
    }
10069
 
10070
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10071
    public boolean isSet(_Fields field) {
10072
      if (field == null) {
10073
        throw new IllegalArgumentException();
10074
      }
10075
 
10076
      switch (field) {
10077
      case ITEM_ID:
10078
        return isSetItemId();
10079
      }
10080
      throw new IllegalStateException();
10081
    }
10082
 
10083
    @Override
10084
    public boolean equals(Object that) {
10085
      if (that == null)
10086
        return false;
10087
      if (that instanceof getItemNumbers_args)
10088
        return this.equals((getItemNumbers_args)that);
10089
      return false;
10090
    }
10091
 
10092
    public boolean equals(getItemNumbers_args that) {
10093
      if (that == null)
10094
        return false;
10095
 
10096
      boolean this_present_itemId = true;
10097
      boolean that_present_itemId = true;
10098
      if (this_present_itemId || that_present_itemId) {
10099
        if (!(this_present_itemId && that_present_itemId))
10100
          return false;
10101
        if (this.itemId != that.itemId)
10102
          return false;
10103
      }
10104
 
10105
      return true;
10106
    }
10107
 
10108
    @Override
10109
    public int hashCode() {
10110
      return 0;
10111
    }
10112
 
10113
    public int compareTo(getItemNumbers_args other) {
10114
      if (!getClass().equals(other.getClass())) {
10115
        return getClass().getName().compareTo(other.getClass().getName());
10116
      }
10117
 
10118
      int lastComparison = 0;
10119
      getItemNumbers_args typedOther = (getItemNumbers_args)other;
10120
 
10121
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
10122
      if (lastComparison != 0) {
10123
        return lastComparison;
10124
      }
10125
      if (isSetItemId()) {
10126
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
10127
        if (lastComparison != 0) {
10128
          return lastComparison;
10129
        }
10130
      }
10131
      return 0;
10132
    }
10133
 
10134
    public _Fields fieldForId(int fieldId) {
10135
      return _Fields.findByThriftId(fieldId);
10136
    }
10137
 
10138
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10139
      org.apache.thrift.protocol.TField field;
10140
      iprot.readStructBegin();
10141
      while (true)
10142
      {
10143
        field = iprot.readFieldBegin();
10144
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10145
          break;
10146
        }
10147
        switch (field.id) {
10148
          case 1: // ITEM_ID
10149
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10150
              this.itemId = iprot.readI64();
10151
              setItemIdIsSet(true);
10152
            } else { 
10153
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10154
            }
10155
            break;
10156
          default:
10157
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10158
        }
10159
        iprot.readFieldEnd();
10160
      }
10161
      iprot.readStructEnd();
10162
      validate();
10163
    }
10164
 
10165
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10166
      validate();
10167
 
10168
      oprot.writeStructBegin(STRUCT_DESC);
10169
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
10170
      oprot.writeI64(this.itemId);
10171
      oprot.writeFieldEnd();
10172
      oprot.writeFieldStop();
10173
      oprot.writeStructEnd();
10174
    }
10175
 
10176
    @Override
10177
    public String toString() {
10178
      StringBuilder sb = new StringBuilder("getItemNumbers_args(");
10179
      boolean first = true;
10180
 
10181
      sb.append("itemId:");
10182
      sb.append(this.itemId);
10183
      first = false;
10184
      sb.append(")");
10185
      return sb.toString();
10186
    }
10187
 
10188
    public void validate() throws org.apache.thrift.TException {
10189
      // check for required fields
10190
    }
10191
 
10192
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10193
      try {
10194
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10195
      } catch (org.apache.thrift.TException te) {
10196
        throw new java.io.IOException(te);
10197
      }
10198
    }
10199
 
10200
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10201
      try {
10202
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10203
        __isset_bit_vector = new BitSet(1);
10204
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10205
      } catch (org.apache.thrift.TException te) {
10206
        throw new java.io.IOException(te);
10207
      }
10208
    }
10209
 
10210
  }
10211
 
10212
  public static class getItemNumbers_result implements org.apache.thrift.TBase<getItemNumbers_result, getItemNumbers_result._Fields>, java.io.Serializable, Cloneable   {
10213
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_result");
10214
 
10215
    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);
10216
 
10217
    private List<String> success; // required
10218
 
10219
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10220
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10221
      SUCCESS((short)0, "success");
10222
 
10223
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10224
 
10225
      static {
10226
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10227
          byName.put(field.getFieldName(), field);
10228
        }
10229
      }
10230
 
10231
      /**
10232
       * Find the _Fields constant that matches fieldId, or null if its not found.
10233
       */
10234
      public static _Fields findByThriftId(int fieldId) {
10235
        switch(fieldId) {
10236
          case 0: // SUCCESS
10237
            return SUCCESS;
10238
          default:
10239
            return null;
10240
        }
10241
      }
10242
 
10243
      /**
10244
       * Find the _Fields constant that matches fieldId, throwing an exception
10245
       * if it is not found.
10246
       */
10247
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10248
        _Fields fields = findByThriftId(fieldId);
10249
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10250
        return fields;
10251
      }
10252
 
10253
      /**
10254
       * Find the _Fields constant that matches name, or null if its not found.
10255
       */
10256
      public static _Fields findByName(String name) {
10257
        return byName.get(name);
10258
      }
10259
 
10260
      private final short _thriftId;
10261
      private final String _fieldName;
10262
 
10263
      _Fields(short thriftId, String fieldName) {
10264
        _thriftId = thriftId;
10265
        _fieldName = fieldName;
10266
      }
10267
 
10268
      public short getThriftFieldId() {
10269
        return _thriftId;
10270
      }
10271
 
10272
      public String getFieldName() {
10273
        return _fieldName;
10274
      }
10275
    }
10276
 
10277
    // isset id assignments
10278
 
10279
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10280
    static {
10281
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10282
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10283
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10284
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
10285
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10286
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_result.class, metaDataMap);
10287
    }
10288
 
10289
    public getItemNumbers_result() {
10290
    }
10291
 
10292
    public getItemNumbers_result(
10293
      List<String> success)
10294
    {
10295
      this();
10296
      this.success = success;
10297
    }
10298
 
10299
    /**
10300
     * Performs a deep copy on <i>other</i>.
10301
     */
10302
    public getItemNumbers_result(getItemNumbers_result other) {
10303
      if (other.isSetSuccess()) {
10304
        List<String> __this__success = new ArrayList<String>();
10305
        for (String other_element : other.success) {
10306
          __this__success.add(other_element);
10307
        }
10308
        this.success = __this__success;
10309
      }
10310
    }
10311
 
10312
    public getItemNumbers_result deepCopy() {
10313
      return new getItemNumbers_result(this);
10314
    }
10315
 
10316
    @Override
10317
    public void clear() {
10318
      this.success = null;
10319
    }
10320
 
10321
    public int getSuccessSize() {
10322
      return (this.success == null) ? 0 : this.success.size();
10323
    }
10324
 
10325
    public java.util.Iterator<String> getSuccessIterator() {
10326
      return (this.success == null) ? null : this.success.iterator();
10327
    }
10328
 
10329
    public void addToSuccess(String elem) {
10330
      if (this.success == null) {
10331
        this.success = new ArrayList<String>();
10332
      }
10333
      this.success.add(elem);
10334
    }
10335
 
10336
    public List<String> getSuccess() {
10337
      return this.success;
10338
    }
10339
 
10340
    public void setSuccess(List<String> success) {
10341
      this.success = success;
10342
    }
10343
 
10344
    public void unsetSuccess() {
10345
      this.success = null;
10346
    }
10347
 
10348
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10349
    public boolean isSetSuccess() {
10350
      return this.success != null;
10351
    }
10352
 
10353
    public void setSuccessIsSet(boolean value) {
10354
      if (!value) {
10355
        this.success = null;
10356
      }
10357
    }
10358
 
10359
    public void setFieldValue(_Fields field, Object value) {
10360
      switch (field) {
10361
      case SUCCESS:
10362
        if (value == null) {
10363
          unsetSuccess();
10364
        } else {
10365
          setSuccess((List<String>)value);
10366
        }
10367
        break;
10368
 
10369
      }
10370
    }
10371
 
10372
    public Object getFieldValue(_Fields field) {
10373
      switch (field) {
10374
      case SUCCESS:
10375
        return getSuccess();
10376
 
10377
      }
10378
      throw new IllegalStateException();
10379
    }
10380
 
10381
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10382
    public boolean isSet(_Fields field) {
10383
      if (field == null) {
10384
        throw new IllegalArgumentException();
10385
      }
10386
 
10387
      switch (field) {
10388
      case SUCCESS:
10389
        return isSetSuccess();
10390
      }
10391
      throw new IllegalStateException();
10392
    }
10393
 
10394
    @Override
10395
    public boolean equals(Object that) {
10396
      if (that == null)
10397
        return false;
10398
      if (that instanceof getItemNumbers_result)
10399
        return this.equals((getItemNumbers_result)that);
10400
      return false;
10401
    }
10402
 
10403
    public boolean equals(getItemNumbers_result that) {
10404
      if (that == null)
10405
        return false;
10406
 
10407
      boolean this_present_success = true && this.isSetSuccess();
10408
      boolean that_present_success = true && that.isSetSuccess();
10409
      if (this_present_success || that_present_success) {
10410
        if (!(this_present_success && that_present_success))
10411
          return false;
10412
        if (!this.success.equals(that.success))
10413
          return false;
10414
      }
10415
 
10416
      return true;
10417
    }
10418
 
10419
    @Override
10420
    public int hashCode() {
10421
      return 0;
10422
    }
10423
 
10424
    public int compareTo(getItemNumbers_result other) {
10425
      if (!getClass().equals(other.getClass())) {
10426
        return getClass().getName().compareTo(other.getClass().getName());
10427
      }
10428
 
10429
      int lastComparison = 0;
10430
      getItemNumbers_result typedOther = (getItemNumbers_result)other;
10431
 
10432
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10433
      if (lastComparison != 0) {
10434
        return lastComparison;
10435
      }
10436
      if (isSetSuccess()) {
10437
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10438
        if (lastComparison != 0) {
10439
          return lastComparison;
10440
        }
10441
      }
10442
      return 0;
10443
    }
10444
 
10445
    public _Fields fieldForId(int fieldId) {
10446
      return _Fields.findByThriftId(fieldId);
10447
    }
10448
 
10449
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10450
      org.apache.thrift.protocol.TField field;
10451
      iprot.readStructBegin();
10452
      while (true)
10453
      {
10454
        field = iprot.readFieldBegin();
10455
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10456
          break;
10457
        }
10458
        switch (field.id) {
10459
          case 0: // SUCCESS
10460
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10461
              {
5361 mandeep.dh 10462
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
10463
                this.success = new ArrayList<String>(_list0.size);
10464
                for (int _i1 = 0; _i1 < _list0.size; ++_i1)
4622 amit.gupta 10465
                {
5361 mandeep.dh 10466
                  String _elem2; // required
10467
                  _elem2 = iprot.readString();
10468
                  this.success.add(_elem2);
4622 amit.gupta 10469
                }
10470
                iprot.readListEnd();
10471
              }
10472
            } else { 
10473
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10474
            }
10475
            break;
10476
          default:
10477
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10478
        }
10479
        iprot.readFieldEnd();
10480
      }
10481
      iprot.readStructEnd();
10482
      validate();
10483
    }
10484
 
10485
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10486
      oprot.writeStructBegin(STRUCT_DESC);
10487
 
10488
      if (this.isSetSuccess()) {
10489
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10490
        {
10491
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
5361 mandeep.dh 10492
          for (String _iter3 : this.success)
4622 amit.gupta 10493
          {
5361 mandeep.dh 10494
            oprot.writeString(_iter3);
4622 amit.gupta 10495
          }
10496
          oprot.writeListEnd();
10497
        }
10498
        oprot.writeFieldEnd();
10499
      }
10500
      oprot.writeFieldStop();
10501
      oprot.writeStructEnd();
10502
    }
10503
 
10504
    @Override
10505
    public String toString() {
10506
      StringBuilder sb = new StringBuilder("getItemNumbers_result(");
10507
      boolean first = true;
10508
 
10509
      sb.append("success:");
10510
      if (this.success == null) {
10511
        sb.append("null");
10512
      } else {
10513
        sb.append(this.success);
10514
      }
10515
      first = false;
10516
      sb.append(")");
10517
      return sb.toString();
10518
    }
10519
 
10520
    public void validate() throws org.apache.thrift.TException {
10521
      // check for required fields
10522
    }
10523
 
10524
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10525
      try {
10526
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10527
      } catch (org.apache.thrift.TException te) {
10528
        throw new java.io.IOException(te);
10529
      }
10530
    }
10531
 
10532
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10533
      try {
10534
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10535
      } catch (org.apache.thrift.TException te) {
10536
        throw new java.io.IOException(te);
10537
      }
10538
    }
10539
 
10540
  }
10541
 
5110 mandeep.dh 10542
  public static class getItemIds_args implements org.apache.thrift.TBase<getItemIds_args, getItemIds_args._Fields>, java.io.Serializable, Cloneable   {
10543
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_args");
10544
 
10545
    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);
10546
 
10547
    private String itemNumber; // required
10548
 
10549
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10550
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10551
      ITEM_NUMBER((short)1, "itemNumber");
10552
 
10553
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10554
 
10555
      static {
10556
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10557
          byName.put(field.getFieldName(), field);
10558
        }
10559
      }
10560
 
10561
      /**
10562
       * Find the _Fields constant that matches fieldId, or null if its not found.
10563
       */
10564
      public static _Fields findByThriftId(int fieldId) {
10565
        switch(fieldId) {
10566
          case 1: // ITEM_NUMBER
10567
            return ITEM_NUMBER;
10568
          default:
10569
            return null;
10570
        }
10571
      }
10572
 
10573
      /**
10574
       * Find the _Fields constant that matches fieldId, throwing an exception
10575
       * if it is not found.
10576
       */
10577
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10578
        _Fields fields = findByThriftId(fieldId);
10579
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10580
        return fields;
10581
      }
10582
 
10583
      /**
10584
       * Find the _Fields constant that matches name, or null if its not found.
10585
       */
10586
      public static _Fields findByName(String name) {
10587
        return byName.get(name);
10588
      }
10589
 
10590
      private final short _thriftId;
10591
      private final String _fieldName;
10592
 
10593
      _Fields(short thriftId, String fieldName) {
10594
        _thriftId = thriftId;
10595
        _fieldName = fieldName;
10596
      }
10597
 
10598
      public short getThriftFieldId() {
10599
        return _thriftId;
10600
      }
10601
 
10602
      public String getFieldName() {
10603
        return _fieldName;
10604
      }
10605
    }
10606
 
10607
    // isset id assignments
10608
 
10609
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10610
    static {
10611
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10612
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10613
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10614
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10615
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_args.class, metaDataMap);
10616
    }
10617
 
10618
    public getItemIds_args() {
10619
    }
10620
 
10621
    public getItemIds_args(
10622
      String itemNumber)
10623
    {
10624
      this();
10625
      this.itemNumber = itemNumber;
10626
    }
10627
 
10628
    /**
10629
     * Performs a deep copy on <i>other</i>.
10630
     */
10631
    public getItemIds_args(getItemIds_args other) {
10632
      if (other.isSetItemNumber()) {
10633
        this.itemNumber = other.itemNumber;
10634
      }
10635
    }
10636
 
10637
    public getItemIds_args deepCopy() {
10638
      return new getItemIds_args(this);
10639
    }
10640
 
10641
    @Override
10642
    public void clear() {
10643
      this.itemNumber = null;
10644
    }
10645
 
10646
    public String getItemNumber() {
10647
      return this.itemNumber;
10648
    }
10649
 
10650
    public void setItemNumber(String itemNumber) {
10651
      this.itemNumber = itemNumber;
10652
    }
10653
 
10654
    public void unsetItemNumber() {
10655
      this.itemNumber = null;
10656
    }
10657
 
10658
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
10659
    public boolean isSetItemNumber() {
10660
      return this.itemNumber != null;
10661
    }
10662
 
10663
    public void setItemNumberIsSet(boolean value) {
10664
      if (!value) {
10665
        this.itemNumber = null;
10666
      }
10667
    }
10668
 
10669
    public void setFieldValue(_Fields field, Object value) {
10670
      switch (field) {
10671
      case ITEM_NUMBER:
10672
        if (value == null) {
10673
          unsetItemNumber();
10674
        } else {
10675
          setItemNumber((String)value);
10676
        }
10677
        break;
10678
 
10679
      }
10680
    }
10681
 
10682
    public Object getFieldValue(_Fields field) {
10683
      switch (field) {
10684
      case ITEM_NUMBER:
10685
        return getItemNumber();
10686
 
10687
      }
10688
      throw new IllegalStateException();
10689
    }
10690
 
10691
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10692
    public boolean isSet(_Fields field) {
10693
      if (field == null) {
10694
        throw new IllegalArgumentException();
10695
      }
10696
 
10697
      switch (field) {
10698
      case ITEM_NUMBER:
10699
        return isSetItemNumber();
10700
      }
10701
      throw new IllegalStateException();
10702
    }
10703
 
10704
    @Override
10705
    public boolean equals(Object that) {
10706
      if (that == null)
10707
        return false;
10708
      if (that instanceof getItemIds_args)
10709
        return this.equals((getItemIds_args)that);
10710
      return false;
10711
    }
10712
 
10713
    public boolean equals(getItemIds_args that) {
10714
      if (that == null)
10715
        return false;
10716
 
10717
      boolean this_present_itemNumber = true && this.isSetItemNumber();
10718
      boolean that_present_itemNumber = true && that.isSetItemNumber();
10719
      if (this_present_itemNumber || that_present_itemNumber) {
10720
        if (!(this_present_itemNumber && that_present_itemNumber))
10721
          return false;
10722
        if (!this.itemNumber.equals(that.itemNumber))
10723
          return false;
10724
      }
10725
 
10726
      return true;
10727
    }
10728
 
10729
    @Override
10730
    public int hashCode() {
10731
      return 0;
10732
    }
10733
 
10734
    public int compareTo(getItemIds_args other) {
10735
      if (!getClass().equals(other.getClass())) {
10736
        return getClass().getName().compareTo(other.getClass().getName());
10737
      }
10738
 
10739
      int lastComparison = 0;
10740
      getItemIds_args typedOther = (getItemIds_args)other;
10741
 
10742
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
10743
      if (lastComparison != 0) {
10744
        return lastComparison;
10745
      }
10746
      if (isSetItemNumber()) {
10747
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
10748
        if (lastComparison != 0) {
10749
          return lastComparison;
10750
        }
10751
      }
10752
      return 0;
10753
    }
10754
 
10755
    public _Fields fieldForId(int fieldId) {
10756
      return _Fields.findByThriftId(fieldId);
10757
    }
10758
 
10759
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10760
      org.apache.thrift.protocol.TField field;
10761
      iprot.readStructBegin();
10762
      while (true)
10763
      {
10764
        field = iprot.readFieldBegin();
10765
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10766
          break;
10767
        }
10768
        switch (field.id) {
10769
          case 1: // ITEM_NUMBER
10770
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
10771
              this.itemNumber = iprot.readString();
10772
            } else { 
10773
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10774
            }
10775
            break;
10776
          default:
10777
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10778
        }
10779
        iprot.readFieldEnd();
10780
      }
10781
      iprot.readStructEnd();
10782
      validate();
10783
    }
10784
 
10785
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10786
      validate();
10787
 
10788
      oprot.writeStructBegin(STRUCT_DESC);
10789
      if (this.itemNumber != null) {
10790
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
10791
        oprot.writeString(this.itemNumber);
10792
        oprot.writeFieldEnd();
10793
      }
10794
      oprot.writeFieldStop();
10795
      oprot.writeStructEnd();
10796
    }
10797
 
10798
    @Override
10799
    public String toString() {
10800
      StringBuilder sb = new StringBuilder("getItemIds_args(");
10801
      boolean first = true;
10802
 
10803
      sb.append("itemNumber:");
10804
      if (this.itemNumber == null) {
10805
        sb.append("null");
10806
      } else {
10807
        sb.append(this.itemNumber);
10808
      }
10809
      first = false;
10810
      sb.append(")");
10811
      return sb.toString();
10812
    }
10813
 
10814
    public void validate() throws org.apache.thrift.TException {
10815
      // check for required fields
10816
    }
10817
 
10818
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10819
      try {
10820
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10821
      } catch (org.apache.thrift.TException te) {
10822
        throw new java.io.IOException(te);
10823
      }
10824
    }
10825
 
10826
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10827
      try {
10828
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10829
      } catch (org.apache.thrift.TException te) {
10830
        throw new java.io.IOException(te);
10831
      }
10832
    }
10833
 
10834
  }
10835
 
10836
  public static class getItemIds_result implements org.apache.thrift.TBase<getItemIds_result, getItemIds_result._Fields>, java.io.Serializable, Cloneable   {
10837
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_result");
10838
 
10839
    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);
10840
 
10841
    private List<Long> success; // required
10842
 
10843
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10844
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10845
      SUCCESS((short)0, "success");
10846
 
10847
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10848
 
10849
      static {
10850
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10851
          byName.put(field.getFieldName(), field);
10852
        }
10853
      }
10854
 
10855
      /**
10856
       * Find the _Fields constant that matches fieldId, or null if its not found.
10857
       */
10858
      public static _Fields findByThriftId(int fieldId) {
10859
        switch(fieldId) {
10860
          case 0: // SUCCESS
10861
            return SUCCESS;
10862
          default:
10863
            return null;
10864
        }
10865
      }
10866
 
10867
      /**
10868
       * Find the _Fields constant that matches fieldId, throwing an exception
10869
       * if it is not found.
10870
       */
10871
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10872
        _Fields fields = findByThriftId(fieldId);
10873
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10874
        return fields;
10875
      }
10876
 
10877
      /**
10878
       * Find the _Fields constant that matches name, or null if its not found.
10879
       */
10880
      public static _Fields findByName(String name) {
10881
        return byName.get(name);
10882
      }
10883
 
10884
      private final short _thriftId;
10885
      private final String _fieldName;
10886
 
10887
      _Fields(short thriftId, String fieldName) {
10888
        _thriftId = thriftId;
10889
        _fieldName = fieldName;
10890
      }
10891
 
10892
      public short getThriftFieldId() {
10893
        return _thriftId;
10894
      }
10895
 
10896
      public String getFieldName() {
10897
        return _fieldName;
10898
      }
10899
    }
10900
 
10901
    // isset id assignments
10902
 
10903
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10904
    static {
10905
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10906
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10907
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10908
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
10909
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10910
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_result.class, metaDataMap);
10911
    }
10912
 
10913
    public getItemIds_result() {
10914
    }
10915
 
10916
    public getItemIds_result(
10917
      List<Long> success)
10918
    {
10919
      this();
10920
      this.success = success;
10921
    }
10922
 
10923
    /**
10924
     * Performs a deep copy on <i>other</i>.
10925
     */
10926
    public getItemIds_result(getItemIds_result other) {
10927
      if (other.isSetSuccess()) {
10928
        List<Long> __this__success = new ArrayList<Long>();
10929
        for (Long other_element : other.success) {
10930
          __this__success.add(other_element);
10931
        }
10932
        this.success = __this__success;
10933
      }
10934
    }
10935
 
10936
    public getItemIds_result deepCopy() {
10937
      return new getItemIds_result(this);
10938
    }
10939
 
10940
    @Override
10941
    public void clear() {
10942
      this.success = null;
10943
    }
10944
 
10945
    public int getSuccessSize() {
10946
      return (this.success == null) ? 0 : this.success.size();
10947
    }
10948
 
10949
    public java.util.Iterator<Long> getSuccessIterator() {
10950
      return (this.success == null) ? null : this.success.iterator();
10951
    }
10952
 
10953
    public void addToSuccess(long elem) {
10954
      if (this.success == null) {
10955
        this.success = new ArrayList<Long>();
10956
      }
10957
      this.success.add(elem);
10958
    }
10959
 
10960
    public List<Long> getSuccess() {
10961
      return this.success;
10962
    }
10963
 
10964
    public void setSuccess(List<Long> success) {
10965
      this.success = success;
10966
    }
10967
 
10968
    public void unsetSuccess() {
10969
      this.success = null;
10970
    }
10971
 
10972
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10973
    public boolean isSetSuccess() {
10974
      return this.success != null;
10975
    }
10976
 
10977
    public void setSuccessIsSet(boolean value) {
10978
      if (!value) {
10979
        this.success = null;
10980
      }
10981
    }
10982
 
10983
    public void setFieldValue(_Fields field, Object value) {
10984
      switch (field) {
10985
      case SUCCESS:
10986
        if (value == null) {
10987
          unsetSuccess();
10988
        } else {
10989
          setSuccess((List<Long>)value);
10990
        }
10991
        break;
10992
 
10993
      }
10994
    }
10995
 
10996
    public Object getFieldValue(_Fields field) {
10997
      switch (field) {
10998
      case SUCCESS:
10999
        return getSuccess();
11000
 
11001
      }
11002
      throw new IllegalStateException();
11003
    }
11004
 
11005
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11006
    public boolean isSet(_Fields field) {
11007
      if (field == null) {
11008
        throw new IllegalArgumentException();
11009
      }
11010
 
11011
      switch (field) {
11012
      case SUCCESS:
11013
        return isSetSuccess();
11014
      }
11015
      throw new IllegalStateException();
11016
    }
11017
 
11018
    @Override
11019
    public boolean equals(Object that) {
11020
      if (that == null)
11021
        return false;
11022
      if (that instanceof getItemIds_result)
11023
        return this.equals((getItemIds_result)that);
11024
      return false;
11025
    }
11026
 
11027
    public boolean equals(getItemIds_result that) {
11028
      if (that == null)
11029
        return false;
11030
 
11031
      boolean this_present_success = true && this.isSetSuccess();
11032
      boolean that_present_success = true && that.isSetSuccess();
11033
      if (this_present_success || that_present_success) {
11034
        if (!(this_present_success && that_present_success))
11035
          return false;
11036
        if (!this.success.equals(that.success))
11037
          return false;
11038
      }
11039
 
11040
      return true;
11041
    }
11042
 
11043
    @Override
11044
    public int hashCode() {
11045
      return 0;
11046
    }
11047
 
11048
    public int compareTo(getItemIds_result other) {
11049
      if (!getClass().equals(other.getClass())) {
11050
        return getClass().getName().compareTo(other.getClass().getName());
11051
      }
11052
 
11053
      int lastComparison = 0;
11054
      getItemIds_result typedOther = (getItemIds_result)other;
11055
 
11056
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
11057
      if (lastComparison != 0) {
11058
        return lastComparison;
11059
      }
11060
      if (isSetSuccess()) {
11061
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11062
        if (lastComparison != 0) {
11063
          return lastComparison;
11064
        }
11065
      }
11066
      return 0;
11067
    }
11068
 
11069
    public _Fields fieldForId(int fieldId) {
11070
      return _Fields.findByThriftId(fieldId);
11071
    }
11072
 
11073
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11074
      org.apache.thrift.protocol.TField field;
11075
      iprot.readStructBegin();
11076
      while (true)
11077
      {
11078
        field = iprot.readFieldBegin();
11079
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11080
          break;
11081
        }
11082
        switch (field.id) {
11083
          case 0: // SUCCESS
11084
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11085
              {
5361 mandeep.dh 11086
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
11087
                this.success = new ArrayList<Long>(_list4.size);
11088
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
5110 mandeep.dh 11089
                {
5361 mandeep.dh 11090
                  long _elem6; // required
11091
                  _elem6 = iprot.readI64();
11092
                  this.success.add(_elem6);
5110 mandeep.dh 11093
                }
11094
                iprot.readListEnd();
11095
              }
11096
            } else { 
11097
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11098
            }
11099
            break;
11100
          default:
11101
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11102
        }
11103
        iprot.readFieldEnd();
11104
      }
11105
      iprot.readStructEnd();
11106
      validate();
11107
    }
11108
 
11109
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11110
      oprot.writeStructBegin(STRUCT_DESC);
11111
 
11112
      if (this.isSetSuccess()) {
11113
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11114
        {
11115
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
5361 mandeep.dh 11116
          for (long _iter7 : this.success)
5110 mandeep.dh 11117
          {
5361 mandeep.dh 11118
            oprot.writeI64(_iter7);
5110 mandeep.dh 11119
          }
11120
          oprot.writeListEnd();
11121
        }
11122
        oprot.writeFieldEnd();
11123
      }
11124
      oprot.writeFieldStop();
11125
      oprot.writeStructEnd();
11126
    }
11127
 
11128
    @Override
11129
    public String toString() {
11130
      StringBuilder sb = new StringBuilder("getItemIds_result(");
11131
      boolean first = true;
11132
 
11133
      sb.append("success:");
11134
      if (this.success == null) {
11135
        sb.append("null");
11136
      } else {
11137
        sb.append(this.success);
11138
      }
11139
      first = false;
11140
      sb.append(")");
11141
      return sb.toString();
11142
    }
11143
 
11144
    public void validate() throws org.apache.thrift.TException {
11145
      // check for required fields
11146
    }
11147
 
11148
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11149
      try {
11150
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11151
      } catch (org.apache.thrift.TException te) {
11152
        throw new java.io.IOException(te);
11153
      }
11154
    }
11155
 
11156
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11157
      try {
11158
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11159
      } catch (org.apache.thrift.TException te) {
11160
        throw new java.io.IOException(te);
11161
      }
11162
    }
11163
 
11164
  }
11165
 
5185 mandeep.dh 11166
  public static class getInventoryItemsFromLastScanType_args implements org.apache.thrift.TBase<getInventoryItemsFromLastScanType_args, getInventoryItemsFromLastScanType_args._Fields>, java.io.Serializable, Cloneable   {
11167
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemsFromLastScanType_args");
11168
 
11169
    private static final org.apache.thrift.protocol.TField LAST_SCAN_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("lastScanType", org.apache.thrift.protocol.TType.I32, (short)1);
11170
 
11171
    private ScanType lastScanType; // required
11172
 
11173
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11174
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11175
      /**
11176
       * 
11177
       * @see ScanType
11178
       */
11179
      LAST_SCAN_TYPE((short)1, "lastScanType");
11180
 
11181
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11182
 
11183
      static {
11184
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11185
          byName.put(field.getFieldName(), field);
11186
        }
11187
      }
11188
 
11189
      /**
11190
       * Find the _Fields constant that matches fieldId, or null if its not found.
11191
       */
11192
      public static _Fields findByThriftId(int fieldId) {
11193
        switch(fieldId) {
11194
          case 1: // LAST_SCAN_TYPE
11195
            return LAST_SCAN_TYPE;
11196
          default:
11197
            return null;
11198
        }
11199
      }
11200
 
11201
      /**
11202
       * Find the _Fields constant that matches fieldId, throwing an exception
11203
       * if it is not found.
11204
       */
11205
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11206
        _Fields fields = findByThriftId(fieldId);
11207
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11208
        return fields;
11209
      }
11210
 
11211
      /**
11212
       * Find the _Fields constant that matches name, or null if its not found.
11213
       */
11214
      public static _Fields findByName(String name) {
11215
        return byName.get(name);
11216
      }
11217
 
11218
      private final short _thriftId;
11219
      private final String _fieldName;
11220
 
11221
      _Fields(short thriftId, String fieldName) {
11222
        _thriftId = thriftId;
11223
        _fieldName = fieldName;
11224
      }
11225
 
11226
      public short getThriftFieldId() {
11227
        return _thriftId;
11228
      }
11229
 
11230
      public String getFieldName() {
11231
        return _fieldName;
11232
      }
11233
    }
11234
 
11235
    // isset id assignments
11236
 
11237
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11238
    static {
11239
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11240
      tmpMap.put(_Fields.LAST_SCAN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("lastScanType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11241
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
11242
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11243
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemsFromLastScanType_args.class, metaDataMap);
11244
    }
11245
 
11246
    public getInventoryItemsFromLastScanType_args() {
11247
    }
11248
 
11249
    public getInventoryItemsFromLastScanType_args(
11250
      ScanType lastScanType)
11251
    {
11252
      this();
11253
      this.lastScanType = lastScanType;
11254
    }
11255
 
11256
    /**
11257
     * Performs a deep copy on <i>other</i>.
11258
     */
11259
    public getInventoryItemsFromLastScanType_args(getInventoryItemsFromLastScanType_args other) {
11260
      if (other.isSetLastScanType()) {
11261
        this.lastScanType = other.lastScanType;
11262
      }
11263
    }
11264
 
11265
    public getInventoryItemsFromLastScanType_args deepCopy() {
11266
      return new getInventoryItemsFromLastScanType_args(this);
11267
    }
11268
 
11269
    @Override
11270
    public void clear() {
11271
      this.lastScanType = null;
11272
    }
11273
 
11274
    /**
11275
     * 
11276
     * @see ScanType
11277
     */
11278
    public ScanType getLastScanType() {
11279
      return this.lastScanType;
11280
    }
11281
 
11282
    /**
11283
     * 
11284
     * @see ScanType
11285
     */
11286
    public void setLastScanType(ScanType lastScanType) {
11287
      this.lastScanType = lastScanType;
11288
    }
11289
 
11290
    public void unsetLastScanType() {
11291
      this.lastScanType = null;
11292
    }
11293
 
11294
    /** Returns true if field lastScanType is set (has been assigned a value) and false otherwise */
11295
    public boolean isSetLastScanType() {
11296
      return this.lastScanType != null;
11297
    }
11298
 
11299
    public void setLastScanTypeIsSet(boolean value) {
11300
      if (!value) {
11301
        this.lastScanType = null;
11302
      }
11303
    }
11304
 
11305
    public void setFieldValue(_Fields field, Object value) {
11306
      switch (field) {
11307
      case LAST_SCAN_TYPE:
11308
        if (value == null) {
11309
          unsetLastScanType();
11310
        } else {
11311
          setLastScanType((ScanType)value);
11312
        }
11313
        break;
11314
 
11315
      }
11316
    }
11317
 
11318
    public Object getFieldValue(_Fields field) {
11319
      switch (field) {
11320
      case LAST_SCAN_TYPE:
11321
        return getLastScanType();
11322
 
11323
      }
11324
      throw new IllegalStateException();
11325
    }
11326
 
11327
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11328
    public boolean isSet(_Fields field) {
11329
      if (field == null) {
11330
        throw new IllegalArgumentException();
11331
      }
11332
 
11333
      switch (field) {
11334
      case LAST_SCAN_TYPE:
11335
        return isSetLastScanType();
11336
      }
11337
      throw new IllegalStateException();
11338
    }
11339
 
11340
    @Override
11341
    public boolean equals(Object that) {
11342
      if (that == null)
11343
        return false;
11344
      if (that instanceof getInventoryItemsFromLastScanType_args)
11345
        return this.equals((getInventoryItemsFromLastScanType_args)that);
11346
      return false;
11347
    }
11348
 
11349
    public boolean equals(getInventoryItemsFromLastScanType_args that) {
11350
      if (that == null)
11351
        return false;
11352
 
11353
      boolean this_present_lastScanType = true && this.isSetLastScanType();
11354
      boolean that_present_lastScanType = true && that.isSetLastScanType();
11355
      if (this_present_lastScanType || that_present_lastScanType) {
11356
        if (!(this_present_lastScanType && that_present_lastScanType))
11357
          return false;
11358
        if (!this.lastScanType.equals(that.lastScanType))
11359
          return false;
11360
      }
11361
 
11362
      return true;
11363
    }
11364
 
11365
    @Override
11366
    public int hashCode() {
11367
      return 0;
11368
    }
11369
 
11370
    public int compareTo(getInventoryItemsFromLastScanType_args other) {
11371
      if (!getClass().equals(other.getClass())) {
11372
        return getClass().getName().compareTo(other.getClass().getName());
11373
      }
11374
 
11375
      int lastComparison = 0;
11376
      getInventoryItemsFromLastScanType_args typedOther = (getInventoryItemsFromLastScanType_args)other;
11377
 
11378
      lastComparison = Boolean.valueOf(isSetLastScanType()).compareTo(typedOther.isSetLastScanType());
11379
      if (lastComparison != 0) {
11380
        return lastComparison;
11381
      }
11382
      if (isSetLastScanType()) {
11383
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastScanType, typedOther.lastScanType);
11384
        if (lastComparison != 0) {
11385
          return lastComparison;
11386
        }
11387
      }
11388
      return 0;
11389
    }
11390
 
11391
    public _Fields fieldForId(int fieldId) {
11392
      return _Fields.findByThriftId(fieldId);
11393
    }
11394
 
11395
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11396
      org.apache.thrift.protocol.TField field;
11397
      iprot.readStructBegin();
11398
      while (true)
11399
      {
11400
        field = iprot.readFieldBegin();
11401
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11402
          break;
11403
        }
11404
        switch (field.id) {
11405
          case 1: // LAST_SCAN_TYPE
11406
            if (field.type == org.apache.thrift.protocol.TType.I32) {
11407
              this.lastScanType = ScanType.findByValue(iprot.readI32());
11408
            } else { 
11409
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11410
            }
11411
            break;
11412
          default:
11413
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11414
        }
11415
        iprot.readFieldEnd();
11416
      }
11417
      iprot.readStructEnd();
11418
      validate();
11419
    }
11420
 
11421
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11422
      validate();
11423
 
11424
      oprot.writeStructBegin(STRUCT_DESC);
11425
      if (this.lastScanType != null) {
11426
        oprot.writeFieldBegin(LAST_SCAN_TYPE_FIELD_DESC);
11427
        oprot.writeI32(this.lastScanType.getValue());
11428
        oprot.writeFieldEnd();
11429
      }
11430
      oprot.writeFieldStop();
11431
      oprot.writeStructEnd();
11432
    }
11433
 
11434
    @Override
11435
    public String toString() {
11436
      StringBuilder sb = new StringBuilder("getInventoryItemsFromLastScanType_args(");
11437
      boolean first = true;
11438
 
11439
      sb.append("lastScanType:");
11440
      if (this.lastScanType == null) {
11441
        sb.append("null");
11442
      } else {
11443
        sb.append(this.lastScanType);
11444
      }
11445
      first = false;
11446
      sb.append(")");
11447
      return sb.toString();
11448
    }
11449
 
11450
    public void validate() throws org.apache.thrift.TException {
11451
      // check for required fields
11452
    }
11453
 
11454
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11455
      try {
11456
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11457
      } catch (org.apache.thrift.TException te) {
11458
        throw new java.io.IOException(te);
11459
      }
11460
    }
11461
 
11462
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11463
      try {
11464
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11465
      } catch (org.apache.thrift.TException te) {
11466
        throw new java.io.IOException(te);
11467
      }
11468
    }
11469
 
11470
  }
11471
 
11472
  public static class getInventoryItemsFromLastScanType_result implements org.apache.thrift.TBase<getInventoryItemsFromLastScanType_result, getInventoryItemsFromLastScanType_result._Fields>, java.io.Serializable, Cloneable   {
11473
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemsFromLastScanType_result");
11474
 
11475
    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);
11476
    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);
11477
 
11478
    private List<InventoryItem> success; // required
11479
    private WarehouseServiceException wex; // required
11480
 
11481
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11482
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11483
      SUCCESS((short)0, "success"),
11484
      WEX((short)1, "wex");
11485
 
11486
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11487
 
11488
      static {
11489
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11490
          byName.put(field.getFieldName(), field);
11491
        }
11492
      }
11493
 
11494
      /**
11495
       * Find the _Fields constant that matches fieldId, or null if its not found.
11496
       */
11497
      public static _Fields findByThriftId(int fieldId) {
11498
        switch(fieldId) {
11499
          case 0: // SUCCESS
11500
            return SUCCESS;
11501
          case 1: // WEX
11502
            return WEX;
11503
          default:
11504
            return null;
11505
        }
11506
      }
11507
 
11508
      /**
11509
       * Find the _Fields constant that matches fieldId, throwing an exception
11510
       * if it is not found.
11511
       */
11512
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11513
        _Fields fields = findByThriftId(fieldId);
11514
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11515
        return fields;
11516
      }
11517
 
11518
      /**
11519
       * Find the _Fields constant that matches name, or null if its not found.
11520
       */
11521
      public static _Fields findByName(String name) {
11522
        return byName.get(name);
11523
      }
11524
 
11525
      private final short _thriftId;
11526
      private final String _fieldName;
11527
 
11528
      _Fields(short thriftId, String fieldName) {
11529
        _thriftId = thriftId;
11530
        _fieldName = fieldName;
11531
      }
11532
 
11533
      public short getThriftFieldId() {
11534
        return _thriftId;
11535
      }
11536
 
11537
      public String getFieldName() {
11538
        return _fieldName;
11539
      }
11540
    }
11541
 
11542
    // isset id assignments
11543
 
11544
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11545
    static {
11546
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11547
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11548
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
11549
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
11550
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11551
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11552
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11553
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemsFromLastScanType_result.class, metaDataMap);
11554
    }
11555
 
11556
    public getInventoryItemsFromLastScanType_result() {
11557
    }
11558
 
11559
    public getInventoryItemsFromLastScanType_result(
11560
      List<InventoryItem> success,
11561
      WarehouseServiceException wex)
11562
    {
11563
      this();
11564
      this.success = success;
11565
      this.wex = wex;
11566
    }
11567
 
11568
    /**
11569
     * Performs a deep copy on <i>other</i>.
11570
     */
11571
    public getInventoryItemsFromLastScanType_result(getInventoryItemsFromLastScanType_result other) {
11572
      if (other.isSetSuccess()) {
11573
        List<InventoryItem> __this__success = new ArrayList<InventoryItem>();
11574
        for (InventoryItem other_element : other.success) {
11575
          __this__success.add(new InventoryItem(other_element));
11576
        }
11577
        this.success = __this__success;
11578
      }
11579
      if (other.isSetWex()) {
11580
        this.wex = new WarehouseServiceException(other.wex);
11581
      }
11582
    }
11583
 
11584
    public getInventoryItemsFromLastScanType_result deepCopy() {
11585
      return new getInventoryItemsFromLastScanType_result(this);
11586
    }
11587
 
11588
    @Override
11589
    public void clear() {
11590
      this.success = null;
11591
      this.wex = null;
11592
    }
11593
 
11594
    public int getSuccessSize() {
11595
      return (this.success == null) ? 0 : this.success.size();
11596
    }
11597
 
11598
    public java.util.Iterator<InventoryItem> getSuccessIterator() {
11599
      return (this.success == null) ? null : this.success.iterator();
11600
    }
11601
 
11602
    public void addToSuccess(InventoryItem elem) {
11603
      if (this.success == null) {
11604
        this.success = new ArrayList<InventoryItem>();
11605
      }
11606
      this.success.add(elem);
11607
    }
11608
 
11609
    public List<InventoryItem> getSuccess() {
11610
      return this.success;
11611
    }
11612
 
11613
    public void setSuccess(List<InventoryItem> success) {
11614
      this.success = success;
11615
    }
11616
 
11617
    public void unsetSuccess() {
11618
      this.success = null;
11619
    }
11620
 
11621
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
11622
    public boolean isSetSuccess() {
11623
      return this.success != null;
11624
    }
11625
 
11626
    public void setSuccessIsSet(boolean value) {
11627
      if (!value) {
11628
        this.success = null;
11629
      }
11630
    }
11631
 
11632
    public WarehouseServiceException getWex() {
11633
      return this.wex;
11634
    }
11635
 
11636
    public void setWex(WarehouseServiceException wex) {
11637
      this.wex = wex;
11638
    }
11639
 
11640
    public void unsetWex() {
11641
      this.wex = null;
11642
    }
11643
 
11644
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
11645
    public boolean isSetWex() {
11646
      return this.wex != null;
11647
    }
11648
 
11649
    public void setWexIsSet(boolean value) {
11650
      if (!value) {
11651
        this.wex = null;
11652
      }
11653
    }
11654
 
11655
    public void setFieldValue(_Fields field, Object value) {
11656
      switch (field) {
11657
      case SUCCESS:
11658
        if (value == null) {
11659
          unsetSuccess();
11660
        } else {
11661
          setSuccess((List<InventoryItem>)value);
11662
        }
11663
        break;
11664
 
11665
      case WEX:
11666
        if (value == null) {
11667
          unsetWex();
11668
        } else {
11669
          setWex((WarehouseServiceException)value);
11670
        }
11671
        break;
11672
 
11673
      }
11674
    }
11675
 
11676
    public Object getFieldValue(_Fields field) {
11677
      switch (field) {
11678
      case SUCCESS:
11679
        return getSuccess();
11680
 
11681
      case WEX:
11682
        return getWex();
11683
 
11684
      }
11685
      throw new IllegalStateException();
11686
    }
11687
 
11688
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11689
    public boolean isSet(_Fields field) {
11690
      if (field == null) {
11691
        throw new IllegalArgumentException();
11692
      }
11693
 
11694
      switch (field) {
11695
      case SUCCESS:
11696
        return isSetSuccess();
11697
      case WEX:
11698
        return isSetWex();
11699
      }
11700
      throw new IllegalStateException();
11701
    }
11702
 
11703
    @Override
11704
    public boolean equals(Object that) {
11705
      if (that == null)
11706
        return false;
11707
      if (that instanceof getInventoryItemsFromLastScanType_result)
11708
        return this.equals((getInventoryItemsFromLastScanType_result)that);
11709
      return false;
11710
    }
11711
 
11712
    public boolean equals(getInventoryItemsFromLastScanType_result that) {
11713
      if (that == null)
11714
        return false;
11715
 
11716
      boolean this_present_success = true && this.isSetSuccess();
11717
      boolean that_present_success = true && that.isSetSuccess();
11718
      if (this_present_success || that_present_success) {
11719
        if (!(this_present_success && that_present_success))
11720
          return false;
11721
        if (!this.success.equals(that.success))
11722
          return false;
11723
      }
11724
 
11725
      boolean this_present_wex = true && this.isSetWex();
11726
      boolean that_present_wex = true && that.isSetWex();
11727
      if (this_present_wex || that_present_wex) {
11728
        if (!(this_present_wex && that_present_wex))
11729
          return false;
11730
        if (!this.wex.equals(that.wex))
11731
          return false;
11732
      }
11733
 
11734
      return true;
11735
    }
11736
 
11737
    @Override
11738
    public int hashCode() {
11739
      return 0;
11740
    }
11741
 
11742
    public int compareTo(getInventoryItemsFromLastScanType_result other) {
11743
      if (!getClass().equals(other.getClass())) {
11744
        return getClass().getName().compareTo(other.getClass().getName());
11745
      }
11746
 
11747
      int lastComparison = 0;
11748
      getInventoryItemsFromLastScanType_result typedOther = (getInventoryItemsFromLastScanType_result)other;
11749
 
11750
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
11751
      if (lastComparison != 0) {
11752
        return lastComparison;
11753
      }
11754
      if (isSetSuccess()) {
11755
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11756
        if (lastComparison != 0) {
11757
          return lastComparison;
11758
        }
11759
      }
11760
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
11761
      if (lastComparison != 0) {
11762
        return lastComparison;
11763
      }
11764
      if (isSetWex()) {
11765
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
11766
        if (lastComparison != 0) {
11767
          return lastComparison;
11768
        }
11769
      }
11770
      return 0;
11771
    }
11772
 
11773
    public _Fields fieldForId(int fieldId) {
11774
      return _Fields.findByThriftId(fieldId);
11775
    }
11776
 
11777
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11778
      org.apache.thrift.protocol.TField field;
11779
      iprot.readStructBegin();
11780
      while (true)
11781
      {
11782
        field = iprot.readFieldBegin();
11783
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11784
          break;
11785
        }
11786
        switch (field.id) {
11787
          case 0: // SUCCESS
11788
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11789
              {
5361 mandeep.dh 11790
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
11791
                this.success = new ArrayList<InventoryItem>(_list8.size);
11792
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
5185 mandeep.dh 11793
                {
5361 mandeep.dh 11794
                  InventoryItem _elem10; // required
11795
                  _elem10 = new InventoryItem();
11796
                  _elem10.read(iprot);
11797
                  this.success.add(_elem10);
5185 mandeep.dh 11798
                }
11799
                iprot.readListEnd();
11800
              }
11801
            } else { 
11802
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11803
            }
11804
            break;
11805
          case 1: // WEX
11806
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11807
              this.wex = new WarehouseServiceException();
11808
              this.wex.read(iprot);
11809
            } else { 
11810
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11811
            }
11812
            break;
11813
          default:
11814
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11815
        }
11816
        iprot.readFieldEnd();
11817
      }
11818
      iprot.readStructEnd();
11819
      validate();
11820
    }
11821
 
11822
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11823
      oprot.writeStructBegin(STRUCT_DESC);
11824
 
11825
      if (this.isSetSuccess()) {
11826
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11827
        {
11828
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
5361 mandeep.dh 11829
          for (InventoryItem _iter11 : this.success)
5185 mandeep.dh 11830
          {
5361 mandeep.dh 11831
            _iter11.write(oprot);
5185 mandeep.dh 11832
          }
11833
          oprot.writeListEnd();
11834
        }
11835
        oprot.writeFieldEnd();
11836
      } else if (this.isSetWex()) {
11837
        oprot.writeFieldBegin(WEX_FIELD_DESC);
11838
        this.wex.write(oprot);
11839
        oprot.writeFieldEnd();
11840
      }
11841
      oprot.writeFieldStop();
11842
      oprot.writeStructEnd();
11843
    }
11844
 
11845
    @Override
11846
    public String toString() {
11847
      StringBuilder sb = new StringBuilder("getInventoryItemsFromLastScanType_result(");
11848
      boolean first = true;
11849
 
11850
      sb.append("success:");
11851
      if (this.success == null) {
11852
        sb.append("null");
11853
      } else {
11854
        sb.append(this.success);
11855
      }
11856
      first = false;
11857
      if (!first) sb.append(", ");
11858
      sb.append("wex:");
11859
      if (this.wex == null) {
11860
        sb.append("null");
11861
      } else {
11862
        sb.append(this.wex);
11863
      }
11864
      first = false;
11865
      sb.append(")");
11866
      return sb.toString();
11867
    }
11868
 
11869
    public void validate() throws org.apache.thrift.TException {
11870
      // check for required fields
11871
    }
11872
 
11873
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11874
      try {
11875
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11876
      } catch (org.apache.thrift.TException te) {
11877
        throw new java.io.IOException(te);
11878
      }
11879
    }
11880
 
11881
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11882
      try {
11883
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11884
      } catch (org.apache.thrift.TException te) {
11885
        throw new java.io.IOException(te);
11886
      }
11887
    }
11888
 
11889
  }
11890
 
11891
  public static class getInventoryItemFromId_args implements org.apache.thrift.TBase<getInventoryItemFromId_args, getInventoryItemFromId_args._Fields>, java.io.Serializable, Cloneable   {
11892
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromId_args");
11893
 
11894
    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);
11895
 
11896
    private long inventoryItemId; // required
11897
 
11898
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11899
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11900
      INVENTORY_ITEM_ID((short)1, "inventoryItemId");
11901
 
11902
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11903
 
11904
      static {
11905
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11906
          byName.put(field.getFieldName(), field);
11907
        }
11908
      }
11909
 
11910
      /**
11911
       * Find the _Fields constant that matches fieldId, or null if its not found.
11912
       */
11913
      public static _Fields findByThriftId(int fieldId) {
11914
        switch(fieldId) {
11915
          case 1: // INVENTORY_ITEM_ID
11916
            return INVENTORY_ITEM_ID;
11917
          default:
11918
            return null;
11919
        }
11920
      }
11921
 
11922
      /**
11923
       * Find the _Fields constant that matches fieldId, throwing an exception
11924
       * if it is not found.
11925
       */
11926
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11927
        _Fields fields = findByThriftId(fieldId);
11928
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11929
        return fields;
11930
      }
11931
 
11932
      /**
11933
       * Find the _Fields constant that matches name, or null if its not found.
11934
       */
11935
      public static _Fields findByName(String name) {
11936
        return byName.get(name);
11937
      }
11938
 
11939
      private final short _thriftId;
11940
      private final String _fieldName;
11941
 
11942
      _Fields(short thriftId, String fieldName) {
11943
        _thriftId = thriftId;
11944
        _fieldName = fieldName;
11945
      }
11946
 
11947
      public short getThriftFieldId() {
11948
        return _thriftId;
11949
      }
11950
 
11951
      public String getFieldName() {
11952
        return _fieldName;
11953
      }
11954
    }
11955
 
11956
    // isset id assignments
11957
    private static final int __INVENTORYITEMID_ISSET_ID = 0;
11958
    private BitSet __isset_bit_vector = new BitSet(1);
11959
 
11960
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11961
    static {
11962
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11963
      tmpMap.put(_Fields.INVENTORY_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("inventoryItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11964
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
11965
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11966
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromId_args.class, metaDataMap);
11967
    }
11968
 
11969
    public getInventoryItemFromId_args() {
11970
    }
11971
 
11972
    public getInventoryItemFromId_args(
11973
      long inventoryItemId)
11974
    {
11975
      this();
11976
      this.inventoryItemId = inventoryItemId;
11977
      setInventoryItemIdIsSet(true);
11978
    }
11979
 
11980
    /**
11981
     * Performs a deep copy on <i>other</i>.
11982
     */
11983
    public getInventoryItemFromId_args(getInventoryItemFromId_args other) {
11984
      __isset_bit_vector.clear();
11985
      __isset_bit_vector.or(other.__isset_bit_vector);
11986
      this.inventoryItemId = other.inventoryItemId;
11987
    }
11988
 
11989
    public getInventoryItemFromId_args deepCopy() {
11990
      return new getInventoryItemFromId_args(this);
11991
    }
11992
 
11993
    @Override
11994
    public void clear() {
11995
      setInventoryItemIdIsSet(false);
11996
      this.inventoryItemId = 0;
11997
    }
11998
 
11999
    public long getInventoryItemId() {
12000
      return this.inventoryItemId;
12001
    }
12002
 
12003
    public void setInventoryItemId(long inventoryItemId) {
12004
      this.inventoryItemId = inventoryItemId;
12005
      setInventoryItemIdIsSet(true);
12006
    }
12007
 
12008
    public void unsetInventoryItemId() {
12009
      __isset_bit_vector.clear(__INVENTORYITEMID_ISSET_ID);
12010
    }
12011
 
12012
    /** Returns true if field inventoryItemId is set (has been assigned a value) and false otherwise */
12013
    public boolean isSetInventoryItemId() {
12014
      return __isset_bit_vector.get(__INVENTORYITEMID_ISSET_ID);
12015
    }
12016
 
12017
    public void setInventoryItemIdIsSet(boolean value) {
12018
      __isset_bit_vector.set(__INVENTORYITEMID_ISSET_ID, value);
12019
    }
12020
 
12021
    public void setFieldValue(_Fields field, Object value) {
12022
      switch (field) {
12023
      case INVENTORY_ITEM_ID:
12024
        if (value == null) {
12025
          unsetInventoryItemId();
12026
        } else {
12027
          setInventoryItemId((Long)value);
12028
        }
12029
        break;
12030
 
12031
      }
12032
    }
12033
 
12034
    public Object getFieldValue(_Fields field) {
12035
      switch (field) {
12036
      case INVENTORY_ITEM_ID:
12037
        return Long.valueOf(getInventoryItemId());
12038
 
12039
      }
12040
      throw new IllegalStateException();
12041
    }
12042
 
12043
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12044
    public boolean isSet(_Fields field) {
12045
      if (field == null) {
12046
        throw new IllegalArgumentException();
12047
      }
12048
 
12049
      switch (field) {
12050
      case INVENTORY_ITEM_ID:
12051
        return isSetInventoryItemId();
12052
      }
12053
      throw new IllegalStateException();
12054
    }
12055
 
12056
    @Override
12057
    public boolean equals(Object that) {
12058
      if (that == null)
12059
        return false;
12060
      if (that instanceof getInventoryItemFromId_args)
12061
        return this.equals((getInventoryItemFromId_args)that);
12062
      return false;
12063
    }
12064
 
12065
    public boolean equals(getInventoryItemFromId_args that) {
12066
      if (that == null)
12067
        return false;
12068
 
12069
      boolean this_present_inventoryItemId = true;
12070
      boolean that_present_inventoryItemId = true;
12071
      if (this_present_inventoryItemId || that_present_inventoryItemId) {
12072
        if (!(this_present_inventoryItemId && that_present_inventoryItemId))
12073
          return false;
12074
        if (this.inventoryItemId != that.inventoryItemId)
12075
          return false;
12076
      }
12077
 
12078
      return true;
12079
    }
12080
 
12081
    @Override
12082
    public int hashCode() {
12083
      return 0;
12084
    }
12085
 
12086
    public int compareTo(getInventoryItemFromId_args other) {
12087
      if (!getClass().equals(other.getClass())) {
12088
        return getClass().getName().compareTo(other.getClass().getName());
12089
      }
12090
 
12091
      int lastComparison = 0;
12092
      getInventoryItemFromId_args typedOther = (getInventoryItemFromId_args)other;
12093
 
12094
      lastComparison = Boolean.valueOf(isSetInventoryItemId()).compareTo(typedOther.isSetInventoryItemId());
12095
      if (lastComparison != 0) {
12096
        return lastComparison;
12097
      }
12098
      if (isSetInventoryItemId()) {
12099
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItemId, typedOther.inventoryItemId);
12100
        if (lastComparison != 0) {
12101
          return lastComparison;
12102
        }
12103
      }
12104
      return 0;
12105
    }
12106
 
12107
    public _Fields fieldForId(int fieldId) {
12108
      return _Fields.findByThriftId(fieldId);
12109
    }
12110
 
12111
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12112
      org.apache.thrift.protocol.TField field;
12113
      iprot.readStructBegin();
12114
      while (true)
12115
      {
12116
        field = iprot.readFieldBegin();
12117
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12118
          break;
12119
        }
12120
        switch (field.id) {
12121
          case 1: // INVENTORY_ITEM_ID
12122
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12123
              this.inventoryItemId = iprot.readI64();
12124
              setInventoryItemIdIsSet(true);
12125
            } else { 
12126
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12127
            }
12128
            break;
12129
          default:
12130
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12131
        }
12132
        iprot.readFieldEnd();
12133
      }
12134
      iprot.readStructEnd();
12135
      validate();
12136
    }
12137
 
12138
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12139
      validate();
12140
 
12141
      oprot.writeStructBegin(STRUCT_DESC);
12142
      oprot.writeFieldBegin(INVENTORY_ITEM_ID_FIELD_DESC);
12143
      oprot.writeI64(this.inventoryItemId);
12144
      oprot.writeFieldEnd();
12145
      oprot.writeFieldStop();
12146
      oprot.writeStructEnd();
12147
    }
12148
 
12149
    @Override
12150
    public String toString() {
12151
      StringBuilder sb = new StringBuilder("getInventoryItemFromId_args(");
12152
      boolean first = true;
12153
 
12154
      sb.append("inventoryItemId:");
12155
      sb.append(this.inventoryItemId);
12156
      first = false;
12157
      sb.append(")");
12158
      return sb.toString();
12159
    }
12160
 
12161
    public void validate() throws org.apache.thrift.TException {
12162
      // check for required fields
12163
    }
12164
 
12165
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12166
      try {
12167
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12168
      } catch (org.apache.thrift.TException te) {
12169
        throw new java.io.IOException(te);
12170
      }
12171
    }
12172
 
12173
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12174
      try {
12175
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12176
      } catch (org.apache.thrift.TException te) {
12177
        throw new java.io.IOException(te);
12178
      }
12179
    }
12180
 
12181
  }
12182
 
12183
  public static class getInventoryItemFromId_result implements org.apache.thrift.TBase<getInventoryItemFromId_result, getInventoryItemFromId_result._Fields>, java.io.Serializable, Cloneable   {
12184
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromId_result");
12185
 
12186
    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);
12187
    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);
12188
 
12189
    private InventoryItem success; // required
12190
    private WarehouseServiceException wex; // required
12191
 
12192
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12193
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12194
      SUCCESS((short)0, "success"),
12195
      WEX((short)1, "wex");
12196
 
12197
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12198
 
12199
      static {
12200
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12201
          byName.put(field.getFieldName(), field);
12202
        }
12203
      }
12204
 
12205
      /**
12206
       * Find the _Fields constant that matches fieldId, or null if its not found.
12207
       */
12208
      public static _Fields findByThriftId(int fieldId) {
12209
        switch(fieldId) {
12210
          case 0: // SUCCESS
12211
            return SUCCESS;
12212
          case 1: // WEX
12213
            return WEX;
12214
          default:
12215
            return null;
12216
        }
12217
      }
12218
 
12219
      /**
12220
       * Find the _Fields constant that matches fieldId, throwing an exception
12221
       * if it is not found.
12222
       */
12223
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12224
        _Fields fields = findByThriftId(fieldId);
12225
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12226
        return fields;
12227
      }
12228
 
12229
      /**
12230
       * Find the _Fields constant that matches name, or null if its not found.
12231
       */
12232
      public static _Fields findByName(String name) {
12233
        return byName.get(name);
12234
      }
12235
 
12236
      private final short _thriftId;
12237
      private final String _fieldName;
12238
 
12239
      _Fields(short thriftId, String fieldName) {
12240
        _thriftId = thriftId;
12241
        _fieldName = fieldName;
12242
      }
12243
 
12244
      public short getThriftFieldId() {
12245
        return _thriftId;
12246
      }
12247
 
12248
      public String getFieldName() {
12249
        return _fieldName;
12250
      }
12251
    }
12252
 
12253
    // isset id assignments
12254
 
12255
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12256
    static {
12257
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12258
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12259
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
12260
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12261
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12262
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12263
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromId_result.class, metaDataMap);
12264
    }
12265
 
12266
    public getInventoryItemFromId_result() {
12267
    }
12268
 
12269
    public getInventoryItemFromId_result(
12270
      InventoryItem success,
12271
      WarehouseServiceException wex)
12272
    {
12273
      this();
12274
      this.success = success;
12275
      this.wex = wex;
12276
    }
12277
 
12278
    /**
12279
     * Performs a deep copy on <i>other</i>.
12280
     */
12281
    public getInventoryItemFromId_result(getInventoryItemFromId_result other) {
12282
      if (other.isSetSuccess()) {
12283
        this.success = new InventoryItem(other.success);
12284
      }
12285
      if (other.isSetWex()) {
12286
        this.wex = new WarehouseServiceException(other.wex);
12287
      }
12288
    }
12289
 
12290
    public getInventoryItemFromId_result deepCopy() {
12291
      return new getInventoryItemFromId_result(this);
12292
    }
12293
 
12294
    @Override
12295
    public void clear() {
12296
      this.success = null;
12297
      this.wex = null;
12298
    }
12299
 
12300
    public InventoryItem getSuccess() {
12301
      return this.success;
12302
    }
12303
 
12304
    public void setSuccess(InventoryItem success) {
12305
      this.success = success;
12306
    }
12307
 
12308
    public void unsetSuccess() {
12309
      this.success = null;
12310
    }
12311
 
12312
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12313
    public boolean isSetSuccess() {
12314
      return this.success != null;
12315
    }
12316
 
12317
    public void setSuccessIsSet(boolean value) {
12318
      if (!value) {
12319
        this.success = null;
12320
      }
12321
    }
12322
 
12323
    public WarehouseServiceException getWex() {
12324
      return this.wex;
12325
    }
12326
 
12327
    public void setWex(WarehouseServiceException wex) {
12328
      this.wex = wex;
12329
    }
12330
 
12331
    public void unsetWex() {
12332
      this.wex = null;
12333
    }
12334
 
12335
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
12336
    public boolean isSetWex() {
12337
      return this.wex != null;
12338
    }
12339
 
12340
    public void setWexIsSet(boolean value) {
12341
      if (!value) {
12342
        this.wex = null;
12343
      }
12344
    }
12345
 
12346
    public void setFieldValue(_Fields field, Object value) {
12347
      switch (field) {
12348
      case SUCCESS:
12349
        if (value == null) {
12350
          unsetSuccess();
12351
        } else {
12352
          setSuccess((InventoryItem)value);
12353
        }
12354
        break;
12355
 
12356
      case WEX:
12357
        if (value == null) {
12358
          unsetWex();
12359
        } else {
12360
          setWex((WarehouseServiceException)value);
12361
        }
12362
        break;
12363
 
12364
      }
12365
    }
12366
 
12367
    public Object getFieldValue(_Fields field) {
12368
      switch (field) {
12369
      case SUCCESS:
12370
        return getSuccess();
12371
 
12372
      case WEX:
12373
        return getWex();
12374
 
12375
      }
12376
      throw new IllegalStateException();
12377
    }
12378
 
12379
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12380
    public boolean isSet(_Fields field) {
12381
      if (field == null) {
12382
        throw new IllegalArgumentException();
12383
      }
12384
 
12385
      switch (field) {
12386
      case SUCCESS:
12387
        return isSetSuccess();
12388
      case WEX:
12389
        return isSetWex();
12390
      }
12391
      throw new IllegalStateException();
12392
    }
12393
 
12394
    @Override
12395
    public boolean equals(Object that) {
12396
      if (that == null)
12397
        return false;
12398
      if (that instanceof getInventoryItemFromId_result)
12399
        return this.equals((getInventoryItemFromId_result)that);
12400
      return false;
12401
    }
12402
 
12403
    public boolean equals(getInventoryItemFromId_result that) {
12404
      if (that == null)
12405
        return false;
12406
 
12407
      boolean this_present_success = true && this.isSetSuccess();
12408
      boolean that_present_success = true && that.isSetSuccess();
12409
      if (this_present_success || that_present_success) {
12410
        if (!(this_present_success && that_present_success))
12411
          return false;
12412
        if (!this.success.equals(that.success))
12413
          return false;
12414
      }
12415
 
12416
      boolean this_present_wex = true && this.isSetWex();
12417
      boolean that_present_wex = true && that.isSetWex();
12418
      if (this_present_wex || that_present_wex) {
12419
        if (!(this_present_wex && that_present_wex))
12420
          return false;
12421
        if (!this.wex.equals(that.wex))
12422
          return false;
12423
      }
12424
 
12425
      return true;
12426
    }
12427
 
12428
    @Override
12429
    public int hashCode() {
12430
      return 0;
12431
    }
12432
 
12433
    public int compareTo(getInventoryItemFromId_result other) {
12434
      if (!getClass().equals(other.getClass())) {
12435
        return getClass().getName().compareTo(other.getClass().getName());
12436
      }
12437
 
12438
      int lastComparison = 0;
12439
      getInventoryItemFromId_result typedOther = (getInventoryItemFromId_result)other;
12440
 
12441
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12442
      if (lastComparison != 0) {
12443
        return lastComparison;
12444
      }
12445
      if (isSetSuccess()) {
12446
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12447
        if (lastComparison != 0) {
12448
          return lastComparison;
12449
        }
12450
      }
12451
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
12452
      if (lastComparison != 0) {
12453
        return lastComparison;
12454
      }
12455
      if (isSetWex()) {
12456
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
12457
        if (lastComparison != 0) {
12458
          return lastComparison;
12459
        }
12460
      }
12461
      return 0;
12462
    }
12463
 
12464
    public _Fields fieldForId(int fieldId) {
12465
      return _Fields.findByThriftId(fieldId);
12466
    }
12467
 
12468
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12469
      org.apache.thrift.protocol.TField field;
12470
      iprot.readStructBegin();
12471
      while (true)
12472
      {
12473
        field = iprot.readFieldBegin();
12474
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12475
          break;
12476
        }
12477
        switch (field.id) {
12478
          case 0: // SUCCESS
12479
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12480
              this.success = new InventoryItem();
12481
              this.success.read(iprot);
12482
            } else { 
12483
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12484
            }
12485
            break;
12486
          case 1: // WEX
12487
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12488
              this.wex = new WarehouseServiceException();
12489
              this.wex.read(iprot);
12490
            } else { 
12491
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12492
            }
12493
            break;
12494
          default:
12495
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12496
        }
12497
        iprot.readFieldEnd();
12498
      }
12499
      iprot.readStructEnd();
12500
      validate();
12501
    }
12502
 
12503
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12504
      oprot.writeStructBegin(STRUCT_DESC);
12505
 
12506
      if (this.isSetSuccess()) {
12507
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12508
        this.success.write(oprot);
12509
        oprot.writeFieldEnd();
12510
      } else if (this.isSetWex()) {
12511
        oprot.writeFieldBegin(WEX_FIELD_DESC);
12512
        this.wex.write(oprot);
12513
        oprot.writeFieldEnd();
12514
      }
12515
      oprot.writeFieldStop();
12516
      oprot.writeStructEnd();
12517
    }
12518
 
12519
    @Override
12520
    public String toString() {
12521
      StringBuilder sb = new StringBuilder("getInventoryItemFromId_result(");
12522
      boolean first = true;
12523
 
12524
      sb.append("success:");
12525
      if (this.success == null) {
12526
        sb.append("null");
12527
      } else {
12528
        sb.append(this.success);
12529
      }
12530
      first = false;
12531
      if (!first) sb.append(", ");
12532
      sb.append("wex:");
12533
      if (this.wex == null) {
12534
        sb.append("null");
12535
      } else {
12536
        sb.append(this.wex);
12537
      }
12538
      first = false;
12539
      sb.append(")");
12540
      return sb.toString();
12541
    }
12542
 
12543
    public void validate() throws org.apache.thrift.TException {
12544
      // check for required fields
12545
    }
12546
 
12547
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12548
      try {
12549
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12550
      } catch (org.apache.thrift.TException te) {
12551
        throw new java.io.IOException(te);
12552
      }
12553
    }
12554
 
12555
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12556
      try {
12557
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12558
      } catch (org.apache.thrift.TException te) {
12559
        throw new java.io.IOException(te);
12560
      }
12561
    }
12562
 
12563
  }
12564
 
2820 chandransh 12565
}