Subversion Repositories SmartDukaan

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

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