Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
2820 chandransh 1
/**
2
 * Autogenerated by Thrift
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;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class WarehouseService {
27
 
3374 rajveer 28
  public interface Iface extends in.shop2020.generic.GenericService.Iface {
2820 chandransh 29
 
30
    /**
31
     * Creates a purchase order based on the data in the given purchase order object.
32
     * This method populates a nummber of missing fields
33
     * 
34
     * @param purchaseOrder
35
     */
36
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws WarehouseServiceException, TException;
37
 
38
    /**
39
     * Returns the purchase order with the given id. Throws an exception if there is no such purchase order.
40
     * 
41
     * @param id
42
     */
43
    public PurchaseOrder getPurchaseOrder(long id) throws WarehouseServiceException, TException;
44
 
45
    /**
2832 chandransh 46
     * Returns the supplier with the given order id. Throws an exception if there is no such supplier.
47
     * 
48
     * @param id
49
     */
50
    public Supplier getSupplier(long id) throws WarehouseServiceException, TException;
51
 
52
    /**
2820 chandransh 53
     * Creates a purchase for the given purchase order.
54
     * Throws an exception if no more purchases are allowed against the given purchase order.
55
     * 
56
     * @param purchaseOrderId
57
     * @param invoiceNumber
58
     * @param freightCharges
59
     */
60
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws WarehouseServiceException, TException;
61
 
62
    /**
63
     * Marks a purchase as complete and updates the receivedOn time.
64
     * Throws an exception if no such purchase exists.
65
     * 
66
     * @param purchaseId
67
     */
68
    public long closePurchase(long purchaseId) throws WarehouseServiceException, TException;
69
 
70
    /**
71
     * Creates a StockLedger and a Scan object using the given details.
72
     * Raises an exception if no more of the given item can be scanned in against the purchase order of the given purchase.
73
     * 
74
     * @param purchaseId
75
     * @param itemId
76
     * @param itemNumber
77
     * @param imeiNumber
78
     * @param type
79
     */
80
    public void scanIn(long purchaseId, long itemId, String itemNumber, String imeiNumber, ScanType type) throws WarehouseServiceException, TException;
81
 
82
    /**
83
     * Marks the StockLedger object with the given details as scanned out. In case, the imeiNumber is not given,
84
     * marks the oldest ItemInventory object as being scanned out.
85
     * Creats a Scan object for this action.
86
     * Raises an exception if:
87
     * 1. There is no stock present corresponding to the given item details.
88
     * 2. An older stock is present corresponding to the itemNumber which has not been scanned out.
89
     * 
90
     * @param itemNumber
91
     * @param imeiNumber
92
     * @param type
93
     */
94
    public void scanOut(long itemNumber, long imeiNumber, ScanType type) throws WarehouseServiceException, TException;
95
 
96
  }
97
 
3374 rajveer 98
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
2820 chandransh 99
    public Client(TProtocol prot)
100
    {
101
      this(prot, prot);
102
    }
103
 
104
    public Client(TProtocol iprot, TProtocol oprot)
105
    {
3374 rajveer 106
      super(iprot, oprot);
2820 chandransh 107
    }
108
 
109
    public long createPurchaseOrder(PurchaseOrder purchaseOrder) throws WarehouseServiceException, TException
110
    {
111
      send_createPurchaseOrder(purchaseOrder);
112
      return recv_createPurchaseOrder();
113
    }
114
 
115
    public void send_createPurchaseOrder(PurchaseOrder purchaseOrder) throws TException
116
    {
117
      oprot_.writeMessageBegin(new TMessage("createPurchaseOrder", TMessageType.CALL, seqid_));
118
      createPurchaseOrder_args args = new createPurchaseOrder_args();
119
      args.purchaseOrder = purchaseOrder;
120
      args.write(oprot_);
121
      oprot_.writeMessageEnd();
122
      oprot_.getTransport().flush();
123
    }
124
 
125
    public long recv_createPurchaseOrder() throws WarehouseServiceException, TException
126
    {
127
      TMessage msg = iprot_.readMessageBegin();
128
      if (msg.type == TMessageType.EXCEPTION) {
129
        TApplicationException x = TApplicationException.read(iprot_);
130
        iprot_.readMessageEnd();
131
        throw x;
132
      }
133
      createPurchaseOrder_result result = new createPurchaseOrder_result();
134
      result.read(iprot_);
135
      iprot_.readMessageEnd();
136
      if (result.isSetSuccess()) {
137
        return result.success;
138
      }
139
      if (result.wex != null) {
140
        throw result.wex;
141
      }
142
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
143
    }
144
 
145
    public PurchaseOrder getPurchaseOrder(long id) throws WarehouseServiceException, TException
146
    {
147
      send_getPurchaseOrder(id);
148
      return recv_getPurchaseOrder();
149
    }
150
 
151
    public void send_getPurchaseOrder(long id) throws TException
152
    {
153
      oprot_.writeMessageBegin(new TMessage("getPurchaseOrder", TMessageType.CALL, seqid_));
154
      getPurchaseOrder_args args = new getPurchaseOrder_args();
155
      args.id = id;
156
      args.write(oprot_);
157
      oprot_.writeMessageEnd();
158
      oprot_.getTransport().flush();
159
    }
160
 
161
    public PurchaseOrder recv_getPurchaseOrder() throws WarehouseServiceException, TException
162
    {
163
      TMessage msg = iprot_.readMessageBegin();
164
      if (msg.type == TMessageType.EXCEPTION) {
165
        TApplicationException x = TApplicationException.read(iprot_);
166
        iprot_.readMessageEnd();
167
        throw x;
168
      }
169
      getPurchaseOrder_result result = new getPurchaseOrder_result();
170
      result.read(iprot_);
171
      iprot_.readMessageEnd();
172
      if (result.isSetSuccess()) {
173
        return result.success;
174
      }
175
      if (result.wex != null) {
176
        throw result.wex;
177
      }
178
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
179
    }
180
 
2832 chandransh 181
    public Supplier getSupplier(long id) throws WarehouseServiceException, TException
182
    {
183
      send_getSupplier(id);
184
      return recv_getSupplier();
185
    }
186
 
187
    public void send_getSupplier(long id) throws TException
188
    {
189
      oprot_.writeMessageBegin(new TMessage("getSupplier", TMessageType.CALL, seqid_));
190
      getSupplier_args args = new getSupplier_args();
191
      args.id = id;
192
      args.write(oprot_);
193
      oprot_.writeMessageEnd();
194
      oprot_.getTransport().flush();
195
    }
196
 
197
    public Supplier recv_getSupplier() throws WarehouseServiceException, TException
198
    {
199
      TMessage msg = iprot_.readMessageBegin();
200
      if (msg.type == TMessageType.EXCEPTION) {
201
        TApplicationException x = TApplicationException.read(iprot_);
202
        iprot_.readMessageEnd();
203
        throw x;
204
      }
205
      getSupplier_result result = new getSupplier_result();
206
      result.read(iprot_);
207
      iprot_.readMessageEnd();
208
      if (result.isSetSuccess()) {
209
        return result.success;
210
      }
211
      if (result.wex != null) {
212
        throw result.wex;
213
      }
214
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
215
    }
216
 
2820 chandransh 217
    public long startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws WarehouseServiceException, TException
218
    {
219
      send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges);
220
      return recv_startPurchase();
221
    }
222
 
223
    public void send_startPurchase(long purchaseOrderId, String invoiceNumber, double freightCharges) throws TException
224
    {
225
      oprot_.writeMessageBegin(new TMessage("startPurchase", TMessageType.CALL, seqid_));
226
      startPurchase_args args = new startPurchase_args();
227
      args.purchaseOrderId = purchaseOrderId;
228
      args.invoiceNumber = invoiceNumber;
229
      args.freightCharges = freightCharges;
230
      args.write(oprot_);
231
      oprot_.writeMessageEnd();
232
      oprot_.getTransport().flush();
233
    }
234
 
235
    public long recv_startPurchase() throws WarehouseServiceException, TException
236
    {
237
      TMessage msg = iprot_.readMessageBegin();
238
      if (msg.type == TMessageType.EXCEPTION) {
239
        TApplicationException x = TApplicationException.read(iprot_);
240
        iprot_.readMessageEnd();
241
        throw x;
242
      }
243
      startPurchase_result result = new startPurchase_result();
244
      result.read(iprot_);
245
      iprot_.readMessageEnd();
246
      if (result.isSetSuccess()) {
247
        return result.success;
248
      }
249
      if (result.wex != null) {
250
        throw result.wex;
251
      }
252
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
253
    }
254
 
255
    public long closePurchase(long purchaseId) throws WarehouseServiceException, TException
256
    {
257
      send_closePurchase(purchaseId);
258
      return recv_closePurchase();
259
    }
260
 
261
    public void send_closePurchase(long purchaseId) throws TException
262
    {
263
      oprot_.writeMessageBegin(new TMessage("closePurchase", TMessageType.CALL, seqid_));
264
      closePurchase_args args = new closePurchase_args();
265
      args.purchaseId = purchaseId;
266
      args.write(oprot_);
267
      oprot_.writeMessageEnd();
268
      oprot_.getTransport().flush();
269
    }
270
 
271
    public long recv_closePurchase() throws WarehouseServiceException, TException
272
    {
273
      TMessage msg = iprot_.readMessageBegin();
274
      if (msg.type == TMessageType.EXCEPTION) {
275
        TApplicationException x = TApplicationException.read(iprot_);
276
        iprot_.readMessageEnd();
277
        throw x;
278
      }
279
      closePurchase_result result = new closePurchase_result();
280
      result.read(iprot_);
281
      iprot_.readMessageEnd();
282
      if (result.isSetSuccess()) {
283
        return result.success;
284
      }
285
      if (result.wex != null) {
286
        throw result.wex;
287
      }
288
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
289
    }
290
 
291
    public void scanIn(long purchaseId, long itemId, String itemNumber, String imeiNumber, ScanType type) throws WarehouseServiceException, TException
292
    {
293
      send_scanIn(purchaseId, itemId, itemNumber, imeiNumber, type);
294
      recv_scanIn();
295
    }
296
 
297
    public void send_scanIn(long purchaseId, long itemId, String itemNumber, String imeiNumber, ScanType type) throws TException
298
    {
299
      oprot_.writeMessageBegin(new TMessage("scanIn", TMessageType.CALL, seqid_));
300
      scanIn_args args = new scanIn_args();
301
      args.purchaseId = purchaseId;
302
      args.itemId = itemId;
303
      args.itemNumber = itemNumber;
304
      args.imeiNumber = imeiNumber;
305
      args.type = type;
306
      args.write(oprot_);
307
      oprot_.writeMessageEnd();
308
      oprot_.getTransport().flush();
309
    }
310
 
311
    public void recv_scanIn() throws WarehouseServiceException, TException
312
    {
313
      TMessage msg = iprot_.readMessageBegin();
314
      if (msg.type == TMessageType.EXCEPTION) {
315
        TApplicationException x = TApplicationException.read(iprot_);
316
        iprot_.readMessageEnd();
317
        throw x;
318
      }
319
      scanIn_result result = new scanIn_result();
320
      result.read(iprot_);
321
      iprot_.readMessageEnd();
322
      if (result.wex != null) {
323
        throw result.wex;
324
      }
325
      return;
326
    }
327
 
328
    public void scanOut(long itemNumber, long imeiNumber, ScanType type) throws WarehouseServiceException, TException
329
    {
330
      send_scanOut(itemNumber, imeiNumber, type);
331
      recv_scanOut();
332
    }
333
 
334
    public void send_scanOut(long itemNumber, long imeiNumber, ScanType type) throws TException
335
    {
336
      oprot_.writeMessageBegin(new TMessage("scanOut", TMessageType.CALL, seqid_));
337
      scanOut_args args = new scanOut_args();
338
      args.itemNumber = itemNumber;
339
      args.imeiNumber = imeiNumber;
340
      args.type = type;
341
      args.write(oprot_);
342
      oprot_.writeMessageEnd();
343
      oprot_.getTransport().flush();
344
    }
345
 
346
    public void recv_scanOut() throws WarehouseServiceException, TException
347
    {
348
      TMessage msg = iprot_.readMessageBegin();
349
      if (msg.type == TMessageType.EXCEPTION) {
350
        TApplicationException x = TApplicationException.read(iprot_);
351
        iprot_.readMessageEnd();
352
        throw x;
353
      }
354
      scanOut_result result = new scanOut_result();
355
      result.read(iprot_);
356
      iprot_.readMessageEnd();
357
      if (result.wex != null) {
358
        throw result.wex;
359
      }
360
      return;
361
    }
362
 
363
  }
3374 rajveer 364
  public static class Processor extends in.shop2020.generic.GenericService.Processor implements TProcessor {
2820 chandransh 365
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
366
    public Processor(Iface iface)
367
    {
3374 rajveer 368
      super(iface);
2820 chandransh 369
      iface_ = iface;
370
      processMap_.put("createPurchaseOrder", new createPurchaseOrder());
371
      processMap_.put("getPurchaseOrder", new getPurchaseOrder());
2832 chandransh 372
      processMap_.put("getSupplier", new getSupplier());
2820 chandransh 373
      processMap_.put("startPurchase", new startPurchase());
374
      processMap_.put("closePurchase", new closePurchase());
375
      processMap_.put("scanIn", new scanIn());
376
      processMap_.put("scanOut", new scanOut());
377
    }
378
 
379
    private Iface iface_;
380
 
381
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
382
    {
383
      TMessage msg = iprot.readMessageBegin();
384
      ProcessFunction fn = processMap_.get(msg.name);
385
      if (fn == null) {
386
        TProtocolUtil.skip(iprot, TType.STRUCT);
387
        iprot.readMessageEnd();
388
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
389
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
390
        x.write(oprot);
391
        oprot.writeMessageEnd();
392
        oprot.getTransport().flush();
393
        return true;
394
      }
395
      fn.process(msg.seqid, iprot, oprot);
396
      return true;
397
    }
398
 
399
    private class createPurchaseOrder implements ProcessFunction {
400
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
401
      {
402
        createPurchaseOrder_args args = new createPurchaseOrder_args();
403
        args.read(iprot);
404
        iprot.readMessageEnd();
405
        createPurchaseOrder_result result = new createPurchaseOrder_result();
406
        try {
407
          result.success = iface_.createPurchaseOrder(args.purchaseOrder);
408
          result.setSuccessIsSet(true);
409
        } catch (WarehouseServiceException wex) {
410
          result.wex = wex;
411
        } catch (Throwable th) {
412
          LOGGER.error("Internal error processing createPurchaseOrder", th);
413
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createPurchaseOrder");
414
          oprot.writeMessageBegin(new TMessage("createPurchaseOrder", TMessageType.EXCEPTION, seqid));
415
          x.write(oprot);
416
          oprot.writeMessageEnd();
417
          oprot.getTransport().flush();
418
          return;
419
        }
420
        oprot.writeMessageBegin(new TMessage("createPurchaseOrder", TMessageType.REPLY, seqid));
421
        result.write(oprot);
422
        oprot.writeMessageEnd();
423
        oprot.getTransport().flush();
424
      }
425
 
426
    }
427
 
428
    private class getPurchaseOrder implements ProcessFunction {
429
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
430
      {
431
        getPurchaseOrder_args args = new getPurchaseOrder_args();
432
        args.read(iprot);
433
        iprot.readMessageEnd();
434
        getPurchaseOrder_result result = new getPurchaseOrder_result();
435
        try {
436
          result.success = iface_.getPurchaseOrder(args.id);
437
        } catch (WarehouseServiceException wex) {
438
          result.wex = wex;
439
        } catch (Throwable th) {
440
          LOGGER.error("Internal error processing getPurchaseOrder", th);
441
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPurchaseOrder");
442
          oprot.writeMessageBegin(new TMessage("getPurchaseOrder", TMessageType.EXCEPTION, seqid));
443
          x.write(oprot);
444
          oprot.writeMessageEnd();
445
          oprot.getTransport().flush();
446
          return;
447
        }
448
        oprot.writeMessageBegin(new TMessage("getPurchaseOrder", TMessageType.REPLY, seqid));
449
        result.write(oprot);
450
        oprot.writeMessageEnd();
451
        oprot.getTransport().flush();
452
      }
453
 
454
    }
455
 
2832 chandransh 456
    private class getSupplier implements ProcessFunction {
457
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
458
      {
459
        getSupplier_args args = new getSupplier_args();
460
        args.read(iprot);
461
        iprot.readMessageEnd();
462
        getSupplier_result result = new getSupplier_result();
463
        try {
464
          result.success = iface_.getSupplier(args.id);
465
        } catch (WarehouseServiceException wex) {
466
          result.wex = wex;
467
        } catch (Throwable th) {
468
          LOGGER.error("Internal error processing getSupplier", th);
469
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getSupplier");
470
          oprot.writeMessageBegin(new TMessage("getSupplier", TMessageType.EXCEPTION, seqid));
471
          x.write(oprot);
472
          oprot.writeMessageEnd();
473
          oprot.getTransport().flush();
474
          return;
475
        }
476
        oprot.writeMessageBegin(new TMessage("getSupplier", TMessageType.REPLY, seqid));
477
        result.write(oprot);
478
        oprot.writeMessageEnd();
479
        oprot.getTransport().flush();
480
      }
481
 
482
    }
483
 
2820 chandransh 484
    private class startPurchase implements ProcessFunction {
485
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
486
      {
487
        startPurchase_args args = new startPurchase_args();
488
        args.read(iprot);
489
        iprot.readMessageEnd();
490
        startPurchase_result result = new startPurchase_result();
491
        try {
492
          result.success = iface_.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges);
493
          result.setSuccessIsSet(true);
494
        } catch (WarehouseServiceException wex) {
495
          result.wex = wex;
496
        } catch (Throwable th) {
497
          LOGGER.error("Internal error processing startPurchase", th);
498
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing startPurchase");
499
          oprot.writeMessageBegin(new TMessage("startPurchase", TMessageType.EXCEPTION, seqid));
500
          x.write(oprot);
501
          oprot.writeMessageEnd();
502
          oprot.getTransport().flush();
503
          return;
504
        }
505
        oprot.writeMessageBegin(new TMessage("startPurchase", TMessageType.REPLY, seqid));
506
        result.write(oprot);
507
        oprot.writeMessageEnd();
508
        oprot.getTransport().flush();
509
      }
510
 
511
    }
512
 
513
    private class closePurchase implements ProcessFunction {
514
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
515
      {
516
        closePurchase_args args = new closePurchase_args();
517
        args.read(iprot);
518
        iprot.readMessageEnd();
519
        closePurchase_result result = new closePurchase_result();
520
        try {
521
          result.success = iface_.closePurchase(args.purchaseId);
522
          result.setSuccessIsSet(true);
523
        } catch (WarehouseServiceException wex) {
524
          result.wex = wex;
525
        } catch (Throwable th) {
526
          LOGGER.error("Internal error processing closePurchase", th);
527
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing closePurchase");
528
          oprot.writeMessageBegin(new TMessage("closePurchase", TMessageType.EXCEPTION, seqid));
529
          x.write(oprot);
530
          oprot.writeMessageEnd();
531
          oprot.getTransport().flush();
532
          return;
533
        }
534
        oprot.writeMessageBegin(new TMessage("closePurchase", TMessageType.REPLY, seqid));
535
        result.write(oprot);
536
        oprot.writeMessageEnd();
537
        oprot.getTransport().flush();
538
      }
539
 
540
    }
541
 
542
    private class scanIn implements ProcessFunction {
543
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
544
      {
545
        scanIn_args args = new scanIn_args();
546
        args.read(iprot);
547
        iprot.readMessageEnd();
548
        scanIn_result result = new scanIn_result();
549
        try {
550
          iface_.scanIn(args.purchaseId, args.itemId, args.itemNumber, args.imeiNumber, args.type);
551
        } catch (WarehouseServiceException wex) {
552
          result.wex = wex;
553
        } catch (Throwable th) {
554
          LOGGER.error("Internal error processing scanIn", th);
555
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing scanIn");
556
          oprot.writeMessageBegin(new TMessage("scanIn", TMessageType.EXCEPTION, seqid));
557
          x.write(oprot);
558
          oprot.writeMessageEnd();
559
          oprot.getTransport().flush();
560
          return;
561
        }
562
        oprot.writeMessageBegin(new TMessage("scanIn", TMessageType.REPLY, seqid));
563
        result.write(oprot);
564
        oprot.writeMessageEnd();
565
        oprot.getTransport().flush();
566
      }
567
 
568
    }
569
 
570
    private class scanOut implements ProcessFunction {
571
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
572
      {
573
        scanOut_args args = new scanOut_args();
574
        args.read(iprot);
575
        iprot.readMessageEnd();
576
        scanOut_result result = new scanOut_result();
577
        try {
578
          iface_.scanOut(args.itemNumber, args.imeiNumber, args.type);
579
        } catch (WarehouseServiceException wex) {
580
          result.wex = wex;
581
        } catch (Throwable th) {
582
          LOGGER.error("Internal error processing scanOut", th);
583
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing scanOut");
584
          oprot.writeMessageBegin(new TMessage("scanOut", TMessageType.EXCEPTION, seqid));
585
          x.write(oprot);
586
          oprot.writeMessageEnd();
587
          oprot.getTransport().flush();
588
          return;
589
        }
590
        oprot.writeMessageBegin(new TMessage("scanOut", TMessageType.REPLY, seqid));
591
        result.write(oprot);
592
        oprot.writeMessageEnd();
593
        oprot.getTransport().flush();
594
      }
595
 
596
    }
597
 
598
  }
599
 
