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