Subversion Repositories SmartDukaan

Rev

Rev 5361 | Rev 5437 | 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
 
5372 mandeep.dh 149
    /**
150
     * Returns the purchase scans grouped by items for Purchase register reconciliation
151
     * 
152
     * @param startDate
153
     * @param endDate
154
     */
155
    public List<DetailedPurchaseScan> getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException;
156
 
2820 chandransh 157
  }
158
 
3430 rajveer 159
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
160
 
4846 mandeep.dh 161
    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 162
 
4496 mandeep.dh 163
    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 164
 
4496 mandeep.dh 165
    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 166
 
4496 mandeep.dh 167
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 168
 
5361 mandeep.dh 169
    public void getNonSeralizedInventoryItem(long itemId, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getNonSeralizedInventoryItem_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 170
 
5361 mandeep.dh 171
    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 172
 
5361 mandeep.dh 173
    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 174
 
5110 mandeep.dh 175
    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 176
 
5361 mandeep.dh 177
    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 178
 
179
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException;
180
 
4622 amit.gupta 181
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemNumbers_call> resultHandler) throws org.apache.thrift.TException;
182
 
5110 mandeep.dh 183
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getItemIds_call> resultHandler) throws org.apache.thrift.TException;
184
 
5185 mandeep.dh 185
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException;
186
 
187
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException;
188
 
5372 mandeep.dh 189
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException;
190
 
3430 rajveer 191
  }
192
 
3374 rajveer 193
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
3430 rajveer 194
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
195
      public Factory() {}
196
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
197
        return new Client(prot);
198
      }
199
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
200
        return new Client(iprot, oprot);
201
      }
202
    }
203
 
204
    public Client(org.apache.thrift.protocol.TProtocol prot)
2820 chandransh 205
    {
3430 rajveer 206
      super(prot, prot);
2820 chandransh 207
    }
208
 
3430 rajveer 209
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
3374 rajveer 210
      super(iprot, oprot);
2820 chandransh 211
    }
212
 
4846 mandeep.dh 213
    public InventoryItem createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 214
    {
4846 mandeep.dh 215
      send_createSerializedInventoryItem(itemId, itemNumber, serialNumber, purchaseId);
4496 mandeep.dh 216
      return recv_createSerializedInventoryItem();
2820 chandransh 217
    }
218
 
4846 mandeep.dh 219
    public void send_createSerializedInventoryItem(long itemId, String itemNumber, String serialNumber, long purchaseId) throws org.apache.thrift.TException
2820 chandransh 220
    {
4496 mandeep.dh 221
      createSerializedInventoryItem_args args = new createSerializedInventoryItem_args();
222
      args.setItemId(itemId);
4846 mandeep.dh 223
      args.setItemNumber(itemNumber);
4496 mandeep.dh 224
      args.setSerialNumber(serialNumber);
225
      args.setPurchaseId(purchaseId);
226
      sendBase("createSerializedInventoryItem", args);
2820 chandransh 227
    }
228
 
4555 mandeep.dh 229
    public InventoryItem recv_createSerializedInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 230
    {
4496 mandeep.dh 231
      createSerializedInventoryItem_result result = new createSerializedInventoryItem_result();
232
      receiveBase(result, "createSerializedInventoryItem");
2820 chandransh 233
      if (result.isSetSuccess()) {
234
        return result.success;
235
      }
236
      if (result.wex != null) {
237
        throw result.wex;
238
      }
4496 mandeep.dh 239
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createSerializedInventoryItem failed: unknown result");
2820 chandransh 240
    }
241
 
4555 mandeep.dh 242
    public InventoryItem createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 243
    {
4496 mandeep.dh 244
      send_createSerializedInventoryItemFromItemNumber(itemNumber, serialNumber, purchaseId);
245
      return recv_createSerializedInventoryItemFromItemNumber();
2820 chandransh 246
    }
247
 
4496 mandeep.dh 248
    public void send_createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId) throws org.apache.thrift.TException
2820 chandransh 249
    {
4496 mandeep.dh 250
      createSerializedInventoryItemFromItemNumber_args args = new createSerializedInventoryItemFromItemNumber_args();
251
      args.setItemNumber(itemNumber);
252
      args.setSerialNumber(serialNumber);
253
      args.setPurchaseId(purchaseId);
254
      sendBase("createSerializedInventoryItemFromItemNumber", args);
2820 chandransh 255
    }
256
 
4555 mandeep.dh 257
    public InventoryItem recv_createSerializedInventoryItemFromItemNumber() throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 258
    {
4496 mandeep.dh 259
      createSerializedInventoryItemFromItemNumber_result result = new createSerializedInventoryItemFromItemNumber_result();
260
      receiveBase(result, "createSerializedInventoryItemFromItemNumber");
2820 chandransh 261
      if (result.isSetSuccess()) {
262
        return result.success;
263
      }
264
      if (result.wex != null) {
265
        throw result.wex;
266
      }
4496 mandeep.dh 267
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createSerializedInventoryItemFromItemNumber failed: unknown result");
2820 chandransh 268
    }
269
 
4555 mandeep.dh 270
    public InventoryItem createInventoryItem(long itemId, long quantity, long purchaseId) throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 271
    {
4496 mandeep.dh 272
      send_createInventoryItem(itemId, quantity, purchaseId);
273
      return recv_createInventoryItem();
3383 chandransh 274
    }
275
 
4496 mandeep.dh 276
    public void send_createInventoryItem(long itemId, long quantity, long purchaseId) throws org.apache.thrift.TException
3383 chandransh 277
    {
4496 mandeep.dh 278
      createInventoryItem_args args = new createInventoryItem_args();
279
      args.setItemId(itemId);
280
      args.setQuantity(quantity);
281
      args.setPurchaseId(purchaseId);
282
      sendBase("createInventoryItem", args);
3383 chandransh 283
    }
284
 
4555 mandeep.dh 285
    public InventoryItem recv_createInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 286
    {
4496 mandeep.dh 287
      createInventoryItem_result result = new createInventoryItem_result();
288
      receiveBase(result, "createInventoryItem");
3383 chandransh 289
      if (result.isSetSuccess()) {
290
        return result.success;
291
      }
292
      if (result.wex != null) {
293
        throw result.wex;
294
      }
4496 mandeep.dh 295
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createInventoryItem failed: unknown result");
3383 chandransh 296
    }
297
 
4541 mandeep.dh 298
    public InventoryItem getInventoryItem(String serialNumber) throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 299
    {
4496 mandeep.dh 300
      send_getInventoryItem(serialNumber);
301
      return recv_getInventoryItem();
2832 chandransh 302
    }
303
 
4496 mandeep.dh 304
    public void send_getInventoryItem(String serialNumber) throws org.apache.thrift.TException
2832 chandransh 305
    {
4496 mandeep.dh 306
      getInventoryItem_args args = new getInventoryItem_args();
307
      args.setSerialNumber(serialNumber);
308
      sendBase("getInventoryItem", args);
2832 chandransh 309
    }
310
 
4541 mandeep.dh 311
    public InventoryItem recv_getInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
2832 chandransh 312
    {
4496 mandeep.dh 313
      getInventoryItem_result result = new getInventoryItem_result();
314
      receiveBase(result, "getInventoryItem");
2832 chandransh 315
      if (result.isSetSuccess()) {
316
        return result.success;
317
      }
4541 mandeep.dh 318
      if (result.wex != null) {
319
        throw result.wex;
320
      }
4496 mandeep.dh 321
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItem failed: unknown result");
322
    }
323
 
5361 mandeep.dh 324
    public InventoryItem getNonSeralizedInventoryItem(long itemId, long warehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 325
    {
5361 mandeep.dh 326
      send_getNonSeralizedInventoryItem(itemId, warehouseId);
327
      return recv_getNonSeralizedInventoryItem();
4496 mandeep.dh 328
    }
329
 
5361 mandeep.dh 330
    public void send_getNonSeralizedInventoryItem(long itemId, long warehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 331
    {
5361 mandeep.dh 332
      getNonSeralizedInventoryItem_args args = new getNonSeralizedInventoryItem_args();
4496 mandeep.dh 333
      args.setItemId(itemId);
5361 mandeep.dh 334
      args.setWarehouseId(warehouseId);
335
      sendBase("getNonSeralizedInventoryItem", args);
4496 mandeep.dh 336
    }
337
 
5361 mandeep.dh 338
    public InventoryItem recv_getNonSeralizedInventoryItem() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 339
    {
5361 mandeep.dh 340
      getNonSeralizedInventoryItem_result result = new getNonSeralizedInventoryItem_result();
341
      receiveBase(result, "getNonSeralizedInventoryItem");
4496 mandeep.dh 342
      if (result.isSetSuccess()) {
343
        return result.success;
2832 chandransh 344
      }
5361 mandeep.dh 345
      if (result.wex != null) {
346
        throw result.wex;
2820 chandransh 347
      }
5361 mandeep.dh 348
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getNonSeralizedInventoryItem failed: unknown result");
4496 mandeep.dh 349
    }
350
 
5361 mandeep.dh 351
    public void scanSerializedItem(InventoryItem inventoryItem, ScanType type, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 352
    {
5361 mandeep.dh 353
      send_scanSerializedItem(inventoryItem, type, billingWarehouseId);
4496 mandeep.dh 354
      recv_scanSerializedItem();
355
    }
356
 
5361 mandeep.dh 357
    public void send_scanSerializedItem(InventoryItem inventoryItem, ScanType type, long billingWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 358
    {
359
      scanSerializedItem_args args = new scanSerializedItem_args();
5110 mandeep.dh 360
      args.setInventoryItem(inventoryItem);
4496 mandeep.dh 361
      args.setType(type);
5361 mandeep.dh 362
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 363
      sendBase("scanSerializedItem", args);
364
    }
365
 
366
    public void recv_scanSerializedItem() throws WarehouseServiceException, org.apache.thrift.TException
367
    {
368
      scanSerializedItem_result result = new scanSerializedItem_result();
369
      receiveBase(result, "scanSerializedItem");
2820 chandransh 370
      if (result.wex != null) {
371
        throw result.wex;
372
      }
4496 mandeep.dh 373
      return;
2820 chandransh 374
    }
375
 
5361 mandeep.dh 376
    public void scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 377
    {
5361 mandeep.dh 378
      send_scan(inventoryItem, type, quantity, billingWarehouseId);
4496 mandeep.dh 379
      recv_scan();
3383 chandransh 380
    }
381
 
5361 mandeep.dh 382
    public void send_scan(InventoryItem inventoryItem, ScanType type, long quantity, long billingWarehouseId) throws org.apache.thrift.TException
3383 chandransh 383
    {
4496 mandeep.dh 384
      scan_args args = new scan_args();
5361 mandeep.dh 385
      args.setInventoryItem(inventoryItem);
4496 mandeep.dh 386
      args.setType(type);
387
      args.setQuantity(quantity);
5361 mandeep.dh 388
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 389
      sendBase("scan", args);
3383 chandransh 390
    }
391
 
4496 mandeep.dh 392
    public void recv_scan() throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 393
    {
4496 mandeep.dh 394
      scan_result result = new scan_result();
395
      receiveBase(result, "scan");
396
      if (result.wex != null) {
397
        throw result.wex;
398
      }
399
      return;
400
    }
401
 
5110 mandeep.dh 402
    public InventoryItem scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 403
    {
5110 mandeep.dh 404
      send_scanSerializedItemForOrder(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId);
4496 mandeep.dh 405
      return recv_scanSerializedItemForOrder();
406
    }
407
 
5110 mandeep.dh 408
    public void send_scanSerializedItemForOrder(String serialNumber, ScanType type, long orderId, long fulfilmentWarehouseId, double quantity, long billingWarehouseId) throws org.apache.thrift.TException
4496 mandeep.dh 409
    {
410
      scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 411
      args.setSerialNumber(serialNumber);
4496 mandeep.dh 412
      args.setType(type);
413
      args.setOrderId(orderId);
5110 mandeep.dh 414
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
415
      args.setQuantity(quantity);
416
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 417
      sendBase("scanSerializedItemForOrder", args);
418
    }
419
 
4555 mandeep.dh 420
    public InventoryItem recv_scanSerializedItemForOrder() throws WarehouseServiceException, org.apache.thrift.TException
4496 mandeep.dh 421
    {
422
      scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
423
      receiveBase(result, "scanSerializedItemForOrder");
3383 chandransh 424
      if (result.isSetSuccess()) {
425
        return result.success;
426
      }
427
      if (result.wex != null) {
428
        throw result.wex;
429
      }
4496 mandeep.dh 430
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanSerializedItemForOrder failed: unknown result");
3383 chandransh 431
    }
432
 
5361 mandeep.dh 433
    public InventoryItem scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws WarehouseServiceException, org.apache.thrift.TException
3383 chandransh 434
    {
5361 mandeep.dh 435
      send_scanForOrder(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId);
436
      return recv_scanForOrder();
2820 chandransh 437
    }
438
 
5361 mandeep.dh 439
    public void send_scanForOrder(InventoryItem inventoryItem, ScanType type, long quantity, long orderId, long fulfilmentWarehouseId, long billingWarehouseId) throws org.apache.thrift.TException
2820 chandransh 440
    {
4496 mandeep.dh 441
      scanForOrder_args args = new scanForOrder_args();
5361 mandeep.dh 442
      args.setInventoryItem(inventoryItem);
3430 rajveer 443
      args.setType(type);
4496 mandeep.dh 444
      args.setQuantity(quantity);
445
      args.setOrderId(orderId);
5110 mandeep.dh 446
      args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 447
      args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 448
      sendBase("scanForOrder", args);
2820 chandransh 449
    }
450
 
5361 mandeep.dh 451
    public InventoryItem recv_scanForOrder() throws WarehouseServiceException, org.apache.thrift.TException
2820 chandransh 452
    {
4496 mandeep.dh 453
      scanForOrder_result result = new scanForOrder_result();
454
      receiveBase(result, "scanForOrder");
5361 mandeep.dh 455
      if (result.isSetSuccess()) {
456
        return result.success;
457
      }
2820 chandransh 458
      if (result.wex != null) {
459
        throw result.wex;
460
      }
5361 mandeep.dh 461
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "scanForOrder failed: unknown result");
2820 chandransh 462
    }
463
 
4496 mandeep.dh 464
    public void createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 465
    {
4496 mandeep.dh 466
      send_createItemNumberMapping(itemNumber, itemId);
467
      recv_createItemNumberMapping();
2820 chandransh 468
    }
469
 
4496 mandeep.dh 470
    public void send_createItemNumberMapping(String itemNumber, long itemId) throws org.apache.thrift.TException
2820 chandransh 471
    {
4496 mandeep.dh 472
      createItemNumberMapping_args args = new createItemNumberMapping_args();
3430 rajveer 473
      args.setItemNumber(itemNumber);
4496 mandeep.dh 474
      args.setItemId(itemId);
475
      sendBase("createItemNumberMapping", args);
2820 chandransh 476
    }
477
 
4496 mandeep.dh 478
    public void recv_createItemNumberMapping() throws org.apache.thrift.TException
2820 chandransh 479
    {
4496 mandeep.dh 480
      createItemNumberMapping_result result = new createItemNumberMapping_result();
481
      receiveBase(result, "createItemNumberMapping");
2820 chandransh 482
      return;
483
    }
484
 
4622 amit.gupta 485
    public List<String> getItemNumbers(long itemId) throws org.apache.thrift.TException
486
    {
487
      send_getItemNumbers(itemId);
488
      return recv_getItemNumbers();
489
    }
490
 
491
    public void send_getItemNumbers(long itemId) throws org.apache.thrift.TException
492
    {
493
      getItemNumbers_args args = new getItemNumbers_args();
494
      args.setItemId(itemId);
495
      sendBase("getItemNumbers", args);
496
    }
497
 
498
    public List<String> recv_getItemNumbers() throws org.apache.thrift.TException
499
    {
500
      getItemNumbers_result result = new getItemNumbers_result();
501
      receiveBase(result, "getItemNumbers");
502
      if (result.isSetSuccess()) {
503
        return result.success;
504
      }
505
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemNumbers failed: unknown result");
506
    }
507
 
5110 mandeep.dh 508
    public List<Long> getItemIds(String itemNumber) throws org.apache.thrift.TException
509
    {
510
      send_getItemIds(itemNumber);
511
      return recv_getItemIds();
512
    }
513
 
514
    public void send_getItemIds(String itemNumber) throws org.apache.thrift.TException
515
    {
516
      getItemIds_args args = new getItemIds_args();
517
      args.setItemNumber(itemNumber);
518
      sendBase("getItemIds", args);
519
    }
520
 
521
    public List<Long> recv_getItemIds() throws org.apache.thrift.TException
522
    {
523
      getItemIds_result result = new getItemIds_result();
524
      receiveBase(result, "getItemIds");
525
      if (result.isSetSuccess()) {
526
        return result.success;
527
      }
528
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getItemIds failed: unknown result");
529
    }
530
 
5185 mandeep.dh 531
    public List<InventoryItem> getInventoryItemsFromLastScanType(ScanType lastScanType) throws WarehouseServiceException, org.apache.thrift.TException
532
    {
533
      send_getInventoryItemsFromLastScanType(lastScanType);
534
      return recv_getInventoryItemsFromLastScanType();
535
    }
536
 
537
    public void send_getInventoryItemsFromLastScanType(ScanType lastScanType) throws org.apache.thrift.TException
538
    {
539
      getInventoryItemsFromLastScanType_args args = new getInventoryItemsFromLastScanType_args();
540
      args.setLastScanType(lastScanType);
541
      sendBase("getInventoryItemsFromLastScanType", args);
542
    }
543
 
544
    public List<InventoryItem> recv_getInventoryItemsFromLastScanType() throws WarehouseServiceException, org.apache.thrift.TException
545
    {
546
      getInventoryItemsFromLastScanType_result result = new getInventoryItemsFromLastScanType_result();
547
      receiveBase(result, "getInventoryItemsFromLastScanType");
548
      if (result.isSetSuccess()) {
549
        return result.success;
550
      }
551
      if (result.wex != null) {
552
        throw result.wex;
553
      }
554
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemsFromLastScanType failed: unknown result");
555
    }
556
 
557
    public InventoryItem getInventoryItemFromId(long inventoryItemId) throws WarehouseServiceException, org.apache.thrift.TException
558
    {
559
      send_getInventoryItemFromId(inventoryItemId);
560
      return recv_getInventoryItemFromId();
561
    }
562
 
563
    public void send_getInventoryItemFromId(long inventoryItemId) throws org.apache.thrift.TException
564
    {
565
      getInventoryItemFromId_args args = new getInventoryItemFromId_args();
566
      args.setInventoryItemId(inventoryItemId);
567
      sendBase("getInventoryItemFromId", args);
568
    }
569
 
570
    public InventoryItem recv_getInventoryItemFromId() throws WarehouseServiceException, org.apache.thrift.TException
571
    {
572
      getInventoryItemFromId_result result = new getInventoryItemFromId_result();
573
      receiveBase(result, "getInventoryItemFromId");
574
      if (result.isSetSuccess()) {
575
        return result.success;
576
      }
577
      if (result.wex != null) {
578
        throw result.wex;
579
      }
580
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getInventoryItemFromId failed: unknown result");
581
    }
582
 
5372 mandeep.dh 583
    public List<DetailedPurchaseScan> getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException
584
    {
585
      send_getPurchaseScans(startDate, endDate);
586
      return recv_getPurchaseScans();
587
    }
588
 
589
    public void send_getPurchaseScans(long startDate, long endDate) throws org.apache.thrift.TException
590
    {
591
      getPurchaseScans_args args = new getPurchaseScans_args();
592
      args.setStartDate(startDate);
593
      args.setEndDate(endDate);
594
      sendBase("getPurchaseScans", args);
595
    }
596
 
597
    public List<DetailedPurchaseScan> recv_getPurchaseScans() throws org.apache.thrift.TException
598
    {
599
      getPurchaseScans_result result = new getPurchaseScans_result();
600
      receiveBase(result, "getPurchaseScans");
601
      if (result.isSetSuccess()) {
602
        return result.success;
603
      }
604
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPurchaseScans failed: unknown result");
605
    }
606
 
2820 chandransh 607
  }
3430 rajveer 608
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
609
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
610
      private org.apache.thrift.async.TAsyncClientManager clientManager;
611
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
612
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
613
        this.clientManager = clientManager;
614
        this.protocolFactory = protocolFactory;
615
      }
616
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
617
        return new AsyncClient(protocolFactory, clientManager, transport);
618
      }
2820 chandransh 619
    }
620
 
3430 rajveer 621
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
622
      super(protocolFactory, clientManager, transport);
623
    }
2820 chandransh 624
 
4846 mandeep.dh 625
    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 626
      checkReady();
4846 mandeep.dh 627
      createSerializedInventoryItem_call method_call = new createSerializedInventoryItem_call(itemId, itemNumber, serialNumber, purchaseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 628
      this.___currentMethod = method_call;
629
      ___manager.call(method_call);
630
    }
631
 
4496 mandeep.dh 632
    public static class createSerializedInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
633
      private long itemId;
4846 mandeep.dh 634
      private String itemNumber;
4496 mandeep.dh 635
      private String serialNumber;
636
      private long purchaseId;
4846 mandeep.dh 637
      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 638
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 639
        this.itemId = itemId;
4846 mandeep.dh 640
        this.itemNumber = itemNumber;
4496 mandeep.dh 641
        this.serialNumber = serialNumber;
642
        this.purchaseId = purchaseId;
2820 chandransh 643
      }
3430 rajveer 644
 
645
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 646
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createSerializedInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
647
        createSerializedInventoryItem_args args = new createSerializedInventoryItem_args();
648
        args.setItemId(itemId);
4846 mandeep.dh 649
        args.setItemNumber(itemNumber);
4496 mandeep.dh 650
        args.setSerialNumber(serialNumber);
651
        args.setPurchaseId(purchaseId);
3430 rajveer 652
        args.write(prot);
653
        prot.writeMessageEnd();
654
      }
655
 
4555 mandeep.dh 656
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 657
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
658
          throw new IllegalStateException("Method call not finished!");
659
        }
660
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
661
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 662
        return (new Client(prot)).recv_createSerializedInventoryItem();
3430 rajveer 663
      }
2820 chandransh 664
    }
665
 
4496 mandeep.dh 666
    public void createSerializedInventoryItemFromItemNumber(String itemNumber, String serialNumber, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createSerializedInventoryItemFromItemNumber_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 667
      checkReady();
4496 mandeep.dh 668
      createSerializedInventoryItemFromItemNumber_call method_call = new createSerializedInventoryItemFromItemNumber_call(itemNumber, serialNumber, purchaseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 669
      this.___currentMethod = method_call;
670
      ___manager.call(method_call);
671
    }
672
 
4496 mandeep.dh 673
    public static class createSerializedInventoryItemFromItemNumber_call extends org.apache.thrift.async.TAsyncMethodCall {
674
      private String itemNumber;
675
      private String serialNumber;
676
      private long purchaseId;
677
      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 678
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 679
        this.itemNumber = itemNumber;
680
        this.serialNumber = serialNumber;
681
        this.purchaseId = purchaseId;
3430 rajveer 682
      }
683
 
684
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 685
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createSerializedInventoryItemFromItemNumber", org.apache.thrift.protocol.TMessageType.CALL, 0));
686
        createSerializedInventoryItemFromItemNumber_args args = new createSerializedInventoryItemFromItemNumber_args();
687
        args.setItemNumber(itemNumber);
688
        args.setSerialNumber(serialNumber);
689
        args.setPurchaseId(purchaseId);
3430 rajveer 690
        args.write(prot);
691
        prot.writeMessageEnd();
692
      }
693
 
4555 mandeep.dh 694
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 695
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
696
          throw new IllegalStateException("Method call not finished!");
697
        }
698
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
699
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 700
        return (new Client(prot)).recv_createSerializedInventoryItemFromItemNumber();
3430 rajveer 701
      }
702
    }
703
 
4496 mandeep.dh 704
    public void createInventoryItem(long itemId, long quantity, long purchaseId, org.apache.thrift.async.AsyncMethodCallback<createInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 705
      checkReady();
4496 mandeep.dh 706
      createInventoryItem_call method_call = new createInventoryItem_call(itemId, quantity, purchaseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 707
      this.___currentMethod = method_call;
708
      ___manager.call(method_call);
709
    }
710
 
4496 mandeep.dh 711
    public static class createInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
712
      private long itemId;
713
      private long quantity;
714
      private long purchaseId;
715
      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 716
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 717
        this.itemId = itemId;
718
        this.quantity = quantity;
719
        this.purchaseId = purchaseId;
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("createInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
724
        createInventoryItem_args args = new createInventoryItem_args();
725
        args.setItemId(itemId);
726
        args.setQuantity(quantity);
727
        args.setPurchaseId(purchaseId);
3430 rajveer 728
        args.write(prot);
729
        prot.writeMessageEnd();
730
      }
731
 
4555 mandeep.dh 732
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 733
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
734
          throw new IllegalStateException("Method call not finished!");
735
        }
736
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
737
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 738
        return (new Client(prot)).recv_createInventoryItem();
3430 rajveer 739
      }
740
    }
741
 
4496 mandeep.dh 742
    public void getInventoryItem(String serialNumber, org.apache.thrift.async.AsyncMethodCallback<getInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 743
      checkReady();
4496 mandeep.dh 744
      getInventoryItem_call method_call = new getInventoryItem_call(serialNumber, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 745
      this.___currentMethod = method_call;
746
      ___manager.call(method_call);
747
    }
748
 
4496 mandeep.dh 749
    public static class getInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
750
      private String serialNumber;
751
      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 752
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 753
        this.serialNumber = serialNumber;
3430 rajveer 754
      }
755
 
756
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 757
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
758
        getInventoryItem_args args = new getInventoryItem_args();
759
        args.setSerialNumber(serialNumber);
3430 rajveer 760
        args.write(prot);
761
        prot.writeMessageEnd();
762
      }
763
 
4541 mandeep.dh 764
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 765
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
766
          throw new IllegalStateException("Method call not finished!");
767
        }
768
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
769
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 770
        return (new Client(prot)).recv_getInventoryItem();
3430 rajveer 771
      }
772
    }
773
 
5361 mandeep.dh 774
    public void getNonSeralizedInventoryItem(long itemId, long warehouseId, org.apache.thrift.async.AsyncMethodCallback<getNonSeralizedInventoryItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 775
      checkReady();
5361 mandeep.dh 776
      getNonSeralizedInventoryItem_call method_call = new getNonSeralizedInventoryItem_call(itemId, warehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 777
      this.___currentMethod = method_call;
778
      ___manager.call(method_call);
779
    }
780
 
5361 mandeep.dh 781
    public static class getNonSeralizedInventoryItem_call extends org.apache.thrift.async.TAsyncMethodCall {
4496 mandeep.dh 782
      private long itemId;
5361 mandeep.dh 783
      private long warehouseId;
784
      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 785
        super(client, protocolFactory, transport, resultHandler, false);
4496 mandeep.dh 786
        this.itemId = itemId;
5361 mandeep.dh 787
        this.warehouseId = warehouseId;
3430 rajveer 788
      }
789
 
790
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
5361 mandeep.dh 791
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getNonSeralizedInventoryItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
792
        getNonSeralizedInventoryItem_args args = new getNonSeralizedInventoryItem_args();
4496 mandeep.dh 793
        args.setItemId(itemId);
5361 mandeep.dh 794
        args.setWarehouseId(warehouseId);
3430 rajveer 795
        args.write(prot);
796
        prot.writeMessageEnd();
797
      }
798
 
5361 mandeep.dh 799
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
3430 rajveer 800
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
801
          throw new IllegalStateException("Method call not finished!");
802
        }
803
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
804
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5361 mandeep.dh 805
        return (new Client(prot)).recv_getNonSeralizedInventoryItem();
3430 rajveer 806
      }
807
    }
808
 
5361 mandeep.dh 809
    public void scanSerializedItem(InventoryItem inventoryItem, ScanType type, long billingWarehouseId, org.apache.thrift.async.AsyncMethodCallback<scanSerializedItem_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 810
      checkReady();
5361 mandeep.dh 811
      scanSerializedItem_call method_call = new scanSerializedItem_call(inventoryItem, type, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 812
      this.___currentMethod = method_call;
813
      ___manager.call(method_call);
814
    }
815
 
4496 mandeep.dh 816
    public static class scanSerializedItem_call extends org.apache.thrift.async.TAsyncMethodCall {
5110 mandeep.dh 817
      private InventoryItem inventoryItem;
3430 rajveer 818
      private ScanType type;
5361 mandeep.dh 819
      private long billingWarehouseId;
820
      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 821
        super(client, protocolFactory, transport, resultHandler, false);
5110 mandeep.dh 822
        this.inventoryItem = inventoryItem;
3430 rajveer 823
        this.type = type;
5361 mandeep.dh 824
        this.billingWarehouseId = billingWarehouseId;
3430 rajveer 825
      }
826
 
827
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 828
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanSerializedItem", org.apache.thrift.protocol.TMessageType.CALL, 0));
829
        scanSerializedItem_args args = new scanSerializedItem_args();
5110 mandeep.dh 830
        args.setInventoryItem(inventoryItem);
3430 rajveer 831
        args.setType(type);
5361 mandeep.dh 832
        args.setBillingWarehouseId(billingWarehouseId);
3430 rajveer 833
        args.write(prot);
834
        prot.writeMessageEnd();
835
      }
836
 
837
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
838
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
839
          throw new IllegalStateException("Method call not finished!");
840
        }
841
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
842
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 843
        (new Client(prot)).recv_scanSerializedItem();
3430 rajveer 844
      }
845
    }
846
 
5361 mandeep.dh 847
    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 848
      checkReady();
5361 mandeep.dh 849
      scan_call method_call = new scan_call(inventoryItem, type, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 850
      this.___currentMethod = method_call;
851
      ___manager.call(method_call);
852
    }
853
 
4496 mandeep.dh 854
    public static class scan_call extends org.apache.thrift.async.TAsyncMethodCall {
5361 mandeep.dh 855
      private InventoryItem inventoryItem;
3430 rajveer 856
      private ScanType type;
4496 mandeep.dh 857
      private long quantity;
5361 mandeep.dh 858
      private long billingWarehouseId;
859
      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 860
        super(client, protocolFactory, transport, resultHandler, false);
5361 mandeep.dh 861
        this.inventoryItem = inventoryItem;
3430 rajveer 862
        this.type = type;
4496 mandeep.dh 863
        this.quantity = quantity;
5361 mandeep.dh 864
        this.billingWarehouseId = billingWarehouseId;
3430 rajveer 865
      }
866
 
867
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
4496 mandeep.dh 868
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scan", org.apache.thrift.protocol.TMessageType.CALL, 0));
869
        scan_args args = new scan_args();
5361 mandeep.dh 870
        args.setInventoryItem(inventoryItem);
3430 rajveer 871
        args.setType(type);
4496 mandeep.dh 872
        args.setQuantity(quantity);
5361 mandeep.dh 873
        args.setBillingWarehouseId(billingWarehouseId);
3430 rajveer 874
        args.write(prot);
875
        prot.writeMessageEnd();
876
      }
877
 
878
      public void getResult() throws WarehouseServiceException, org.apache.thrift.TException {
879
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
880
          throw new IllegalStateException("Method call not finished!");
881
        }
882
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
883
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
4496 mandeep.dh 884
        (new Client(prot)).recv_scan();
3430 rajveer 885
      }
886
    }
887
 
5110 mandeep.dh 888
    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 889
      checkReady();
5110 mandeep.dh 890
      scanSerializedItemForOrder_call method_call = new scanSerializedItemForOrder_call(serialNumber, type, orderId, fulfilmentWarehouseId, quantity, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 891
      this.___currentMethod = method_call;
892
      ___manager.call(method_call);
893
    }
894
 
895
    public static class scanSerializedItemForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
4555 mandeep.dh 896
      private String serialNumber;
4496 mandeep.dh 897
      private ScanType type;
898
      private long orderId;
5110 mandeep.dh 899
      private long fulfilmentWarehouseId;
900
      private double quantity;
901
      private long billingWarehouseId;
902
      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 903
        super(client, protocolFactory, transport, resultHandler, false);
4555 mandeep.dh 904
        this.serialNumber = serialNumber;
4496 mandeep.dh 905
        this.type = type;
906
        this.orderId = orderId;
5110 mandeep.dh 907
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
908
        this.quantity = quantity;
909
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 910
      }
911
 
912
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
913
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanSerializedItemForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
914
        scanSerializedItemForOrder_args args = new scanSerializedItemForOrder_args();
4555 mandeep.dh 915
        args.setSerialNumber(serialNumber);
4496 mandeep.dh 916
        args.setType(type);
917
        args.setOrderId(orderId);
5110 mandeep.dh 918
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
919
        args.setQuantity(quantity);
920
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 921
        args.write(prot);
922
        prot.writeMessageEnd();
923
      }
924
 
4555 mandeep.dh 925
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 926
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
927
          throw new IllegalStateException("Method call not finished!");
928
        }
929
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
930
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
931
        return (new Client(prot)).recv_scanSerializedItemForOrder();
932
      }
933
    }
934
 
5361 mandeep.dh 935
    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 936
      checkReady();
5361 mandeep.dh 937
      scanForOrder_call method_call = new scanForOrder_call(inventoryItem, type, quantity, orderId, fulfilmentWarehouseId, billingWarehouseId, resultHandler, this, ___protocolFactory, ___transport);
4496 mandeep.dh 938
      this.___currentMethod = method_call;
939
      ___manager.call(method_call);
940
    }
941
 
942
    public static class scanForOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
5361 mandeep.dh 943
      private InventoryItem inventoryItem;
4496 mandeep.dh 944
      private ScanType type;
945
      private long quantity;
946
      private long orderId;
5110 mandeep.dh 947
      private long fulfilmentWarehouseId;
5361 mandeep.dh 948
      private long billingWarehouseId;
949
      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 950
        super(client, protocolFactory, transport, resultHandler, false);
5361 mandeep.dh 951
        this.inventoryItem = inventoryItem;
4496 mandeep.dh 952
        this.type = type;
953
        this.quantity = quantity;
954
        this.orderId = orderId;
5110 mandeep.dh 955
        this.fulfilmentWarehouseId = fulfilmentWarehouseId;
5361 mandeep.dh 956
        this.billingWarehouseId = billingWarehouseId;
4496 mandeep.dh 957
      }
958
 
959
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
960
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("scanForOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
961
        scanForOrder_args args = new scanForOrder_args();
5361 mandeep.dh 962
        args.setInventoryItem(inventoryItem);
4496 mandeep.dh 963
        args.setType(type);
964
        args.setQuantity(quantity);
965
        args.setOrderId(orderId);
5110 mandeep.dh 966
        args.setFulfilmentWarehouseId(fulfilmentWarehouseId);
5361 mandeep.dh 967
        args.setBillingWarehouseId(billingWarehouseId);
4496 mandeep.dh 968
        args.write(prot);
969
        prot.writeMessageEnd();
970
      }
971
 
5361 mandeep.dh 972
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
4496 mandeep.dh 973
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
974
          throw new IllegalStateException("Method call not finished!");
975
        }
976
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
977
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
5361 mandeep.dh 978
        return (new Client(prot)).recv_scanForOrder();
4496 mandeep.dh 979
      }
980
    }
981
 
982
    public void createItemNumberMapping(String itemNumber, long itemId, org.apache.thrift.async.AsyncMethodCallback<createItemNumberMapping_call> resultHandler) throws org.apache.thrift.TException {
983
      checkReady();
984
      createItemNumberMapping_call method_call = new createItemNumberMapping_call(itemNumber, itemId, resultHandler, this, ___protocolFactory, ___transport);
985
      this.___currentMethod = method_call;
986
      ___manager.call(method_call);
987
    }
988
 
989
    public static class createItemNumberMapping_call extends org.apache.thrift.async.TAsyncMethodCall {
990
      private String itemNumber;
991
      private long itemId;
992
      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 {
993
        super(client, protocolFactory, transport, resultHandler, false);
994
        this.itemNumber = itemNumber;
995
        this.itemId = itemId;
996
      }
997
 
998
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
999
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createItemNumberMapping", org.apache.thrift.protocol.TMessageType.CALL, 0));
1000
        createItemNumberMapping_args args = new createItemNumberMapping_args();
1001
        args.setItemNumber(itemNumber);
1002
        args.setItemId(itemId);
1003
        args.write(prot);
1004
        prot.writeMessageEnd();
1005
      }
1006
 
1007
      public void getResult() throws org.apache.thrift.TException {
1008
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1009
          throw new IllegalStateException("Method call not finished!");
1010
        }
1011
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1012
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1013
        (new Client(prot)).recv_createItemNumberMapping();
1014
      }
1015
    }
1016
 
4622 amit.gupta 1017
    public void getItemNumbers(long itemId, org.apache.thrift.async.AsyncMethodCallback<getItemNumbers_call> resultHandler) throws org.apache.thrift.TException {
1018
      checkReady();
1019
      getItemNumbers_call method_call = new getItemNumbers_call(itemId, resultHandler, this, ___protocolFactory, ___transport);
1020
      this.___currentMethod = method_call;
1021
      ___manager.call(method_call);
1022
    }
1023
 
1024
    public static class getItemNumbers_call extends org.apache.thrift.async.TAsyncMethodCall {
1025
      private long itemId;
1026
      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 {
1027
        super(client, protocolFactory, transport, resultHandler, false);
1028
        this.itemId = itemId;
1029
      }
1030
 
1031
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1032
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemNumbers", org.apache.thrift.protocol.TMessageType.CALL, 0));
1033
        getItemNumbers_args args = new getItemNumbers_args();
1034
        args.setItemId(itemId);
1035
        args.write(prot);
1036
        prot.writeMessageEnd();
1037
      }
1038
 
1039
      public List<String> getResult() throws org.apache.thrift.TException {
1040
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1041
          throw new IllegalStateException("Method call not finished!");
1042
        }
1043
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1044
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1045
        return (new Client(prot)).recv_getItemNumbers();
1046
      }
1047
    }
1048
 
5110 mandeep.dh 1049
    public void getItemIds(String itemNumber, org.apache.thrift.async.AsyncMethodCallback<getItemIds_call> resultHandler) throws org.apache.thrift.TException {
1050
      checkReady();
1051
      getItemIds_call method_call = new getItemIds_call(itemNumber, resultHandler, this, ___protocolFactory, ___transport);
1052
      this.___currentMethod = method_call;
1053
      ___manager.call(method_call);
1054
    }
1055
 
1056
    public static class getItemIds_call extends org.apache.thrift.async.TAsyncMethodCall {
1057
      private String itemNumber;
1058
      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 {
1059
        super(client, protocolFactory, transport, resultHandler, false);
1060
        this.itemNumber = itemNumber;
1061
      }
1062
 
1063
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1064
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getItemIds", org.apache.thrift.protocol.TMessageType.CALL, 0));
1065
        getItemIds_args args = new getItemIds_args();
1066
        args.setItemNumber(itemNumber);
1067
        args.write(prot);
1068
        prot.writeMessageEnd();
1069
      }
1070
 
1071
      public List<Long> getResult() throws org.apache.thrift.TException {
1072
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1073
          throw new IllegalStateException("Method call not finished!");
1074
        }
1075
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1076
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1077
        return (new Client(prot)).recv_getItemIds();
1078
      }
1079
    }
1080
 
5185 mandeep.dh 1081
    public void getInventoryItemsFromLastScanType(ScanType lastScanType, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemsFromLastScanType_call> resultHandler) throws org.apache.thrift.TException {
1082
      checkReady();
1083
      getInventoryItemsFromLastScanType_call method_call = new getInventoryItemsFromLastScanType_call(lastScanType, resultHandler, this, ___protocolFactory, ___transport);
1084
      this.___currentMethod = method_call;
1085
      ___manager.call(method_call);
1086
    }
1087
 
1088
    public static class getInventoryItemsFromLastScanType_call extends org.apache.thrift.async.TAsyncMethodCall {
1089
      private ScanType lastScanType;
1090
      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 {
1091
        super(client, protocolFactory, transport, resultHandler, false);
1092
        this.lastScanType = lastScanType;
1093
      }
1094
 
1095
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1096
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemsFromLastScanType", org.apache.thrift.protocol.TMessageType.CALL, 0));
1097
        getInventoryItemsFromLastScanType_args args = new getInventoryItemsFromLastScanType_args();
1098
        args.setLastScanType(lastScanType);
1099
        args.write(prot);
1100
        prot.writeMessageEnd();
1101
      }
1102
 
1103
      public List<InventoryItem> getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1104
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1105
          throw new IllegalStateException("Method call not finished!");
1106
        }
1107
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1108
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1109
        return (new Client(prot)).recv_getInventoryItemsFromLastScanType();
1110
      }
1111
    }
1112
 
1113
    public void getInventoryItemFromId(long inventoryItemId, org.apache.thrift.async.AsyncMethodCallback<getInventoryItemFromId_call> resultHandler) throws org.apache.thrift.TException {
1114
      checkReady();
1115
      getInventoryItemFromId_call method_call = new getInventoryItemFromId_call(inventoryItemId, resultHandler, this, ___protocolFactory, ___transport);
1116
      this.___currentMethod = method_call;
1117
      ___manager.call(method_call);
1118
    }
1119
 
1120
    public static class getInventoryItemFromId_call extends org.apache.thrift.async.TAsyncMethodCall {
1121
      private long inventoryItemId;
1122
      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 {
1123
        super(client, protocolFactory, transport, resultHandler, false);
1124
        this.inventoryItemId = inventoryItemId;
1125
      }
1126
 
1127
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1128
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getInventoryItemFromId", org.apache.thrift.protocol.TMessageType.CALL, 0));
1129
        getInventoryItemFromId_args args = new getInventoryItemFromId_args();
1130
        args.setInventoryItemId(inventoryItemId);
1131
        args.write(prot);
1132
        prot.writeMessageEnd();
1133
      }
1134
 
1135
      public InventoryItem getResult() throws WarehouseServiceException, org.apache.thrift.TException {
1136
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1137
          throw new IllegalStateException("Method call not finished!");
1138
        }
1139
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1140
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1141
        return (new Client(prot)).recv_getInventoryItemFromId();
1142
      }
1143
    }
1144
 
5372 mandeep.dh 1145
    public void getPurchaseScans(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getPurchaseScans_call> resultHandler) throws org.apache.thrift.TException {
1146
      checkReady();
1147
      getPurchaseScans_call method_call = new getPurchaseScans_call(startDate, endDate, resultHandler, this, ___protocolFactory, ___transport);
1148
      this.___currentMethod = method_call;
1149
      ___manager.call(method_call);
1150
    }
1151
 
1152
    public static class getPurchaseScans_call extends org.apache.thrift.async.TAsyncMethodCall {
1153
      private long startDate;
1154
      private long endDate;
1155
      public getPurchaseScans_call(long startDate, long endDate, org.apache.thrift.async.AsyncMethodCallback<getPurchaseScans_call> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
1156
        super(client, protocolFactory, transport, resultHandler, false);
1157
        this.startDate = startDate;
1158
        this.endDate = endDate;
1159
      }
1160
 
1161
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1162
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPurchaseScans", org.apache.thrift.protocol.TMessageType.CALL, 0));
1163
        getPurchaseScans_args args = new getPurchaseScans_args();
1164
        args.setStartDate(startDate);
1165
        args.setEndDate(endDate);
1166
        args.write(prot);
1167
        prot.writeMessageEnd();
1168
      }
1169
 
1170
      public List<DetailedPurchaseScan> getResult() throws org.apache.thrift.TException {
1171
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1172
          throw new IllegalStateException("Method call not finished!");
1173
        }
1174
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1175
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1176
        return (new Client(prot)).recv_getPurchaseScans();
1177
      }
1178
    }
1179
 
3430 rajveer 1180
  }
1181
 
1182
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1183
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1184
    public Processor(I iface) {
1185
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
1186
    }
1187
 
1188
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1189
      super(iface, getProcessMap(processMap));
1190
    }
1191
 
1192
    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 1193
      processMap.put("createSerializedInventoryItem", new createSerializedInventoryItem());
1194
      processMap.put("createSerializedInventoryItemFromItemNumber", new createSerializedInventoryItemFromItemNumber());
1195
      processMap.put("createInventoryItem", new createInventoryItem());
1196
      processMap.put("getInventoryItem", new getInventoryItem());
5361 mandeep.dh 1197
      processMap.put("getNonSeralizedInventoryItem", new getNonSeralizedInventoryItem());
4496 mandeep.dh 1198
      processMap.put("scanSerializedItem", new scanSerializedItem());
1199
      processMap.put("scan", new scan());
1200
      processMap.put("scanSerializedItemForOrder", new scanSerializedItemForOrder());
1201
      processMap.put("scanForOrder", new scanForOrder());
1202
      processMap.put("createItemNumberMapping", new createItemNumberMapping());
4622 amit.gupta 1203
      processMap.put("getItemNumbers", new getItemNumbers());
5110 mandeep.dh 1204
      processMap.put("getItemIds", new getItemIds());
5185 mandeep.dh 1205
      processMap.put("getInventoryItemsFromLastScanType", new getInventoryItemsFromLastScanType());
1206
      processMap.put("getInventoryItemFromId", new getInventoryItemFromId());
5372 mandeep.dh 1207
      processMap.put("getPurchaseScans", new getPurchaseScans());
3430 rajveer 1208
      return processMap;
1209
    }
1210
 
4496 mandeep.dh 1211
    private static class createSerializedInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createSerializedInventoryItem_args> {
1212
      public createSerializedInventoryItem() {
1213
        super("createSerializedInventoryItem");
3430 rajveer 1214
      }
1215
 
4496 mandeep.dh 1216
      protected createSerializedInventoryItem_args getEmptyArgsInstance() {
1217
        return new createSerializedInventoryItem_args();
3430 rajveer 1218
      }
1219
 
4496 mandeep.dh 1220
      protected createSerializedInventoryItem_result getResult(I iface, createSerializedInventoryItem_args args) throws org.apache.thrift.TException {
1221
        createSerializedInventoryItem_result result = new createSerializedInventoryItem_result();
2820 chandransh 1222
        try {
4846 mandeep.dh 1223
          result.success = iface.createSerializedInventoryItem(args.itemId, args.itemNumber, args.serialNumber, args.purchaseId);
2820 chandransh 1224
        } catch (WarehouseServiceException wex) {
1225
          result.wex = wex;
1226
        }
3430 rajveer 1227
        return result;
2820 chandransh 1228
      }
1229
    }
1230
 
4496 mandeep.dh 1231
    private static class createSerializedInventoryItemFromItemNumber<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createSerializedInventoryItemFromItemNumber_args> {
1232
      public createSerializedInventoryItemFromItemNumber() {
1233
        super("createSerializedInventoryItemFromItemNumber");
3430 rajveer 1234
      }
1235
 
4496 mandeep.dh 1236
      protected createSerializedInventoryItemFromItemNumber_args getEmptyArgsInstance() {
1237
        return new createSerializedInventoryItemFromItemNumber_args();
3430 rajveer 1238
      }
1239
 
4496 mandeep.dh 1240
      protected createSerializedInventoryItemFromItemNumber_result getResult(I iface, createSerializedInventoryItemFromItemNumber_args args) throws org.apache.thrift.TException {
1241
        createSerializedInventoryItemFromItemNumber_result result = new createSerializedInventoryItemFromItemNumber_result();
2820 chandransh 1242
        try {
4496 mandeep.dh 1243
          result.success = iface.createSerializedInventoryItemFromItemNumber(args.itemNumber, args.serialNumber, args.purchaseId);
2820 chandransh 1244
        } catch (WarehouseServiceException wex) {
1245
          result.wex = wex;
1246
        }
3430 rajveer 1247
        return result;
2820 chandransh 1248
      }
1249
    }
1250
 
4496 mandeep.dh 1251
    private static class createInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createInventoryItem_args> {
1252
      public createInventoryItem() {
1253
        super("createInventoryItem");
3430 rajveer 1254
      }
1255
 
4496 mandeep.dh 1256
      protected createInventoryItem_args getEmptyArgsInstance() {
1257
        return new createInventoryItem_args();
3430 rajveer 1258
      }
1259
 
4496 mandeep.dh 1260
      protected createInventoryItem_result getResult(I iface, createInventoryItem_args args) throws org.apache.thrift.TException {
1261
        createInventoryItem_result result = new createInventoryItem_result();
3383 chandransh 1262
        try {
4496 mandeep.dh 1263
          result.success = iface.createInventoryItem(args.itemId, args.quantity, args.purchaseId);
3383 chandransh 1264
        } catch (WarehouseServiceException wex) {
1265
          result.wex = wex;
1266
        }
3430 rajveer 1267
        return result;
3383 chandransh 1268
      }
1269
    }
1270
 
4496 mandeep.dh 1271
    private static class getInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItem_args> {
1272
      public getInventoryItem() {
1273
        super("getInventoryItem");
3430 rajveer 1274
      }
1275
 
4496 mandeep.dh 1276
      protected getInventoryItem_args getEmptyArgsInstance() {
1277
        return new getInventoryItem_args();
3430 rajveer 1278
      }
1279
 
4496 mandeep.dh 1280
      protected getInventoryItem_result getResult(I iface, getInventoryItem_args args) throws org.apache.thrift.TException {
1281
        getInventoryItem_result result = new getInventoryItem_result();
4541 mandeep.dh 1282
        try {
1283
          result.success = iface.getInventoryItem(args.serialNumber);
1284
        } catch (WarehouseServiceException wex) {
1285
          result.wex = wex;
1286
        }
3430 rajveer 1287
        return result;
2832 chandransh 1288
      }
1289
    }
1290
 
5361 mandeep.dh 1291
    private static class getNonSeralizedInventoryItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getNonSeralizedInventoryItem_args> {
1292
      public getNonSeralizedInventoryItem() {
1293
        super("getNonSeralizedInventoryItem");
3430 rajveer 1294
      }
1295
 
5361 mandeep.dh 1296
      protected getNonSeralizedInventoryItem_args getEmptyArgsInstance() {
1297
        return new getNonSeralizedInventoryItem_args();
3430 rajveer 1298
      }
1299
 
5361 mandeep.dh 1300
      protected getNonSeralizedInventoryItem_result getResult(I iface, getNonSeralizedInventoryItem_args args) throws org.apache.thrift.TException {
1301
        getNonSeralizedInventoryItem_result result = new getNonSeralizedInventoryItem_result();
1302
        try {
1303
          result.success = iface.getNonSeralizedInventoryItem(args.itemId, args.warehouseId);
1304
        } catch (WarehouseServiceException wex) {
1305
          result.wex = wex;
1306
        }
3430 rajveer 1307
        return result;
2820 chandransh 1308
      }
1309
    }
1310
 
4496 mandeep.dh 1311
    private static class scanSerializedItem<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanSerializedItem_args> {
1312
      public scanSerializedItem() {
1313
        super("scanSerializedItem");
1314
      }
1315
 
1316
      protected scanSerializedItem_args getEmptyArgsInstance() {
1317
        return new scanSerializedItem_args();
1318
      }
1319
 
1320
      protected scanSerializedItem_result getResult(I iface, scanSerializedItem_args args) throws org.apache.thrift.TException {
1321
        scanSerializedItem_result result = new scanSerializedItem_result();
2820 chandransh 1322
        try {
5361 mandeep.dh 1323
          iface.scanSerializedItem(args.inventoryItem, args.type, args.billingWarehouseId);
2820 chandransh 1324
        } catch (WarehouseServiceException wex) {
1325
          result.wex = wex;
1326
        }
3430 rajveer 1327
        return result;
2820 chandransh 1328
      }
1329
    }
1330
 
4496 mandeep.dh 1331
    private static class scan<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scan_args> {
1332
      public scan() {
1333
        super("scan");
3430 rajveer 1334
      }
1335
 
4496 mandeep.dh 1336
      protected scan_args getEmptyArgsInstance() {
1337
        return new scan_args();
3430 rajveer 1338
      }
1339
 
4496 mandeep.dh 1340
      protected scan_result getResult(I iface, scan_args args) throws org.apache.thrift.TException {
1341
        scan_result result = new scan_result();
3383 chandransh 1342
        try {
5361 mandeep.dh 1343
          iface.scan(args.inventoryItem, args.type, args.quantity, args.billingWarehouseId);
3383 chandransh 1344
        } catch (WarehouseServiceException wex) {
1345
          result.wex = wex;
1346
        }
3430 rajveer 1347
        return result;
3383 chandransh 1348
      }
1349
    }
1350
 
4496 mandeep.dh 1351
    private static class scanSerializedItemForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanSerializedItemForOrder_args> {
1352
      public scanSerializedItemForOrder() {
1353
        super("scanSerializedItemForOrder");
3430 rajveer 1354
      }
1355
 
4496 mandeep.dh 1356
      protected scanSerializedItemForOrder_args getEmptyArgsInstance() {
1357
        return new scanSerializedItemForOrder_args();
3430 rajveer 1358
      }
1359
 
4496 mandeep.dh 1360
      protected scanSerializedItemForOrder_result getResult(I iface, scanSerializedItemForOrder_args args) throws org.apache.thrift.TException {
1361
        scanSerializedItemForOrder_result result = new scanSerializedItemForOrder_result();
2820 chandransh 1362
        try {
5110 mandeep.dh 1363
          result.success = iface.scanSerializedItemForOrder(args.serialNumber, args.type, args.orderId, args.fulfilmentWarehouseId, args.quantity, args.billingWarehouseId);
2820 chandransh 1364
        } catch (WarehouseServiceException wex) {
1365
          result.wex = wex;
1366
        }
3430 rajveer 1367
        return result;
2820 chandransh 1368
      }
1369
    }
1370
 
4496 mandeep.dh 1371
    private static class scanForOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, scanForOrder_args> {
1372
      public scanForOrder() {
1373
        super("scanForOrder");
3430 rajveer 1374
      }
1375
 
4496 mandeep.dh 1376
      protected scanForOrder_args getEmptyArgsInstance() {
1377
        return new scanForOrder_args();
3430 rajveer 1378
      }
1379
 
4496 mandeep.dh 1380
      protected scanForOrder_result getResult(I iface, scanForOrder_args args) throws org.apache.thrift.TException {
1381
        scanForOrder_result result = new scanForOrder_result();
2820 chandransh 1382
        try {
5361 mandeep.dh 1383
          result.success = iface.scanForOrder(args.inventoryItem, args.type, args.quantity, args.orderId, args.fulfilmentWarehouseId, args.billingWarehouseId);
2820 chandransh 1384
        } catch (WarehouseServiceException wex) {
1385
          result.wex = wex;
1386
        }
3430 rajveer 1387
        return result;
2820 chandransh 1388
      }
1389
    }
1390
 
4496 mandeep.dh 1391
    private static class createItemNumberMapping<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createItemNumberMapping_args> {
1392
      public createItemNumberMapping() {
1393
        super("createItemNumberMapping");
1394
      }
1395
 
1396
      protected createItemNumberMapping_args getEmptyArgsInstance() {
1397
        return new createItemNumberMapping_args();
1398
      }
1399
 
1400
      protected createItemNumberMapping_result getResult(I iface, createItemNumberMapping_args args) throws org.apache.thrift.TException {
1401
        createItemNumberMapping_result result = new createItemNumberMapping_result();
1402
        iface.createItemNumberMapping(args.itemNumber, args.itemId);
1403
        return result;
1404
      }
1405
    }
1406
 
4622 amit.gupta 1407
    private static class getItemNumbers<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemNumbers_args> {
1408
      public getItemNumbers() {
1409
        super("getItemNumbers");
1410
      }
1411
 
1412
      protected getItemNumbers_args getEmptyArgsInstance() {
1413
        return new getItemNumbers_args();
1414
      }
1415
 
1416
      protected getItemNumbers_result getResult(I iface, getItemNumbers_args args) throws org.apache.thrift.TException {
1417
        getItemNumbers_result result = new getItemNumbers_result();
1418
        result.success = iface.getItemNumbers(args.itemId);
1419
        return result;
1420
      }
1421
    }
1422
 
5110 mandeep.dh 1423
    private static class getItemIds<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getItemIds_args> {
1424
      public getItemIds() {
1425
        super("getItemIds");
1426
      }
1427
 
1428
      protected getItemIds_args getEmptyArgsInstance() {
1429
        return new getItemIds_args();
1430
      }
1431
 
1432
      protected getItemIds_result getResult(I iface, getItemIds_args args) throws org.apache.thrift.TException {
1433
        getItemIds_result result = new getItemIds_result();
1434
        result.success = iface.getItemIds(args.itemNumber);
1435
        return result;
1436
      }
1437
    }
1438
 
5185 mandeep.dh 1439
    private static class getInventoryItemsFromLastScanType<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemsFromLastScanType_args> {
1440
      public getInventoryItemsFromLastScanType() {
1441
        super("getInventoryItemsFromLastScanType");
1442
      }
1443
 
1444
      protected getInventoryItemsFromLastScanType_args getEmptyArgsInstance() {
1445
        return new getInventoryItemsFromLastScanType_args();
1446
      }
1447
 
1448
      protected getInventoryItemsFromLastScanType_result getResult(I iface, getInventoryItemsFromLastScanType_args args) throws org.apache.thrift.TException {
1449
        getInventoryItemsFromLastScanType_result result = new getInventoryItemsFromLastScanType_result();
1450
        try {
1451
          result.success = iface.getInventoryItemsFromLastScanType(args.lastScanType);
1452
        } catch (WarehouseServiceException wex) {
1453
          result.wex = wex;
1454
        }
1455
        return result;
1456
      }
1457
    }
1458
 
1459
    private static class getInventoryItemFromId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getInventoryItemFromId_args> {
1460
      public getInventoryItemFromId() {
1461
        super("getInventoryItemFromId");
1462
      }
1463
 
1464
      protected getInventoryItemFromId_args getEmptyArgsInstance() {
1465
        return new getInventoryItemFromId_args();
1466
      }
1467
 
1468
      protected getInventoryItemFromId_result getResult(I iface, getInventoryItemFromId_args args) throws org.apache.thrift.TException {
1469
        getInventoryItemFromId_result result = new getInventoryItemFromId_result();
1470
        try {
1471
          result.success = iface.getInventoryItemFromId(args.inventoryItemId);
1472
        } catch (WarehouseServiceException wex) {
1473
          result.wex = wex;
1474
        }
1475
        return result;
1476
      }
1477
    }
1478
 
5372 mandeep.dh 1479
    private static class getPurchaseScans<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPurchaseScans_args> {
1480
      public getPurchaseScans() {
1481
        super("getPurchaseScans");
1482
      }
1483
 
1484
      protected getPurchaseScans_args getEmptyArgsInstance() {
1485
        return new getPurchaseScans_args();
1486
      }
1487
 
1488
      protected getPurchaseScans_result getResult(I iface, getPurchaseScans_args args) throws org.apache.thrift.TException {
1489
        getPurchaseScans_result result = new getPurchaseScans_result();
1490
        result.success = iface.getPurchaseScans(args.startDate, args.endDate);
1491
        return result;
1492
      }
1493
    }
1494
 
2820 chandransh 1495
  }
1496
 
4496 mandeep.dh 1497
  public static class createSerializedInventoryItem_args implements org.apache.thrift.TBase<createSerializedInventoryItem_args, createSerializedInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
1498
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItem_args");
2820 chandransh 1499
 
4496 mandeep.dh 1500
    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 1501
    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);
1502
    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);
1503
    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 1504
 
4496 mandeep.dh 1505
    private long itemId; // required
4846 mandeep.dh 1506
    private String itemNumber; // required
4496 mandeep.dh 1507
    private String serialNumber; // required
1508
    private long purchaseId; // required
2820 chandransh 1509
 
1510
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 1511
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 1512
      ITEM_ID((short)1, "itemId"),
4846 mandeep.dh 1513
      ITEM_NUMBER((short)2, "itemNumber"),
1514
      SERIAL_NUMBER((short)3, "serialNumber"),
1515
      PURCHASE_ID((short)4, "purchaseId");
2820 chandransh 1516
 
1517
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1518
 
1519
      static {
1520
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1521
          byName.put(field.getFieldName(), field);
1522
        }
1523
      }
1524
 
1525
      /**
1526
       * Find the _Fields constant that matches fieldId, or null if its not found.
1527
       */
1528
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 1529
        switch(fieldId) {
4496 mandeep.dh 1530
          case 1: // ITEM_ID
1531
            return ITEM_ID;
4846 mandeep.dh 1532
          case 2: // ITEM_NUMBER
1533
            return ITEM_NUMBER;
1534
          case 3: // SERIAL_NUMBER
4496 mandeep.dh 1535
            return SERIAL_NUMBER;
4846 mandeep.dh 1536
          case 4: // PURCHASE_ID
4496 mandeep.dh 1537
            return PURCHASE_ID;
3430 rajveer 1538
          default:
1539
            return null;
1540
        }
2820 chandransh 1541
      }
1542
 
1543
      /**
1544
       * Find the _Fields constant that matches fieldId, throwing an exception
1545
       * if it is not found.
1546
       */
1547
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1548
        _Fields fields = findByThriftId(fieldId);
1549
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1550
        return fields;
1551
      }
1552
 
1553
      /**
1554
       * Find the _Fields constant that matches name, or null if its not found.
1555
       */
1556
      public static _Fields findByName(String name) {
1557
        return byName.get(name);
1558
      }
1559
 
1560
      private final short _thriftId;
1561
      private final String _fieldName;
1562
 
1563
      _Fields(short thriftId, String fieldName) {
1564
        _thriftId = thriftId;
1565
        _fieldName = fieldName;
1566
      }
1567
 
1568
      public short getThriftFieldId() {
1569
        return _thriftId;
1570
      }
1571
 
1572
      public String getFieldName() {
1573
        return _fieldName;
1574
      }
1575
    }
1576
 
1577
    // isset id assignments
4496 mandeep.dh 1578
    private static final int __ITEMID_ISSET_ID = 0;
1579
    private static final int __PURCHASEID_ISSET_ID = 1;
1580
    private BitSet __isset_bit_vector = new BitSet(2);
2820 chandransh 1581
 
3430 rajveer 1582
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 1583
    static {
3430 rajveer 1584
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 1585
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1586
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4846 mandeep.dh 1587
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1588
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
4496 mandeep.dh 1589
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1590
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
1591
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
1592
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 1593
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 1594
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSerializedInventoryItem_args.class, metaDataMap);
2820 chandransh 1595
    }
1596
 
4496 mandeep.dh 1597
    public createSerializedInventoryItem_args() {
2820 chandransh 1598
    }
1599
 
4496 mandeep.dh 1600
    public createSerializedInventoryItem_args(
1601
      long itemId,
4846 mandeep.dh 1602
      String itemNumber,
4496 mandeep.dh 1603
      String serialNumber,
1604
      long purchaseId)
2820 chandransh 1605
    {
1606
      this();
4496 mandeep.dh 1607
      this.itemId = itemId;
1608
      setItemIdIsSet(true);
4846 mandeep.dh 1609
      this.itemNumber = itemNumber;
4496 mandeep.dh 1610
      this.serialNumber = serialNumber;
1611
      this.purchaseId = purchaseId;
1612
      setPurchaseIdIsSet(true);
2820 chandransh 1613
    }
1614
 
1615
    /**
1616
     * Performs a deep copy on <i>other</i>.
1617
     */
4496 mandeep.dh 1618
    public createSerializedInventoryItem_args(createSerializedInventoryItem_args other) {
1619
      __isset_bit_vector.clear();
1620
      __isset_bit_vector.or(other.__isset_bit_vector);
1621
      this.itemId = other.itemId;
4846 mandeep.dh 1622
      if (other.isSetItemNumber()) {
1623
        this.itemNumber = other.itemNumber;
1624
      }
4496 mandeep.dh 1625
      if (other.isSetSerialNumber()) {
1626
        this.serialNumber = other.serialNumber;
2820 chandransh 1627
      }
4496 mandeep.dh 1628
      this.purchaseId = other.purchaseId;
2820 chandransh 1629
    }
1630
 
4496 mandeep.dh 1631
    public createSerializedInventoryItem_args deepCopy() {
1632
      return new createSerializedInventoryItem_args(this);
2820 chandransh 1633
    }
1634
 
3430 rajveer 1635
    @Override
1636
    public void clear() {
4496 mandeep.dh 1637
      setItemIdIsSet(false);
1638
      this.itemId = 0;
4846 mandeep.dh 1639
      this.itemNumber = null;
4496 mandeep.dh 1640
      this.serialNumber = null;
1641
      setPurchaseIdIsSet(false);
1642
      this.purchaseId = 0;
2820 chandransh 1643
    }
1644
 
4496 mandeep.dh 1645
    public long getItemId() {
1646
      return this.itemId;
2820 chandransh 1647
    }
1648
 
4496 mandeep.dh 1649
    public void setItemId(long itemId) {
1650
      this.itemId = itemId;
1651
      setItemIdIsSet(true);
2820 chandransh 1652
    }
1653
 
4496 mandeep.dh 1654
    public void unsetItemId() {
1655
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
2820 chandransh 1656
    }
1657
 
4496 mandeep.dh 1658
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
1659
    public boolean isSetItemId() {
1660
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
2820 chandransh 1661
    }
1662
 
4496 mandeep.dh 1663
    public void setItemIdIsSet(boolean value) {
1664
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
1665
    }
1666
 
4846 mandeep.dh 1667
    public String getItemNumber() {
1668
      return this.itemNumber;
1669
    }
1670
 
1671
    public void setItemNumber(String itemNumber) {
1672
      this.itemNumber = itemNumber;
1673
    }
1674
 
1675
    public void unsetItemNumber() {
1676
      this.itemNumber = null;
1677
    }
1678
 
1679
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
1680
    public boolean isSetItemNumber() {
1681
      return this.itemNumber != null;
1682
    }
1683
 
1684
    public void setItemNumberIsSet(boolean value) {
1685
      if (!value) {
1686
        this.itemNumber = null;
1687
      }
1688
    }
1689
 
4496 mandeep.dh 1690
    public String getSerialNumber() {
1691
      return this.serialNumber;
1692
    }
1693
 
1694
    public void setSerialNumber(String serialNumber) {
1695
      this.serialNumber = serialNumber;
1696
    }
1697
 
1698
    public void unsetSerialNumber() {
1699
      this.serialNumber = null;
1700
    }
1701
 
1702
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
1703
    public boolean isSetSerialNumber() {
1704
      return this.serialNumber != null;
1705
    }
1706
 
1707
    public void setSerialNumberIsSet(boolean value) {
2820 chandransh 1708
      if (!value) {
4496 mandeep.dh 1709
        this.serialNumber = null;
2820 chandransh 1710
      }
1711
    }
1712
 
4496 mandeep.dh 1713
    public long getPurchaseId() {
1714
      return this.purchaseId;
1715
    }
1716
 
1717
    public void setPurchaseId(long purchaseId) {
1718
      this.purchaseId = purchaseId;
1719
      setPurchaseIdIsSet(true);
1720
    }
1721
 
1722
    public void unsetPurchaseId() {
1723
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
1724
    }
1725
 
1726
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
1727
    public boolean isSetPurchaseId() {
1728
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
1729
    }
1730
 
1731
    public void setPurchaseIdIsSet(boolean value) {
1732
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
1733
    }
1734
 
2820 chandransh 1735
    public void setFieldValue(_Fields field, Object value) {
1736
      switch (field) {
4496 mandeep.dh 1737
      case ITEM_ID:
2820 chandransh 1738
        if (value == null) {
4496 mandeep.dh 1739
          unsetItemId();
2820 chandransh 1740
        } else {
4496 mandeep.dh 1741
          setItemId((Long)value);
2820 chandransh 1742
        }
1743
        break;
1744
 
4846 mandeep.dh 1745
      case ITEM_NUMBER:
1746
        if (value == null) {
1747
          unsetItemNumber();
1748
        } else {
1749
          setItemNumber((String)value);
1750
        }
1751
        break;
1752
 
4496 mandeep.dh 1753
      case SERIAL_NUMBER:
1754
        if (value == null) {
1755
          unsetSerialNumber();
1756
        } else {
1757
          setSerialNumber((String)value);
1758
        }
1759
        break;
1760
 
1761
      case PURCHASE_ID:
1762
        if (value == null) {
1763
          unsetPurchaseId();
1764
        } else {
1765
          setPurchaseId((Long)value);
1766
        }
1767
        break;
1768
 
2820 chandransh 1769
      }
1770
    }
1771
 
1772
    public Object getFieldValue(_Fields field) {
1773
      switch (field) {
4496 mandeep.dh 1774
      case ITEM_ID:
1775
        return Long.valueOf(getItemId());
2820 chandransh 1776
 
4846 mandeep.dh 1777
      case ITEM_NUMBER:
1778
        return getItemNumber();
1779
 
4496 mandeep.dh 1780
      case SERIAL_NUMBER:
1781
        return getSerialNumber();
1782
 
1783
      case PURCHASE_ID:
1784
        return Long.valueOf(getPurchaseId());
1785
 
2820 chandransh 1786
      }
1787
      throw new IllegalStateException();
1788
    }
1789
 
3430 rajveer 1790
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
1791
    public boolean isSet(_Fields field) {
1792
      if (field == null) {
1793
        throw new IllegalArgumentException();
1794
      }
2820 chandransh 1795
 
1796
      switch (field) {
4496 mandeep.dh 1797
      case ITEM_ID:
1798
        return isSetItemId();
4846 mandeep.dh 1799
      case ITEM_NUMBER:
1800
        return isSetItemNumber();
4496 mandeep.dh 1801
      case SERIAL_NUMBER:
1802
        return isSetSerialNumber();
1803
      case PURCHASE_ID:
1804
        return isSetPurchaseId();
2820 chandransh 1805
      }
1806
      throw new IllegalStateException();
1807
    }
1808
 
1809
    @Override
1810
    public boolean equals(Object that) {
1811
      if (that == null)
1812
        return false;
4496 mandeep.dh 1813
      if (that instanceof createSerializedInventoryItem_args)
1814
        return this.equals((createSerializedInventoryItem_args)that);
2820 chandransh 1815
      return false;
1816
    }
1817
 
4496 mandeep.dh 1818
    public boolean equals(createSerializedInventoryItem_args that) {
2820 chandransh 1819
      if (that == null)
1820
        return false;
1821
 
4496 mandeep.dh 1822
      boolean this_present_itemId = true;
1823
      boolean that_present_itemId = true;
1824
      if (this_present_itemId || that_present_itemId) {
1825
        if (!(this_present_itemId && that_present_itemId))
2820 chandransh 1826
          return false;
4496 mandeep.dh 1827
        if (this.itemId != that.itemId)
2820 chandransh 1828
          return false;
1829
      }
1830
 
4846 mandeep.dh 1831
      boolean this_present_itemNumber = true && this.isSetItemNumber();
1832
      boolean that_present_itemNumber = true && that.isSetItemNumber();
1833
      if (this_present_itemNumber || that_present_itemNumber) {
1834
        if (!(this_present_itemNumber && that_present_itemNumber))
1835
          return false;
1836
        if (!this.itemNumber.equals(that.itemNumber))
1837
          return false;
1838
      }
1839
 
4496 mandeep.dh 1840
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
1841
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
1842
      if (this_present_serialNumber || that_present_serialNumber) {
1843
        if (!(this_present_serialNumber && that_present_serialNumber))
1844
          return false;
1845
        if (!this.serialNumber.equals(that.serialNumber))
1846
          return false;
1847
      }
1848
 
1849
      boolean this_present_purchaseId = true;
1850
      boolean that_present_purchaseId = true;
1851
      if (this_present_purchaseId || that_present_purchaseId) {
1852
        if (!(this_present_purchaseId && that_present_purchaseId))
1853
          return false;
1854
        if (this.purchaseId != that.purchaseId)
1855
          return false;
1856
      }
1857
 
2820 chandransh 1858
      return true;
1859
    }
1860
 
1861
    @Override
1862
    public int hashCode() {
1863
      return 0;
1864
    }
1865
 
4496 mandeep.dh 1866
    public int compareTo(createSerializedInventoryItem_args other) {
2820 chandransh 1867
      if (!getClass().equals(other.getClass())) {
1868
        return getClass().getName().compareTo(other.getClass().getName());
1869
      }
1870
 
1871
      int lastComparison = 0;
4496 mandeep.dh 1872
      createSerializedInventoryItem_args typedOther = (createSerializedInventoryItem_args)other;
2820 chandransh 1873
 
4496 mandeep.dh 1874
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
2820 chandransh 1875
      if (lastComparison != 0) {
1876
        return lastComparison;
1877
      }
4496 mandeep.dh 1878
      if (isSetItemId()) {
1879
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
3430 rajveer 1880
        if (lastComparison != 0) {
1881
          return lastComparison;
1882
        }
2820 chandransh 1883
      }
4846 mandeep.dh 1884
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
1885
      if (lastComparison != 0) {
1886
        return lastComparison;
1887
      }
1888
      if (isSetItemNumber()) {
1889
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
1890
        if (lastComparison != 0) {
1891
          return lastComparison;
1892
        }
1893
      }
4496 mandeep.dh 1894
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
1895
      if (lastComparison != 0) {
1896
        return lastComparison;
1897
      }
1898
      if (isSetSerialNumber()) {
1899
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
1900
        if (lastComparison != 0) {
1901
          return lastComparison;
1902
        }
1903
      }
1904
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
1905
      if (lastComparison != 0) {
1906
        return lastComparison;
1907
      }
1908
      if (isSetPurchaseId()) {
1909
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
1910
        if (lastComparison != 0) {
1911
          return lastComparison;
1912
        }
1913
      }
2820 chandransh 1914
      return 0;
1915
    }
1916
 
3430 rajveer 1917
    public _Fields fieldForId(int fieldId) {
1918
      return _Fields.findByThriftId(fieldId);
1919
    }
1920
 
1921
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
1922
      org.apache.thrift.protocol.TField field;
2820 chandransh 1923
      iprot.readStructBegin();
1924
      while (true)
1925
      {
1926
        field = iprot.readFieldBegin();
3430 rajveer 1927
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 1928
          break;
1929
        }
3430 rajveer 1930
        switch (field.id) {
4496 mandeep.dh 1931
          case 1: // ITEM_ID
1932
            if (field.type == org.apache.thrift.protocol.TType.I64) {
1933
              this.itemId = iprot.readI64();
1934
              setItemIdIsSet(true);
3430 rajveer 1935
            } else { 
1936
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1937
            }
1938
            break;
4846 mandeep.dh 1939
          case 2: // ITEM_NUMBER
4496 mandeep.dh 1940
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
4846 mandeep.dh 1941
              this.itemNumber = iprot.readString();
1942
            } else { 
1943
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1944
            }
1945
            break;
1946
          case 3: // SERIAL_NUMBER
1947
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
4496 mandeep.dh 1948
              this.serialNumber = iprot.readString();
1949
            } else { 
1950
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1951
            }
1952
            break;
4846 mandeep.dh 1953
          case 4: // PURCHASE_ID
4496 mandeep.dh 1954
            if (field.type == org.apache.thrift.protocol.TType.I64) {
1955
              this.purchaseId = iprot.readI64();
1956
              setPurchaseIdIsSet(true);
1957
            } else { 
1958
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1959
            }
1960
            break;
3430 rajveer 1961
          default:
1962
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 1963
        }
3430 rajveer 1964
        iprot.readFieldEnd();
2820 chandransh 1965
      }
1966
      iprot.readStructEnd();
1967
      validate();
1968
    }
1969
 
3430 rajveer 1970
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 1971
      validate();
1972
 
1973
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 1974
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
1975
      oprot.writeI64(this.itemId);
1976
      oprot.writeFieldEnd();
4846 mandeep.dh 1977
      if (this.itemNumber != null) {
1978
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
1979
        oprot.writeString(this.itemNumber);
1980
        oprot.writeFieldEnd();
1981
      }
4496 mandeep.dh 1982
      if (this.serialNumber != null) {
1983
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
1984
        oprot.writeString(this.serialNumber);
2820 chandransh 1985
        oprot.writeFieldEnd();
1986
      }
4496 mandeep.dh 1987
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
1988
      oprot.writeI64(this.purchaseId);
1989
      oprot.writeFieldEnd();
2820 chandransh 1990
      oprot.writeFieldStop();
1991
      oprot.writeStructEnd();
1992
    }
1993
 
1994
    @Override
1995
    public String toString() {
4496 mandeep.dh 1996
      StringBuilder sb = new StringBuilder("createSerializedInventoryItem_args(");
2820 chandransh 1997
      boolean first = true;
1998
 
4496 mandeep.dh 1999
      sb.append("itemId:");
2000
      sb.append(this.itemId);
2001
      first = false;
2002
      if (!first) sb.append(", ");
4846 mandeep.dh 2003
      sb.append("itemNumber:");
2004
      if (this.itemNumber == null) {
2005
        sb.append("null");
2006
      } else {
2007
        sb.append(this.itemNumber);
2008
      }
2009
      first = false;
2010
      if (!first) sb.append(", ");
4496 mandeep.dh 2011
      sb.append("serialNumber:");
2012
      if (this.serialNumber == null) {
2820 chandransh 2013
        sb.append("null");
2014
      } else {
4496 mandeep.dh 2015
        sb.append(this.serialNumber);
2820 chandransh 2016
      }
2017
      first = false;
4496 mandeep.dh 2018
      if (!first) sb.append(", ");
2019
      sb.append("purchaseId:");
2020
      sb.append(this.purchaseId);
2021
      first = false;
2820 chandransh 2022
      sb.append(")");
2023
      return sb.toString();
2024
    }
2025
 
3430 rajveer 2026
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 2027
      // check for required fields
2028
    }
2029
 
3430 rajveer 2030
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2031
      try {
2032
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2033
      } catch (org.apache.thrift.TException te) {
2034
        throw new java.io.IOException(te);
2035
      }
2036
    }
2037
 
2038
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2039
      try {
4496 mandeep.dh 2040
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
2041
        __isset_bit_vector = new BitSet(1);
3430 rajveer 2042
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2043
      } catch (org.apache.thrift.TException te) {
2044
        throw new java.io.IOException(te);
2045
      }
2046
    }
2047
 
2820 chandransh 2048
  }
2049
 
4496 mandeep.dh 2050
  public static class createSerializedInventoryItem_result implements org.apache.thrift.TBase<createSerializedInventoryItem_result, createSerializedInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
2051
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItem_result");
2820 chandransh 2052
 
4555 mandeep.dh 2053
    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 2054
    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 2055
 
4555 mandeep.dh 2056
    private InventoryItem success; // required
3430 rajveer 2057
    private WarehouseServiceException wex; // required
2820 chandransh 2058
 
2059
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2060
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2820 chandransh 2061
      SUCCESS((short)0, "success"),
2062
      WEX((short)1, "wex");
2063
 
2064
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2065
 
2066
      static {
2067
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2068
          byName.put(field.getFieldName(), field);
2069
        }
2070
      }
2071
 
2072
      /**
2073
       * Find the _Fields constant that matches fieldId, or null if its not found.
2074
       */
2075
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2076
        switch(fieldId) {
2077
          case 0: // SUCCESS
2078
            return SUCCESS;
2079
          case 1: // WEX
2080
            return WEX;
2081
          default:
2082
            return null;
2083
        }
2820 chandransh 2084
      }
2085
 
2086
      /**
2087
       * Find the _Fields constant that matches fieldId, throwing an exception
2088
       * if it is not found.
2089
       */
2090
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2091
        _Fields fields = findByThriftId(fieldId);
2092
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2093
        return fields;
2094
      }
2095
 
2096
      /**
2097
       * Find the _Fields constant that matches name, or null if its not found.
2098
       */
2099
      public static _Fields findByName(String name) {
2100
        return byName.get(name);
2101
      }
2102
 
2103
      private final short _thriftId;
2104
      private final String _fieldName;
2105
 
2106
      _Fields(short thriftId, String fieldName) {
2107
        _thriftId = thriftId;
2108
        _fieldName = fieldName;
2109
      }
2110
 
2111
      public short getThriftFieldId() {
2112
        return _thriftId;
2113
      }
2114
 
2115
      public String getFieldName() {
2116
        return _fieldName;
2117
      }
2118
    }
2119
 
2120
    // isset id assignments
2121
 
3430 rajveer 2122
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 2123
    static {
3430 rajveer 2124
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2125
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 2126
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 2127
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2128
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2129
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 2130
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSerializedInventoryItem_result.class, metaDataMap);
2820 chandransh 2131
    }
2132
 
4496 mandeep.dh 2133
    public createSerializedInventoryItem_result() {
2820 chandransh 2134
    }
2135
 
4496 mandeep.dh 2136
    public createSerializedInventoryItem_result(
4555 mandeep.dh 2137
      InventoryItem success,
2820 chandransh 2138
      WarehouseServiceException wex)
2139
    {
2140
      this();
2141
      this.success = success;
2142
      this.wex = wex;
2143
    }
2144
 
2145
    /**
2146
     * Performs a deep copy on <i>other</i>.
2147
     */
4496 mandeep.dh 2148
    public createSerializedInventoryItem_result(createSerializedInventoryItem_result other) {
4555 mandeep.dh 2149
      if (other.isSetSuccess()) {
2150
        this.success = new InventoryItem(other.success);
2151
      }
2820 chandransh 2152
      if (other.isSetWex()) {
2153
        this.wex = new WarehouseServiceException(other.wex);
2154
      }
2155
    }
2156
 
4496 mandeep.dh 2157
    public createSerializedInventoryItem_result deepCopy() {
2158
      return new createSerializedInventoryItem_result(this);
2820 chandransh 2159
    }
2160
 
3430 rajveer 2161
    @Override
2162
    public void clear() {
4555 mandeep.dh 2163
      this.success = null;
3430 rajveer 2164
      this.wex = null;
2820 chandransh 2165
    }
2166
 
4555 mandeep.dh 2167
    public InventoryItem getSuccess() {
2820 chandransh 2168
      return this.success;
2169
    }
2170
 
4555 mandeep.dh 2171
    public void setSuccess(InventoryItem success) {
2820 chandransh 2172
      this.success = success;
2173
    }
2174
 
2175
    public void unsetSuccess() {
4555 mandeep.dh 2176
      this.success = null;
2820 chandransh 2177
    }
2178
 
3430 rajveer 2179
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2820 chandransh 2180
    public boolean isSetSuccess() {
4555 mandeep.dh 2181
      return this.success != null;
2820 chandransh 2182
    }
2183
 
2184
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 2185
      if (!value) {
2186
        this.success = null;
2187
      }
2820 chandransh 2188
    }
2189
 
2190
    public WarehouseServiceException getWex() {
2191
      return this.wex;
2192
    }
2193
 
3430 rajveer 2194
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 2195
      this.wex = wex;
2196
    }
2197
 
2198
    public void unsetWex() {
2199
      this.wex = null;
2200
    }
2201
 
3430 rajveer 2202
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 2203
    public boolean isSetWex() {
2204
      return this.wex != null;
2205
    }
2206
 
2207
    public void setWexIsSet(boolean value) {
2208
      if (!value) {
2209
        this.wex = null;
2210
      }
2211
    }
2212
 
2213
    public void setFieldValue(_Fields field, Object value) {
2214
      switch (field) {
2215
      case SUCCESS:
2216
        if (value == null) {
2217
          unsetSuccess();
2218
        } else {
4555 mandeep.dh 2219
          setSuccess((InventoryItem)value);
2820 chandransh 2220
        }
2221
        break;
2222
 
2223
      case WEX:
2224
        if (value == null) {
2225
          unsetWex();
2226
        } else {
2227
          setWex((WarehouseServiceException)value);
2228
        }
2229
        break;
2230
 
2231
      }
2232
    }
2233
 
2234
    public Object getFieldValue(_Fields field) {
2235
      switch (field) {
2236
      case SUCCESS:
4555 mandeep.dh 2237
        return getSuccess();
2820 chandransh 2238
 
2239
      case WEX:
2240
        return getWex();
2241
 
2242
      }
2243
      throw new IllegalStateException();
2244
    }
2245
 
3430 rajveer 2246
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2247
    public boolean isSet(_Fields field) {
2248
      if (field == null) {
2249
        throw new IllegalArgumentException();
2250
      }
2820 chandransh 2251
 
2252
      switch (field) {
2253
      case SUCCESS:
2254
        return isSetSuccess();
2255
      case WEX:
2256
        return isSetWex();
2257
      }
2258
      throw new IllegalStateException();
2259
    }
2260
 
2261
    @Override
2262
    public boolean equals(Object that) {
2263
      if (that == null)
2264
        return false;
4496 mandeep.dh 2265
      if (that instanceof createSerializedInventoryItem_result)
2266
        return this.equals((createSerializedInventoryItem_result)that);
2820 chandransh 2267
      return false;
2268
    }
2269
 
4496 mandeep.dh 2270
    public boolean equals(createSerializedInventoryItem_result that) {
2820 chandransh 2271
      if (that == null)
2272
        return false;
2273
 
4555 mandeep.dh 2274
      boolean this_present_success = true && this.isSetSuccess();
2275
      boolean that_present_success = true && that.isSetSuccess();
2820 chandransh 2276
      if (this_present_success || that_present_success) {
2277
        if (!(this_present_success && that_present_success))
2278
          return false;
4555 mandeep.dh 2279
        if (!this.success.equals(that.success))
2820 chandransh 2280
          return false;
2281
      }
2282
 
2283
      boolean this_present_wex = true && this.isSetWex();
2284
      boolean that_present_wex = true && that.isSetWex();
2285
      if (this_present_wex || that_present_wex) {
2286
        if (!(this_present_wex && that_present_wex))
2287
          return false;
2288
        if (!this.wex.equals(that.wex))
2289
          return false;
2290
      }
2291
 
2292
      return true;
2293
    }
2294
 
2295
    @Override
2296
    public int hashCode() {
2297
      return 0;
2298
    }
2299
 
4496 mandeep.dh 2300
    public int compareTo(createSerializedInventoryItem_result other) {
2820 chandransh 2301
      if (!getClass().equals(other.getClass())) {
2302
        return getClass().getName().compareTo(other.getClass().getName());
2303
      }
2304
 
2305
      int lastComparison = 0;
4496 mandeep.dh 2306
      createSerializedInventoryItem_result typedOther = (createSerializedInventoryItem_result)other;
2820 chandransh 2307
 
3430 rajveer 2308
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2820 chandransh 2309
      if (lastComparison != 0) {
2310
        return lastComparison;
2311
      }
3430 rajveer 2312
      if (isSetSuccess()) {
2313
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
2314
        if (lastComparison != 0) {
2315
          return lastComparison;
2316
        }
2820 chandransh 2317
      }
3430 rajveer 2318
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 2319
      if (lastComparison != 0) {
2320
        return lastComparison;
2321
      }
3430 rajveer 2322
      if (isSetWex()) {
2323
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
2324
        if (lastComparison != 0) {
2325
          return lastComparison;
2326
        }
2820 chandransh 2327
      }
2328
      return 0;
2329
    }
2330
 
3430 rajveer 2331
    public _Fields fieldForId(int fieldId) {
2332
      return _Fields.findByThriftId(fieldId);
2333
    }
2334
 
2335
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2336
      org.apache.thrift.protocol.TField field;
2820 chandransh 2337
      iprot.readStructBegin();
2338
      while (true)
2339
      {
2340
        field = iprot.readFieldBegin();
3430 rajveer 2341
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 2342
          break;
2343
        }
3430 rajveer 2344
        switch (field.id) {
2345
          case 0: // SUCCESS
4555 mandeep.dh 2346
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2347
              this.success = new InventoryItem();
2348
              this.success.read(iprot);
3430 rajveer 2349
            } else { 
2350
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2351
            }
2352
            break;
2353
          case 1: // WEX
2354
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
2355
              this.wex = new WarehouseServiceException();
2356
              this.wex.read(iprot);
2357
            } else { 
2358
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2359
            }
2360
            break;
2361
          default:
2362
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 2363
        }
3430 rajveer 2364
        iprot.readFieldEnd();
2820 chandransh 2365
      }
2366
      iprot.readStructEnd();
2367
      validate();
2368
    }
2369
 
3430 rajveer 2370
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 2371
      oprot.writeStructBegin(STRUCT_DESC);
2372
 
2373
      if (this.isSetSuccess()) {
2374
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 2375
        this.success.write(oprot);
2820 chandransh 2376
        oprot.writeFieldEnd();
2377
      } else if (this.isSetWex()) {
2378
        oprot.writeFieldBegin(WEX_FIELD_DESC);
2379
        this.wex.write(oprot);
2380
        oprot.writeFieldEnd();
2381
      }
2382
      oprot.writeFieldStop();
2383
      oprot.writeStructEnd();
2384
    }
2385
 
2386
    @Override
2387
    public String toString() {
4496 mandeep.dh 2388
      StringBuilder sb = new StringBuilder("createSerializedInventoryItem_result(");
2820 chandransh 2389
      boolean first = true;
2390
 
2391
      sb.append("success:");
4555 mandeep.dh 2392
      if (this.success == null) {
2393
        sb.append("null");
2394
      } else {
2395
        sb.append(this.success);
2396
      }
2820 chandransh 2397
      first = false;
2398
      if (!first) sb.append(", ");
2399
      sb.append("wex:");
2400
      if (this.wex == null) {
2401
        sb.append("null");
2402
      } else {
2403
        sb.append(this.wex);
2404
      }
2405
      first = false;
2406
      sb.append(")");
2407
      return sb.toString();
2408
    }
2409
 
3430 rajveer 2410
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 2411
      // check for required fields
2412
    }
2413
 
3430 rajveer 2414
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2415
      try {
2416
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2417
      } catch (org.apache.thrift.TException te) {
2418
        throw new java.io.IOException(te);
2419
      }
2420
    }
2421
 
2422
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2423
      try {
2424
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2425
      } catch (org.apache.thrift.TException te) {
2426
        throw new java.io.IOException(te);
2427
      }
2428
    }
2429
 
2820 chandransh 2430
  }
2431
 
4496 mandeep.dh 2432
  public static class createSerializedInventoryItemFromItemNumber_args implements org.apache.thrift.TBase<createSerializedInventoryItemFromItemNumber_args, createSerializedInventoryItemFromItemNumber_args._Fields>, java.io.Serializable, Cloneable   {
2433
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItemFromItemNumber_args");
2820 chandransh 2434
 
4496 mandeep.dh 2435
    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);
2436
    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);
2437
    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 2438
 
4496 mandeep.dh 2439
    private String itemNumber; // required
2440
    private String serialNumber; // required
2441
    private long purchaseId; // required
2820 chandransh 2442
 
2443
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2444
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 2445
      ITEM_NUMBER((short)1, "itemNumber"),
2446
      SERIAL_NUMBER((short)2, "serialNumber"),
2447
      PURCHASE_ID((short)3, "purchaseId");
2820 chandransh 2448
 
2449
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2450
 
2451
      static {
2452
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2453
          byName.put(field.getFieldName(), field);
2454
        }
2455
      }
2456
 
2457
      /**
2458
       * Find the _Fields constant that matches fieldId, or null if its not found.
2459
       */
2460
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2461
        switch(fieldId) {
4496 mandeep.dh 2462
          case 1: // ITEM_NUMBER
2463
            return ITEM_NUMBER;
2464
          case 2: // SERIAL_NUMBER
2465
            return SERIAL_NUMBER;
2466
          case 3: // PURCHASE_ID
2467
            return PURCHASE_ID;
3430 rajveer 2468
          default:
2469
            return null;
2470
        }
2820 chandransh 2471
      }
2472
 
2473
      /**
2474
       * Find the _Fields constant that matches fieldId, throwing an exception
2475
       * if it is not found.
2476
       */
2477
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2478
        _Fields fields = findByThriftId(fieldId);
2479
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2480
        return fields;
2481
      }
2482
 
2483
      /**
2484
       * Find the _Fields constant that matches name, or null if its not found.
2485
       */
2486
      public static _Fields findByName(String name) {
2487
        return byName.get(name);
2488
      }
2489
 
2490
      private final short _thriftId;
2491
      private final String _fieldName;
2492
 
2493
      _Fields(short thriftId, String fieldName) {
2494
        _thriftId = thriftId;
2495
        _fieldName = fieldName;
2496
      }
2497
 
2498
      public short getThriftFieldId() {
2499
        return _thriftId;
2500
      }
2501
 
2502
      public String getFieldName() {
2503
        return _fieldName;
2504
      }
2505
    }
2506
 
2507
    // isset id assignments
4496 mandeep.dh 2508
    private static final int __PURCHASEID_ISSET_ID = 0;
2820 chandransh 2509
    private BitSet __isset_bit_vector = new BitSet(1);
2510
 
3430 rajveer 2511
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 2512
    static {
3430 rajveer 2513
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 2514
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2515
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
2516
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2517
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
2518
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3430 rajveer 2519
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2520
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 2521
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSerializedInventoryItemFromItemNumber_args.class, metaDataMap);
2820 chandransh 2522
    }
2523
 
4496 mandeep.dh 2524
    public createSerializedInventoryItemFromItemNumber_args() {
2820 chandransh 2525
    }
2526
 
4496 mandeep.dh 2527
    public createSerializedInventoryItemFromItemNumber_args(
2528
      String itemNumber,
2529
      String serialNumber,
2530
      long purchaseId)
2820 chandransh 2531
    {
2532
      this();
4496 mandeep.dh 2533
      this.itemNumber = itemNumber;
2534
      this.serialNumber = serialNumber;
2535
      this.purchaseId = purchaseId;
2536
      setPurchaseIdIsSet(true);
2820 chandransh 2537
    }
2538
 
2539
    /**
2540
     * Performs a deep copy on <i>other</i>.
2541
     */
4496 mandeep.dh 2542
    public createSerializedInventoryItemFromItemNumber_args(createSerializedInventoryItemFromItemNumber_args other) {
2820 chandransh 2543
      __isset_bit_vector.clear();
2544
      __isset_bit_vector.or(other.__isset_bit_vector);
4496 mandeep.dh 2545
      if (other.isSetItemNumber()) {
2546
        this.itemNumber = other.itemNumber;
2547
      }
2548
      if (other.isSetSerialNumber()) {
2549
        this.serialNumber = other.serialNumber;
2550
      }
2551
      this.purchaseId = other.purchaseId;
2820 chandransh 2552
    }
2553
 
4496 mandeep.dh 2554
    public createSerializedInventoryItemFromItemNumber_args deepCopy() {
2555
      return new createSerializedInventoryItemFromItemNumber_args(this);
2820 chandransh 2556
    }
2557
 
3430 rajveer 2558
    @Override
2559
    public void clear() {
4496 mandeep.dh 2560
      this.itemNumber = null;
2561
      this.serialNumber = null;
2562
      setPurchaseIdIsSet(false);
2563
      this.purchaseId = 0;
2820 chandransh 2564
    }
2565
 
4496 mandeep.dh 2566
    public String getItemNumber() {
2567
      return this.itemNumber;
2820 chandransh 2568
    }
2569
 
4496 mandeep.dh 2570
    public void setItemNumber(String itemNumber) {
2571
      this.itemNumber = itemNumber;
2820 chandransh 2572
    }
2573
 
4496 mandeep.dh 2574
    public void unsetItemNumber() {
2575
      this.itemNumber = null;
2820 chandransh 2576
    }
2577
 
4496 mandeep.dh 2578
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
2579
    public boolean isSetItemNumber() {
2580
      return this.itemNumber != null;
2820 chandransh 2581
    }
2582
 
4496 mandeep.dh 2583
    public void setItemNumberIsSet(boolean value) {
2584
      if (!value) {
2585
        this.itemNumber = null;
2586
      }
2820 chandransh 2587
    }
2588
 
4496 mandeep.dh 2589
    public String getSerialNumber() {
2590
      return this.serialNumber;
2591
    }
2592
 
2593
    public void setSerialNumber(String serialNumber) {
2594
      this.serialNumber = serialNumber;
2595
    }
2596
 
2597
    public void unsetSerialNumber() {
2598
      this.serialNumber = null;
2599
    }
2600
 
2601
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
2602
    public boolean isSetSerialNumber() {
2603
      return this.serialNumber != null;
2604
    }
2605
 
2606
    public void setSerialNumberIsSet(boolean value) {
2607
      if (!value) {
2608
        this.serialNumber = null;
2609
      }
2610
    }
2611
 
2612
    public long getPurchaseId() {
2613
      return this.purchaseId;
2614
    }
2615
 
2616
    public void setPurchaseId(long purchaseId) {
2617
      this.purchaseId = purchaseId;
2618
      setPurchaseIdIsSet(true);
2619
    }
2620
 
2621
    public void unsetPurchaseId() {
2622
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
2623
    }
2624
 
2625
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
2626
    public boolean isSetPurchaseId() {
2627
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
2628
    }
2629
 
2630
    public void setPurchaseIdIsSet(boolean value) {
2631
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
2632
    }
2633
 
2820 chandransh 2634
    public void setFieldValue(_Fields field, Object value) {
2635
      switch (field) {
4496 mandeep.dh 2636
      case ITEM_NUMBER:
2820 chandransh 2637
        if (value == null) {
4496 mandeep.dh 2638
          unsetItemNumber();
2820 chandransh 2639
        } else {
4496 mandeep.dh 2640
          setItemNumber((String)value);
2820 chandransh 2641
        }
2642
        break;
2643
 
4496 mandeep.dh 2644
      case SERIAL_NUMBER:
2645
        if (value == null) {
2646
          unsetSerialNumber();
2647
        } else {
2648
          setSerialNumber((String)value);
2649
        }
2650
        break;
2651
 
2652
      case PURCHASE_ID:
2653
        if (value == null) {
2654
          unsetPurchaseId();
2655
        } else {
2656
          setPurchaseId((Long)value);
2657
        }
2658
        break;
2659
 
2820 chandransh 2660
      }
2661
    }
2662
 
2663
    public Object getFieldValue(_Fields field) {
2664
      switch (field) {
4496 mandeep.dh 2665
      case ITEM_NUMBER:
2666
        return getItemNumber();
2820 chandransh 2667
 
4496 mandeep.dh 2668
      case SERIAL_NUMBER:
2669
        return getSerialNumber();
2670
 
2671
      case PURCHASE_ID:
2672
        return Long.valueOf(getPurchaseId());
2673
 
2820 chandransh 2674
      }
2675
      throw new IllegalStateException();
2676
    }
2677
 
3430 rajveer 2678
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2679
    public boolean isSet(_Fields field) {
2680
      if (field == null) {
2681
        throw new IllegalArgumentException();
2682
      }
2820 chandransh 2683
 
2684
      switch (field) {
4496 mandeep.dh 2685
      case ITEM_NUMBER:
2686
        return isSetItemNumber();
2687
      case SERIAL_NUMBER:
2688
        return isSetSerialNumber();
2689
      case PURCHASE_ID:
2690
        return isSetPurchaseId();
2820 chandransh 2691
      }
2692
      throw new IllegalStateException();
2693
    }
2694
 
2695
    @Override
2696
    public boolean equals(Object that) {
2697
      if (that == null)
2698
        return false;
4496 mandeep.dh 2699
      if (that instanceof createSerializedInventoryItemFromItemNumber_args)
2700
        return this.equals((createSerializedInventoryItemFromItemNumber_args)that);
2820 chandransh 2701
      return false;
2702
    }
2703
 
4496 mandeep.dh 2704
    public boolean equals(createSerializedInventoryItemFromItemNumber_args that) {
2820 chandransh 2705
      if (that == null)
2706
        return false;
2707
 
4496 mandeep.dh 2708
      boolean this_present_itemNumber = true && this.isSetItemNumber();
2709
      boolean that_present_itemNumber = true && that.isSetItemNumber();
2710
      if (this_present_itemNumber || that_present_itemNumber) {
2711
        if (!(this_present_itemNumber && that_present_itemNumber))
2820 chandransh 2712
          return false;
4496 mandeep.dh 2713
        if (!this.itemNumber.equals(that.itemNumber))
2820 chandransh 2714
          return false;
2715
      }
2716
 
4496 mandeep.dh 2717
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
2718
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
2719
      if (this_present_serialNumber || that_present_serialNumber) {
2720
        if (!(this_present_serialNumber && that_present_serialNumber))
2721
          return false;
2722
        if (!this.serialNumber.equals(that.serialNumber))
2723
          return false;
2724
      }
2725
 
2726
      boolean this_present_purchaseId = true;
2727
      boolean that_present_purchaseId = true;
2728
      if (this_present_purchaseId || that_present_purchaseId) {
2729
        if (!(this_present_purchaseId && that_present_purchaseId))
2730
          return false;
2731
        if (this.purchaseId != that.purchaseId)
2732
          return false;
2733
      }
2734
 
2820 chandransh 2735
      return true;
2736
    }
2737
 
2738
    @Override
2739
    public int hashCode() {
2740
      return 0;
2741
    }
2742
 
4496 mandeep.dh 2743
    public int compareTo(createSerializedInventoryItemFromItemNumber_args other) {
2820 chandransh 2744
      if (!getClass().equals(other.getClass())) {
2745
        return getClass().getName().compareTo(other.getClass().getName());
2746
      }
2747
 
2748
      int lastComparison = 0;
4496 mandeep.dh 2749
      createSerializedInventoryItemFromItemNumber_args typedOther = (createSerializedInventoryItemFromItemNumber_args)other;
2820 chandransh 2750
 
4496 mandeep.dh 2751
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
2820 chandransh 2752
      if (lastComparison != 0) {
2753
        return lastComparison;
2754
      }
4496 mandeep.dh 2755
      if (isSetItemNumber()) {
2756
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
3430 rajveer 2757
        if (lastComparison != 0) {
2758
          return lastComparison;
2759
        }
2820 chandransh 2760
      }
4496 mandeep.dh 2761
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2762
      if (lastComparison != 0) {
2763
        return lastComparison;
2764
      }
2765
      if (isSetSerialNumber()) {
2766
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
2767
        if (lastComparison != 0) {
2768
          return lastComparison;
2769
        }
2770
      }
2771
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
2772
      if (lastComparison != 0) {
2773
        return lastComparison;
2774
      }
2775
      if (isSetPurchaseId()) {
2776
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
2777
        if (lastComparison != 0) {
2778
          return lastComparison;
2779
        }
2780
      }
2820 chandransh 2781
      return 0;
2782
    }
2783
 
3430 rajveer 2784
    public _Fields fieldForId(int fieldId) {
2785
      return _Fields.findByThriftId(fieldId);
2786
    }
2787
 
2788
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2789
      org.apache.thrift.protocol.TField field;
2820 chandransh 2790
      iprot.readStructBegin();
2791
      while (true)
2792
      {
2793
        field = iprot.readFieldBegin();
3430 rajveer 2794
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 2795
          break;
2796
        }
3430 rajveer 2797
        switch (field.id) {
4496 mandeep.dh 2798
          case 1: // ITEM_NUMBER
2799
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
2800
              this.itemNumber = iprot.readString();
2801
            } else { 
2802
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2803
            }
2804
            break;
2805
          case 2: // SERIAL_NUMBER
2806
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
2807
              this.serialNumber = iprot.readString();
2808
            } else { 
2809
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2810
            }
2811
            break;
2812
          case 3: // PURCHASE_ID
3430 rajveer 2813
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4496 mandeep.dh 2814
              this.purchaseId = iprot.readI64();
2815
              setPurchaseIdIsSet(true);
3430 rajveer 2816
            } else { 
2817
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2818
            }
2819
            break;
2820
          default:
2821
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 2822
        }
3430 rajveer 2823
        iprot.readFieldEnd();
2820 chandransh 2824
      }
2825
      iprot.readStructEnd();
2826
      validate();
2827
    }
2828
 
3430 rajveer 2829
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 2830
      validate();
2831
 
2832
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 2833
      if (this.itemNumber != null) {
2834
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
2835
        oprot.writeString(this.itemNumber);
2836
        oprot.writeFieldEnd();
2837
      }
2838
      if (this.serialNumber != null) {
2839
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
2840
        oprot.writeString(this.serialNumber);
2841
        oprot.writeFieldEnd();
2842
      }
2843
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
2844
      oprot.writeI64(this.purchaseId);
2820 chandransh 2845
      oprot.writeFieldEnd();
2846
      oprot.writeFieldStop();
2847
      oprot.writeStructEnd();
2848
    }
2849
 
2850
    @Override
2851
    public String toString() {
4496 mandeep.dh 2852
      StringBuilder sb = new StringBuilder("createSerializedInventoryItemFromItemNumber_args(");
2820 chandransh 2853
      boolean first = true;
2854
 
4496 mandeep.dh 2855
      sb.append("itemNumber:");
2856
      if (this.itemNumber == null) {
2857
        sb.append("null");
2858
      } else {
2859
        sb.append(this.itemNumber);
2860
      }
2820 chandransh 2861
      first = false;
4496 mandeep.dh 2862
      if (!first) sb.append(", ");
2863
      sb.append("serialNumber:");
2864
      if (this.serialNumber == null) {
2865
        sb.append("null");
2866
      } else {
2867
        sb.append(this.serialNumber);
2868
      }
2869
      first = false;
2870
      if (!first) sb.append(", ");
2871
      sb.append("purchaseId:");
2872
      sb.append(this.purchaseId);
2873
      first = false;
2820 chandransh 2874
      sb.append(")");
2875
      return sb.toString();
2876
    }
2877
 
3430 rajveer 2878
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 2879
      // check for required fields
2880
    }
2881
 
3430 rajveer 2882
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2883
      try {
2884
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2885
      } catch (org.apache.thrift.TException te) {
2886
        throw new java.io.IOException(te);
2887
      }
2888
    }
2889
 
2890
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2891
      try {
4496 mandeep.dh 2892
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
2893
        __isset_bit_vector = new BitSet(1);
3430 rajveer 2894
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2895
      } catch (org.apache.thrift.TException te) {
2896
        throw new java.io.IOException(te);
2897
      }
2898
    }
2899
 
2820 chandransh 2900
  }
2901
 
4496 mandeep.dh 2902
  public static class createSerializedInventoryItemFromItemNumber_result implements org.apache.thrift.TBase<createSerializedInventoryItemFromItemNumber_result, createSerializedInventoryItemFromItemNumber_result._Fields>, java.io.Serializable, Cloneable   {
2903
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createSerializedInventoryItemFromItemNumber_result");
2820 chandransh 2904
 
4555 mandeep.dh 2905
    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 2906
    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 2907
 
4555 mandeep.dh 2908
    private InventoryItem success; // required
3430 rajveer 2909
    private WarehouseServiceException wex; // required
2820 chandransh 2910
 
2911
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2912
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2820 chandransh 2913
      SUCCESS((short)0, "success"),
2914
      WEX((short)1, "wex");
2915
 
2916
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2917
 
2918
      static {
2919
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2920
          byName.put(field.getFieldName(), field);
2921
        }
2922
      }
2923
 
2924
      /**
2925
       * Find the _Fields constant that matches fieldId, or null if its not found.
2926
       */
2927
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2928
        switch(fieldId) {
2929
          case 0: // SUCCESS
2930
            return SUCCESS;
2931
          case 1: // WEX
2932
            return WEX;
2933
          default:
2934
            return null;
2935
        }
2820 chandransh 2936
      }
2937
 
2938
      /**
2939
       * Find the _Fields constant that matches fieldId, throwing an exception
2940
       * if it is not found.
2941
       */
2942
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2943
        _Fields fields = findByThriftId(fieldId);
2944
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2945
        return fields;
2946
      }
2947
 
2948
      /**
2949
       * Find the _Fields constant that matches name, or null if its not found.
2950
       */
2951
      public static _Fields findByName(String name) {
2952
        return byName.get(name);
2953
      }
2954
 
2955
      private final short _thriftId;
2956
      private final String _fieldName;
2957
 
2958
      _Fields(short thriftId, String fieldName) {
2959
        _thriftId = thriftId;
2960
        _fieldName = fieldName;
2961
      }
2962
 
2963
      public short getThriftFieldId() {
2964
        return _thriftId;
2965
      }
2966
 
2967
      public String getFieldName() {
2968
        return _fieldName;
2969
      }
2970
    }
2971
 
2972
    // isset id assignments
2973
 
3430 rajveer 2974
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 2975
    static {
3430 rajveer 2976
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2977
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 2978
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 2979
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2980
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2981
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 2982
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createSerializedInventoryItemFromItemNumber_result.class, metaDataMap);
2820 chandransh 2983
    }
2984
 
4496 mandeep.dh 2985
    public createSerializedInventoryItemFromItemNumber_result() {
2820 chandransh 2986
    }
2987
 
4496 mandeep.dh 2988
    public createSerializedInventoryItemFromItemNumber_result(
4555 mandeep.dh 2989
      InventoryItem success,
2820 chandransh 2990
      WarehouseServiceException wex)
2991
    {
2992
      this();
2993
      this.success = success;
2994
      this.wex = wex;
2995
    }
2996
 
2997
    /**
2998
     * Performs a deep copy on <i>other</i>.
2999
     */
4496 mandeep.dh 3000
    public createSerializedInventoryItemFromItemNumber_result(createSerializedInventoryItemFromItemNumber_result other) {
4555 mandeep.dh 3001
      if (other.isSetSuccess()) {
3002
        this.success = new InventoryItem(other.success);
3003
      }
2820 chandransh 3004
      if (other.isSetWex()) {
3005
        this.wex = new WarehouseServiceException(other.wex);
3006
      }
3007
    }
3008
 
4496 mandeep.dh 3009
    public createSerializedInventoryItemFromItemNumber_result deepCopy() {
3010
      return new createSerializedInventoryItemFromItemNumber_result(this);
2820 chandransh 3011
    }
3012
 
3430 rajveer 3013
    @Override
3014
    public void clear() {
4555 mandeep.dh 3015
      this.success = null;
3430 rajveer 3016
      this.wex = null;
2820 chandransh 3017
    }
3018
 
4555 mandeep.dh 3019
    public InventoryItem getSuccess() {
2820 chandransh 3020
      return this.success;
3021
    }
3022
 
4555 mandeep.dh 3023
    public void setSuccess(InventoryItem success) {
2820 chandransh 3024
      this.success = success;
3025
    }
3026
 
3027
    public void unsetSuccess() {
4555 mandeep.dh 3028
      this.success = null;
2820 chandransh 3029
    }
3030
 
3430 rajveer 3031
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2820 chandransh 3032
    public boolean isSetSuccess() {
4555 mandeep.dh 3033
      return this.success != null;
2820 chandransh 3034
    }
3035
 
3036
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 3037
      if (!value) {
3038
        this.success = null;
3039
      }
2820 chandransh 3040
    }
3041
 
3042
    public WarehouseServiceException getWex() {
3043
      return this.wex;
3044
    }
3045
 
3430 rajveer 3046
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 3047
      this.wex = wex;
3048
    }
3049
 
3050
    public void unsetWex() {
3051
      this.wex = null;
3052
    }
3053
 
3430 rajveer 3054
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 3055
    public boolean isSetWex() {
3056
      return this.wex != null;
3057
    }
3058
 
3059
    public void setWexIsSet(boolean value) {
3060
      if (!value) {
3061
        this.wex = null;
3062
      }
3063
    }
3064
 
3065
    public void setFieldValue(_Fields field, Object value) {
3066
      switch (field) {
3067
      case SUCCESS:
3068
        if (value == null) {
3069
          unsetSuccess();
3070
        } else {
4555 mandeep.dh 3071
          setSuccess((InventoryItem)value);
2820 chandransh 3072
        }
3073
        break;
3074
 
3075
      case WEX:
3076
        if (value == null) {
3077
          unsetWex();
3078
        } else {
3079
          setWex((WarehouseServiceException)value);
3080
        }
3081
        break;
3082
 
3083
      }
3084
    }
3085
 
3086
    public Object getFieldValue(_Fields field) {
3087
      switch (field) {
3088
      case SUCCESS:
4555 mandeep.dh 3089
        return getSuccess();
2820 chandransh 3090
 
3091
      case WEX:
3092
        return getWex();
3093
 
3094
      }
3095
      throw new IllegalStateException();
3096
    }
3097
 
3430 rajveer 3098
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3099
    public boolean isSet(_Fields field) {
3100
      if (field == null) {
3101
        throw new IllegalArgumentException();
3102
      }
2820 chandransh 3103
 
3104
      switch (field) {
3105
      case SUCCESS:
3106
        return isSetSuccess();
3107
      case WEX:
3108
        return isSetWex();
3109
      }
3110
      throw new IllegalStateException();
3111
    }
3112
 
3113
    @Override
3114
    public boolean equals(Object that) {
3115
      if (that == null)
3116
        return false;
4496 mandeep.dh 3117
      if (that instanceof createSerializedInventoryItemFromItemNumber_result)
3118
        return this.equals((createSerializedInventoryItemFromItemNumber_result)that);
2820 chandransh 3119
      return false;
3120
    }
3121
 
4496 mandeep.dh 3122
    public boolean equals(createSerializedInventoryItemFromItemNumber_result that) {
2820 chandransh 3123
      if (that == null)
3124
        return false;
3125
 
4555 mandeep.dh 3126
      boolean this_present_success = true && this.isSetSuccess();
3127
      boolean that_present_success = true && that.isSetSuccess();
2820 chandransh 3128
      if (this_present_success || that_present_success) {
3129
        if (!(this_present_success && that_present_success))
3130
          return false;
4555 mandeep.dh 3131
        if (!this.success.equals(that.success))
2820 chandransh 3132
          return false;
3133
      }
3134
 
3135
      boolean this_present_wex = true && this.isSetWex();
3136
      boolean that_present_wex = true && that.isSetWex();
3137
      if (this_present_wex || that_present_wex) {
3138
        if (!(this_present_wex && that_present_wex))
3139
          return false;
3140
        if (!this.wex.equals(that.wex))
3141
          return false;
3142
      }
3143
 
3144
      return true;
3145
    }
3146
 
3147
    @Override
3148
    public int hashCode() {
3149
      return 0;
3150
    }
3151
 
4496 mandeep.dh 3152
    public int compareTo(createSerializedInventoryItemFromItemNumber_result other) {
2820 chandransh 3153
      if (!getClass().equals(other.getClass())) {
3154
        return getClass().getName().compareTo(other.getClass().getName());
3155
      }
3156
 
3157
      int lastComparison = 0;
4496 mandeep.dh 3158
      createSerializedInventoryItemFromItemNumber_result typedOther = (createSerializedInventoryItemFromItemNumber_result)other;
2820 chandransh 3159
 
3430 rajveer 3160
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2820 chandransh 3161
      if (lastComparison != 0) {
3162
        return lastComparison;
3163
      }
3430 rajveer 3164
      if (isSetSuccess()) {
3165
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3166
        if (lastComparison != 0) {
3167
          return lastComparison;
3168
        }
2820 chandransh 3169
      }
3430 rajveer 3170
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 3171
      if (lastComparison != 0) {
3172
        return lastComparison;
3173
      }
3430 rajveer 3174
      if (isSetWex()) {
3175
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3176
        if (lastComparison != 0) {
3177
          return lastComparison;
3178
        }
2820 chandransh 3179
      }
3180
      return 0;
3181
    }
3182
 
3430 rajveer 3183
    public _Fields fieldForId(int fieldId) {
3184
      return _Fields.findByThriftId(fieldId);
3185
    }
3186
 
3187
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3188
      org.apache.thrift.protocol.TField field;
2820 chandransh 3189
      iprot.readStructBegin();
3190
      while (true)
3191
      {
3192
        field = iprot.readFieldBegin();
3430 rajveer 3193
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 3194
          break;
3195
        }
3430 rajveer 3196
        switch (field.id) {
3197
          case 0: // SUCCESS
4555 mandeep.dh 3198
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3199
              this.success = new InventoryItem();
3200
              this.success.read(iprot);
3430 rajveer 3201
            } else { 
3202
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3203
            }
3204
            break;
3205
          case 1: // WEX
3206
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3207
              this.wex = new WarehouseServiceException();
3208
              this.wex.read(iprot);
3209
            } else { 
3210
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3211
            }
3212
            break;
3213
          default:
3214
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 3215
        }
3430 rajveer 3216
        iprot.readFieldEnd();
2820 chandransh 3217
      }
3218
      iprot.readStructEnd();
3219
      validate();
3220
    }
3221
 
3430 rajveer 3222
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 3223
      oprot.writeStructBegin(STRUCT_DESC);
3224
 
3225
      if (this.isSetSuccess()) {
3226
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 3227
        this.success.write(oprot);
2820 chandransh 3228
        oprot.writeFieldEnd();
3229
      } else if (this.isSetWex()) {
3230
        oprot.writeFieldBegin(WEX_FIELD_DESC);
3231
        this.wex.write(oprot);
3232
        oprot.writeFieldEnd();
3233
      }
3234
      oprot.writeFieldStop();
3235
      oprot.writeStructEnd();
3236
    }
3237
 
3238
    @Override
3239
    public String toString() {
4496 mandeep.dh 3240
      StringBuilder sb = new StringBuilder("createSerializedInventoryItemFromItemNumber_result(");
2820 chandransh 3241
      boolean first = true;
3242
 
3243
      sb.append("success:");
4555 mandeep.dh 3244
      if (this.success == null) {
3245
        sb.append("null");
3246
      } else {
3247
        sb.append(this.success);
3248
      }
2820 chandransh 3249
      first = false;
3250
      if (!first) sb.append(", ");
3251
      sb.append("wex:");
3252
      if (this.wex == null) {
3253
        sb.append("null");
3254
      } else {
3255
        sb.append(this.wex);
3256
      }
3257
      first = false;
3258
      sb.append(")");
3259
      return sb.toString();
3260
    }
3261
 
3430 rajveer 3262
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 3263
      // check for required fields
3264
    }
3265
 
3430 rajveer 3266
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3267
      try {
3268
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3269
      } catch (org.apache.thrift.TException te) {
3270
        throw new java.io.IOException(te);
3271
      }
3272
    }
3273
 
3274
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3275
      try {
3276
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3277
      } catch (org.apache.thrift.TException te) {
3278
        throw new java.io.IOException(te);
3279
      }
3280
    }
3281
 
2820 chandransh 3282
  }
3283
 
4496 mandeep.dh 3284
  public static class createInventoryItem_args implements org.apache.thrift.TBase<createInventoryItem_args, createInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
3285
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInventoryItem_args");
3383 chandransh 3286
 
4496 mandeep.dh 3287
    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);
3288
    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);
3289
    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 3290
 
4496 mandeep.dh 3291
    private long itemId; // required
3292
    private long quantity; // required
3293
    private long purchaseId; // required
3383 chandransh 3294
 
3295
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3296
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 3297
      ITEM_ID((short)1, "itemId"),
3298
      QUANTITY((short)2, "quantity"),
3299
      PURCHASE_ID((short)3, "purchaseId");
3383 chandransh 3300
 
3301
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3302
 
3303
      static {
3304
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3305
          byName.put(field.getFieldName(), field);
3306
        }
3307
      }
3308
 
3309
      /**
3310
       * Find the _Fields constant that matches fieldId, or null if its not found.
3311
       */
3312
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3313
        switch(fieldId) {
4496 mandeep.dh 3314
          case 1: // ITEM_ID
3315
            return ITEM_ID;
3316
          case 2: // QUANTITY
3317
            return QUANTITY;
3318
          case 3: // PURCHASE_ID
3319
            return PURCHASE_ID;
3430 rajveer 3320
          default:
3321
            return null;
3322
        }
3383 chandransh 3323
      }
3324
 
3325
      /**
3326
       * Find the _Fields constant that matches fieldId, throwing an exception
3327
       * if it is not found.
3328
       */
3329
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3330
        _Fields fields = findByThriftId(fieldId);
3331
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3332
        return fields;
3333
      }
3334
 
3335
      /**
3336
       * Find the _Fields constant that matches name, or null if its not found.
3337
       */
3338
      public static _Fields findByName(String name) {
3339
        return byName.get(name);
3340
      }
3341
 
3342
      private final short _thriftId;
3343
      private final String _fieldName;
3344
 
3345
      _Fields(short thriftId, String fieldName) {
3346
        _thriftId = thriftId;
3347
        _fieldName = fieldName;
3348
      }
3349
 
3350
      public short getThriftFieldId() {
3351
        return _thriftId;
3352
      }
3353
 
3354
      public String getFieldName() {
3355
        return _fieldName;
3356
      }
3357
    }
3358
 
3359
    // isset id assignments
4496 mandeep.dh 3360
    private static final int __ITEMID_ISSET_ID = 0;
3361
    private static final int __QUANTITY_ISSET_ID = 1;
3362
    private static final int __PURCHASEID_ISSET_ID = 2;
3363
    private BitSet __isset_bit_vector = new BitSet(3);
3383 chandransh 3364
 
3430 rajveer 3365
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 3366
    static {
3430 rajveer 3367
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 3368
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3369
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3370
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3371
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3372
      tmpMap.put(_Fields.PURCHASE_ID, new org.apache.thrift.meta_data.FieldMetaData("purchaseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3373
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 3374
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 3375
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInventoryItem_args.class, metaDataMap);
3383 chandransh 3376
    }
3377
 
4496 mandeep.dh 3378
    public createInventoryItem_args() {
3383 chandransh 3379
    }
3380
 
4496 mandeep.dh 3381
    public createInventoryItem_args(
3382
      long itemId,
3383
      long quantity,
3384
      long purchaseId)
3383 chandransh 3385
    {
3386
      this();
4496 mandeep.dh 3387
      this.itemId = itemId;
3388
      setItemIdIsSet(true);
3389
      this.quantity = quantity;
3390
      setQuantityIsSet(true);
3391
      this.purchaseId = purchaseId;
3392
      setPurchaseIdIsSet(true);
3383 chandransh 3393
    }
3394
 
3395
    /**
3396
     * Performs a deep copy on <i>other</i>.
3397
     */
4496 mandeep.dh 3398
    public createInventoryItem_args(createInventoryItem_args other) {
3399
      __isset_bit_vector.clear();
3400
      __isset_bit_vector.or(other.__isset_bit_vector);
3401
      this.itemId = other.itemId;
3402
      this.quantity = other.quantity;
3403
      this.purchaseId = other.purchaseId;
3383 chandransh 3404
    }
3405
 
4496 mandeep.dh 3406
    public createInventoryItem_args deepCopy() {
3407
      return new createInventoryItem_args(this);
3383 chandransh 3408
    }
3409
 
3430 rajveer 3410
    @Override
3411
    public void clear() {
4496 mandeep.dh 3412
      setItemIdIsSet(false);
3413
      this.itemId = 0;
3414
      setQuantityIsSet(false);
3415
      this.quantity = 0;
3416
      setPurchaseIdIsSet(false);
3417
      this.purchaseId = 0;
3383 chandransh 3418
    }
3419
 
4496 mandeep.dh 3420
    public long getItemId() {
3421
      return this.itemId;
3383 chandransh 3422
    }
3423
 
4496 mandeep.dh 3424
    public void setItemId(long itemId) {
3425
      this.itemId = itemId;
3426
      setItemIdIsSet(true);
3383 chandransh 3427
    }
3428
 
4496 mandeep.dh 3429
    public void unsetItemId() {
3430
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
3383 chandransh 3431
    }
3432
 
4496 mandeep.dh 3433
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
3434
    public boolean isSetItemId() {
3435
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
3383 chandransh 3436
    }
3437
 
4496 mandeep.dh 3438
    public void setItemIdIsSet(boolean value) {
3439
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
3383 chandransh 3440
    }
3441
 
4496 mandeep.dh 3442
    public long getQuantity() {
3443
      return this.quantity;
3444
    }
3445
 
3446
    public void setQuantity(long quantity) {
3447
      this.quantity = quantity;
3448
      setQuantityIsSet(true);
3449
    }
3450
 
3451
    public void unsetQuantity() {
3452
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
3453
    }
3454
 
3455
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
3456
    public boolean isSetQuantity() {
3457
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
3458
    }
3459
 
3460
    public void setQuantityIsSet(boolean value) {
3461
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
3462
    }
3463
 
3464
    public long getPurchaseId() {
3465
      return this.purchaseId;
3466
    }
3467
 
3468
    public void setPurchaseId(long purchaseId) {
3469
      this.purchaseId = purchaseId;
3470
      setPurchaseIdIsSet(true);
3471
    }
3472
 
3473
    public void unsetPurchaseId() {
3474
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
3475
    }
3476
 
3477
    /** Returns true if field purchaseId is set (has been assigned a value) and false otherwise */
3478
    public boolean isSetPurchaseId() {
3479
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
3480
    }
3481
 
3482
    public void setPurchaseIdIsSet(boolean value) {
3483
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
3484
    }
3485
 
3383 chandransh 3486
    public void setFieldValue(_Fields field, Object value) {
3487
      switch (field) {
4496 mandeep.dh 3488
      case ITEM_ID:
3383 chandransh 3489
        if (value == null) {
4496 mandeep.dh 3490
          unsetItemId();
3383 chandransh 3491
        } else {
4496 mandeep.dh 3492
          setItemId((Long)value);
3383 chandransh 3493
        }
3494
        break;
3495
 
4496 mandeep.dh 3496
      case QUANTITY:
3497
        if (value == null) {
3498
          unsetQuantity();
3499
        } else {
3500
          setQuantity((Long)value);
3501
        }
3502
        break;
3503
 
3504
      case PURCHASE_ID:
3505
        if (value == null) {
3506
          unsetPurchaseId();
3507
        } else {
3508
          setPurchaseId((Long)value);
3509
        }
3510
        break;
3511
 
3383 chandransh 3512
      }
3513
    }
3514
 
3515
    public Object getFieldValue(_Fields field) {
3516
      switch (field) {
4496 mandeep.dh 3517
      case ITEM_ID:
3518
        return Long.valueOf(getItemId());
3383 chandransh 3519
 
4496 mandeep.dh 3520
      case QUANTITY:
3521
        return Long.valueOf(getQuantity());
3522
 
3523
      case PURCHASE_ID:
3524
        return Long.valueOf(getPurchaseId());
3525
 
3383 chandransh 3526
      }
3527
      throw new IllegalStateException();
3528
    }
3529
 
3430 rajveer 3530
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3531
    public boolean isSet(_Fields field) {
3532
      if (field == null) {
3533
        throw new IllegalArgumentException();
3534
      }
3383 chandransh 3535
 
3536
      switch (field) {
4496 mandeep.dh 3537
      case ITEM_ID:
3538
        return isSetItemId();
3539
      case QUANTITY:
3540
        return isSetQuantity();
3541
      case PURCHASE_ID:
3542
        return isSetPurchaseId();
3383 chandransh 3543
      }
3544
      throw new IllegalStateException();
3545
    }
3546
 
3547
    @Override
3548
    public boolean equals(Object that) {
3549
      if (that == null)
3550
        return false;
4496 mandeep.dh 3551
      if (that instanceof createInventoryItem_args)
3552
        return this.equals((createInventoryItem_args)that);
3383 chandransh 3553
      return false;
3554
    }
3555
 
4496 mandeep.dh 3556
    public boolean equals(createInventoryItem_args that) {
3383 chandransh 3557
      if (that == null)
3558
        return false;
3559
 
4496 mandeep.dh 3560
      boolean this_present_itemId = true;
3561
      boolean that_present_itemId = true;
3562
      if (this_present_itemId || that_present_itemId) {
3563
        if (!(this_present_itemId && that_present_itemId))
3383 chandransh 3564
          return false;
4496 mandeep.dh 3565
        if (this.itemId != that.itemId)
3383 chandransh 3566
          return false;
3567
      }
3568
 
4496 mandeep.dh 3569
      boolean this_present_quantity = true;
3570
      boolean that_present_quantity = true;
3571
      if (this_present_quantity || that_present_quantity) {
3572
        if (!(this_present_quantity && that_present_quantity))
3573
          return false;
3574
        if (this.quantity != that.quantity)
3575
          return false;
3576
      }
3577
 
3578
      boolean this_present_purchaseId = true;
3579
      boolean that_present_purchaseId = true;
3580
      if (this_present_purchaseId || that_present_purchaseId) {
3581
        if (!(this_present_purchaseId && that_present_purchaseId))
3582
          return false;
3583
        if (this.purchaseId != that.purchaseId)
3584
          return false;
3585
      }
3586
 
3383 chandransh 3587
      return true;
3588
    }
3589
 
3590
    @Override
3591
    public int hashCode() {
3592
      return 0;
3593
    }
3594
 
4496 mandeep.dh 3595
    public int compareTo(createInventoryItem_args other) {
3383 chandransh 3596
      if (!getClass().equals(other.getClass())) {
3597
        return getClass().getName().compareTo(other.getClass().getName());
3598
      }
3599
 
3600
      int lastComparison = 0;
4496 mandeep.dh 3601
      createInventoryItem_args typedOther = (createInventoryItem_args)other;
3383 chandransh 3602
 
4496 mandeep.dh 3603
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
3383 chandransh 3604
      if (lastComparison != 0) {
3605
        return lastComparison;
3606
      }
4496 mandeep.dh 3607
      if (isSetItemId()) {
3608
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
3430 rajveer 3609
        if (lastComparison != 0) {
3610
          return lastComparison;
3611
        }
3383 chandransh 3612
      }
4496 mandeep.dh 3613
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
3614
      if (lastComparison != 0) {
3615
        return lastComparison;
3616
      }
3617
      if (isSetQuantity()) {
3618
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
3619
        if (lastComparison != 0) {
3620
          return lastComparison;
3621
        }
3622
      }
3623
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(typedOther.isSetPurchaseId());
3624
      if (lastComparison != 0) {
3625
        return lastComparison;
3626
      }
3627
      if (isSetPurchaseId()) {
3628
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.purchaseId, typedOther.purchaseId);
3629
        if (lastComparison != 0) {
3630
          return lastComparison;
3631
        }
3632
      }
3383 chandransh 3633
      return 0;
3634
    }
3635
 
3430 rajveer 3636
    public _Fields fieldForId(int fieldId) {
3637
      return _Fields.findByThriftId(fieldId);
3638
    }
3639
 
3640
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3641
      org.apache.thrift.protocol.TField field;
3383 chandransh 3642
      iprot.readStructBegin();
3643
      while (true)
3644
      {
3645
        field = iprot.readFieldBegin();
3430 rajveer 3646
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 3647
          break;
3648
        }
3430 rajveer 3649
        switch (field.id) {
4496 mandeep.dh 3650
          case 1: // ITEM_ID
3651
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3652
              this.itemId = iprot.readI64();
3653
              setItemIdIsSet(true);
3430 rajveer 3654
            } else { 
3655
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3656
            }
3657
            break;
4496 mandeep.dh 3658
          case 2: // QUANTITY
3659
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3660
              this.quantity = iprot.readI64();
3661
              setQuantityIsSet(true);
3662
            } else { 
3663
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3664
            }
3665
            break;
3666
          case 3: // PURCHASE_ID
3667
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3668
              this.purchaseId = iprot.readI64();
3669
              setPurchaseIdIsSet(true);
3670
            } else { 
3671
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3672
            }
3673
            break;
3430 rajveer 3674
          default:
3675
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 3676
        }
3430 rajveer 3677
        iprot.readFieldEnd();
3383 chandransh 3678
      }
3679
      iprot.readStructEnd();
3680
      validate();
3681
    }
3682
 
3430 rajveer 3683
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 3684
      validate();
3685
 
3686
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 3687
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
3688
      oprot.writeI64(this.itemId);
3689
      oprot.writeFieldEnd();
3690
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
3691
      oprot.writeI64(this.quantity);
3692
      oprot.writeFieldEnd();
3693
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
3694
      oprot.writeI64(this.purchaseId);
3695
      oprot.writeFieldEnd();
3383 chandransh 3696
      oprot.writeFieldStop();
3697
      oprot.writeStructEnd();
3698
    }
3699
 
3700
    @Override
3701
    public String toString() {
4496 mandeep.dh 3702
      StringBuilder sb = new StringBuilder("createInventoryItem_args(");
3383 chandransh 3703
      boolean first = true;
3704
 
4496 mandeep.dh 3705
      sb.append("itemId:");
3706
      sb.append(this.itemId);
3383 chandransh 3707
      first = false;
4496 mandeep.dh 3708
      if (!first) sb.append(", ");
3709
      sb.append("quantity:");
3710
      sb.append(this.quantity);
3711
      first = false;
3712
      if (!first) sb.append(", ");
3713
      sb.append("purchaseId:");
3714
      sb.append(this.purchaseId);
3715
      first = false;
3383 chandransh 3716
      sb.append(")");
3717
      return sb.toString();
3718
    }
3719
 
3430 rajveer 3720
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 3721
      // check for required fields
3722
    }
3723
 
3430 rajveer 3724
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3725
      try {
3726
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3727
      } catch (org.apache.thrift.TException te) {
3728
        throw new java.io.IOException(te);
3729
      }
3730
    }
3731
 
3732
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3733
      try {
4496 mandeep.dh 3734
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
3735
        __isset_bit_vector = new BitSet(1);
3430 rajveer 3736
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3737
      } catch (org.apache.thrift.TException te) {
3738
        throw new java.io.IOException(te);
3739
      }
3740
    }
3741
 
3383 chandransh 3742
  }
3743
 
4496 mandeep.dh 3744
  public static class createInventoryItem_result implements org.apache.thrift.TBase<createInventoryItem_result, createInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
3745
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createInventoryItem_result");
3383 chandransh 3746
 
4555 mandeep.dh 3747
    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 3748
    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 3749
 
4555 mandeep.dh 3750
    private InventoryItem success; // required
3430 rajveer 3751
    private WarehouseServiceException wex; // required
3383 chandransh 3752
 
3753
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3754
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3383 chandransh 3755
      SUCCESS((short)0, "success"),
3756
      WEX((short)1, "wex");
3757
 
3758
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3759
 
3760
      static {
3761
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3762
          byName.put(field.getFieldName(), field);
3763
        }
3764
      }
3765
 
3766
      /**
3767
       * Find the _Fields constant that matches fieldId, or null if its not found.
3768
       */
3769
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3770
        switch(fieldId) {
3771
          case 0: // SUCCESS
3772
            return SUCCESS;
3773
          case 1: // WEX
3774
            return WEX;
3775
          default:
3776
            return null;
3777
        }
3383 chandransh 3778
      }
3779
 
3780
      /**
3781
       * Find the _Fields constant that matches fieldId, throwing an exception
3782
       * if it is not found.
3783
       */
3784
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3785
        _Fields fields = findByThriftId(fieldId);
3786
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3787
        return fields;
3788
      }
3789
 
3790
      /**
3791
       * Find the _Fields constant that matches name, or null if its not found.
3792
       */
3793
      public static _Fields findByName(String name) {
3794
        return byName.get(name);
3795
      }
3796
 
3797
      private final short _thriftId;
3798
      private final String _fieldName;
3799
 
3800
      _Fields(short thriftId, String fieldName) {
3801
        _thriftId = thriftId;
3802
        _fieldName = fieldName;
3803
      }
3804
 
3805
      public short getThriftFieldId() {
3806
        return _thriftId;
3807
      }
3808
 
3809
      public String getFieldName() {
3810
        return _fieldName;
3811
      }
3812
    }
3813
 
3814
    // isset id assignments
3815
 
3430 rajveer 3816
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 3817
    static {
3430 rajveer 3818
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3819
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 3820
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 3821
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3822
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3823
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 3824
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createInventoryItem_result.class, metaDataMap);
3383 chandransh 3825
    }
3826
 
4496 mandeep.dh 3827
    public createInventoryItem_result() {
3383 chandransh 3828
    }
3829
 
4496 mandeep.dh 3830
    public createInventoryItem_result(
4555 mandeep.dh 3831
      InventoryItem success,
3383 chandransh 3832
      WarehouseServiceException wex)
3833
    {
3834
      this();
3835
      this.success = success;
3836
      this.wex = wex;
3837
    }
3838
 
3839
    /**
3840
     * Performs a deep copy on <i>other</i>.
3841
     */
4496 mandeep.dh 3842
    public createInventoryItem_result(createInventoryItem_result other) {
4555 mandeep.dh 3843
      if (other.isSetSuccess()) {
3844
        this.success = new InventoryItem(other.success);
3845
      }
3383 chandransh 3846
      if (other.isSetWex()) {
3847
        this.wex = new WarehouseServiceException(other.wex);
3848
      }
3849
    }
3850
 
4496 mandeep.dh 3851
    public createInventoryItem_result deepCopy() {
3852
      return new createInventoryItem_result(this);
3383 chandransh 3853
    }
3854
 
3430 rajveer 3855
    @Override
3856
    public void clear() {
4555 mandeep.dh 3857
      this.success = null;
3430 rajveer 3858
      this.wex = null;
3383 chandransh 3859
    }
3860
 
4555 mandeep.dh 3861
    public InventoryItem getSuccess() {
3383 chandransh 3862
      return this.success;
3863
    }
3864
 
4555 mandeep.dh 3865
    public void setSuccess(InventoryItem success) {
3383 chandransh 3866
      this.success = success;
3867
    }
3868
 
3869
    public void unsetSuccess() {
4555 mandeep.dh 3870
      this.success = null;
3383 chandransh 3871
    }
3872
 
3430 rajveer 3873
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
3383 chandransh 3874
    public boolean isSetSuccess() {
4555 mandeep.dh 3875
      return this.success != null;
3383 chandransh 3876
    }
3877
 
3878
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 3879
      if (!value) {
3880
        this.success = null;
3881
      }
3383 chandransh 3882
    }
3883
 
3884
    public WarehouseServiceException getWex() {
3885
      return this.wex;
3886
    }
3887
 
3430 rajveer 3888
    public void setWex(WarehouseServiceException wex) {
3383 chandransh 3889
      this.wex = wex;
3890
    }
3891
 
3892
    public void unsetWex() {
3893
      this.wex = null;
3894
    }
3895
 
3430 rajveer 3896
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3383 chandransh 3897
    public boolean isSetWex() {
3898
      return this.wex != null;
3899
    }
3900
 
3901
    public void setWexIsSet(boolean value) {
3902
      if (!value) {
3903
        this.wex = null;
3904
      }
3905
    }
3906
 
3907
    public void setFieldValue(_Fields field, Object value) {
3908
      switch (field) {
3909
      case SUCCESS:
3910
        if (value == null) {
3911
          unsetSuccess();
3912
        } else {
4555 mandeep.dh 3913
          setSuccess((InventoryItem)value);
3383 chandransh 3914
        }
3915
        break;
3916
 
3917
      case WEX:
3918
        if (value == null) {
3919
          unsetWex();
3920
        } else {
3921
          setWex((WarehouseServiceException)value);
3922
        }
3923
        break;
3924
 
3925
      }
3926
    }
3927
 
3928
    public Object getFieldValue(_Fields field) {
3929
      switch (field) {
3930
      case SUCCESS:
4555 mandeep.dh 3931
        return getSuccess();
3383 chandransh 3932
 
3933
      case WEX:
3934
        return getWex();
3935
 
3936
      }
3937
      throw new IllegalStateException();
3938
    }
3939
 
3430 rajveer 3940
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3941
    public boolean isSet(_Fields field) {
3942
      if (field == null) {
3943
        throw new IllegalArgumentException();
3944
      }
3383 chandransh 3945
 
3946
      switch (field) {
3947
      case SUCCESS:
3948
        return isSetSuccess();
3949
      case WEX:
3950
        return isSetWex();
3951
      }
3952
      throw new IllegalStateException();
3953
    }
3954
 
3955
    @Override
3956
    public boolean equals(Object that) {
3957
      if (that == null)
3958
        return false;
4496 mandeep.dh 3959
      if (that instanceof createInventoryItem_result)
3960
        return this.equals((createInventoryItem_result)that);
3383 chandransh 3961
      return false;
3962
    }
3963
 
4496 mandeep.dh 3964
    public boolean equals(createInventoryItem_result that) {
3383 chandransh 3965
      if (that == null)
3966
        return false;
3967
 
4555 mandeep.dh 3968
      boolean this_present_success = true && this.isSetSuccess();
3969
      boolean that_present_success = true && that.isSetSuccess();
3383 chandransh 3970
      if (this_present_success || that_present_success) {
3971
        if (!(this_present_success && that_present_success))
3972
          return false;
4555 mandeep.dh 3973
        if (!this.success.equals(that.success))
3383 chandransh 3974
          return false;
3975
      }
3976
 
3977
      boolean this_present_wex = true && this.isSetWex();
3978
      boolean that_present_wex = true && that.isSetWex();
3979
      if (this_present_wex || that_present_wex) {
3980
        if (!(this_present_wex && that_present_wex))
3981
          return false;
3982
        if (!this.wex.equals(that.wex))
3983
          return false;
3984
      }
3985
 
3986
      return true;
3987
    }
3988
 
3989
    @Override
3990
    public int hashCode() {
3991
      return 0;
3992
    }
3993
 
4496 mandeep.dh 3994
    public int compareTo(createInventoryItem_result other) {
3383 chandransh 3995
      if (!getClass().equals(other.getClass())) {
3996
        return getClass().getName().compareTo(other.getClass().getName());
3997
      }
3998
 
3999
      int lastComparison = 0;
4496 mandeep.dh 4000
      createInventoryItem_result typedOther = (createInventoryItem_result)other;
3383 chandransh 4001
 
3430 rajveer 4002
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3383 chandransh 4003
      if (lastComparison != 0) {
4004
        return lastComparison;
4005
      }
3430 rajveer 4006
      if (isSetSuccess()) {
4007
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4008
        if (lastComparison != 0) {
4009
          return lastComparison;
4010
        }
3383 chandransh 4011
      }
3430 rajveer 4012
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
3383 chandransh 4013
      if (lastComparison != 0) {
4014
        return lastComparison;
4015
      }
3430 rajveer 4016
      if (isSetWex()) {
4017
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
4018
        if (lastComparison != 0) {
4019
          return lastComparison;
4020
        }
3383 chandransh 4021
      }
4022
      return 0;
4023
    }
4024
 
3430 rajveer 4025
    public _Fields fieldForId(int fieldId) {
4026
      return _Fields.findByThriftId(fieldId);
4027
    }
4028
 
4029
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4030
      org.apache.thrift.protocol.TField field;
3383 chandransh 4031
      iprot.readStructBegin();
4032
      while (true)
4033
      {
4034
        field = iprot.readFieldBegin();
3430 rajveer 4035
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 4036
          break;
4037
        }
3430 rajveer 4038
        switch (field.id) {
4039
          case 0: // SUCCESS
4555 mandeep.dh 4040
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4041
              this.success = new InventoryItem();
4042
              this.success.read(iprot);
3430 rajveer 4043
            } else { 
4044
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4045
            }
4046
            break;
4047
          case 1: // WEX
4048
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4049
              this.wex = new WarehouseServiceException();
4050
              this.wex.read(iprot);
4051
            } else { 
4052
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4053
            }
4054
            break;
4055
          default:
4056
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 4057
        }
3430 rajveer 4058
        iprot.readFieldEnd();
3383 chandransh 4059
      }
4060
      iprot.readStructEnd();
4061
      validate();
4062
    }
4063
 
3430 rajveer 4064
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 4065
      oprot.writeStructBegin(STRUCT_DESC);
4066
 
4067
      if (this.isSetSuccess()) {
4068
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 4069
        this.success.write(oprot);
3383 chandransh 4070
        oprot.writeFieldEnd();
4071
      } else if (this.isSetWex()) {
4072
        oprot.writeFieldBegin(WEX_FIELD_DESC);
4073
        this.wex.write(oprot);
4074
        oprot.writeFieldEnd();
4075
      }
4076
      oprot.writeFieldStop();
4077
      oprot.writeStructEnd();
4078
    }
4079
 
4080
    @Override
4081
    public String toString() {
4496 mandeep.dh 4082
      StringBuilder sb = new StringBuilder("createInventoryItem_result(");
3383 chandransh 4083
      boolean first = true;
4084
 
4085
      sb.append("success:");
4555 mandeep.dh 4086
      if (this.success == null) {
4087
        sb.append("null");
4088
      } else {
4089
        sb.append(this.success);
4090
      }
3383 chandransh 4091
      first = false;
4092
      if (!first) sb.append(", ");
4093
      sb.append("wex:");
4094
      if (this.wex == null) {
4095
        sb.append("null");
4096
      } else {
4097
        sb.append(this.wex);
4098
      }
4099
      first = false;
4100
      sb.append(")");
4101
      return sb.toString();
4102
    }
4103
 
3430 rajveer 4104
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 4105
      // check for required fields
4106
    }
4107
 
3430 rajveer 4108
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4109
      try {
4110
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4111
      } catch (org.apache.thrift.TException te) {
4112
        throw new java.io.IOException(te);
4113
      }
4114
    }
4115
 
4116
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4117
      try {
4118
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4119
      } catch (org.apache.thrift.TException te) {
4120
        throw new java.io.IOException(te);
4121
      }
4122
    }
4123
 
3383 chandransh 4124
  }
4125
 
4496 mandeep.dh 4126
  public static class getInventoryItem_args implements org.apache.thrift.TBase<getInventoryItem_args, getInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
4127
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_args");
2832 chandransh 4128
 
4496 mandeep.dh 4129
    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 4130
 
4496 mandeep.dh 4131
    private String serialNumber; // required
2832 chandransh 4132
 
4133
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4134
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 4135
      SERIAL_NUMBER((short)1, "serialNumber");
2832 chandransh 4136
 
4137
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4138
 
4139
      static {
4140
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4141
          byName.put(field.getFieldName(), field);
4142
        }
4143
      }
4144
 
4145
      /**
4146
       * Find the _Fields constant that matches fieldId, or null if its not found.
4147
       */
4148
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4149
        switch(fieldId) {
4496 mandeep.dh 4150
          case 1: // SERIAL_NUMBER
4151
            return SERIAL_NUMBER;
3430 rajveer 4152
          default:
4153
            return null;
4154
        }
2832 chandransh 4155
      }
4156
 
4157
      /**
4158
       * Find the _Fields constant that matches fieldId, throwing an exception
4159
       * if it is not found.
4160
       */
4161
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4162
        _Fields fields = findByThriftId(fieldId);
4163
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4164
        return fields;
4165
      }
4166
 
4167
      /**
4168
       * Find the _Fields constant that matches name, or null if its not found.
4169
       */
4170
      public static _Fields findByName(String name) {
4171
        return byName.get(name);
4172
      }
4173
 
4174
      private final short _thriftId;
4175
      private final String _fieldName;
4176
 
4177
      _Fields(short thriftId, String fieldName) {
4178
        _thriftId = thriftId;
4179
        _fieldName = fieldName;
4180
      }
4181
 
4182
      public short getThriftFieldId() {
4183
        return _thriftId;
4184
      }
4185
 
4186
      public String getFieldName() {
4187
        return _fieldName;
4188
      }
4189
    }
4190
 
4191
    // isset id assignments
4192
 
3430 rajveer 4193
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 4194
    static {
3430 rajveer 4195
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 4196
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4197
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 4198
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4199
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_args.class, metaDataMap);
2832 chandransh 4200
    }
4201
 
4496 mandeep.dh 4202
    public getInventoryItem_args() {
2832 chandransh 4203
    }
4204
 
4496 mandeep.dh 4205
    public getInventoryItem_args(
4206
      String serialNumber)
2832 chandransh 4207
    {
4208
      this();
4496 mandeep.dh 4209
      this.serialNumber = serialNumber;
2832 chandransh 4210
    }
4211
 
4212
    /**
4213
     * Performs a deep copy on <i>other</i>.
4214
     */
4496 mandeep.dh 4215
    public getInventoryItem_args(getInventoryItem_args other) {
4216
      if (other.isSetSerialNumber()) {
4217
        this.serialNumber = other.serialNumber;
4218
      }
2832 chandransh 4219
    }
4220
 
4496 mandeep.dh 4221
    public getInventoryItem_args deepCopy() {
4222
      return new getInventoryItem_args(this);
2832 chandransh 4223
    }
4224
 
3430 rajveer 4225
    @Override
4226
    public void clear() {
4496 mandeep.dh 4227
      this.serialNumber = null;
2832 chandransh 4228
    }
4229
 
4496 mandeep.dh 4230
    public String getSerialNumber() {
4231
      return this.serialNumber;
2832 chandransh 4232
    }
4233
 
4496 mandeep.dh 4234
    public void setSerialNumber(String serialNumber) {
4235
      this.serialNumber = serialNumber;
2832 chandransh 4236
    }
4237
 
4496 mandeep.dh 4238
    public void unsetSerialNumber() {
4239
      this.serialNumber = null;
2832 chandransh 4240
    }
4241
 
4496 mandeep.dh 4242
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
4243
    public boolean isSetSerialNumber() {
4244
      return this.serialNumber != null;
2832 chandransh 4245
    }
4246
 
4496 mandeep.dh 4247
    public void setSerialNumberIsSet(boolean value) {
4248
      if (!value) {
4249
        this.serialNumber = null;
4250
      }
2832 chandransh 4251
    }
4252
 
4253
    public void setFieldValue(_Fields field, Object value) {
4254
      switch (field) {
4496 mandeep.dh 4255
      case SERIAL_NUMBER:
2832 chandransh 4256
        if (value == null) {
4496 mandeep.dh 4257
          unsetSerialNumber();
2832 chandransh 4258
        } else {
4496 mandeep.dh 4259
          setSerialNumber((String)value);
2832 chandransh 4260
        }
4261
        break;
4262
 
4263
      }
4264
    }
4265
 
4266
    public Object getFieldValue(_Fields field) {
4267
      switch (field) {
4496 mandeep.dh 4268
      case SERIAL_NUMBER:
4269
        return getSerialNumber();
2832 chandransh 4270
 
4271
      }
4272
      throw new IllegalStateException();
4273
    }
4274
 
3430 rajveer 4275
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4276
    public boolean isSet(_Fields field) {
4277
      if (field == null) {
4278
        throw new IllegalArgumentException();
4279
      }
2832 chandransh 4280
 
4281
      switch (field) {
4496 mandeep.dh 4282
      case SERIAL_NUMBER:
4283
        return isSetSerialNumber();
2832 chandransh 4284
      }
4285
      throw new IllegalStateException();
4286
    }
4287
 
4288
    @Override
4289
    public boolean equals(Object that) {
4290
      if (that == null)
4291
        return false;
4496 mandeep.dh 4292
      if (that instanceof getInventoryItem_args)
4293
        return this.equals((getInventoryItem_args)that);
2832 chandransh 4294
      return false;
4295
    }
4296
 
4496 mandeep.dh 4297
    public boolean equals(getInventoryItem_args that) {
2832 chandransh 4298
      if (that == null)
4299
        return false;
4300
 
4496 mandeep.dh 4301
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
4302
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
4303
      if (this_present_serialNumber || that_present_serialNumber) {
4304
        if (!(this_present_serialNumber && that_present_serialNumber))
2832 chandransh 4305
          return false;
4496 mandeep.dh 4306
        if (!this.serialNumber.equals(that.serialNumber))
2832 chandransh 4307
          return false;
4308
      }
4309
 
4310
      return true;
4311
    }
4312
 
4313
    @Override
4314
    public int hashCode() {
4315
      return 0;
4316
    }
4317
 
4496 mandeep.dh 4318
    public int compareTo(getInventoryItem_args other) {
2832 chandransh 4319
      if (!getClass().equals(other.getClass())) {
4320
        return getClass().getName().compareTo(other.getClass().getName());
4321
      }
4322
 
4323
      int lastComparison = 0;
4496 mandeep.dh 4324
      getInventoryItem_args typedOther = (getInventoryItem_args)other;
2832 chandransh 4325
 
4496 mandeep.dh 4326
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2832 chandransh 4327
      if (lastComparison != 0) {
4328
        return lastComparison;
4329
      }
4496 mandeep.dh 4330
      if (isSetSerialNumber()) {
4331
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 4332
        if (lastComparison != 0) {
4333
          return lastComparison;
4334
        }
2832 chandransh 4335
      }
4336
      return 0;
4337
    }
4338
 
3430 rajveer 4339
    public _Fields fieldForId(int fieldId) {
4340
      return _Fields.findByThriftId(fieldId);
4341
    }
4342
 
4343
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4344
      org.apache.thrift.protocol.TField field;
2832 chandransh 4345
      iprot.readStructBegin();
4346
      while (true)
4347
      {
4348
        field = iprot.readFieldBegin();
3430 rajveer 4349
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 4350
          break;
4351
        }
3430 rajveer 4352
        switch (field.id) {
4496 mandeep.dh 4353
          case 1: // SERIAL_NUMBER
4354
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
4355
              this.serialNumber = iprot.readString();
3430 rajveer 4356
            } else { 
4357
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4358
            }
4359
            break;
4360
          default:
4361
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 4362
        }
3430 rajveer 4363
        iprot.readFieldEnd();
2832 chandransh 4364
      }
4365
      iprot.readStructEnd();
4366
      validate();
4367
    }
4368
 
3430 rajveer 4369
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 4370
      validate();
4371
 
4372
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 4373
      if (this.serialNumber != null) {
4374
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
4375
        oprot.writeString(this.serialNumber);
4376
        oprot.writeFieldEnd();
4377
      }
2832 chandransh 4378
      oprot.writeFieldStop();
4379
      oprot.writeStructEnd();
4380
    }
4381
 
4382
    @Override
4383
    public String toString() {
4496 mandeep.dh 4384
      StringBuilder sb = new StringBuilder("getInventoryItem_args(");
2832 chandransh 4385
      boolean first = true;
4386
 
4496 mandeep.dh 4387
      sb.append("serialNumber:");
4388
      if (this.serialNumber == null) {
4389
        sb.append("null");
4390
      } else {
4391
        sb.append(this.serialNumber);
4392
      }
2832 chandransh 4393
      first = false;
4394
      sb.append(")");
4395
      return sb.toString();
4396
    }
4397
 
3430 rajveer 4398
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 4399
      // check for required fields
4400
    }
4401
 
3430 rajveer 4402
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4403
      try {
4404
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4405
      } catch (org.apache.thrift.TException te) {
4406
        throw new java.io.IOException(te);
4407
      }
4408
    }
4409
 
4410
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4411
      try {
4412
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4413
      } catch (org.apache.thrift.TException te) {
4414
        throw new java.io.IOException(te);
4415
      }
4416
    }
4417
 
2832 chandransh 4418
  }
4419
 
4496 mandeep.dh 4420
  public static class getInventoryItem_result implements org.apache.thrift.TBase<getInventoryItem_result, getInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
4421
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItem_result");
2832 chandransh 4422
 
3430 rajveer 4423
    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 4424
    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 4425
 
4496 mandeep.dh 4426
    private InventoryItem success; // required
4541 mandeep.dh 4427
    private WarehouseServiceException wex; // required
2832 chandransh 4428
 
4429
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4430
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4541 mandeep.dh 4431
      SUCCESS((short)0, "success"),
4432
      WEX((short)1, "wex");
2832 chandransh 4433
 
4434
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4435
 
4436
      static {
4437
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4438
          byName.put(field.getFieldName(), field);
4439
        }
4440
      }
4441
 
4442
      /**
4443
       * Find the _Fields constant that matches fieldId, or null if its not found.
4444
       */
4445
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4446
        switch(fieldId) {
4447
          case 0: // SUCCESS
4448
            return SUCCESS;
4541 mandeep.dh 4449
          case 1: // WEX
4450
            return WEX;
3430 rajveer 4451
          default:
4452
            return null;
4453
        }
2832 chandransh 4454
      }
4455
 
4456
      /**
4457
       * Find the _Fields constant that matches fieldId, throwing an exception
4458
       * if it is not found.
4459
       */
4460
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4461
        _Fields fields = findByThriftId(fieldId);
4462
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4463
        return fields;
4464
      }
4465
 
4466
      /**
4467
       * Find the _Fields constant that matches name, or null if its not found.
4468
       */
4469
      public static _Fields findByName(String name) {
4470
        return byName.get(name);
4471
      }
4472
 
4473
      private final short _thriftId;
4474
      private final String _fieldName;
4475
 
4476
      _Fields(short thriftId, String fieldName) {
4477
        _thriftId = thriftId;
4478
        _fieldName = fieldName;
4479
      }
4480
 
4481
      public short getThriftFieldId() {
4482
        return _thriftId;
4483
      }
4484
 
4485
      public String getFieldName() {
4486
        return _fieldName;
4487
      }
4488
    }
4489
 
4490
    // isset id assignments
4491
 
3430 rajveer 4492
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2832 chandransh 4493
    static {
3430 rajveer 4494
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4495
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 4496
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4541 mandeep.dh 4497
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4498
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 4499
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 4500
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItem_result.class, metaDataMap);
2832 chandransh 4501
    }
4502
 
4496 mandeep.dh 4503
    public getInventoryItem_result() {
2832 chandransh 4504
    }
4505
 
4496 mandeep.dh 4506
    public getInventoryItem_result(
4541 mandeep.dh 4507
      InventoryItem success,
4508
      WarehouseServiceException wex)
2832 chandransh 4509
    {
4510
      this();
4511
      this.success = success;
4541 mandeep.dh 4512
      this.wex = wex;
2832 chandransh 4513
    }
4514
 
4515
    /**
4516
     * Performs a deep copy on <i>other</i>.
4517
     */
4496 mandeep.dh 4518
    public getInventoryItem_result(getInventoryItem_result other) {
2832 chandransh 4519
      if (other.isSetSuccess()) {
4496 mandeep.dh 4520
        this.success = new InventoryItem(other.success);
2832 chandransh 4521
      }
4541 mandeep.dh 4522
      if (other.isSetWex()) {
4523
        this.wex = new WarehouseServiceException(other.wex);
4524
      }
2832 chandransh 4525
    }
4526
 
4496 mandeep.dh 4527
    public getInventoryItem_result deepCopy() {
4528
      return new getInventoryItem_result(this);
2832 chandransh 4529
    }
4530
 
3430 rajveer 4531
    @Override
4532
    public void clear() {
4533
      this.success = null;
4541 mandeep.dh 4534
      this.wex = null;
2832 chandransh 4535
    }
4536
 
4496 mandeep.dh 4537
    public InventoryItem getSuccess() {
2832 chandransh 4538
      return this.success;
4539
    }
4540
 
4496 mandeep.dh 4541
    public void setSuccess(InventoryItem success) {
2832 chandransh 4542
      this.success = success;
4543
    }
4544
 
4545
    public void unsetSuccess() {
4546
      this.success = null;
4547
    }
4548
 
3430 rajveer 4549
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2832 chandransh 4550
    public boolean isSetSuccess() {
4551
      return this.success != null;
4552
    }
4553
 
4554
    public void setSuccessIsSet(boolean value) {
4555
      if (!value) {
4556
        this.success = null;
4557
      }
4558
    }
4559
 
4541 mandeep.dh 4560
    public WarehouseServiceException getWex() {
4561
      return this.wex;
4562
    }
4563
 
4564
    public void setWex(WarehouseServiceException wex) {
4565
      this.wex = wex;
4566
    }
4567
 
4568
    public void unsetWex() {
4569
      this.wex = null;
4570
    }
4571
 
4572
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
4573
    public boolean isSetWex() {
4574
      return this.wex != null;
4575
    }
4576
 
4577
    public void setWexIsSet(boolean value) {
4578
      if (!value) {
4579
        this.wex = null;
4580
      }
4581
    }
4582
 
2832 chandransh 4583
    public void setFieldValue(_Fields field, Object value) {
4584
      switch (field) {
4585
      case SUCCESS:
4586
        if (value == null) {
4587
          unsetSuccess();
4588
        } else {
4496 mandeep.dh 4589
          setSuccess((InventoryItem)value);
2832 chandransh 4590
        }
4591
        break;
4592
 
4541 mandeep.dh 4593
      case WEX:
4594
        if (value == null) {
4595
          unsetWex();
4596
        } else {
4597
          setWex((WarehouseServiceException)value);
4598
        }
4599
        break;
4600
 
2832 chandransh 4601
      }
4602
    }
4603
 
4604
    public Object getFieldValue(_Fields field) {
4605
      switch (field) {
4606
      case SUCCESS:
4607
        return getSuccess();
4608
 
4541 mandeep.dh 4609
      case WEX:
4610
        return getWex();
4611
 
2832 chandransh 4612
      }
4613
      throw new IllegalStateException();
4614
    }
4615
 
3430 rajveer 4616
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4617
    public boolean isSet(_Fields field) {
4618
      if (field == null) {
4619
        throw new IllegalArgumentException();
4620
      }
2832 chandransh 4621
 
4622
      switch (field) {
4623
      case SUCCESS:
4624
        return isSetSuccess();
4541 mandeep.dh 4625
      case WEX:
4626
        return isSetWex();
2832 chandransh 4627
      }
4628
      throw new IllegalStateException();
4629
    }
4630
 
4631
    @Override
4632
    public boolean equals(Object that) {
4633
      if (that == null)
4634
        return false;
4496 mandeep.dh 4635
      if (that instanceof getInventoryItem_result)
4636
        return this.equals((getInventoryItem_result)that);
2832 chandransh 4637
      return false;
4638
    }
4639
 
4496 mandeep.dh 4640
    public boolean equals(getInventoryItem_result that) {
2832 chandransh 4641
      if (that == null)
4642
        return false;
4643
 
4644
      boolean this_present_success = true && this.isSetSuccess();
4645
      boolean that_present_success = true && that.isSetSuccess();
4646
      if (this_present_success || that_present_success) {
4647
        if (!(this_present_success && that_present_success))
4648
          return false;
4649
        if (!this.success.equals(that.success))
4650
          return false;
4651
      }
4652
 
4541 mandeep.dh 4653
      boolean this_present_wex = true && this.isSetWex();
4654
      boolean that_present_wex = true && that.isSetWex();
4655
      if (this_present_wex || that_present_wex) {
4656
        if (!(this_present_wex && that_present_wex))
4657
          return false;
4658
        if (!this.wex.equals(that.wex))
4659
          return false;
4660
      }
4661
 
2832 chandransh 4662
      return true;
4663
    }
4664
 
4665
    @Override
4666
    public int hashCode() {
4667
      return 0;
4668
    }
4669
 
4496 mandeep.dh 4670
    public int compareTo(getInventoryItem_result other) {
2832 chandransh 4671
      if (!getClass().equals(other.getClass())) {
4672
        return getClass().getName().compareTo(other.getClass().getName());
4673
      }
4674
 
4675
      int lastComparison = 0;
4496 mandeep.dh 4676
      getInventoryItem_result typedOther = (getInventoryItem_result)other;
2832 chandransh 4677
 
3430 rajveer 4678
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2832 chandransh 4679
      if (lastComparison != 0) {
4680
        return lastComparison;
4681
      }
3430 rajveer 4682
      if (isSetSuccess()) {
4683
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4684
        if (lastComparison != 0) {
4685
          return lastComparison;
4686
        }
2832 chandransh 4687
      }
4541 mandeep.dh 4688
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
4689
      if (lastComparison != 0) {
4690
        return lastComparison;
4691
      }
4692
      if (isSetWex()) {
4693
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
4694
        if (lastComparison != 0) {
4695
          return lastComparison;
4696
        }
4697
      }
2832 chandransh 4698
      return 0;
4699
    }
4700
 
3430 rajveer 4701
    public _Fields fieldForId(int fieldId) {
4702
      return _Fields.findByThriftId(fieldId);
4703
    }
4704
 
4705
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4706
      org.apache.thrift.protocol.TField field;
2832 chandransh 4707
      iprot.readStructBegin();
4708
      while (true)
4709
      {
4710
        field = iprot.readFieldBegin();
3430 rajveer 4711
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2832 chandransh 4712
          break;
4713
        }
3430 rajveer 4714
        switch (field.id) {
4715
          case 0: // SUCCESS
4716
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4496 mandeep.dh 4717
              this.success = new InventoryItem();
3430 rajveer 4718
              this.success.read(iprot);
4719
            } else { 
4720
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4721
            }
4722
            break;
4541 mandeep.dh 4723
          case 1: // WEX
4724
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4725
              this.wex = new WarehouseServiceException();
4726
              this.wex.read(iprot);
4727
            } else { 
4728
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4729
            }
4730
            break;
3430 rajveer 4731
          default:
4732
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2832 chandransh 4733
        }
3430 rajveer 4734
        iprot.readFieldEnd();
2832 chandransh 4735
      }
4736
      iprot.readStructEnd();
4737
      validate();
4738
    }
4739
 
3430 rajveer 4740
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2832 chandransh 4741
      oprot.writeStructBegin(STRUCT_DESC);
4742
 
4743
      if (this.isSetSuccess()) {
4744
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4745
        this.success.write(oprot);
4746
        oprot.writeFieldEnd();
4541 mandeep.dh 4747
      } else if (this.isSetWex()) {
4748
        oprot.writeFieldBegin(WEX_FIELD_DESC);
4749
        this.wex.write(oprot);
4750
        oprot.writeFieldEnd();
2832 chandransh 4751
      }
4752
      oprot.writeFieldStop();
4753
      oprot.writeStructEnd();
4754
    }
4755
 
4756
    @Override
4757
    public String toString() {
4496 mandeep.dh 4758
      StringBuilder sb = new StringBuilder("getInventoryItem_result(");
2832 chandransh 4759
      boolean first = true;
4760
 
4761
      sb.append("success:");
4762
      if (this.success == null) {
4763
        sb.append("null");
4764
      } else {
4765
        sb.append(this.success);
4766
      }
4767
      first = false;
4541 mandeep.dh 4768
      if (!first) sb.append(", ");
4769
      sb.append("wex:");
4770
      if (this.wex == null) {
4771
        sb.append("null");
4772
      } else {
4773
        sb.append(this.wex);
4774
      }
4775
      first = false;
2832 chandransh 4776
      sb.append(")");
4777
      return sb.toString();
4778
    }
4779
 
3430 rajveer 4780
    public void validate() throws org.apache.thrift.TException {
2832 chandransh 4781
      // check for required fields
4782
    }
4783
 
3430 rajveer 4784
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4785
      try {
4786
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4787
      } catch (org.apache.thrift.TException te) {
4788
        throw new java.io.IOException(te);
4789
      }
4790
    }
4791
 
4792
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4793
      try {
4794
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4795
      } catch (org.apache.thrift.TException te) {
4796
        throw new java.io.IOException(te);
4797
      }
4798
    }
4799
 
2832 chandransh 4800
  }
4801
 
5361 mandeep.dh 4802
  public static class getNonSeralizedInventoryItem_args implements org.apache.thrift.TBase<getNonSeralizedInventoryItem_args, getNonSeralizedInventoryItem_args._Fields>, java.io.Serializable, Cloneable   {
4803
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItem_args");
2820 chandransh 4804
 
4496 mandeep.dh 4805
    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 4806
    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 4807
 
4496 mandeep.dh 4808
    private long itemId; // required
5361 mandeep.dh 4809
    private long warehouseId; // required
2820 chandransh 4810
 
4811
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4812
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 4813
      ITEM_ID((short)1, "itemId"),
5361 mandeep.dh 4814
      WAREHOUSE_ID((short)2, "warehouseId");
2820 chandransh 4815
 
4816
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4817
 
4818
      static {
4819
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4820
          byName.put(field.getFieldName(), field);
4821
        }
4822
      }
4823
 
4824
      /**
4825
       * Find the _Fields constant that matches fieldId, or null if its not found.
4826
       */
4827
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4828
        switch(fieldId) {
4496 mandeep.dh 4829
          case 1: // ITEM_ID
4830
            return ITEM_ID;
5361 mandeep.dh 4831
          case 2: // WAREHOUSE_ID
4832
            return WAREHOUSE_ID;
3430 rajveer 4833
          default:
4834
            return null;
4835
        }
2820 chandransh 4836
      }
4837
 
4838
      /**
4839
       * Find the _Fields constant that matches fieldId, throwing an exception
4840
       * if it is not found.
4841
       */
4842
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4843
        _Fields fields = findByThriftId(fieldId);
4844
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4845
        return fields;
4846
      }
4847
 
4848
      /**
4849
       * Find the _Fields constant that matches name, or null if its not found.
4850
       */
4851
      public static _Fields findByName(String name) {
4852
        return byName.get(name);
4853
      }
4854
 
4855
      private final short _thriftId;
4856
      private final String _fieldName;
4857
 
4858
      _Fields(short thriftId, String fieldName) {
4859
        _thriftId = thriftId;
4860
        _fieldName = fieldName;
4861
      }
4862
 
4863
      public short getThriftFieldId() {
4864
        return _thriftId;
4865
      }
4866
 
4867
      public String getFieldName() {
4868
        return _fieldName;
4869
      }
4870
    }
4871
 
4872
    // isset id assignments
4496 mandeep.dh 4873
    private static final int __ITEMID_ISSET_ID = 0;
5361 mandeep.dh 4874
    private static final int __WAREHOUSEID_ISSET_ID = 1;
4875
    private BitSet __isset_bit_vector = new BitSet(2);
2820 chandransh 4876
 
3430 rajveer 4877
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 4878
    static {
3430 rajveer 4879
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 4880
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3430 rajveer 4881
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 4882
      tmpMap.put(_Fields.WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("warehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 4883
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 4884
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5361 mandeep.dh 4885
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItem_args.class, metaDataMap);
2820 chandransh 4886
    }
4887
 
5361 mandeep.dh 4888
    public getNonSeralizedInventoryItem_args() {
2820 chandransh 4889
    }
4890
 
5361 mandeep.dh 4891
    public getNonSeralizedInventoryItem_args(
4496 mandeep.dh 4892
      long itemId,
5361 mandeep.dh 4893
      long warehouseId)
2820 chandransh 4894
    {
4895
      this();
4496 mandeep.dh 4896
      this.itemId = itemId;
4897
      setItemIdIsSet(true);
5361 mandeep.dh 4898
      this.warehouseId = warehouseId;
4899
      setWarehouseIdIsSet(true);
2820 chandransh 4900
    }
4901
 
4902
    /**
4903
     * Performs a deep copy on <i>other</i>.
4904
     */
5361 mandeep.dh 4905
    public getNonSeralizedInventoryItem_args(getNonSeralizedInventoryItem_args other) {
2820 chandransh 4906
      __isset_bit_vector.clear();
4907
      __isset_bit_vector.or(other.__isset_bit_vector);
4496 mandeep.dh 4908
      this.itemId = other.itemId;
5361 mandeep.dh 4909
      this.warehouseId = other.warehouseId;
2820 chandransh 4910
    }
4911
 
5361 mandeep.dh 4912
    public getNonSeralizedInventoryItem_args deepCopy() {
4913
      return new getNonSeralizedInventoryItem_args(this);
2820 chandransh 4914
    }
4915
 
3430 rajveer 4916
    @Override
4917
    public void clear() {
4496 mandeep.dh 4918
      setItemIdIsSet(false);
4919
      this.itemId = 0;
5361 mandeep.dh 4920
      setWarehouseIdIsSet(false);
4921
      this.warehouseId = 0;
2820 chandransh 4922
    }
4923
 
4496 mandeep.dh 4924
    public long getItemId() {
4925
      return this.itemId;
2820 chandransh 4926
    }
4927
 
4496 mandeep.dh 4928
    public void setItemId(long itemId) {
4929
      this.itemId = itemId;
4930
      setItemIdIsSet(true);
2820 chandransh 4931
    }
4932
 
4496 mandeep.dh 4933
    public void unsetItemId() {
4934
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
2820 chandransh 4935
    }
4936
 
4496 mandeep.dh 4937
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
4938
    public boolean isSetItemId() {
4939
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
2820 chandransh 4940
    }
4941
 
4496 mandeep.dh 4942
    public void setItemIdIsSet(boolean value) {
4943
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
2820 chandransh 4944
    }
4945
 
5361 mandeep.dh 4946
    public long getWarehouseId() {
4947
      return this.warehouseId;
2820 chandransh 4948
    }
4949
 
5361 mandeep.dh 4950
    public void setWarehouseId(long warehouseId) {
4951
      this.warehouseId = warehouseId;
4952
      setWarehouseIdIsSet(true);
2820 chandransh 4953
    }
4954
 
5361 mandeep.dh 4955
    public void unsetWarehouseId() {
4956
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
2820 chandransh 4957
    }
4958
 
5361 mandeep.dh 4959
    /** Returns true if field warehouseId is set (has been assigned a value) and false otherwise */
4960
    public boolean isSetWarehouseId() {
4961
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
2820 chandransh 4962
    }
4963
 
5361 mandeep.dh 4964
    public void setWarehouseIdIsSet(boolean value) {
4965
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
2820 chandransh 4966
    }
4967
 
4968
    public void setFieldValue(_Fields field, Object value) {
4969
      switch (field) {
4496 mandeep.dh 4970
      case ITEM_ID:
2820 chandransh 4971
        if (value == null) {
4496 mandeep.dh 4972
          unsetItemId();
2820 chandransh 4973
        } else {
4496 mandeep.dh 4974
          setItemId((Long)value);
2820 chandransh 4975
        }
4976
        break;
4977
 
5361 mandeep.dh 4978
      case WAREHOUSE_ID:
2820 chandransh 4979
        if (value == null) {
5361 mandeep.dh 4980
          unsetWarehouseId();
2820 chandransh 4981
        } else {
5361 mandeep.dh 4982
          setWarehouseId((Long)value);
2820 chandransh 4983
        }
4984
        break;
4985
 
4986
      }
4987
    }
4988
 
4989
    public Object getFieldValue(_Fields field) {
4990
      switch (field) {
4496 mandeep.dh 4991
      case ITEM_ID:
4992
        return Long.valueOf(getItemId());
2820 chandransh 4993
 
5361 mandeep.dh 4994
      case WAREHOUSE_ID:
4995
        return Long.valueOf(getWarehouseId());
2820 chandransh 4996
 
4997
      }
4998
      throw new IllegalStateException();
4999
    }
5000
 
3430 rajveer 5001
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5002
    public boolean isSet(_Fields field) {
5003
      if (field == null) {
5004
        throw new IllegalArgumentException();
5005
      }
2820 chandransh 5006
 
5007
      switch (field) {
4496 mandeep.dh 5008
      case ITEM_ID:
5009
        return isSetItemId();
5361 mandeep.dh 5010
      case WAREHOUSE_ID:
5011
        return isSetWarehouseId();
2820 chandransh 5012
      }
5013
      throw new IllegalStateException();
5014
    }
5015
 
5016
    @Override
5017
    public boolean equals(Object that) {
5018
      if (that == null)
5019
        return false;
5361 mandeep.dh 5020
      if (that instanceof getNonSeralizedInventoryItem_args)
5021
        return this.equals((getNonSeralizedInventoryItem_args)that);
2820 chandransh 5022
      return false;
5023
    }
5024
 
5361 mandeep.dh 5025
    public boolean equals(getNonSeralizedInventoryItem_args that) {
2820 chandransh 5026
      if (that == null)
5027
        return false;
5028
 
4496 mandeep.dh 5029
      boolean this_present_itemId = true;
5030
      boolean that_present_itemId = true;
5031
      if (this_present_itemId || that_present_itemId) {
5032
        if (!(this_present_itemId && that_present_itemId))
2820 chandransh 5033
          return false;
4496 mandeep.dh 5034
        if (this.itemId != that.itemId)
2820 chandransh 5035
          return false;
5036
      }
5037
 
5361 mandeep.dh 5038
      boolean this_present_warehouseId = true;
5039
      boolean that_present_warehouseId = true;
5040
      if (this_present_warehouseId || that_present_warehouseId) {
5041
        if (!(this_present_warehouseId && that_present_warehouseId))
2820 chandransh 5042
          return false;
5361 mandeep.dh 5043
        if (this.warehouseId != that.warehouseId)
2820 chandransh 5044
          return false;
5045
      }
5046
 
5047
      return true;
5048
    }
5049
 
5050
    @Override
5051
    public int hashCode() {
5052
      return 0;
5053
    }
5054
 
5361 mandeep.dh 5055
    public int compareTo(getNonSeralizedInventoryItem_args other) {
2820 chandransh 5056
      if (!getClass().equals(other.getClass())) {
5057
        return getClass().getName().compareTo(other.getClass().getName());
5058
      }
5059
 
5060
      int lastComparison = 0;
5361 mandeep.dh 5061
      getNonSeralizedInventoryItem_args typedOther = (getNonSeralizedInventoryItem_args)other;
2820 chandransh 5062
 
4496 mandeep.dh 5063
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
2820 chandransh 5064
      if (lastComparison != 0) {
5065
        return lastComparison;
5066
      }
4496 mandeep.dh 5067
      if (isSetItemId()) {
5068
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
3430 rajveer 5069
        if (lastComparison != 0) {
5070
          return lastComparison;
5071
        }
2820 chandransh 5072
      }
5361 mandeep.dh 5073
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(typedOther.isSetWarehouseId());
2820 chandransh 5074
      if (lastComparison != 0) {
5075
        return lastComparison;
5076
      }
5361 mandeep.dh 5077
      if (isSetWarehouseId()) {
5078
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.warehouseId, typedOther.warehouseId);
3430 rajveer 5079
        if (lastComparison != 0) {
5080
          return lastComparison;
5081
        }
2820 chandransh 5082
      }
5083
      return 0;
5084
    }
5085
 
3430 rajveer 5086
    public _Fields fieldForId(int fieldId) {
5087
      return _Fields.findByThriftId(fieldId);
5088
    }
5089
 
5090
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5091
      org.apache.thrift.protocol.TField field;
2820 chandransh 5092
      iprot.readStructBegin();
5093
      while (true)
5094
      {
5095
        field = iprot.readFieldBegin();
3430 rajveer 5096
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 5097
          break;
5098
        }
3430 rajveer 5099
        switch (field.id) {
4496 mandeep.dh 5100
          case 1: // ITEM_ID
3430 rajveer 5101
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4496 mandeep.dh 5102
              this.itemId = iprot.readI64();
5103
              setItemIdIsSet(true);
3430 rajveer 5104
            } else { 
5105
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5106
            }
5107
            break;
5361 mandeep.dh 5108
          case 2: // WAREHOUSE_ID
4496 mandeep.dh 5109
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5361 mandeep.dh 5110
              this.warehouseId = iprot.readI64();
5111
              setWarehouseIdIsSet(true);
3430 rajveer 5112
            } else { 
5113
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5114
            }
5115
            break;
5116
          default:
5117
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 5118
        }
3430 rajveer 5119
        iprot.readFieldEnd();
2820 chandransh 5120
      }
5121
      iprot.readStructEnd();
5122
      validate();
5123
    }
5124
 
3430 rajveer 5125
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 5126
      validate();
5127
 
5128
      oprot.writeStructBegin(STRUCT_DESC);
4496 mandeep.dh 5129
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
5130
      oprot.writeI64(this.itemId);
2820 chandransh 5131
      oprot.writeFieldEnd();
5361 mandeep.dh 5132
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
5133
      oprot.writeI64(this.warehouseId);
2820 chandransh 5134
      oprot.writeFieldEnd();
5135
      oprot.writeFieldStop();
5136
      oprot.writeStructEnd();
5137
    }
5138
 
5139
    @Override
5140
    public String toString() {
5361 mandeep.dh 5141
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItem_args(");
2820 chandransh 5142
      boolean first = true;
5143
 
4496 mandeep.dh 5144
      sb.append("itemId:");
5145
      sb.append(this.itemId);
2820 chandransh 5146
      first = false;
5147
      if (!first) sb.append(", ");
5361 mandeep.dh 5148
      sb.append("warehouseId:");
5149
      sb.append(this.warehouseId);
2820 chandransh 5150
      first = false;
5151
      sb.append(")");
5152
      return sb.toString();
5153
    }
5154
 
3430 rajveer 5155
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 5156
      // check for required fields
5157
    }
5158
 
3430 rajveer 5159
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5160
      try {
5161
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5162
      } catch (org.apache.thrift.TException te) {
5163
        throw new java.io.IOException(te);
5164
      }
5165
    }
5166
 
5167
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5168
      try {
4496 mandeep.dh 5169
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
5170
        __isset_bit_vector = new BitSet(1);
3430 rajveer 5171
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5172
      } catch (org.apache.thrift.TException te) {
5173
        throw new java.io.IOException(te);
5174
      }
5175
    }
5176
 
2820 chandransh 5177
  }
5178
 
5361 mandeep.dh 5179
  public static class getNonSeralizedInventoryItem_result implements org.apache.thrift.TBase<getNonSeralizedInventoryItem_result, getNonSeralizedInventoryItem_result._Fields>, java.io.Serializable, Cloneable   {
5180
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getNonSeralizedInventoryItem_result");
2820 chandransh 5181
 
5361 mandeep.dh 5182
    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);
5183
    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 5184
 
5361 mandeep.dh 5185
    private InventoryItem success; // required
5186
    private WarehouseServiceException wex; // required
2820 chandransh 5187
 
5188
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 5189
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 5190
      SUCCESS((short)0, "success"),
5191
      WEX((short)1, "wex");
2820 chandransh 5192
 
5193
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5194
 
5195
      static {
5196
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5197
          byName.put(field.getFieldName(), field);
5198
        }
5199
      }
5200
 
5201
      /**
5202
       * Find the _Fields constant that matches fieldId, or null if its not found.
5203
       */
5204
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 5205
        switch(fieldId) {
5206
          case 0: // SUCCESS
5207
            return SUCCESS;
5361 mandeep.dh 5208
          case 1: // WEX
5209
            return WEX;
3430 rajveer 5210
          default:
5211
            return null;
5212
        }
2820 chandransh 5213
      }
5214
 
5215
      /**
5216
       * Find the _Fields constant that matches fieldId, throwing an exception
5217
       * if it is not found.
5218
       */
5219
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5220
        _Fields fields = findByThriftId(fieldId);
5221
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5222
        return fields;
5223
      }
5224
 
5225
      /**
5226
       * Find the _Fields constant that matches name, or null if its not found.
5227
       */
5228
      public static _Fields findByName(String name) {
5229
        return byName.get(name);
5230
      }
5231
 
5232
      private final short _thriftId;
5233
      private final String _fieldName;
5234
 
5235
      _Fields(short thriftId, String fieldName) {
5236
        _thriftId = thriftId;
5237
        _fieldName = fieldName;
5238
      }
5239
 
5240
      public short getThriftFieldId() {
5241
        return _thriftId;
5242
      }
5243
 
5244
      public String getFieldName() {
5245
        return _fieldName;
5246
      }
5247
    }
5248
 
5249
    // isset id assignments
5250
 
3430 rajveer 5251
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 5252
    static {
3430 rajveer 5253
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5254
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5361 mandeep.dh 5255
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
5256
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5257
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3430 rajveer 5258
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5361 mandeep.dh 5259
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getNonSeralizedInventoryItem_result.class, metaDataMap);
2820 chandransh 5260
    }
5261
 
5361 mandeep.dh 5262
    public getNonSeralizedInventoryItem_result() {
2820 chandransh 5263
    }
5264
 
5361 mandeep.dh 5265
    public getNonSeralizedInventoryItem_result(
5266
      InventoryItem success,
5267
      WarehouseServiceException wex)
2820 chandransh 5268
    {
5269
      this();
5270
      this.success = success;
5361 mandeep.dh 5271
      this.wex = wex;
2820 chandransh 5272
    }
5273
 
5274
    /**
5275
     * Performs a deep copy on <i>other</i>.
5276
     */
5361 mandeep.dh 5277
    public getNonSeralizedInventoryItem_result(getNonSeralizedInventoryItem_result other) {
4496 mandeep.dh 5278
      if (other.isSetSuccess()) {
5361 mandeep.dh 5279
        this.success = new InventoryItem(other.success);
2820 chandransh 5280
      }
5361 mandeep.dh 5281
      if (other.isSetWex()) {
5282
        this.wex = new WarehouseServiceException(other.wex);
5283
      }
2820 chandransh 5284
    }
5285
 
5361 mandeep.dh 5286
    public getNonSeralizedInventoryItem_result deepCopy() {
5287
      return new getNonSeralizedInventoryItem_result(this);
2820 chandransh 5288
    }
5289
 
3430 rajveer 5290
    @Override
5291
    public void clear() {
4496 mandeep.dh 5292
      this.success = null;
5361 mandeep.dh 5293
      this.wex = null;
2820 chandransh 5294
    }
5295
 
5361 mandeep.dh 5296
    public InventoryItem getSuccess() {
2820 chandransh 5297
      return this.success;
5298
    }
5299
 
5361 mandeep.dh 5300
    public void setSuccess(InventoryItem success) {
2820 chandransh 5301
      this.success = success;
5302
    }
5303
 
5304
    public void unsetSuccess() {
4496 mandeep.dh 5305
      this.success = null;
2820 chandransh 5306
    }
5307
 
3430 rajveer 5308
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2820 chandransh 5309
    public boolean isSetSuccess() {
4496 mandeep.dh 5310
      return this.success != null;
2820 chandransh 5311
    }
5312
 
5313
    public void setSuccessIsSet(boolean value) {
4496 mandeep.dh 5314
      if (!value) {
5315
        this.success = null;
5316
      }
2820 chandransh 5317
    }
5318
 
5361 mandeep.dh 5319
    public WarehouseServiceException getWex() {
5320
      return this.wex;
2820 chandransh 5321
    }
5322
 
5361 mandeep.dh 5323
    public void setWex(WarehouseServiceException wex) {
5324
      this.wex = wex;
2820 chandransh 5325
    }
5326
 
5361 mandeep.dh 5327
    public void unsetWex() {
5328
      this.wex = null;
2820 chandransh 5329
    }
5330
 
5361 mandeep.dh 5331
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
5332
    public boolean isSetWex() {
5333
      return this.wex != null;
2820 chandransh 5334
    }
5335
 
5361 mandeep.dh 5336
    public void setWexIsSet(boolean value) {
5337
      if (!value) {
5338
        this.wex = null;
2820 chandransh 5339
      }
5340
    }
5341
 
5342
    public void setFieldValue(_Fields field, Object value) {
5343
      switch (field) {
5361 mandeep.dh 5344
      case SUCCESS:
2820 chandransh 5345
        if (value == null) {
5361 mandeep.dh 5346
          unsetSuccess();
2820 chandransh 5347
        } else {
5361 mandeep.dh 5348
          setSuccess((InventoryItem)value);
2820 chandransh 5349
        }
5350
        break;
5351
 
5361 mandeep.dh 5352
      case WEX:
2820 chandransh 5353
        if (value == null) {
5361 mandeep.dh 5354
          unsetWex();
2820 chandransh 5355
        } else {
5361 mandeep.dh 5356
          setWex((WarehouseServiceException)value);
2820 chandransh 5357
        }
5358
        break;
5359
 
5360
      }
5361
    }
5362
 
5363
    public Object getFieldValue(_Fields field) {
5364
      switch (field) {
5365
      case SUCCESS:
4496 mandeep.dh 5366
        return getSuccess();
2820 chandransh 5367
 
5361 mandeep.dh 5368
      case WEX:
5369
        return getWex();
5370
 
2820 chandransh 5371
      }
5372
      throw new IllegalStateException();
5373
    }
5374
 
3430 rajveer 5375
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5376
    public boolean isSet(_Fields field) {
5377
      if (field == null) {
5378
        throw new IllegalArgumentException();
5379
      }
2820 chandransh 5380
 
5381
      switch (field) {
5382
      case SUCCESS:
5383
        return isSetSuccess();
5361 mandeep.dh 5384
      case WEX:
5385
        return isSetWex();
2820 chandransh 5386
      }
5387
      throw new IllegalStateException();
5388
    }
5389
 
5390
    @Override
5391
    public boolean equals(Object that) {
5392
      if (that == null)
5393
        return false;
5361 mandeep.dh 5394
      if (that instanceof getNonSeralizedInventoryItem_result)
5395
        return this.equals((getNonSeralizedInventoryItem_result)that);
2820 chandransh 5396
      return false;
5397
    }
5398
 
5361 mandeep.dh 5399
    public boolean equals(getNonSeralizedInventoryItem_result that) {
2820 chandransh 5400
      if (that == null)
5401
        return false;
5402
 
4496 mandeep.dh 5403
      boolean this_present_success = true && this.isSetSuccess();
5404
      boolean that_present_success = true && that.isSetSuccess();
2820 chandransh 5405
      if (this_present_success || that_present_success) {
5406
        if (!(this_present_success && that_present_success))
5407
          return false;
4496 mandeep.dh 5408
        if (!this.success.equals(that.success))
2820 chandransh 5409
          return false;
5410
      }
5411
 
5361 mandeep.dh 5412
      boolean this_present_wex = true && this.isSetWex();
5413
      boolean that_present_wex = true && that.isSetWex();
5414
      if (this_present_wex || that_present_wex) {
5415
        if (!(this_present_wex && that_present_wex))
4496 mandeep.dh 5416
          return false;
5361 mandeep.dh 5417
        if (!this.wex.equals(that.wex))
4496 mandeep.dh 5418
          return false;
5419
      }
5420
 
5421
      return true;
5422
    }
5423
 
5424
    @Override
5425
    public int hashCode() {
5426
      return 0;
5427
    }
5428
 
5361 mandeep.dh 5429
    public int compareTo(getNonSeralizedInventoryItem_result other) {
4496 mandeep.dh 5430
      if (!getClass().equals(other.getClass())) {
5431
        return getClass().getName().compareTo(other.getClass().getName());
5432
      }
5433
 
5434
      int lastComparison = 0;
5361 mandeep.dh 5435
      getNonSeralizedInventoryItem_result typedOther = (getNonSeralizedInventoryItem_result)other;
4496 mandeep.dh 5436
 
5437
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5438
      if (lastComparison != 0) {
5439
        return lastComparison;
5440
      }
5441
      if (isSetSuccess()) {
5442
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5443
        if (lastComparison != 0) {
5444
          return lastComparison;
5445
        }
5446
      }
5361 mandeep.dh 5447
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 5448
      if (lastComparison != 0) {
5449
        return lastComparison;
5450
      }
5361 mandeep.dh 5451
      if (isSetWex()) {
5452
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
3430 rajveer 5453
        if (lastComparison != 0) {
5454
          return lastComparison;
5455
        }
2820 chandransh 5456
      }
5457
      return 0;
5458
    }
5459
 
3430 rajveer 5460
    public _Fields fieldForId(int fieldId) {
5461
      return _Fields.findByThriftId(fieldId);
5462
    }
5463
 
5464
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5465
      org.apache.thrift.protocol.TField field;
2820 chandransh 5466
      iprot.readStructBegin();
5467
      while (true)
5468
      {
5469
        field = iprot.readFieldBegin();
3430 rajveer 5470
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 5471
          break;
5472
        }
3430 rajveer 5473
        switch (field.id) {
5361 mandeep.dh 5474
          case 0: // SUCCESS
5475
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5476
              this.success = new InventoryItem();
5477
              this.success.read(iprot);
3430 rajveer 5478
            } else { 
5479
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5480
            }
5481
            break;
5361 mandeep.dh 5482
          case 1: // WEX
5483
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5484
              this.wex = new WarehouseServiceException();
5485
              this.wex.read(iprot);
4496 mandeep.dh 5486
            } else { 
5487
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5488
            }
5489
            break;
5490
          default:
5491
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5492
        }
5493
        iprot.readFieldEnd();
5494
      }
5495
      iprot.readStructEnd();
5496
      validate();
5497
    }
5498
 
5499
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5500
      oprot.writeStructBegin(STRUCT_DESC);
5501
 
5502
      if (this.isSetSuccess()) {
5503
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5361 mandeep.dh 5504
        this.success.write(oprot);
4496 mandeep.dh 5505
        oprot.writeFieldEnd();
5361 mandeep.dh 5506
      } else if (this.isSetWex()) {
5507
        oprot.writeFieldBegin(WEX_FIELD_DESC);
5508
        this.wex.write(oprot);
5509
        oprot.writeFieldEnd();
4496 mandeep.dh 5510
      }
5511
      oprot.writeFieldStop();
5512
      oprot.writeStructEnd();
5513
    }
5514
 
5515
    @Override
5516
    public String toString() {
5361 mandeep.dh 5517
      StringBuilder sb = new StringBuilder("getNonSeralizedInventoryItem_result(");
4496 mandeep.dh 5518
      boolean first = true;
5519
 
5520
      sb.append("success:");
5521
      if (this.success == null) {
5522
        sb.append("null");
5523
      } else {
5524
        sb.append(this.success);
5525
      }
5526
      first = false;
5361 mandeep.dh 5527
      if (!first) sb.append(", ");
5528
      sb.append("wex:");
5529
      if (this.wex == null) {
5530
        sb.append("null");
5531
      } else {
5532
        sb.append(this.wex);
5533
      }
5534
      first = false;
4496 mandeep.dh 5535
      sb.append(")");
5536
      return sb.toString();
5537
    }
5538
 
5539
    public void validate() throws org.apache.thrift.TException {
5540
      // check for required fields
5541
    }
5542
 
5543
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5544
      try {
5545
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5546
      } catch (org.apache.thrift.TException te) {
5547
        throw new java.io.IOException(te);
5548
      }
5549
    }
5550
 
5551
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5552
      try {
5553
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5554
      } catch (org.apache.thrift.TException te) {
5555
        throw new java.io.IOException(te);
5556
      }
5557
    }
5558
 
5559
  }
5560
 
5561
  public static class scanSerializedItem_args implements org.apache.thrift.TBase<scanSerializedItem_args, scanSerializedItem_args._Fields>, java.io.Serializable, Cloneable   {
5562
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItem_args");
5563
 
5110 mandeep.dh 5564
    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 5565
    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 5566
    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 5567
 
5110 mandeep.dh 5568
    private InventoryItem inventoryItem; // required
4496 mandeep.dh 5569
    private ScanType type; // required
5361 mandeep.dh 5570
    private long billingWarehouseId; // required
4496 mandeep.dh 5571
 
5572
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5573
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5110 mandeep.dh 5574
      INVENTORY_ITEM((short)1, "inventoryItem"),
4496 mandeep.dh 5575
      /**
5576
       * 
5577
       * @see ScanType
5578
       */
5579
      TYPE((short)2, "type"),
5361 mandeep.dh 5580
      BILLING_WAREHOUSE_ID((short)3, "billingWarehouseId");
4496 mandeep.dh 5581
 
5582
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5583
 
5584
      static {
5585
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5586
          byName.put(field.getFieldName(), field);
5587
        }
5588
      }
5589
 
5590
      /**
5591
       * Find the _Fields constant that matches fieldId, or null if its not found.
5592
       */
5593
      public static _Fields findByThriftId(int fieldId) {
5594
        switch(fieldId) {
5110 mandeep.dh 5595
          case 1: // INVENTORY_ITEM
5596
            return INVENTORY_ITEM;
4496 mandeep.dh 5597
          case 2: // TYPE
5598
            return TYPE;
5361 mandeep.dh 5599
          case 3: // BILLING_WAREHOUSE_ID
5600
            return BILLING_WAREHOUSE_ID;
4496 mandeep.dh 5601
          default:
5602
            return null;
5603
        }
5604
      }
5605
 
5606
      /**
5607
       * Find the _Fields constant that matches fieldId, throwing an exception
5608
       * if it is not found.
5609
       */
5610
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5611
        _Fields fields = findByThriftId(fieldId);
5612
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5613
        return fields;
5614
      }
5615
 
5616
      /**
5617
       * Find the _Fields constant that matches name, or null if its not found.
5618
       */
5619
      public static _Fields findByName(String name) {
5620
        return byName.get(name);
5621
      }
5622
 
5623
      private final short _thriftId;
5624
      private final String _fieldName;
5625
 
5626
      _Fields(short thriftId, String fieldName) {
5627
        _thriftId = thriftId;
5628
        _fieldName = fieldName;
5629
      }
5630
 
5631
      public short getThriftFieldId() {
5632
        return _thriftId;
5633
      }
5634
 
5635
      public String getFieldName() {
5636
        return _fieldName;
5637
      }
5638
    }
5639
 
5640
    // isset id assignments
5361 mandeep.dh 5641
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 0;
5110 mandeep.dh 5642
    private BitSet __isset_bit_vector = new BitSet(1);
4496 mandeep.dh 5643
 
5644
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5645
    static {
5646
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5110 mandeep.dh 5647
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5648
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4496 mandeep.dh 5649
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5650
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
5361 mandeep.dh 5651
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 5652
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5653
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5654
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItem_args.class, metaDataMap);
5655
    }
5656
 
5657
    public scanSerializedItem_args() {
5658
    }
5659
 
5660
    public scanSerializedItem_args(
5110 mandeep.dh 5661
      InventoryItem inventoryItem,
4496 mandeep.dh 5662
      ScanType type,
5361 mandeep.dh 5663
      long billingWarehouseId)
4496 mandeep.dh 5664
    {
5665
      this();
5110 mandeep.dh 5666
      this.inventoryItem = inventoryItem;
4496 mandeep.dh 5667
      this.type = type;
5361 mandeep.dh 5668
      this.billingWarehouseId = billingWarehouseId;
5669
      setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 5670
    }
5671
 
5672
    /**
5673
     * Performs a deep copy on <i>other</i>.
5674
     */
5675
    public scanSerializedItem_args(scanSerializedItem_args other) {
5676
      __isset_bit_vector.clear();
5677
      __isset_bit_vector.or(other.__isset_bit_vector);
5110 mandeep.dh 5678
      if (other.isSetInventoryItem()) {
5679
        this.inventoryItem = new InventoryItem(other.inventoryItem);
5680
      }
4496 mandeep.dh 5681
      if (other.isSetType()) {
5682
        this.type = other.type;
5683
      }
5361 mandeep.dh 5684
      this.billingWarehouseId = other.billingWarehouseId;
4496 mandeep.dh 5685
    }
5686
 
5687
    public scanSerializedItem_args deepCopy() {
5688
      return new scanSerializedItem_args(this);
5689
    }
5690
 
5691
    @Override
5692
    public void clear() {
5110 mandeep.dh 5693
      this.inventoryItem = null;
4496 mandeep.dh 5694
      this.type = null;
5361 mandeep.dh 5695
      setBillingWarehouseIdIsSet(false);
5696
      this.billingWarehouseId = 0;
4496 mandeep.dh 5697
    }
5698
 
5110 mandeep.dh 5699
    public InventoryItem getInventoryItem() {
5700
      return this.inventoryItem;
4496 mandeep.dh 5701
    }
5702
 
5110 mandeep.dh 5703
    public void setInventoryItem(InventoryItem inventoryItem) {
5704
      this.inventoryItem = inventoryItem;
4496 mandeep.dh 5705
    }
5706
 
5110 mandeep.dh 5707
    public void unsetInventoryItem() {
5708
      this.inventoryItem = null;
4496 mandeep.dh 5709
    }
5710
 
5110 mandeep.dh 5711
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
5712
    public boolean isSetInventoryItem() {
5713
      return this.inventoryItem != null;
4496 mandeep.dh 5714
    }
5715
 
5110 mandeep.dh 5716
    public void setInventoryItemIsSet(boolean value) {
5717
      if (!value) {
5718
        this.inventoryItem = null;
5719
      }
4496 mandeep.dh 5720
    }
5721
 
5722
    /**
5723
     * 
5724
     * @see ScanType
5725
     */
5726
    public ScanType getType() {
5727
      return this.type;
5728
    }
5729
 
5730
    /**
5731
     * 
5732
     * @see ScanType
5733
     */
5734
    public void setType(ScanType type) {
5735
      this.type = type;
5736
    }
5737
 
5738
    public void unsetType() {
5739
      this.type = null;
5740
    }
5741
 
5742
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
5743
    public boolean isSetType() {
5744
      return this.type != null;
5745
    }
5746
 
5747
    public void setTypeIsSet(boolean value) {
5748
      if (!value) {
5749
        this.type = null;
5750
      }
5751
    }
5752
 
5361 mandeep.dh 5753
    public long getBillingWarehouseId() {
5754
      return this.billingWarehouseId;
4496 mandeep.dh 5755
    }
5756
 
5361 mandeep.dh 5757
    public void setBillingWarehouseId(long billingWarehouseId) {
5758
      this.billingWarehouseId = billingWarehouseId;
5759
      setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 5760
    }
5761
 
5361 mandeep.dh 5762
    public void unsetBillingWarehouseId() {
5763
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 5764
    }
5765
 
5361 mandeep.dh 5766
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
5767
    public boolean isSetBillingWarehouseId() {
5768
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 5769
    }
5770
 
5361 mandeep.dh 5771
    public void setBillingWarehouseIdIsSet(boolean value) {
5772
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 5773
    }
5774
 
5775
    public void setFieldValue(_Fields field, Object value) {
5776
      switch (field) {
5110 mandeep.dh 5777
      case INVENTORY_ITEM:
4496 mandeep.dh 5778
        if (value == null) {
5110 mandeep.dh 5779
          unsetInventoryItem();
4496 mandeep.dh 5780
        } else {
5110 mandeep.dh 5781
          setInventoryItem((InventoryItem)value);
4496 mandeep.dh 5782
        }
5783
        break;
5784
 
5785
      case TYPE:
5786
        if (value == null) {
5787
          unsetType();
5788
        } else {
5789
          setType((ScanType)value);
5790
        }
5791
        break;
5792
 
5361 mandeep.dh 5793
      case BILLING_WAREHOUSE_ID:
4496 mandeep.dh 5794
        if (value == null) {
5361 mandeep.dh 5795
          unsetBillingWarehouseId();
4496 mandeep.dh 5796
        } else {
5361 mandeep.dh 5797
          setBillingWarehouseId((Long)value);
4496 mandeep.dh 5798
        }
5799
        break;
5800
 
5801
      }
5802
    }
5803
 
5804
    public Object getFieldValue(_Fields field) {
5805
      switch (field) {
5110 mandeep.dh 5806
      case INVENTORY_ITEM:
5807
        return getInventoryItem();
4496 mandeep.dh 5808
 
5809
      case TYPE:
5810
        return getType();
5811
 
5361 mandeep.dh 5812
      case BILLING_WAREHOUSE_ID:
5813
        return Long.valueOf(getBillingWarehouseId());
4496 mandeep.dh 5814
 
5815
      }
5816
      throw new IllegalStateException();
5817
    }
5818
 
5819
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5820
    public boolean isSet(_Fields field) {
5821
      if (field == null) {
5822
        throw new IllegalArgumentException();
5823
      }
5824
 
5825
      switch (field) {
5110 mandeep.dh 5826
      case INVENTORY_ITEM:
5827
        return isSetInventoryItem();
4496 mandeep.dh 5828
      case TYPE:
5829
        return isSetType();
5361 mandeep.dh 5830
      case BILLING_WAREHOUSE_ID:
5831
        return isSetBillingWarehouseId();
4496 mandeep.dh 5832
      }
5833
      throw new IllegalStateException();
5834
    }
5835
 
5836
    @Override
5837
    public boolean equals(Object that) {
5838
      if (that == null)
5839
        return false;
5840
      if (that instanceof scanSerializedItem_args)
5841
        return this.equals((scanSerializedItem_args)that);
5842
      return false;
5843
    }
5844
 
5845
    public boolean equals(scanSerializedItem_args that) {
5846
      if (that == null)
5847
        return false;
5848
 
5110 mandeep.dh 5849
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
5850
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
5851
      if (this_present_inventoryItem || that_present_inventoryItem) {
5852
        if (!(this_present_inventoryItem && that_present_inventoryItem))
4496 mandeep.dh 5853
          return false;
5110 mandeep.dh 5854
        if (!this.inventoryItem.equals(that.inventoryItem))
4496 mandeep.dh 5855
          return false;
5856
      }
5857
 
5858
      boolean this_present_type = true && this.isSetType();
5859
      boolean that_present_type = true && that.isSetType();
5860
      if (this_present_type || that_present_type) {
5861
        if (!(this_present_type && that_present_type))
5862
          return false;
5863
        if (!this.type.equals(that.type))
5864
          return false;
5865
      }
5866
 
5361 mandeep.dh 5867
      boolean this_present_billingWarehouseId = true;
5868
      boolean that_present_billingWarehouseId = true;
5869
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
5870
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
4496 mandeep.dh 5871
          return false;
5361 mandeep.dh 5872
        if (this.billingWarehouseId != that.billingWarehouseId)
4496 mandeep.dh 5873
          return false;
5874
      }
5875
 
5876
      return true;
5877
    }
5878
 
5879
    @Override
5880
    public int hashCode() {
5881
      return 0;
5882
    }
5883
 
5884
    public int compareTo(scanSerializedItem_args other) {
5885
      if (!getClass().equals(other.getClass())) {
5886
        return getClass().getName().compareTo(other.getClass().getName());
5887
      }
5888
 
5889
      int lastComparison = 0;
5890
      scanSerializedItem_args typedOther = (scanSerializedItem_args)other;
5891
 
5110 mandeep.dh 5892
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
4496 mandeep.dh 5893
      if (lastComparison != 0) {
5894
        return lastComparison;
5895
      }
5110 mandeep.dh 5896
      if (isSetInventoryItem()) {
5897
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
4496 mandeep.dh 5898
        if (lastComparison != 0) {
5899
          return lastComparison;
5900
        }
5901
      }
5902
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
5903
      if (lastComparison != 0) {
5904
        return lastComparison;
5905
      }
5906
      if (isSetType()) {
5907
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
5908
        if (lastComparison != 0) {
5909
          return lastComparison;
5910
        }
5911
      }
5361 mandeep.dh 5912
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
4496 mandeep.dh 5913
      if (lastComparison != 0) {
5914
        return lastComparison;
5915
      }
5361 mandeep.dh 5916
      if (isSetBillingWarehouseId()) {
5917
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
4496 mandeep.dh 5918
        if (lastComparison != 0) {
5919
          return lastComparison;
5920
        }
5921
      }
5922
      return 0;
5923
    }
5924
 
5925
    public _Fields fieldForId(int fieldId) {
5926
      return _Fields.findByThriftId(fieldId);
5927
    }
5928
 
5929
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5930
      org.apache.thrift.protocol.TField field;
5931
      iprot.readStructBegin();
5932
      while (true)
5933
      {
5934
        field = iprot.readFieldBegin();
5935
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5936
          break;
5937
        }
5938
        switch (field.id) {
5110 mandeep.dh 5939
          case 1: // INVENTORY_ITEM
5940
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5941
              this.inventoryItem = new InventoryItem();
5942
              this.inventoryItem.read(iprot);
4496 mandeep.dh 5943
            } else { 
5944
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5945
            }
5946
            break;
5947
          case 2: // TYPE
5948
            if (field.type == org.apache.thrift.protocol.TType.I32) {
5949
              this.type = ScanType.findByValue(iprot.readI32());
5950
            } else { 
5951
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5952
            }
5953
            break;
5361 mandeep.dh 5954
          case 3: // BILLING_WAREHOUSE_ID
4496 mandeep.dh 5955
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5361 mandeep.dh 5956
              this.billingWarehouseId = iprot.readI64();
5957
              setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 5958
            } else { 
5959
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5960
            }
5961
            break;
5962
          default:
5963
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5964
        }
5965
        iprot.readFieldEnd();
5966
      }
5967
      iprot.readStructEnd();
5968
      validate();
5969
    }
5970
 
5971
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5972
      validate();
5973
 
5974
      oprot.writeStructBegin(STRUCT_DESC);
5110 mandeep.dh 5975
      if (this.inventoryItem != null) {
5976
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
5977
        this.inventoryItem.write(oprot);
5978
        oprot.writeFieldEnd();
5979
      }
4496 mandeep.dh 5980
      if (this.type != null) {
5981
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
5982
        oprot.writeI32(this.type.getValue());
5983
        oprot.writeFieldEnd();
5984
      }
5361 mandeep.dh 5985
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
5986
      oprot.writeI64(this.billingWarehouseId);
4496 mandeep.dh 5987
      oprot.writeFieldEnd();
5988
      oprot.writeFieldStop();
5989
      oprot.writeStructEnd();
5990
    }
5991
 
5992
    @Override
5993
    public String toString() {
5994
      StringBuilder sb = new StringBuilder("scanSerializedItem_args(");
5995
      boolean first = true;
5996
 
5110 mandeep.dh 5997
      sb.append("inventoryItem:");
5998
      if (this.inventoryItem == null) {
5999
        sb.append("null");
6000
      } else {
6001
        sb.append(this.inventoryItem);
6002
      }
4496 mandeep.dh 6003
      first = false;
6004
      if (!first) sb.append(", ");
6005
      sb.append("type:");
6006
      if (this.type == null) {
6007
        sb.append("null");
6008
      } else {
6009
        sb.append(this.type);
6010
      }
6011
      first = false;
6012
      if (!first) sb.append(", ");
5361 mandeep.dh 6013
      sb.append("billingWarehouseId:");
6014
      sb.append(this.billingWarehouseId);
4496 mandeep.dh 6015
      first = false;
6016
      sb.append(")");
6017
      return sb.toString();
6018
    }
6019
 
6020
    public void validate() throws org.apache.thrift.TException {
6021
      // check for required fields
6022
    }
6023
 
6024
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6025
      try {
6026
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6027
      } catch (org.apache.thrift.TException te) {
6028
        throw new java.io.IOException(te);
6029
      }
6030
    }
6031
 
6032
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6033
      try {
6034
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6035
        __isset_bit_vector = new BitSet(1);
6036
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6037
      } catch (org.apache.thrift.TException te) {
6038
        throw new java.io.IOException(te);
6039
      }
6040
    }
6041
 
6042
  }
6043
 
6044
  public static class scanSerializedItem_result implements org.apache.thrift.TBase<scanSerializedItem_result, scanSerializedItem_result._Fields>, java.io.Serializable, Cloneable   {
6045
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItem_result");
6046
 
6047
    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);
6048
 
6049
    private WarehouseServiceException wex; // required
6050
 
6051
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6052
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6053
      WEX((short)1, "wex");
6054
 
6055
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6056
 
6057
      static {
6058
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6059
          byName.put(field.getFieldName(), field);
6060
        }
6061
      }
6062
 
6063
      /**
6064
       * Find the _Fields constant that matches fieldId, or null if its not found.
6065
       */
6066
      public static _Fields findByThriftId(int fieldId) {
6067
        switch(fieldId) {
6068
          case 1: // WEX
6069
            return WEX;
6070
          default:
6071
            return null;
6072
        }
6073
      }
6074
 
6075
      /**
6076
       * Find the _Fields constant that matches fieldId, throwing an exception
6077
       * if it is not found.
6078
       */
6079
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6080
        _Fields fields = findByThriftId(fieldId);
6081
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6082
        return fields;
6083
      }
6084
 
6085
      /**
6086
       * Find the _Fields constant that matches name, or null if its not found.
6087
       */
6088
      public static _Fields findByName(String name) {
6089
        return byName.get(name);
6090
      }
6091
 
6092
      private final short _thriftId;
6093
      private final String _fieldName;
6094
 
6095
      _Fields(short thriftId, String fieldName) {
6096
        _thriftId = thriftId;
6097
        _fieldName = fieldName;
6098
      }
6099
 
6100
      public short getThriftFieldId() {
6101
        return _thriftId;
6102
      }
6103
 
6104
      public String getFieldName() {
6105
        return _fieldName;
6106
      }
6107
    }
6108
 
6109
    // isset id assignments
6110
 
6111
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6112
    static {
6113
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6114
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6115
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6116
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6117
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItem_result.class, metaDataMap);
6118
    }
6119
 
6120
    public scanSerializedItem_result() {
6121
    }
6122
 
6123
    public scanSerializedItem_result(
6124
      WarehouseServiceException wex)
6125
    {
6126
      this();
6127
      this.wex = wex;
6128
    }
6129
 
6130
    /**
6131
     * Performs a deep copy on <i>other</i>.
6132
     */
6133
    public scanSerializedItem_result(scanSerializedItem_result other) {
6134
      if (other.isSetWex()) {
6135
        this.wex = new WarehouseServiceException(other.wex);
6136
      }
6137
    }
6138
 
6139
    public scanSerializedItem_result deepCopy() {
6140
      return new scanSerializedItem_result(this);
6141
    }
6142
 
6143
    @Override
6144
    public void clear() {
6145
      this.wex = null;
6146
    }
6147
 
2820 chandransh 6148
    public WarehouseServiceException getWex() {
6149
      return this.wex;
6150
    }
6151
 
3430 rajveer 6152
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 6153
      this.wex = wex;
6154
    }
6155
 
6156
    public void unsetWex() {
6157
      this.wex = null;
6158
    }
6159
 
3430 rajveer 6160
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 6161
    public boolean isSetWex() {
6162
      return this.wex != null;
6163
    }
6164
 
6165
    public void setWexIsSet(boolean value) {
6166
      if (!value) {
6167
        this.wex = null;
6168
      }
6169
    }
6170
 
6171
    public void setFieldValue(_Fields field, Object value) {
6172
      switch (field) {
6173
      case WEX:
6174
        if (value == null) {
6175
          unsetWex();
6176
        } else {
6177
          setWex((WarehouseServiceException)value);
6178
        }
6179
        break;
6180
 
6181
      }
6182
    }
6183
 
6184
    public Object getFieldValue(_Fields field) {
6185
      switch (field) {
6186
      case WEX:
6187
        return getWex();
6188
 
6189
      }
6190
      throw new IllegalStateException();
6191
    }
6192
 
3430 rajveer 6193
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6194
    public boolean isSet(_Fields field) {
6195
      if (field == null) {
6196
        throw new IllegalArgumentException();
6197
      }
2820 chandransh 6198
 
6199
      switch (field) {
6200
      case WEX:
6201
        return isSetWex();
6202
      }
6203
      throw new IllegalStateException();
6204
    }
6205
 
6206
    @Override
6207
    public boolean equals(Object that) {
6208
      if (that == null)
6209
        return false;
4496 mandeep.dh 6210
      if (that instanceof scanSerializedItem_result)
6211
        return this.equals((scanSerializedItem_result)that);
2820 chandransh 6212
      return false;
6213
    }
6214
 
4496 mandeep.dh 6215
    public boolean equals(scanSerializedItem_result that) {
2820 chandransh 6216
      if (that == null)
6217
        return false;
6218
 
6219
      boolean this_present_wex = true && this.isSetWex();
6220
      boolean that_present_wex = true && that.isSetWex();
6221
      if (this_present_wex || that_present_wex) {
6222
        if (!(this_present_wex && that_present_wex))
6223
          return false;
6224
        if (!this.wex.equals(that.wex))
6225
          return false;
6226
      }
6227
 
6228
      return true;
6229
    }
6230
 
6231
    @Override
6232
    public int hashCode() {
6233
      return 0;
6234
    }
6235
 
4496 mandeep.dh 6236
    public int compareTo(scanSerializedItem_result other) {
2820 chandransh 6237
      if (!getClass().equals(other.getClass())) {
6238
        return getClass().getName().compareTo(other.getClass().getName());
6239
      }
6240
 
6241
      int lastComparison = 0;
4496 mandeep.dh 6242
      scanSerializedItem_result typedOther = (scanSerializedItem_result)other;
2820 chandransh 6243
 
3430 rajveer 6244
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 6245
      if (lastComparison != 0) {
6246
        return lastComparison;
6247
      }
3430 rajveer 6248
      if (isSetWex()) {
6249
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
6250
        if (lastComparison != 0) {
6251
          return lastComparison;
6252
        }
2820 chandransh 6253
      }
6254
      return 0;
6255
    }
6256
 
3430 rajveer 6257
    public _Fields fieldForId(int fieldId) {
6258
      return _Fields.findByThriftId(fieldId);
6259
    }
6260
 
6261
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6262
      org.apache.thrift.protocol.TField field;
2820 chandransh 6263
      iprot.readStructBegin();
6264
      while (true)
6265
      {
6266
        field = iprot.readFieldBegin();
3430 rajveer 6267
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 6268
          break;
6269
        }
3430 rajveer 6270
        switch (field.id) {
6271
          case 1: // WEX
6272
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6273
              this.wex = new WarehouseServiceException();
6274
              this.wex.read(iprot);
6275
            } else { 
6276
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6277
            }
6278
            break;
6279
          default:
6280
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 6281
        }
3430 rajveer 6282
        iprot.readFieldEnd();
2820 chandransh 6283
      }
6284
      iprot.readStructEnd();
6285
      validate();
6286
    }
6287
 
3430 rajveer 6288
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 6289
      oprot.writeStructBegin(STRUCT_DESC);
6290
 
4496 mandeep.dh 6291
      if (this.isSetWex()) {
2820 chandransh 6292
        oprot.writeFieldBegin(WEX_FIELD_DESC);
6293
        this.wex.write(oprot);
6294
        oprot.writeFieldEnd();
6295
      }
6296
      oprot.writeFieldStop();
6297
      oprot.writeStructEnd();
6298
    }
6299
 
6300
    @Override
6301
    public String toString() {
4496 mandeep.dh 6302
      StringBuilder sb = new StringBuilder("scanSerializedItem_result(");
2820 chandransh 6303
      boolean first = true;
6304
 
6305
      sb.append("wex:");
6306
      if (this.wex == null) {
6307
        sb.append("null");
6308
      } else {
6309
        sb.append(this.wex);
6310
      }
6311
      first = false;
6312
      sb.append(")");
6313
      return sb.toString();
6314
    }
6315
 
3430 rajveer 6316
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 6317
      // check for required fields
6318
    }
6319
 
3430 rajveer 6320
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6321
      try {
6322
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6323
      } catch (org.apache.thrift.TException te) {
6324
        throw new java.io.IOException(te);
6325
      }
6326
    }
6327
 
6328
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6329
      try {
6330
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6331
      } catch (org.apache.thrift.TException te) {
6332
        throw new java.io.IOException(te);
6333
      }
6334
    }
6335
 
2820 chandransh 6336
  }
6337
 
4496 mandeep.dh 6338
  public static class scan_args implements org.apache.thrift.TBase<scan_args, scan_args._Fields>, java.io.Serializable, Cloneable   {
6339
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_args");
3383 chandransh 6340
 
5361 mandeep.dh 6341
    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 6342
    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);
6343
    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 6344
    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 6345
 
5361 mandeep.dh 6346
    private InventoryItem inventoryItem; // required
4496 mandeep.dh 6347
    private ScanType type; // required
6348
    private long quantity; // required
5361 mandeep.dh 6349
    private long billingWarehouseId; // required
3383 chandransh 6350
 
6351
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6352
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 6353
      INVENTORY_ITEM((short)1, "inventoryItem"),
4496 mandeep.dh 6354
      /**
6355
       * 
6356
       * @see ScanType
6357
       */
6358
      TYPE((short)2, "type"),
6359
      QUANTITY((short)3, "quantity"),
5361 mandeep.dh 6360
      BILLING_WAREHOUSE_ID((short)4, "billingWarehouseId");
3383 chandransh 6361
 
6362
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6363
 
6364
      static {
6365
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6366
          byName.put(field.getFieldName(), field);
6367
        }
6368
      }
6369
 
6370
      /**
6371
       * Find the _Fields constant that matches fieldId, or null if its not found.
6372
       */
6373
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6374
        switch(fieldId) {
5361 mandeep.dh 6375
          case 1: // INVENTORY_ITEM
6376
            return INVENTORY_ITEM;
4496 mandeep.dh 6377
          case 2: // TYPE
6378
            return TYPE;
6379
          case 3: // QUANTITY
6380
            return QUANTITY;
5361 mandeep.dh 6381
          case 4: // BILLING_WAREHOUSE_ID
6382
            return BILLING_WAREHOUSE_ID;
3430 rajveer 6383
          default:
6384
            return null;
6385
        }
3383 chandransh 6386
      }
6387
 
6388
      /**
6389
       * Find the _Fields constant that matches fieldId, throwing an exception
6390
       * if it is not found.
6391
       */
6392
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6393
        _Fields fields = findByThriftId(fieldId);
6394
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6395
        return fields;
6396
      }
6397
 
6398
      /**
6399
       * Find the _Fields constant that matches name, or null if its not found.
6400
       */
6401
      public static _Fields findByName(String name) {
6402
        return byName.get(name);
6403
      }
6404
 
6405
      private final short _thriftId;
6406
      private final String _fieldName;
6407
 
6408
      _Fields(short thriftId, String fieldName) {
6409
        _thriftId = thriftId;
6410
        _fieldName = fieldName;
6411
      }
6412
 
6413
      public short getThriftFieldId() {
6414
        return _thriftId;
6415
      }
6416
 
6417
      public String getFieldName() {
6418
        return _fieldName;
6419
      }
6420
    }
6421
 
6422
    // isset id assignments
5361 mandeep.dh 6423
    private static final int __QUANTITY_ISSET_ID = 0;
6424
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 1;
6425
    private BitSet __isset_bit_vector = new BitSet(2);
3383 chandransh 6426
 
3430 rajveer 6427
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 6428
    static {
3430 rajveer 6429
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 6430
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6431
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
4496 mandeep.dh 6432
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6433
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
6434
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6435
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 6436
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 6437
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 6438
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 6439
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_args.class, metaDataMap);
3383 chandransh 6440
    }
6441
 
4496 mandeep.dh 6442
    public scan_args() {
3383 chandransh 6443
    }
6444
 
4496 mandeep.dh 6445
    public scan_args(
5361 mandeep.dh 6446
      InventoryItem inventoryItem,
4496 mandeep.dh 6447
      ScanType type,
6448
      long quantity,
5361 mandeep.dh 6449
      long billingWarehouseId)
3383 chandransh 6450
    {
6451
      this();
5361 mandeep.dh 6452
      this.inventoryItem = inventoryItem;
4496 mandeep.dh 6453
      this.type = type;
6454
      this.quantity = quantity;
6455
      setQuantityIsSet(true);
5361 mandeep.dh 6456
      this.billingWarehouseId = billingWarehouseId;
6457
      setBillingWarehouseIdIsSet(true);
3383 chandransh 6458
    }
6459
 
6460
    /**
6461
     * Performs a deep copy on <i>other</i>.
6462
     */
4496 mandeep.dh 6463
    public scan_args(scan_args other) {
3383 chandransh 6464
      __isset_bit_vector.clear();
6465
      __isset_bit_vector.or(other.__isset_bit_vector);
5361 mandeep.dh 6466
      if (other.isSetInventoryItem()) {
6467
        this.inventoryItem = new InventoryItem(other.inventoryItem);
6468
      }
4496 mandeep.dh 6469
      if (other.isSetType()) {
6470
        this.type = other.type;
6471
      }
6472
      this.quantity = other.quantity;
5361 mandeep.dh 6473
      this.billingWarehouseId = other.billingWarehouseId;
3383 chandransh 6474
    }
6475
 
4496 mandeep.dh 6476
    public scan_args deepCopy() {
6477
      return new scan_args(this);
3383 chandransh 6478
    }
6479
 
3430 rajveer 6480
    @Override
6481
    public void clear() {
5361 mandeep.dh 6482
      this.inventoryItem = null;
4496 mandeep.dh 6483
      this.type = null;
6484
      setQuantityIsSet(false);
6485
      this.quantity = 0;
5361 mandeep.dh 6486
      setBillingWarehouseIdIsSet(false);
6487
      this.billingWarehouseId = 0;
3383 chandransh 6488
    }
6489
 
5361 mandeep.dh 6490
    public InventoryItem getInventoryItem() {
6491
      return this.inventoryItem;
3383 chandransh 6492
    }
6493
 
5361 mandeep.dh 6494
    public void setInventoryItem(InventoryItem inventoryItem) {
6495
      this.inventoryItem = inventoryItem;
3383 chandransh 6496
    }
6497
 
5361 mandeep.dh 6498
    public void unsetInventoryItem() {
6499
      this.inventoryItem = null;
3383 chandransh 6500
    }
6501
 
5361 mandeep.dh 6502
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
6503
    public boolean isSetInventoryItem() {
6504
      return this.inventoryItem != null;
3383 chandransh 6505
    }
6506
 
5361 mandeep.dh 6507
    public void setInventoryItemIsSet(boolean value) {
6508
      if (!value) {
6509
        this.inventoryItem = null;
6510
      }
3383 chandransh 6511
    }
6512
 
4496 mandeep.dh 6513
    /**
6514
     * 
6515
     * @see ScanType
6516
     */
6517
    public ScanType getType() {
6518
      return this.type;
3383 chandransh 6519
    }
6520
 
4496 mandeep.dh 6521
    /**
6522
     * 
6523
     * @see ScanType
6524
     */
6525
    public void setType(ScanType type) {
6526
      this.type = type;
3383 chandransh 6527
    }
6528
 
4496 mandeep.dh 6529
    public void unsetType() {
6530
      this.type = null;
3383 chandransh 6531
    }
6532
 
4496 mandeep.dh 6533
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
6534
    public boolean isSetType() {
6535
      return this.type != null;
3383 chandransh 6536
    }
6537
 
4496 mandeep.dh 6538
    public void setTypeIsSet(boolean value) {
6539
      if (!value) {
6540
        this.type = null;
6541
      }
3383 chandransh 6542
    }
6543
 
4496 mandeep.dh 6544
    public long getQuantity() {
6545
      return this.quantity;
6546
    }
6547
 
6548
    public void setQuantity(long quantity) {
6549
      this.quantity = quantity;
6550
      setQuantityIsSet(true);
6551
    }
6552
 
6553
    public void unsetQuantity() {
6554
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
6555
    }
6556
 
6557
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
6558
    public boolean isSetQuantity() {
6559
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
6560
    }
6561
 
6562
    public void setQuantityIsSet(boolean value) {
6563
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
6564
    }
6565
 
5361 mandeep.dh 6566
    public long getBillingWarehouseId() {
6567
      return this.billingWarehouseId;
4496 mandeep.dh 6568
    }
6569
 
5361 mandeep.dh 6570
    public void setBillingWarehouseId(long billingWarehouseId) {
6571
      this.billingWarehouseId = billingWarehouseId;
6572
      setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 6573
    }
6574
 
5361 mandeep.dh 6575
    public void unsetBillingWarehouseId() {
6576
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 6577
    }
6578
 
5361 mandeep.dh 6579
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
6580
    public boolean isSetBillingWarehouseId() {
6581
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 6582
    }
6583
 
5361 mandeep.dh 6584
    public void setBillingWarehouseIdIsSet(boolean value) {
6585
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 6586
    }
6587
 
3383 chandransh 6588
    public void setFieldValue(_Fields field, Object value) {
6589
      switch (field) {
5361 mandeep.dh 6590
      case INVENTORY_ITEM:
3383 chandransh 6591
        if (value == null) {
5361 mandeep.dh 6592
          unsetInventoryItem();
3383 chandransh 6593
        } else {
5361 mandeep.dh 6594
          setInventoryItem((InventoryItem)value);
3383 chandransh 6595
        }
6596
        break;
6597
 
4496 mandeep.dh 6598
      case TYPE:
3383 chandransh 6599
        if (value == null) {
4496 mandeep.dh 6600
          unsetType();
3383 chandransh 6601
        } else {
4496 mandeep.dh 6602
          setType((ScanType)value);
3383 chandransh 6603
        }
6604
        break;
6605
 
4496 mandeep.dh 6606
      case QUANTITY:
6607
        if (value == null) {
6608
          unsetQuantity();
6609
        } else {
6610
          setQuantity((Long)value);
6611
        }
6612
        break;
6613
 
5361 mandeep.dh 6614
      case BILLING_WAREHOUSE_ID:
4496 mandeep.dh 6615
        if (value == null) {
5361 mandeep.dh 6616
          unsetBillingWarehouseId();
4496 mandeep.dh 6617
        } else {
5361 mandeep.dh 6618
          setBillingWarehouseId((Long)value);
4496 mandeep.dh 6619
        }
6620
        break;
6621
 
3383 chandransh 6622
      }
6623
    }
6624
 
6625
    public Object getFieldValue(_Fields field) {
6626
      switch (field) {
5361 mandeep.dh 6627
      case INVENTORY_ITEM:
6628
        return getInventoryItem();
3383 chandransh 6629
 
4496 mandeep.dh 6630
      case TYPE:
6631
        return getType();
3383 chandransh 6632
 
4496 mandeep.dh 6633
      case QUANTITY:
6634
        return Long.valueOf(getQuantity());
6635
 
5361 mandeep.dh 6636
      case BILLING_WAREHOUSE_ID:
6637
        return Long.valueOf(getBillingWarehouseId());
4496 mandeep.dh 6638
 
3383 chandransh 6639
      }
6640
      throw new IllegalStateException();
6641
    }
6642
 
3430 rajveer 6643
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6644
    public boolean isSet(_Fields field) {
6645
      if (field == null) {
6646
        throw new IllegalArgumentException();
6647
      }
3383 chandransh 6648
 
6649
      switch (field) {
5361 mandeep.dh 6650
      case INVENTORY_ITEM:
6651
        return isSetInventoryItem();
4496 mandeep.dh 6652
      case TYPE:
6653
        return isSetType();
6654
      case QUANTITY:
6655
        return isSetQuantity();
5361 mandeep.dh 6656
      case BILLING_WAREHOUSE_ID:
6657
        return isSetBillingWarehouseId();
3383 chandransh 6658
      }
6659
      throw new IllegalStateException();
6660
    }
6661
 
6662
    @Override
6663
    public boolean equals(Object that) {
6664
      if (that == null)
6665
        return false;
4496 mandeep.dh 6666
      if (that instanceof scan_args)
6667
        return this.equals((scan_args)that);
3383 chandransh 6668
      return false;
6669
    }
6670
 
4496 mandeep.dh 6671
    public boolean equals(scan_args that) {
3383 chandransh 6672
      if (that == null)
6673
        return false;
6674
 
5361 mandeep.dh 6675
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
6676
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
6677
      if (this_present_inventoryItem || that_present_inventoryItem) {
6678
        if (!(this_present_inventoryItem && that_present_inventoryItem))
3383 chandransh 6679
          return false;
5361 mandeep.dh 6680
        if (!this.inventoryItem.equals(that.inventoryItem))
3383 chandransh 6681
          return false;
6682
      }
6683
 
4496 mandeep.dh 6684
      boolean this_present_type = true && this.isSetType();
6685
      boolean that_present_type = true && that.isSetType();
6686
      if (this_present_type || that_present_type) {
6687
        if (!(this_present_type && that_present_type))
3383 chandransh 6688
          return false;
4496 mandeep.dh 6689
        if (!this.type.equals(that.type))
3383 chandransh 6690
          return false;
6691
      }
6692
 
4496 mandeep.dh 6693
      boolean this_present_quantity = true;
6694
      boolean that_present_quantity = true;
6695
      if (this_present_quantity || that_present_quantity) {
6696
        if (!(this_present_quantity && that_present_quantity))
6697
          return false;
6698
        if (this.quantity != that.quantity)
6699
          return false;
6700
      }
6701
 
5361 mandeep.dh 6702
      boolean this_present_billingWarehouseId = true;
6703
      boolean that_present_billingWarehouseId = true;
6704
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
6705
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
4496 mandeep.dh 6706
          return false;
5361 mandeep.dh 6707
        if (this.billingWarehouseId != that.billingWarehouseId)
4496 mandeep.dh 6708
          return false;
6709
      }
6710
 
3383 chandransh 6711
      return true;
6712
    }
6713
 
6714
    @Override
6715
    public int hashCode() {
6716
      return 0;
6717
    }
6718
 
4496 mandeep.dh 6719
    public int compareTo(scan_args other) {
3383 chandransh 6720
      if (!getClass().equals(other.getClass())) {
6721
        return getClass().getName().compareTo(other.getClass().getName());
6722
      }
6723
 
6724
      int lastComparison = 0;
4496 mandeep.dh 6725
      scan_args typedOther = (scan_args)other;
3383 chandransh 6726
 
5361 mandeep.dh 6727
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
3383 chandransh 6728
      if (lastComparison != 0) {
6729
        return lastComparison;
6730
      }
5361 mandeep.dh 6731
      if (isSetInventoryItem()) {
6732
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
3430 rajveer 6733
        if (lastComparison != 0) {
6734
          return lastComparison;
6735
        }
3383 chandransh 6736
      }
4496 mandeep.dh 6737
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
3383 chandransh 6738
      if (lastComparison != 0) {
6739
        return lastComparison;
6740
      }
4496 mandeep.dh 6741
      if (isSetType()) {
6742
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 6743
        if (lastComparison != 0) {
6744
          return lastComparison;
6745
        }
3383 chandransh 6746
      }
4496 mandeep.dh 6747
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
6748
      if (lastComparison != 0) {
6749
        return lastComparison;
6750
      }
6751
      if (isSetQuantity()) {
6752
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
6753
        if (lastComparison != 0) {
6754
          return lastComparison;
6755
        }
6756
      }
5361 mandeep.dh 6757
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
4496 mandeep.dh 6758
      if (lastComparison != 0) {
6759
        return lastComparison;
6760
      }
5361 mandeep.dh 6761
      if (isSetBillingWarehouseId()) {
6762
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
4496 mandeep.dh 6763
        if (lastComparison != 0) {
6764
          return lastComparison;
6765
        }
6766
      }
3383 chandransh 6767
      return 0;
6768
    }
6769
 
3430 rajveer 6770
    public _Fields fieldForId(int fieldId) {
6771
      return _Fields.findByThriftId(fieldId);
6772
    }
6773
 
6774
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6775
      org.apache.thrift.protocol.TField field;
3383 chandransh 6776
      iprot.readStructBegin();
6777
      while (true)
6778
      {
6779
        field = iprot.readFieldBegin();
3430 rajveer 6780
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 6781
          break;
6782
        }
3430 rajveer 6783
        switch (field.id) {
5361 mandeep.dh 6784
          case 1: // INVENTORY_ITEM
6785
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6786
              this.inventoryItem = new InventoryItem();
6787
              this.inventoryItem.read(iprot);
3430 rajveer 6788
            } else { 
6789
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6790
            }
6791
            break;
4496 mandeep.dh 6792
          case 2: // TYPE
6793
            if (field.type == org.apache.thrift.protocol.TType.I32) {
6794
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 6795
            } else { 
6796
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6797
            }
6798
            break;
4496 mandeep.dh 6799
          case 3: // QUANTITY
6800
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6801
              this.quantity = iprot.readI64();
6802
              setQuantityIsSet(true);
6803
            } else { 
6804
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6805
            }
6806
            break;
5361 mandeep.dh 6807
          case 4: // BILLING_WAREHOUSE_ID
4496 mandeep.dh 6808
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5361 mandeep.dh 6809
              this.billingWarehouseId = iprot.readI64();
6810
              setBillingWarehouseIdIsSet(true);
4496 mandeep.dh 6811
            } else { 
6812
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6813
            }
6814
            break;
3430 rajveer 6815
          default:
6816
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 6817
        }
3430 rajveer 6818
        iprot.readFieldEnd();
3383 chandransh 6819
      }
6820
      iprot.readStructEnd();
6821
      validate();
6822
    }
6823
 
3430 rajveer 6824
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 6825
      validate();
6826
 
6827
      oprot.writeStructBegin(STRUCT_DESC);
5361 mandeep.dh 6828
      if (this.inventoryItem != null) {
6829
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
6830
        this.inventoryItem.write(oprot);
6831
        oprot.writeFieldEnd();
6832
      }
4496 mandeep.dh 6833
      if (this.type != null) {
6834
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
6835
        oprot.writeI32(this.type.getValue());
6836
        oprot.writeFieldEnd();
6837
      }
6838
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
6839
      oprot.writeI64(this.quantity);
3383 chandransh 6840
      oprot.writeFieldEnd();
5361 mandeep.dh 6841
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
6842
      oprot.writeI64(this.billingWarehouseId);
4496 mandeep.dh 6843
      oprot.writeFieldEnd();
3383 chandransh 6844
      oprot.writeFieldStop();
6845
      oprot.writeStructEnd();
6846
    }
6847
 
6848
    @Override
6849
    public String toString() {
4496 mandeep.dh 6850
      StringBuilder sb = new StringBuilder("scan_args(");
3383 chandransh 6851
      boolean first = true;
6852
 
5361 mandeep.dh 6853
      sb.append("inventoryItem:");
6854
      if (this.inventoryItem == null) {
6855
        sb.append("null");
6856
      } else {
6857
        sb.append(this.inventoryItem);
6858
      }
3383 chandransh 6859
      first = false;
6860
      if (!first) sb.append(", ");
4496 mandeep.dh 6861
      sb.append("type:");
6862
      if (this.type == null) {
6863
        sb.append("null");
6864
      } else {
6865
        sb.append(this.type);
6866
      }
3383 chandransh 6867
      first = false;
4496 mandeep.dh 6868
      if (!first) sb.append(", ");
6869
      sb.append("quantity:");
6870
      sb.append(this.quantity);
6871
      first = false;
6872
      if (!first) sb.append(", ");
5361 mandeep.dh 6873
      sb.append("billingWarehouseId:");
6874
      sb.append(this.billingWarehouseId);
4496 mandeep.dh 6875
      first = false;
3383 chandransh 6876
      sb.append(")");
6877
      return sb.toString();
6878
    }
6879
 
3430 rajveer 6880
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 6881
      // check for required fields
6882
    }
6883
 
3430 rajveer 6884
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6885
      try {
6886
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6887
      } catch (org.apache.thrift.TException te) {
6888
        throw new java.io.IOException(te);
6889
      }
6890
    }
6891
 
6892
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6893
      try {
4496 mandeep.dh 6894
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6895
        __isset_bit_vector = new BitSet(1);
3430 rajveer 6896
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6897
      } catch (org.apache.thrift.TException te) {
6898
        throw new java.io.IOException(te);
6899
      }
6900
    }
6901
 
3383 chandransh 6902
  }
6903
 
4496 mandeep.dh 6904
  public static class scan_result implements org.apache.thrift.TBase<scan_result, scan_result._Fields>, java.io.Serializable, Cloneable   {
6905
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scan_result");
3383 chandransh 6906
 
3430 rajveer 6907
    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 6908
 
3430 rajveer 6909
    private WarehouseServiceException wex; // required
3383 chandransh 6910
 
6911
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6912
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3383 chandransh 6913
      WEX((short)1, "wex");
6914
 
6915
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6916
 
6917
      static {
6918
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6919
          byName.put(field.getFieldName(), field);
6920
        }
6921
      }
6922
 
6923
      /**
6924
       * Find the _Fields constant that matches fieldId, or null if its not found.
6925
       */
6926
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6927
        switch(fieldId) {
6928
          case 1: // WEX
6929
            return WEX;
6930
          default:
6931
            return null;
6932
        }
3383 chandransh 6933
      }
6934
 
6935
      /**
6936
       * Find the _Fields constant that matches fieldId, throwing an exception
6937
       * if it is not found.
6938
       */
6939
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6940
        _Fields fields = findByThriftId(fieldId);
6941
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6942
        return fields;
6943
      }
6944
 
6945
      /**
6946
       * Find the _Fields constant that matches name, or null if its not found.
6947
       */
6948
      public static _Fields findByName(String name) {
6949
        return byName.get(name);
6950
      }
6951
 
6952
      private final short _thriftId;
6953
      private final String _fieldName;
6954
 
6955
      _Fields(short thriftId, String fieldName) {
6956
        _thriftId = thriftId;
6957
        _fieldName = fieldName;
6958
      }
6959
 
6960
      public short getThriftFieldId() {
6961
        return _thriftId;
6962
      }
6963
 
6964
      public String getFieldName() {
6965
        return _fieldName;
6966
      }
6967
    }
6968
 
6969
    // isset id assignments
6970
 
3430 rajveer 6971
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
3383 chandransh 6972
    static {
3430 rajveer 6973
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6974
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6975
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6976
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 6977
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scan_result.class, metaDataMap);
3383 chandransh 6978
    }
6979
 
4496 mandeep.dh 6980
    public scan_result() {
3383 chandransh 6981
    }
6982
 
4496 mandeep.dh 6983
    public scan_result(
3383 chandransh 6984
      WarehouseServiceException wex)
6985
    {
6986
      this();
6987
      this.wex = wex;
6988
    }
6989
 
6990
    /**
6991
     * Performs a deep copy on <i>other</i>.
6992
     */
4496 mandeep.dh 6993
    public scan_result(scan_result other) {
3383 chandransh 6994
      if (other.isSetWex()) {
6995
        this.wex = new WarehouseServiceException(other.wex);
6996
      }
6997
    }
6998
 
4496 mandeep.dh 6999
    public scan_result deepCopy() {
7000
      return new scan_result(this);
3383 chandransh 7001
    }
7002
 
3430 rajveer 7003
    @Override
7004
    public void clear() {
7005
      this.wex = null;
3383 chandransh 7006
    }
7007
 
7008
    public WarehouseServiceException getWex() {
7009
      return this.wex;
7010
    }
7011
 
3430 rajveer 7012
    public void setWex(WarehouseServiceException wex) {
3383 chandransh 7013
      this.wex = wex;
7014
    }
7015
 
7016
    public void unsetWex() {
7017
      this.wex = null;
7018
    }
7019
 
3430 rajveer 7020
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
3383 chandransh 7021
    public boolean isSetWex() {
7022
      return this.wex != null;
7023
    }
7024
 
7025
    public void setWexIsSet(boolean value) {
7026
      if (!value) {
7027
        this.wex = null;
7028
      }
7029
    }
7030
 
7031
    public void setFieldValue(_Fields field, Object value) {
7032
      switch (field) {
7033
      case WEX:
7034
        if (value == null) {
7035
          unsetWex();
7036
        } else {
7037
          setWex((WarehouseServiceException)value);
7038
        }
7039
        break;
7040
 
7041
      }
7042
    }
7043
 
7044
    public Object getFieldValue(_Fields field) {
7045
      switch (field) {
7046
      case WEX:
7047
        return getWex();
7048
 
7049
      }
7050
      throw new IllegalStateException();
7051
    }
7052
 
3430 rajveer 7053
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7054
    public boolean isSet(_Fields field) {
7055
      if (field == null) {
7056
        throw new IllegalArgumentException();
7057
      }
3383 chandransh 7058
 
7059
      switch (field) {
7060
      case WEX:
7061
        return isSetWex();
7062
      }
7063
      throw new IllegalStateException();
7064
    }
7065
 
7066
    @Override
7067
    public boolean equals(Object that) {
7068
      if (that == null)
7069
        return false;
4496 mandeep.dh 7070
      if (that instanceof scan_result)
7071
        return this.equals((scan_result)that);
3383 chandransh 7072
      return false;
7073
    }
7074
 
4496 mandeep.dh 7075
    public boolean equals(scan_result that) {
3383 chandransh 7076
      if (that == null)
7077
        return false;
7078
 
7079
      boolean this_present_wex = true && this.isSetWex();
7080
      boolean that_present_wex = true && that.isSetWex();
7081
      if (this_present_wex || that_present_wex) {
7082
        if (!(this_present_wex && that_present_wex))
7083
          return false;
7084
        if (!this.wex.equals(that.wex))
7085
          return false;
7086
      }
7087
 
7088
      return true;
7089
    }
7090
 
7091
    @Override
7092
    public int hashCode() {
7093
      return 0;
7094
    }
7095
 
4496 mandeep.dh 7096
    public int compareTo(scan_result other) {
3383 chandransh 7097
      if (!getClass().equals(other.getClass())) {
7098
        return getClass().getName().compareTo(other.getClass().getName());
7099
      }
7100
 
7101
      int lastComparison = 0;
4496 mandeep.dh 7102
      scan_result typedOther = (scan_result)other;
3383 chandransh 7103
 
3430 rajveer 7104
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
3383 chandransh 7105
      if (lastComparison != 0) {
7106
        return lastComparison;
7107
      }
3430 rajveer 7108
      if (isSetWex()) {
7109
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
7110
        if (lastComparison != 0) {
7111
          return lastComparison;
7112
        }
3383 chandransh 7113
      }
7114
      return 0;
7115
    }
7116
 
3430 rajveer 7117
    public _Fields fieldForId(int fieldId) {
7118
      return _Fields.findByThriftId(fieldId);
7119
    }
7120
 
7121
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7122
      org.apache.thrift.protocol.TField field;
3383 chandransh 7123
      iprot.readStructBegin();
7124
      while (true)
7125
      {
7126
        field = iprot.readFieldBegin();
3430 rajveer 7127
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
3383 chandransh 7128
          break;
7129
        }
3430 rajveer 7130
        switch (field.id) {
7131
          case 1: // WEX
7132
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7133
              this.wex = new WarehouseServiceException();
7134
              this.wex.read(iprot);
7135
            } else { 
7136
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7137
            }
7138
            break;
7139
          default:
7140
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3383 chandransh 7141
        }
3430 rajveer 7142
        iprot.readFieldEnd();
3383 chandransh 7143
      }
7144
      iprot.readStructEnd();
7145
      validate();
7146
    }
7147
 
3430 rajveer 7148
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
3383 chandransh 7149
      oprot.writeStructBegin(STRUCT_DESC);
7150
 
4496 mandeep.dh 7151
      if (this.isSetWex()) {
3383 chandransh 7152
        oprot.writeFieldBegin(WEX_FIELD_DESC);
7153
        this.wex.write(oprot);
7154
        oprot.writeFieldEnd();
7155
      }
7156
      oprot.writeFieldStop();
7157
      oprot.writeStructEnd();
7158
    }
7159
 
7160
    @Override
7161
    public String toString() {
4496 mandeep.dh 7162
      StringBuilder sb = new StringBuilder("scan_result(");
3383 chandransh 7163
      boolean first = true;
7164
 
7165
      sb.append("wex:");
7166
      if (this.wex == null) {
7167
        sb.append("null");
7168
      } else {
7169
        sb.append(this.wex);
7170
      }
7171
      first = false;
7172
      sb.append(")");
7173
      return sb.toString();
7174
    }
7175
 
3430 rajveer 7176
    public void validate() throws org.apache.thrift.TException {
3383 chandransh 7177
      // check for required fields
7178
    }
7179
 
3430 rajveer 7180
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7181
      try {
7182
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7183
      } catch (org.apache.thrift.TException te) {
7184
        throw new java.io.IOException(te);
7185
      }
7186
    }
7187
 
7188
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7189
      try {
7190
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7191
      } catch (org.apache.thrift.TException te) {
7192
        throw new java.io.IOException(te);
7193
      }
7194
    }
7195
 
3383 chandransh 7196
  }
7197
 
4496 mandeep.dh 7198
  public static class scanSerializedItemForOrder_args implements org.apache.thrift.TBase<scanSerializedItemForOrder_args, scanSerializedItemForOrder_args._Fields>, java.io.Serializable, Cloneable   {
7199
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_args");
2820 chandransh 7200
 
4555 mandeep.dh 7201
    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 7202
    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);
7203
    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 7204
    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);
7205
    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);
7206
    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 7207
 
4555 mandeep.dh 7208
    private String serialNumber; // required
3430 rajveer 7209
    private ScanType type; // required
4496 mandeep.dh 7210
    private long orderId; // required
5110 mandeep.dh 7211
    private long fulfilmentWarehouseId; // required
7212
    private double quantity; // required
7213
    private long billingWarehouseId; // required
2820 chandransh 7214
 
7215
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 7216
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4555 mandeep.dh 7217
      SERIAL_NUMBER((short)1, "serialNumber"),
2820 chandransh 7218
      /**
7219
       * 
7220
       * @see ScanType
7221
       */
4496 mandeep.dh 7222
      TYPE((short)2, "type"),
7223
      ORDER_ID((short)3, "orderId"),
5110 mandeep.dh 7224
      FULFILMENT_WAREHOUSE_ID((short)4, "fulfilmentWarehouseId"),
7225
      QUANTITY((short)5, "quantity"),
7226
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 7227
 
7228
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7229
 
7230
      static {
7231
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7232
          byName.put(field.getFieldName(), field);
7233
        }
7234
      }
7235
 
7236
      /**
7237
       * Find the _Fields constant that matches fieldId, or null if its not found.
7238
       */
7239
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 7240
        switch(fieldId) {
4555 mandeep.dh 7241
          case 1: // SERIAL_NUMBER
7242
            return SERIAL_NUMBER;
4496 mandeep.dh 7243
          case 2: // TYPE
3430 rajveer 7244
            return TYPE;
4496 mandeep.dh 7245
          case 3: // ORDER_ID
7246
            return ORDER_ID;
5110 mandeep.dh 7247
          case 4: // FULFILMENT_WAREHOUSE_ID
7248
            return FULFILMENT_WAREHOUSE_ID;
7249
          case 5: // QUANTITY
7250
            return QUANTITY;
7251
          case 6: // BILLING_WAREHOUSE_ID
7252
            return BILLING_WAREHOUSE_ID;
3430 rajveer 7253
          default:
7254
            return null;
7255
        }
2820 chandransh 7256
      }
7257
 
7258
      /**
7259
       * Find the _Fields constant that matches fieldId, throwing an exception
7260
       * if it is not found.
7261
       */
7262
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7263
        _Fields fields = findByThriftId(fieldId);
7264
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7265
        return fields;
7266
      }
7267
 
7268
      /**
7269
       * Find the _Fields constant that matches name, or null if its not found.
7270
       */
7271
      public static _Fields findByName(String name) {
7272
        return byName.get(name);
7273
      }
7274
 
7275
      private final short _thriftId;
7276
      private final String _fieldName;
7277
 
7278
      _Fields(short thriftId, String fieldName) {
7279
        _thriftId = thriftId;
7280
        _fieldName = fieldName;
7281
      }
7282
 
7283
      public short getThriftFieldId() {
7284
        return _thriftId;
7285
      }
7286
 
7287
      public String getFieldName() {
7288
        return _fieldName;
7289
      }
7290
    }
7291
 
7292
    // isset id assignments
4555 mandeep.dh 7293
    private static final int __ORDERID_ISSET_ID = 0;
5110 mandeep.dh 7294
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 1;
7295
    private static final int __QUANTITY_ISSET_ID = 2;
7296
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
7297
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 7298
 
3430 rajveer 7299
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 7300
    static {
3430 rajveer 7301
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4555 mandeep.dh 7302
      tmpMap.put(_Fields.SERIAL_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("serialNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7303
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
3430 rajveer 7304
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7305
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 7306
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7307
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 7308
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 7309
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 7310
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7311
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
7312
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7313
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 7314
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 7315
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_args.class, metaDataMap);
2820 chandransh 7316
    }
7317
 
4496 mandeep.dh 7318
    public scanSerializedItemForOrder_args() {
2820 chandransh 7319
    }
7320
 
4496 mandeep.dh 7321
    public scanSerializedItemForOrder_args(
4555 mandeep.dh 7322
      String serialNumber,
4496 mandeep.dh 7323
      ScanType type,
7324
      long orderId,
5110 mandeep.dh 7325
      long fulfilmentWarehouseId,
7326
      double quantity,
7327
      long billingWarehouseId)
2820 chandransh 7328
    {
7329
      this();
4555 mandeep.dh 7330
      this.serialNumber = serialNumber;
2820 chandransh 7331
      this.type = type;
4496 mandeep.dh 7332
      this.orderId = orderId;
7333
      setOrderIdIsSet(true);
5110 mandeep.dh 7334
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
7335
      setFulfilmentWarehouseIdIsSet(true);
7336
      this.quantity = quantity;
7337
      setQuantityIsSet(true);
7338
      this.billingWarehouseId = billingWarehouseId;
7339
      setBillingWarehouseIdIsSet(true);
2820 chandransh 7340
    }
7341
 
7342
    /**
7343
     * Performs a deep copy on <i>other</i>.
7344
     */
4496 mandeep.dh 7345
    public scanSerializedItemForOrder_args(scanSerializedItemForOrder_args other) {
2820 chandransh 7346
      __isset_bit_vector.clear();
7347
      __isset_bit_vector.or(other.__isset_bit_vector);
4555 mandeep.dh 7348
      if (other.isSetSerialNumber()) {
7349
        this.serialNumber = other.serialNumber;
7350
      }
2820 chandransh 7351
      if (other.isSetType()) {
7352
        this.type = other.type;
7353
      }
4496 mandeep.dh 7354
      this.orderId = other.orderId;
5110 mandeep.dh 7355
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
7356
      this.quantity = other.quantity;
7357
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 7358
    }
7359
 
4496 mandeep.dh 7360
    public scanSerializedItemForOrder_args deepCopy() {
7361
      return new scanSerializedItemForOrder_args(this);
2820 chandransh 7362
    }
7363
 
3430 rajveer 7364
    @Override
7365
    public void clear() {
4555 mandeep.dh 7366
      this.serialNumber = null;
3430 rajveer 7367
      this.type = null;
4496 mandeep.dh 7368
      setOrderIdIsSet(false);
7369
      this.orderId = 0;
5110 mandeep.dh 7370
      setFulfilmentWarehouseIdIsSet(false);
7371
      this.fulfilmentWarehouseId = 0;
7372
      setQuantityIsSet(false);
7373
      this.quantity = 0.0;
7374
      setBillingWarehouseIdIsSet(false);
7375
      this.billingWarehouseId = 0;
2820 chandransh 7376
    }
7377
 
4555 mandeep.dh 7378
    public String getSerialNumber() {
7379
      return this.serialNumber;
2820 chandransh 7380
    }
7381
 
4555 mandeep.dh 7382
    public void setSerialNumber(String serialNumber) {
7383
      this.serialNumber = serialNumber;
2820 chandransh 7384
    }
7385
 
4555 mandeep.dh 7386
    public void unsetSerialNumber() {
7387
      this.serialNumber = null;
2820 chandransh 7388
    }
7389
 
4555 mandeep.dh 7390
    /** Returns true if field serialNumber is set (has been assigned a value) and false otherwise */
7391
    public boolean isSetSerialNumber() {
7392
      return this.serialNumber != null;
2820 chandransh 7393
    }
7394
 
4555 mandeep.dh 7395
    public void setSerialNumberIsSet(boolean value) {
7396
      if (!value) {
7397
        this.serialNumber = null;
7398
      }
2820 chandransh 7399
    }
7400
 
4496 mandeep.dh 7401
    /**
7402
     * 
7403
     * @see ScanType
7404
     */
7405
    public ScanType getType() {
7406
      return this.type;
2820 chandransh 7407
    }
7408
 
4496 mandeep.dh 7409
    /**
7410
     * 
7411
     * @see ScanType
7412
     */
7413
    public void setType(ScanType type) {
7414
      this.type = type;
2820 chandransh 7415
    }
7416
 
4496 mandeep.dh 7417
    public void unsetType() {
7418
      this.type = null;
2820 chandransh 7419
    }
7420
 
4496 mandeep.dh 7421
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
7422
    public boolean isSetType() {
7423
      return this.type != null;
2820 chandransh 7424
    }
7425
 
4496 mandeep.dh 7426
    public void setTypeIsSet(boolean value) {
2820 chandransh 7427
      if (!value) {
4496 mandeep.dh 7428
        this.type = null;
2820 chandransh 7429
      }
7430
    }
7431
 
4496 mandeep.dh 7432
    public long getOrderId() {
7433
      return this.orderId;
2820 chandransh 7434
    }
7435
 
4496 mandeep.dh 7436
    public void setOrderId(long orderId) {
7437
      this.orderId = orderId;
7438
      setOrderIdIsSet(true);
2820 chandransh 7439
    }
7440
 
4496 mandeep.dh 7441
    public void unsetOrderId() {
7442
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
2820 chandransh 7443
    }
7444
 
4496 mandeep.dh 7445
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
7446
    public boolean isSetOrderId() {
7447
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
2820 chandransh 7448
    }
7449
 
4496 mandeep.dh 7450
    public void setOrderIdIsSet(boolean value) {
7451
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
2820 chandransh 7452
    }
7453
 
5110 mandeep.dh 7454
    public long getFulfilmentWarehouseId() {
7455
      return this.fulfilmentWarehouseId;
2820 chandransh 7456
    }
7457
 
5110 mandeep.dh 7458
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
7459
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
7460
      setFulfilmentWarehouseIdIsSet(true);
2820 chandransh 7461
    }
7462
 
5110 mandeep.dh 7463
    public void unsetFulfilmentWarehouseId() {
7464
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 7465
    }
7466
 
5110 mandeep.dh 7467
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
7468
    public boolean isSetFulfilmentWarehouseId() {
7469
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
2820 chandransh 7470
    }
7471
 
5110 mandeep.dh 7472
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
7473
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
2820 chandransh 7474
    }
7475
 
5110 mandeep.dh 7476
    public double getQuantity() {
7477
      return this.quantity;
7478
    }
7479
 
7480
    public void setQuantity(double quantity) {
7481
      this.quantity = quantity;
7482
      setQuantityIsSet(true);
7483
    }
7484
 
7485
    public void unsetQuantity() {
7486
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
7487
    }
7488
 
7489
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
7490
    public boolean isSetQuantity() {
7491
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
7492
    }
7493
 
7494
    public void setQuantityIsSet(boolean value) {
7495
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
7496
    }
7497
 
7498
    public long getBillingWarehouseId() {
7499
      return this.billingWarehouseId;
7500
    }
7501
 
7502
    public void setBillingWarehouseId(long billingWarehouseId) {
7503
      this.billingWarehouseId = billingWarehouseId;
7504
      setBillingWarehouseIdIsSet(true);
7505
    }
7506
 
7507
    public void unsetBillingWarehouseId() {
7508
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
7509
    }
7510
 
7511
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
7512
    public boolean isSetBillingWarehouseId() {
7513
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
7514
    }
7515
 
7516
    public void setBillingWarehouseIdIsSet(boolean value) {
7517
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
7518
    }
7519
 
2820 chandransh 7520
    public void setFieldValue(_Fields field, Object value) {
7521
      switch (field) {
4555 mandeep.dh 7522
      case SERIAL_NUMBER:
2820 chandransh 7523
        if (value == null) {
4555 mandeep.dh 7524
          unsetSerialNumber();
2820 chandransh 7525
        } else {
4555 mandeep.dh 7526
          setSerialNumber((String)value);
2820 chandransh 7527
        }
7528
        break;
7529
 
4496 mandeep.dh 7530
      case TYPE:
2820 chandransh 7531
        if (value == null) {
4496 mandeep.dh 7532
          unsetType();
2820 chandransh 7533
        } else {
4496 mandeep.dh 7534
          setType((ScanType)value);
2820 chandransh 7535
        }
7536
        break;
7537
 
4496 mandeep.dh 7538
      case ORDER_ID:
2820 chandransh 7539
        if (value == null) {
4496 mandeep.dh 7540
          unsetOrderId();
2820 chandransh 7541
        } else {
4496 mandeep.dh 7542
          setOrderId((Long)value);
2820 chandransh 7543
        }
7544
        break;
7545
 
5110 mandeep.dh 7546
      case FULFILMENT_WAREHOUSE_ID:
2820 chandransh 7547
        if (value == null) {
5110 mandeep.dh 7548
          unsetFulfilmentWarehouseId();
2820 chandransh 7549
        } else {
5110 mandeep.dh 7550
          setFulfilmentWarehouseId((Long)value);
2820 chandransh 7551
        }
7552
        break;
7553
 
5110 mandeep.dh 7554
      case QUANTITY:
7555
        if (value == null) {
7556
          unsetQuantity();
7557
        } else {
7558
          setQuantity((Double)value);
7559
        }
7560
        break;
7561
 
7562
      case BILLING_WAREHOUSE_ID:
7563
        if (value == null) {
7564
          unsetBillingWarehouseId();
7565
        } else {
7566
          setBillingWarehouseId((Long)value);
7567
        }
7568
        break;
7569
 
2820 chandransh 7570
      }
7571
    }
7572
 
7573
    public Object getFieldValue(_Fields field) {
7574
      switch (field) {
4555 mandeep.dh 7575
      case SERIAL_NUMBER:
7576
        return getSerialNumber();
2820 chandransh 7577
 
7578
      case TYPE:
7579
        return getType();
7580
 
4496 mandeep.dh 7581
      case ORDER_ID:
7582
        return Long.valueOf(getOrderId());
7583
 
5110 mandeep.dh 7584
      case FULFILMENT_WAREHOUSE_ID:
7585
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 7586
 
5110 mandeep.dh 7587
      case QUANTITY:
7588
        return Double.valueOf(getQuantity());
7589
 
7590
      case BILLING_WAREHOUSE_ID:
7591
        return Long.valueOf(getBillingWarehouseId());
7592
 
2820 chandransh 7593
      }
7594
      throw new IllegalStateException();
7595
    }
7596
 
3430 rajveer 7597
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7598
    public boolean isSet(_Fields field) {
7599
      if (field == null) {
7600
        throw new IllegalArgumentException();
7601
      }
2820 chandransh 7602
 
7603
      switch (field) {
4555 mandeep.dh 7604
      case SERIAL_NUMBER:
7605
        return isSetSerialNumber();
2820 chandransh 7606
      case TYPE:
7607
        return isSetType();
4496 mandeep.dh 7608
      case ORDER_ID:
7609
        return isSetOrderId();
5110 mandeep.dh 7610
      case FULFILMENT_WAREHOUSE_ID:
7611
        return isSetFulfilmentWarehouseId();
7612
      case QUANTITY:
7613
        return isSetQuantity();
7614
      case BILLING_WAREHOUSE_ID:
7615
        return isSetBillingWarehouseId();
2820 chandransh 7616
      }
7617
      throw new IllegalStateException();
7618
    }
7619
 
7620
    @Override
7621
    public boolean equals(Object that) {
7622
      if (that == null)
7623
        return false;
4496 mandeep.dh 7624
      if (that instanceof scanSerializedItemForOrder_args)
7625
        return this.equals((scanSerializedItemForOrder_args)that);
2820 chandransh 7626
      return false;
7627
    }
7628
 
4496 mandeep.dh 7629
    public boolean equals(scanSerializedItemForOrder_args that) {
2820 chandransh 7630
      if (that == null)
7631
        return false;
7632
 
4555 mandeep.dh 7633
      boolean this_present_serialNumber = true && this.isSetSerialNumber();
7634
      boolean that_present_serialNumber = true && that.isSetSerialNumber();
7635
      if (this_present_serialNumber || that_present_serialNumber) {
7636
        if (!(this_present_serialNumber && that_present_serialNumber))
2820 chandransh 7637
          return false;
4555 mandeep.dh 7638
        if (!this.serialNumber.equals(that.serialNumber))
2820 chandransh 7639
          return false;
7640
      }
7641
 
4496 mandeep.dh 7642
      boolean this_present_type = true && this.isSetType();
7643
      boolean that_present_type = true && that.isSetType();
7644
      if (this_present_type || that_present_type) {
7645
        if (!(this_present_type && that_present_type))
2820 chandransh 7646
          return false;
4496 mandeep.dh 7647
        if (!this.type.equals(that.type))
2820 chandransh 7648
          return false;
7649
      }
7650
 
4496 mandeep.dh 7651
      boolean this_present_orderId = true;
7652
      boolean that_present_orderId = true;
7653
      if (this_present_orderId || that_present_orderId) {
7654
        if (!(this_present_orderId && that_present_orderId))
2820 chandransh 7655
          return false;
4496 mandeep.dh 7656
        if (this.orderId != that.orderId)
2820 chandransh 7657
          return false;
7658
      }
7659
 
5110 mandeep.dh 7660
      boolean this_present_fulfilmentWarehouseId = true;
7661
      boolean that_present_fulfilmentWarehouseId = true;
7662
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
7663
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
2820 chandransh 7664
          return false;
5110 mandeep.dh 7665
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
2820 chandransh 7666
          return false;
7667
      }
7668
 
5110 mandeep.dh 7669
      boolean this_present_quantity = true;
7670
      boolean that_present_quantity = true;
7671
      if (this_present_quantity || that_present_quantity) {
7672
        if (!(this_present_quantity && that_present_quantity))
7673
          return false;
7674
        if (this.quantity != that.quantity)
7675
          return false;
7676
      }
7677
 
7678
      boolean this_present_billingWarehouseId = true;
7679
      boolean that_present_billingWarehouseId = true;
7680
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
7681
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
7682
          return false;
7683
        if (this.billingWarehouseId != that.billingWarehouseId)
7684
          return false;
7685
      }
7686
 
2820 chandransh 7687
      return true;
7688
    }
7689
 
7690
    @Override
7691
    public int hashCode() {
7692
      return 0;
7693
    }
7694
 
4496 mandeep.dh 7695
    public int compareTo(scanSerializedItemForOrder_args other) {
2820 chandransh 7696
      if (!getClass().equals(other.getClass())) {
7697
        return getClass().getName().compareTo(other.getClass().getName());
7698
      }
7699
 
7700
      int lastComparison = 0;
4496 mandeep.dh 7701
      scanSerializedItemForOrder_args typedOther = (scanSerializedItemForOrder_args)other;
2820 chandransh 7702
 
4555 mandeep.dh 7703
      lastComparison = Boolean.valueOf(isSetSerialNumber()).compareTo(typedOther.isSetSerialNumber());
2820 chandransh 7704
      if (lastComparison != 0) {
7705
        return lastComparison;
7706
      }
4555 mandeep.dh 7707
      if (isSetSerialNumber()) {
7708
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.serialNumber, typedOther.serialNumber);
3430 rajveer 7709
        if (lastComparison != 0) {
7710
          return lastComparison;
7711
        }
2820 chandransh 7712
      }
4496 mandeep.dh 7713
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 7714
      if (lastComparison != 0) {
7715
        return lastComparison;
7716
      }
4496 mandeep.dh 7717
      if (isSetType()) {
7718
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 7719
        if (lastComparison != 0) {
7720
          return lastComparison;
7721
        }
2820 chandransh 7722
      }
4496 mandeep.dh 7723
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
2820 chandransh 7724
      if (lastComparison != 0) {
7725
        return lastComparison;
7726
      }
4496 mandeep.dh 7727
      if (isSetOrderId()) {
7728
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
3430 rajveer 7729
        if (lastComparison != 0) {
7730
          return lastComparison;
7731
        }
2820 chandransh 7732
      }
5110 mandeep.dh 7733
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
2820 chandransh 7734
      if (lastComparison != 0) {
7735
        return lastComparison;
7736
      }
5110 mandeep.dh 7737
      if (isSetFulfilmentWarehouseId()) {
7738
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
3430 rajveer 7739
        if (lastComparison != 0) {
7740
          return lastComparison;
7741
        }
2820 chandransh 7742
      }
5110 mandeep.dh 7743
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
7744
      if (lastComparison != 0) {
7745
        return lastComparison;
7746
      }
7747
      if (isSetQuantity()) {
7748
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
7749
        if (lastComparison != 0) {
7750
          return lastComparison;
7751
        }
7752
      }
7753
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
7754
      if (lastComparison != 0) {
7755
        return lastComparison;
7756
      }
7757
      if (isSetBillingWarehouseId()) {
7758
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
7759
        if (lastComparison != 0) {
7760
          return lastComparison;
7761
        }
7762
      }
2820 chandransh 7763
      return 0;
7764
    }
7765
 
3430 rajveer 7766
    public _Fields fieldForId(int fieldId) {
7767
      return _Fields.findByThriftId(fieldId);
7768
    }
7769
 
7770
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7771
      org.apache.thrift.protocol.TField field;
2820 chandransh 7772
      iprot.readStructBegin();
7773
      while (true)
7774
      {
7775
        field = iprot.readFieldBegin();
3430 rajveer 7776
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 7777
          break;
7778
        }
3430 rajveer 7779
        switch (field.id) {
4555 mandeep.dh 7780
          case 1: // SERIAL_NUMBER
7781
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
7782
              this.serialNumber = iprot.readString();
3430 rajveer 7783
            } else { 
7784
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7785
            }
7786
            break;
4496 mandeep.dh 7787
          case 2: // TYPE
7788
            if (field.type == org.apache.thrift.protocol.TType.I32) {
7789
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 7790
            } else { 
7791
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7792
            }
7793
            break;
4496 mandeep.dh 7794
          case 3: // ORDER_ID
7795
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7796
              this.orderId = iprot.readI64();
7797
              setOrderIdIsSet(true);
3430 rajveer 7798
            } else { 
7799
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7800
            }
7801
            break;
5110 mandeep.dh 7802
          case 4: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 7803
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 7804
              this.fulfilmentWarehouseId = iprot.readI64();
7805
              setFulfilmentWarehouseIdIsSet(true);
3430 rajveer 7806
            } else { 
7807
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7808
            }
7809
            break;
5110 mandeep.dh 7810
          case 5: // QUANTITY
7811
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
7812
              this.quantity = iprot.readDouble();
7813
              setQuantityIsSet(true);
7814
            } else { 
7815
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7816
            }
7817
            break;
7818
          case 6: // BILLING_WAREHOUSE_ID
7819
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7820
              this.billingWarehouseId = iprot.readI64();
7821
              setBillingWarehouseIdIsSet(true);
7822
            } else { 
7823
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7824
            }
7825
            break;
3430 rajveer 7826
          default:
7827
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 7828
        }
3430 rajveer 7829
        iprot.readFieldEnd();
2820 chandransh 7830
      }
7831
      iprot.readStructEnd();
7832
      validate();
7833
    }
7834
 
3430 rajveer 7835
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 7836
      validate();
7837
 
7838
      oprot.writeStructBegin(STRUCT_DESC);
4555 mandeep.dh 7839
      if (this.serialNumber != null) {
7840
        oprot.writeFieldBegin(SERIAL_NUMBER_FIELD_DESC);
7841
        oprot.writeString(this.serialNumber);
7842
        oprot.writeFieldEnd();
7843
      }
2820 chandransh 7844
      if (this.type != null) {
7845
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
7846
        oprot.writeI32(this.type.getValue());
7847
        oprot.writeFieldEnd();
7848
      }
4496 mandeep.dh 7849
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
7850
      oprot.writeI64(this.orderId);
7851
      oprot.writeFieldEnd();
5110 mandeep.dh 7852
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
7853
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 7854
      oprot.writeFieldEnd();
5110 mandeep.dh 7855
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
7856
      oprot.writeDouble(this.quantity);
7857
      oprot.writeFieldEnd();
7858
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
7859
      oprot.writeI64(this.billingWarehouseId);
7860
      oprot.writeFieldEnd();
2820 chandransh 7861
      oprot.writeFieldStop();
7862
      oprot.writeStructEnd();
7863
    }
7864
 
7865
    @Override
7866
    public String toString() {
4496 mandeep.dh 7867
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_args(");
2820 chandransh 7868
      boolean first = true;
7869
 
4555 mandeep.dh 7870
      sb.append("serialNumber:");
7871
      if (this.serialNumber == null) {
7872
        sb.append("null");
7873
      } else {
7874
        sb.append(this.serialNumber);
7875
      }
2820 chandransh 7876
      first = false;
7877
      if (!first) sb.append(", ");
4496 mandeep.dh 7878
      sb.append("type:");
7879
      if (this.type == null) {
2820 chandransh 7880
        sb.append("null");
7881
      } else {
4496 mandeep.dh 7882
        sb.append(this.type);
2820 chandransh 7883
      }
7884
      first = false;
7885
      if (!first) sb.append(", ");
4496 mandeep.dh 7886
      sb.append("orderId:");
7887
      sb.append(this.orderId);
2820 chandransh 7888
      first = false;
7889
      if (!first) sb.append(", ");
5110 mandeep.dh 7890
      sb.append("fulfilmentWarehouseId:");
7891
      sb.append(this.fulfilmentWarehouseId);
2820 chandransh 7892
      first = false;
5110 mandeep.dh 7893
      if (!first) sb.append(", ");
7894
      sb.append("quantity:");
7895
      sb.append(this.quantity);
7896
      first = false;
7897
      if (!first) sb.append(", ");
7898
      sb.append("billingWarehouseId:");
7899
      sb.append(this.billingWarehouseId);
7900
      first = false;
2820 chandransh 7901
      sb.append(")");
7902
      return sb.toString();
7903
    }
7904
 
3430 rajveer 7905
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 7906
      // check for required fields
7907
    }
7908
 
3430 rajveer 7909
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7910
      try {
7911
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7912
      } catch (org.apache.thrift.TException te) {
7913
        throw new java.io.IOException(te);
7914
      }
7915
    }
7916
 
7917
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7918
      try {
7919
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7920
      } catch (org.apache.thrift.TException te) {
7921
        throw new java.io.IOException(te);
7922
      }
7923
    }
7924
 
2820 chandransh 7925
  }
7926
 
4496 mandeep.dh 7927
  public static class scanSerializedItemForOrder_result implements org.apache.thrift.TBase<scanSerializedItemForOrder_result, scanSerializedItemForOrder_result._Fields>, java.io.Serializable, Cloneable   {
7928
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanSerializedItemForOrder_result");
2820 chandransh 7929
 
4555 mandeep.dh 7930
    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 7931
    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 7932
 
4555 mandeep.dh 7933
    private InventoryItem success; // required
3430 rajveer 7934
    private WarehouseServiceException wex; // required
2820 chandransh 7935
 
7936
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 7937
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
4496 mandeep.dh 7938
      SUCCESS((short)0, "success"),
2820 chandransh 7939
      WEX((short)1, "wex");
7940
 
7941
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7942
 
7943
      static {
7944
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7945
          byName.put(field.getFieldName(), field);
7946
        }
7947
      }
7948
 
7949
      /**
7950
       * Find the _Fields constant that matches fieldId, or null if its not found.
7951
       */
7952
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 7953
        switch(fieldId) {
4496 mandeep.dh 7954
          case 0: // SUCCESS
7955
            return SUCCESS;
3430 rajveer 7956
          case 1: // WEX
7957
            return WEX;
7958
          default:
7959
            return null;
7960
        }
2820 chandransh 7961
      }
7962
 
7963
      /**
7964
       * Find the _Fields constant that matches fieldId, throwing an exception
7965
       * if it is not found.
7966
       */
7967
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7968
        _Fields fields = findByThriftId(fieldId);
7969
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7970
        return fields;
7971
      }
7972
 
7973
      /**
7974
       * Find the _Fields constant that matches name, or null if its not found.
7975
       */
7976
      public static _Fields findByName(String name) {
7977
        return byName.get(name);
7978
      }
7979
 
7980
      private final short _thriftId;
7981
      private final String _fieldName;
7982
 
7983
      _Fields(short thriftId, String fieldName) {
7984
        _thriftId = thriftId;
7985
        _fieldName = fieldName;
7986
      }
7987
 
7988
      public short getThriftFieldId() {
7989
        return _thriftId;
7990
      }
7991
 
7992
      public String getFieldName() {
7993
        return _fieldName;
7994
      }
7995
    }
7996
 
7997
    // isset id assignments
7998
 
3430 rajveer 7999
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 8000
    static {
3430 rajveer 8001
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4496 mandeep.dh 8002
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4555 mandeep.dh 8003
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 8004
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8005
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8006
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 8007
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanSerializedItemForOrder_result.class, metaDataMap);
2820 chandransh 8008
    }
8009
 
4496 mandeep.dh 8010
    public scanSerializedItemForOrder_result() {
2820 chandransh 8011
    }
8012
 
4496 mandeep.dh 8013
    public scanSerializedItemForOrder_result(
4555 mandeep.dh 8014
      InventoryItem success,
2820 chandransh 8015
      WarehouseServiceException wex)
8016
    {
8017
      this();
4496 mandeep.dh 8018
      this.success = success;
2820 chandransh 8019
      this.wex = wex;
8020
    }
8021
 
8022
    /**
8023
     * Performs a deep copy on <i>other</i>.
8024
     */
4496 mandeep.dh 8025
    public scanSerializedItemForOrder_result(scanSerializedItemForOrder_result other) {
4555 mandeep.dh 8026
      if (other.isSetSuccess()) {
8027
        this.success = new InventoryItem(other.success);
8028
      }
2820 chandransh 8029
      if (other.isSetWex()) {
8030
        this.wex = new WarehouseServiceException(other.wex);
8031
      }
8032
    }
8033
 
4496 mandeep.dh 8034
    public scanSerializedItemForOrder_result deepCopy() {
8035
      return new scanSerializedItemForOrder_result(this);
2820 chandransh 8036
    }
8037
 
3430 rajveer 8038
    @Override
8039
    public void clear() {
4555 mandeep.dh 8040
      this.success = null;
3430 rajveer 8041
      this.wex = null;
2820 chandransh 8042
    }
8043
 
4555 mandeep.dh 8044
    public InventoryItem getSuccess() {
4496 mandeep.dh 8045
      return this.success;
8046
    }
8047
 
4555 mandeep.dh 8048
    public void setSuccess(InventoryItem success) {
4496 mandeep.dh 8049
      this.success = success;
8050
    }
8051
 
8052
    public void unsetSuccess() {
4555 mandeep.dh 8053
      this.success = null;
4496 mandeep.dh 8054
    }
8055
 
8056
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
8057
    public boolean isSetSuccess() {
4555 mandeep.dh 8058
      return this.success != null;
4496 mandeep.dh 8059
    }
8060
 
8061
    public void setSuccessIsSet(boolean value) {
4555 mandeep.dh 8062
      if (!value) {
8063
        this.success = null;
8064
      }
4496 mandeep.dh 8065
    }
8066
 
2820 chandransh 8067
    public WarehouseServiceException getWex() {
8068
      return this.wex;
8069
    }
8070
 
3430 rajveer 8071
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 8072
      this.wex = wex;
8073
    }
8074
 
8075
    public void unsetWex() {
8076
      this.wex = null;
8077
    }
8078
 
3430 rajveer 8079
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 8080
    public boolean isSetWex() {
8081
      return this.wex != null;
8082
    }
8083
 
8084
    public void setWexIsSet(boolean value) {
8085
      if (!value) {
8086
        this.wex = null;
8087
      }
8088
    }
8089
 
8090
    public void setFieldValue(_Fields field, Object value) {
8091
      switch (field) {
4496 mandeep.dh 8092
      case SUCCESS:
8093
        if (value == null) {
8094
          unsetSuccess();
8095
        } else {
4555 mandeep.dh 8096
          setSuccess((InventoryItem)value);
4496 mandeep.dh 8097
        }
8098
        break;
8099
 
2820 chandransh 8100
      case WEX:
8101
        if (value == null) {
8102
          unsetWex();
8103
        } else {
8104
          setWex((WarehouseServiceException)value);
8105
        }
8106
        break;
8107
 
8108
      }
8109
    }
8110
 
8111
    public Object getFieldValue(_Fields field) {
8112
      switch (field) {
4496 mandeep.dh 8113
      case SUCCESS:
4555 mandeep.dh 8114
        return getSuccess();
4496 mandeep.dh 8115
 
2820 chandransh 8116
      case WEX:
8117
        return getWex();
8118
 
8119
      }
8120
      throw new IllegalStateException();
8121
    }
8122
 
3430 rajveer 8123
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8124
    public boolean isSet(_Fields field) {
8125
      if (field == null) {
8126
        throw new IllegalArgumentException();
8127
      }
2820 chandransh 8128
 
8129
      switch (field) {
4496 mandeep.dh 8130
      case SUCCESS:
8131
        return isSetSuccess();
2820 chandransh 8132
      case WEX:
8133
        return isSetWex();
8134
      }
8135
      throw new IllegalStateException();
8136
    }
8137
 
8138
    @Override
8139
    public boolean equals(Object that) {
8140
      if (that == null)
8141
        return false;
4496 mandeep.dh 8142
      if (that instanceof scanSerializedItemForOrder_result)
8143
        return this.equals((scanSerializedItemForOrder_result)that);
2820 chandransh 8144
      return false;
8145
    }
8146
 
4496 mandeep.dh 8147
    public boolean equals(scanSerializedItemForOrder_result that) {
2820 chandransh 8148
      if (that == null)
8149
        return false;
8150
 
4555 mandeep.dh 8151
      boolean this_present_success = true && this.isSetSuccess();
8152
      boolean that_present_success = true && that.isSetSuccess();
4496 mandeep.dh 8153
      if (this_present_success || that_present_success) {
8154
        if (!(this_present_success && that_present_success))
8155
          return false;
4555 mandeep.dh 8156
        if (!this.success.equals(that.success))
4496 mandeep.dh 8157
          return false;
8158
      }
8159
 
2820 chandransh 8160
      boolean this_present_wex = true && this.isSetWex();
8161
      boolean that_present_wex = true && that.isSetWex();
8162
      if (this_present_wex || that_present_wex) {
8163
        if (!(this_present_wex && that_present_wex))
8164
          return false;
8165
        if (!this.wex.equals(that.wex))
8166
          return false;
8167
      }
8168
 
8169
      return true;
8170
    }
8171
 
8172
    @Override
8173
    public int hashCode() {
8174
      return 0;
8175
    }
8176
 
4496 mandeep.dh 8177
    public int compareTo(scanSerializedItemForOrder_result other) {
2820 chandransh 8178
      if (!getClass().equals(other.getClass())) {
8179
        return getClass().getName().compareTo(other.getClass().getName());
8180
      }
8181
 
8182
      int lastComparison = 0;
4496 mandeep.dh 8183
      scanSerializedItemForOrder_result typedOther = (scanSerializedItemForOrder_result)other;
2820 chandransh 8184
 
4496 mandeep.dh 8185
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
8186
      if (lastComparison != 0) {
8187
        return lastComparison;
8188
      }
8189
      if (isSetSuccess()) {
8190
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8191
        if (lastComparison != 0) {
8192
          return lastComparison;
8193
        }
8194
      }
3430 rajveer 8195
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 8196
      if (lastComparison != 0) {
8197
        return lastComparison;
8198
      }
3430 rajveer 8199
      if (isSetWex()) {
8200
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
8201
        if (lastComparison != 0) {
8202
          return lastComparison;
8203
        }
2820 chandransh 8204
      }
8205
      return 0;
8206
    }
8207
 
3430 rajveer 8208
    public _Fields fieldForId(int fieldId) {
8209
      return _Fields.findByThriftId(fieldId);
8210
    }
8211
 
8212
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8213
      org.apache.thrift.protocol.TField field;
2820 chandransh 8214
      iprot.readStructBegin();
8215
      while (true)
8216
      {
8217
        field = iprot.readFieldBegin();
3430 rajveer 8218
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 8219
          break;
8220
        }
3430 rajveer 8221
        switch (field.id) {
4496 mandeep.dh 8222
          case 0: // SUCCESS
4555 mandeep.dh 8223
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8224
              this.success = new InventoryItem();
8225
              this.success.read(iprot);
4496 mandeep.dh 8226
            } else { 
8227
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8228
            }
8229
            break;
3430 rajveer 8230
          case 1: // WEX
8231
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8232
              this.wex = new WarehouseServiceException();
8233
              this.wex.read(iprot);
8234
            } else { 
8235
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8236
            }
8237
            break;
8238
          default:
8239
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 8240
        }
3430 rajveer 8241
        iprot.readFieldEnd();
2820 chandransh 8242
      }
8243
      iprot.readStructEnd();
8244
      validate();
8245
    }
8246
 
3430 rajveer 8247
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 8248
      oprot.writeStructBegin(STRUCT_DESC);
8249
 
4496 mandeep.dh 8250
      if (this.isSetSuccess()) {
8251
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4555 mandeep.dh 8252
        this.success.write(oprot);
4496 mandeep.dh 8253
        oprot.writeFieldEnd();
8254
      } else if (this.isSetWex()) {
2820 chandransh 8255
        oprot.writeFieldBegin(WEX_FIELD_DESC);
8256
        this.wex.write(oprot);
8257
        oprot.writeFieldEnd();
8258
      }
8259
      oprot.writeFieldStop();
8260
      oprot.writeStructEnd();
8261
    }
8262
 
8263
    @Override
8264
    public String toString() {
4496 mandeep.dh 8265
      StringBuilder sb = new StringBuilder("scanSerializedItemForOrder_result(");
2820 chandransh 8266
      boolean first = true;
8267
 
4496 mandeep.dh 8268
      sb.append("success:");
4555 mandeep.dh 8269
      if (this.success == null) {
8270
        sb.append("null");
8271
      } else {
8272
        sb.append(this.success);
8273
      }
4496 mandeep.dh 8274
      first = false;
8275
      if (!first) sb.append(", ");
2820 chandransh 8276
      sb.append("wex:");
8277
      if (this.wex == null) {
8278
        sb.append("null");
8279
      } else {
8280
        sb.append(this.wex);
8281
      }
8282
      first = false;
8283
      sb.append(")");
8284
      return sb.toString();
8285
    }
8286
 
3430 rajveer 8287
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 8288
      // check for required fields
8289
    }
8290
 
3430 rajveer 8291
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8292
      try {
8293
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8294
      } catch (org.apache.thrift.TException te) {
8295
        throw new java.io.IOException(te);
8296
      }
8297
    }
8298
 
8299
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8300
      try {
8301
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8302
      } catch (org.apache.thrift.TException te) {
8303
        throw new java.io.IOException(te);
8304
      }
8305
    }
8306
 
2820 chandransh 8307
  }
8308
 
4496 mandeep.dh 8309
  public static class scanForOrder_args implements org.apache.thrift.TBase<scanForOrder_args, scanForOrder_args._Fields>, java.io.Serializable, Cloneable   {
8310
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_args");
2820 chandransh 8311
 
5361 mandeep.dh 8312
    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 8313
    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);
8314
    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);
8315
    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 8316
    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 8317
    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 8318
 
5361 mandeep.dh 8319
    private InventoryItem inventoryItem; // required
3430 rajveer 8320
    private ScanType type; // required
4496 mandeep.dh 8321
    private long quantity; // required
8322
    private long orderId; // required
5110 mandeep.dh 8323
    private long fulfilmentWarehouseId; // required
5361 mandeep.dh 8324
    private long billingWarehouseId; // required
2820 chandransh 8325
 
8326
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 8327
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 8328
      INVENTORY_ITEM((short)1, "inventoryItem"),
2820 chandransh 8329
      /**
8330
       * 
8331
       * @see ScanType
8332
       */
4496 mandeep.dh 8333
      TYPE((short)2, "type"),
8334
      QUANTITY((short)3, "quantity"),
8335
      ORDER_ID((short)4, "orderId"),
5361 mandeep.dh 8336
      FULFILMENT_WAREHOUSE_ID((short)5, "fulfilmentWarehouseId"),
8337
      BILLING_WAREHOUSE_ID((short)6, "billingWarehouseId");
2820 chandransh 8338
 
8339
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8340
 
8341
      static {
8342
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8343
          byName.put(field.getFieldName(), field);
8344
        }
8345
      }
8346
 
8347
      /**
8348
       * Find the _Fields constant that matches fieldId, or null if its not found.
8349
       */
8350
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 8351
        switch(fieldId) {
5361 mandeep.dh 8352
          case 1: // INVENTORY_ITEM
8353
            return INVENTORY_ITEM;
4496 mandeep.dh 8354
          case 2: // TYPE
3430 rajveer 8355
            return TYPE;
4496 mandeep.dh 8356
          case 3: // QUANTITY
8357
            return QUANTITY;
8358
          case 4: // ORDER_ID
8359
            return ORDER_ID;
5110 mandeep.dh 8360
          case 5: // FULFILMENT_WAREHOUSE_ID
8361
            return FULFILMENT_WAREHOUSE_ID;
5361 mandeep.dh 8362
          case 6: // BILLING_WAREHOUSE_ID
8363
            return BILLING_WAREHOUSE_ID;
3430 rajveer 8364
          default:
8365
            return null;
8366
        }
2820 chandransh 8367
      }
8368
 
8369
      /**
8370
       * Find the _Fields constant that matches fieldId, throwing an exception
8371
       * if it is not found.
8372
       */
8373
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8374
        _Fields fields = findByThriftId(fieldId);
8375
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8376
        return fields;
8377
      }
8378
 
8379
      /**
8380
       * Find the _Fields constant that matches name, or null if its not found.
8381
       */
8382
      public static _Fields findByName(String name) {
8383
        return byName.get(name);
8384
      }
8385
 
8386
      private final short _thriftId;
8387
      private final String _fieldName;
8388
 
8389
      _Fields(short thriftId, String fieldName) {
8390
        _thriftId = thriftId;
8391
        _fieldName = fieldName;
8392
      }
8393
 
8394
      public short getThriftFieldId() {
8395
        return _thriftId;
8396
      }
8397
 
8398
      public String getFieldName() {
8399
        return _fieldName;
8400
      }
8401
    }
8402
 
8403
    // isset id assignments
5361 mandeep.dh 8404
    private static final int __QUANTITY_ISSET_ID = 0;
8405
    private static final int __ORDERID_ISSET_ID = 1;
8406
    private static final int __FULFILMENTWAREHOUSEID_ISSET_ID = 2;
8407
    private static final int __BILLINGWAREHOUSEID_ISSET_ID = 3;
4496 mandeep.dh 8408
    private BitSet __isset_bit_vector = new BitSet(4);
2820 chandransh 8409
 
3430 rajveer 8410
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 8411
    static {
3430 rajveer 8412
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 8413
      tmpMap.put(_Fields.INVENTORY_ITEM, new org.apache.thrift.meta_data.FieldMetaData("inventoryItem", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8414
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 8415
      tmpMap.put(_Fields.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8416
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
4496 mandeep.dh 8417
      tmpMap.put(_Fields.QUANTITY, new org.apache.thrift.meta_data.FieldMetaData("quantity", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8418
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8419
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8420
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5110 mandeep.dh 8421
      tmpMap.put(_Fields.FULFILMENT_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("fulfilmentWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4496 mandeep.dh 8422
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5361 mandeep.dh 8423
      tmpMap.put(_Fields.BILLING_WAREHOUSE_ID, new org.apache.thrift.meta_data.FieldMetaData("billingWarehouseId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8424
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3430 rajveer 8425
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 8426
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_args.class, metaDataMap);
2820 chandransh 8427
    }
8428
 
4496 mandeep.dh 8429
    public scanForOrder_args() {
2820 chandransh 8430
    }
8431
 
4496 mandeep.dh 8432
    public scanForOrder_args(
5361 mandeep.dh 8433
      InventoryItem inventoryItem,
4496 mandeep.dh 8434
      ScanType type,
8435
      long quantity,
8436
      long orderId,
5361 mandeep.dh 8437
      long fulfilmentWarehouseId,
8438
      long billingWarehouseId)
2820 chandransh 8439
    {
8440
      this();
5361 mandeep.dh 8441
      this.inventoryItem = inventoryItem;
2820 chandransh 8442
      this.type = type;
4496 mandeep.dh 8443
      this.quantity = quantity;
8444
      setQuantityIsSet(true);
8445
      this.orderId = orderId;
8446
      setOrderIdIsSet(true);
5110 mandeep.dh 8447
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
8448
      setFulfilmentWarehouseIdIsSet(true);
5361 mandeep.dh 8449
      this.billingWarehouseId = billingWarehouseId;
8450
      setBillingWarehouseIdIsSet(true);
2820 chandransh 8451
    }
8452
 
8453
    /**
8454
     * Performs a deep copy on <i>other</i>.
8455
     */
4496 mandeep.dh 8456
    public scanForOrder_args(scanForOrder_args other) {
8457
      __isset_bit_vector.clear();
8458
      __isset_bit_vector.or(other.__isset_bit_vector);
5361 mandeep.dh 8459
      if (other.isSetInventoryItem()) {
8460
        this.inventoryItem = new InventoryItem(other.inventoryItem);
8461
      }
2820 chandransh 8462
      if (other.isSetType()) {
8463
        this.type = other.type;
8464
      }
4496 mandeep.dh 8465
      this.quantity = other.quantity;
8466
      this.orderId = other.orderId;
5110 mandeep.dh 8467
      this.fulfilmentWarehouseId = other.fulfilmentWarehouseId;
5361 mandeep.dh 8468
      this.billingWarehouseId = other.billingWarehouseId;
2820 chandransh 8469
    }
8470
 
4496 mandeep.dh 8471
    public scanForOrder_args deepCopy() {
8472
      return new scanForOrder_args(this);
2820 chandransh 8473
    }
8474
 
3430 rajveer 8475
    @Override
8476
    public void clear() {
5361 mandeep.dh 8477
      this.inventoryItem = null;
3430 rajveer 8478
      this.type = null;
4496 mandeep.dh 8479
      setQuantityIsSet(false);
8480
      this.quantity = 0;
8481
      setOrderIdIsSet(false);
8482
      this.orderId = 0;
5110 mandeep.dh 8483
      setFulfilmentWarehouseIdIsSet(false);
8484
      this.fulfilmentWarehouseId = 0;
5361 mandeep.dh 8485
      setBillingWarehouseIdIsSet(false);
8486
      this.billingWarehouseId = 0;
2820 chandransh 8487
    }
8488
 
5361 mandeep.dh 8489
    public InventoryItem getInventoryItem() {
8490
      return this.inventoryItem;
2820 chandransh 8491
    }
8492
 
5361 mandeep.dh 8493
    public void setInventoryItem(InventoryItem inventoryItem) {
8494
      this.inventoryItem = inventoryItem;
2820 chandransh 8495
    }
8496
 
5361 mandeep.dh 8497
    public void unsetInventoryItem() {
8498
      this.inventoryItem = null;
2820 chandransh 8499
    }
8500
 
5361 mandeep.dh 8501
    /** Returns true if field inventoryItem is set (has been assigned a value) and false otherwise */
8502
    public boolean isSetInventoryItem() {
8503
      return this.inventoryItem != null;
2820 chandransh 8504
    }
8505
 
5361 mandeep.dh 8506
    public void setInventoryItemIsSet(boolean value) {
8507
      if (!value) {
8508
        this.inventoryItem = null;
8509
      }
2820 chandransh 8510
    }
8511
 
8512
    /**
8513
     * 
8514
     * @see ScanType
8515
     */
8516
    public ScanType getType() {
8517
      return this.type;
8518
    }
8519
 
8520
    /**
8521
     * 
8522
     * @see ScanType
8523
     */
3430 rajveer 8524
    public void setType(ScanType type) {
2820 chandransh 8525
      this.type = type;
8526
    }
8527
 
8528
    public void unsetType() {
8529
      this.type = null;
8530
    }
8531
 
3430 rajveer 8532
    /** Returns true if field type is set (has been assigned a value) and false otherwise */
2820 chandransh 8533
    public boolean isSetType() {
8534
      return this.type != null;
8535
    }
8536
 
8537
    public void setTypeIsSet(boolean value) {
8538
      if (!value) {
8539
        this.type = null;
8540
      }
8541
    }
8542
 
4496 mandeep.dh 8543
    public long getQuantity() {
8544
      return this.quantity;
8545
    }
8546
 
8547
    public void setQuantity(long quantity) {
8548
      this.quantity = quantity;
8549
      setQuantityIsSet(true);
8550
    }
8551
 
8552
    public void unsetQuantity() {
8553
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
8554
    }
8555
 
8556
    /** Returns true if field quantity is set (has been assigned a value) and false otherwise */
8557
    public boolean isSetQuantity() {
8558
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
8559
    }
8560
 
8561
    public void setQuantityIsSet(boolean value) {
8562
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
8563
    }
8564
 
8565
    public long getOrderId() {
8566
      return this.orderId;
8567
    }
8568
 
8569
    public void setOrderId(long orderId) {
8570
      this.orderId = orderId;
8571
      setOrderIdIsSet(true);
8572
    }
8573
 
8574
    public void unsetOrderId() {
8575
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
8576
    }
8577
 
8578
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
8579
    public boolean isSetOrderId() {
8580
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
8581
    }
8582
 
8583
    public void setOrderIdIsSet(boolean value) {
8584
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
8585
    }
8586
 
5110 mandeep.dh 8587
    public long getFulfilmentWarehouseId() {
8588
      return this.fulfilmentWarehouseId;
4496 mandeep.dh 8589
    }
8590
 
5110 mandeep.dh 8591
    public void setFulfilmentWarehouseId(long fulfilmentWarehouseId) {
8592
      this.fulfilmentWarehouseId = fulfilmentWarehouseId;
8593
      setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 8594
    }
8595
 
5110 mandeep.dh 8596
    public void unsetFulfilmentWarehouseId() {
8597
      __isset_bit_vector.clear(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 8598
    }
8599
 
5110 mandeep.dh 8600
    /** Returns true if field fulfilmentWarehouseId is set (has been assigned a value) and false otherwise */
8601
    public boolean isSetFulfilmentWarehouseId() {
8602
      return __isset_bit_vector.get(__FULFILMENTWAREHOUSEID_ISSET_ID);
4496 mandeep.dh 8603
    }
8604
 
5110 mandeep.dh 8605
    public void setFulfilmentWarehouseIdIsSet(boolean value) {
8606
      __isset_bit_vector.set(__FULFILMENTWAREHOUSEID_ISSET_ID, value);
4496 mandeep.dh 8607
    }
8608
 
5361 mandeep.dh 8609
    public long getBillingWarehouseId() {
8610
      return this.billingWarehouseId;
8611
    }
8612
 
8613
    public void setBillingWarehouseId(long billingWarehouseId) {
8614
      this.billingWarehouseId = billingWarehouseId;
8615
      setBillingWarehouseIdIsSet(true);
8616
    }
8617
 
8618
    public void unsetBillingWarehouseId() {
8619
      __isset_bit_vector.clear(__BILLINGWAREHOUSEID_ISSET_ID);
8620
    }
8621
 
8622
    /** Returns true if field billingWarehouseId is set (has been assigned a value) and false otherwise */
8623
    public boolean isSetBillingWarehouseId() {
8624
      return __isset_bit_vector.get(__BILLINGWAREHOUSEID_ISSET_ID);
8625
    }
8626
 
8627
    public void setBillingWarehouseIdIsSet(boolean value) {
8628
      __isset_bit_vector.set(__BILLINGWAREHOUSEID_ISSET_ID, value);
8629
    }
8630
 
2820 chandransh 8631
    public void setFieldValue(_Fields field, Object value) {
8632
      switch (field) {
5361 mandeep.dh 8633
      case INVENTORY_ITEM:
2820 chandransh 8634
        if (value == null) {
5361 mandeep.dh 8635
          unsetInventoryItem();
2820 chandransh 8636
        } else {
5361 mandeep.dh 8637
          setInventoryItem((InventoryItem)value);
2820 chandransh 8638
        }
8639
        break;
8640
 
4496 mandeep.dh 8641
      case TYPE:
2820 chandransh 8642
        if (value == null) {
4496 mandeep.dh 8643
          unsetType();
2820 chandransh 8644
        } else {
4496 mandeep.dh 8645
          setType((ScanType)value);
2820 chandransh 8646
        }
8647
        break;
8648
 
4496 mandeep.dh 8649
      case QUANTITY:
2820 chandransh 8650
        if (value == null) {
4496 mandeep.dh 8651
          unsetQuantity();
2820 chandransh 8652
        } else {
4496 mandeep.dh 8653
          setQuantity((Long)value);
2820 chandransh 8654
        }
8655
        break;
8656
 
4496 mandeep.dh 8657
      case ORDER_ID:
8658
        if (value == null) {
8659
          unsetOrderId();
8660
        } else {
8661
          setOrderId((Long)value);
8662
        }
8663
        break;
8664
 
5110 mandeep.dh 8665
      case FULFILMENT_WAREHOUSE_ID:
4496 mandeep.dh 8666
        if (value == null) {
5110 mandeep.dh 8667
          unsetFulfilmentWarehouseId();
4496 mandeep.dh 8668
        } else {
5110 mandeep.dh 8669
          setFulfilmentWarehouseId((Long)value);
4496 mandeep.dh 8670
        }
8671
        break;
8672
 
5361 mandeep.dh 8673
      case BILLING_WAREHOUSE_ID:
8674
        if (value == null) {
8675
          unsetBillingWarehouseId();
8676
        } else {
8677
          setBillingWarehouseId((Long)value);
8678
        }
8679
        break;
8680
 
2820 chandransh 8681
      }
8682
    }
8683
 
8684
    public Object getFieldValue(_Fields field) {
8685
      switch (field) {
5361 mandeep.dh 8686
      case INVENTORY_ITEM:
8687
        return getInventoryItem();
2820 chandransh 8688
 
8689
      case TYPE:
8690
        return getType();
8691
 
4496 mandeep.dh 8692
      case QUANTITY:
8693
        return Long.valueOf(getQuantity());
8694
 
8695
      case ORDER_ID:
8696
        return Long.valueOf(getOrderId());
8697
 
5110 mandeep.dh 8698
      case FULFILMENT_WAREHOUSE_ID:
8699
        return Long.valueOf(getFulfilmentWarehouseId());
4496 mandeep.dh 8700
 
5361 mandeep.dh 8701
      case BILLING_WAREHOUSE_ID:
8702
        return Long.valueOf(getBillingWarehouseId());
8703
 
2820 chandransh 8704
      }
8705
      throw new IllegalStateException();
8706
    }
8707
 
3430 rajveer 8708
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8709
    public boolean isSet(_Fields field) {
8710
      if (field == null) {
8711
        throw new IllegalArgumentException();
8712
      }
2820 chandransh 8713
 
8714
      switch (field) {
5361 mandeep.dh 8715
      case INVENTORY_ITEM:
8716
        return isSetInventoryItem();
2820 chandransh 8717
      case TYPE:
8718
        return isSetType();
4496 mandeep.dh 8719
      case QUANTITY:
8720
        return isSetQuantity();
8721
      case ORDER_ID:
8722
        return isSetOrderId();
5110 mandeep.dh 8723
      case FULFILMENT_WAREHOUSE_ID:
8724
        return isSetFulfilmentWarehouseId();
5361 mandeep.dh 8725
      case BILLING_WAREHOUSE_ID:
8726
        return isSetBillingWarehouseId();
2820 chandransh 8727
      }
8728
      throw new IllegalStateException();
8729
    }
8730
 
8731
    @Override
8732
    public boolean equals(Object that) {
8733
      if (that == null)
8734
        return false;
4496 mandeep.dh 8735
      if (that instanceof scanForOrder_args)
8736
        return this.equals((scanForOrder_args)that);
2820 chandransh 8737
      return false;
8738
    }
8739
 
4496 mandeep.dh 8740
    public boolean equals(scanForOrder_args that) {
2820 chandransh 8741
      if (that == null)
8742
        return false;
8743
 
5361 mandeep.dh 8744
      boolean this_present_inventoryItem = true && this.isSetInventoryItem();
8745
      boolean that_present_inventoryItem = true && that.isSetInventoryItem();
8746
      if (this_present_inventoryItem || that_present_inventoryItem) {
8747
        if (!(this_present_inventoryItem && that_present_inventoryItem))
2820 chandransh 8748
          return false;
5361 mandeep.dh 8749
        if (!this.inventoryItem.equals(that.inventoryItem))
2820 chandransh 8750
          return false;
8751
      }
8752
 
8753
      boolean this_present_type = true && this.isSetType();
8754
      boolean that_present_type = true && that.isSetType();
8755
      if (this_present_type || that_present_type) {
8756
        if (!(this_present_type && that_present_type))
8757
          return false;
8758
        if (!this.type.equals(that.type))
8759
          return false;
8760
      }
8761
 
4496 mandeep.dh 8762
      boolean this_present_quantity = true;
8763
      boolean that_present_quantity = true;
8764
      if (this_present_quantity || that_present_quantity) {
8765
        if (!(this_present_quantity && that_present_quantity))
8766
          return false;
8767
        if (this.quantity != that.quantity)
8768
          return false;
8769
      }
8770
 
8771
      boolean this_present_orderId = true;
8772
      boolean that_present_orderId = true;
8773
      if (this_present_orderId || that_present_orderId) {
8774
        if (!(this_present_orderId && that_present_orderId))
8775
          return false;
8776
        if (this.orderId != that.orderId)
8777
          return false;
8778
      }
8779
 
5110 mandeep.dh 8780
      boolean this_present_fulfilmentWarehouseId = true;
8781
      boolean that_present_fulfilmentWarehouseId = true;
8782
      if (this_present_fulfilmentWarehouseId || that_present_fulfilmentWarehouseId) {
8783
        if (!(this_present_fulfilmentWarehouseId && that_present_fulfilmentWarehouseId))
4496 mandeep.dh 8784
          return false;
5110 mandeep.dh 8785
        if (this.fulfilmentWarehouseId != that.fulfilmentWarehouseId)
4496 mandeep.dh 8786
          return false;
8787
      }
8788
 
5361 mandeep.dh 8789
      boolean this_present_billingWarehouseId = true;
8790
      boolean that_present_billingWarehouseId = true;
8791
      if (this_present_billingWarehouseId || that_present_billingWarehouseId) {
8792
        if (!(this_present_billingWarehouseId && that_present_billingWarehouseId))
8793
          return false;
8794
        if (this.billingWarehouseId != that.billingWarehouseId)
8795
          return false;
8796
      }
8797
 
2820 chandransh 8798
      return true;
8799
    }
8800
 
8801
    @Override
8802
    public int hashCode() {
8803
      return 0;
8804
    }
8805
 
4496 mandeep.dh 8806
    public int compareTo(scanForOrder_args other) {
2820 chandransh 8807
      if (!getClass().equals(other.getClass())) {
8808
        return getClass().getName().compareTo(other.getClass().getName());
8809
      }
8810
 
8811
      int lastComparison = 0;
4496 mandeep.dh 8812
      scanForOrder_args typedOther = (scanForOrder_args)other;
2820 chandransh 8813
 
5361 mandeep.dh 8814
      lastComparison = Boolean.valueOf(isSetInventoryItem()).compareTo(typedOther.isSetInventoryItem());
2820 chandransh 8815
      if (lastComparison != 0) {
8816
        return lastComparison;
8817
      }
5361 mandeep.dh 8818
      if (isSetInventoryItem()) {
8819
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItem, typedOther.inventoryItem);
3430 rajveer 8820
        if (lastComparison != 0) {
8821
          return lastComparison;
8822
        }
2820 chandransh 8823
      }
4496 mandeep.dh 8824
      lastComparison = Boolean.valueOf(isSetType()).compareTo(typedOther.isSetType());
2820 chandransh 8825
      if (lastComparison != 0) {
8826
        return lastComparison;
8827
      }
4496 mandeep.dh 8828
      if (isSetType()) {
8829
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.type, typedOther.type);
3430 rajveer 8830
        if (lastComparison != 0) {
8831
          return lastComparison;
8832
        }
2820 chandransh 8833
      }
4496 mandeep.dh 8834
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(typedOther.isSetQuantity());
2820 chandransh 8835
      if (lastComparison != 0) {
8836
        return lastComparison;
8837
      }
4496 mandeep.dh 8838
      if (isSetQuantity()) {
8839
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.quantity, typedOther.quantity);
3430 rajveer 8840
        if (lastComparison != 0) {
8841
          return lastComparison;
8842
        }
2820 chandransh 8843
      }
4496 mandeep.dh 8844
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
8845
      if (lastComparison != 0) {
8846
        return lastComparison;
8847
      }
8848
      if (isSetOrderId()) {
8849
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
8850
        if (lastComparison != 0) {
8851
          return lastComparison;
8852
        }
8853
      }
5110 mandeep.dh 8854
      lastComparison = Boolean.valueOf(isSetFulfilmentWarehouseId()).compareTo(typedOther.isSetFulfilmentWarehouseId());
4496 mandeep.dh 8855
      if (lastComparison != 0) {
8856
        return lastComparison;
8857
      }
5110 mandeep.dh 8858
      if (isSetFulfilmentWarehouseId()) {
8859
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fulfilmentWarehouseId, typedOther.fulfilmentWarehouseId);
4496 mandeep.dh 8860
        if (lastComparison != 0) {
8861
          return lastComparison;
8862
        }
8863
      }
5361 mandeep.dh 8864
      lastComparison = Boolean.valueOf(isSetBillingWarehouseId()).compareTo(typedOther.isSetBillingWarehouseId());
8865
      if (lastComparison != 0) {
8866
        return lastComparison;
8867
      }
8868
      if (isSetBillingWarehouseId()) {
8869
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.billingWarehouseId, typedOther.billingWarehouseId);
8870
        if (lastComparison != 0) {
8871
          return lastComparison;
8872
        }
8873
      }
2820 chandransh 8874
      return 0;
8875
    }
8876
 
3430 rajveer 8877
    public _Fields fieldForId(int fieldId) {
8878
      return _Fields.findByThriftId(fieldId);
8879
    }
8880
 
8881
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8882
      org.apache.thrift.protocol.TField field;
2820 chandransh 8883
      iprot.readStructBegin();
8884
      while (true)
8885
      {
8886
        field = iprot.readFieldBegin();
3430 rajveer 8887
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 8888
          break;
8889
        }
3430 rajveer 8890
        switch (field.id) {
5361 mandeep.dh 8891
          case 1: // INVENTORY_ITEM
8892
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8893
              this.inventoryItem = new InventoryItem();
8894
              this.inventoryItem.read(iprot);
3430 rajveer 8895
            } else { 
8896
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8897
            }
8898
            break;
4496 mandeep.dh 8899
          case 2: // TYPE
8900
            if (field.type == org.apache.thrift.protocol.TType.I32) {
8901
              this.type = ScanType.findByValue(iprot.readI32());
3430 rajveer 8902
            } else { 
8903
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8904
            }
8905
            break;
4496 mandeep.dh 8906
          case 3: // QUANTITY
8907
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8908
              this.quantity = iprot.readI64();
8909
              setQuantityIsSet(true);
3430 rajveer 8910
            } else { 
8911
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8912
            }
8913
            break;
4496 mandeep.dh 8914
          case 4: // ORDER_ID
8915
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8916
              this.orderId = iprot.readI64();
8917
              setOrderIdIsSet(true);
8918
            } else { 
8919
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8920
            }
8921
            break;
5110 mandeep.dh 8922
          case 5: // FULFILMENT_WAREHOUSE_ID
4496 mandeep.dh 8923
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5110 mandeep.dh 8924
              this.fulfilmentWarehouseId = iprot.readI64();
8925
              setFulfilmentWarehouseIdIsSet(true);
4496 mandeep.dh 8926
            } else { 
8927
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8928
            }
8929
            break;
5361 mandeep.dh 8930
          case 6: // BILLING_WAREHOUSE_ID
8931
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8932
              this.billingWarehouseId = iprot.readI64();
8933
              setBillingWarehouseIdIsSet(true);
8934
            } else { 
8935
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8936
            }
8937
            break;
3430 rajveer 8938
          default:
8939
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 8940
        }
3430 rajveer 8941
        iprot.readFieldEnd();
2820 chandransh 8942
      }
8943
      iprot.readStructEnd();
8944
      validate();
8945
    }
8946
 
3430 rajveer 8947
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 8948
      validate();
8949
 
8950
      oprot.writeStructBegin(STRUCT_DESC);
5361 mandeep.dh 8951
      if (this.inventoryItem != null) {
8952
        oprot.writeFieldBegin(INVENTORY_ITEM_FIELD_DESC);
8953
        this.inventoryItem.write(oprot);
8954
        oprot.writeFieldEnd();
8955
      }
2820 chandransh 8956
      if (this.type != null) {
8957
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
8958
        oprot.writeI32(this.type.getValue());
8959
        oprot.writeFieldEnd();
8960
      }
4496 mandeep.dh 8961
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
8962
      oprot.writeI64(this.quantity);
8963
      oprot.writeFieldEnd();
8964
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
8965
      oprot.writeI64(this.orderId);
8966
      oprot.writeFieldEnd();
5110 mandeep.dh 8967
      oprot.writeFieldBegin(FULFILMENT_WAREHOUSE_ID_FIELD_DESC);
8968
      oprot.writeI64(this.fulfilmentWarehouseId);
4496 mandeep.dh 8969
      oprot.writeFieldEnd();
5361 mandeep.dh 8970
      oprot.writeFieldBegin(BILLING_WAREHOUSE_ID_FIELD_DESC);
8971
      oprot.writeI64(this.billingWarehouseId);
8972
      oprot.writeFieldEnd();
2820 chandransh 8973
      oprot.writeFieldStop();
8974
      oprot.writeStructEnd();
8975
    }
8976
 
8977
    @Override
8978
    public String toString() {
4496 mandeep.dh 8979
      StringBuilder sb = new StringBuilder("scanForOrder_args(");
2820 chandransh 8980
      boolean first = true;
8981
 
5361 mandeep.dh 8982
      sb.append("inventoryItem:");
8983
      if (this.inventoryItem == null) {
8984
        sb.append("null");
8985
      } else {
8986
        sb.append(this.inventoryItem);
8987
      }
2820 chandransh 8988
      first = false;
8989
      if (!first) sb.append(", ");
8990
      sb.append("type:");
8991
      if (this.type == null) {
8992
        sb.append("null");
8993
      } else {
8994
        sb.append(this.type);
8995
      }
8996
      first = false;
4496 mandeep.dh 8997
      if (!first) sb.append(", ");
8998
      sb.append("quantity:");
8999
      sb.append(this.quantity);
9000
      first = false;
9001
      if (!first) sb.append(", ");
9002
      sb.append("orderId:");
9003
      sb.append(this.orderId);
9004
      first = false;
9005
      if (!first) sb.append(", ");
5110 mandeep.dh 9006
      sb.append("fulfilmentWarehouseId:");
9007
      sb.append(this.fulfilmentWarehouseId);
4496 mandeep.dh 9008
      first = false;
5361 mandeep.dh 9009
      if (!first) sb.append(", ");
9010
      sb.append("billingWarehouseId:");
9011
      sb.append(this.billingWarehouseId);
9012
      first = false;
2820 chandransh 9013
      sb.append(")");
9014
      return sb.toString();
9015
    }
9016
 
3430 rajveer 9017
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 9018
      // check for required fields
9019
    }
9020
 
3430 rajveer 9021
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9022
      try {
9023
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9024
      } catch (org.apache.thrift.TException te) {
9025
        throw new java.io.IOException(te);
9026
      }
9027
    }
9028
 
9029
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9030
      try {
4496 mandeep.dh 9031
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9032
        __isset_bit_vector = new BitSet(1);
3430 rajveer 9033
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9034
      } catch (org.apache.thrift.TException te) {
9035
        throw new java.io.IOException(te);
9036
      }
9037
    }
9038
 
2820 chandransh 9039
  }
9040
 
4496 mandeep.dh 9041
  public static class scanForOrder_result implements org.apache.thrift.TBase<scanForOrder_result, scanForOrder_result._Fields>, java.io.Serializable, Cloneable   {
9042
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("scanForOrder_result");
2820 chandransh 9043
 
5361 mandeep.dh 9044
    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 9045
    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 9046
 
5361 mandeep.dh 9047
    private InventoryItem success; // required
3430 rajveer 9048
    private WarehouseServiceException wex; // required
2820 chandransh 9049
 
9050
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 9051
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5361 mandeep.dh 9052
      SUCCESS((short)0, "success"),
2820 chandransh 9053
      WEX((short)1, "wex");
9054
 
9055
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9056
 
9057
      static {
9058
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9059
          byName.put(field.getFieldName(), field);
9060
        }
9061
      }
9062
 
9063
      /**
9064
       * Find the _Fields constant that matches fieldId, or null if its not found.
9065
       */
9066
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 9067
        switch(fieldId) {
5361 mandeep.dh 9068
          case 0: // SUCCESS
9069
            return SUCCESS;
3430 rajveer 9070
          case 1: // WEX
9071
            return WEX;
9072
          default:
9073
            return null;
9074
        }
2820 chandransh 9075
      }
9076
 
9077
      /**
9078
       * Find the _Fields constant that matches fieldId, throwing an exception
9079
       * if it is not found.
9080
       */
9081
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9082
        _Fields fields = findByThriftId(fieldId);
9083
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9084
        return fields;
9085
      }
9086
 
9087
      /**
9088
       * Find the _Fields constant that matches name, or null if its not found.
9089
       */
9090
      public static _Fields findByName(String name) {
9091
        return byName.get(name);
9092
      }
9093
 
9094
      private final short _thriftId;
9095
      private final String _fieldName;
9096
 
9097
      _Fields(short thriftId, String fieldName) {
9098
        _thriftId = thriftId;
9099
        _fieldName = fieldName;
9100
      }
9101
 
9102
      public short getThriftFieldId() {
9103
        return _thriftId;
9104
      }
9105
 
9106
      public String getFieldName() {
9107
        return _fieldName;
9108
      }
9109
    }
9110
 
9111
    // isset id assignments
9112
 
3430 rajveer 9113
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2820 chandransh 9114
    static {
3430 rajveer 9115
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5361 mandeep.dh 9116
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9117
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
3430 rajveer 9118
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9119
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9120
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4496 mandeep.dh 9121
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(scanForOrder_result.class, metaDataMap);
2820 chandransh 9122
    }
9123
 
4496 mandeep.dh 9124
    public scanForOrder_result() {
2820 chandransh 9125
    }
9126
 
4496 mandeep.dh 9127
    public scanForOrder_result(
5361 mandeep.dh 9128
      InventoryItem success,
2820 chandransh 9129
      WarehouseServiceException wex)
9130
    {
9131
      this();
5361 mandeep.dh 9132
      this.success = success;
2820 chandransh 9133
      this.wex = wex;
9134
    }
9135
 
9136
    /**
9137
     * Performs a deep copy on <i>other</i>.
9138
     */
4496 mandeep.dh 9139
    public scanForOrder_result(scanForOrder_result other) {
5361 mandeep.dh 9140
      if (other.isSetSuccess()) {
9141
        this.success = new InventoryItem(other.success);
9142
      }
2820 chandransh 9143
      if (other.isSetWex()) {
9144
        this.wex = new WarehouseServiceException(other.wex);
9145
      }
9146
    }
9147
 
4496 mandeep.dh 9148
    public scanForOrder_result deepCopy() {
9149
      return new scanForOrder_result(this);
2820 chandransh 9150
    }
9151
 
3430 rajveer 9152
    @Override
9153
    public void clear() {
5361 mandeep.dh 9154
      this.success = null;
3430 rajveer 9155
      this.wex = null;
2820 chandransh 9156
    }
9157
 
5361 mandeep.dh 9158
    public InventoryItem getSuccess() {
9159
      return this.success;
9160
    }
9161
 
9162
    public void setSuccess(InventoryItem success) {
9163
      this.success = success;
9164
    }
9165
 
9166
    public void unsetSuccess() {
9167
      this.success = null;
9168
    }
9169
 
9170
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9171
    public boolean isSetSuccess() {
9172
      return this.success != null;
9173
    }
9174
 
9175
    public void setSuccessIsSet(boolean value) {
9176
      if (!value) {
9177
        this.success = null;
9178
      }
9179
    }
9180
 
2820 chandransh 9181
    public WarehouseServiceException getWex() {
9182
      return this.wex;
9183
    }
9184
 
3430 rajveer 9185
    public void setWex(WarehouseServiceException wex) {
2820 chandransh 9186
      this.wex = wex;
9187
    }
9188
 
9189
    public void unsetWex() {
9190
      this.wex = null;
9191
    }
9192
 
3430 rajveer 9193
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
2820 chandransh 9194
    public boolean isSetWex() {
9195
      return this.wex != null;
9196
    }
9197
 
9198
    public void setWexIsSet(boolean value) {
9199
      if (!value) {
9200
        this.wex = null;
9201
      }
9202
    }
9203
 
9204
    public void setFieldValue(_Fields field, Object value) {
9205
      switch (field) {
5361 mandeep.dh 9206
      case SUCCESS:
9207
        if (value == null) {
9208
          unsetSuccess();
9209
        } else {
9210
          setSuccess((InventoryItem)value);
9211
        }
9212
        break;
9213
 
2820 chandransh 9214
      case WEX:
9215
        if (value == null) {
9216
          unsetWex();
9217
        } else {
9218
          setWex((WarehouseServiceException)value);
9219
        }
9220
        break;
9221
 
9222
      }
9223
    }
9224
 
9225
    public Object getFieldValue(_Fields field) {
9226
      switch (field) {
5361 mandeep.dh 9227
      case SUCCESS:
9228
        return getSuccess();
9229
 
2820 chandransh 9230
      case WEX:
9231
        return getWex();
9232
 
9233
      }
9234
      throw new IllegalStateException();
9235
    }
9236
 
3430 rajveer 9237
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9238
    public boolean isSet(_Fields field) {
9239
      if (field == null) {
9240
        throw new IllegalArgumentException();
9241
      }
2820 chandransh 9242
 
9243
      switch (field) {
5361 mandeep.dh 9244
      case SUCCESS:
9245
        return isSetSuccess();
2820 chandransh 9246
      case WEX:
9247
        return isSetWex();
9248
      }
9249
      throw new IllegalStateException();
9250
    }
9251
 
9252
    @Override
9253
    public boolean equals(Object that) {
9254
      if (that == null)
9255
        return false;
4496 mandeep.dh 9256
      if (that instanceof scanForOrder_result)
9257
        return this.equals((scanForOrder_result)that);
2820 chandransh 9258
      return false;
9259
    }
9260
 
4496 mandeep.dh 9261
    public boolean equals(scanForOrder_result that) {
2820 chandransh 9262
      if (that == null)
9263
        return false;
9264
 
5361 mandeep.dh 9265
      boolean this_present_success = true && this.isSetSuccess();
9266
      boolean that_present_success = true && that.isSetSuccess();
9267
      if (this_present_success || that_present_success) {
9268
        if (!(this_present_success && that_present_success))
9269
          return false;
9270
        if (!this.success.equals(that.success))
9271
          return false;
9272
      }
9273
 
2820 chandransh 9274
      boolean this_present_wex = true && this.isSetWex();
9275
      boolean that_present_wex = true && that.isSetWex();
9276
      if (this_present_wex || that_present_wex) {
9277
        if (!(this_present_wex && that_present_wex))
9278
          return false;
9279
        if (!this.wex.equals(that.wex))
9280
          return false;
9281
      }
9282
 
9283
      return true;
9284
    }
9285
 
9286
    @Override
9287
    public int hashCode() {
9288
      return 0;
9289
    }
9290
 
4496 mandeep.dh 9291
    public int compareTo(scanForOrder_result other) {
2820 chandransh 9292
      if (!getClass().equals(other.getClass())) {
9293
        return getClass().getName().compareTo(other.getClass().getName());
9294
      }
9295
 
9296
      int lastComparison = 0;
4496 mandeep.dh 9297
      scanForOrder_result typedOther = (scanForOrder_result)other;
2820 chandransh 9298
 
5361 mandeep.dh 9299
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9300
      if (lastComparison != 0) {
9301
        return lastComparison;
9302
      }
9303
      if (isSetSuccess()) {
9304
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9305
        if (lastComparison != 0) {
9306
          return lastComparison;
9307
        }
9308
      }
3430 rajveer 9309
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
2820 chandransh 9310
      if (lastComparison != 0) {
9311
        return lastComparison;
9312
      }
3430 rajveer 9313
      if (isSetWex()) {
9314
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
9315
        if (lastComparison != 0) {
9316
          return lastComparison;
9317
        }
2820 chandransh 9318
      }
9319
      return 0;
9320
    }
9321
 
3430 rajveer 9322
    public _Fields fieldForId(int fieldId) {
9323
      return _Fields.findByThriftId(fieldId);
9324
    }
9325
 
9326
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9327
      org.apache.thrift.protocol.TField field;
2820 chandransh 9328
      iprot.readStructBegin();
9329
      while (true)
9330
      {
9331
        field = iprot.readFieldBegin();
3430 rajveer 9332
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2820 chandransh 9333
          break;
9334
        }
3430 rajveer 9335
        switch (field.id) {
5361 mandeep.dh 9336
          case 0: // SUCCESS
9337
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9338
              this.success = new InventoryItem();
9339
              this.success.read(iprot);
9340
            } else { 
9341
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9342
            }
9343
            break;
3430 rajveer 9344
          case 1: // WEX
9345
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9346
              this.wex = new WarehouseServiceException();
9347
              this.wex.read(iprot);
9348
            } else { 
9349
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9350
            }
9351
            break;
9352
          default:
9353
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2820 chandransh 9354
        }
3430 rajveer 9355
        iprot.readFieldEnd();
2820 chandransh 9356
      }
9357
      iprot.readStructEnd();
9358
      validate();
9359
    }
9360
 
3430 rajveer 9361
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2820 chandransh 9362
      oprot.writeStructBegin(STRUCT_DESC);
9363
 
5361 mandeep.dh 9364
      if (this.isSetSuccess()) {
9365
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9366
        this.success.write(oprot);
9367
        oprot.writeFieldEnd();
9368
      } else if (this.isSetWex()) {
2820 chandransh 9369
        oprot.writeFieldBegin(WEX_FIELD_DESC);
9370
        this.wex.write(oprot);
9371
        oprot.writeFieldEnd();
9372
      }
9373
      oprot.writeFieldStop();
9374
      oprot.writeStructEnd();
9375
    }
9376
 
9377
    @Override
9378
    public String toString() {
4496 mandeep.dh 9379
      StringBuilder sb = new StringBuilder("scanForOrder_result(");
2820 chandransh 9380
      boolean first = true;
9381
 
5361 mandeep.dh 9382
      sb.append("success:");
9383
      if (this.success == null) {
9384
        sb.append("null");
9385
      } else {
9386
        sb.append(this.success);
9387
      }
9388
      first = false;
9389
      if (!first) sb.append(", ");
2820 chandransh 9390
      sb.append("wex:");
9391
      if (this.wex == null) {
9392
        sb.append("null");
9393
      } else {
9394
        sb.append(this.wex);
9395
      }
9396
      first = false;
9397
      sb.append(")");
9398
      return sb.toString();
9399
    }
9400
 
3430 rajveer 9401
    public void validate() throws org.apache.thrift.TException {
2820 chandransh 9402
      // check for required fields
9403
    }
9404
 
3430 rajveer 9405
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9406
      try {
9407
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9408
      } catch (org.apache.thrift.TException te) {
9409
        throw new java.io.IOException(te);
9410
      }
9411
    }
9412
 
9413
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9414
      try {
9415
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9416
      } catch (org.apache.thrift.TException te) {
9417
        throw new java.io.IOException(te);
9418
      }
9419
    }
9420
 
2820 chandransh 9421
  }
9422
 
4496 mandeep.dh 9423
  public static class createItemNumberMapping_args implements org.apache.thrift.TBase<createItemNumberMapping_args, createItemNumberMapping_args._Fields>, java.io.Serializable, Cloneable   {
9424
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_args");
9425
 
9426
    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);
9427
    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);
9428
 
9429
    private String itemNumber; // required
9430
    private long itemId; // required
9431
 
9432
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9433
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9434
      ITEM_NUMBER((short)1, "itemNumber"),
9435
      ITEM_ID((short)2, "itemId");
9436
 
9437
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9438
 
9439
      static {
9440
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9441
          byName.put(field.getFieldName(), field);
9442
        }
9443
      }
9444
 
9445
      /**
9446
       * Find the _Fields constant that matches fieldId, or null if its not found.
9447
       */
9448
      public static _Fields findByThriftId(int fieldId) {
9449
        switch(fieldId) {
9450
          case 1: // ITEM_NUMBER
9451
            return ITEM_NUMBER;
9452
          case 2: // ITEM_ID
9453
            return ITEM_ID;
9454
          default:
9455
            return null;
9456
        }
9457
      }
9458
 
9459
      /**
9460
       * Find the _Fields constant that matches fieldId, throwing an exception
9461
       * if it is not found.
9462
       */
9463
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9464
        _Fields fields = findByThriftId(fieldId);
9465
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9466
        return fields;
9467
      }
9468
 
9469
      /**
9470
       * Find the _Fields constant that matches name, or null if its not found.
9471
       */
9472
      public static _Fields findByName(String name) {
9473
        return byName.get(name);
9474
      }
9475
 
9476
      private final short _thriftId;
9477
      private final String _fieldName;
9478
 
9479
      _Fields(short thriftId, String fieldName) {
9480
        _thriftId = thriftId;
9481
        _fieldName = fieldName;
9482
      }
9483
 
9484
      public short getThriftFieldId() {
9485
        return _thriftId;
9486
      }
9487
 
9488
      public String getFieldName() {
9489
        return _fieldName;
9490
      }
9491
    }
9492
 
9493
    // isset id assignments
9494
    private static final int __ITEMID_ISSET_ID = 0;
9495
    private BitSet __isset_bit_vector = new BitSet(1);
9496
 
9497
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9498
    static {
9499
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9500
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9501
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
9502
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9503
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9504
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9505
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_args.class, metaDataMap);
9506
    }
9507
 
9508
    public createItemNumberMapping_args() {
9509
    }
9510
 
9511
    public createItemNumberMapping_args(
9512
      String itemNumber,
9513
      long itemId)
9514
    {
9515
      this();
9516
      this.itemNumber = itemNumber;
9517
      this.itemId = itemId;
9518
      setItemIdIsSet(true);
9519
    }
9520
 
9521
    /**
9522
     * Performs a deep copy on <i>other</i>.
9523
     */
9524
    public createItemNumberMapping_args(createItemNumberMapping_args other) {
9525
      __isset_bit_vector.clear();
9526
      __isset_bit_vector.or(other.__isset_bit_vector);
9527
      if (other.isSetItemNumber()) {
9528
        this.itemNumber = other.itemNumber;
9529
      }
9530
      this.itemId = other.itemId;
9531
    }
9532
 
9533
    public createItemNumberMapping_args deepCopy() {
9534
      return new createItemNumberMapping_args(this);
9535
    }
9536
 
9537
    @Override
9538
    public void clear() {
9539
      this.itemNumber = null;
9540
      setItemIdIsSet(false);
9541
      this.itemId = 0;
9542
    }
9543
 
9544
    public String getItemNumber() {
9545
      return this.itemNumber;
9546
    }
9547
 
9548
    public void setItemNumber(String itemNumber) {
9549
      this.itemNumber = itemNumber;
9550
    }
9551
 
9552
    public void unsetItemNumber() {
9553
      this.itemNumber = null;
9554
    }
9555
 
9556
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
9557
    public boolean isSetItemNumber() {
9558
      return this.itemNumber != null;
9559
    }
9560
 
9561
    public void setItemNumberIsSet(boolean value) {
9562
      if (!value) {
9563
        this.itemNumber = null;
9564
      }
9565
    }
9566
 
9567
    public long getItemId() {
9568
      return this.itemId;
9569
    }
9570
 
9571
    public void setItemId(long itemId) {
9572
      this.itemId = itemId;
9573
      setItemIdIsSet(true);
9574
    }
9575
 
9576
    public void unsetItemId() {
9577
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
9578
    }
9579
 
9580
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
9581
    public boolean isSetItemId() {
9582
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
9583
    }
9584
 
9585
    public void setItemIdIsSet(boolean value) {
9586
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
9587
    }
9588
 
9589
    public void setFieldValue(_Fields field, Object value) {
9590
      switch (field) {
9591
      case ITEM_NUMBER:
9592
        if (value == null) {
9593
          unsetItemNumber();
9594
        } else {
9595
          setItemNumber((String)value);
9596
        }
9597
        break;
9598
 
9599
      case ITEM_ID:
9600
        if (value == null) {
9601
          unsetItemId();
9602
        } else {
9603
          setItemId((Long)value);
9604
        }
9605
        break;
9606
 
9607
      }
9608
    }
9609
 
9610
    public Object getFieldValue(_Fields field) {
9611
      switch (field) {
9612
      case ITEM_NUMBER:
9613
        return getItemNumber();
9614
 
9615
      case ITEM_ID:
9616
        return Long.valueOf(getItemId());
9617
 
9618
      }
9619
      throw new IllegalStateException();
9620
    }
9621
 
9622
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9623
    public boolean isSet(_Fields field) {
9624
      if (field == null) {
9625
        throw new IllegalArgumentException();
9626
      }
9627
 
9628
      switch (field) {
9629
      case ITEM_NUMBER:
9630
        return isSetItemNumber();
9631
      case ITEM_ID:
9632
        return isSetItemId();
9633
      }
9634
      throw new IllegalStateException();
9635
    }
9636
 
9637
    @Override
9638
    public boolean equals(Object that) {
9639
      if (that == null)
9640
        return false;
9641
      if (that instanceof createItemNumberMapping_args)
9642
        return this.equals((createItemNumberMapping_args)that);
9643
      return false;
9644
    }
9645
 
9646
    public boolean equals(createItemNumberMapping_args that) {
9647
      if (that == null)
9648
        return false;
9649
 
9650
      boolean this_present_itemNumber = true && this.isSetItemNumber();
9651
      boolean that_present_itemNumber = true && that.isSetItemNumber();
9652
      if (this_present_itemNumber || that_present_itemNumber) {
9653
        if (!(this_present_itemNumber && that_present_itemNumber))
9654
          return false;
9655
        if (!this.itemNumber.equals(that.itemNumber))
9656
          return false;
9657
      }
9658
 
9659
      boolean this_present_itemId = true;
9660
      boolean that_present_itemId = true;
9661
      if (this_present_itemId || that_present_itemId) {
9662
        if (!(this_present_itemId && that_present_itemId))
9663
          return false;
9664
        if (this.itemId != that.itemId)
9665
          return false;
9666
      }
9667
 
9668
      return true;
9669
    }
9670
 
9671
    @Override
9672
    public int hashCode() {
9673
      return 0;
9674
    }
9675
 
9676
    public int compareTo(createItemNumberMapping_args other) {
9677
      if (!getClass().equals(other.getClass())) {
9678
        return getClass().getName().compareTo(other.getClass().getName());
9679
      }
9680
 
9681
      int lastComparison = 0;
9682
      createItemNumberMapping_args typedOther = (createItemNumberMapping_args)other;
9683
 
9684
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
9685
      if (lastComparison != 0) {
9686
        return lastComparison;
9687
      }
9688
      if (isSetItemNumber()) {
9689
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
9690
        if (lastComparison != 0) {
9691
          return lastComparison;
9692
        }
9693
      }
9694
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
9695
      if (lastComparison != 0) {
9696
        return lastComparison;
9697
      }
9698
      if (isSetItemId()) {
9699
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
9700
        if (lastComparison != 0) {
9701
          return lastComparison;
9702
        }
9703
      }
9704
      return 0;
9705
    }
9706
 
9707
    public _Fields fieldForId(int fieldId) {
9708
      return _Fields.findByThriftId(fieldId);
9709
    }
9710
 
9711
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9712
      org.apache.thrift.protocol.TField field;
9713
      iprot.readStructBegin();
9714
      while (true)
9715
      {
9716
        field = iprot.readFieldBegin();
9717
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9718
          break;
9719
        }
9720
        switch (field.id) {
9721
          case 1: // ITEM_NUMBER
9722
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
9723
              this.itemNumber = iprot.readString();
9724
            } else { 
9725
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9726
            }
9727
            break;
9728
          case 2: // ITEM_ID
9729
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9730
              this.itemId = iprot.readI64();
9731
              setItemIdIsSet(true);
9732
            } else { 
9733
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9734
            }
9735
            break;
9736
          default:
9737
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9738
        }
9739
        iprot.readFieldEnd();
9740
      }
9741
      iprot.readStructEnd();
9742
      validate();
9743
    }
9744
 
9745
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9746
      validate();
9747
 
9748
      oprot.writeStructBegin(STRUCT_DESC);
9749
      if (this.itemNumber != null) {
9750
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
9751
        oprot.writeString(this.itemNumber);
9752
        oprot.writeFieldEnd();
9753
      }
9754
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
9755
      oprot.writeI64(this.itemId);
9756
      oprot.writeFieldEnd();
9757
      oprot.writeFieldStop();
9758
      oprot.writeStructEnd();
9759
    }
9760
 
9761
    @Override
9762
    public String toString() {
9763
      StringBuilder sb = new StringBuilder("createItemNumberMapping_args(");
9764
      boolean first = true;
9765
 
9766
      sb.append("itemNumber:");
9767
      if (this.itemNumber == null) {
9768
        sb.append("null");
9769
      } else {
9770
        sb.append(this.itemNumber);
9771
      }
9772
      first = false;
9773
      if (!first) sb.append(", ");
9774
      sb.append("itemId:");
9775
      sb.append(this.itemId);
9776
      first = false;
9777
      sb.append(")");
9778
      return sb.toString();
9779
    }
9780
 
9781
    public void validate() throws org.apache.thrift.TException {
9782
      // check for required fields
9783
    }
9784
 
9785
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9786
      try {
9787
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9788
      } catch (org.apache.thrift.TException te) {
9789
        throw new java.io.IOException(te);
9790
      }
9791
    }
9792
 
9793
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9794
      try {
9795
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9796
        __isset_bit_vector = new BitSet(1);
9797
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9798
      } catch (org.apache.thrift.TException te) {
9799
        throw new java.io.IOException(te);
9800
      }
9801
    }
9802
 
9803
  }
9804
 
9805
  public static class createItemNumberMapping_result implements org.apache.thrift.TBase<createItemNumberMapping_result, createItemNumberMapping_result._Fields>, java.io.Serializable, Cloneable   {
9806
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createItemNumberMapping_result");
9807
 
9808
 
9809
 
9810
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9811
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9812
;
9813
 
9814
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9815
 
9816
      static {
9817
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9818
          byName.put(field.getFieldName(), field);
9819
        }
9820
      }
9821
 
9822
      /**
9823
       * Find the _Fields constant that matches fieldId, or null if its not found.
9824
       */
9825
      public static _Fields findByThriftId(int fieldId) {
9826
        switch(fieldId) {
9827
          default:
9828
            return null;
9829
        }
9830
      }
9831
 
9832
      /**
9833
       * Find the _Fields constant that matches fieldId, throwing an exception
9834
       * if it is not found.
9835
       */
9836
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9837
        _Fields fields = findByThriftId(fieldId);
9838
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9839
        return fields;
9840
      }
9841
 
9842
      /**
9843
       * Find the _Fields constant that matches name, or null if its not found.
9844
       */
9845
      public static _Fields findByName(String name) {
9846
        return byName.get(name);
9847
      }
9848
 
9849
      private final short _thriftId;
9850
      private final String _fieldName;
9851
 
9852
      _Fields(short thriftId, String fieldName) {
9853
        _thriftId = thriftId;
9854
        _fieldName = fieldName;
9855
      }
9856
 
9857
      public short getThriftFieldId() {
9858
        return _thriftId;
9859
      }
9860
 
9861
      public String getFieldName() {
9862
        return _fieldName;
9863
      }
9864
    }
9865
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9866
    static {
9867
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9868
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9869
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createItemNumberMapping_result.class, metaDataMap);
9870
    }
9871
 
9872
    public createItemNumberMapping_result() {
9873
    }
9874
 
9875
    /**
9876
     * Performs a deep copy on <i>other</i>.
9877
     */
9878
    public createItemNumberMapping_result(createItemNumberMapping_result other) {
9879
    }
9880
 
9881
    public createItemNumberMapping_result deepCopy() {
9882
      return new createItemNumberMapping_result(this);
9883
    }
9884
 
9885
    @Override
9886
    public void clear() {
9887
    }
9888
 
9889
    public void setFieldValue(_Fields field, Object value) {
9890
      switch (field) {
9891
      }
9892
    }
9893
 
9894
    public Object getFieldValue(_Fields field) {
9895
      switch (field) {
9896
      }
9897
      throw new IllegalStateException();
9898
    }
9899
 
9900
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9901
    public boolean isSet(_Fields field) {
9902
      if (field == null) {
9903
        throw new IllegalArgumentException();
9904
      }
9905
 
9906
      switch (field) {
9907
      }
9908
      throw new IllegalStateException();
9909
    }
9910
 
9911
    @Override
9912
    public boolean equals(Object that) {
9913
      if (that == null)
9914
        return false;
9915
      if (that instanceof createItemNumberMapping_result)
9916
        return this.equals((createItemNumberMapping_result)that);
9917
      return false;
9918
    }
9919
 
9920
    public boolean equals(createItemNumberMapping_result that) {
9921
      if (that == null)
9922
        return false;
9923
 
9924
      return true;
9925
    }
9926
 
9927
    @Override
9928
    public int hashCode() {
9929
      return 0;
9930
    }
9931
 
9932
    public int compareTo(createItemNumberMapping_result other) {
9933
      if (!getClass().equals(other.getClass())) {
9934
        return getClass().getName().compareTo(other.getClass().getName());
9935
      }
9936
 
9937
      int lastComparison = 0;
9938
      createItemNumberMapping_result typedOther = (createItemNumberMapping_result)other;
9939
 
9940
      return 0;
9941
    }
9942
 
9943
    public _Fields fieldForId(int fieldId) {
9944
      return _Fields.findByThriftId(fieldId);
9945
    }
9946
 
9947
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9948
      org.apache.thrift.protocol.TField field;
9949
      iprot.readStructBegin();
9950
      while (true)
9951
      {
9952
        field = iprot.readFieldBegin();
9953
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9954
          break;
9955
        }
9956
        switch (field.id) {
9957
          default:
9958
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9959
        }
9960
        iprot.readFieldEnd();
9961
      }
9962
      iprot.readStructEnd();
9963
      validate();
9964
    }
9965
 
9966
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9967
      oprot.writeStructBegin(STRUCT_DESC);
9968
 
9969
      oprot.writeFieldStop();
9970
      oprot.writeStructEnd();
9971
    }
9972
 
9973
    @Override
9974
    public String toString() {
9975
      StringBuilder sb = new StringBuilder("createItemNumberMapping_result(");
9976
      boolean first = true;
9977
 
9978
      sb.append(")");
9979
      return sb.toString();
9980
    }
9981
 
9982
    public void validate() throws org.apache.thrift.TException {
9983
      // check for required fields
9984
    }
9985
 
9986
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9987
      try {
9988
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9989
      } catch (org.apache.thrift.TException te) {
9990
        throw new java.io.IOException(te);
9991
      }
9992
    }
9993
 
9994
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9995
      try {
9996
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9997
      } catch (org.apache.thrift.TException te) {
9998
        throw new java.io.IOException(te);
9999
      }
10000
    }
10001
 
10002
  }
10003
 
4622 amit.gupta 10004
  public static class getItemNumbers_args implements org.apache.thrift.TBase<getItemNumbers_args, getItemNumbers_args._Fields>, java.io.Serializable, Cloneable   {
10005
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_args");
10006
 
10007
    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);
10008
 
10009
    private long itemId; // required
10010
 
10011
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10012
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10013
      ITEM_ID((short)1, "itemId");
10014
 
10015
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10016
 
10017
      static {
10018
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10019
          byName.put(field.getFieldName(), field);
10020
        }
10021
      }
10022
 
10023
      /**
10024
       * Find the _Fields constant that matches fieldId, or null if its not found.
10025
       */
10026
      public static _Fields findByThriftId(int fieldId) {
10027
        switch(fieldId) {
10028
          case 1: // ITEM_ID
10029
            return ITEM_ID;
10030
          default:
10031
            return null;
10032
        }
10033
      }
10034
 
10035
      /**
10036
       * Find the _Fields constant that matches fieldId, throwing an exception
10037
       * if it is not found.
10038
       */
10039
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10040
        _Fields fields = findByThriftId(fieldId);
10041
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10042
        return fields;
10043
      }
10044
 
10045
      /**
10046
       * Find the _Fields constant that matches name, or null if its not found.
10047
       */
10048
      public static _Fields findByName(String name) {
10049
        return byName.get(name);
10050
      }
10051
 
10052
      private final short _thriftId;
10053
      private final String _fieldName;
10054
 
10055
      _Fields(short thriftId, String fieldName) {
10056
        _thriftId = thriftId;
10057
        _fieldName = fieldName;
10058
      }
10059
 
10060
      public short getThriftFieldId() {
10061
        return _thriftId;
10062
      }
10063
 
10064
      public String getFieldName() {
10065
        return _fieldName;
10066
      }
10067
    }
10068
 
10069
    // isset id assignments
10070
    private static final int __ITEMID_ISSET_ID = 0;
10071
    private BitSet __isset_bit_vector = new BitSet(1);
10072
 
10073
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10074
    static {
10075
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10076
      tmpMap.put(_Fields.ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("itemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10077
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10078
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10079
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_args.class, metaDataMap);
10080
    }
10081
 
10082
    public getItemNumbers_args() {
10083
    }
10084
 
10085
    public getItemNumbers_args(
10086
      long itemId)
10087
    {
10088
      this();
10089
      this.itemId = itemId;
10090
      setItemIdIsSet(true);
10091
    }
10092
 
10093
    /**
10094
     * Performs a deep copy on <i>other</i>.
10095
     */
10096
    public getItemNumbers_args(getItemNumbers_args other) {
10097
      __isset_bit_vector.clear();
10098
      __isset_bit_vector.or(other.__isset_bit_vector);
10099
      this.itemId = other.itemId;
10100
    }
10101
 
10102
    public getItemNumbers_args deepCopy() {
10103
      return new getItemNumbers_args(this);
10104
    }
10105
 
10106
    @Override
10107
    public void clear() {
10108
      setItemIdIsSet(false);
10109
      this.itemId = 0;
10110
    }
10111
 
10112
    public long getItemId() {
10113
      return this.itemId;
10114
    }
10115
 
10116
    public void setItemId(long itemId) {
10117
      this.itemId = itemId;
10118
      setItemIdIsSet(true);
10119
    }
10120
 
10121
    public void unsetItemId() {
10122
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
10123
    }
10124
 
10125
    /** Returns true if field itemId is set (has been assigned a value) and false otherwise */
10126
    public boolean isSetItemId() {
10127
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
10128
    }
10129
 
10130
    public void setItemIdIsSet(boolean value) {
10131
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
10132
    }
10133
 
10134
    public void setFieldValue(_Fields field, Object value) {
10135
      switch (field) {
10136
      case ITEM_ID:
10137
        if (value == null) {
10138
          unsetItemId();
10139
        } else {
10140
          setItemId((Long)value);
10141
        }
10142
        break;
10143
 
10144
      }
10145
    }
10146
 
10147
    public Object getFieldValue(_Fields field) {
10148
      switch (field) {
10149
      case ITEM_ID:
10150
        return Long.valueOf(getItemId());
10151
 
10152
      }
10153
      throw new IllegalStateException();
10154
    }
10155
 
10156
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10157
    public boolean isSet(_Fields field) {
10158
      if (field == null) {
10159
        throw new IllegalArgumentException();
10160
      }
10161
 
10162
      switch (field) {
10163
      case ITEM_ID:
10164
        return isSetItemId();
10165
      }
10166
      throw new IllegalStateException();
10167
    }
10168
 
10169
    @Override
10170
    public boolean equals(Object that) {
10171
      if (that == null)
10172
        return false;
10173
      if (that instanceof getItemNumbers_args)
10174
        return this.equals((getItemNumbers_args)that);
10175
      return false;
10176
    }
10177
 
10178
    public boolean equals(getItemNumbers_args that) {
10179
      if (that == null)
10180
        return false;
10181
 
10182
      boolean this_present_itemId = true;
10183
      boolean that_present_itemId = true;
10184
      if (this_present_itemId || that_present_itemId) {
10185
        if (!(this_present_itemId && that_present_itemId))
10186
          return false;
10187
        if (this.itemId != that.itemId)
10188
          return false;
10189
      }
10190
 
10191
      return true;
10192
    }
10193
 
10194
    @Override
10195
    public int hashCode() {
10196
      return 0;
10197
    }
10198
 
10199
    public int compareTo(getItemNumbers_args other) {
10200
      if (!getClass().equals(other.getClass())) {
10201
        return getClass().getName().compareTo(other.getClass().getName());
10202
      }
10203
 
10204
      int lastComparison = 0;
10205
      getItemNumbers_args typedOther = (getItemNumbers_args)other;
10206
 
10207
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(typedOther.isSetItemId());
10208
      if (lastComparison != 0) {
10209
        return lastComparison;
10210
      }
10211
      if (isSetItemId()) {
10212
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemId, typedOther.itemId);
10213
        if (lastComparison != 0) {
10214
          return lastComparison;
10215
        }
10216
      }
10217
      return 0;
10218
    }
10219
 
10220
    public _Fields fieldForId(int fieldId) {
10221
      return _Fields.findByThriftId(fieldId);
10222
    }
10223
 
10224
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10225
      org.apache.thrift.protocol.TField field;
10226
      iprot.readStructBegin();
10227
      while (true)
10228
      {
10229
        field = iprot.readFieldBegin();
10230
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10231
          break;
10232
        }
10233
        switch (field.id) {
10234
          case 1: // ITEM_ID
10235
            if (field.type == org.apache.thrift.protocol.TType.I64) {
10236
              this.itemId = iprot.readI64();
10237
              setItemIdIsSet(true);
10238
            } else { 
10239
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10240
            }
10241
            break;
10242
          default:
10243
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10244
        }
10245
        iprot.readFieldEnd();
10246
      }
10247
      iprot.readStructEnd();
10248
      validate();
10249
    }
10250
 
10251
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10252
      validate();
10253
 
10254
      oprot.writeStructBegin(STRUCT_DESC);
10255
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
10256
      oprot.writeI64(this.itemId);
10257
      oprot.writeFieldEnd();
10258
      oprot.writeFieldStop();
10259
      oprot.writeStructEnd();
10260
    }
10261
 
10262
    @Override
10263
    public String toString() {
10264
      StringBuilder sb = new StringBuilder("getItemNumbers_args(");
10265
      boolean first = true;
10266
 
10267
      sb.append("itemId:");
10268
      sb.append(this.itemId);
10269
      first = false;
10270
      sb.append(")");
10271
      return sb.toString();
10272
    }
10273
 
10274
    public void validate() throws org.apache.thrift.TException {
10275
      // check for required fields
10276
    }
10277
 
10278
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10279
      try {
10280
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10281
      } catch (org.apache.thrift.TException te) {
10282
        throw new java.io.IOException(te);
10283
      }
10284
    }
10285
 
10286
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10287
      try {
10288
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
10289
        __isset_bit_vector = new BitSet(1);
10290
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10291
      } catch (org.apache.thrift.TException te) {
10292
        throw new java.io.IOException(te);
10293
      }
10294
    }
10295
 
10296
  }
10297
 
10298
  public static class getItemNumbers_result implements org.apache.thrift.TBase<getItemNumbers_result, getItemNumbers_result._Fields>, java.io.Serializable, Cloneable   {
10299
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemNumbers_result");
10300
 
10301
    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);
10302
 
10303
    private List<String> success; // required
10304
 
10305
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10306
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10307
      SUCCESS((short)0, "success");
10308
 
10309
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10310
 
10311
      static {
10312
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10313
          byName.put(field.getFieldName(), field);
10314
        }
10315
      }
10316
 
10317
      /**
10318
       * Find the _Fields constant that matches fieldId, or null if its not found.
10319
       */
10320
      public static _Fields findByThriftId(int fieldId) {
10321
        switch(fieldId) {
10322
          case 0: // SUCCESS
10323
            return SUCCESS;
10324
          default:
10325
            return null;
10326
        }
10327
      }
10328
 
10329
      /**
10330
       * Find the _Fields constant that matches fieldId, throwing an exception
10331
       * if it is not found.
10332
       */
10333
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10334
        _Fields fields = findByThriftId(fieldId);
10335
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10336
        return fields;
10337
      }
10338
 
10339
      /**
10340
       * Find the _Fields constant that matches name, or null if its not found.
10341
       */
10342
      public static _Fields findByName(String name) {
10343
        return byName.get(name);
10344
      }
10345
 
10346
      private final short _thriftId;
10347
      private final String _fieldName;
10348
 
10349
      _Fields(short thriftId, String fieldName) {
10350
        _thriftId = thriftId;
10351
        _fieldName = fieldName;
10352
      }
10353
 
10354
      public short getThriftFieldId() {
10355
        return _thriftId;
10356
      }
10357
 
10358
      public String getFieldName() {
10359
        return _fieldName;
10360
      }
10361
    }
10362
 
10363
    // isset id assignments
10364
 
10365
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10366
    static {
10367
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10368
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10369
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10370
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
10371
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10372
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemNumbers_result.class, metaDataMap);
10373
    }
10374
 
10375
    public getItemNumbers_result() {
10376
    }
10377
 
10378
    public getItemNumbers_result(
10379
      List<String> success)
10380
    {
10381
      this();
10382
      this.success = success;
10383
    }
10384
 
10385
    /**
10386
     * Performs a deep copy on <i>other</i>.
10387
     */
10388
    public getItemNumbers_result(getItemNumbers_result other) {
10389
      if (other.isSetSuccess()) {
10390
        List<String> __this__success = new ArrayList<String>();
10391
        for (String other_element : other.success) {
10392
          __this__success.add(other_element);
10393
        }
10394
        this.success = __this__success;
10395
      }
10396
    }
10397
 
10398
    public getItemNumbers_result deepCopy() {
10399
      return new getItemNumbers_result(this);
10400
    }
10401
 
10402
    @Override
10403
    public void clear() {
10404
      this.success = null;
10405
    }
10406
 
10407
    public int getSuccessSize() {
10408
      return (this.success == null) ? 0 : this.success.size();
10409
    }
10410
 
10411
    public java.util.Iterator<String> getSuccessIterator() {
10412
      return (this.success == null) ? null : this.success.iterator();
10413
    }
10414
 
10415
    public void addToSuccess(String elem) {
10416
      if (this.success == null) {
10417
        this.success = new ArrayList<String>();
10418
      }
10419
      this.success.add(elem);
10420
    }
10421
 
10422
    public List<String> getSuccess() {
10423
      return this.success;
10424
    }
10425
 
10426
    public void setSuccess(List<String> success) {
10427
      this.success = success;
10428
    }
10429
 
10430
    public void unsetSuccess() {
10431
      this.success = null;
10432
    }
10433
 
10434
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
10435
    public boolean isSetSuccess() {
10436
      return this.success != null;
10437
    }
10438
 
10439
    public void setSuccessIsSet(boolean value) {
10440
      if (!value) {
10441
        this.success = null;
10442
      }
10443
    }
10444
 
10445
    public void setFieldValue(_Fields field, Object value) {
10446
      switch (field) {
10447
      case SUCCESS:
10448
        if (value == null) {
10449
          unsetSuccess();
10450
        } else {
10451
          setSuccess((List<String>)value);
10452
        }
10453
        break;
10454
 
10455
      }
10456
    }
10457
 
10458
    public Object getFieldValue(_Fields field) {
10459
      switch (field) {
10460
      case SUCCESS:
10461
        return getSuccess();
10462
 
10463
      }
10464
      throw new IllegalStateException();
10465
    }
10466
 
10467
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10468
    public boolean isSet(_Fields field) {
10469
      if (field == null) {
10470
        throw new IllegalArgumentException();
10471
      }
10472
 
10473
      switch (field) {
10474
      case SUCCESS:
10475
        return isSetSuccess();
10476
      }
10477
      throw new IllegalStateException();
10478
    }
10479
 
10480
    @Override
10481
    public boolean equals(Object that) {
10482
      if (that == null)
10483
        return false;
10484
      if (that instanceof getItemNumbers_result)
10485
        return this.equals((getItemNumbers_result)that);
10486
      return false;
10487
    }
10488
 
10489
    public boolean equals(getItemNumbers_result that) {
10490
      if (that == null)
10491
        return false;
10492
 
10493
      boolean this_present_success = true && this.isSetSuccess();
10494
      boolean that_present_success = true && that.isSetSuccess();
10495
      if (this_present_success || that_present_success) {
10496
        if (!(this_present_success && that_present_success))
10497
          return false;
10498
        if (!this.success.equals(that.success))
10499
          return false;
10500
      }
10501
 
10502
      return true;
10503
    }
10504
 
10505
    @Override
10506
    public int hashCode() {
10507
      return 0;
10508
    }
10509
 
10510
    public int compareTo(getItemNumbers_result other) {
10511
      if (!getClass().equals(other.getClass())) {
10512
        return getClass().getName().compareTo(other.getClass().getName());
10513
      }
10514
 
10515
      int lastComparison = 0;
10516
      getItemNumbers_result typedOther = (getItemNumbers_result)other;
10517
 
10518
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10519
      if (lastComparison != 0) {
10520
        return lastComparison;
10521
      }
10522
      if (isSetSuccess()) {
10523
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10524
        if (lastComparison != 0) {
10525
          return lastComparison;
10526
        }
10527
      }
10528
      return 0;
10529
    }
10530
 
10531
    public _Fields fieldForId(int fieldId) {
10532
      return _Fields.findByThriftId(fieldId);
10533
    }
10534
 
10535
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10536
      org.apache.thrift.protocol.TField field;
10537
      iprot.readStructBegin();
10538
      while (true)
10539
      {
10540
        field = iprot.readFieldBegin();
10541
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10542
          break;
10543
        }
10544
        switch (field.id) {
10545
          case 0: // SUCCESS
10546
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
10547
              {
5361 mandeep.dh 10548
                org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
10549
                this.success = new ArrayList<String>(_list0.size);
10550
                for (int _i1 = 0; _i1 < _list0.size; ++_i1)
4622 amit.gupta 10551
                {
5361 mandeep.dh 10552
                  String _elem2; // required
10553
                  _elem2 = iprot.readString();
10554
                  this.success.add(_elem2);
4622 amit.gupta 10555
                }
10556
                iprot.readListEnd();
10557
              }
10558
            } else { 
10559
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10560
            }
10561
            break;
10562
          default:
10563
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10564
        }
10565
        iprot.readFieldEnd();
10566
      }
10567
      iprot.readStructEnd();
10568
      validate();
10569
    }
10570
 
10571
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10572
      oprot.writeStructBegin(STRUCT_DESC);
10573
 
10574
      if (this.isSetSuccess()) {
10575
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10576
        {
10577
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, this.success.size()));
5361 mandeep.dh 10578
          for (String _iter3 : this.success)
4622 amit.gupta 10579
          {
5361 mandeep.dh 10580
            oprot.writeString(_iter3);
4622 amit.gupta 10581
          }
10582
          oprot.writeListEnd();
10583
        }
10584
        oprot.writeFieldEnd();
10585
      }
10586
      oprot.writeFieldStop();
10587
      oprot.writeStructEnd();
10588
    }
10589
 
10590
    @Override
10591
    public String toString() {
10592
      StringBuilder sb = new StringBuilder("getItemNumbers_result(");
10593
      boolean first = true;
10594
 
10595
      sb.append("success:");
10596
      if (this.success == null) {
10597
        sb.append("null");
10598
      } else {
10599
        sb.append(this.success);
10600
      }
10601
      first = false;
10602
      sb.append(")");
10603
      return sb.toString();
10604
    }
10605
 
10606
    public void validate() throws org.apache.thrift.TException {
10607
      // check for required fields
10608
    }
10609
 
10610
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10611
      try {
10612
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10613
      } catch (org.apache.thrift.TException te) {
10614
        throw new java.io.IOException(te);
10615
      }
10616
    }
10617
 
10618
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10619
      try {
10620
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10621
      } catch (org.apache.thrift.TException te) {
10622
        throw new java.io.IOException(te);
10623
      }
10624
    }
10625
 
10626
  }
10627
 
5110 mandeep.dh 10628
  public static class getItemIds_args implements org.apache.thrift.TBase<getItemIds_args, getItemIds_args._Fields>, java.io.Serializable, Cloneable   {
10629
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_args");
10630
 
10631
    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);
10632
 
10633
    private String itemNumber; // required
10634
 
10635
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10636
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10637
      ITEM_NUMBER((short)1, "itemNumber");
10638
 
10639
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10640
 
10641
      static {
10642
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10643
          byName.put(field.getFieldName(), field);
10644
        }
10645
      }
10646
 
10647
      /**
10648
       * Find the _Fields constant that matches fieldId, or null if its not found.
10649
       */
10650
      public static _Fields findByThriftId(int fieldId) {
10651
        switch(fieldId) {
10652
          case 1: // ITEM_NUMBER
10653
            return ITEM_NUMBER;
10654
          default:
10655
            return null;
10656
        }
10657
      }
10658
 
10659
      /**
10660
       * Find the _Fields constant that matches fieldId, throwing an exception
10661
       * if it is not found.
10662
       */
10663
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10664
        _Fields fields = findByThriftId(fieldId);
10665
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10666
        return fields;
10667
      }
10668
 
10669
      /**
10670
       * Find the _Fields constant that matches name, or null if its not found.
10671
       */
10672
      public static _Fields findByName(String name) {
10673
        return byName.get(name);
10674
      }
10675
 
10676
      private final short _thriftId;
10677
      private final String _fieldName;
10678
 
10679
      _Fields(short thriftId, String fieldName) {
10680
        _thriftId = thriftId;
10681
        _fieldName = fieldName;
10682
      }
10683
 
10684
      public short getThriftFieldId() {
10685
        return _thriftId;
10686
      }
10687
 
10688
      public String getFieldName() {
10689
        return _fieldName;
10690
      }
10691
    }
10692
 
10693
    // isset id assignments
10694
 
10695
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10696
    static {
10697
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10698
      tmpMap.put(_Fields.ITEM_NUMBER, new org.apache.thrift.meta_data.FieldMetaData("itemNumber", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10699
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10700
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10701
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_args.class, metaDataMap);
10702
    }
10703
 
10704
    public getItemIds_args() {
10705
    }
10706
 
10707
    public getItemIds_args(
10708
      String itemNumber)
10709
    {
10710
      this();
10711
      this.itemNumber = itemNumber;
10712
    }
10713
 
10714
    /**
10715
     * Performs a deep copy on <i>other</i>.
10716
     */
10717
    public getItemIds_args(getItemIds_args other) {
10718
      if (other.isSetItemNumber()) {
10719
        this.itemNumber = other.itemNumber;
10720
      }
10721
    }
10722
 
10723
    public getItemIds_args deepCopy() {
10724
      return new getItemIds_args(this);
10725
    }
10726
 
10727
    @Override
10728
    public void clear() {
10729
      this.itemNumber = null;
10730
    }
10731
 
10732
    public String getItemNumber() {
10733
      return this.itemNumber;
10734
    }
10735
 
10736
    public void setItemNumber(String itemNumber) {
10737
      this.itemNumber = itemNumber;
10738
    }
10739
 
10740
    public void unsetItemNumber() {
10741
      this.itemNumber = null;
10742
    }
10743
 
10744
    /** Returns true if field itemNumber is set (has been assigned a value) and false otherwise */
10745
    public boolean isSetItemNumber() {
10746
      return this.itemNumber != null;
10747
    }
10748
 
10749
    public void setItemNumberIsSet(boolean value) {
10750
      if (!value) {
10751
        this.itemNumber = null;
10752
      }
10753
    }
10754
 
10755
    public void setFieldValue(_Fields field, Object value) {
10756
      switch (field) {
10757
      case ITEM_NUMBER:
10758
        if (value == null) {
10759
          unsetItemNumber();
10760
        } else {
10761
          setItemNumber((String)value);
10762
        }
10763
        break;
10764
 
10765
      }
10766
    }
10767
 
10768
    public Object getFieldValue(_Fields field) {
10769
      switch (field) {
10770
      case ITEM_NUMBER:
10771
        return getItemNumber();
10772
 
10773
      }
10774
      throw new IllegalStateException();
10775
    }
10776
 
10777
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10778
    public boolean isSet(_Fields field) {
10779
      if (field == null) {
10780
        throw new IllegalArgumentException();
10781
      }
10782
 
10783
      switch (field) {
10784
      case ITEM_NUMBER:
10785
        return isSetItemNumber();
10786
      }
10787
      throw new IllegalStateException();
10788
    }
10789
 
10790
    @Override
10791
    public boolean equals(Object that) {
10792
      if (that == null)
10793
        return false;
10794
      if (that instanceof getItemIds_args)
10795
        return this.equals((getItemIds_args)that);
10796
      return false;
10797
    }
10798
 
10799
    public boolean equals(getItemIds_args that) {
10800
      if (that == null)
10801
        return false;
10802
 
10803
      boolean this_present_itemNumber = true && this.isSetItemNumber();
10804
      boolean that_present_itemNumber = true && that.isSetItemNumber();
10805
      if (this_present_itemNumber || that_present_itemNumber) {
10806
        if (!(this_present_itemNumber && that_present_itemNumber))
10807
          return false;
10808
        if (!this.itemNumber.equals(that.itemNumber))
10809
          return false;
10810
      }
10811
 
10812
      return true;
10813
    }
10814
 
10815
    @Override
10816
    public int hashCode() {
10817
      return 0;
10818
    }
10819
 
10820
    public int compareTo(getItemIds_args other) {
10821
      if (!getClass().equals(other.getClass())) {
10822
        return getClass().getName().compareTo(other.getClass().getName());
10823
      }
10824
 
10825
      int lastComparison = 0;
10826
      getItemIds_args typedOther = (getItemIds_args)other;
10827
 
10828
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(typedOther.isSetItemNumber());
10829
      if (lastComparison != 0) {
10830
        return lastComparison;
10831
      }
10832
      if (isSetItemNumber()) {
10833
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.itemNumber, typedOther.itemNumber);
10834
        if (lastComparison != 0) {
10835
          return lastComparison;
10836
        }
10837
      }
10838
      return 0;
10839
    }
10840
 
10841
    public _Fields fieldForId(int fieldId) {
10842
      return _Fields.findByThriftId(fieldId);
10843
    }
10844
 
10845
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10846
      org.apache.thrift.protocol.TField field;
10847
      iprot.readStructBegin();
10848
      while (true)
10849
      {
10850
        field = iprot.readFieldBegin();
10851
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10852
          break;
10853
        }
10854
        switch (field.id) {
10855
          case 1: // ITEM_NUMBER
10856
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
10857
              this.itemNumber = iprot.readString();
10858
            } else { 
10859
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10860
            }
10861
            break;
10862
          default:
10863
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10864
        }
10865
        iprot.readFieldEnd();
10866
      }
10867
      iprot.readStructEnd();
10868
      validate();
10869
    }
10870
 
10871
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10872
      validate();
10873
 
10874
      oprot.writeStructBegin(STRUCT_DESC);
10875
      if (this.itemNumber != null) {
10876
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
10877
        oprot.writeString(this.itemNumber);
10878
        oprot.writeFieldEnd();
10879
      }
10880
      oprot.writeFieldStop();
10881
      oprot.writeStructEnd();
10882
    }
10883
 
10884
    @Override
10885
    public String toString() {
10886
      StringBuilder sb = new StringBuilder("getItemIds_args(");
10887
      boolean first = true;
10888
 
10889
      sb.append("itemNumber:");
10890
      if (this.itemNumber == null) {
10891
        sb.append("null");
10892
      } else {
10893
        sb.append(this.itemNumber);
10894
      }
10895
      first = false;
10896
      sb.append(")");
10897
      return sb.toString();
10898
    }
10899
 
10900
    public void validate() throws org.apache.thrift.TException {
10901
      // check for required fields
10902
    }
10903
 
10904
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10905
      try {
10906
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10907
      } catch (org.apache.thrift.TException te) {
10908
        throw new java.io.IOException(te);
10909
      }
10910
    }
10911
 
10912
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10913
      try {
10914
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10915
      } catch (org.apache.thrift.TException te) {
10916
        throw new java.io.IOException(te);
10917
      }
10918
    }
10919
 
10920
  }
10921
 
10922
  public static class getItemIds_result implements org.apache.thrift.TBase<getItemIds_result, getItemIds_result._Fields>, java.io.Serializable, Cloneable   {
10923
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getItemIds_result");
10924
 
10925
    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);
10926
 
10927
    private List<Long> success; // required
10928
 
10929
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10930
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
10931
      SUCCESS((short)0, "success");
10932
 
10933
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10934
 
10935
      static {
10936
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10937
          byName.put(field.getFieldName(), field);
10938
        }
10939
      }
10940
 
10941
      /**
10942
       * Find the _Fields constant that matches fieldId, or null if its not found.
10943
       */
10944
      public static _Fields findByThriftId(int fieldId) {
10945
        switch(fieldId) {
10946
          case 0: // SUCCESS
10947
            return SUCCESS;
10948
          default:
10949
            return null;
10950
        }
10951
      }
10952
 
10953
      /**
10954
       * Find the _Fields constant that matches fieldId, throwing an exception
10955
       * if it is not found.
10956
       */
10957
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10958
        _Fields fields = findByThriftId(fieldId);
10959
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10960
        return fields;
10961
      }
10962
 
10963
      /**
10964
       * Find the _Fields constant that matches name, or null if its not found.
10965
       */
10966
      public static _Fields findByName(String name) {
10967
        return byName.get(name);
10968
      }
10969
 
10970
      private final short _thriftId;
10971
      private final String _fieldName;
10972
 
10973
      _Fields(short thriftId, String fieldName) {
10974
        _thriftId = thriftId;
10975
        _fieldName = fieldName;
10976
      }
10977
 
10978
      public short getThriftFieldId() {
10979
        return _thriftId;
10980
      }
10981
 
10982
      public String getFieldName() {
10983
        return _fieldName;
10984
      }
10985
    }
10986
 
10987
    // isset id assignments
10988
 
10989
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
10990
    static {
10991
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10992
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10993
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10994
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
10995
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10996
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getItemIds_result.class, metaDataMap);
10997
    }
10998
 
10999
    public getItemIds_result() {
11000
    }
11001
 
11002
    public getItemIds_result(
11003
      List<Long> success)
11004
    {
11005
      this();
11006
      this.success = success;
11007
    }
11008
 
11009
    /**
11010
     * Performs a deep copy on <i>other</i>.
11011
     */
11012
    public getItemIds_result(getItemIds_result other) {
11013
      if (other.isSetSuccess()) {
11014
        List<Long> __this__success = new ArrayList<Long>();
11015
        for (Long other_element : other.success) {
11016
          __this__success.add(other_element);
11017
        }
11018
        this.success = __this__success;
11019
      }
11020
    }
11021
 
11022
    public getItemIds_result deepCopy() {
11023
      return new getItemIds_result(this);
11024
    }
11025
 
11026
    @Override
11027
    public void clear() {
11028
      this.success = null;
11029
    }
11030
 
11031
    public int getSuccessSize() {
11032
      return (this.success == null) ? 0 : this.success.size();
11033
    }
11034
 
11035
    public java.util.Iterator<Long> getSuccessIterator() {
11036
      return (this.success == null) ? null : this.success.iterator();
11037
    }
11038
 
11039
    public void addToSuccess(long elem) {
11040
      if (this.success == null) {
11041
        this.success = new ArrayList<Long>();
11042
      }
11043
      this.success.add(elem);
11044
    }
11045
 
11046
    public List<Long> getSuccess() {
11047
      return this.success;
11048
    }
11049
 
11050
    public void setSuccess(List<Long> success) {
11051
      this.success = success;
11052
    }
11053
 
11054
    public void unsetSuccess() {
11055
      this.success = null;
11056
    }
11057
 
11058
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
11059
    public boolean isSetSuccess() {
11060
      return this.success != null;
11061
    }
11062
 
11063
    public void setSuccessIsSet(boolean value) {
11064
      if (!value) {
11065
        this.success = null;
11066
      }
11067
    }
11068
 
11069
    public void setFieldValue(_Fields field, Object value) {
11070
      switch (field) {
11071
      case SUCCESS:
11072
        if (value == null) {
11073
          unsetSuccess();
11074
        } else {
11075
          setSuccess((List<Long>)value);
11076
        }
11077
        break;
11078
 
11079
      }
11080
    }
11081
 
11082
    public Object getFieldValue(_Fields field) {
11083
      switch (field) {
11084
      case SUCCESS:
11085
        return getSuccess();
11086
 
11087
      }
11088
      throw new IllegalStateException();
11089
    }
11090
 
11091
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11092
    public boolean isSet(_Fields field) {
11093
      if (field == null) {
11094
        throw new IllegalArgumentException();
11095
      }
11096
 
11097
      switch (field) {
11098
      case SUCCESS:
11099
        return isSetSuccess();
11100
      }
11101
      throw new IllegalStateException();
11102
    }
11103
 
11104
    @Override
11105
    public boolean equals(Object that) {
11106
      if (that == null)
11107
        return false;
11108
      if (that instanceof getItemIds_result)
11109
        return this.equals((getItemIds_result)that);
11110
      return false;
11111
    }
11112
 
11113
    public boolean equals(getItemIds_result that) {
11114
      if (that == null)
11115
        return false;
11116
 
11117
      boolean this_present_success = true && this.isSetSuccess();
11118
      boolean that_present_success = true && that.isSetSuccess();
11119
      if (this_present_success || that_present_success) {
11120
        if (!(this_present_success && that_present_success))
11121
          return false;
11122
        if (!this.success.equals(that.success))
11123
          return false;
11124
      }
11125
 
11126
      return true;
11127
    }
11128
 
11129
    @Override
11130
    public int hashCode() {
11131
      return 0;
11132
    }
11133
 
11134
    public int compareTo(getItemIds_result other) {
11135
      if (!getClass().equals(other.getClass())) {
11136
        return getClass().getName().compareTo(other.getClass().getName());
11137
      }
11138
 
11139
      int lastComparison = 0;
11140
      getItemIds_result typedOther = (getItemIds_result)other;
11141
 
11142
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
11143
      if (lastComparison != 0) {
11144
        return lastComparison;
11145
      }
11146
      if (isSetSuccess()) {
11147
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11148
        if (lastComparison != 0) {
11149
          return lastComparison;
11150
        }
11151
      }
11152
      return 0;
11153
    }
11154
 
11155
    public _Fields fieldForId(int fieldId) {
11156
      return _Fields.findByThriftId(fieldId);
11157
    }
11158
 
11159
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11160
      org.apache.thrift.protocol.TField field;
11161
      iprot.readStructBegin();
11162
      while (true)
11163
      {
11164
        field = iprot.readFieldBegin();
11165
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11166
          break;
11167
        }
11168
        switch (field.id) {
11169
          case 0: // SUCCESS
11170
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11171
              {
5361 mandeep.dh 11172
                org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
11173
                this.success = new ArrayList<Long>(_list4.size);
11174
                for (int _i5 = 0; _i5 < _list4.size; ++_i5)
5110 mandeep.dh 11175
                {
5361 mandeep.dh 11176
                  long _elem6; // required
11177
                  _elem6 = iprot.readI64();
11178
                  this.success.add(_elem6);
5110 mandeep.dh 11179
                }
11180
                iprot.readListEnd();
11181
              }
11182
            } else { 
11183
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11184
            }
11185
            break;
11186
          default:
11187
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11188
        }
11189
        iprot.readFieldEnd();
11190
      }
11191
      iprot.readStructEnd();
11192
      validate();
11193
    }
11194
 
11195
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11196
      oprot.writeStructBegin(STRUCT_DESC);
11197
 
11198
      if (this.isSetSuccess()) {
11199
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11200
        {
11201
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
5361 mandeep.dh 11202
          for (long _iter7 : this.success)
5110 mandeep.dh 11203
          {
5361 mandeep.dh 11204
            oprot.writeI64(_iter7);
5110 mandeep.dh 11205
          }
11206
          oprot.writeListEnd();
11207
        }
11208
        oprot.writeFieldEnd();
11209
      }
11210
      oprot.writeFieldStop();
11211
      oprot.writeStructEnd();
11212
    }
11213
 
11214
    @Override
11215
    public String toString() {
11216
      StringBuilder sb = new StringBuilder("getItemIds_result(");
11217
      boolean first = true;
11218
 
11219
      sb.append("success:");
11220
      if (this.success == null) {
11221
        sb.append("null");
11222
      } else {
11223
        sb.append(this.success);
11224
      }
11225
      first = false;
11226
      sb.append(")");
11227
      return sb.toString();
11228
    }
11229
 
11230
    public void validate() throws org.apache.thrift.TException {
11231
      // check for required fields
11232
    }
11233
 
11234
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11235
      try {
11236
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11237
      } catch (org.apache.thrift.TException te) {
11238
        throw new java.io.IOException(te);
11239
      }
11240
    }
11241
 
11242
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11243
      try {
11244
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11245
      } catch (org.apache.thrift.TException te) {
11246
        throw new java.io.IOException(te);
11247
      }
11248
    }
11249
 
11250
  }
11251
 
5185 mandeep.dh 11252
  public static class getInventoryItemsFromLastScanType_args implements org.apache.thrift.TBase<getInventoryItemsFromLastScanType_args, getInventoryItemsFromLastScanType_args._Fields>, java.io.Serializable, Cloneable   {
11253
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemsFromLastScanType_args");
11254
 
11255
    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);
11256
 
11257
    private ScanType lastScanType; // required
11258
 
11259
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11260
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11261
      /**
11262
       * 
11263
       * @see ScanType
11264
       */
11265
      LAST_SCAN_TYPE((short)1, "lastScanType");
11266
 
11267
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11268
 
11269
      static {
11270
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11271
          byName.put(field.getFieldName(), field);
11272
        }
11273
      }
11274
 
11275
      /**
11276
       * Find the _Fields constant that matches fieldId, or null if its not found.
11277
       */
11278
      public static _Fields findByThriftId(int fieldId) {
11279
        switch(fieldId) {
11280
          case 1: // LAST_SCAN_TYPE
11281
            return LAST_SCAN_TYPE;
11282
          default:
11283
            return null;
11284
        }
11285
      }
11286
 
11287
      /**
11288
       * Find the _Fields constant that matches fieldId, throwing an exception
11289
       * if it is not found.
11290
       */
11291
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11292
        _Fields fields = findByThriftId(fieldId);
11293
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11294
        return fields;
11295
      }
11296
 
11297
      /**
11298
       * Find the _Fields constant that matches name, or null if its not found.
11299
       */
11300
      public static _Fields findByName(String name) {
11301
        return byName.get(name);
11302
      }
11303
 
11304
      private final short _thriftId;
11305
      private final String _fieldName;
11306
 
11307
      _Fields(short thriftId, String fieldName) {
11308
        _thriftId = thriftId;
11309
        _fieldName = fieldName;
11310
      }
11311
 
11312
      public short getThriftFieldId() {
11313
        return _thriftId;
11314
      }
11315
 
11316
      public String getFieldName() {
11317
        return _fieldName;
11318
      }
11319
    }
11320
 
11321
    // isset id assignments
11322
 
11323
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11324
    static {
11325
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11326
      tmpMap.put(_Fields.LAST_SCAN_TYPE, new org.apache.thrift.meta_data.FieldMetaData("lastScanType", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11327
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ScanType.class)));
11328
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11329
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemsFromLastScanType_args.class, metaDataMap);
11330
    }
11331
 
11332
    public getInventoryItemsFromLastScanType_args() {
11333
    }
11334
 
11335
    public getInventoryItemsFromLastScanType_args(
11336
      ScanType lastScanType)
11337
    {
11338
      this();
11339
      this.lastScanType = lastScanType;
11340
    }
11341
 
11342
    /**
11343
     * Performs a deep copy on <i>other</i>.
11344
     */
11345
    public getInventoryItemsFromLastScanType_args(getInventoryItemsFromLastScanType_args other) {
11346
      if (other.isSetLastScanType()) {
11347
        this.lastScanType = other.lastScanType;
11348
      }
11349
    }
11350
 
11351
    public getInventoryItemsFromLastScanType_args deepCopy() {
11352
      return new getInventoryItemsFromLastScanType_args(this);
11353
    }
11354
 
11355
    @Override
11356
    public void clear() {
11357
      this.lastScanType = null;
11358
    }
11359
 
11360
    /**
11361
     * 
11362
     * @see ScanType
11363
     */
11364
    public ScanType getLastScanType() {
11365
      return this.lastScanType;
11366
    }
11367
 
11368
    /**
11369
     * 
11370
     * @see ScanType
11371
     */
11372
    public void setLastScanType(ScanType lastScanType) {
11373
      this.lastScanType = lastScanType;
11374
    }
11375
 
11376
    public void unsetLastScanType() {
11377
      this.lastScanType = null;
11378
    }
11379
 
11380
    /** Returns true if field lastScanType is set (has been assigned a value) and false otherwise */
11381
    public boolean isSetLastScanType() {
11382
      return this.lastScanType != null;
11383
    }
11384
 
11385
    public void setLastScanTypeIsSet(boolean value) {
11386
      if (!value) {
11387
        this.lastScanType = null;
11388
      }
11389
    }
11390
 
11391
    public void setFieldValue(_Fields field, Object value) {
11392
      switch (field) {
11393
      case LAST_SCAN_TYPE:
11394
        if (value == null) {
11395
          unsetLastScanType();
11396
        } else {
11397
          setLastScanType((ScanType)value);
11398
        }
11399
        break;
11400
 
11401
      }
11402
    }
11403
 
11404
    public Object getFieldValue(_Fields field) {
11405
      switch (field) {
11406
      case LAST_SCAN_TYPE:
11407
        return getLastScanType();
11408
 
11409
      }
11410
      throw new IllegalStateException();
11411
    }
11412
 
11413
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11414
    public boolean isSet(_Fields field) {
11415
      if (field == null) {
11416
        throw new IllegalArgumentException();
11417
      }
11418
 
11419
      switch (field) {
11420
      case LAST_SCAN_TYPE:
11421
        return isSetLastScanType();
11422
      }
11423
      throw new IllegalStateException();
11424
    }
11425
 
11426
    @Override
11427
    public boolean equals(Object that) {
11428
      if (that == null)
11429
        return false;
11430
      if (that instanceof getInventoryItemsFromLastScanType_args)
11431
        return this.equals((getInventoryItemsFromLastScanType_args)that);
11432
      return false;
11433
    }
11434
 
11435
    public boolean equals(getInventoryItemsFromLastScanType_args that) {
11436
      if (that == null)
11437
        return false;
11438
 
11439
      boolean this_present_lastScanType = true && this.isSetLastScanType();
11440
      boolean that_present_lastScanType = true && that.isSetLastScanType();
11441
      if (this_present_lastScanType || that_present_lastScanType) {
11442
        if (!(this_present_lastScanType && that_present_lastScanType))
11443
          return false;
11444
        if (!this.lastScanType.equals(that.lastScanType))
11445
          return false;
11446
      }
11447
 
11448
      return true;
11449
    }
11450
 
11451
    @Override
11452
    public int hashCode() {
11453
      return 0;
11454
    }
11455
 
11456
    public int compareTo(getInventoryItemsFromLastScanType_args other) {
11457
      if (!getClass().equals(other.getClass())) {
11458
        return getClass().getName().compareTo(other.getClass().getName());
11459
      }
11460
 
11461
      int lastComparison = 0;
11462
      getInventoryItemsFromLastScanType_args typedOther = (getInventoryItemsFromLastScanType_args)other;
11463
 
11464
      lastComparison = Boolean.valueOf(isSetLastScanType()).compareTo(typedOther.isSetLastScanType());
11465
      if (lastComparison != 0) {
11466
        return lastComparison;
11467
      }
11468
      if (isSetLastScanType()) {
11469
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.lastScanType, typedOther.lastScanType);
11470
        if (lastComparison != 0) {
11471
          return lastComparison;
11472
        }
11473
      }
11474
      return 0;
11475
    }
11476
 
11477
    public _Fields fieldForId(int fieldId) {
11478
      return _Fields.findByThriftId(fieldId);
11479
    }
11480
 
11481
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11482
      org.apache.thrift.protocol.TField field;
11483
      iprot.readStructBegin();
11484
      while (true)
11485
      {
11486
        field = iprot.readFieldBegin();
11487
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11488
          break;
11489
        }
11490
        switch (field.id) {
11491
          case 1: // LAST_SCAN_TYPE
11492
            if (field.type == org.apache.thrift.protocol.TType.I32) {
11493
              this.lastScanType = ScanType.findByValue(iprot.readI32());
11494
            } else { 
11495
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11496
            }
11497
            break;
11498
          default:
11499
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11500
        }
11501
        iprot.readFieldEnd();
11502
      }
11503
      iprot.readStructEnd();
11504
      validate();
11505
    }
11506
 
11507
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11508
      validate();
11509
 
11510
      oprot.writeStructBegin(STRUCT_DESC);
11511
      if (this.lastScanType != null) {
11512
        oprot.writeFieldBegin(LAST_SCAN_TYPE_FIELD_DESC);
11513
        oprot.writeI32(this.lastScanType.getValue());
11514
        oprot.writeFieldEnd();
11515
      }
11516
      oprot.writeFieldStop();
11517
      oprot.writeStructEnd();
11518
    }
11519
 
11520
    @Override
11521
    public String toString() {
11522
      StringBuilder sb = new StringBuilder("getInventoryItemsFromLastScanType_args(");
11523
      boolean first = true;
11524
 
11525
      sb.append("lastScanType:");
11526
      if (this.lastScanType == null) {
11527
        sb.append("null");
11528
      } else {
11529
        sb.append(this.lastScanType);
11530
      }
11531
      first = false;
11532
      sb.append(")");
11533
      return sb.toString();
11534
    }
11535
 
11536
    public void validate() throws org.apache.thrift.TException {
11537
      // check for required fields
11538
    }
11539
 
11540
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11541
      try {
11542
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11543
      } catch (org.apache.thrift.TException te) {
11544
        throw new java.io.IOException(te);
11545
      }
11546
    }
11547
 
11548
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11549
      try {
11550
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11551
      } catch (org.apache.thrift.TException te) {
11552
        throw new java.io.IOException(te);
11553
      }
11554
    }
11555
 
11556
  }
11557
 
11558
  public static class getInventoryItemsFromLastScanType_result implements org.apache.thrift.TBase<getInventoryItemsFromLastScanType_result, getInventoryItemsFromLastScanType_result._Fields>, java.io.Serializable, Cloneable   {
11559
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemsFromLastScanType_result");
11560
 
11561
    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);
11562
    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);
11563
 
11564
    private List<InventoryItem> success; // required
11565
    private WarehouseServiceException wex; // required
11566
 
11567
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11568
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11569
      SUCCESS((short)0, "success"),
11570
      WEX((short)1, "wex");
11571
 
11572
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11573
 
11574
      static {
11575
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11576
          byName.put(field.getFieldName(), field);
11577
        }
11578
      }
11579
 
11580
      /**
11581
       * Find the _Fields constant that matches fieldId, or null if its not found.
11582
       */
11583
      public static _Fields findByThriftId(int fieldId) {
11584
        switch(fieldId) {
11585
          case 0: // SUCCESS
11586
            return SUCCESS;
11587
          case 1: // WEX
11588
            return WEX;
11589
          default:
11590
            return null;
11591
        }
11592
      }
11593
 
11594
      /**
11595
       * Find the _Fields constant that matches fieldId, throwing an exception
11596
       * if it is not found.
11597
       */
11598
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11599
        _Fields fields = findByThriftId(fieldId);
11600
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11601
        return fields;
11602
      }
11603
 
11604
      /**
11605
       * Find the _Fields constant that matches name, or null if its not found.
11606
       */
11607
      public static _Fields findByName(String name) {
11608
        return byName.get(name);
11609
      }
11610
 
11611
      private final short _thriftId;
11612
      private final String _fieldName;
11613
 
11614
      _Fields(short thriftId, String fieldName) {
11615
        _thriftId = thriftId;
11616
        _fieldName = fieldName;
11617
      }
11618
 
11619
      public short getThriftFieldId() {
11620
        return _thriftId;
11621
      }
11622
 
11623
      public String getFieldName() {
11624
        return _fieldName;
11625
      }
11626
    }
11627
 
11628
    // isset id assignments
11629
 
11630
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
11631
    static {
11632
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11633
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11634
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
11635
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class))));
11636
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11637
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11638
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11639
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemsFromLastScanType_result.class, metaDataMap);
11640
    }
11641
 
11642
    public getInventoryItemsFromLastScanType_result() {
11643
    }
11644
 
11645
    public getInventoryItemsFromLastScanType_result(
11646
      List<InventoryItem> success,
11647
      WarehouseServiceException wex)
11648
    {
11649
      this();
11650
      this.success = success;
11651
      this.wex = wex;
11652
    }
11653
 
11654
    /**
11655
     * Performs a deep copy on <i>other</i>.
11656
     */
11657
    public getInventoryItemsFromLastScanType_result(getInventoryItemsFromLastScanType_result other) {
11658
      if (other.isSetSuccess()) {
11659
        List<InventoryItem> __this__success = new ArrayList<InventoryItem>();
11660
        for (InventoryItem other_element : other.success) {
11661
          __this__success.add(new InventoryItem(other_element));
11662
        }
11663
        this.success = __this__success;
11664
      }
11665
      if (other.isSetWex()) {
11666
        this.wex = new WarehouseServiceException(other.wex);
11667
      }
11668
    }
11669
 
11670
    public getInventoryItemsFromLastScanType_result deepCopy() {
11671
      return new getInventoryItemsFromLastScanType_result(this);
11672
    }
11673
 
11674
    @Override
11675
    public void clear() {
11676
      this.success = null;
11677
      this.wex = null;
11678
    }
11679
 
11680
    public int getSuccessSize() {
11681
      return (this.success == null) ? 0 : this.success.size();
11682
    }
11683
 
11684
    public java.util.Iterator<InventoryItem> getSuccessIterator() {
11685
      return (this.success == null) ? null : this.success.iterator();
11686
    }
11687
 
11688
    public void addToSuccess(InventoryItem elem) {
11689
      if (this.success == null) {
11690
        this.success = new ArrayList<InventoryItem>();
11691
      }
11692
      this.success.add(elem);
11693
    }
11694
 
11695
    public List<InventoryItem> getSuccess() {
11696
      return this.success;
11697
    }
11698
 
11699
    public void setSuccess(List<InventoryItem> success) {
11700
      this.success = success;
11701
    }
11702
 
11703
    public void unsetSuccess() {
11704
      this.success = null;
11705
    }
11706
 
11707
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
11708
    public boolean isSetSuccess() {
11709
      return this.success != null;
11710
    }
11711
 
11712
    public void setSuccessIsSet(boolean value) {
11713
      if (!value) {
11714
        this.success = null;
11715
      }
11716
    }
11717
 
11718
    public WarehouseServiceException getWex() {
11719
      return this.wex;
11720
    }
11721
 
11722
    public void setWex(WarehouseServiceException wex) {
11723
      this.wex = wex;
11724
    }
11725
 
11726
    public void unsetWex() {
11727
      this.wex = null;
11728
    }
11729
 
11730
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
11731
    public boolean isSetWex() {
11732
      return this.wex != null;
11733
    }
11734
 
11735
    public void setWexIsSet(boolean value) {
11736
      if (!value) {
11737
        this.wex = null;
11738
      }
11739
    }
11740
 
11741
    public void setFieldValue(_Fields field, Object value) {
11742
      switch (field) {
11743
      case SUCCESS:
11744
        if (value == null) {
11745
          unsetSuccess();
11746
        } else {
11747
          setSuccess((List<InventoryItem>)value);
11748
        }
11749
        break;
11750
 
11751
      case WEX:
11752
        if (value == null) {
11753
          unsetWex();
11754
        } else {
11755
          setWex((WarehouseServiceException)value);
11756
        }
11757
        break;
11758
 
11759
      }
11760
    }
11761
 
11762
    public Object getFieldValue(_Fields field) {
11763
      switch (field) {
11764
      case SUCCESS:
11765
        return getSuccess();
11766
 
11767
      case WEX:
11768
        return getWex();
11769
 
11770
      }
11771
      throw new IllegalStateException();
11772
    }
11773
 
11774
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11775
    public boolean isSet(_Fields field) {
11776
      if (field == null) {
11777
        throw new IllegalArgumentException();
11778
      }
11779
 
11780
      switch (field) {
11781
      case SUCCESS:
11782
        return isSetSuccess();
11783
      case WEX:
11784
        return isSetWex();
11785
      }
11786
      throw new IllegalStateException();
11787
    }
11788
 
11789
    @Override
11790
    public boolean equals(Object that) {
11791
      if (that == null)
11792
        return false;
11793
      if (that instanceof getInventoryItemsFromLastScanType_result)
11794
        return this.equals((getInventoryItemsFromLastScanType_result)that);
11795
      return false;
11796
    }
11797
 
11798
    public boolean equals(getInventoryItemsFromLastScanType_result that) {
11799
      if (that == null)
11800
        return false;
11801
 
11802
      boolean this_present_success = true && this.isSetSuccess();
11803
      boolean that_present_success = true && that.isSetSuccess();
11804
      if (this_present_success || that_present_success) {
11805
        if (!(this_present_success && that_present_success))
11806
          return false;
11807
        if (!this.success.equals(that.success))
11808
          return false;
11809
      }
11810
 
11811
      boolean this_present_wex = true && this.isSetWex();
11812
      boolean that_present_wex = true && that.isSetWex();
11813
      if (this_present_wex || that_present_wex) {
11814
        if (!(this_present_wex && that_present_wex))
11815
          return false;
11816
        if (!this.wex.equals(that.wex))
11817
          return false;
11818
      }
11819
 
11820
      return true;
11821
    }
11822
 
11823
    @Override
11824
    public int hashCode() {
11825
      return 0;
11826
    }
11827
 
11828
    public int compareTo(getInventoryItemsFromLastScanType_result other) {
11829
      if (!getClass().equals(other.getClass())) {
11830
        return getClass().getName().compareTo(other.getClass().getName());
11831
      }
11832
 
11833
      int lastComparison = 0;
11834
      getInventoryItemsFromLastScanType_result typedOther = (getInventoryItemsFromLastScanType_result)other;
11835
 
11836
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
11837
      if (lastComparison != 0) {
11838
        return lastComparison;
11839
      }
11840
      if (isSetSuccess()) {
11841
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11842
        if (lastComparison != 0) {
11843
          return lastComparison;
11844
        }
11845
      }
11846
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
11847
      if (lastComparison != 0) {
11848
        return lastComparison;
11849
      }
11850
      if (isSetWex()) {
11851
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
11852
        if (lastComparison != 0) {
11853
          return lastComparison;
11854
        }
11855
      }
11856
      return 0;
11857
    }
11858
 
11859
    public _Fields fieldForId(int fieldId) {
11860
      return _Fields.findByThriftId(fieldId);
11861
    }
11862
 
11863
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11864
      org.apache.thrift.protocol.TField field;
11865
      iprot.readStructBegin();
11866
      while (true)
11867
      {
11868
        field = iprot.readFieldBegin();
11869
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
11870
          break;
11871
        }
11872
        switch (field.id) {
11873
          case 0: // SUCCESS
11874
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11875
              {
5361 mandeep.dh 11876
                org.apache.thrift.protocol.TList _list8 = iprot.readListBegin();
11877
                this.success = new ArrayList<InventoryItem>(_list8.size);
11878
                for (int _i9 = 0; _i9 < _list8.size; ++_i9)
5185 mandeep.dh 11879
                {
5361 mandeep.dh 11880
                  InventoryItem _elem10; // required
11881
                  _elem10 = new InventoryItem();
11882
                  _elem10.read(iprot);
11883
                  this.success.add(_elem10);
5185 mandeep.dh 11884
                }
11885
                iprot.readListEnd();
11886
              }
11887
            } else { 
11888
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11889
            }
11890
            break;
11891
          case 1: // WEX
11892
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11893
              this.wex = new WarehouseServiceException();
11894
              this.wex.read(iprot);
11895
            } else { 
11896
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11897
            }
11898
            break;
11899
          default:
11900
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11901
        }
11902
        iprot.readFieldEnd();
11903
      }
11904
      iprot.readStructEnd();
11905
      validate();
11906
    }
11907
 
11908
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
11909
      oprot.writeStructBegin(STRUCT_DESC);
11910
 
11911
      if (this.isSetSuccess()) {
11912
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11913
        {
11914
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
5361 mandeep.dh 11915
          for (InventoryItem _iter11 : this.success)
5185 mandeep.dh 11916
          {
5361 mandeep.dh 11917
            _iter11.write(oprot);
5185 mandeep.dh 11918
          }
11919
          oprot.writeListEnd();
11920
        }
11921
        oprot.writeFieldEnd();
11922
      } else if (this.isSetWex()) {
11923
        oprot.writeFieldBegin(WEX_FIELD_DESC);
11924
        this.wex.write(oprot);
11925
        oprot.writeFieldEnd();
11926
      }
11927
      oprot.writeFieldStop();
11928
      oprot.writeStructEnd();
11929
    }
11930
 
11931
    @Override
11932
    public String toString() {
11933
      StringBuilder sb = new StringBuilder("getInventoryItemsFromLastScanType_result(");
11934
      boolean first = true;
11935
 
11936
      sb.append("success:");
11937
      if (this.success == null) {
11938
        sb.append("null");
11939
      } else {
11940
        sb.append(this.success);
11941
      }
11942
      first = false;
11943
      if (!first) sb.append(", ");
11944
      sb.append("wex:");
11945
      if (this.wex == null) {
11946
        sb.append("null");
11947
      } else {
11948
        sb.append(this.wex);
11949
      }
11950
      first = false;
11951
      sb.append(")");
11952
      return sb.toString();
11953
    }
11954
 
11955
    public void validate() throws org.apache.thrift.TException {
11956
      // check for required fields
11957
    }
11958
 
11959
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11960
      try {
11961
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11962
      } catch (org.apache.thrift.TException te) {
11963
        throw new java.io.IOException(te);
11964
      }
11965
    }
11966
 
11967
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11968
      try {
11969
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11970
      } catch (org.apache.thrift.TException te) {
11971
        throw new java.io.IOException(te);
11972
      }
11973
    }
11974
 
11975
  }
11976
 
11977
  public static class getInventoryItemFromId_args implements org.apache.thrift.TBase<getInventoryItemFromId_args, getInventoryItemFromId_args._Fields>, java.io.Serializable, Cloneable   {
11978
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromId_args");
11979
 
11980
    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);
11981
 
11982
    private long inventoryItemId; // required
11983
 
11984
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11985
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
11986
      INVENTORY_ITEM_ID((short)1, "inventoryItemId");
11987
 
11988
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11989
 
11990
      static {
11991
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11992
          byName.put(field.getFieldName(), field);
11993
        }
11994
      }
11995
 
11996
      /**
11997
       * Find the _Fields constant that matches fieldId, or null if its not found.
11998
       */
11999
      public static _Fields findByThriftId(int fieldId) {
12000
        switch(fieldId) {
12001
          case 1: // INVENTORY_ITEM_ID
12002
            return INVENTORY_ITEM_ID;
12003
          default:
12004
            return null;
12005
        }
12006
      }
12007
 
12008
      /**
12009
       * Find the _Fields constant that matches fieldId, throwing an exception
12010
       * if it is not found.
12011
       */
12012
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12013
        _Fields fields = findByThriftId(fieldId);
12014
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12015
        return fields;
12016
      }
12017
 
12018
      /**
12019
       * Find the _Fields constant that matches name, or null if its not found.
12020
       */
12021
      public static _Fields findByName(String name) {
12022
        return byName.get(name);
12023
      }
12024
 
12025
      private final short _thriftId;
12026
      private final String _fieldName;
12027
 
12028
      _Fields(short thriftId, String fieldName) {
12029
        _thriftId = thriftId;
12030
        _fieldName = fieldName;
12031
      }
12032
 
12033
      public short getThriftFieldId() {
12034
        return _thriftId;
12035
      }
12036
 
12037
      public String getFieldName() {
12038
        return _fieldName;
12039
      }
12040
    }
12041
 
12042
    // isset id assignments
12043
    private static final int __INVENTORYITEMID_ISSET_ID = 0;
12044
    private BitSet __isset_bit_vector = new BitSet(1);
12045
 
12046
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12047
    static {
12048
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12049
      tmpMap.put(_Fields.INVENTORY_ITEM_ID, new org.apache.thrift.meta_data.FieldMetaData("inventoryItemId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12050
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12051
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12052
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromId_args.class, metaDataMap);
12053
    }
12054
 
12055
    public getInventoryItemFromId_args() {
12056
    }
12057
 
12058
    public getInventoryItemFromId_args(
12059
      long inventoryItemId)
12060
    {
12061
      this();
12062
      this.inventoryItemId = inventoryItemId;
12063
      setInventoryItemIdIsSet(true);
12064
    }
12065
 
12066
    /**
12067
     * Performs a deep copy on <i>other</i>.
12068
     */
12069
    public getInventoryItemFromId_args(getInventoryItemFromId_args other) {
12070
      __isset_bit_vector.clear();
12071
      __isset_bit_vector.or(other.__isset_bit_vector);
12072
      this.inventoryItemId = other.inventoryItemId;
12073
    }
12074
 
12075
    public getInventoryItemFromId_args deepCopy() {
12076
      return new getInventoryItemFromId_args(this);
12077
    }
12078
 
12079
    @Override
12080
    public void clear() {
12081
      setInventoryItemIdIsSet(false);
12082
      this.inventoryItemId = 0;
12083
    }
12084
 
12085
    public long getInventoryItemId() {
12086
      return this.inventoryItemId;
12087
    }
12088
 
12089
    public void setInventoryItemId(long inventoryItemId) {
12090
      this.inventoryItemId = inventoryItemId;
12091
      setInventoryItemIdIsSet(true);
12092
    }
12093
 
12094
    public void unsetInventoryItemId() {
12095
      __isset_bit_vector.clear(__INVENTORYITEMID_ISSET_ID);
12096
    }
12097
 
12098
    /** Returns true if field inventoryItemId is set (has been assigned a value) and false otherwise */
12099
    public boolean isSetInventoryItemId() {
12100
      return __isset_bit_vector.get(__INVENTORYITEMID_ISSET_ID);
12101
    }
12102
 
12103
    public void setInventoryItemIdIsSet(boolean value) {
12104
      __isset_bit_vector.set(__INVENTORYITEMID_ISSET_ID, value);
12105
    }
12106
 
12107
    public void setFieldValue(_Fields field, Object value) {
12108
      switch (field) {
12109
      case INVENTORY_ITEM_ID:
12110
        if (value == null) {
12111
          unsetInventoryItemId();
12112
        } else {
12113
          setInventoryItemId((Long)value);
12114
        }
12115
        break;
12116
 
12117
      }
12118
    }
12119
 
12120
    public Object getFieldValue(_Fields field) {
12121
      switch (field) {
12122
      case INVENTORY_ITEM_ID:
12123
        return Long.valueOf(getInventoryItemId());
12124
 
12125
      }
12126
      throw new IllegalStateException();
12127
    }
12128
 
12129
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12130
    public boolean isSet(_Fields field) {
12131
      if (field == null) {
12132
        throw new IllegalArgumentException();
12133
      }
12134
 
12135
      switch (field) {
12136
      case INVENTORY_ITEM_ID:
12137
        return isSetInventoryItemId();
12138
      }
12139
      throw new IllegalStateException();
12140
    }
12141
 
12142
    @Override
12143
    public boolean equals(Object that) {
12144
      if (that == null)
12145
        return false;
12146
      if (that instanceof getInventoryItemFromId_args)
12147
        return this.equals((getInventoryItemFromId_args)that);
12148
      return false;
12149
    }
12150
 
12151
    public boolean equals(getInventoryItemFromId_args that) {
12152
      if (that == null)
12153
        return false;
12154
 
12155
      boolean this_present_inventoryItemId = true;
12156
      boolean that_present_inventoryItemId = true;
12157
      if (this_present_inventoryItemId || that_present_inventoryItemId) {
12158
        if (!(this_present_inventoryItemId && that_present_inventoryItemId))
12159
          return false;
12160
        if (this.inventoryItemId != that.inventoryItemId)
12161
          return false;
12162
      }
12163
 
12164
      return true;
12165
    }
12166
 
12167
    @Override
12168
    public int hashCode() {
12169
      return 0;
12170
    }
12171
 
12172
    public int compareTo(getInventoryItemFromId_args other) {
12173
      if (!getClass().equals(other.getClass())) {
12174
        return getClass().getName().compareTo(other.getClass().getName());
12175
      }
12176
 
12177
      int lastComparison = 0;
12178
      getInventoryItemFromId_args typedOther = (getInventoryItemFromId_args)other;
12179
 
12180
      lastComparison = Boolean.valueOf(isSetInventoryItemId()).compareTo(typedOther.isSetInventoryItemId());
12181
      if (lastComparison != 0) {
12182
        return lastComparison;
12183
      }
12184
      if (isSetInventoryItemId()) {
12185
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.inventoryItemId, typedOther.inventoryItemId);
12186
        if (lastComparison != 0) {
12187
          return lastComparison;
12188
        }
12189
      }
12190
      return 0;
12191
    }
12192
 
12193
    public _Fields fieldForId(int fieldId) {
12194
      return _Fields.findByThriftId(fieldId);
12195
    }
12196
 
12197
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12198
      org.apache.thrift.protocol.TField field;
12199
      iprot.readStructBegin();
12200
      while (true)
12201
      {
12202
        field = iprot.readFieldBegin();
12203
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12204
          break;
12205
        }
12206
        switch (field.id) {
12207
          case 1: // INVENTORY_ITEM_ID
12208
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12209
              this.inventoryItemId = iprot.readI64();
12210
              setInventoryItemIdIsSet(true);
12211
            } else { 
12212
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12213
            }
12214
            break;
12215
          default:
12216
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12217
        }
12218
        iprot.readFieldEnd();
12219
      }
12220
      iprot.readStructEnd();
12221
      validate();
12222
    }
12223
 
12224
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12225
      validate();
12226
 
12227
      oprot.writeStructBegin(STRUCT_DESC);
12228
      oprot.writeFieldBegin(INVENTORY_ITEM_ID_FIELD_DESC);
12229
      oprot.writeI64(this.inventoryItemId);
12230
      oprot.writeFieldEnd();
12231
      oprot.writeFieldStop();
12232
      oprot.writeStructEnd();
12233
    }
12234
 
12235
    @Override
12236
    public String toString() {
12237
      StringBuilder sb = new StringBuilder("getInventoryItemFromId_args(");
12238
      boolean first = true;
12239
 
12240
      sb.append("inventoryItemId:");
12241
      sb.append(this.inventoryItemId);
12242
      first = false;
12243
      sb.append(")");
12244
      return sb.toString();
12245
    }
12246
 
12247
    public void validate() throws org.apache.thrift.TException {
12248
      // check for required fields
12249
    }
12250
 
12251
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12252
      try {
12253
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12254
      } catch (org.apache.thrift.TException te) {
12255
        throw new java.io.IOException(te);
12256
      }
12257
    }
12258
 
12259
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12260
      try {
5372 mandeep.dh 12261
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
12262
        __isset_bit_vector = new BitSet(1);
5185 mandeep.dh 12263
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12264
      } catch (org.apache.thrift.TException te) {
12265
        throw new java.io.IOException(te);
12266
      }
12267
    }
12268
 
12269
  }
12270
 
12271
  public static class getInventoryItemFromId_result implements org.apache.thrift.TBase<getInventoryItemFromId_result, getInventoryItemFromId_result._Fields>, java.io.Serializable, Cloneable   {
12272
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getInventoryItemFromId_result");
12273
 
12274
    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);
12275
    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);
12276
 
12277
    private InventoryItem success; // required
12278
    private WarehouseServiceException wex; // required
12279
 
12280
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12281
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12282
      SUCCESS((short)0, "success"),
12283
      WEX((short)1, "wex");
12284
 
12285
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12286
 
12287
      static {
12288
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12289
          byName.put(field.getFieldName(), field);
12290
        }
12291
      }
12292
 
12293
      /**
12294
       * Find the _Fields constant that matches fieldId, or null if its not found.
12295
       */
12296
      public static _Fields findByThriftId(int fieldId) {
12297
        switch(fieldId) {
12298
          case 0: // SUCCESS
12299
            return SUCCESS;
12300
          case 1: // WEX
12301
            return WEX;
12302
          default:
12303
            return null;
12304
        }
12305
      }
12306
 
12307
      /**
12308
       * Find the _Fields constant that matches fieldId, throwing an exception
12309
       * if it is not found.
12310
       */
12311
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12312
        _Fields fields = findByThriftId(fieldId);
12313
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12314
        return fields;
12315
      }
12316
 
12317
      /**
12318
       * Find the _Fields constant that matches name, or null if its not found.
12319
       */
12320
      public static _Fields findByName(String name) {
12321
        return byName.get(name);
12322
      }
12323
 
12324
      private final short _thriftId;
12325
      private final String _fieldName;
12326
 
12327
      _Fields(short thriftId, String fieldName) {
12328
        _thriftId = thriftId;
12329
        _fieldName = fieldName;
12330
      }
12331
 
12332
      public short getThriftFieldId() {
12333
        return _thriftId;
12334
      }
12335
 
12336
      public String getFieldName() {
12337
        return _fieldName;
12338
      }
12339
    }
12340
 
12341
    // isset id assignments
12342
 
12343
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12344
    static {
12345
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12346
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12347
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InventoryItem.class)));
12348
      tmpMap.put(_Fields.WEX, new org.apache.thrift.meta_data.FieldMetaData("wex", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12349
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12350
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12351
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getInventoryItemFromId_result.class, metaDataMap);
12352
    }
12353
 
12354
    public getInventoryItemFromId_result() {
12355
    }
12356
 
12357
    public getInventoryItemFromId_result(
12358
      InventoryItem success,
12359
      WarehouseServiceException wex)
12360
    {
12361
      this();
12362
      this.success = success;
12363
      this.wex = wex;
12364
    }
12365
 
12366
    /**
12367
     * Performs a deep copy on <i>other</i>.
12368
     */
12369
    public getInventoryItemFromId_result(getInventoryItemFromId_result other) {
12370
      if (other.isSetSuccess()) {
12371
        this.success = new InventoryItem(other.success);
12372
      }
12373
      if (other.isSetWex()) {
12374
        this.wex = new WarehouseServiceException(other.wex);
12375
      }
12376
    }
12377
 
12378
    public getInventoryItemFromId_result deepCopy() {
12379
      return new getInventoryItemFromId_result(this);
12380
    }
12381
 
12382
    @Override
12383
    public void clear() {
12384
      this.success = null;
12385
      this.wex = null;
12386
    }
12387
 
12388
    public InventoryItem getSuccess() {
12389
      return this.success;
12390
    }
12391
 
12392
    public void setSuccess(InventoryItem success) {
12393
      this.success = success;
12394
    }
12395
 
12396
    public void unsetSuccess() {
12397
      this.success = null;
12398
    }
12399
 
12400
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
12401
    public boolean isSetSuccess() {
12402
      return this.success != null;
12403
    }
12404
 
12405
    public void setSuccessIsSet(boolean value) {
12406
      if (!value) {
12407
        this.success = null;
12408
      }
12409
    }
12410
 
12411
    public WarehouseServiceException getWex() {
12412
      return this.wex;
12413
    }
12414
 
12415
    public void setWex(WarehouseServiceException wex) {
12416
      this.wex = wex;
12417
    }
12418
 
12419
    public void unsetWex() {
12420
      this.wex = null;
12421
    }
12422
 
12423
    /** Returns true if field wex is set (has been assigned a value) and false otherwise */
12424
    public boolean isSetWex() {
12425
      return this.wex != null;
12426
    }
12427
 
12428
    public void setWexIsSet(boolean value) {
12429
      if (!value) {
12430
        this.wex = null;
12431
      }
12432
    }
12433
 
12434
    public void setFieldValue(_Fields field, Object value) {
12435
      switch (field) {
12436
      case SUCCESS:
12437
        if (value == null) {
12438
          unsetSuccess();
12439
        } else {
12440
          setSuccess((InventoryItem)value);
12441
        }
12442
        break;
12443
 
12444
      case WEX:
12445
        if (value == null) {
12446
          unsetWex();
12447
        } else {
12448
          setWex((WarehouseServiceException)value);
12449
        }
12450
        break;
12451
 
12452
      }
12453
    }
12454
 
12455
    public Object getFieldValue(_Fields field) {
12456
      switch (field) {
12457
      case SUCCESS:
12458
        return getSuccess();
12459
 
12460
      case WEX:
12461
        return getWex();
12462
 
12463
      }
12464
      throw new IllegalStateException();
12465
    }
12466
 
12467
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12468
    public boolean isSet(_Fields field) {
12469
      if (field == null) {
12470
        throw new IllegalArgumentException();
12471
      }
12472
 
12473
      switch (field) {
12474
      case SUCCESS:
12475
        return isSetSuccess();
12476
      case WEX:
12477
        return isSetWex();
12478
      }
12479
      throw new IllegalStateException();
12480
    }
12481
 
12482
    @Override
12483
    public boolean equals(Object that) {
12484
      if (that == null)
12485
        return false;
12486
      if (that instanceof getInventoryItemFromId_result)
12487
        return this.equals((getInventoryItemFromId_result)that);
12488
      return false;
12489
    }
12490
 
12491
    public boolean equals(getInventoryItemFromId_result that) {
12492
      if (that == null)
12493
        return false;
12494
 
12495
      boolean this_present_success = true && this.isSetSuccess();
12496
      boolean that_present_success = true && that.isSetSuccess();
12497
      if (this_present_success || that_present_success) {
12498
        if (!(this_present_success && that_present_success))
12499
          return false;
12500
        if (!this.success.equals(that.success))
12501
          return false;
12502
      }
12503
 
12504
      boolean this_present_wex = true && this.isSetWex();
12505
      boolean that_present_wex = true && that.isSetWex();
12506
      if (this_present_wex || that_present_wex) {
12507
        if (!(this_present_wex && that_present_wex))
12508
          return false;
12509
        if (!this.wex.equals(that.wex))
12510
          return false;
12511
      }
12512
 
12513
      return true;
12514
    }
12515
 
12516
    @Override
12517
    public int hashCode() {
12518
      return 0;
12519
    }
12520
 
12521
    public int compareTo(getInventoryItemFromId_result other) {
12522
      if (!getClass().equals(other.getClass())) {
12523
        return getClass().getName().compareTo(other.getClass().getName());
12524
      }
12525
 
12526
      int lastComparison = 0;
12527
      getInventoryItemFromId_result typedOther = (getInventoryItemFromId_result)other;
12528
 
12529
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
12530
      if (lastComparison != 0) {
12531
        return lastComparison;
12532
      }
12533
      if (isSetSuccess()) {
12534
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12535
        if (lastComparison != 0) {
12536
          return lastComparison;
12537
        }
12538
      }
12539
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(typedOther.isSetWex());
12540
      if (lastComparison != 0) {
12541
        return lastComparison;
12542
      }
12543
      if (isSetWex()) {
12544
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.wex, typedOther.wex);
12545
        if (lastComparison != 0) {
12546
          return lastComparison;
12547
        }
12548
      }
12549
      return 0;
12550
    }
12551
 
12552
    public _Fields fieldForId(int fieldId) {
12553
      return _Fields.findByThriftId(fieldId);
12554
    }
12555
 
12556
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12557
      org.apache.thrift.protocol.TField field;
12558
      iprot.readStructBegin();
12559
      while (true)
12560
      {
12561
        field = iprot.readFieldBegin();
12562
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12563
          break;
12564
        }
12565
        switch (field.id) {
12566
          case 0: // SUCCESS
12567
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12568
              this.success = new InventoryItem();
12569
              this.success.read(iprot);
12570
            } else { 
12571
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12572
            }
12573
            break;
12574
          case 1: // WEX
12575
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
12576
              this.wex = new WarehouseServiceException();
12577
              this.wex.read(iprot);
12578
            } else { 
12579
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12580
            }
12581
            break;
12582
          default:
12583
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12584
        }
12585
        iprot.readFieldEnd();
12586
      }
12587
      iprot.readStructEnd();
12588
      validate();
12589
    }
12590
 
12591
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12592
      oprot.writeStructBegin(STRUCT_DESC);
12593
 
12594
      if (this.isSetSuccess()) {
12595
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12596
        this.success.write(oprot);
12597
        oprot.writeFieldEnd();
12598
      } else if (this.isSetWex()) {
12599
        oprot.writeFieldBegin(WEX_FIELD_DESC);
12600
        this.wex.write(oprot);
12601
        oprot.writeFieldEnd();
12602
      }
12603
      oprot.writeFieldStop();
12604
      oprot.writeStructEnd();
12605
    }
12606
 
12607
    @Override
12608
    public String toString() {
12609
      StringBuilder sb = new StringBuilder("getInventoryItemFromId_result(");
12610
      boolean first = true;
12611
 
12612
      sb.append("success:");
12613
      if (this.success == null) {
12614
        sb.append("null");
12615
      } else {
12616
        sb.append(this.success);
12617
      }
12618
      first = false;
12619
      if (!first) sb.append(", ");
12620
      sb.append("wex:");
12621
      if (this.wex == null) {
12622
        sb.append("null");
12623
      } else {
12624
        sb.append(this.wex);
12625
      }
12626
      first = false;
12627
      sb.append(")");
12628
      return sb.toString();
12629
    }
12630
 
12631
    public void validate() throws org.apache.thrift.TException {
12632
      // check for required fields
12633
    }
12634
 
12635
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12636
      try {
12637
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12638
      } catch (org.apache.thrift.TException te) {
12639
        throw new java.io.IOException(te);
12640
      }
12641
    }
12642
 
12643
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12644
      try {
12645
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12646
      } catch (org.apache.thrift.TException te) {
12647
        throw new java.io.IOException(te);
12648
      }
12649
    }
12650
 
12651
  }
12652
 
5372 mandeep.dh 12653
  public static class getPurchaseScans_args implements org.apache.thrift.TBase<getPurchaseScans_args, getPurchaseScans_args._Fields>, java.io.Serializable, Cloneable   {
12654
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScans_args");
12655
 
12656
    private static final org.apache.thrift.protocol.TField START_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("startDate", org.apache.thrift.protocol.TType.I64, (short)1);
12657
    private static final org.apache.thrift.protocol.TField END_DATE_FIELD_DESC = new org.apache.thrift.protocol.TField("endDate", org.apache.thrift.protocol.TType.I64, (short)2);
12658
 
12659
    private long startDate; // required
12660
    private long endDate; // required
12661
 
12662
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12663
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
12664
      START_DATE((short)1, "startDate"),
12665
      END_DATE((short)2, "endDate");
12666
 
12667
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12668
 
12669
      static {
12670
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12671
          byName.put(field.getFieldName(), field);
12672
        }
12673
      }
12674
 
12675
      /**
12676
       * Find the _Fields constant that matches fieldId, or null if its not found.
12677
       */
12678
      public static _Fields findByThriftId(int fieldId) {
12679
        switch(fieldId) {
12680
          case 1: // START_DATE
12681
            return START_DATE;
12682
          case 2: // END_DATE
12683
            return END_DATE;
12684
          default:
12685
            return null;
12686
        }
12687
      }
12688
 
12689
      /**
12690
       * Find the _Fields constant that matches fieldId, throwing an exception
12691
       * if it is not found.
12692
       */
12693
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12694
        _Fields fields = findByThriftId(fieldId);
12695
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12696
        return fields;
12697
      }
12698
 
12699
      /**
12700
       * Find the _Fields constant that matches name, or null if its not found.
12701
       */
12702
      public static _Fields findByName(String name) {
12703
        return byName.get(name);
12704
      }
12705
 
12706
      private final short _thriftId;
12707
      private final String _fieldName;
12708
 
12709
      _Fields(short thriftId, String fieldName) {
12710
        _thriftId = thriftId;
12711
        _fieldName = fieldName;
12712
      }
12713
 
12714
      public short getThriftFieldId() {
12715
        return _thriftId;
12716
      }
12717
 
12718
      public String getFieldName() {
12719
        return _fieldName;
12720
      }
12721
    }
12722
 
12723
    // isset id assignments
12724
    private static final int __STARTDATE_ISSET_ID = 0;
12725
    private static final int __ENDDATE_ISSET_ID = 1;
12726
    private BitSet __isset_bit_vector = new BitSet(2);
12727
 
12728
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
12729
    static {
12730
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12731
      tmpMap.put(_Fields.START_DATE, new org.apache.thrift.meta_data.FieldMetaData("startDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12732
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12733
      tmpMap.put(_Fields.END_DATE, new org.apache.thrift.meta_data.FieldMetaData("endDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12734
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12735
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12736
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScans_args.class, metaDataMap);
12737
    }
12738
 
12739
    public getPurchaseScans_args() {
12740
    }
12741
 
12742
    public getPurchaseScans_args(
12743
      long startDate,
12744
      long endDate)
12745
    {
12746
      this();
12747
      this.startDate = startDate;
12748
      setStartDateIsSet(true);
12749
      this.endDate = endDate;
12750
      setEndDateIsSet(true);
12751
    }
12752
 
12753
    /**
12754
     * Performs a deep copy on <i>other</i>.
12755
     */
12756
    public getPurchaseScans_args(getPurchaseScans_args other) {
12757
      __isset_bit_vector.clear();
12758
      __isset_bit_vector.or(other.__isset_bit_vector);
12759
      this.startDate = other.startDate;
12760
      this.endDate = other.endDate;
12761
    }
12762
 
12763
    public getPurchaseScans_args deepCopy() {
12764
      return new getPurchaseScans_args(this);
12765
    }
12766
 
12767
    @Override
12768
    public void clear() {
12769
      setStartDateIsSet(false);
12770
      this.startDate = 0;
12771
      setEndDateIsSet(false);
12772
      this.endDate = 0;
12773
    }
12774
 
12775
    public long getStartDate() {
12776
      return this.startDate;
12777
    }
12778
 
12779
    public void setStartDate(long startDate) {
12780
      this.startDate = startDate;
12781
      setStartDateIsSet(true);
12782
    }
12783
 
12784
    public void unsetStartDate() {
12785
      __isset_bit_vector.clear(__STARTDATE_ISSET_ID);
12786
    }
12787
 
12788
    /** Returns true if field startDate is set (has been assigned a value) and false otherwise */
12789
    public boolean isSetStartDate() {
12790
      return __isset_bit_vector.get(__STARTDATE_ISSET_ID);
12791
    }
12792
 
12793
    public void setStartDateIsSet(boolean value) {
12794
      __isset_bit_vector.set(__STARTDATE_ISSET_ID, value);
12795
    }
12796
 
12797
    public long getEndDate() {
12798
      return this.endDate;
12799
    }
12800
 
12801
    public void setEndDate(long endDate) {
12802
      this.endDate = endDate;
12803
      setEndDateIsSet(true);
12804
    }
12805
 
12806
    public void unsetEndDate() {
12807
      __isset_bit_vector.clear(__ENDDATE_ISSET_ID);
12808
    }
12809
 
12810
    /** Returns true if field endDate is set (has been assigned a value) and false otherwise */
12811
    public boolean isSetEndDate() {
12812
      return __isset_bit_vector.get(__ENDDATE_ISSET_ID);
12813
    }
12814
 
12815
    public void setEndDateIsSet(boolean value) {
12816
      __isset_bit_vector.set(__ENDDATE_ISSET_ID, value);
12817
    }
12818
 
12819
    public void setFieldValue(_Fields field, Object value) {
12820
      switch (field) {
12821
      case START_DATE:
12822
        if (value == null) {
12823
          unsetStartDate();
12824
        } else {
12825
          setStartDate((Long)value);
12826
        }
12827
        break;
12828
 
12829
      case END_DATE:
12830
        if (value == null) {
12831
          unsetEndDate();
12832
        } else {
12833
          setEndDate((Long)value);
12834
        }
12835
        break;
12836
 
12837
      }
12838
    }
12839
 
12840
    public Object getFieldValue(_Fields field) {
12841
      switch (field) {
12842
      case START_DATE:
12843
        return Long.valueOf(getStartDate());
12844
 
12845
      case END_DATE:
12846
        return Long.valueOf(getEndDate());
12847
 
12848
      }
12849
      throw new IllegalStateException();
12850
    }
12851
 
12852
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12853
    public boolean isSet(_Fields field) {
12854
      if (field == null) {
12855
        throw new IllegalArgumentException();
12856
      }
12857
 
12858
      switch (field) {
12859
      case START_DATE:
12860
        return isSetStartDate();
12861
      case END_DATE:
12862
        return isSetEndDate();
12863
      }
12864
      throw new IllegalStateException();
12865
    }
12866
 
12867
    @Override
12868
    public boolean equals(Object that) {
12869
      if (that == null)
12870
        return false;
12871
      if (that instanceof getPurchaseScans_args)
12872
        return this.equals((getPurchaseScans_args)that);
12873
      return false;
12874
    }
12875
 
12876
    public boolean equals(getPurchaseScans_args that) {
12877
      if (that == null)
12878
        return false;
12879
 
12880
      boolean this_present_startDate = true;
12881
      boolean that_present_startDate = true;
12882
      if (this_present_startDate || that_present_startDate) {
12883
        if (!(this_present_startDate && that_present_startDate))
12884
          return false;
12885
        if (this.startDate != that.startDate)
12886
          return false;
12887
      }
12888
 
12889
      boolean this_present_endDate = true;
12890
      boolean that_present_endDate = true;
12891
      if (this_present_endDate || that_present_endDate) {
12892
        if (!(this_present_endDate && that_present_endDate))
12893
          return false;
12894
        if (this.endDate != that.endDate)
12895
          return false;
12896
      }
12897
 
12898
      return true;
12899
    }
12900
 
12901
    @Override
12902
    public int hashCode() {
12903
      return 0;
12904
    }
12905
 
12906
    public int compareTo(getPurchaseScans_args other) {
12907
      if (!getClass().equals(other.getClass())) {
12908
        return getClass().getName().compareTo(other.getClass().getName());
12909
      }
12910
 
12911
      int lastComparison = 0;
12912
      getPurchaseScans_args typedOther = (getPurchaseScans_args)other;
12913
 
12914
      lastComparison = Boolean.valueOf(isSetStartDate()).compareTo(typedOther.isSetStartDate());
12915
      if (lastComparison != 0) {
12916
        return lastComparison;
12917
      }
12918
      if (isSetStartDate()) {
12919
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.startDate, typedOther.startDate);
12920
        if (lastComparison != 0) {
12921
          return lastComparison;
12922
        }
12923
      }
12924
      lastComparison = Boolean.valueOf(isSetEndDate()).compareTo(typedOther.isSetEndDate());
12925
      if (lastComparison != 0) {
12926
        return lastComparison;
12927
      }
12928
      if (isSetEndDate()) {
12929
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.endDate, typedOther.endDate);
12930
        if (lastComparison != 0) {
12931
          return lastComparison;
12932
        }
12933
      }
12934
      return 0;
12935
    }
12936
 
12937
    public _Fields fieldForId(int fieldId) {
12938
      return _Fields.findByThriftId(fieldId);
12939
    }
12940
 
12941
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12942
      org.apache.thrift.protocol.TField field;
12943
      iprot.readStructBegin();
12944
      while (true)
12945
      {
12946
        field = iprot.readFieldBegin();
12947
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
12948
          break;
12949
        }
12950
        switch (field.id) {
12951
          case 1: // START_DATE
12952
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12953
              this.startDate = iprot.readI64();
12954
              setStartDateIsSet(true);
12955
            } else { 
12956
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12957
            }
12958
            break;
12959
          case 2: // END_DATE
12960
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12961
              this.endDate = iprot.readI64();
12962
              setEndDateIsSet(true);
12963
            } else { 
12964
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12965
            }
12966
            break;
12967
          default:
12968
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12969
        }
12970
        iprot.readFieldEnd();
12971
      }
12972
      iprot.readStructEnd();
12973
      validate();
12974
    }
12975
 
12976
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
12977
      validate();
12978
 
12979
      oprot.writeStructBegin(STRUCT_DESC);
12980
      oprot.writeFieldBegin(START_DATE_FIELD_DESC);
12981
      oprot.writeI64(this.startDate);
12982
      oprot.writeFieldEnd();
12983
      oprot.writeFieldBegin(END_DATE_FIELD_DESC);
12984
      oprot.writeI64(this.endDate);
12985
      oprot.writeFieldEnd();
12986
      oprot.writeFieldStop();
12987
      oprot.writeStructEnd();
12988
    }
12989
 
12990
    @Override
12991
    public String toString() {
12992
      StringBuilder sb = new StringBuilder("getPurchaseScans_args(");
12993
      boolean first = true;
12994
 
12995
      sb.append("startDate:");
12996
      sb.append(this.startDate);
12997
      first = false;
12998
      if (!first) sb.append(", ");
12999
      sb.append("endDate:");
13000
      sb.append(this.endDate);
13001
      first = false;
13002
      sb.append(")");
13003
      return sb.toString();
13004
    }
13005
 
13006
    public void validate() throws org.apache.thrift.TException {
13007
      // check for required fields
13008
    }
13009
 
13010
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13011
      try {
13012
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13013
      } catch (org.apache.thrift.TException te) {
13014
        throw new java.io.IOException(te);
13015
      }
13016
    }
13017
 
13018
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13019
      try {
13020
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
13021
        __isset_bit_vector = new BitSet(1);
13022
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13023
      } catch (org.apache.thrift.TException te) {
13024
        throw new java.io.IOException(te);
13025
      }
13026
    }
13027
 
13028
  }
13029
 
13030
  public static class getPurchaseScans_result implements org.apache.thrift.TBase<getPurchaseScans_result, getPurchaseScans_result._Fields>, java.io.Serializable, Cloneable   {
13031
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPurchaseScans_result");
13032
 
13033
    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);
13034
 
13035
    private List<DetailedPurchaseScan> success; // required
13036
 
13037
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13038
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13039
      SUCCESS((short)0, "success");
13040
 
13041
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13042
 
13043
      static {
13044
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13045
          byName.put(field.getFieldName(), field);
13046
        }
13047
      }
13048
 
13049
      /**
13050
       * Find the _Fields constant that matches fieldId, or null if its not found.
13051
       */
13052
      public static _Fields findByThriftId(int fieldId) {
13053
        switch(fieldId) {
13054
          case 0: // SUCCESS
13055
            return SUCCESS;
13056
          default:
13057
            return null;
13058
        }
13059
      }
13060
 
13061
      /**
13062
       * Find the _Fields constant that matches fieldId, throwing an exception
13063
       * if it is not found.
13064
       */
13065
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13066
        _Fields fields = findByThriftId(fieldId);
13067
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13068
        return fields;
13069
      }
13070
 
13071
      /**
13072
       * Find the _Fields constant that matches name, or null if its not found.
13073
       */
13074
      public static _Fields findByName(String name) {
13075
        return byName.get(name);
13076
      }
13077
 
13078
      private final short _thriftId;
13079
      private final String _fieldName;
13080
 
13081
      _Fields(short thriftId, String fieldName) {
13082
        _thriftId = thriftId;
13083
        _fieldName = fieldName;
13084
      }
13085
 
13086
      public short getThriftFieldId() {
13087
        return _thriftId;
13088
      }
13089
 
13090
      public String getFieldName() {
13091
        return _fieldName;
13092
      }
13093
    }
13094
 
13095
    // isset id assignments
13096
 
13097
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13098
    static {
13099
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13100
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13101
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
13102
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, DetailedPurchaseScan.class))));
13103
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13104
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPurchaseScans_result.class, metaDataMap);
13105
    }
13106
 
13107
    public getPurchaseScans_result() {
13108
    }
13109
 
13110
    public getPurchaseScans_result(
13111
      List<DetailedPurchaseScan> success)
13112
    {
13113
      this();
13114
      this.success = success;
13115
    }
13116
 
13117
    /**
13118
     * Performs a deep copy on <i>other</i>.
13119
     */
13120
    public getPurchaseScans_result(getPurchaseScans_result other) {
13121
      if (other.isSetSuccess()) {
13122
        List<DetailedPurchaseScan> __this__success = new ArrayList<DetailedPurchaseScan>();
13123
        for (DetailedPurchaseScan other_element : other.success) {
13124
          __this__success.add(new DetailedPurchaseScan(other_element));
13125
        }
13126
        this.success = __this__success;
13127
      }
13128
    }
13129
 
13130
    public getPurchaseScans_result deepCopy() {
13131
      return new getPurchaseScans_result(this);
13132
    }
13133
 
13134
    @Override
13135
    public void clear() {
13136
      this.success = null;
13137
    }
13138
 
13139
    public int getSuccessSize() {
13140
      return (this.success == null) ? 0 : this.success.size();
13141
    }
13142
 
13143
    public java.util.Iterator<DetailedPurchaseScan> getSuccessIterator() {
13144
      return (this.success == null) ? null : this.success.iterator();
13145
    }
13146
 
13147
    public void addToSuccess(DetailedPurchaseScan elem) {
13148
      if (this.success == null) {
13149
        this.success = new ArrayList<DetailedPurchaseScan>();
13150
      }
13151
      this.success.add(elem);
13152
    }
13153
 
13154
    public List<DetailedPurchaseScan> getSuccess() {
13155
      return this.success;
13156
    }
13157
 
13158
    public void setSuccess(List<DetailedPurchaseScan> success) {
13159
      this.success = success;
13160
    }
13161
 
13162
    public void unsetSuccess() {
13163
      this.success = null;
13164
    }
13165
 
13166
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13167
    public boolean isSetSuccess() {
13168
      return this.success != null;
13169
    }
13170
 
13171
    public void setSuccessIsSet(boolean value) {
13172
      if (!value) {
13173
        this.success = null;
13174
      }
13175
    }
13176
 
13177
    public void setFieldValue(_Fields field, Object value) {
13178
      switch (field) {
13179
      case SUCCESS:
13180
        if (value == null) {
13181
          unsetSuccess();
13182
        } else {
13183
          setSuccess((List<DetailedPurchaseScan>)value);
13184
        }
13185
        break;
13186
 
13187
      }
13188
    }
13189
 
13190
    public Object getFieldValue(_Fields field) {
13191
      switch (field) {
13192
      case SUCCESS:
13193
        return getSuccess();
13194
 
13195
      }
13196
      throw new IllegalStateException();
13197
    }
13198
 
13199
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13200
    public boolean isSet(_Fields field) {
13201
      if (field == null) {
13202
        throw new IllegalArgumentException();
13203
      }
13204
 
13205
      switch (field) {
13206
      case SUCCESS:
13207
        return isSetSuccess();
13208
      }
13209
      throw new IllegalStateException();
13210
    }
13211
 
13212
    @Override
13213
    public boolean equals(Object that) {
13214
      if (that == null)
13215
        return false;
13216
      if (that instanceof getPurchaseScans_result)
13217
        return this.equals((getPurchaseScans_result)that);
13218
      return false;
13219
    }
13220
 
13221
    public boolean equals(getPurchaseScans_result that) {
13222
      if (that == null)
13223
        return false;
13224
 
13225
      boolean this_present_success = true && this.isSetSuccess();
13226
      boolean that_present_success = true && that.isSetSuccess();
13227
      if (this_present_success || that_present_success) {
13228
        if (!(this_present_success && that_present_success))
13229
          return false;
13230
        if (!this.success.equals(that.success))
13231
          return false;
13232
      }
13233
 
13234
      return true;
13235
    }
13236
 
13237
    @Override
13238
    public int hashCode() {
13239
      return 0;
13240
    }
13241
 
13242
    public int compareTo(getPurchaseScans_result other) {
13243
      if (!getClass().equals(other.getClass())) {
13244
        return getClass().getName().compareTo(other.getClass().getName());
13245
      }
13246
 
13247
      int lastComparison = 0;
13248
      getPurchaseScans_result typedOther = (getPurchaseScans_result)other;
13249
 
13250
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13251
      if (lastComparison != 0) {
13252
        return lastComparison;
13253
      }
13254
      if (isSetSuccess()) {
13255
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13256
        if (lastComparison != 0) {
13257
          return lastComparison;
13258
        }
13259
      }
13260
      return 0;
13261
    }
13262
 
13263
    public _Fields fieldForId(int fieldId) {
13264
      return _Fields.findByThriftId(fieldId);
13265
    }
13266
 
13267
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13268
      org.apache.thrift.protocol.TField field;
13269
      iprot.readStructBegin();
13270
      while (true)
13271
      {
13272
        field = iprot.readFieldBegin();
13273
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13274
          break;
13275
        }
13276
        switch (field.id) {
13277
          case 0: // SUCCESS
13278
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
13279
              {
13280
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
13281
                this.success = new ArrayList<DetailedPurchaseScan>(_list12.size);
13282
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
13283
                {
13284
                  DetailedPurchaseScan _elem14; // required
13285
                  _elem14 = new DetailedPurchaseScan();
13286
                  _elem14.read(iprot);
13287
                  this.success.add(_elem14);
13288
                }
13289
                iprot.readListEnd();
13290
              }
13291
            } else { 
13292
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13293
            }
13294
            break;
13295
          default:
13296
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13297
        }
13298
        iprot.readFieldEnd();
13299
      }
13300
      iprot.readStructEnd();
13301
      validate();
13302
    }
13303
 
13304
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13305
      oprot.writeStructBegin(STRUCT_DESC);
13306
 
13307
      if (this.isSetSuccess()) {
13308
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13309
        {
13310
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
13311
          for (DetailedPurchaseScan _iter15 : this.success)
13312
          {
13313
            _iter15.write(oprot);
13314
          }
13315
          oprot.writeListEnd();
13316
        }
13317
        oprot.writeFieldEnd();
13318
      }
13319
      oprot.writeFieldStop();
13320
      oprot.writeStructEnd();
13321
    }
13322
 
13323
    @Override
13324
    public String toString() {
13325
      StringBuilder sb = new StringBuilder("getPurchaseScans_result(");
13326
      boolean first = true;
13327
 
13328
      sb.append("success:");
13329
      if (this.success == null) {
13330
        sb.append("null");
13331
      } else {
13332
        sb.append(this.success);
13333
      }
13334
      first = false;
13335
      sb.append(")");
13336
      return sb.toString();
13337
    }
13338
 
13339
    public void validate() throws org.apache.thrift.TException {
13340
      // check for required fields
13341
    }
13342
 
13343
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13344
      try {
13345
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13346
      } catch (org.apache.thrift.TException te) {
13347
        throw new java.io.IOException(te);
13348
      }
13349
    }
13350
 
13351
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13352
      try {
13353
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13354
      } catch (org.apache.thrift.TException te) {
13355
        throw new java.io.IOException(te);
13356
      }
13357
    }
13358
 
13359
  }
13360
 
2820 chandransh 13361
}