600
  public static class createPurchaseOrder_args implements TBase<createPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createPurchaseOrder_args>   {
601
    private static final TStruct STRUCT_DESC = new TStruct("createPurchaseOrder_args");
602
 
603
    private static final TField PURCHASE_ORDER_FIELD_DESC = new TField("purchaseOrder", TType.STRUCT, (short)1);
604
 
605
    private PurchaseOrder purchaseOrder;
606
 
607
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
608
    public enum _Fields implements TFieldIdEnum {
609
      PURCHASE_ORDER((short)1, "purchaseOrder");
610
 
611
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
612
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
613
 
614
      static {
615
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
616
          byId.put((int)field._thriftId, field);
617
          byName.put(field.getFieldName(), field);
618
        }
619
      }
620
 
621
      /**
622
       * Find the _Fields constant that matches fieldId, or null if its not found.
623
       */
624
      public static _Fields findByThriftId(int fieldId) {
625
        return byId.get(fieldId);
626
      }
627
 
628
      /**
629
       * Find the _Fields constant that matches fieldId, throwing an exception
630
       * if it is not found.
631
       */
632
      public static _Fields findByThriftIdOrThrow(int fieldId) {
633
        _Fields fields = findByThriftId(fieldId);
634
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
635
        return fields;
636
      }
637
 
638
      /**
639
       * Find the _Fields constant that matches name, or null if its not found.
640
       */
641
      public static _Fields findByName(String name) {
642
        return byName.get(name);
643
      }
644
 
645
      private final short _thriftId;
646
      private final String _fieldName;
647
 
648
      _Fields(short thriftId, String fieldName) {
649
        _thriftId = thriftId;
650
        _fieldName = fieldName;
651
      }
652
 
653
      public short getThriftFieldId() {
654
        return _thriftId;
655
      }
656
 
657
      public String getFieldName() {
658
        return _fieldName;
659
      }
660
    }
661
 
662
    // isset id assignments
663
 
664
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
665
      put(_Fields.PURCHASE_ORDER, new FieldMetaData("purchaseOrder", TFieldRequirementType.DEFAULT, 
666
          new StructMetaData(TType.STRUCT, PurchaseOrder.class)));
667
    }});
668
 
669
    static {
670
      FieldMetaData.addStructMetaDataMap(createPurchaseOrder_args.class, metaDataMap);
671
    }
672
 
673
    public createPurchaseOrder_args() {
674
    }
675
 
676
    public createPurchaseOrder_args(
677
      PurchaseOrder purchaseOrder)
678
    {
679
      this();
680
      this.purchaseOrder = purchaseOrder;
681
    }
682
 
683
    /**
684
     * Performs a deep copy on <i>other</i>.
685
     */
686
    public createPurchaseOrder_args(createPurchaseOrder_args other) {
687
      if (other.isSetPurchaseOrder()) {
688
        this.purchaseOrder = new PurchaseOrder(other.purchaseOrder);
689
      }
690
    }
691
 
692
    public createPurchaseOrder_args deepCopy() {
693
      return new createPurchaseOrder_args(this);
694
    }
695
 
696
    @Deprecated
697
    public createPurchaseOrder_args clone() {
698
      return new createPurchaseOrder_args(this);
699
    }
700
 
701
    public PurchaseOrder getPurchaseOrder() {
702
      return this.purchaseOrder;
703
    }
704
 
705
    public createPurchaseOrder_args setPurchaseOrder(PurchaseOrder purchaseOrder) {
706
      this.purchaseOrder = purchaseOrder;
707
      return this;
708
    }
709
 
710
    public void unsetPurchaseOrder() {
711
      this.purchaseOrder = null;
712
    }
713
 
714
    /** Returns true if field purchaseOrder is set (has been asigned a value) and false otherwise */
715
    public boolean isSetPurchaseOrder() {
716
      return this.purchaseOrder != null;
717
    }
718
 
719
    public void setPurchaseOrderIsSet(boolean value) {
720
      if (!value) {
721
        this.purchaseOrder = null;
722
      }
723
    }
724
 
725
    public void setFieldValue(_Fields field, Object value) {
726
      switch (field) {
727
      case PURCHASE_ORDER:
728
        if (value == null) {
729
          unsetPurchaseOrder();
730
        } else {
731
          setPurchaseOrder((PurchaseOrder)value);
732
        }
733
        break;
734
 
735
      }
736
    }
737
 
738
    public void setFieldValue(int fieldID, Object value) {
739
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
740
    }
741
 
742
    public Object getFieldValue(_Fields field) {
743
      switch (field) {
744
      case PURCHASE_ORDER:
745
        return getPurchaseOrder();
746
 
747
      }
748
      throw new IllegalStateException();
749
    }
750
 
751
    public Object getFieldValue(int fieldId) {
752
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
753
    }
754
 
755
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
756
    public boolean isSet(_Fields field) {
757
      switch (field) {
758
      case PURCHASE_ORDER:
759
        return isSetPurchaseOrder();
760
      }
761
      throw new IllegalStateException();
762
    }
763
 
764
    public boolean isSet(int fieldID) {
765
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
766
    }
767
 
768
    @Override
769
    public boolean equals(Object that) {
770
      if (that == null)
771
        return false;
772
      if (that instanceof createPurchaseOrder_args)
773
        return this.equals((createPurchaseOrder_args)that);
774
      return false;
775
    }
776
 
777
    public boolean equals(createPurchaseOrder_args that) {
778
      if (that == null)
779
        return false;
780
 
781
      boolean this_present_purchaseOrder = true && this.isSetPurchaseOrder();
782
      boolean that_present_purchaseOrder = true && that.isSetPurchaseOrder();
783
      if (this_present_purchaseOrder || that_present_purchaseOrder) {
784
        if (!(this_present_purchaseOrder && that_present_purchaseOrder))
785
          return false;
786
        if (!this.purchaseOrder.equals(that.purchaseOrder))
787
          return false;
788
      }
789
 
790
      return true;
791
    }
792
 
793
    @Override
794
    public int hashCode() {
795
      return 0;
796
    }
797
 
798
    public int compareTo(createPurchaseOrder_args other) {
799
      if (!getClass().equals(other.getClass())) {
800
        return getClass().getName().compareTo(other.getClass().getName());
801
      }
802
 
803
      int lastComparison = 0;
804
      createPurchaseOrder_args typedOther = (createPurchaseOrder_args)other;
805
 
806
      lastComparison = Boolean.valueOf(isSetPurchaseOrder()).compareTo(isSetPurchaseOrder());
807
      if (lastComparison != 0) {
808
        return lastComparison;
809
      }
810
      lastComparison = TBaseHelper.compareTo(purchaseOrder, typedOther.purchaseOrder);
811
      if (lastComparison != 0) {
812
        return lastComparison;
813
      }
814
      return 0;
815
    }
816
 
817
    public void read(TProtocol iprot) throws TException {
818
      TField field;
819
      iprot.readStructBegin();
820
      while (true)
821
      {
822
        field = iprot.readFieldBegin();
823
        if (field.type == TType.STOP) { 
824
          break;
825
        }
826
        _Fields fieldId = _Fields.findByThriftId(field.id);
827
        if (fieldId == null) {
828
          TProtocolUtil.skip(iprot, field.type);
829
        } else {
830
          switch (fieldId) {
831
            case PURCHASE_ORDER:
832
              if (field.type == TType.STRUCT) {
833
                this.purchaseOrder = new PurchaseOrder();
834
                this.purchaseOrder.read(iprot);
835
              } else { 
836
                TProtocolUtil.skip(iprot, field.type);
837
              }
838
              break;
839
          }
840
          iprot.readFieldEnd();
841
        }
842
      }
843
      iprot.readStructEnd();
844
      validate();
845
    }
846
 
847
    public void write(TProtocol oprot) throws TException {
848
      validate();
849
 
850
      oprot.writeStructBegin(STRUCT_DESC);
851
      if (this.purchaseOrder != null) {
852
        oprot.writeFieldBegin(PURCHASE_ORDER_FIELD_DESC);
853
        this.purchaseOrder.write(oprot);
854
        oprot.writeFieldEnd();
855
      }
856
      oprot.writeFieldStop();
857
      oprot.writeStructEnd();
858
    }
859
 
860
    @Override
861
    public String toString() {
862
      StringBuilder sb = new StringBuilder("createPurchaseOrder_args(");
863
      boolean first = true;
864
 
865
      sb.append("purchaseOrder:");
866
      if (this.purchaseOrder == null) {
867
        sb.append("null");
868
      } else {
869
        sb.append(this.purchaseOrder);
870
      }
871
      first = false;
872
      sb.append(")");
873
      return sb.toString();
874
    }
875
 
876
    public void validate() throws TException {
877
      // check for required fields
878
    }
879
 
880
  }
881
 
882
  public static class createPurchaseOrder_result implements TBase<createPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createPurchaseOrder_result>   {
883
    private static final TStruct STRUCT_DESC = new TStruct("createPurchaseOrder_result");
884
 
885
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
886
    private static final TField WEX_FIELD_DESC = new TField("wex", TType.STRUCT, (short)1);
887
 
888
    private long success;
889
    private WarehouseServiceException wex;
890
 
891
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
892
    public enum _Fields implements TFieldIdEnum {
893
      SUCCESS((short)0, "success"),
894
      WEX((short)1, "wex");
895
 
896
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
897
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
898
 
899
      static {
900
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
901
          byId.put((int)field._thriftId, field);
902
          byName.put(field.getFieldName(), field);
903
        }
904
      }
905
 
906
      /**
907
       * Find the _Fields constant that matches fieldId, or null if its not found.
908
       */
909
      public static _Fields findByThriftId(int fieldId) {
910
        return byId.get(fieldId);
911
      }
912
 
913
      /**
914
       * Find the _Fields constant that matches fieldId, throwing an exception
915
       * if it is not found.
916
       */
917
      public static _Fields findByThriftIdOrThrow(int fieldId) {
918
        _Fields fields = findByThriftId(fieldId);
919
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
920
        return fields;
921
      }
922
 
923
      /**
924
       * Find the _Fields constant that matches name, or null if its not found.
925
       */
926
      public static _Fields findByName(String name) {
927
        return byName.get(name);
928
      }
929
 
930
      private final short _thriftId;
931
      private final String _fieldName;
932
 
933
      _Fields(short thriftId, String fieldName) {
934
        _thriftId = thriftId;
935
        _fieldName = fieldName;
936
      }
937
 
938
      public short getThriftFieldId() {
939
        return _thriftId;
940
      }
941
 
942
      public String getFieldName() {
943
        return _fieldName;
944
      }
945
    }
946
 
947
    // isset id assignments
948
    private static final int __SUCCESS_ISSET_ID = 0;
949
    private BitSet __isset_bit_vector = new BitSet(1);
950
 
951
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
952
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
953
          new FieldValueMetaData(TType.I64)));
954
      put(_Fields.WEX, new FieldMetaData("wex", TFieldRequirementType.DEFAULT, 
955
          new FieldValueMetaData(TType.STRUCT)));
956
    }});
957
 
958
    static {
959
      FieldMetaData.addStructMetaDataMap(createPurchaseOrder_result.class, metaDataMap);
960
    }
961
 
962
    public createPurchaseOrder_result() {
963
    }
964
 
965
    public createPurchaseOrder_result(
966
      long success,
967
      WarehouseServiceException wex)
968
    {
969
      this();
970
      this.success = success;
971
      setSuccessIsSet(true);
972
      this.wex = wex;
973
    }
974
 
975
    /**
976
     * Performs a deep copy on <i>other</i>.
977
     */
978
    public createPurchaseOrder_result(createPurchaseOrder_result other) {
979
      __isset_bit_vector.clear();
980
      __isset_bit_vector.or(other.__isset_bit_vector);
981
      this.success = other.success;
982
      if (other.isSetWex()) {
983
        this.wex = new WarehouseServiceException(other.wex);
984
      }
985
    }
986
 
987
    public createPurchaseOrder_result deepCopy() {
988
      return new createPurchaseOrder_result(this);
989
    }
990
 
991
    @Deprecated
992
    public createPurchaseOrder_result clone() {
993
      return new createPurchaseOrder_result(this);
994
    }
995
 
996
    public long getSuccess() {
997
      return this.success;
998
    }
999
 
1000
    public createPurchaseOrder_result setSuccess(long success) {
1001
      this.success = success;
1002
      setSuccessIsSet(true);
1003
      return this;
1004
    }
1005
 
1006
    public void unsetSuccess() {
1007
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
1008
    }
1009
 
1010
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
1011
    public boolean isSetSuccess() {
1012
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
1013
    }
1014
 
1015
    public void setSuccessIsSet(boolean value) {
1016
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
1017
    }
1018
 
1019
    public WarehouseServiceException getWex() {
1020
      return this.wex;
1021
    }
1022
 
1023
    public createPurchaseOrder_result setWex(WarehouseServiceException wex) {
1024
      this.wex = wex;
1025
      return this;
1026
    }
1027
 
1028
    public void unsetWex() {
1029
      this.wex = null;
1030
    }
1031
 
1032
    /** Returns true if field wex is set (has been asigned a value) and false otherwise */
1033
    public boolean isSetWex() {
1034
      return this.wex != null;
1035
    }
1036
 
1037
    public void setWexIsSet(boolean value) {
1038
      if (!value) {
1039
        this.wex = null;
1040
      }
1041
    }
1042
 
1043
    public void setFieldValue(_Fields field, Object value) {
1044
      switch (field) {
1045
      case SUCCESS:
1046
        if (value == null) {
1047
          unsetSuccess();
1048
        } else {
1049
          setSuccess((Long)value);
1050
        }
1051
        break;
1052
 
1053
      case WEX:
1054
        if (value == null) {
1055
          unsetWex();
1056
        } else {
1057
          setWex((WarehouseServiceException)value);
1058
        }
1059
        break;
1060
 
1061
      }
1062
    }
1063
 
1064
    public void setFieldValue(int fieldID, Object value) {
1065
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1066
    }
1067
 
1068
    public Object getFieldValue(_Fields field) {
1069
      switch (field) {
1070
      case SUCCESS:
1071
        return new Long(getSuccess());
1072
 
1073
      case WEX:
1074
        return getWex();
1075
 
1076
      }
1077
      throw new IllegalStateException();
1078
    }
1079
 
1080
    public Object getFieldValue(int fieldId) {
1081
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1082
    }
1083
 
1084
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1085
    public boolean isSet(_Fields field) {
1086
      switch (field) {
1087
      case SUCCESS:
1088
        return isSetSuccess();
1089
      case WEX:
1090
        return isSetWex();
1091
      }
1092
      throw new IllegalStateException();
1093
    }
1094
 
1095
    public boolean isSet(int fieldID) {
1096
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1097
    }
1098
 
1099
    @Override
1100
    public boolean equals(Object that) {
1101
      if (that == null)
1102
        return false;
1103
      if (that instanceof createPurchaseOrder_result)
1104
        return this.equals((createPurchaseOrder_result)that);
1105
      return false;
1106
    }
1107
 
1108
    public boolean equals(createPurchaseOrder_result that) {
1109
      if (that == null)
1110
        return false;
1111
 
1112
      boolean this_present_success = true;
1113
      boolean that_present_success = true;
1114
      if (this_present_success || that_present_success) {
1115
        if (!(this_present_success && that_present_success))
1116
          return false;
1117
        if (this.success != that.success)
1118
          return false;
1119
      }
1120
 
1121
      boolean this_present_wex = true && this.isSetWex();
1122
      boolean that_present_wex = true && that.isSetWex();
1123
      if (this_present_wex || that_present_wex) {
1124
        if (!(this_present_wex && that_present_wex))
1125
          return false;
1126
        if (!this.wex.equals(that.wex))
1127
          return false;
1128
      }
1129
 
1130
      return true;
1131
    }
1132
 
1133
    @Override
1134
    public int hashCode() {
1135
      return 0;
1136
    }
1137
 
1138
    public int compareTo(createPurchaseOrder_result other) {
1139
      if (!getClass().equals(other.getClass())) {
1140
        return getClass().getName().compareTo(other.getClass().getName());
1141
      }
1142
 
1143
      int lastComparison = 0;
1144
      createPurchaseOrder_result typedOther = (createPurchaseOrder_result)other;
1145
 
1146
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
1147
      if (lastComparison != 0) {
1148
        return lastComparison;
1149
      }
1150
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
1151
      if (lastComparison != 0) {
1152
        return lastComparison;
1153
      }
1154
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(isSetWex());
1155
      if (lastComparison != 0) {
1156
        return lastComparison;
1157
      }
1158
      lastComparison = TBaseHelper.compareTo(wex, typedOther.wex);
1159
      if (lastComparison != 0) {
1160
        return lastComparison;
1161
      }
1162
      return 0;
1163
    }
1164
 
1165
    public void read(TProtocol iprot) throws TException {
1166
      TField field;
1167
      iprot.readStructBegin();
1168
      while (true)
1169
      {
1170
        field = iprot.readFieldBegin();
1171
        if (field.type == TType.STOP) { 
1172
          break;
1173
        }
1174
        _Fields fieldId = _Fields.findByThriftId(field.id);
1175
        if (fieldId == null) {
1176
          TProtocolUtil.skip(iprot, field.type);
1177
        } else {
1178
          switch (fieldId) {
1179
            case SUCCESS:
1180
              if (field.type == TType.I64) {
1181
                this.success = iprot.readI64();
1182
                setSuccessIsSet(true);
1183
              } else { 
1184
                TProtocolUtil.skip(iprot, field.type);
1185
              }
1186
              break;
1187
            case WEX:
1188
              if (field.type == TType.STRUCT) {
1189
                this.wex = new WarehouseServiceException();
1190
                this.wex.read(iprot);
1191
              } else { 
1192
                TProtocolUtil.skip(iprot, field.type);
1193
              }
1194
              break;
1195
          }
1196
          iprot.readFieldEnd();
1197
        }
1198
      }
1199
      iprot.readStructEnd();
1200
      validate();
1201
    }
1202
 
1203
    public void write(TProtocol oprot) throws TException {
1204
      oprot.writeStructBegin(STRUCT_DESC);
1205
 
1206
      if (this.isSetSuccess()) {
1207
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1208
        oprot.writeI64(this.success);
1209
        oprot.writeFieldEnd();
1210
      } else if (this.isSetWex()) {
1211
        oprot.writeFieldBegin(WEX_FIELD_DESC);
1212
        this.wex.write(oprot);
1213
        oprot.writeFieldEnd();
1214
      }
1215
      oprot.writeFieldStop();
1216
      oprot.writeStructEnd();
1217
    }
1218
 
1219
    @Override
1220
    public String toString() {
1221
      StringBuilder sb = new StringBuilder("createPurchaseOrder_result(");
1222
      boolean first = true;
1223
 
1224
      sb.append("success:");
1225
      sb.append(this.success);
1226
      first = false;
1227
      if (!first) sb.append(", ");
1228
      sb.append("wex:");
1229
      if (this.wex == null) {
1230
        sb.append("null");
1231
      } else {
1232
        sb.append(this.wex);
1233
      }
1234
      first = false;
1235
      sb.append(")");
1236
      return sb.toString();
1237
    }
1238
 
1239
    public void validate() throws TException {
1240
      // check for required fields
1241
    }
1242
 
1243
  }
1244
 
1245
  public static class getPurchaseOrder_args implements TBase<getPurchaseOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPurchaseOrder_args>   {
1246
    private static final TStruct STRUCT_DESC = new TStruct("getPurchaseOrder_args");
1247
 
1248
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
1249
 
1250
    private long id;
1251
 
1252
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1253
    public enum _Fields implements TFieldIdEnum {
1254
      ID((short)1, "id");
1255
 
1256
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1257
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1258
 
1259
      static {
1260
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1261
          byId.put((int)field._thriftId, field);
1262
          byName.put(field.getFieldName(), field);
1263
        }
1264
      }
1265
 
1266
      /**
1267
       * Find the _Fields constant that matches fieldId, or null if its not found.
1268
       */
1269
      public static _Fields findByThriftId(int fieldId) {
1270
        return byId.get(fieldId);
1271
      }
1272
 
1273
      /**
1274
       * Find the _Fields constant that matches fieldId, throwing an exception
1275
       * if it is not found.
1276
       */
1277
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1278
        _Fields fields = findByThriftId(fieldId);
1279
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1280
        return fields;
1281
      }
1282
 
1283
      /**
1284
       * Find the _Fields constant that matches name, or null if its not found.
1285
       */
1286
      public static _Fields findByName(String name) {
1287
        return byName.get(name);
1288
      }
1289
 
1290
      private final short _thriftId;
1291
      private final String _fieldName;
1292
 
1293
      _Fields(short thriftId, String fieldName) {
1294
        _thriftId = thriftId;
1295
        _fieldName = fieldName;
1296
      }
1297
 
1298
      public short getThriftFieldId() {
1299
        return _thriftId;
1300
      }
1301
 
1302
      public String getFieldName() {
1303
        return _fieldName;
1304
      }
1305
    }
1306
 
1307
    // isset id assignments
1308
    private static final int __ID_ISSET_ID = 0;
1309
    private BitSet __isset_bit_vector = new BitSet(1);
1310
 
1311
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1312
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
1313
          new FieldValueMetaData(TType.I64)));
1314
    }});
1315
 
1316
    static {
1317
      FieldMetaData.addStructMetaDataMap(getPurchaseOrder_args.class, metaDataMap);
1318
    }
1319
 
1320
    public getPurchaseOrder_args() {
1321
    }
1322
 
1323
    public getPurchaseOrder_args(
1324
      long id)
1325
    {
1326
      this();
1327
      this.id = id;
1328
      setIdIsSet(true);
1329
    }
1330
 
1331
    /**
1332
     * Performs a deep copy on <i>other</i>.
1333
     */
1334
    public getPurchaseOrder_args(getPurchaseOrder_args other) {
1335
      __isset_bit_vector.clear();
1336
      __isset_bit_vector.or(other.__isset_bit_vector);
1337
      this.id = other.id;
1338
    }
1339
 
1340
    public getPurchaseOrder_args deepCopy() {
1341
      return new getPurchaseOrder_args(this);
1342
    }
1343
 
1344
    @Deprecated
1345
    public getPurchaseOrder_args clone() {
1346
      return new getPurchaseOrder_args(this);
1347
    }
1348
 
1349
    public long getId() {
1350
      return this.id;
1351
    }
1352
 
1353
    public getPurchaseOrder_args setId(long id) {
1354
      this.id = id;
1355
      setIdIsSet(true);
1356
      return this;
1357
    }
1358
 
1359
    public void unsetId() {
1360
      __isset_bit_vector.clear(__ID_ISSET_ID);
1361
    }
1362
 
1363
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
1364
    public boolean isSetId() {
1365
      return __isset_bit_vector.get(__ID_ISSET_ID);
1366
    }
1367
 
1368
    public void setIdIsSet(boolean value) {
1369
      __isset_bit_vector.set(__ID_ISSET_ID, value);
1370
    }
1371
 
1372
    public void setFieldValue(_Fields field, Object value) {
1373
      switch (field) {
1374
      case ID:
1375
        if (value == null) {
1376
          unsetId();
1377
        } else {
1378
          setId((Long)value);
1379
        }
1380
        break;
1381
 
1382
      }
1383
    }
1384
 
1385
    public void setFieldValue(int fieldID, Object value) {
1386
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1387
    }
1388
 
1389
    public Object getFieldValue(_Fields field) {
1390
      switch (field) {
1391
      case ID:
1392
        return new Long(getId());
1393
 
1394
      }
1395
      throw new IllegalStateException();
1396
    }
1397
 
1398
    public Object getFieldValue(int fieldId) {
1399
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1400
    }
1401
 
1402
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1403
    public boolean isSet(_Fields field) {
1404
      switch (field) {
1405
      case ID:
1406
        return isSetId();
1407
      }
1408
      throw new IllegalStateException();
1409
    }
1410
 
1411
    public boolean isSet(int fieldID) {
1412
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1413
    }
1414
 
1415
    @Override
1416
    public boolean equals(Object that) {
1417
      if (that == null)
1418
        return false;
1419
      if (that instanceof getPurchaseOrder_args)
1420
        return this.equals((getPurchaseOrder_args)that);
1421
      return false;
1422
    }
1423
 
1424
    public boolean equals(getPurchaseOrder_args that) {
1425
      if (that == null)
1426
        return false;
1427
 
1428
      boolean this_present_id = true;
1429
      boolean that_present_id = true;
1430
      if (this_present_id || that_present_id) {
1431
        if (!(this_present_id && that_present_id))
1432
          return false;
1433
        if (this.id != that.id)
1434
          return false;
1435
      }
1436
 
1437
      return true;
1438
    }
1439
 
1440
    @Override
1441
    public int hashCode() {
1442
      return 0;
1443
    }
1444
 
1445
    public int compareTo(getPurchaseOrder_args other) {
1446
      if (!getClass().equals(other.getClass())) {
1447
        return getClass().getName().compareTo(other.getClass().getName());
1448
      }
1449
 
1450
      int lastComparison = 0;
1451
      getPurchaseOrder_args typedOther = (getPurchaseOrder_args)other;
1452
 
1453
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
1454
      if (lastComparison != 0) {
1455
        return lastComparison;
1456
      }
1457
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
1458
      if (lastComparison != 0) {
1459
        return lastComparison;
1460
      }
1461
      return 0;
1462
    }
1463
 
1464
    public void read(TProtocol iprot) throws TException {
1465
      TField field;
1466
      iprot.readStructBegin();
1467
      while (true)
1468
      {
1469
        field = iprot.readFieldBegin();
1470
        if (field.type == TType.STOP) { 
1471
          break;
1472
        }
1473
        _Fields fieldId = _Fields.findByThriftId(field.id);
1474
        if (fieldId == null) {
1475
          TProtocolUtil.skip(iprot, field.type);
1476
        } else {
1477
          switch (fieldId) {
1478
            case ID:
1479
              if (field.type == TType.I64) {
1480
                this.id = iprot.readI64();
1481
                setIdIsSet(true);
1482
              } else { 
1483
                TProtocolUtil.skip(iprot, field.type);
1484
              }
1485
              break;
1486
          }
1487
          iprot.readFieldEnd();
1488
        }
1489
      }
1490
      iprot.readStructEnd();
1491
      validate();
1492
    }
1493
 
1494
    public void write(TProtocol oprot) throws TException {
1495
      validate();
1496
 
1497
      oprot.writeStructBegin(STRUCT_DESC);
1498
      oprot.writeFieldBegin(ID_FIELD_DESC);
1499
      oprot.writeI64(this.id);
1500
      oprot.writeFieldEnd();
1501
      oprot.writeFieldStop();
1502
      oprot.writeStructEnd();
1503
    }
1504
 
1505
    @Override
1506
    public String toString() {
1507
      StringBuilder sb = new StringBuilder("getPurchaseOrder_args(");
1508
      boolean first = true;
1509
 
1510
      sb.append("id:");
1511
      sb.append(this.id);
1512
      first = false;
1513
      sb.append(")");
1514
      return sb.toString();
1515
    }
1516
 
1517
    public void validate() throws TException {
1518
      // check for required fields
1519
    }
1520
 
1521
  }
1522
 
1523
  public static class getPurchaseOrder_result implements TBase<getPurchaseOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPurchaseOrder_result>   {
1524
    private static final TStruct STRUCT_DESC = new TStruct("getPurchaseOrder_result");
1525
 
1526
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
1527
    private static final TField WEX_FIELD_DESC = new TField("wex", TType.STRUCT, (short)1);
1528
 
1529
    private PurchaseOrder success;
1530
    private WarehouseServiceException wex;
1531
 
1532
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1533
    public enum _Fields implements TFieldIdEnum {
1534
      SUCCESS((short)0, "success"),
1535
      WEX((short)1, "wex");
1536
 
1537
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1538
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1539
 
1540
      static {
1541
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1542
          byId.put((int)field._thriftId, field);
1543
          byName.put(field.getFieldName(), field);
1544
        }
1545
      }
1546
 
1547
      /**
1548
       * Find the _Fields constant that matches fieldId, or null if its not found.
1549
       */
1550
      public static _Fields findByThriftId(int fieldId) {
1551
        return byId.get(fieldId);
1552
      }
1553
 
1554
      /**
1555
       * Find the _Fields constant that matches fieldId, throwing an exception
1556
       * if it is not found.
1557
       */
1558
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1559
        _Fields fields = findByThriftId(fieldId);
1560
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1561
        return fields;
1562
      }
1563
 
1564
      /**
1565
       * Find the _Fields constant that matches name, or null if its not found.
1566
       */
1567
      public static _Fields findByName(String name) {
1568
        return byName.get(name);
1569
      }
1570
 
1571
      private final short _thriftId;
1572
      private final String _fieldName;
1573
 
1574
      _Fields(short thriftId, String fieldName) {
1575
        _thriftId = thriftId;
1576
        _fieldName = fieldName;
1577
      }
1578
 
1579
      public short getThriftFieldId() {
1580
        return _thriftId;
1581
      }
1582
 
1583
      public String getFieldName() {
1584
        return _fieldName;
1585
      }
1586
    }
1587
 
1588
    // isset id assignments
1589
 
1590
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1591
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1592
          new StructMetaData(TType.STRUCT, PurchaseOrder.class)));
1593
      put(_Fields.WEX, new FieldMetaData("wex", TFieldRequirementType.DEFAULT, 
1594
          new FieldValueMetaData(TType.STRUCT)));
1595
    }});
1596
 
1597
    static {
1598
      FieldMetaData.addStructMetaDataMap(getPurchaseOrder_result.class, metaDataMap);
1599
    }
1600
 
1601
    public getPurchaseOrder_result() {
1602
    }
1603
 
1604
    public getPurchaseOrder_result(
1605
      PurchaseOrder success,
1606
      WarehouseServiceException wex)
1607
    {
1608
      this();
1609
      this.success = success;
1610
      this.wex = wex;
1611
    }
1612
 
1613
    /**
1614
     * Performs a deep copy on <i>other</i>.
1615
     */
1616
    public getPurchaseOrder_result(getPurchaseOrder_result other) {
1617
      if (other.isSetSuccess()) {
1618
        this.success = new PurchaseOrder(other.success);
1619
      }
1620
      if (other.isSetWex()) {
1621
        this.wex = new WarehouseServiceException(other.wex);
1622
      }
1623
    }
1624
 
1625
    public getPurchaseOrder_result deepCopy() {
1626
      return new getPurchaseOrder_result(this);
1627
    }
1628
 
1629
    @Deprecated
1630
    public getPurchaseOrder_result clone() {
1631
      return new getPurchaseOrder_result(this);
1632
    }
1633
 
1634
    public PurchaseOrder getSuccess() {
1635
      return this.success;
1636
    }
1637
 
1638
    public getPurchaseOrder_result setSuccess(PurchaseOrder success) {
1639
      this.success = success;
1640
      return this;
1641
    }
1642
 
1643
    public void unsetSuccess() {
1644
      this.success = null;
1645
    }
1646
 
1647
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
1648
    public boolean isSetSuccess() {
1649
      return this.success != null;
1650
    }
1651
 
1652
    public void setSuccessIsSet(boolean value) {
1653
      if (!value) {
1654
        this.success = null;
1655
      }
1656
    }
1657
 
1658
    public WarehouseServiceException getWex() {
1659
      return this.wex;
1660
    }
1661
 
1662
    public getPurchaseOrder_result setWex(WarehouseServiceException wex) {
1663
      this.wex = wex;
1664
      return this;
1665
    }
1666
 
1667
    public void unsetWex() {
1668
      this.wex = null;
1669
    }
1670
 
1671
    /** Returns true if field wex is set (has been asigned a value) and false otherwise */
1672
    public boolean isSetWex() {
1673
      return this.wex != null;
1674
    }
1675
 
1676
    public void setWexIsSet(boolean value) {
1677
      if (!value) {
1678
        this.wex = null;
1679
      }
1680
    }
1681
 
1682
    public void setFieldValue(_Fields field, Object value) {
1683
      switch (field) {
1684
      case SUCCESS:
1685
        if (value == null) {
1686
          unsetSuccess();
1687
        } else {
1688
          setSuccess((PurchaseOrder)value);
1689
        }
1690
        break;
1691
 
1692
      case WEX:
1693
        if (value == null) {
1694
          unsetWex();
1695
        } else {
1696
          setWex((WarehouseServiceException)value);
1697
        }
1698
        break;
1699
 
1700
      }
1701
    }
1702
 
1703
    public void setFieldValue(int fieldID, Object value) {
1704
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1705
    }
1706
 
1707
    public Object getFieldValue(_Fields field) {
1708
      switch (field) {
1709
      case SUCCESS:
1710
        return getSuccess();
1711
 
1712
      case WEX:
1713
        return getWex();
1714
 
1715
      }
1716
      throw new IllegalStateException();
1717
    }
1718
 
1719
    public Object getFieldValue(int fieldId) {
1720
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1721
    }
1722
 
1723
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1724
    public boolean isSet(_Fields field) {
1725
      switch (field) {
1726
      case SUCCESS:
1727
        return isSetSuccess();
1728
      case WEX:
1729
        return isSetWex();
1730
      }
1731
      throw new IllegalStateException();
1732
    }
1733
 
1734
    public boolean isSet(int fieldID) {
1735
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1736
    }
1737
 
1738
    @Override
1739
    public boolean equals(Object that) {
1740
      if (that == null)
1741
        return false;
1742
      if (that instanceof getPurchaseOrder_result)
1743
        return this.equals((getPurchaseOrder_result)that);
1744
      return false;
1745
    }
1746
 
1747
    public boolean equals(getPurchaseOrder_result that) {
1748
      if (that == null)
1749
        return false;
1750
 
1751
      boolean this_present_success = true && this.isSetSuccess();
1752
      boolean that_present_success = true && that.isSetSuccess();
1753
      if (this_present_success || that_present_success) {
1754
        if (!(this_present_success && that_present_success))
1755
          return false;
1756
        if (!this.success.equals(that.success))
1757
          return false;
1758
      }
1759
 
1760
      boolean this_present_wex = true && this.isSetWex();
1761
      boolean that_present_wex = true && that.isSetWex();
1762
      if (this_present_wex || that_present_wex) {
1763
        if (!(this_present_wex && that_present_wex))
1764
          return false;
1765
        if (!this.wex.equals(that.wex))
1766
          return false;
1767
      }
1768
 
1769
      return true;
1770
    }
1771
 
1772
    @Override
1773
    public int hashCode() {
1774
      return 0;
1775
    }
1776
 
1777
    public int compareTo(getPurchaseOrder_result other) {
1778
      if (!getClass().equals(other.getClass())) {
1779
        return getClass().getName().compareTo(other.getClass().getName());
1780
      }
1781
 
1782
      int lastComparison = 0;
1783
      getPurchaseOrder_result typedOther = (getPurchaseOrder_result)other;
1784
 
1785
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
1786
      if (lastComparison != 0) {
1787
        return lastComparison;
1788
      }
1789
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
1790
      if (lastComparison != 0) {
1791
        return lastComparison;
1792
      }
1793
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(isSetWex());
1794
      if (lastComparison != 0) {
1795
        return lastComparison;
1796
      }
1797
      lastComparison = TBaseHelper.compareTo(wex, typedOther.wex);
1798
      if (lastComparison != 0) {
1799
        return lastComparison;
1800
      }
1801
      return 0;
1802
    }
1803
 
1804
    public void read(TProtocol iprot) throws TException {
1805
      TField field;
1806
      iprot.readStructBegin();
1807
      while (true)
1808
      {
1809
        field = iprot.readFieldBegin();
1810
        if (field.type == TType.STOP) { 
1811
          break;
1812
        }
1813
        _Fields fieldId = _Fields.findByThriftId(field.id);
1814
        if (fieldId == null) {
1815
          TProtocolUtil.skip(iprot, field.type);
1816
        } else {
1817
          switch (fieldId) {
1818
            case SUCCESS:
1819
              if (field.type == TType.STRUCT) {
1820
                this.success = new PurchaseOrder();
1821
                this.success.read(iprot);
1822
              } else { 
1823
                TProtocolUtil.skip(iprot, field.type);
1824
              }
1825
              break;
1826
            case WEX:
1827
              if (field.type == TType.STRUCT) {
1828
                this.wex = new WarehouseServiceException();
1829
                this.wex.read(iprot);
1830
              } else { 
1831
                TProtocolUtil.skip(iprot, field.type);
1832
              }
1833
              break;
1834
          }
1835
          iprot.readFieldEnd();
1836
        }
1837
      }
1838
      iprot.readStructEnd();
1839
      validate();
1840
    }
1841
 
1842
    public void write(TProtocol oprot) throws TException {
1843
      oprot.writeStructBegin(STRUCT_DESC);
1844
 
1845
      if (this.isSetSuccess()) {
1846
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1847
        this.success.write(oprot);
1848
        oprot.writeFieldEnd();
1849
      } else if (this.isSetWex()) {
1850
        oprot.writeFieldBegin(WEX_FIELD_DESC);
1851
        this.wex.write(oprot);
1852
        oprot.writeFieldEnd();
1853
      }
1854
      oprot.writeFieldStop();
1855
      oprot.writeStructEnd();
1856
    }
1857
 
1858
    @Override
1859
    public String toString() {
1860
      StringBuilder sb = new StringBuilder("getPurchaseOrder_result(");
1861
      boolean first = true;
1862
 
1863
      sb.append("success:");
1864
      if (this.success == null) {
1865
        sb.append("null");
1866
      } else {
1867
        sb.append(this.success);
1868
      }
1869
      first = false;
1870
      if (!first) sb.append(", ");
1871
      sb.append("wex:");
1872
      if (this.wex == null) {
1873
        sb.append("null");
1874
      } else {
1875
        sb.append(this.wex);
1876
      }
1877
      first = false;
1878
      sb.append(")");
1879
      return sb.toString();
1880
    }
1881
 
1882
    public void validate() throws TException {
1883
      // check for required fields
1884
    }
1885
 
1886
  }
1887
 
2832 chandransh 1888
  public static class getSupplier_args implements TBase<getSupplier_args._Fields>, java.io.Serializable, Cloneable, Comparable<getSupplier_args>   {
1889
    private static final TStruct STRUCT_DESC = new TStruct("getSupplier_args");
1890
 
1891
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
1892
 
1893
    private long id;
1894
 
1895
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1896
    public enum _Fields implements TFieldIdEnum {
1897
      ID((short)1, "id");
1898
 
1899
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1900
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1901
 
1902
      static {
1903
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1904
          byId.put((int)field._thriftId, field);
1905
          byName.put(field.getFieldName(), field);
1906
        }
1907
      }
1908
 
1909
      /**
1910
       * Find the _Fields constant that matches fieldId, or null if its not found.
1911
       */
1912
      public static _Fields findByThriftId(int fieldId) {
1913
        return byId.get(fieldId);
1914
      }
1915
 
1916
      /**
1917
       * Find the _Fields constant that matches fieldId, throwing an exception
1918
       * if it is not found.
1919
       */
1920
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1921
        _Fields fields = findByThriftId(fieldId);
1922
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1923
        return fields;
1924
      }
1925
 
1926
      /**
1927
       * Find the _Fields constant that matches name, or null if its not found.
1928
       */
1929
      public static _Fields findByName(String name) {
1930
        return byName.get(name);
1931
      }
1932
 
1933
      private final short _thriftId;
1934
      private final String _fieldName;
1935
 
1936
      _Fields(short thriftId, String fieldName) {
1937
        _thriftId = thriftId;
1938
        _fieldName = fieldName;
1939
      }
1940
 
1941
      public short getThriftFieldId() {
1942
        return _thriftId;
1943
      }
1944
 
1945
      public String getFieldName() {
1946
        return _fieldName;
1947
      }
1948
    }
1949
 
1950
    // isset id assignments
1951
    private static final int __ID_ISSET_ID = 0;
1952
    private BitSet __isset_bit_vector = new BitSet(1);
1953
 
1954
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1955
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
1956
          new FieldValueMetaData(TType.I64)));
1957
    }});
1958
 
1959
    static {
1960
      FieldMetaData.addStructMetaDataMap(getSupplier_args.class, metaDataMap);
1961
    }
1962
 
1963
    public getSupplier_args() {
1964
    }
1965
 
1966
    public getSupplier_args(
1967
      long id)
1968
    {
1969
      this();
1970
      this.id = id;
1971
      setIdIsSet(true);
1972
    }
1973
 
1974
    /**
1975
     * Performs a deep copy on <i>other</i>.
1976
     */
1977
    public getSupplier_args(getSupplier_args other) {
1978
      __isset_bit_vector.clear();
1979
      __isset_bit_vector.or(other.__isset_bit_vector);
1980
      this.id = other.id;
1981
    }
1982
 
1983
    public getSupplier_args deepCopy() {
1984
      return new getSupplier_args(this);
1985
    }
1986
 
1987
    @Deprecated
1988
    public getSupplier_args clone() {
1989
      return new getSupplier_args(this);
1990
    }
1991
 
1992
    public long getId() {
1993
      return this.id;
1994
    }
1995
 
1996
    public getSupplier_args setId(long id) {
1997
      this.id = id;
1998
      setIdIsSet(true);
1999
      return this;
2000
    }
2001
 
2002
    public void unsetId() {
2003
      __isset_bit_vector.clear(__ID_ISSET_ID);
2004
    }
2005
 
2006
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
2007
    public boolean isSetId() {
2008
      return __isset_bit_vector.get(__ID_ISSET_ID);
2009
    }
2010
 
2011
    public void setIdIsSet(boolean value) {
2012
      __isset_bit_vector.set(__ID_ISSET_ID, value);
2013
    }
2014
 
2015
    public void setFieldValue(_Fields field, Object value) {
2016
      switch (field) {
2017
      case ID:
2018
        if (value == null) {
2019
          unsetId();
2020
        } else {
2021
          setId((Long)value);
2022
        }
2023
        break;
2024
 
2025
      }
2026
    }
2027
 
2028
    public void setFieldValue(int fieldID, Object value) {
2029
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2030
    }
2031
 
2032
    public Object getFieldValue(_Fields field) {
2033
      switch (field) {
2034
      case ID:
2035
        return new Long(getId());
2036
 
2037
      }
2038
      throw new IllegalStateException();
2039
    }
2040
 
2041
    public Object getFieldValue(int fieldId) {
2042
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2043
    }
2044
 
2045
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2046
    public boolean isSet(_Fields field) {
2047
      switch (field) {
2048
      case ID:
2049
        return isSetId();
2050
      }
2051
      throw new IllegalStateException();
2052
    }
2053
 
2054
    public boolean isSet(int fieldID) {
2055
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2056
    }
2057
 
2058
    @Override
2059
    public boolean equals(Object that) {
2060
      if (that == null)
2061
        return false;
2062
      if (that instanceof getSupplier_args)
2063
        return this.equals((getSupplier_args)that);
2064
      return false;
2065
    }
2066
 
2067
    public boolean equals(getSupplier_args that) {
2068
      if (that == null)
2069
        return false;
2070
 
2071
      boolean this_present_id = true;
2072
      boolean that_present_id = true;
2073
      if (this_present_id || that_present_id) {
2074
        if (!(this_present_id && that_present_id))
2075
          return false;
2076
        if (this.id != that.id)
2077
          return false;
2078
      }
2079
 
2080
      return true;
2081
    }
2082
 
2083
    @Override
2084
    public int hashCode() {
2085
      return 0;
2086
    }
2087
 
2088
    public int compareTo(getSupplier_args other) {
2089
      if (!getClass().equals(other.getClass())) {
2090
        return getClass().getName().compareTo(other.getClass().getName());
2091
      }
2092
 
2093
      int lastComparison = 0;
2094
      getSupplier_args typedOther = (getSupplier_args)other;
2095
 
2096
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
2097
      if (lastComparison != 0) {
2098
        return lastComparison;
2099
      }
2100
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
2101
      if (lastComparison != 0) {
2102
        return lastComparison;
2103
      }
2104
      return 0;
2105
    }
2106
 
2107
    public void read(TProtocol iprot) throws TException {
2108
      TField field;
2109
      iprot.readStructBegin();
2110
      while (true)
2111
      {
2112
        field = iprot.readFieldBegin();
2113
        if (field.type == TType.STOP) { 
2114
          break;
2115
        }
2116
        _Fields fieldId = _Fields.findByThriftId(field.id);
2117
        if (fieldId == null) {
2118
          TProtocolUtil.skip(iprot, field.type);
2119
        } else {
2120
          switch (fieldId) {
2121
            case ID:
2122
              if (field.type == TType.I64) {
2123
                this.id = iprot.readI64();
2124
                setIdIsSet(true);
2125
              } else { 
2126
                TProtocolUtil.skip(iprot, field.type);
2127
              }
2128
              break;
2129
          }
2130
          iprot.readFieldEnd();
2131
        }
2132
      }
2133
      iprot.readStructEnd();
2134
      validate();
2135
    }
2136
 
2137
    public void write(TProtocol oprot) throws TException {
2138
      validate();
2139
 
2140
      oprot.writeStructBegin(STRUCT_DESC);
2141
      oprot.writeFieldBegin(ID_FIELD_DESC);
2142
      oprot.writeI64(this.id);
2143
      oprot.writeFieldEnd();
2144
      oprot.writeFieldStop();
2145
      oprot.writeStructEnd();
2146
    }
2147
 
2148
    @Override
2149
    public String toString() {
2150
      StringBuilder sb = new StringBuilder("getSupplier_args(");
2151
      boolean first = true;
2152
 
2153
      sb.append("id:");
2154
      sb.append(this.id);
2155
      first = false;
2156
      sb.append(")");
2157
      return sb.toString();
2158
    }
2159
 
2160
    public void validate() throws TException {
2161
      // check for required fields
2162
    }
2163
 
2164
  }
2165
 
2166
  public static class getSupplier_result implements TBase<getSupplier_result._Fields>, java.io.Serializable, Cloneable, Comparable<getSupplier_result>   {
2167
    private static final TStruct STRUCT_DESC = new TStruct("getSupplier_result");
2168
 
2169
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
2170
    private static final TField WEX_FIELD_DESC = new TField("wex", TType.STRUCT, (short)1);
2171
 
2172
    private Supplier success;
2173
    private WarehouseServiceException wex;
2174
 
2175
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2176
    public enum _Fields implements TFieldIdEnum {
2177
      SUCCESS((short)0, "success"),
2178
      WEX((short)1, "wex");
2179
 
2180
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2181
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2182
 
2183
      static {
2184
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2185
          byId.put((int)field._thriftId, field);
2186
          byName.put(field.getFieldName(), field);
2187
        }
2188
      }
2189
 
2190
      /**
2191
       * Find the _Fields constant that matches fieldId, or null if its not found.
2192
       */
2193
      public static _Fields findByThriftId(int fieldId) {
2194
        return byId.get(fieldId);
2195
      }
2196
 
2197
      /**
2198
       * Find the _Fields constant that matches fieldId, throwing an exception
2199
       * if it is not found.
2200
       */
2201
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2202
        _Fields fields = findByThriftId(fieldId);
2203
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2204
        return fields;
2205
      }
2206
 
2207
      /**
2208
       * Find the _Fields constant that matches name, or null if its not found.
2209
       */
2210
      public static _Fields findByName(String name) {
2211
        return byName.get(name);
2212
      }
2213
 
2214
      private final short _thriftId;
2215
      private final String _fieldName;
2216
 
2217
      _Fields(short thriftId, String fieldName) {
2218
        _thriftId = thriftId;
2219
        _fieldName = fieldName;
2220
      }
2221
 
2222
      public short getThriftFieldId() {
2223
        return _thriftId;
2224
      }
2225
 
2226
      public String getFieldName() {
2227
        return _fieldName;
2228
      }
2229
    }
2230
 
2231
    // isset id assignments
2232
 
2233
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2234
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2235
          new StructMetaData(TType.STRUCT, Supplier.class)));
2236
      put(_Fields.WEX, new FieldMetaData("wex", TFieldRequirementType.DEFAULT, 
2237
          new FieldValueMetaData(TType.STRUCT)));
2238
    }});
2239
 
2240
    static {
2241
      FieldMetaData.addStructMetaDataMap(getSupplier_result.class, metaDataMap);
2242
    }
2243
 
2244
    public getSupplier_result() {
2245
    }
2246
 
2247
    public getSupplier_result(
2248
      Supplier success,
2249
      WarehouseServiceException wex)
2250
    {
2251
      this();
2252
      this.success = success;
2253
      this.wex = wex;
2254
    }
2255
 
2256
    /**
2257
     * Performs a deep copy on <i>other</i>.
2258
     */
2259
    public getSupplier_result(getSupplier_result other) {
2260
      if (other.isSetSuccess()) {
2261
        this.success = new Supplier(other.success);
2262
      }
2263
      if (other.isSetWex()) {
2264
        this.wex = new WarehouseServiceException(other.wex);
2265
      }
2266
    }
2267
 
2268
    public getSupplier_result deepCopy() {
2269
      return new getSupplier_result(this);
2270
    }
2271
 
2272
    @Deprecated
2273
    public getSupplier_result clone() {
2274
      return new getSupplier_result(this);
2275
    }
2276
 
2277
    public Supplier getSuccess() {
2278
      return this.success;
2279
    }
2280
 
2281
    public getSupplier_result setSuccess(Supplier success) {
2282
      this.success = success;
2283
      return this;
2284
    }
2285
 
2286
    public void unsetSuccess() {
2287
      this.success = null;
2288
    }
2289
 
2290
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2291
    public boolean isSetSuccess() {
2292
      return this.success != null;
2293
    }
2294
 
2295
    public void setSuccessIsSet(boolean value) {
2296
      if (!value) {
2297
        this.success = null;
2298
      }
2299
    }
2300
 
2301
    public WarehouseServiceException getWex() {
2302
      return this.wex;
2303
    }
2304
 
2305
    public getSupplier_result setWex(WarehouseServiceException wex) {
2306
      this.wex = wex;
2307
      return this;
2308
    }
2309
 
2310
    public void unsetWex() {
2311
      this.wex = null;
2312
    }
2313
 
2314
    /** Returns true if field wex is set (has been asigned a value) and false otherwise */
2315
    public boolean isSetWex() {
2316
      return this.wex != null;
2317
    }
2318
 
2319
    public void setWexIsSet(boolean value) {
2320
      if (!value) {
2321
        this.wex = null;
2322
      }
2323
    }
2324
 
2325
    public void setFieldValue(_Fields field, Object value) {
2326
      switch (field) {
2327
      case SUCCESS:
2328
        if (value == null) {
2329
          unsetSuccess();
2330
        } else {
2331
          setSuccess((Supplier)value);
2332
        }
2333
        break;
2334
 
2335
      case WEX:
2336
        if (value == null) {
2337
          unsetWex();
2338
        } else {
2339
          setWex((WarehouseServiceException)value);
2340
        }
2341
        break;
2342
 
2343
      }
2344
    }
2345
 
2346
    public void setFieldValue(int fieldID, Object value) {
2347
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2348
    }
2349
 
2350
    public Object getFieldValue(_Fields field) {
2351
      switch (field) {
2352
      case SUCCESS:
2353
        return getSuccess();
2354
 
2355
      case WEX:
2356
        return getWex();
2357
 
2358
      }
2359
      throw new IllegalStateException();
2360
    }
2361
 
2362
    public Object getFieldValue(int fieldId) {
2363
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2364
    }
2365
 
2366
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2367
    public boolean isSet(_Fields field) {
2368
      switch (field) {
2369
      case SUCCESS:
2370
        return isSetSuccess();
2371
      case WEX:
2372
        return isSetWex();
2373
      }
2374
      throw new IllegalStateException();
2375
    }
2376
 
2377
    public boolean isSet(int fieldID) {
2378
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2379
    }
2380
 
2381
    @Override
2382
    public boolean equals(Object that) {
2383
      if (that == null)
2384
        return false;
2385
      if (that instanceof getSupplier_result)
2386
        return this.equals((getSupplier_result)that);
2387
      return false;
2388
    }
2389
 
2390
    public boolean equals(getSupplier_result that) {
2391
      if (that == null)
2392
        return false;
2393
 
2394
      boolean this_present_success = true && this.isSetSuccess();
2395
      boolean that_present_success = true && that.isSetSuccess();
2396
      if (this_present_success || that_present_success) {
2397
        if (!(this_present_success && that_present_success))
2398
          return false;
2399
        if (!this.success.equals(that.success))
2400
          return false;
2401
      }
2402
 
2403
      boolean this_present_wex = true && this.isSetWex();
2404
      boolean that_present_wex = true && that.isSetWex();
2405
      if (this_present_wex || that_present_wex) {
2406
        if (!(this_present_wex && that_present_wex))
2407
          return false;
2408
        if (!this.wex.equals(that.wex))
2409
          return false;
2410
      }
2411
 
2412
      return true;
2413
    }
2414
 
2415
    @Override
2416
    public int hashCode() {
2417
      return 0;
2418
    }
2419
 
2420
    public int compareTo(getSupplier_result other) {
2421
      if (!getClass().equals(other.getClass())) {
2422
        return getClass().getName().compareTo(other.getClass().getName());
2423
      }
2424
 
2425
      int lastComparison = 0;
2426
      getSupplier_result typedOther = (getSupplier_result)other;
2427
 
2428
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
2429
      if (lastComparison != 0) {
2430
        return lastComparison;
2431
      }
2432
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
2433
      if (lastComparison != 0) {
2434
        return lastComparison;
2435
      }
2436
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(isSetWex());
2437
      if (lastComparison != 0) {
2438
        return lastComparison;
2439
      }
2440
      lastComparison = TBaseHelper.compareTo(wex, typedOther.wex);
2441
      if (lastComparison != 0) {
2442
        return lastComparison;
2443
      }
2444
      return 0;
2445
    }
2446
 
2447
    public void read(TProtocol iprot) throws TException {
2448
      TField field;
2449
      iprot.readStructBegin();
2450
      while (true)
2451
      {
2452
        field = iprot.readFieldBegin();
2453
        if (field.type == TType.STOP) { 
2454
          break;
2455
        }
2456
        _Fields fieldId = _Fields.findByThriftId(field.id);
2457
        if (fieldId == null) {
2458
          TProtocolUtil.skip(iprot, field.type);
2459
        } else {
2460
          switch (fieldId) {
2461
            case SUCCESS:
2462
              if (field.type == TType.STRUCT) {
2463
                this.success = new Supplier();
2464
                this.success.read(iprot);
2465
              } else { 
2466
                TProtocolUtil.skip(iprot, field.type);
2467
              }
2468
              break;
2469
            case WEX:
2470
              if (field.type == TType.STRUCT) {
2471
                this.wex = new WarehouseServiceException();
2472
                this.wex.read(iprot);
2473
              } else { 
2474
                TProtocolUtil.skip(iprot, field.type);
2475
              }
2476
              break;
2477
          }
2478
          iprot.readFieldEnd();
2479
        }
2480
      }
2481
      iprot.readStructEnd();
2482
      validate();
2483
    }
2484
 
2485
    public void write(TProtocol oprot) throws TException {
2486
      oprot.writeStructBegin(STRUCT_DESC);
2487
 
2488
      if (this.isSetSuccess()) {
2489
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2490
        this.success.write(oprot);
2491
        oprot.writeFieldEnd();
2492
      } else if (this.isSetWex()) {
2493
        oprot.writeFieldBegin(WEX_FIELD_DESC);
2494
        this.wex.write(oprot);
2495
        oprot.writeFieldEnd();
2496
      }
2497
      oprot.writeFieldStop();
2498
      oprot.writeStructEnd();
2499
    }
2500
 
2501
    @Override
2502
    public String toString() {
2503
      StringBuilder sb = new StringBuilder("getSupplier_result(");
2504
      boolean first = true;
2505
 
2506
      sb.append("success:");
2507
      if (this.success == null) {
2508
        sb.append("null");
2509
      } else {
2510
        sb.append(this.success);
2511
      }
2512
      first = false;
2513
      if (!first) sb.append(", ");
2514
      sb.append("wex:");
2515
      if (this.wex == null) {
2516
        sb.append("null");
2517
      } else {
2518
        sb.append(this.wex);
2519
      }
2520
      first = false;
2521
      sb.append(")");
2522
      return sb.toString();
2523
    }
2524
 
2525
    public void validate() throws TException {
2526
      // check for required fields
2527
    }
2528
 
2529
  }
2530
 
2820 chandransh 2531
  public static class startPurchase_args implements TBase<startPurchase_args._Fields>, java.io.Serializable, Cloneable, Comparable<startPurchase_args>   {
2532
    private static final TStruct STRUCT_DESC = new TStruct("startPurchase_args");
2533
 
2534
    private static final TField PURCHASE_ORDER_ID_FIELD_DESC = new TField("purchaseOrderId", TType.I64, (short)1);
2535
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoiceNumber", TType.STRING, (short)2);
2536
    private static final TField FREIGHT_CHARGES_FIELD_DESC = new TField("freightCharges", TType.DOUBLE, (short)3);
2537
 
2538
    private long purchaseOrderId;
2539
    private String invoiceNumber;
2540
    private double freightCharges;
2541
 
2542
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2543
    public enum _Fields implements TFieldIdEnum {
2544
      PURCHASE_ORDER_ID((short)1, "purchaseOrderId"),
2545
      INVOICE_NUMBER((short)2, "invoiceNumber"),
2546
      FREIGHT_CHARGES((short)3, "freightCharges");
2547
 
2548
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2549
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2550
 
2551
      static {
2552
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2553
          byId.put((int)field._thriftId, field);
2554
          byName.put(field.getFieldName(), field);
2555
        }
2556
      }
2557
 
2558
      /**
2559
       * Find the _Fields constant that matches fieldId, or null if its not found.
2560
       */
2561
      public static _Fields findByThriftId(int fieldId) {
2562
        return byId.get(fieldId);
2563
      }
2564
 
2565
      /**
2566
       * Find the _Fields constant that matches fieldId, throwing an exception
2567
       * if it is not found.
2568
       */
2569
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2570
        _Fields fields = findByThriftId(fieldId);
2571
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2572
        return fields;
2573
      }
2574
 
2575
      /**
2576
       * Find the _Fields constant that matches name, or null if its not found.
2577
       */
2578
      public static _Fields findByName(String name) {
2579
        return byName.get(name);
2580
      }
2581
 
2582
      private final short _thriftId;
2583
      private final String _fieldName;
2584
 
2585
      _Fields(short thriftId, String fieldName) {
2586
        _thriftId = thriftId;
2587
        _fieldName = fieldName;
2588
      }
2589
 
2590
      public short getThriftFieldId() {
2591
        return _thriftId;
2592
      }
2593
 
2594
      public String getFieldName() {
2595
        return _fieldName;
2596
      }
2597
    }
2598
 
2599
    // isset id assignments
2600
    private static final int __PURCHASEORDERID_ISSET_ID = 0;
2601
    private static final int __FREIGHTCHARGES_ISSET_ID = 1;
2602
    private BitSet __isset_bit_vector = new BitSet(2);
2603
 
2604
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2605
      put(_Fields.PURCHASE_ORDER_ID, new FieldMetaData("purchaseOrderId", TFieldRequirementType.DEFAULT, 
2606
          new FieldValueMetaData(TType.I64)));
2607
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoiceNumber", TFieldRequirementType.DEFAULT, 
2608
          new FieldValueMetaData(TType.STRING)));
2609
      put(_Fields.FREIGHT_CHARGES, new FieldMetaData("freightCharges", TFieldRequirementType.DEFAULT, 
2610
          new FieldValueMetaData(TType.DOUBLE)));
2611
    }});
2612
 
2613
    static {
2614
      FieldMetaData.addStructMetaDataMap(startPurchase_args.class, metaDataMap);
2615
    }
2616
 
2617
    public startPurchase_args() {
2618
    }
2619
 
2620
    public startPurchase_args(
2621
      long purchaseOrderId,
2622
      String invoiceNumber,
2623
      double freightCharges)
2624
    {
2625
      this();
2626
      this.purchaseOrderId = purchaseOrderId;
2627
      setPurchaseOrderIdIsSet(true);
2628
      this.invoiceNumber = invoiceNumber;
2629
      this.freightCharges = freightCharges;
2630
      setFreightChargesIsSet(true);
2631
    }
2632
 
2633
    /**
2634
     * Performs a deep copy on <i>other</i>.
2635
     */
2636
    public startPurchase_args(startPurchase_args other) {
2637
      __isset_bit_vector.clear();
2638
      __isset_bit_vector.or(other.__isset_bit_vector);
2639
      this.purchaseOrderId = other.purchaseOrderId;
2640
      if (other.isSetInvoiceNumber()) {
2641
        this.invoiceNumber = other.invoiceNumber;
2642
      }
2643
      this.freightCharges = other.freightCharges;
2644
    }
2645
 
2646
    public startPurchase_args deepCopy() {
2647
      return new startPurchase_args(this);
2648
    }
2649
 
2650
    @Deprecated
2651
    public startPurchase_args clone() {
2652
      return new startPurchase_args(this);
2653
    }
2654
 
2655
    public long getPurchaseOrderId() {
2656
      return this.purchaseOrderId;
2657
    }
2658
 
2659
    public startPurchase_args setPurchaseOrderId(long purchaseOrderId) {
2660
      this.purchaseOrderId = purchaseOrderId;
2661
      setPurchaseOrderIdIsSet(true);
2662
      return this;
2663
    }
2664
 
2665
    public void unsetPurchaseOrderId() {
2666
      __isset_bit_vector.clear(__PURCHASEORDERID_ISSET_ID);
2667
    }
2668
 
2669
    /** Returns true if field purchaseOrderId is set (has been asigned a value) and false otherwise */
2670
    public boolean isSetPurchaseOrderId() {
2671
      return __isset_bit_vector.get(__PURCHASEORDERID_ISSET_ID);
2672
    }
2673
 
2674
    public void setPurchaseOrderIdIsSet(boolean value) {
2675
      __isset_bit_vector.set(__PURCHASEORDERID_ISSET_ID, value);
2676
    }
2677
 
2678
    public String getInvoiceNumber() {
2679
      return this.invoiceNumber;
2680
    }
2681
 
2682
    public startPurchase_args setInvoiceNumber(String invoiceNumber) {
2683
      this.invoiceNumber = invoiceNumber;
2684
      return this;
2685
    }
2686
 
2687
    public void unsetInvoiceNumber() {
2688
      this.invoiceNumber = null;
2689
    }
2690
 
2691
    /** Returns true if field invoiceNumber is set (has been asigned a value) and false otherwise */
2692
    public boolean isSetInvoiceNumber() {
2693
      return this.invoiceNumber != null;
2694
    }
2695
 
2696
    public void setInvoiceNumberIsSet(boolean value) {
2697
      if (!value) {
2698
        this.invoiceNumber = null;
2699
      }
2700
    }
2701
 
2702
    public double getFreightCharges() {
2703
      return this.freightCharges;
2704
    }
2705
 
2706
    public startPurchase_args setFreightCharges(double freightCharges) {
2707
      this.freightCharges = freightCharges;
2708
      setFreightChargesIsSet(true);
2709
      return this;
2710
    }
2711
 
2712
    public void unsetFreightCharges() {
2713
      __isset_bit_vector.clear(__FREIGHTCHARGES_ISSET_ID);
2714
    }
2715
 
2716
    /** Returns true if field freightCharges is set (has been asigned a value) and false otherwise */
2717
    public boolean isSetFreightCharges() {
2718
      return __isset_bit_vector.get(__FREIGHTCHARGES_ISSET_ID);
2719
    }
2720
 
2721
    public void setFreightChargesIsSet(boolean value) {
2722
      __isset_bit_vector.set(__FREIGHTCHARGES_ISSET_ID, value);
2723
    }
2724
 
2725
    public void setFieldValue(_Fields field, Object value) {
2726
      switch (field) {
2727
      case PURCHASE_ORDER_ID:
2728
        if (value == null) {
2729
          unsetPurchaseOrderId();
2730
        } else {
2731
          setPurchaseOrderId((Long)value);
2732
        }
2733
        break;
2734
 
2735
      case INVOICE_NUMBER:
2736
        if (value == null) {
2737
          unsetInvoiceNumber();
2738
        } else {
2739
          setInvoiceNumber((String)value);
2740
        }
2741
        break;
2742
 
2743
      case FREIGHT_CHARGES:
2744
        if (value == null) {
2745
          unsetFreightCharges();
2746
        } else {
2747
          setFreightCharges((Double)value);
2748
        }
2749
        break;
2750
 
2751
      }
2752
    }
2753
 
2754
    public void setFieldValue(int fieldID, Object value) {
2755
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2756
    }
2757
 
2758
    public Object getFieldValue(_Fields field) {
2759
      switch (field) {
2760
      case PURCHASE_ORDER_ID:
2761
        return new Long(getPurchaseOrderId());
2762
 
2763
      case INVOICE_NUMBER:
2764
        return getInvoiceNumber();
2765
 
2766
      case FREIGHT_CHARGES:
2767
        return new Double(getFreightCharges());
2768
 
2769
      }
2770
      throw new IllegalStateException();
2771
    }
2772
 
2773
    public Object getFieldValue(int fieldId) {
2774
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2775
    }
2776
 
2777
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2778
    public boolean isSet(_Fields field) {
2779
      switch (field) {
2780
      case PURCHASE_ORDER_ID:
2781
        return isSetPurchaseOrderId();
2782
      case INVOICE_NUMBER:
2783
        return isSetInvoiceNumber();
2784
      case FREIGHT_CHARGES:
2785
        return isSetFreightCharges();
2786
      }
2787
      throw new IllegalStateException();
2788
    }
2789
 
2790
    public boolean isSet(int fieldID) {
2791
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2792
    }
2793
 
2794
    @Override
2795
    public boolean equals(Object that) {
2796
      if (that == null)
2797
        return false;
2798
      if (that instanceof startPurchase_args)
2799
        return this.equals((startPurchase_args)that);
2800
      return false;
2801
    }
2802
 
2803
    public boolean equals(startPurchase_args that) {
2804
      if (that == null)
2805
        return false;
2806
 
2807
      boolean this_present_purchaseOrderId = true;
2808
      boolean that_present_purchaseOrderId = true;
2809
      if (this_present_purchaseOrderId || that_present_purchaseOrderId) {
2810
        if (!(this_present_purchaseOrderId && that_present_purchaseOrderId))
2811
          return false;
2812
        if (this.purchaseOrderId != that.purchaseOrderId)
2813
          return false;
2814
      }
2815
 
2816
      boolean this_present_invoiceNumber = true && this.isSetInvoiceNumber();
2817
      boolean that_present_invoiceNumber = true && that.isSetInvoiceNumber();
2818
      if (this_present_invoiceNumber || that_present_invoiceNumber) {
2819
        if (!(this_present_invoiceNumber && that_present_invoiceNumber))
2820
          return false;
2821
        if (!this.invoiceNumber.equals(that.invoiceNumber))
2822
          return false;
2823
      }
2824
 
2825
      boolean this_present_freightCharges = true;
2826
      boolean that_present_freightCharges = true;
2827
      if (this_present_freightCharges || that_present_freightCharges) {
2828
        if (!(this_present_freightCharges && that_present_freightCharges))
2829
          return false;
2830
        if (this.freightCharges != that.freightCharges)
2831
          return false;
2832
      }
2833
 
2834
      return true;
2835
    }
2836
 
2837
    @Override
2838
    public int hashCode() {
2839
      return 0;
2840
    }
2841
 
2842
    public int compareTo(startPurchase_args other) {
2843
      if (!getClass().equals(other.getClass())) {
2844
        return getClass().getName().compareTo(other.getClass().getName());
2845
      }
2846
 
2847
      int lastComparison = 0;
2848
      startPurchase_args typedOther = (startPurchase_args)other;
2849
 
2850
      lastComparison = Boolean.valueOf(isSetPurchaseOrderId()).compareTo(isSetPurchaseOrderId());
2851
      if (lastComparison != 0) {
2852
        return lastComparison;
2853
      }
2854
      lastComparison = TBaseHelper.compareTo(purchaseOrderId, typedOther.purchaseOrderId);
2855
      if (lastComparison != 0) {
2856
        return lastComparison;
2857
      }
2858
      lastComparison = Boolean.valueOf(isSetInvoiceNumber()).compareTo(isSetInvoiceNumber());
2859
      if (lastComparison != 0) {
2860
        return lastComparison;
2861
      }
2862
      lastComparison = TBaseHelper.compareTo(invoiceNumber, typedOther.invoiceNumber);
2863
      if (lastComparison != 0) {
2864
        return lastComparison;
2865
      }
2866
      lastComparison = Boolean.valueOf(isSetFreightCharges()).compareTo(isSetFreightCharges());
2867
      if (lastComparison != 0) {
2868
        return lastComparison;
2869
      }
2870
      lastComparison = TBaseHelper.compareTo(freightCharges, typedOther.freightCharges);
2871
      if (lastComparison != 0) {
2872
        return lastComparison;
2873
      }
2874
      return 0;
2875
    }
2876
 
2877
    public void read(TProtocol iprot) throws TException {
2878
      TField field;
2879
      iprot.readStructBegin();
2880
      while (true)
2881
      {
2882
        field = iprot.readFieldBegin();
2883
        if (field.type == TType.STOP) { 
2884
          break;
2885
        }
2886
        _Fields fieldId = _Fields.findByThriftId(field.id);
2887
        if (fieldId == null) {
2888
          TProtocolUtil.skip(iprot, field.type);
2889
        } else {
2890
          switch (fieldId) {
2891
            case PURCHASE_ORDER_ID:
2892
              if (field.type == TType.I64) {
2893
                this.purchaseOrderId = iprot.readI64();
2894
                setPurchaseOrderIdIsSet(true);
2895
              } else { 
2896
                TProtocolUtil.skip(iprot, field.type);
2897
              }
2898
              break;
2899
            case INVOICE_NUMBER:
2900
              if (field.type == TType.STRING) {
2901
                this.invoiceNumber = iprot.readString();
2902
              } else { 
2903
                TProtocolUtil.skip(iprot, field.type);
2904
              }
2905
              break;
2906
            case FREIGHT_CHARGES:
2907
              if (field.type == TType.DOUBLE) {
2908
                this.freightCharges = iprot.readDouble();
2909
                setFreightChargesIsSet(true);
2910
              } else { 
2911
                TProtocolUtil.skip(iprot, field.type);
2912
              }
2913
              break;
2914
          }
2915
          iprot.readFieldEnd();
2916
        }
2917
      }
2918
      iprot.readStructEnd();
2919
      validate();
2920
    }
2921
 
2922
    public void write(TProtocol oprot) throws TException {
2923
      validate();
2924
 
2925
      oprot.writeStructBegin(STRUCT_DESC);
2926
      oprot.writeFieldBegin(PURCHASE_ORDER_ID_FIELD_DESC);
2927
      oprot.writeI64(this.purchaseOrderId);
2928
      oprot.writeFieldEnd();
2929
      if (this.invoiceNumber != null) {
2930
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
2931
        oprot.writeString(this.invoiceNumber);
2932
        oprot.writeFieldEnd();
2933
      }
2934
      oprot.writeFieldBegin(FREIGHT_CHARGES_FIELD_DESC);
2935
      oprot.writeDouble(this.freightCharges);
2936
      oprot.writeFieldEnd();
2937
      oprot.writeFieldStop();
2938
      oprot.writeStructEnd();
2939
    }
2940
 
2941
    @Override
2942
    public String toString() {
2943
      StringBuilder sb = new StringBuilder("startPurchase_args(");
2944
      boolean first = true;
2945
 
2946
      sb.append("purchaseOrderId:");
2947
      sb.append(this.purchaseOrderId);
2948
      first = false;
2949
      if (!first) sb.append(", ");
2950
      sb.append("invoiceNumber:");
2951
      if (this.invoiceNumber == null) {
2952
        sb.append("null");
2953
      } else {
2954
        sb.append(this.invoiceNumber);
2955
      }
2956
      first = false;
2957
      if (!first) sb.append(", ");
2958
      sb.append("freightCharges:");
2959
      sb.append(this.freightCharges);
2960
      first = false;
2961
      sb.append(")");
2962
      return sb.toString();
2963
    }
2964
 
2965
    public void validate() throws TException {
2966
      // check for required fields
2967
    }
2968
 
2969
  }
2970
 
2971
  public static class startPurchase_result implements TBase<startPurchase_result._Fields>, java.io.Serializable, Cloneable, Comparable<startPurchase_result>   {
2972
    private static final TStruct STRUCT_DESC = new TStruct("startPurchase_result");
2973
 
2974
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
2975
    private static final TField WEX_FIELD_DESC = new TField("wex", TType.STRUCT, (short)1);
2976
 
2977
    private long success;
2978
    private WarehouseServiceException wex;
2979
 
2980
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2981
    public enum _Fields implements TFieldIdEnum {
2982
      SUCCESS((short)0, "success"),
2983
      WEX((short)1, "wex");
2984
 
2985
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2986
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2987
 
2988
      static {
2989
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2990
          byId.put((int)field._thriftId, field);
2991
          byName.put(field.getFieldName(), field);
2992
        }
2993
      }
2994
 
2995
      /**
2996
       * Find the _Fields constant that matches fieldId, or null if its not found.
2997
       */
2998
      public static _Fields findByThriftId(int fieldId) {
2999
        return byId.get(fieldId);
3000
      }
3001
 
3002
      /**
3003
       * Find the _Fields constant that matches fieldId, throwing an exception
3004
       * if it is not found.
3005
       */
3006
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3007
        _Fields fields = findByThriftId(fieldId);
3008
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3009
        return fields;
3010
      }
3011
 
3012
      /**
3013
       * Find the _Fields constant that matches name, or null if its not found.
3014
       */
3015
      public static _Fields findByName(String name) {
3016
        return byName.get(name);
3017
      }
3018
 
3019
      private final short _thriftId;
3020
      private final String _fieldName;
3021
 
3022
      _Fields(short thriftId, String fieldName) {
3023
        _thriftId = thriftId;
3024
        _fieldName = fieldName;
3025
      }
3026
 
3027
      public short getThriftFieldId() {
3028
        return _thriftId;
3029
      }
3030
 
3031
      public String getFieldName() {
3032
        return _fieldName;
3033
      }
3034
    }
3035
 
3036
    // isset id assignments
3037
    private static final int __SUCCESS_ISSET_ID = 0;
3038
    private BitSet __isset_bit_vector = new BitSet(1);
3039
 
3040
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3041
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3042
          new FieldValueMetaData(TType.I64)));
3043
      put(_Fields.WEX, new FieldMetaData("wex", TFieldRequirementType.DEFAULT, 
3044
          new FieldValueMetaData(TType.STRUCT)));
3045
    }});
3046
 
3047
    static {
3048
      FieldMetaData.addStructMetaDataMap(startPurchase_result.class, metaDataMap);
3049
    }
3050
 
3051
    public startPurchase_result() {
3052
    }
3053
 
3054
    public startPurchase_result(
3055
      long success,
3056
      WarehouseServiceException wex)
3057
    {
3058
      this();
3059
      this.success = success;
3060
      setSuccessIsSet(true);
3061
      this.wex = wex;
3062
    }
3063
 
3064
    /**
3065
     * Performs a deep copy on <i>other</i>.
3066
     */
3067
    public startPurchase_result(startPurchase_result other) {
3068
      __isset_bit_vector.clear();
3069
      __isset_bit_vector.or(other.__isset_bit_vector);
3070
      this.success = other.success;
3071
      if (other.isSetWex()) {
3072
        this.wex = new WarehouseServiceException(other.wex);
3073
      }
3074
    }
3075
 
3076
    public startPurchase_result deepCopy() {
3077
      return new startPurchase_result(this);
3078
    }
3079
 
3080
    @Deprecated
3081
    public startPurchase_result clone() {
3082
      return new startPurchase_result(this);
3083
    }
3084
 
3085
    public long getSuccess() {
3086
      return this.success;
3087
    }
3088
 
3089
    public startPurchase_result setSuccess(long success) {
3090
      this.success = success;
3091
      setSuccessIsSet(true);
3092
      return this;
3093
    }
3094
 
3095
    public void unsetSuccess() {
3096
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3097
    }
3098
 
3099
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3100
    public boolean isSetSuccess() {
3101
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3102
    }
3103
 
3104
    public void setSuccessIsSet(boolean value) {
3105
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3106
    }
3107
 
3108
    public WarehouseServiceException getWex() {
3109
      return this.wex;
3110
    }
3111
 
3112
    public startPurchase_result setWex(WarehouseServiceException wex) {
3113
      this.wex = wex;
3114
      return this;
3115
    }
3116
 
3117
    public void unsetWex() {
3118
      this.wex = null;
3119
    }
3120
 
3121
    /** Returns true if field wex is set (has been asigned a value) and false otherwise */
3122
    public boolean isSetWex() {
3123
      return this.wex != null;
3124
    }
3125
 
3126
    public void setWexIsSet(boolean value) {
3127
      if (!value) {
3128
        this.wex = null;
3129
      }
3130
    }
3131
 
3132
    public void setFieldValue(_Fields field, Object value) {
3133
      switch (field) {
3134
      case SUCCESS:
3135
        if (value == null) {
3136
          unsetSuccess();
3137
        } else {
3138
          setSuccess((Long)value);
3139
        }
3140
        break;
3141
 
3142
      case WEX:
3143
        if (value == null) {
3144
          unsetWex();
3145
        } else {
3146
          setWex((WarehouseServiceException)value);
3147
        }
3148
        break;
3149
 
3150
      }
3151
    }
3152
 
3153
    public void setFieldValue(int fieldID, Object value) {
3154
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3155
    }
3156
 
3157
    public Object getFieldValue(_Fields field) {
3158
      switch (field) {
3159
      case SUCCESS:
3160
        return new Long(getSuccess());
3161
 
3162
      case WEX:
3163
        return getWex();
3164
 
3165
      }
3166
      throw new IllegalStateException();
3167
    }
3168
 
3169
    public Object getFieldValue(int fieldId) {
3170
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3171
    }
3172
 
3173
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3174
    public boolean isSet(_Fields field) {
3175
      switch (field) {
3176
      case SUCCESS:
3177
        return isSetSuccess();
3178
      case WEX:
3179
        return isSetWex();
3180
      }
3181
      throw new IllegalStateException();
3182
    }
3183
 
3184
    public boolean isSet(int fieldID) {
3185
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3186
    }
3187
 
3188
    @Override
3189
    public boolean equals(Object that) {
3190
      if (that == null)
3191
        return false;
3192
      if (that instanceof startPurchase_result)
3193
        return this.equals((startPurchase_result)that);
3194
      return false;
3195
    }
3196
 
3197
    public boolean equals(startPurchase_result that) {
3198
      if (that == null)
3199
        return false;
3200
 
3201
      boolean this_present_success = true;
3202
      boolean that_present_success = true;
3203
      if (this_present_success || that_present_success) {
3204
        if (!(this_present_success && that_present_success))
3205
          return false;
3206
        if (this.success != that.success)
3207
          return false;
3208
      }
3209
 
3210
      boolean this_present_wex = true && this.isSetWex();
3211
      boolean that_present_wex = true && that.isSetWex();
3212
      if (this_present_wex || that_present_wex) {
3213
        if (!(this_present_wex && that_present_wex))
3214
          return false;
3215
        if (!this.wex.equals(that.wex))
3216
          return false;
3217
      }
3218
 
3219
      return true;
3220
    }
3221
 
3222
    @Override
3223
    public int hashCode() {
3224
      return 0;
3225
    }
3226
 
3227
    public int compareTo(startPurchase_result other) {
3228
      if (!getClass().equals(other.getClass())) {
3229
        return getClass().getName().compareTo(other.getClass().getName());
3230
      }
3231
 
3232
      int lastComparison = 0;
3233
      startPurchase_result typedOther = (startPurchase_result)other;
3234
 
3235
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3236
      if (lastComparison != 0) {
3237
        return lastComparison;
3238
      }
3239
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3240
      if (lastComparison != 0) {
3241
        return lastComparison;
3242
      }
3243
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(isSetWex());
3244
      if (lastComparison != 0) {
3245
        return lastComparison;
3246
      }
3247
      lastComparison = TBaseHelper.compareTo(wex, typedOther.wex);
3248
      if (lastComparison != 0) {
3249
        return lastComparison;
3250
      }
3251
      return 0;
3252
    }
3253
 
3254
    public void read(TProtocol iprot) throws TException {
3255
      TField field;
3256
      iprot.readStructBegin();
3257
      while (true)
3258
      {
3259
        field = iprot.readFieldBegin();
3260
        if (field.type == TType.STOP) { 
3261
          break;
3262
        }
3263
        _Fields fieldId = _Fields.findByThriftId(field.id);
3264
        if (fieldId == null) {
3265
          TProtocolUtil.skip(iprot, field.type);
3266
        } else {
3267
          switch (fieldId) {
3268
            case SUCCESS:
3269
              if (field.type == TType.I64) {
3270
                this.success = iprot.readI64();
3271
                setSuccessIsSet(true);
3272
              } else { 
3273
                TProtocolUtil.skip(iprot, field.type);
3274
              }
3275
              break;
3276
            case WEX:
3277
              if (field.type == TType.STRUCT) {
3278
                this.wex = new WarehouseServiceException();
3279
                this.wex.read(iprot);
3280
              } else { 
3281
                TProtocolUtil.skip(iprot, field.type);
3282
              }
3283
              break;
3284
          }
3285
          iprot.readFieldEnd();
3286
        }
3287
      }
3288
      iprot.readStructEnd();
3289
      validate();
3290
    }
3291
 
3292
    public void write(TProtocol oprot) throws TException {
3293
      oprot.writeStructBegin(STRUCT_DESC);
3294
 
3295
      if (this.isSetSuccess()) {
3296
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3297
        oprot.writeI64(this.success);
3298
        oprot.writeFieldEnd();
3299
      } else if (this.isSetWex()) {
3300
        oprot.writeFieldBegin(WEX_FIELD_DESC);
3301
        this.wex.write(oprot);
3302
        oprot.writeFieldEnd();
3303
      }
3304
      oprot.writeFieldStop();
3305
      oprot.writeStructEnd();
3306
    }
3307
 
3308
    @Override
3309
    public String toString() {
3310
      StringBuilder sb = new StringBuilder("startPurchase_result(");
3311
      boolean first = true;
3312
 
3313
      sb.append("success:");
3314
      sb.append(this.success);
3315
      first = false;
3316
      if (!first) sb.append(", ");
3317
      sb.append("wex:");
3318
      if (this.wex == null) {
3319
        sb.append("null");
3320
      } else {
3321
        sb.append(this.wex);
3322
      }
3323
      first = false;
3324
      sb.append(")");
3325
      return sb.toString();
3326
    }
3327
 
3328
    public void validate() throws TException {
3329
      // check for required fields
3330
    }
3331
 
3332
  }
3333
 
3334
  public static class closePurchase_args implements TBase<closePurchase_args._Fields>, java.io.Serializable, Cloneable, Comparable<closePurchase_args>   {
3335
    private static final TStruct STRUCT_DESC = new TStruct("closePurchase_args");
3336
 
3337
    private static final TField PURCHASE_ID_FIELD_DESC = new TField("purchaseId", TType.I64, (short)1);
3338
 
3339
    private long purchaseId;
3340
 
3341
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3342
    public enum _Fields implements TFieldIdEnum {
3343
      PURCHASE_ID((short)1, "purchaseId");
3344
 
3345
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3346
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3347
 
3348
      static {
3349
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3350
          byId.put((int)field._thriftId, field);
3351
          byName.put(field.getFieldName(), field);
3352
        }
3353
      }
3354
 
3355
      /**
3356
       * Find the _Fields constant that matches fieldId, or null if its not found.
3357
       */
3358
      public static _Fields findByThriftId(int fieldId) {
3359
        return byId.get(fieldId);
3360
      }
3361
 
3362
      /**
3363
       * Find the _Fields constant that matches fieldId, throwing an exception
3364
       * if it is not found.
3365
       */
3366
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3367
        _Fields fields = findByThriftId(fieldId);
3368
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3369
        return fields;
3370
      }
3371
 
3372
      /**
3373
       * Find the _Fields constant that matches name, or null if its not found.
3374
       */
3375
      public static _Fields findByName(String name) {
3376
        return byName.get(name);
3377
      }
3378
 
3379
      private final short _thriftId;
3380
      private final String _fieldName;
3381
 
3382
      _Fields(short thriftId, String fieldName) {
3383
        _thriftId = thriftId;
3384
        _fieldName = fieldName;
3385
      }
3386
 
3387
      public short getThriftFieldId() {
3388
        return _thriftId;
3389
      }
3390
 
3391
      public String getFieldName() {
3392
        return _fieldName;
3393
      }
3394
    }
3395
 
3396
    // isset id assignments
3397
    private static final int __PURCHASEID_ISSET_ID = 0;
3398
    private BitSet __isset_bit_vector = new BitSet(1);
3399
 
3400
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3401
      put(_Fields.PURCHASE_ID, new FieldMetaData("purchaseId", TFieldRequirementType.DEFAULT, 
3402
          new FieldValueMetaData(TType.I64)));
3403
    }});
3404
 
3405
    static {
3406
      FieldMetaData.addStructMetaDataMap(closePurchase_args.class, metaDataMap);
3407
    }
3408
 
3409
    public closePurchase_args() {
3410
    }
3411
 
3412
    public closePurchase_args(
3413
      long purchaseId)
3414
    {
3415
      this();
3416
      this.purchaseId = purchaseId;
3417
      setPurchaseIdIsSet(true);
3418
    }
3419
 
3420
    /**
3421
     * Performs a deep copy on <i>other</i>.
3422
     */
3423
    public closePurchase_args(closePurchase_args other) {
3424
      __isset_bit_vector.clear();
3425
      __isset_bit_vector.or(other.__isset_bit_vector);
3426
      this.purchaseId = other.purchaseId;
3427
    }
3428
 
3429
    public closePurchase_args deepCopy() {
3430
      return new closePurchase_args(this);
3431
    }
3432
 
3433
    @Deprecated
3434
    public closePurchase_args clone() {
3435
      return new closePurchase_args(this);
3436
    }
3437
 
3438
    public long getPurchaseId() {
3439
      return this.purchaseId;
3440
    }
3441
 
3442
    public closePurchase_args setPurchaseId(long purchaseId) {
3443
      this.purchaseId = purchaseId;
3444
      setPurchaseIdIsSet(true);
3445
      return this;
3446
    }
3447
 
3448
    public void unsetPurchaseId() {
3449
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
3450
    }
3451
 
3452
    /** Returns true if field purchaseId is set (has been asigned a value) and false otherwise */
3453
    public boolean isSetPurchaseId() {
3454
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
3455
    }
3456
 
3457
    public void setPurchaseIdIsSet(boolean value) {
3458
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
3459
    }
3460
 
3461
    public void setFieldValue(_Fields field, Object value) {
3462
      switch (field) {
3463
      case PURCHASE_ID:
3464
        if (value == null) {
3465
          unsetPurchaseId();
3466
        } else {
3467
          setPurchaseId((Long)value);
3468
        }
3469
        break;
3470
 
3471
      }
3472
    }
3473
 
3474
    public void setFieldValue(int fieldID, Object value) {
3475
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3476
    }
3477
 
3478
    public Object getFieldValue(_Fields field) {
3479
      switch (field) {
3480
      case PURCHASE_ID:
3481
        return new Long(getPurchaseId());
3482
 
3483
      }
3484
      throw new IllegalStateException();
3485
    }
3486
 
3487
    public Object getFieldValue(int fieldId) {
3488
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3489
    }
3490
 
3491
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3492
    public boolean isSet(_Fields field) {
3493
      switch (field) {
3494
      case PURCHASE_ID:
3495
        return isSetPurchaseId();
3496
      }
3497
      throw new IllegalStateException();
3498
    }
3499
 
3500
    public boolean isSet(int fieldID) {
3501
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3502
    }
3503
 
3504
    @Override
3505
    public boolean equals(Object that) {
3506
      if (that == null)
3507
        return false;
3508
      if (that instanceof closePurchase_args)
3509
        return this.equals((closePurchase_args)that);
3510
      return false;
3511
    }
3512
 
3513
    public boolean equals(closePurchase_args that) {
3514
      if (that == null)
3515
        return false;
3516
 
3517
      boolean this_present_purchaseId = true;
3518
      boolean that_present_purchaseId = true;
3519
      if (this_present_purchaseId || that_present_purchaseId) {
3520
        if (!(this_present_purchaseId && that_present_purchaseId))
3521
          return false;
3522
        if (this.purchaseId != that.purchaseId)
3523
          return false;
3524
      }
3525
 
3526
      return true;
3527
    }
3528
 
3529
    @Override
3530
    public int hashCode() {
3531
      return 0;
3532
    }
3533
 
3534
    public int compareTo(closePurchase_args other) {
3535
      if (!getClass().equals(other.getClass())) {
3536
        return getClass().getName().compareTo(other.getClass().getName());
3537
      }
3538
 
3539
      int lastComparison = 0;
3540
      closePurchase_args typedOther = (closePurchase_args)other;
3541
 
3542
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(isSetPurchaseId());
3543
      if (lastComparison != 0) {
3544
        return lastComparison;
3545
      }
3546
      lastComparison = TBaseHelper.compareTo(purchaseId, typedOther.purchaseId);
3547
      if (lastComparison != 0) {
3548
        return lastComparison;
3549
      }
3550
      return 0;
3551
    }
3552
 
3553
    public void read(TProtocol iprot) throws TException {
3554
      TField field;
3555
      iprot.readStructBegin();
3556
      while (true)
3557
      {
3558
        field = iprot.readFieldBegin();
3559
        if (field.type == TType.STOP) { 
3560
          break;
3561
        }
3562
        _Fields fieldId = _Fields.findByThriftId(field.id);
3563
        if (fieldId == null) {
3564
          TProtocolUtil.skip(iprot, field.type);
3565
        } else {
3566
          switch (fieldId) {
3567
            case PURCHASE_ID:
3568
              if (field.type == TType.I64) {
3569
                this.purchaseId = iprot.readI64();
3570
                setPurchaseIdIsSet(true);
3571
              } else { 
3572
                TProtocolUtil.skip(iprot, field.type);
3573
              }
3574
              break;
3575
          }
3576
          iprot.readFieldEnd();
3577
        }
3578
      }
3579
      iprot.readStructEnd();
3580
      validate();
3581
    }
3582
 
3583
    public void write(TProtocol oprot) throws TException {
3584
      validate();
3585
 
3586
      oprot.writeStructBegin(STRUCT_DESC);
3587
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
3588
      oprot.writeI64(this.purchaseId);
3589
      oprot.writeFieldEnd();
3590
      oprot.writeFieldStop();
3591
      oprot.writeStructEnd();
3592
    }
3593
 
3594
    @Override
3595
    public String toString() {
3596
      StringBuilder sb = new StringBuilder("closePurchase_args(");
3597
      boolean first = true;
3598
 
3599
      sb.append("purchaseId:");
3600
      sb.append(this.purchaseId);
3601
      first = false;
3602
      sb.append(")");
3603
      return sb.toString();
3604
    }
3605
 
3606
    public void validate() throws TException {
3607
      // check for required fields
3608
    }
3609
 
3610
  }
3611
 
3612
  public static class closePurchase_result implements TBase<closePurchase_result._Fields>, java.io.Serializable, Cloneable, Comparable<closePurchase_result>   {
3613
    private static final TStruct STRUCT_DESC = new TStruct("closePurchase_result");
3614
 
3615
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
3616
    private static final TField WEX_FIELD_DESC = new TField("wex", TType.STRUCT, (short)1);
3617
 
3618
    private long success;
3619
    private WarehouseServiceException wex;
3620
 
3621
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3622
    public enum _Fields implements TFieldIdEnum {
3623
      SUCCESS((short)0, "success"),
3624
      WEX((short)1, "wex");
3625
 
3626
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3627
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3628
 
3629
      static {
3630
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3631
          byId.put((int)field._thriftId, field);
3632
          byName.put(field.getFieldName(), field);
3633
        }
3634
      }
3635
 
3636
      /**
3637
       * Find the _Fields constant that matches fieldId, or null if its not found.
3638
       */
3639
      public static _Fields findByThriftId(int fieldId) {
3640
        return byId.get(fieldId);
3641
      }
3642
 
3643
      /**
3644
       * Find the _Fields constant that matches fieldId, throwing an exception
3645
       * if it is not found.
3646
       */
3647
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3648
        _Fields fields = findByThriftId(fieldId);
3649
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3650
        return fields;
3651
      }
3652
 
3653
      /**
3654
       * Find the _Fields constant that matches name, or null if its not found.
3655
       */
3656
      public static _Fields findByName(String name) {
3657
        return byName.get(name);
3658
      }
3659
 
3660
      private final short _thriftId;
3661
      private final String _fieldName;
3662
 
3663
      _Fields(short thriftId, String fieldName) {
3664
        _thriftId = thriftId;
3665
        _fieldName = fieldName;
3666
      }
3667
 
3668
      public short getThriftFieldId() {
3669
        return _thriftId;
3670
      }
3671
 
3672
      public String getFieldName() {
3673
        return _fieldName;
3674
      }
3675
    }
3676
 
3677
    // isset id assignments
3678
    private static final int __SUCCESS_ISSET_ID = 0;
3679
    private BitSet __isset_bit_vector = new BitSet(1);
3680
 
3681
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3682
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3683
          new FieldValueMetaData(TType.I64)));
3684
      put(_Fields.WEX, new FieldMetaData("wex", TFieldRequirementType.DEFAULT, 
3685
          new FieldValueMetaData(TType.STRUCT)));
3686
    }});
3687
 
3688
    static {
3689
      FieldMetaData.addStructMetaDataMap(closePurchase_result.class, metaDataMap);
3690
    }
3691
 
3692
    public closePurchase_result() {
3693
    }
3694
 
3695
    public closePurchase_result(
3696
      long success,
3697
      WarehouseServiceException wex)
3698
    {
3699
      this();
3700
      this.success = success;
3701
      setSuccessIsSet(true);
3702
      this.wex = wex;
3703
    }
3704
 
3705
    /**
3706
     * Performs a deep copy on <i>other</i>.
3707
     */
3708
    public closePurchase_result(closePurchase_result other) {
3709
      __isset_bit_vector.clear();
3710
      __isset_bit_vector.or(other.__isset_bit_vector);
3711
      this.success = other.success;
3712
      if (other.isSetWex()) {
3713
        this.wex = new WarehouseServiceException(other.wex);
3714
      }
3715
    }
3716
 
3717
    public closePurchase_result deepCopy() {
3718
      return new closePurchase_result(this);
3719
    }
3720
 
3721
    @Deprecated
3722
    public closePurchase_result clone() {
3723
      return new closePurchase_result(this);
3724
    }
3725
 
3726
    public long getSuccess() {
3727
      return this.success;
3728
    }
3729
 
3730
    public closePurchase_result setSuccess(long success) {
3731
      this.success = success;
3732
      setSuccessIsSet(true);
3733
      return this;
3734
    }
3735
 
3736
    public void unsetSuccess() {
3737
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3738
    }
3739
 
3740
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3741
    public boolean isSetSuccess() {
3742
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3743
    }
3744
 
3745
    public void setSuccessIsSet(boolean value) {
3746
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3747
    }
3748
 
3749
    public WarehouseServiceException getWex() {
3750
      return this.wex;
3751
    }
3752
 
3753
    public closePurchase_result setWex(WarehouseServiceException wex) {
3754
      this.wex = wex;
3755
      return this;
3756
    }
3757
 
3758
    public void unsetWex() {
3759
      this.wex = null;
3760
    }
3761
 
3762
    /** Returns true if field wex is set (has been asigned a value) and false otherwise */
3763
    public boolean isSetWex() {
3764
      return this.wex != null;
3765
    }
3766
 
3767
    public void setWexIsSet(boolean value) {
3768
      if (!value) {
3769
        this.wex = null;
3770
      }
3771
    }
3772
 
3773
    public void setFieldValue(_Fields field, Object value) {
3774
      switch (field) {
3775
      case SUCCESS:
3776
        if (value == null) {
3777
          unsetSuccess();
3778
        } else {
3779
          setSuccess((Long)value);
3780
        }
3781
        break;
3782
 
3783
      case WEX:
3784
        if (value == null) {
3785
          unsetWex();
3786
        } else {
3787
          setWex((WarehouseServiceException)value);
3788
        }
3789
        break;
3790
 
3791
      }
3792
    }
3793
 
3794
    public void setFieldValue(int fieldID, Object value) {
3795
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3796
    }
3797
 
3798
    public Object getFieldValue(_Fields field) {
3799
      switch (field) {
3800
      case SUCCESS:
3801
        return new Long(getSuccess());
3802
 
3803
      case WEX:
3804
        return getWex();
3805
 
3806
      }
3807
      throw new IllegalStateException();
3808
    }
3809
 
3810
    public Object getFieldValue(int fieldId) {
3811
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3812
    }
3813
 
3814
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3815
    public boolean isSet(_Fields field) {
3816
      switch (field) {
3817
      case SUCCESS:
3818
        return isSetSuccess();
3819
      case WEX:
3820
        return isSetWex();
3821
      }
3822
      throw new IllegalStateException();
3823
    }
3824
 
3825
    public boolean isSet(int fieldID) {
3826
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3827
    }
3828
 
3829
    @Override
3830
    public boolean equals(Object that) {
3831
      if (that == null)
3832
        return false;
3833
      if (that instanceof closePurchase_result)
3834
        return this.equals((closePurchase_result)that);
3835
      return false;
3836
    }
3837
 
3838
    public boolean equals(closePurchase_result that) {
3839
      if (that == null)
3840
        return false;
3841
 
3842
      boolean this_present_success = true;
3843
      boolean that_present_success = true;
3844
      if (this_present_success || that_present_success) {
3845
        if (!(this_present_success && that_present_success))
3846
          return false;
3847
        if (this.success != that.success)
3848
          return false;
3849
      }
3850
 
3851
      boolean this_present_wex = true && this.isSetWex();
3852
      boolean that_present_wex = true && that.isSetWex();
3853
      if (this_present_wex || that_present_wex) {
3854
        if (!(this_present_wex && that_present_wex))
3855
          return false;
3856
        if (!this.wex.equals(that.wex))
3857
          return false;
3858
      }
3859
 
3860
      return true;
3861
    }
3862
 
3863
    @Override
3864
    public int hashCode() {
3865
      return 0;
3866
    }
3867
 
3868
    public int compareTo(closePurchase_result other) {
3869
      if (!getClass().equals(other.getClass())) {
3870
        return getClass().getName().compareTo(other.getClass().getName());
3871
      }
3872
 
3873
      int lastComparison = 0;
3874
      closePurchase_result typedOther = (closePurchase_result)other;
3875
 
3876
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3877
      if (lastComparison != 0) {
3878
        return lastComparison;
3879
      }
3880
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3881
      if (lastComparison != 0) {
3882
        return lastComparison;
3883
      }
3884
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(isSetWex());
3885
      if (lastComparison != 0) {
3886
        return lastComparison;
3887
      }
3888
      lastComparison = TBaseHelper.compareTo(wex, typedOther.wex);
3889
      if (lastComparison != 0) {
3890
        return lastComparison;
3891
      }
3892
      return 0;
3893
    }
3894
 
3895
    public void read(TProtocol iprot) throws TException {
3896
      TField field;
3897
      iprot.readStructBegin();
3898
      while (true)
3899
      {
3900
        field = iprot.readFieldBegin();
3901
        if (field.type == TType.STOP) { 
3902
          break;
3903
        }
3904
        _Fields fieldId = _Fields.findByThriftId(field.id);
3905
        if (fieldId == null) {
3906
          TProtocolUtil.skip(iprot, field.type);
3907
        } else {
3908
          switch (fieldId) {
3909
            case SUCCESS:
3910
              if (field.type == TType.I64) {
3911
                this.success = iprot.readI64();
3912
                setSuccessIsSet(true);
3913
              } else { 
3914
                TProtocolUtil.skip(iprot, field.type);
3915
              }
3916
              break;
3917
            case WEX:
3918
              if (field.type == TType.STRUCT) {
3919
                this.wex = new WarehouseServiceException();
3920
                this.wex.read(iprot);
3921
              } else { 
3922
                TProtocolUtil.skip(iprot, field.type);
3923
              }
3924
              break;
3925
          }
3926
          iprot.readFieldEnd();
3927
        }
3928
      }
3929
      iprot.readStructEnd();
3930
      validate();
3931
    }
3932
 
3933
    public void write(TProtocol oprot) throws TException {
3934
      oprot.writeStructBegin(STRUCT_DESC);
3935
 
3936
      if (this.isSetSuccess()) {
3937
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3938
        oprot.writeI64(this.success);
3939
        oprot.writeFieldEnd();
3940
      } else if (this.isSetWex()) {
3941
        oprot.writeFieldBegin(WEX_FIELD_DESC);
3942
        this.wex.write(oprot);
3943
        oprot.writeFieldEnd();
3944
      }
3945
      oprot.writeFieldStop();
3946
      oprot.writeStructEnd();
3947
    }
3948
 
3949
    @Override
3950
    public String toString() {
3951
      StringBuilder sb = new StringBuilder("closePurchase_result(");
3952
      boolean first = true;
3953
 
3954
      sb.append("success:");
3955
      sb.append(this.success);
3956
      first = false;
3957
      if (!first) sb.append(", ");
3958
      sb.append("wex:");
3959
      if (this.wex == null) {
3960
        sb.append("null");
3961
      } else {
3962
        sb.append(this.wex);
3963
      }
3964
      first = false;
3965
      sb.append(")");
3966
      return sb.toString();
3967
    }
3968
 
3969
    public void validate() throws TException {
3970
      // check for required fields
3971
    }
3972
 
3973
  }
3974
 
3975
  public static class scanIn_args implements TBase<scanIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<scanIn_args>   {
3976
    private static final TStruct STRUCT_DESC = new TStruct("scanIn_args");
3977
 
3978
    private static final TField PURCHASE_ID_FIELD_DESC = new TField("purchaseId", TType.I64, (short)1);
3979
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
3980
    private static final TField ITEM_NUMBER_FIELD_DESC = new TField("itemNumber", TType.STRING, (short)3);
3981
    private static final TField IMEI_NUMBER_FIELD_DESC = new TField("imeiNumber", TType.STRING, (short)4);
3982
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)5);
3983
 
3984
    private long purchaseId;
3985
    private long itemId;
3986
    private String itemNumber;
3987
    private String imeiNumber;
3988
    private ScanType type;
3989
 
3990
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3991
    public enum _Fields implements TFieldIdEnum {
3992
      PURCHASE_ID((short)1, "purchaseId"),
3993
      ITEM_ID((short)2, "itemId"),
3994
      ITEM_NUMBER((short)3, "itemNumber"),
3995
      IMEI_NUMBER((short)4, "imeiNumber"),
3996
      /**
3997
       * 
3998
       * @see ScanType
3999
       */
4000
      TYPE((short)5, "type");
4001
 
4002
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4003
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4004
 
4005
      static {
4006
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4007
          byId.put((int)field._thriftId, field);
4008
          byName.put(field.getFieldName(), field);
4009
        }
4010
      }
4011
 
4012
      /**
4013
       * Find the _Fields constant that matches fieldId, or null if its not found.
4014
       */
4015
      public static _Fields findByThriftId(int fieldId) {
4016
        return byId.get(fieldId);
4017
      }
4018
 
4019
      /**
4020
       * Find the _Fields constant that matches fieldId, throwing an exception
4021
       * if it is not found.
4022
       */
4023
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4024
        _Fields fields = findByThriftId(fieldId);
4025
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4026
        return fields;
4027
      }
4028
 
4029
      /**
4030
       * Find the _Fields constant that matches name, or null if its not found.
4031
       */
4032
      public static _Fields findByName(String name) {
4033
        return byName.get(name);
4034
      }
4035
 
4036
      private final short _thriftId;
4037
      private final String _fieldName;
4038
 
4039
      _Fields(short thriftId, String fieldName) {
4040
        _thriftId = thriftId;
4041
        _fieldName = fieldName;
4042
      }
4043
 
4044
      public short getThriftFieldId() {
4045
        return _thriftId;
4046
      }
4047
 
4048
      public String getFieldName() {
4049
        return _fieldName;
4050
      }
4051
    }
4052
 
4053
    // isset id assignments
4054
    private static final int __PURCHASEID_ISSET_ID = 0;
4055
    private static final int __ITEMID_ISSET_ID = 1;
4056
    private BitSet __isset_bit_vector = new BitSet(2);
4057
 
4058
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4059
      put(_Fields.PURCHASE_ID, new FieldMetaData("purchaseId", TFieldRequirementType.DEFAULT, 
4060
          new FieldValueMetaData(TType.I64)));
4061
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
4062
          new FieldValueMetaData(TType.I64)));
4063
      put(_Fields.ITEM_NUMBER, new FieldMetaData("itemNumber", TFieldRequirementType.DEFAULT, 
4064
          new FieldValueMetaData(TType.STRING)));
4065
      put(_Fields.IMEI_NUMBER, new FieldMetaData("imeiNumber", TFieldRequirementType.DEFAULT, 
4066
          new FieldValueMetaData(TType.STRING)));
4067
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
4068
          new EnumMetaData(TType.ENUM, ScanType.class)));
4069
    }});
4070
 
4071
    static {
4072
      FieldMetaData.addStructMetaDataMap(scanIn_args.class, metaDataMap);
4073
    }
4074
 
4075
    public scanIn_args() {
4076
    }
4077
 
4078
    public scanIn_args(
4079
      long purchaseId,
4080
      long itemId,
4081
      String itemNumber,
4082
      String imeiNumber,
4083
      ScanType type)
4084
    {
4085
      this();
4086
      this.purchaseId = purchaseId;
4087
      setPurchaseIdIsSet(true);
4088
      this.itemId = itemId;
4089
      setItemIdIsSet(true);
4090
      this.itemNumber = itemNumber;
4091
      this.imeiNumber = imeiNumber;
4092
      this.type = type;
4093
    }
4094
 
4095
    /**
4096
     * Performs a deep copy on <i>other</i>.
4097
     */
4098
    public scanIn_args(scanIn_args other) {
4099
      __isset_bit_vector.clear();
4100
      __isset_bit_vector.or(other.__isset_bit_vector);
4101
      this.purchaseId = other.purchaseId;
4102
      this.itemId = other.itemId;
4103
      if (other.isSetItemNumber()) {
4104
        this.itemNumber = other.itemNumber;
4105
      }
4106
      if (other.isSetImeiNumber()) {
4107
        this.imeiNumber = other.imeiNumber;
4108
      }
4109
      if (other.isSetType()) {
4110
        this.type = other.type;
4111
      }
4112
    }
4113
 
4114
    public scanIn_args deepCopy() {
4115
      return new scanIn_args(this);
4116
    }
4117
 
4118
    @Deprecated
4119
    public scanIn_args clone() {
4120
      return new scanIn_args(this);
4121
    }
4122
 
4123
    public long getPurchaseId() {
4124
      return this.purchaseId;
4125
    }
4126
 
4127
    public scanIn_args setPurchaseId(long purchaseId) {
4128
      this.purchaseId = purchaseId;
4129
      setPurchaseIdIsSet(true);
4130
      return this;
4131
    }
4132
 
4133
    public void unsetPurchaseId() {
4134
      __isset_bit_vector.clear(__PURCHASEID_ISSET_ID);
4135
    }
4136
 
4137
    /** Returns true if field purchaseId is set (has been asigned a value) and false otherwise */
4138
    public boolean isSetPurchaseId() {
4139
      return __isset_bit_vector.get(__PURCHASEID_ISSET_ID);
4140
    }
4141
 
4142
    public void setPurchaseIdIsSet(boolean value) {
4143
      __isset_bit_vector.set(__PURCHASEID_ISSET_ID, value);
4144
    }
4145
 
4146
    public long getItemId() {
4147
      return this.itemId;
4148
    }
4149
 
4150
    public scanIn_args setItemId(long itemId) {
4151
      this.itemId = itemId;
4152
      setItemIdIsSet(true);
4153
      return this;
4154
    }
4155
 
4156
    public void unsetItemId() {
4157
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
4158
    }
4159
 
4160
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
4161
    public boolean isSetItemId() {
4162
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
4163
    }
4164
 
4165
    public void setItemIdIsSet(boolean value) {
4166
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
4167
    }
4168
 
4169
    public String getItemNumber() {
4170
      return this.itemNumber;
4171
    }
4172
 
4173
    public scanIn_args setItemNumber(String itemNumber) {
4174
      this.itemNumber = itemNumber;
4175
      return this;
4176
    }
4177
 
4178
    public void unsetItemNumber() {
4179
      this.itemNumber = null;
4180
    }
4181
 
4182
    /** Returns true if field itemNumber is set (has been asigned a value) and false otherwise */
4183
    public boolean isSetItemNumber() {
4184
      return this.itemNumber != null;
4185
    }
4186
 
4187
    public void setItemNumberIsSet(boolean value) {
4188
      if (!value) {
4189
        this.itemNumber = null;
4190
      }
4191
    }
4192
 
4193
    public String getImeiNumber() {
4194
      return this.imeiNumber;
4195
    }
4196
 
4197
    public scanIn_args setImeiNumber(String imeiNumber) {
4198
      this.imeiNumber = imeiNumber;
4199
      return this;
4200
    }
4201
 
4202
    public void unsetImeiNumber() {
4203
      this.imeiNumber = null;
4204
    }
4205
 
4206
    /** Returns true if field imeiNumber is set (has been asigned a value) and false otherwise */
4207
    public boolean isSetImeiNumber() {
4208
      return this.imeiNumber != null;
4209
    }
4210
 
4211
    public void setImeiNumberIsSet(boolean value) {
4212
      if (!value) {
4213
        this.imeiNumber = null;
4214
      }
4215
    }
4216
 
4217
    /**
4218
     * 
4219
     * @see ScanType
4220
     */
4221
    public ScanType getType() {
4222
      return this.type;
4223
    }
4224
 
4225
    /**
4226
     * 
4227
     * @see ScanType
4228
     */
4229
    public scanIn_args setType(ScanType type) {
4230
      this.type = type;
4231
      return this;
4232
    }
4233
 
4234
    public void unsetType() {
4235
      this.type = null;
4236
    }
4237
 
4238
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
4239
    public boolean isSetType() {
4240
      return this.type != null;
4241
    }
4242
 
4243
    public void setTypeIsSet(boolean value) {
4244
      if (!value) {
4245
        this.type = null;
4246
      }
4247
    }
4248
 
4249
    public void setFieldValue(_Fields field, Object value) {
4250
      switch (field) {
4251
      case PURCHASE_ID:
4252
        if (value == null) {
4253
          unsetPurchaseId();
4254
        } else {
4255
          setPurchaseId((Long)value);
4256
        }
4257
        break;
4258
 
4259
      case ITEM_ID:
4260
        if (value == null) {
4261
          unsetItemId();
4262
        } else {
4263
          setItemId((Long)value);
4264
        }
4265
        break;
4266
 
4267
      case ITEM_NUMBER:
4268
        if (value == null) {
4269
          unsetItemNumber();
4270
        } else {
4271
          setItemNumber((String)value);
4272
        }
4273
        break;
4274
 
4275
      case IMEI_NUMBER:
4276
        if (value == null) {
4277
          unsetImeiNumber();
4278
        } else {
4279
          setImeiNumber((String)value);
4280
        }
4281
        break;
4282
 
4283
      case TYPE:
4284
        if (value == null) {
4285
          unsetType();
4286
        } else {
4287
          setType((ScanType)value);
4288
        }
4289
        break;
4290
 
4291
      }
4292
    }
4293
 
4294
    public void setFieldValue(int fieldID, Object value) {
4295
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4296
    }
4297
 
4298
    public Object getFieldValue(_Fields field) {
4299
      switch (field) {
4300
      case PURCHASE_ID:
4301
        return new Long(getPurchaseId());
4302
 
4303
      case ITEM_ID:
4304
        return new Long(getItemId());
4305
 
4306
      case ITEM_NUMBER:
4307
        return getItemNumber();
4308
 
4309
      case IMEI_NUMBER:
4310
        return getImeiNumber();
4311
 
4312
      case TYPE:
4313
        return getType();
4314
 
4315
      }
4316
      throw new IllegalStateException();
4317
    }
4318
 
4319
    public Object getFieldValue(int fieldId) {
4320
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4321
    }
4322
 
4323
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4324
    public boolean isSet(_Fields field) {
4325
      switch (field) {
4326
      case PURCHASE_ID:
4327
        return isSetPurchaseId();
4328
      case ITEM_ID:
4329
        return isSetItemId();
4330
      case ITEM_NUMBER:
4331
        return isSetItemNumber();
4332
      case IMEI_NUMBER:
4333
        return isSetImeiNumber();
4334
      case TYPE:
4335
        return isSetType();
4336
      }
4337
      throw new IllegalStateException();
4338
    }
4339
 
4340
    public boolean isSet(int fieldID) {
4341
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4342
    }
4343
 
4344
    @Override
4345
    public boolean equals(Object that) {
4346
      if (that == null)
4347
        return false;
4348
      if (that instanceof scanIn_args)
4349
        return this.equals((scanIn_args)that);
4350
      return false;
4351
    }
4352
 
4353
    public boolean equals(scanIn_args that) {
4354
      if (that == null)
4355
        return false;
4356
 
4357
      boolean this_present_purchaseId = true;
4358
      boolean that_present_purchaseId = true;
4359
      if (this_present_purchaseId || that_present_purchaseId) {
4360
        if (!(this_present_purchaseId && that_present_purchaseId))
4361
          return false;
4362
        if (this.purchaseId != that.purchaseId)
4363
          return false;
4364
      }
4365
 
4366
      boolean this_present_itemId = true;
4367
      boolean that_present_itemId = true;
4368
      if (this_present_itemId || that_present_itemId) {
4369
        if (!(this_present_itemId && that_present_itemId))
4370
          return false;
4371
        if (this.itemId != that.itemId)
4372
          return false;
4373
      }
4374
 
4375
      boolean this_present_itemNumber = true && this.isSetItemNumber();
4376
      boolean that_present_itemNumber = true && that.isSetItemNumber();
4377
      if (this_present_itemNumber || that_present_itemNumber) {
4378
        if (!(this_present_itemNumber && that_present_itemNumber))
4379
          return false;
4380
        if (!this.itemNumber.equals(that.itemNumber))
4381
          return false;
4382
      }
4383
 
4384
      boolean this_present_imeiNumber = true && this.isSetImeiNumber();
4385
      boolean that_present_imeiNumber = true && that.isSetImeiNumber();
4386
      if (this_present_imeiNumber || that_present_imeiNumber) {
4387
        if (!(this_present_imeiNumber && that_present_imeiNumber))
4388
          return false;
4389
        if (!this.imeiNumber.equals(that.imeiNumber))
4390
          return false;
4391
      }
4392
 
4393
      boolean this_present_type = true && this.isSetType();
4394
      boolean that_present_type = true && that.isSetType();
4395
      if (this_present_type || that_present_type) {
4396
        if (!(this_present_type && that_present_type))
4397
          return false;
4398
        if (!this.type.equals(that.type))
4399
          return false;
4400
      }
4401
 
4402
      return true;
4403
    }
4404
 
4405
    @Override
4406
    public int hashCode() {
4407
      return 0;
4408
    }
4409
 
4410
    public int compareTo(scanIn_args other) {
4411
      if (!getClass().equals(other.getClass())) {
4412
        return getClass().getName().compareTo(other.getClass().getName());
4413
      }
4414
 
4415
      int lastComparison = 0;
4416
      scanIn_args typedOther = (scanIn_args)other;
4417
 
4418
      lastComparison = Boolean.valueOf(isSetPurchaseId()).compareTo(isSetPurchaseId());
4419
      if (lastComparison != 0) {
4420
        return lastComparison;
4421
      }
4422
      lastComparison = TBaseHelper.compareTo(purchaseId, typedOther.purchaseId);
4423
      if (lastComparison != 0) {
4424
        return lastComparison;
4425
      }
4426
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
4427
      if (lastComparison != 0) {
4428
        return lastComparison;
4429
      }
4430
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
4431
      if (lastComparison != 0) {
4432
        return lastComparison;
4433
      }
4434
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(isSetItemNumber());
4435
      if (lastComparison != 0) {
4436
        return lastComparison;
4437
      }
4438
      lastComparison = TBaseHelper.compareTo(itemNumber, typedOther.itemNumber);
4439
      if (lastComparison != 0) {
4440
        return lastComparison;
4441
      }
4442
      lastComparison = Boolean.valueOf(isSetImeiNumber()).compareTo(isSetImeiNumber());
4443
      if (lastComparison != 0) {
4444
        return lastComparison;
4445
      }
4446
      lastComparison = TBaseHelper.compareTo(imeiNumber, typedOther.imeiNumber);
4447
      if (lastComparison != 0) {
4448
        return lastComparison;
4449
      }
4450
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
4451
      if (lastComparison != 0) {
4452
        return lastComparison;
4453
      }
4454
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
4455
      if (lastComparison != 0) {
4456
        return lastComparison;
4457
      }
4458
      return 0;
4459
    }
4460
 
4461
    public void read(TProtocol iprot) throws TException {
4462
      TField field;
4463
      iprot.readStructBegin();
4464
      while (true)
4465
      {
4466
        field = iprot.readFieldBegin();
4467
        if (field.type == TType.STOP) { 
4468
          break;
4469
        }
4470
        _Fields fieldId = _Fields.findByThriftId(field.id);
4471
        if (fieldId == null) {
4472
          TProtocolUtil.skip(iprot, field.type);
4473
        } else {
4474
          switch (fieldId) {
4475
            case PURCHASE_ID:
4476
              if (field.type == TType.I64) {
4477
                this.purchaseId = iprot.readI64();
4478
                setPurchaseIdIsSet(true);
4479
              } else { 
4480
                TProtocolUtil.skip(iprot, field.type);
4481
              }
4482
              break;
4483
            case ITEM_ID:
4484
              if (field.type == TType.I64) {
4485
                this.itemId = iprot.readI64();
4486
                setItemIdIsSet(true);
4487
              } else { 
4488
                TProtocolUtil.skip(iprot, field.type);
4489
              }
4490
              break;
4491
            case ITEM_NUMBER:
4492
              if (field.type == TType.STRING) {
4493
                this.itemNumber = iprot.readString();
4494
              } else { 
4495
                TProtocolUtil.skip(iprot, field.type);
4496
              }
4497
              break;
4498
            case IMEI_NUMBER:
4499
              if (field.type == TType.STRING) {
4500
                this.imeiNumber = iprot.readString();
4501
              } else { 
4502
                TProtocolUtil.skip(iprot, field.type);
4503
              }
4504
              break;
4505
            case TYPE:
4506
              if (field.type == TType.I32) {
4507
                this.type = ScanType.findByValue(iprot.readI32());
4508
              } else { 
4509
                TProtocolUtil.skip(iprot, field.type);
4510
              }
4511
              break;
4512
          }
4513
          iprot.readFieldEnd();
4514
        }
4515
      }
4516
      iprot.readStructEnd();
4517
      validate();
4518
    }
4519
 
4520
    public void write(TProtocol oprot) throws TException {
4521
      validate();
4522
 
4523
      oprot.writeStructBegin(STRUCT_DESC);
4524
      oprot.writeFieldBegin(PURCHASE_ID_FIELD_DESC);
4525
      oprot.writeI64(this.purchaseId);
4526
      oprot.writeFieldEnd();
4527
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
4528
      oprot.writeI64(this.itemId);
4529
      oprot.writeFieldEnd();
4530
      if (this.itemNumber != null) {
4531
        oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
4532
        oprot.writeString(this.itemNumber);
4533
        oprot.writeFieldEnd();
4534
      }
4535
      if (this.imeiNumber != null) {
4536
        oprot.writeFieldBegin(IMEI_NUMBER_FIELD_DESC);
4537
        oprot.writeString(this.imeiNumber);
4538
        oprot.writeFieldEnd();
4539
      }
4540
      if (this.type != null) {
4541
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
4542
        oprot.writeI32(this.type.getValue());
4543
        oprot.writeFieldEnd();
4544
      }
4545
      oprot.writeFieldStop();
4546
      oprot.writeStructEnd();
4547
    }
4548
 
4549
    @Override
4550
    public String toString() {
4551
      StringBuilder sb = new StringBuilder("scanIn_args(");
4552
      boolean first = true;
4553
 
4554
      sb.append("purchaseId:");
4555
      sb.append(this.purchaseId);
4556
      first = false;
4557
      if (!first) sb.append(", ");
4558
      sb.append("itemId:");
4559
      sb.append(this.itemId);
4560
      first = false;
4561
      if (!first) sb.append(", ");
4562
      sb.append("itemNumber:");
4563
      if (this.itemNumber == null) {
4564
        sb.append("null");
4565
      } else {
4566
        sb.append(this.itemNumber);
4567
      }
4568
      first = false;
4569
      if (!first) sb.append(", ");
4570
      sb.append("imeiNumber:");
4571
      if (this.imeiNumber == null) {
4572
        sb.append("null");
4573
      } else {
4574
        sb.append(this.imeiNumber);
4575
      }
4576
      first = false;
4577
      if (!first) sb.append(", ");
4578
      sb.append("type:");
4579
      if (this.type == null) {
4580
        sb.append("null");
4581
      } else {
4582
        String type_name = type.name();
4583
        if (type_name != null) {
4584
          sb.append(type_name);
4585
          sb.append(" (");
4586
        }
4587
        sb.append(this.type);
4588
        if (type_name != null) {
4589
          sb.append(")");
4590
        }
4591
      }
4592
      first = false;
4593
      sb.append(")");
4594
      return sb.toString();
4595
    }
4596
 
4597
    public void validate() throws TException {
4598
      // check for required fields
4599
    }
4600
 
4601
  }
4602
 
4603
  public static class scanIn_result implements TBase<scanIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<scanIn_result>   {
4604
    private static final TStruct STRUCT_DESC = new TStruct("scanIn_result");
4605
 
4606
    private static final TField WEX_FIELD_DESC = new TField("wex", TType.STRUCT, (short)1);
4607
 
4608
    private WarehouseServiceException wex;
4609
 
4610
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4611
    public enum _Fields implements TFieldIdEnum {
4612
      WEX((short)1, "wex");
4613
 
4614
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4615
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4616
 
4617
      static {
4618
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4619
          byId.put((int)field._thriftId, field);
4620
          byName.put(field.getFieldName(), field);
4621
        }
4622
      }
4623
 
4624
      /**
4625
       * Find the _Fields constant that matches fieldId, or null if its not found.
4626
       */
4627
      public static _Fields findByThriftId(int fieldId) {
4628
        return byId.get(fieldId);
4629
      }
4630
 
4631
      /**
4632
       * Find the _Fields constant that matches fieldId, throwing an exception
4633
       * if it is not found.
4634
       */
4635
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4636
        _Fields fields = findByThriftId(fieldId);
4637
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4638
        return fields;
4639
      }
4640
 
4641
      /**
4642
       * Find the _Fields constant that matches name, or null if its not found.
4643
       */
4644
      public static _Fields findByName(String name) {
4645
        return byName.get(name);
4646
      }
4647
 
4648
      private final short _thriftId;
4649
      private final String _fieldName;
4650
 
4651
      _Fields(short thriftId, String fieldName) {
4652
        _thriftId = thriftId;
4653
        _fieldName = fieldName;
4654
      }
4655
 
4656
      public short getThriftFieldId() {
4657
        return _thriftId;
4658
      }
4659
 
4660
      public String getFieldName() {
4661
        return _fieldName;
4662
      }
4663
    }
4664
 
4665
    // isset id assignments
4666
 
4667
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4668
      put(_Fields.WEX, new FieldMetaData("wex", TFieldRequirementType.DEFAULT, 
4669
          new FieldValueMetaData(TType.STRUCT)));
4670
    }});
4671
 
4672
    static {
4673
      FieldMetaData.addStructMetaDataMap(scanIn_result.class, metaDataMap);
4674
    }
4675
 
4676
    public scanIn_result() {
4677
    }
4678
 
4679
    public scanIn_result(
4680
      WarehouseServiceException wex)
4681
    {
4682
      this();
4683
      this.wex = wex;
4684
    }
4685
 
4686
    /**
4687
     * Performs a deep copy on <i>other</i>.
4688
     */
4689
    public scanIn_result(scanIn_result other) {
4690
      if (other.isSetWex()) {
4691
        this.wex = new WarehouseServiceException(other.wex);
4692
      }
4693
    }
4694
 
4695
    public scanIn_result deepCopy() {
4696
      return new scanIn_result(this);
4697
    }
4698
 
4699
    @Deprecated
4700
    public scanIn_result clone() {
4701
      return new scanIn_result(this);
4702
    }
4703
 
4704
    public WarehouseServiceException getWex() {
4705
      return this.wex;
4706
    }
4707
 
4708
    public scanIn_result setWex(WarehouseServiceException wex) {
4709
      this.wex = wex;
4710
      return this;
4711
    }
4712
 
4713
    public void unsetWex() {
4714
      this.wex = null;
4715
    }
4716
 
4717
    /** Returns true if field wex is set (has been asigned a value) and false otherwise */
4718
    public boolean isSetWex() {
4719
      return this.wex != null;
4720
    }
4721
 
4722
    public void setWexIsSet(boolean value) {
4723
      if (!value) {
4724
        this.wex = null;
4725
      }
4726
    }
4727
 
4728
    public void setFieldValue(_Fields field, Object value) {
4729
      switch (field) {
4730
      case WEX:
4731
        if (value == null) {
4732
          unsetWex();
4733
        } else {
4734
          setWex((WarehouseServiceException)value);
4735
        }
4736
        break;
4737
 
4738
      }
4739
    }
4740
 
4741
    public void setFieldValue(int fieldID, Object value) {
4742
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4743
    }
4744
 
4745
    public Object getFieldValue(_Fields field) {
4746
      switch (field) {
4747
      case WEX:
4748
        return getWex();
4749
 
4750
      }
4751
      throw new IllegalStateException();
4752
    }
4753
 
4754
    public Object getFieldValue(int fieldId) {
4755
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4756
    }
4757
 
4758
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4759
    public boolean isSet(_Fields field) {
4760
      switch (field) {
4761
      case WEX:
4762
        return isSetWex();
4763
      }
4764
      throw new IllegalStateException();
4765
    }
4766
 
4767
    public boolean isSet(int fieldID) {
4768
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4769
    }
4770
 
4771
    @Override
4772
    public boolean equals(Object that) {
4773
      if (that == null)
4774
        return false;
4775
      if (that instanceof scanIn_result)
4776
        return this.equals((scanIn_result)that);
4777
      return false;
4778
    }
4779
 
4780
    public boolean equals(scanIn_result that) {
4781
      if (that == null)
4782
        return false;
4783
 
4784
      boolean this_present_wex = true && this.isSetWex();
4785
      boolean that_present_wex = true && that.isSetWex();
4786
      if (this_present_wex || that_present_wex) {
4787
        if (!(this_present_wex && that_present_wex))
4788
          return false;
4789
        if (!this.wex.equals(that.wex))
4790
          return false;
4791
      }
4792
 
4793
      return true;
4794
    }
4795
 
4796
    @Override
4797
    public int hashCode() {
4798
      return 0;
4799
    }
4800
 
4801
    public int compareTo(scanIn_result other) {
4802
      if (!getClass().equals(other.getClass())) {
4803
        return getClass().getName().compareTo(other.getClass().getName());
4804
      }
4805
 
4806
      int lastComparison = 0;
4807
      scanIn_result typedOther = (scanIn_result)other;
4808
 
4809
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(isSetWex());
4810
      if (lastComparison != 0) {
4811
        return lastComparison;
4812
      }
4813
      lastComparison = TBaseHelper.compareTo(wex, typedOther.wex);
4814
      if (lastComparison != 0) {
4815
        return lastComparison;
4816
      }
4817
      return 0;
4818
    }
4819
 
4820
    public void read(TProtocol iprot) throws TException {
4821
      TField field;
4822
      iprot.readStructBegin();
4823
      while (true)
4824
      {
4825
        field = iprot.readFieldBegin();
4826
        if (field.type == TType.STOP) { 
4827
          break;
4828
        }
4829
        _Fields fieldId = _Fields.findByThriftId(field.id);
4830
        if (fieldId == null) {
4831
          TProtocolUtil.skip(iprot, field.type);
4832
        } else {
4833
          switch (fieldId) {
4834
            case WEX:
4835
              if (field.type == TType.STRUCT) {
4836
                this.wex = new WarehouseServiceException();
4837
                this.wex.read(iprot);
4838
              } else { 
4839
                TProtocolUtil.skip(iprot, field.type);
4840
              }
4841
              break;
4842
          }
4843
          iprot.readFieldEnd();
4844
        }
4845
      }
4846
      iprot.readStructEnd();
4847
      validate();
4848
    }
4849
 
4850
    public void write(TProtocol oprot) throws TException {
4851
      oprot.writeStructBegin(STRUCT_DESC);
4852
 
4853
      if (this.isSetWex()) {
4854
        oprot.writeFieldBegin(WEX_FIELD_DESC);
4855
        this.wex.write(oprot);
4856
        oprot.writeFieldEnd();
4857
      }
4858
      oprot.writeFieldStop();
4859
      oprot.writeStructEnd();
4860
    }
4861
 
4862
    @Override
4863
    public String toString() {
4864
      StringBuilder sb = new StringBuilder("scanIn_result(");
4865
      boolean first = true;
4866
 
4867
      sb.append("wex:");
4868
      if (this.wex == null) {
4869
        sb.append("null");
4870
      } else {
4871
        sb.append(this.wex);
4872
      }
4873
      first = false;
4874
      sb.append(")");
4875
      return sb.toString();
4876
    }
4877
 
4878
    public void validate() throws TException {
4879
      // check for required fields
4880
    }
4881
 
4882
  }
4883
 
4884
  public static class scanOut_args implements TBase<scanOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<scanOut_args>   {
4885
    private static final TStruct STRUCT_DESC = new TStruct("scanOut_args");
4886
 
4887
    private static final TField ITEM_NUMBER_FIELD_DESC = new TField("itemNumber", TType.I64, (short)1);
4888
    private static final TField IMEI_NUMBER_FIELD_DESC = new TField("imeiNumber", TType.I64, (short)2);
4889
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I32, (short)3);
4890
 
4891
    private long itemNumber;
4892
    private long imeiNumber;
4893
    private ScanType type;
4894
 
4895
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4896
    public enum _Fields implements TFieldIdEnum {
4897
      ITEM_NUMBER((short)1, "itemNumber"),
4898
      IMEI_NUMBER((short)2, "imeiNumber"),
4899
      /**
4900
       * 
4901
       * @see ScanType
4902
       */
4903
      TYPE((short)3, "type");
4904
 
4905
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4906
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4907
 
4908
      static {
4909
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4910
          byId.put((int)field._thriftId, field);
4911
          byName.put(field.getFieldName(), field);
4912
        }
4913
      }
4914
 
4915
      /**
4916
       * Find the _Fields constant that matches fieldId, or null if its not found.
4917
       */
4918
      public static _Fields findByThriftId(int fieldId) {
4919
        return byId.get(fieldId);
4920
      }
4921
 
4922
      /**
4923
       * Find the _Fields constant that matches fieldId, throwing an exception
4924
       * if it is not found.
4925
       */
4926
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4927
        _Fields fields = findByThriftId(fieldId);
4928
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4929
        return fields;
4930
      }
4931
 
4932
      /**
4933
       * Find the _Fields constant that matches name, or null if its not found.
4934
       */
4935
      public static _Fields findByName(String name) {
4936
        return byName.get(name);
4937
      }
4938
 
4939
      private final short _thriftId;
4940
      private final String _fieldName;
4941
 
4942
      _Fields(short thriftId, String fieldName) {
4943
        _thriftId = thriftId;
4944
        _fieldName = fieldName;
4945
      }
4946
 
4947
      public short getThriftFieldId() {
4948
        return _thriftId;
4949
      }
4950
 
4951
      public String getFieldName() {
4952
        return _fieldName;
4953
      }
4954
    }
4955
 
4956
    // isset id assignments
4957
    private static final int __ITEMNUMBER_ISSET_ID = 0;
4958
    private static final int __IMEINUMBER_ISSET_ID = 1;
4959
    private BitSet __isset_bit_vector = new BitSet(2);
4960
 
4961
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4962
      put(_Fields.ITEM_NUMBER, new FieldMetaData("itemNumber", TFieldRequirementType.DEFAULT, 
4963
          new FieldValueMetaData(TType.I64)));
4964
      put(_Fields.IMEI_NUMBER, new FieldMetaData("imeiNumber", TFieldRequirementType.DEFAULT, 
4965
          new FieldValueMetaData(TType.I64)));
4966
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
4967
          new EnumMetaData(TType.ENUM, ScanType.class)));
4968
    }});
4969
 
4970
    static {
4971
      FieldMetaData.addStructMetaDataMap(scanOut_args.class, metaDataMap);
4972
    }
4973
 
4974
    public scanOut_args() {
4975
    }
4976
 
4977
    public scanOut_args(
4978
      long itemNumber,
4979
      long imeiNumber,
4980
      ScanType type)
4981
    {
4982
      this();
4983
      this.itemNumber = itemNumber;
4984
      setItemNumberIsSet(true);
4985
      this.imeiNumber = imeiNumber;
4986
      setImeiNumberIsSet(true);
4987
      this.type = type;
4988
    }
4989
 
4990
    /**
4991
     * Performs a deep copy on <i>other</i>.
4992
     */
4993
    public scanOut_args(scanOut_args other) {
4994
      __isset_bit_vector.clear();
4995
      __isset_bit_vector.or(other.__isset_bit_vector);
4996
      this.itemNumber = other.itemNumber;
4997
      this.imeiNumber = other.imeiNumber;
4998
      if (other.isSetType()) {
4999
        this.type = other.type;
5000
      }
5001
    }
5002
 
5003
    public scanOut_args deepCopy() {
5004
      return new scanOut_args(this);
5005
    }
5006
 
5007
    @Deprecated
5008
    public scanOut_args clone() {
5009
      return new scanOut_args(this);
5010
    }
5011
 
5012
    public long getItemNumber() {
5013
      return this.itemNumber;
5014
    }
5015
 
5016
    public scanOut_args setItemNumber(long itemNumber) {
5017
      this.itemNumber = itemNumber;
5018
      setItemNumberIsSet(true);
5019
      return this;
5020
    }
5021
 
5022
    public void unsetItemNumber() {
5023
      __isset_bit_vector.clear(__ITEMNUMBER_ISSET_ID);
5024
    }
5025
 
5026
    /** Returns true if field itemNumber is set (has been asigned a value) and false otherwise */
5027
    public boolean isSetItemNumber() {
5028
      return __isset_bit_vector.get(__ITEMNUMBER_ISSET_ID);
5029
    }
5030
 
5031
    public void setItemNumberIsSet(boolean value) {
5032
      __isset_bit_vector.set(__ITEMNUMBER_ISSET_ID, value);
5033
    }
5034
 
5035
    public long getImeiNumber() {
5036
      return this.imeiNumber;
5037
    }
5038
 
5039
    public scanOut_args setImeiNumber(long imeiNumber) {
5040
      this.imeiNumber = imeiNumber;
5041
      setImeiNumberIsSet(true);
5042
      return this;
5043
    }
5044
 
5045
    public void unsetImeiNumber() {
5046
      __isset_bit_vector.clear(__IMEINUMBER_ISSET_ID);
5047
    }
5048
 
5049
    /** Returns true if field imeiNumber is set (has been asigned a value) and false otherwise */
5050
    public boolean isSetImeiNumber() {
5051
      return __isset_bit_vector.get(__IMEINUMBER_ISSET_ID);
5052
    }
5053
 
5054
    public void setImeiNumberIsSet(boolean value) {
5055
      __isset_bit_vector.set(__IMEINUMBER_ISSET_ID, value);
5056
    }
5057
 
5058
    /**
5059
     * 
5060
     * @see ScanType
5061
     */
5062
    public ScanType getType() {
5063
      return this.type;
5064
    }
5065
 
5066
    /**
5067
     * 
5068
     * @see ScanType
5069
     */
5070
    public scanOut_args setType(ScanType type) {
5071
      this.type = type;
5072
      return this;
5073
    }
5074
 
5075
    public void unsetType() {
5076
      this.type = null;
5077
    }
5078
 
5079
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
5080
    public boolean isSetType() {
5081
      return this.type != null;
5082
    }
5083
 
5084
    public void setTypeIsSet(boolean value) {
5085
      if (!value) {
5086
        this.type = null;
5087
      }
5088
    }
5089
 
5090
    public void setFieldValue(_Fields field, Object value) {
5091
      switch (field) {
5092
      case ITEM_NUMBER:
5093
        if (value == null) {
5094
          unsetItemNumber();
5095
        } else {
5096
          setItemNumber((Long)value);
5097
        }
5098
        break;
5099
 
5100
      case IMEI_NUMBER:
5101
        if (value == null) {
5102
          unsetImeiNumber();
5103
        } else {
5104
          setImeiNumber((Long)value);
5105
        }
5106
        break;
5107
 
5108
      case TYPE:
5109
        if (value == null) {
5110
          unsetType();
5111
        } else {
5112
          setType((ScanType)value);
5113
        }
5114
        break;
5115
 
5116
      }
5117
    }
5118
 
5119
    public void setFieldValue(int fieldID, Object value) {
5120
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5121
    }
5122
 
5123
    public Object getFieldValue(_Fields field) {
5124
      switch (field) {
5125
      case ITEM_NUMBER:
5126
        return new Long(getItemNumber());
5127
 
5128
      case IMEI_NUMBER:
5129
        return new Long(getImeiNumber());
5130
 
5131
      case TYPE:
5132
        return getType();
5133
 
5134
      }
5135
      throw new IllegalStateException();
5136
    }
5137
 
5138
    public Object getFieldValue(int fieldId) {
5139
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5140
    }
5141
 
5142
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5143
    public boolean isSet(_Fields field) {
5144
      switch (field) {
5145
      case ITEM_NUMBER:
5146
        return isSetItemNumber();
5147
      case IMEI_NUMBER:
5148
        return isSetImeiNumber();
5149
      case TYPE:
5150
        return isSetType();
5151
      }
5152
      throw new IllegalStateException();
5153
    }
5154
 
5155
    public boolean isSet(int fieldID) {
5156
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5157
    }
5158
 
5159
    @Override
5160
    public boolean equals(Object that) {
5161
      if (that == null)
5162
        return false;
5163
      if (that instanceof scanOut_args)
5164
        return this.equals((scanOut_args)that);
5165
      return false;
5166
    }
5167
 
5168
    public boolean equals(scanOut_args that) {
5169
      if (that == null)
5170
        return false;
5171
 
5172
      boolean this_present_itemNumber = true;
5173
      boolean that_present_itemNumber = true;
5174
      if (this_present_itemNumber || that_present_itemNumber) {
5175
        if (!(this_present_itemNumber && that_present_itemNumber))
5176
          return false;
5177
        if (this.itemNumber != that.itemNumber)
5178
          return false;
5179
      }
5180
 
5181
      boolean this_present_imeiNumber = true;
5182
      boolean that_present_imeiNumber = true;
5183
      if (this_present_imeiNumber || that_present_imeiNumber) {
5184
        if (!(this_present_imeiNumber && that_present_imeiNumber))
5185
          return false;
5186
        if (this.imeiNumber != that.imeiNumber)
5187
          return false;
5188
      }
5189
 
5190
      boolean this_present_type = true && this.isSetType();
5191
      boolean that_present_type = true && that.isSetType();
5192
      if (this_present_type || that_present_type) {
5193
        if (!(this_present_type && that_present_type))
5194
          return false;
5195
        if (!this.type.equals(that.type))
5196
          return false;
5197
      }
5198
 
5199
      return true;
5200
    }
5201
 
5202
    @Override
5203
    public int hashCode() {
5204
      return 0;
5205
    }
5206
 
5207
    public int compareTo(scanOut_args other) {
5208
      if (!getClass().equals(other.getClass())) {
5209
        return getClass().getName().compareTo(other.getClass().getName());
5210
      }
5211
 
5212
      int lastComparison = 0;
5213
      scanOut_args typedOther = (scanOut_args)other;
5214
 
5215
      lastComparison = Boolean.valueOf(isSetItemNumber()).compareTo(isSetItemNumber());
5216
      if (lastComparison != 0) {
5217
        return lastComparison;
5218
      }
5219
      lastComparison = TBaseHelper.compareTo(itemNumber, typedOther.itemNumber);
5220
      if (lastComparison != 0) {
5221
        return lastComparison;
5222
      }
5223
      lastComparison = Boolean.valueOf(isSetImeiNumber()).compareTo(isSetImeiNumber());
5224
      if (lastComparison != 0) {
5225
        return lastComparison;
5226
      }
5227
      lastComparison = TBaseHelper.compareTo(imeiNumber, typedOther.imeiNumber);
5228
      if (lastComparison != 0) {
5229
        return lastComparison;
5230
      }
5231
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
5232
      if (lastComparison != 0) {
5233
        return lastComparison;
5234
      }
5235
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
5236
      if (lastComparison != 0) {
5237
        return lastComparison;
5238
      }
5239
      return 0;
5240
    }
5241
 
5242
    public void read(TProtocol iprot) throws TException {
5243
      TField field;
5244
      iprot.readStructBegin();
5245
      while (true)
5246
      {
5247
        field = iprot.readFieldBegin();
5248
        if (field.type == TType.STOP) { 
5249
          break;
5250
        }
5251
        _Fields fieldId = _Fields.findByThriftId(field.id);
5252
        if (fieldId == null) {
5253
          TProtocolUtil.skip(iprot, field.type);
5254
        } else {
5255
          switch (fieldId) {
5256
            case ITEM_NUMBER:
5257
              if (field.type == TType.I64) {
5258
                this.itemNumber = iprot.readI64();
5259
                setItemNumberIsSet(true);
5260
              } else { 
5261
                TProtocolUtil.skip(iprot, field.type);
5262
              }
5263
              break;
5264
            case IMEI_NUMBER:
5265
              if (field.type == TType.I64) {
5266
                this.imeiNumber = iprot.readI64();
5267
                setImeiNumberIsSet(true);
5268
              } else { 
5269
                TProtocolUtil.skip(iprot, field.type);
5270
              }
5271
              break;
5272
            case TYPE:
5273
              if (field.type == TType.I32) {
5274
                this.type = ScanType.findByValue(iprot.readI32());
5275
              } else { 
5276
                TProtocolUtil.skip(iprot, field.type);
5277
              }
5278
              break;
5279
          }
5280
          iprot.readFieldEnd();
5281
        }
5282
      }
5283
      iprot.readStructEnd();
5284
      validate();
5285
    }
5286
 
5287
    public void write(TProtocol oprot) throws TException {
5288
      validate();
5289
 
5290
      oprot.writeStructBegin(STRUCT_DESC);
5291
      oprot.writeFieldBegin(ITEM_NUMBER_FIELD_DESC);
5292
      oprot.writeI64(this.itemNumber);
5293
      oprot.writeFieldEnd();
5294
      oprot.writeFieldBegin(IMEI_NUMBER_FIELD_DESC);
5295
      oprot.writeI64(this.imeiNumber);
5296
      oprot.writeFieldEnd();
5297
      if (this.type != null) {
5298
        oprot.writeFieldBegin(TYPE_FIELD_DESC);
5299
        oprot.writeI32(this.type.getValue());
5300
        oprot.writeFieldEnd();
5301
      }
5302
      oprot.writeFieldStop();
5303
      oprot.writeStructEnd();
5304
    }
5305
 
5306
    @Override
5307
    public String toString() {
5308
      StringBuilder sb = new StringBuilder("scanOut_args(");
5309
      boolean first = true;
5310
 
5311
      sb.append("itemNumber:");
5312
      sb.append(this.itemNumber);
5313
      first = false;
5314
      if (!first) sb.append(", ");
5315
      sb.append("imeiNumber:");
5316
      sb.append(this.imeiNumber);
5317
      first = false;
5318
      if (!first) sb.append(", ");
5319
      sb.append("type:");
5320
      if (this.type == null) {
5321
        sb.append("null");
5322
      } else {
5323
        String type_name = type.name();
5324
        if (type_name != null) {
5325
          sb.append(type_name);
5326
          sb.append(" (");
5327
        }
5328
        sb.append(this.type);
5329
        if (type_name != null) {
5330
          sb.append(")");
5331
        }
5332
      }
5333
      first = false;
5334
      sb.append(")");
5335
      return sb.toString();
5336
    }
5337
 
5338
    public void validate() throws TException {
5339
      // check for required fields
5340
    }
5341
 
5342
  }
5343
 
5344
  public static class scanOut_result implements TBase<scanOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<scanOut_result>   {
5345
    private static final TStruct STRUCT_DESC = new TStruct("scanOut_result");
5346
 
5347
    private static final TField WEX_FIELD_DESC = new TField("wex", TType.STRUCT, (short)1);
5348
 
5349
    private WarehouseServiceException wex;
5350
 
5351
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5352
    public enum _Fields implements TFieldIdEnum {
5353
      WEX((short)1, "wex");
5354
 
5355
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5356
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5357
 
5358
      static {
5359
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5360
          byId.put((int)field._thriftId, field);
5361
          byName.put(field.getFieldName(), field);
5362
        }
5363
      }
5364
 
5365
      /**
5366
       * Find the _Fields constant that matches fieldId, or null if its not found.
5367
       */
5368
      public static _Fields findByThriftId(int fieldId) {
5369
        return byId.get(fieldId);
5370
      }
5371
 
5372
      /**
5373
       * Find the _Fields constant that matches fieldId, throwing an exception
5374
       * if it is not found.
5375
       */
5376
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5377
        _Fields fields = findByThriftId(fieldId);
5378
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5379
        return fields;
5380
      }
5381
 
5382
      /**
5383
       * Find the _Fields constant that matches name, or null if its not found.
5384
       */
5385
      public static _Fields findByName(String name) {
5386
        return byName.get(name);
5387
      }
5388
 
5389
      private final short _thriftId;
5390
      private final String _fieldName;
5391
 
5392
      _Fields(short thriftId, String fieldName) {
5393
        _thriftId = thriftId;
5394
        _fieldName = fieldName;
5395
      }
5396
 
5397
      public short getThriftFieldId() {
5398
        return _thriftId;
5399
      }
5400
 
5401
      public String getFieldName() {
5402
        return _fieldName;
5403
      }
5404
    }
5405
 
5406
    // isset id assignments
5407
 
5408
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5409
      put(_Fields.WEX, new FieldMetaData("wex", TFieldRequirementType.DEFAULT, 
5410
          new FieldValueMetaData(TType.STRUCT)));
5411
    }});
5412
 
5413
    static {
5414
      FieldMetaData.addStructMetaDataMap(scanOut_result.class, metaDataMap);
5415
    }
5416
 
5417
    public scanOut_result() {
5418
    }
5419
 
5420
    public scanOut_result(
5421
      WarehouseServiceException wex)
5422
    {
5423
      this();
5424
      this.wex = wex;
5425
    }
5426
 
5427
    /**
5428
     * Performs a deep copy on <i>other</i>.
5429
     */
5430
    public scanOut_result(scanOut_result other) {
5431
      if (other.isSetWex()) {
5432
        this.wex = new WarehouseServiceException(other.wex);
5433
      }
5434
    }
5435
 
5436
    public scanOut_result deepCopy() {
5437
      return new scanOut_result(this);
5438
    }
5439
 
5440
    @Deprecated
5441
    public scanOut_result clone() {
5442
      return new scanOut_result(this);
5443
    }
5444
 
5445
    public WarehouseServiceException getWex() {
5446
      return this.wex;
5447
    }
5448
 
5449
    public scanOut_result setWex(WarehouseServiceException wex) {
5450
      this.wex = wex;
5451
      return this;
5452
    }
5453
 
5454
    public void unsetWex() {
5455
      this.wex = null;
5456
    }
5457
 
5458
    /** Returns true if field wex is set (has been asigned a value) and false otherwise */
5459
    public boolean isSetWex() {
5460
      return this.wex != null;
5461
    }
5462
 
5463
    public void setWexIsSet(boolean value) {
5464
      if (!value) {
5465
        this.wex = null;
5466
      }
5467
    }
5468
 
5469
    public void setFieldValue(_Fields field, Object value) {
5470
      switch (field) {
5471
      case WEX:
5472
        if (value == null) {
5473
          unsetWex();
5474
        } else {
5475
          setWex((WarehouseServiceException)value);
5476
        }
5477
        break;
5478
 
5479
      }
5480
    }
5481
 
5482
    public void setFieldValue(int fieldID, Object value) {
5483
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5484
    }
5485
 
5486
    public Object getFieldValue(_Fields field) {
5487
      switch (field) {
5488
      case WEX:
5489
        return getWex();
5490
 
5491
      }
5492
      throw new IllegalStateException();
5493
    }
5494
 
5495
    public Object getFieldValue(int fieldId) {
5496
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5497
    }
5498
 
5499
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5500
    public boolean isSet(_Fields field) {
5501
      switch (field) {
5502
      case WEX:
5503
        return isSetWex();
5504
      }
5505
      throw new IllegalStateException();
5506
    }
5507
 
5508
    public boolean isSet(int fieldID) {
5509
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5510
    }
5511
 
5512
    @Override
5513
    public boolean equals(Object that) {
5514
      if (that == null)
5515
        return false;
5516
      if (that instanceof scanOut_result)
5517
        return this.equals((scanOut_result)that);
5518
      return false;
5519
    }
5520
 
5521
    public boolean equals(scanOut_result that) {
5522
      if (that == null)
5523
        return false;
5524
 
5525
      boolean this_present_wex = true && this.isSetWex();
5526
      boolean that_present_wex = true && that.isSetWex();
5527
      if (this_present_wex || that_present_wex) {
5528
        if (!(this_present_wex && that_present_wex))
5529
          return false;
5530
        if (!this.wex.equals(that.wex))
5531
          return false;
5532
      }
5533
 
5534
      return true;
5535
    }
5536
 
5537
    @Override
5538
    public int hashCode() {
5539
      return 0;
5540
    }
5541
 
5542
    public int compareTo(scanOut_result other) {
5543
      if (!getClass().equals(other.getClass())) {
5544
        return getClass().getName().compareTo(other.getClass().getName());
5545
      }
5546
 
5547
      int lastComparison = 0;
5548
      scanOut_result typedOther = (scanOut_result)other;
5549
 
5550
      lastComparison = Boolean.valueOf(isSetWex()).compareTo(isSetWex());
5551
      if (lastComparison != 0) {
5552
        return lastComparison;
5553
      }
5554
      lastComparison = TBaseHelper.compareTo(wex, typedOther.wex);
5555
      if (lastComparison != 0) {
5556
        return lastComparison;
5557
      }
5558
      return 0;
5559
    }
5560
 
5561
    public void read(TProtocol iprot) throws TException {
5562
      TField field;
5563
      iprot.readStructBegin();
5564
      while (true)
5565
      {
5566
        field = iprot.readFieldBegin();
5567
        if (field.type == TType.STOP) { 
5568
          break;
5569
        }
5570
        _Fields fieldId = _Fields.findByThriftId(field.id);
5571
        if (fieldId == null) {
5572
          TProtocolUtil.skip(iprot, field.type);
5573
        } else {
5574
          switch (fieldId) {
5575
            case WEX:
5576
              if (field.type == TType.STRUCT) {
5577
                this.wex = new WarehouseServiceException();
5578
                this.wex.read(iprot);
5579
              } else { 
5580
                TProtocolUtil.skip(iprot, field.type);
5581
              }
5582
              break;
5583
          }
5584
          iprot.readFieldEnd();
5585
        }
5586
      }
5587
      iprot.readStructEnd();
5588
      validate();
5589
    }
5590
 
5591
    public void write(TProtocol oprot) throws TException {
5592
      oprot.writeStructBegin(STRUCT_DESC);
5593
 
5594
      if (this.isSetWex()) {
5595
        oprot.writeFieldBegin(WEX_FIELD_DESC);
5596
        this.wex.write(oprot);
5597
        oprot.writeFieldEnd();
5598
      }
5599
      oprot.writeFieldStop();
5600
      oprot.writeStructEnd();
5601
    }
5602
 
5603
    @Override
5604
    public String toString() {
5605
      StringBuilder sb = new StringBuilder("scanOut_result(");
5606
      boolean first = true;
5607
 
5608
      sb.append("wex:");
5609
      if (this.wex == null) {
5610
        sb.append("null");
5611
      } else {
5612
        sb.append(this.wex);
5613
      }
5614
      first = false;
5615
      sb.append(")");
5616
      return sb.toString();
5617
    }
5618
 
5619
    public void validate() throws TException {
5620
      // check for required fields
5621
    }
5622
 
5623
  }
5624
 
5625
}