Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
68 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.order;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class TransactionService {
27
 
28
  public interface Iface {
29
 
132 ashish 30
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException;
68 ashish 31
 
32
    /**
33
     * 	Get transaction methods.
34
     * *
35
     * 
36
     * @param id
37
     */
38
    public Transaction getTransaction(long id) throws TransactionServiceException, TException;
39
 
132 ashish 40
    public List<Transaction> getAllTransactions(TransactionStatus status, long from_date, long to_date) throws TransactionServiceException, TException;
68 ashish 41
 
132 ashish 42
    public List<Transaction> getTransactionsForShipmentStatus(ShipmentStatus status, long from_date, long to_date) throws TransactionServiceException, TException;
68 ashish 43
 
132 ashish 44
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException;
68 ashish 45
 
132 ashish 46
    public List<Transaction> getTransactionsForCustomerAndShipmentStatus(long customerId, long from_date, long to_date, ShipmentStatus status) throws TransactionServiceException, TException;
68 ashish 47
 
132 ashish 48
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException;
49
 
68 ashish 50
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException;
51
 
52
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException;
53
 
54
    /**
55
     * 	Get and set individual objects in it
56
     * *
57
     * 
58
     * @param transactionId
59
     */
60
    public OrderInfo getOrderInfo(long transactionId) throws TransactionServiceException, TException;
61
 
62
    public ShipmentInfo getShippingInfo(long transactionId) throws TransactionServiceException, TException;
63
 
64
    public BillingInfo getBillingInfo(long transactionId) throws TransactionServiceException, TException;
65
 
66
    public boolean addBilling(long tranactionId, Billing billing) throws TransactionServiceException, TException;
67
 
68
    public boolean setShippingTracker(long transactionId, long shippingId, String trackingId, String airwayBillNo, String provider) throws TransactionServiceException, TException;
69
 
70
    public boolean setShippingDate(long transactionId, long shippingId, long timestamp) throws TransactionServiceException, TException;
71
 
72
    public boolean setDeliveryDate(long transactionId, long shippingid, long timestamp) throws TransactionServiceException, TException;
73
 
74
    public boolean changeShippingStatus(long transactionId, long shippingId, ShipmentStatus status, String description) throws TransactionServiceException, TException;
75
 
76
    public boolean addTrail(long transactionId, String description) throws TransactionServiceException, TException;
77
 
305 ashish 78
    public List<Alert> getAlerts(long transactionId, boolean valid) throws TException;
79
 
80
    public void setAlert(long transactionId, boolean unset, long type, String comment) throws TException;
81
 
82
    public ExtraOrderInfo getExtraInfo(long transaction_id) throws TException;
83
 
84
    public void setExtraInfo(long transaction_id, long sku_id, String model, String colour, String vendor) throws TException;
85
 
68 ashish 86
  }
87
 
88
  public static class Client implements Iface {
89
    public Client(TProtocol prot)
90
    {
91
      this(prot, prot);
92
    }
93
 
94
    public Client(TProtocol iprot, TProtocol oprot)
95
    {
96
      iprot_ = iprot;
97
      oprot_ = oprot;
98
    }
99
 
100
    protected TProtocol iprot_;
101
    protected TProtocol oprot_;
102
 
103
    protected int seqid_;
104
 
105
    public TProtocol getInputProtocol()
106
    {
107
      return this.iprot_;
108
    }
109
 
110
    public TProtocol getOutputProtocol()
111
    {
112
      return this.oprot_;
113
    }
114
 
132 ashish 115
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 116
    {
117
      send_createTransaction(transaction);
132 ashish 118
      return recv_createTransaction();
68 ashish 119
    }
120
 
121
    public void send_createTransaction(Transaction transaction) throws TException
122
    {
123
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
124
      createTransaction_args args = new createTransaction_args();
125
      args.transaction = transaction;
126
      args.write(oprot_);
127
      oprot_.writeMessageEnd();
128
      oprot_.getTransport().flush();
129
    }
130
 
132 ashish 131
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 132
    {
133
      TMessage msg = iprot_.readMessageBegin();
134
      if (msg.type == TMessageType.EXCEPTION) {
135
        TApplicationException x = TApplicationException.read(iprot_);
136
        iprot_.readMessageEnd();
137
        throw x;
138
      }
139
      createTransaction_result result = new createTransaction_result();
140
      result.read(iprot_);
141
      iprot_.readMessageEnd();
132 ashish 142
      if (result.isSetSuccess()) {
143
        return result.success;
144
      }
68 ashish 145
      if (result.ex != null) {
146
        throw result.ex;
147
      }
132 ashish 148
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 149
    }
150
 
151
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
152
    {
153
      send_getTransaction(id);
154
      return recv_getTransaction();
155
    }
156
 
157
    public void send_getTransaction(long id) throws TException
158
    {
159
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
160
      getTransaction_args args = new getTransaction_args();
161
      args.id = id;
162
      args.write(oprot_);
163
      oprot_.writeMessageEnd();
164
      oprot_.getTransport().flush();
165
    }
166
 
167
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
168
    {
169
      TMessage msg = iprot_.readMessageBegin();
170
      if (msg.type == TMessageType.EXCEPTION) {
171
        TApplicationException x = TApplicationException.read(iprot_);
172
        iprot_.readMessageEnd();
173
        throw x;
174
      }
175
      getTransaction_result result = new getTransaction_result();
176
      result.read(iprot_);
177
      iprot_.readMessageEnd();
178
      if (result.isSetSuccess()) {
179
        return result.success;
180
      }
181
      if (result.ex != null) {
182
        throw result.ex;
183
      }
184
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
185
    }
186
 
132 ashish 187
    public List<Transaction> getAllTransactions(TransactionStatus status, long from_date, long to_date) throws TransactionServiceException, TException
68 ashish 188
    {
132 ashish 189
      send_getAllTransactions(status, from_date, to_date);
68 ashish 190
      return recv_getAllTransactions();
191
    }
192
 
132 ashish 193
    public void send_getAllTransactions(TransactionStatus status, long from_date, long to_date) throws TException
68 ashish 194
    {
195
      oprot_.writeMessageBegin(new TMessage("getAllTransactions", TMessageType.CALL, seqid_));
196
      getAllTransactions_args args = new getAllTransactions_args();
197
      args.status = status;
132 ashish 198
      args.from_date = from_date;
199
      args.to_date = to_date;
68 ashish 200
      args.write(oprot_);
201
      oprot_.writeMessageEnd();
202
      oprot_.getTransport().flush();
203
    }
204
 
205
    public List<Transaction> recv_getAllTransactions() throws TransactionServiceException, TException
206
    {
207
      TMessage msg = iprot_.readMessageBegin();
208
      if (msg.type == TMessageType.EXCEPTION) {
209
        TApplicationException x = TApplicationException.read(iprot_);
210
        iprot_.readMessageEnd();
211
        throw x;
212
      }
213
      getAllTransactions_result result = new getAllTransactions_result();
214
      result.read(iprot_);
215
      iprot_.readMessageEnd();
216
      if (result.isSetSuccess()) {
217
        return result.success;
218
      }
219
      if (result.ex != null) {
220
        throw result.ex;
221
      }
222
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllTransactions failed: unknown result");
223
    }
224
 
132 ashish 225
    public List<Transaction> getTransactionsForShipmentStatus(ShipmentStatus status, long from_date, long to_date) throws TransactionServiceException, TException
68 ashish 226
    {
132 ashish 227
      send_getTransactionsForShipmentStatus(status, from_date, to_date);
68 ashish 228
      return recv_getTransactionsForShipmentStatus();
229
    }
230
 
132 ashish 231
    public void send_getTransactionsForShipmentStatus(ShipmentStatus status, long from_date, long to_date) throws TException
68 ashish 232
    {
233
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShipmentStatus", TMessageType.CALL, seqid_));
234
      getTransactionsForShipmentStatus_args args = new getTransactionsForShipmentStatus_args();
235
      args.status = status;
132 ashish 236
      args.from_date = from_date;
237
      args.to_date = to_date;
68 ashish 238
      args.write(oprot_);
239
      oprot_.writeMessageEnd();
240
      oprot_.getTransport().flush();
241
    }
242
 
243
    public List<Transaction> recv_getTransactionsForShipmentStatus() throws TransactionServiceException, TException
244
    {
245
      TMessage msg = iprot_.readMessageBegin();
246
      if (msg.type == TMessageType.EXCEPTION) {
247
        TApplicationException x = TApplicationException.read(iprot_);
248
        iprot_.readMessageEnd();
249
        throw x;
250
      }
251
      getTransactionsForShipmentStatus_result result = new getTransactionsForShipmentStatus_result();
252
      result.read(iprot_);
253
      iprot_.readMessageEnd();
254
      if (result.isSetSuccess()) {
255
        return result.success;
256
      }
257
      if (result.ex != null) {
258
        throw result.ex;
259
      }
260
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShipmentStatus failed: unknown result");
261
    }
262
 
132 ashish 263
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 264
    {
132 ashish 265
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 266
      return recv_getTransactionsForCustomer();
267
    }
268
 
132 ashish 269
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 270
    {
271
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
272
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
273
      args.customerId = customerId;
132 ashish 274
      args.from_date = from_date;
275
      args.to_date = to_date;
68 ashish 276
      args.status = status;
277
      args.write(oprot_);
278
      oprot_.writeMessageEnd();
279
      oprot_.getTransport().flush();
280
    }
281
 
282
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
283
    {
284
      TMessage msg = iprot_.readMessageBegin();
285
      if (msg.type == TMessageType.EXCEPTION) {
286
        TApplicationException x = TApplicationException.read(iprot_);
287
        iprot_.readMessageEnd();
288
        throw x;
289
      }
290
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
291
      result.read(iprot_);
292
      iprot_.readMessageEnd();
293
      if (result.isSetSuccess()) {
294
        return result.success;
295
      }
296
      if (result.ex != null) {
297
        throw result.ex;
298
      }
299
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
300
    }
301
 
132 ashish 302
    public List<Transaction> getTransactionsForCustomerAndShipmentStatus(long customerId, long from_date, long to_date, ShipmentStatus status) throws TransactionServiceException, TException
68 ashish 303
    {
132 ashish 304
      send_getTransactionsForCustomerAndShipmentStatus(customerId, from_date, to_date, status);
68 ashish 305
      return recv_getTransactionsForCustomerAndShipmentStatus();
306
    }
307
 
132 ashish 308
    public void send_getTransactionsForCustomerAndShipmentStatus(long customerId, long from_date, long to_date, ShipmentStatus status) throws TException
68 ashish 309
    {
310
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomerAndShipmentStatus", TMessageType.CALL, seqid_));
311
      getTransactionsForCustomerAndShipmentStatus_args args = new getTransactionsForCustomerAndShipmentStatus_args();
312
      args.customerId = customerId;
132 ashish 313
      args.from_date = from_date;
314
      args.to_date = to_date;
68 ashish 315
      args.status = status;
316
      args.write(oprot_);
317
      oprot_.writeMessageEnd();
318
      oprot_.getTransport().flush();
319
    }
320
 
321
    public List<Transaction> recv_getTransactionsForCustomerAndShipmentStatus() throws TransactionServiceException, TException
322
    {
323
      TMessage msg = iprot_.readMessageBegin();
324
      if (msg.type == TMessageType.EXCEPTION) {
325
        TApplicationException x = TApplicationException.read(iprot_);
326
        iprot_.readMessageEnd();
327
        throw x;
328
      }
329
      getTransactionsForCustomerAndShipmentStatus_result result = new getTransactionsForCustomerAndShipmentStatus_result();
330
      result.read(iprot_);
331
      iprot_.readMessageEnd();
332
      if (result.isSetSuccess()) {
333
        return result.success;
334
      }
335
      if (result.ex != null) {
336
        throw result.ex;
337
      }
338
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomerAndShipmentStatus failed: unknown result");
339
    }
340
 
132 ashish 341
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
342
    {
343
      send_getTransactionsForShoppingCartId(shoppingCartId);
344
      return recv_getTransactionsForShoppingCartId();
345
    }
346
 
347
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
348
    {
349
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
350
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
351
      args.shoppingCartId = shoppingCartId;
352
      args.write(oprot_);
353
      oprot_.writeMessageEnd();
354
      oprot_.getTransport().flush();
355
    }
356
 
357
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
358
    {
359
      TMessage msg = iprot_.readMessageBegin();
360
      if (msg.type == TMessageType.EXCEPTION) {
361
        TApplicationException x = TApplicationException.read(iprot_);
362
        iprot_.readMessageEnd();
363
        throw x;
364
      }
365
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
366
      result.read(iprot_);
367
      iprot_.readMessageEnd();
368
      if (result.isSetSuccess()) {
369
        return result.success;
370
      }
371
      if (result.ex != null) {
372
        throw result.ex;
373
      }
374
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
375
    }
376
 
68 ashish 377
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
378
    {
379
      send_getTransactionStatus(transactionId);
380
      return recv_getTransactionStatus();
381
    }
382
 
383
    public void send_getTransactionStatus(long transactionId) throws TException
384
    {
385
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
386
      getTransactionStatus_args args = new getTransactionStatus_args();
387
      args.transactionId = transactionId;
388
      args.write(oprot_);
389
      oprot_.writeMessageEnd();
390
      oprot_.getTransport().flush();
391
    }
392
 
393
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
394
    {
395
      TMessage msg = iprot_.readMessageBegin();
396
      if (msg.type == TMessageType.EXCEPTION) {
397
        TApplicationException x = TApplicationException.read(iprot_);
398
        iprot_.readMessageEnd();
399
        throw x;
400
      }
401
      getTransactionStatus_result result = new getTransactionStatus_result();
402
      result.read(iprot_);
403
      iprot_.readMessageEnd();
404
      if (result.isSetSuccess()) {
405
        return result.success;
406
      }
407
      if (result.ex != null) {
408
        throw result.ex;
409
      }
410
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
411
    }
412
 
413
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
414
    {
415
      send_changeTransactionStatus(transactionId, status, description);
416
      return recv_changeTransactionStatus();
417
    }
418
 
419
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
420
    {
421
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
422
      changeTransactionStatus_args args = new changeTransactionStatus_args();
423
      args.transactionId = transactionId;
424
      args.status = status;
425
      args.description = description;
426
      args.write(oprot_);
427
      oprot_.writeMessageEnd();
428
      oprot_.getTransport().flush();
429
    }
430
 
431
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
432
    {
433
      TMessage msg = iprot_.readMessageBegin();
434
      if (msg.type == TMessageType.EXCEPTION) {
435
        TApplicationException x = TApplicationException.read(iprot_);
436
        iprot_.readMessageEnd();
437
        throw x;
438
      }
439
      changeTransactionStatus_result result = new changeTransactionStatus_result();
440
      result.read(iprot_);
441
      iprot_.readMessageEnd();
442
      if (result.isSetSuccess()) {
443
        return result.success;
444
      }
445
      if (result.ex != null) {
446
        throw result.ex;
447
      }
448
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
449
    }
450
 
451
    public OrderInfo getOrderInfo(long transactionId) throws TransactionServiceException, TException
452
    {
453
      send_getOrderInfo(transactionId);
454
      return recv_getOrderInfo();
455
    }
456
 
457
    public void send_getOrderInfo(long transactionId) throws TException
458
    {
459
      oprot_.writeMessageBegin(new TMessage("getOrderInfo", TMessageType.CALL, seqid_));
460
      getOrderInfo_args args = new getOrderInfo_args();
461
      args.transactionId = transactionId;
462
      args.write(oprot_);
463
      oprot_.writeMessageEnd();
464
      oprot_.getTransport().flush();
465
    }
466
 
467
    public OrderInfo recv_getOrderInfo() throws TransactionServiceException, TException
468
    {
469
      TMessage msg = iprot_.readMessageBegin();
470
      if (msg.type == TMessageType.EXCEPTION) {
471
        TApplicationException x = TApplicationException.read(iprot_);
472
        iprot_.readMessageEnd();
473
        throw x;
474
      }
475
      getOrderInfo_result result = new getOrderInfo_result();
476
      result.read(iprot_);
477
      iprot_.readMessageEnd();
478
      if (result.isSetSuccess()) {
479
        return result.success;
480
      }
481
      if (result.ex != null) {
482
        throw result.ex;
483
      }
484
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrderInfo failed: unknown result");
485
    }
486
 
487
    public ShipmentInfo getShippingInfo(long transactionId) throws TransactionServiceException, TException
488
    {
489
      send_getShippingInfo(transactionId);
490
      return recv_getShippingInfo();
491
    }
492
 
493
    public void send_getShippingInfo(long transactionId) throws TException
494
    {
495
      oprot_.writeMessageBegin(new TMessage("getShippingInfo", TMessageType.CALL, seqid_));
496
      getShippingInfo_args args = new getShippingInfo_args();
497
      args.transactionId = transactionId;
498
      args.write(oprot_);
499
      oprot_.writeMessageEnd();
500
      oprot_.getTransport().flush();
501
    }
502
 
503
    public ShipmentInfo recv_getShippingInfo() throws TransactionServiceException, TException
504
    {
505
      TMessage msg = iprot_.readMessageBegin();
506
      if (msg.type == TMessageType.EXCEPTION) {
507
        TApplicationException x = TApplicationException.read(iprot_);
508
        iprot_.readMessageEnd();
509
        throw x;
510
      }
511
      getShippingInfo_result result = new getShippingInfo_result();
512
      result.read(iprot_);
513
      iprot_.readMessageEnd();
514
      if (result.isSetSuccess()) {
515
        return result.success;
516
      }
517
      if (result.ex != null) {
518
        throw result.ex;
519
      }
520
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getShippingInfo failed: unknown result");
521
    }
522
 
523
    public BillingInfo getBillingInfo(long transactionId) throws TransactionServiceException, TException
524
    {
525
      send_getBillingInfo(transactionId);
526
      return recv_getBillingInfo();
527
    }
528
 
529
    public void send_getBillingInfo(long transactionId) throws TException
530
    {
531
      oprot_.writeMessageBegin(new TMessage("getBillingInfo", TMessageType.CALL, seqid_));
532
      getBillingInfo_args args = new getBillingInfo_args();
533
      args.transactionId = transactionId;
534
      args.write(oprot_);
535
      oprot_.writeMessageEnd();
536
      oprot_.getTransport().flush();
537
    }
538
 
539
    public BillingInfo recv_getBillingInfo() throws TransactionServiceException, TException
540
    {
541
      TMessage msg = iprot_.readMessageBegin();
542
      if (msg.type == TMessageType.EXCEPTION) {
543
        TApplicationException x = TApplicationException.read(iprot_);
544
        iprot_.readMessageEnd();
545
        throw x;
546
      }
547
      getBillingInfo_result result = new getBillingInfo_result();
548
      result.read(iprot_);
549
      iprot_.readMessageEnd();
550
      if (result.isSetSuccess()) {
551
        return result.success;
552
      }
553
      if (result.ex != null) {
554
        throw result.ex;
555
      }
556
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getBillingInfo failed: unknown result");
557
    }
558
 
559
    public boolean addBilling(long tranactionId, Billing billing) throws TransactionServiceException, TException
560
    {
561
      send_addBilling(tranactionId, billing);
562
      return recv_addBilling();
563
    }
564
 
565
    public void send_addBilling(long tranactionId, Billing billing) throws TException
566
    {
567
      oprot_.writeMessageBegin(new TMessage("addBilling", TMessageType.CALL, seqid_));
568
      addBilling_args args = new addBilling_args();
569
      args.tranactionId = tranactionId;
570
      args.billing = billing;
571
      args.write(oprot_);
572
      oprot_.writeMessageEnd();
573
      oprot_.getTransport().flush();
574
    }
575
 
576
    public boolean recv_addBilling() throws TransactionServiceException, TException
577
    {
578
      TMessage msg = iprot_.readMessageBegin();
579
      if (msg.type == TMessageType.EXCEPTION) {
580
        TApplicationException x = TApplicationException.read(iprot_);
581
        iprot_.readMessageEnd();
582
        throw x;
583
      }
584
      addBilling_result result = new addBilling_result();
585
      result.read(iprot_);
586
      iprot_.readMessageEnd();
587
      if (result.isSetSuccess()) {
588
        return result.success;
589
      }
590
      if (result.ex != null) {
591
        throw result.ex;
592
      }
593
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBilling failed: unknown result");
594
    }
595
 
596
    public boolean setShippingTracker(long transactionId, long shippingId, String trackingId, String airwayBillNo, String provider) throws TransactionServiceException, TException
597
    {
598
      send_setShippingTracker(transactionId, shippingId, trackingId, airwayBillNo, provider);
599
      return recv_setShippingTracker();
600
    }
601
 
602
    public void send_setShippingTracker(long transactionId, long shippingId, String trackingId, String airwayBillNo, String provider) throws TException
603
    {
604
      oprot_.writeMessageBegin(new TMessage("setShippingTracker", TMessageType.CALL, seqid_));
605
      setShippingTracker_args args = new setShippingTracker_args();
606
      args.transactionId = transactionId;
607
      args.shippingId = shippingId;
608
      args.trackingId = trackingId;
609
      args.airwayBillNo = airwayBillNo;
610
      args.provider = provider;
611
      args.write(oprot_);
612
      oprot_.writeMessageEnd();
613
      oprot_.getTransport().flush();
614
    }
615
 
616
    public boolean recv_setShippingTracker() throws TransactionServiceException, TException
617
    {
618
      TMessage msg = iprot_.readMessageBegin();
619
      if (msg.type == TMessageType.EXCEPTION) {
620
        TApplicationException x = TApplicationException.read(iprot_);
621
        iprot_.readMessageEnd();
622
        throw x;
623
      }
624
      setShippingTracker_result result = new setShippingTracker_result();
625
      result.read(iprot_);
626
      iprot_.readMessageEnd();
627
      if (result.isSetSuccess()) {
628
        return result.success;
629
      }
630
      if (result.ex != null) {
631
        throw result.ex;
632
      }
633
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setShippingTracker failed: unknown result");
634
    }
635
 
636
    public boolean setShippingDate(long transactionId, long shippingId, long timestamp) throws TransactionServiceException, TException
637
    {
638
      send_setShippingDate(transactionId, shippingId, timestamp);
639
      return recv_setShippingDate();
640
    }
641
 
642
    public void send_setShippingDate(long transactionId, long shippingId, long timestamp) throws TException
643
    {
644
      oprot_.writeMessageBegin(new TMessage("setShippingDate", TMessageType.CALL, seqid_));
645
      setShippingDate_args args = new setShippingDate_args();
646
      args.transactionId = transactionId;
647
      args.shippingId = shippingId;
648
      args.timestamp = timestamp;
649
      args.write(oprot_);
650
      oprot_.writeMessageEnd();
651
      oprot_.getTransport().flush();
652
    }
653
 
654
    public boolean recv_setShippingDate() throws TransactionServiceException, TException
655
    {
656
      TMessage msg = iprot_.readMessageBegin();
657
      if (msg.type == TMessageType.EXCEPTION) {
658
        TApplicationException x = TApplicationException.read(iprot_);
659
        iprot_.readMessageEnd();
660
        throw x;
661
      }
662
      setShippingDate_result result = new setShippingDate_result();
663
      result.read(iprot_);
664
      iprot_.readMessageEnd();
665
      if (result.isSetSuccess()) {
666
        return result.success;
667
      }
668
      if (result.ex != null) {
669
        throw result.ex;
670
      }
671
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setShippingDate failed: unknown result");
672
    }
673
 
674
    public boolean setDeliveryDate(long transactionId, long shippingid, long timestamp) throws TransactionServiceException, TException
675
    {
676
      send_setDeliveryDate(transactionId, shippingid, timestamp);
677
      return recv_setDeliveryDate();
678
    }
679
 
680
    public void send_setDeliveryDate(long transactionId, long shippingid, long timestamp) throws TException
681
    {
682
      oprot_.writeMessageBegin(new TMessage("setDeliveryDate", TMessageType.CALL, seqid_));
683
      setDeliveryDate_args args = new setDeliveryDate_args();
684
      args.transactionId = transactionId;
685
      args.shippingid = shippingid;
686
      args.timestamp = timestamp;
687
      args.write(oprot_);
688
      oprot_.writeMessageEnd();
689
      oprot_.getTransport().flush();
690
    }
691
 
692
    public boolean recv_setDeliveryDate() throws TransactionServiceException, TException
693
    {
694
      TMessage msg = iprot_.readMessageBegin();
695
      if (msg.type == TMessageType.EXCEPTION) {
696
        TApplicationException x = TApplicationException.read(iprot_);
697
        iprot_.readMessageEnd();
698
        throw x;
699
      }
700
      setDeliveryDate_result result = new setDeliveryDate_result();
701
      result.read(iprot_);
702
      iprot_.readMessageEnd();
703
      if (result.isSetSuccess()) {
704
        return result.success;
705
      }
706
      if (result.ex != null) {
707
        throw result.ex;
708
      }
709
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setDeliveryDate failed: unknown result");
710
    }
711
 
712
    public boolean changeShippingStatus(long transactionId, long shippingId, ShipmentStatus status, String description) throws TransactionServiceException, TException
713
    {
714
      send_changeShippingStatus(transactionId, shippingId, status, description);
715
      return recv_changeShippingStatus();
716
    }
717
 
718
    public void send_changeShippingStatus(long transactionId, long shippingId, ShipmentStatus status, String description) throws TException
719
    {
720
      oprot_.writeMessageBegin(new TMessage("changeShippingStatus", TMessageType.CALL, seqid_));
721
      changeShippingStatus_args args = new changeShippingStatus_args();
722
      args.transactionId = transactionId;
723
      args.shippingId = shippingId;
724
      args.status = status;
725
      args.description = description;
726
      args.write(oprot_);
727
      oprot_.writeMessageEnd();
728
      oprot_.getTransport().flush();
729
    }
730
 
731
    public boolean recv_changeShippingStatus() throws TransactionServiceException, TException
732
    {
733
      TMessage msg = iprot_.readMessageBegin();
734
      if (msg.type == TMessageType.EXCEPTION) {
735
        TApplicationException x = TApplicationException.read(iprot_);
736
        iprot_.readMessageEnd();
737
        throw x;
738
      }
739
      changeShippingStatus_result result = new changeShippingStatus_result();
740
      result.read(iprot_);
741
      iprot_.readMessageEnd();
742
      if (result.isSetSuccess()) {
743
        return result.success;
744
      }
745
      if (result.ex != null) {
746
        throw result.ex;
747
      }
748
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeShippingStatus failed: unknown result");
749
    }
750
 
751
    public boolean addTrail(long transactionId, String description) throws TransactionServiceException, TException
752
    {
753
      send_addTrail(transactionId, description);
754
      return recv_addTrail();
755
    }
756
 
757
    public void send_addTrail(long transactionId, String description) throws TException
758
    {
759
      oprot_.writeMessageBegin(new TMessage("addTrail", TMessageType.CALL, seqid_));
760
      addTrail_args args = new addTrail_args();
761
      args.transactionId = transactionId;
762
      args.description = description;
763
      args.write(oprot_);
764
      oprot_.writeMessageEnd();
765
      oprot_.getTransport().flush();
766
    }
767
 
768
    public boolean recv_addTrail() throws TransactionServiceException, TException
769
    {
770
      TMessage msg = iprot_.readMessageBegin();
771
      if (msg.type == TMessageType.EXCEPTION) {
772
        TApplicationException x = TApplicationException.read(iprot_);
773
        iprot_.readMessageEnd();
774
        throw x;
775
      }
776
      addTrail_result result = new addTrail_result();
777
      result.read(iprot_);
778
      iprot_.readMessageEnd();
779
      if (result.isSetSuccess()) {
780
        return result.success;
781
      }
782
      if (result.ex != null) {
783
        throw result.ex;
784
      }
785
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addTrail failed: unknown result");
786
    }
787
 
305 ashish 788
    public List<Alert> getAlerts(long transactionId, boolean valid) throws TException
789
    {
790
      send_getAlerts(transactionId, valid);
791
      return recv_getAlerts();
792
    }
793
 
794
    public void send_getAlerts(long transactionId, boolean valid) throws TException
795
    {
796
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
797
      getAlerts_args args = new getAlerts_args();
798
      args.transactionId = transactionId;
799
      args.valid = valid;
800
      args.write(oprot_);
801
      oprot_.writeMessageEnd();
802
      oprot_.getTransport().flush();
803
    }
804
 
805
    public List<Alert> recv_getAlerts() throws TException
806
    {
807
      TMessage msg = iprot_.readMessageBegin();
808
      if (msg.type == TMessageType.EXCEPTION) {
809
        TApplicationException x = TApplicationException.read(iprot_);
810
        iprot_.readMessageEnd();
811
        throw x;
812
      }
813
      getAlerts_result result = new getAlerts_result();
814
      result.read(iprot_);
815
      iprot_.readMessageEnd();
816
      if (result.isSetSuccess()) {
817
        return result.success;
818
      }
819
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
820
    }
821
 
822
    public void setAlert(long transactionId, boolean unset, long type, String comment) throws TException
823
    {
824
      send_setAlert(transactionId, unset, type, comment);
825
      recv_setAlert();
826
    }
827
 
828
    public void send_setAlert(long transactionId, boolean unset, long type, String comment) throws TException
829
    {
830
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
831
      setAlert_args args = new setAlert_args();
832
      args.transactionId = transactionId;
833
      args.unset = unset;
834
      args.type = type;
835
      args.comment = comment;
836
      args.write(oprot_);
837
      oprot_.writeMessageEnd();
838
      oprot_.getTransport().flush();
839
    }
840
 
841
    public void recv_setAlert() throws TException
842
    {
843
      TMessage msg = iprot_.readMessageBegin();
844
      if (msg.type == TMessageType.EXCEPTION) {
845
        TApplicationException x = TApplicationException.read(iprot_);
846
        iprot_.readMessageEnd();
847
        throw x;
848
      }
849
      setAlert_result result = new setAlert_result();
850
      result.read(iprot_);
851
      iprot_.readMessageEnd();
852
      return;
853
    }
854
 
855
    public ExtraOrderInfo getExtraInfo(long transaction_id) throws TException
856
    {
857
      send_getExtraInfo(transaction_id);
858
      return recv_getExtraInfo();
859
    }
860
 
861
    public void send_getExtraInfo(long transaction_id) throws TException
862
    {
863
      oprot_.writeMessageBegin(new TMessage("getExtraInfo", TMessageType.CALL, seqid_));
864
      getExtraInfo_args args = new getExtraInfo_args();
865
      args.transaction_id = transaction_id;
866
      args.write(oprot_);
867
      oprot_.writeMessageEnd();
868
      oprot_.getTransport().flush();
869
    }
870
 
871
    public ExtraOrderInfo recv_getExtraInfo() throws TException
872
    {
873
      TMessage msg = iprot_.readMessageBegin();
874
      if (msg.type == TMessageType.EXCEPTION) {
875
        TApplicationException x = TApplicationException.read(iprot_);
876
        iprot_.readMessageEnd();
877
        throw x;
878
      }
879
      getExtraInfo_result result = new getExtraInfo_result();
880
      result.read(iprot_);
881
      iprot_.readMessageEnd();
882
      if (result.isSetSuccess()) {
883
        return result.success;
884
      }
885
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getExtraInfo failed: unknown result");
886
    }
887
 
888
    public void setExtraInfo(long transaction_id, long sku_id, String model, String colour, String vendor) throws TException
889
    {
890
      send_setExtraInfo(transaction_id, sku_id, model, colour, vendor);
891
      recv_setExtraInfo();
892
    }
893
 
894
    public void send_setExtraInfo(long transaction_id, long sku_id, String model, String colour, String vendor) throws TException
895
    {
896
      oprot_.writeMessageBegin(new TMessage("setExtraInfo", TMessageType.CALL, seqid_));
897
      setExtraInfo_args args = new setExtraInfo_args();
898
      args.transaction_id = transaction_id;
899
      args.sku_id = sku_id;
900
      args.model = model;
901
      args.colour = colour;
902
      args.vendor = vendor;
903
      args.write(oprot_);
904
      oprot_.writeMessageEnd();
905
      oprot_.getTransport().flush();
906
    }
907
 
908
    public void recv_setExtraInfo() throws TException
909
    {
910
      TMessage msg = iprot_.readMessageBegin();
911
      if (msg.type == TMessageType.EXCEPTION) {
912
        TApplicationException x = TApplicationException.read(iprot_);
913
        iprot_.readMessageEnd();
914
        throw x;
915
      }
916
      setExtraInfo_result result = new setExtraInfo_result();
917
      result.read(iprot_);
918
      iprot_.readMessageEnd();
919
      return;
920
    }
921
 
68 ashish 922
  }
923
  public static class Processor implements TProcessor {
924
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
925
    public Processor(Iface iface)
926
    {
927
      iface_ = iface;
928
      processMap_.put("createTransaction", new createTransaction());
929
      processMap_.put("getTransaction", new getTransaction());
930
      processMap_.put("getAllTransactions", new getAllTransactions());
931
      processMap_.put("getTransactionsForShipmentStatus", new getTransactionsForShipmentStatus());
932
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
933
      processMap_.put("getTransactionsForCustomerAndShipmentStatus", new getTransactionsForCustomerAndShipmentStatus());
132 ashish 934
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 935
      processMap_.put("getTransactionStatus", new getTransactionStatus());
936
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
937
      processMap_.put("getOrderInfo", new getOrderInfo());
938
      processMap_.put("getShippingInfo", new getShippingInfo());
939
      processMap_.put("getBillingInfo", new getBillingInfo());
940
      processMap_.put("addBilling", new addBilling());
941
      processMap_.put("setShippingTracker", new setShippingTracker());
942
      processMap_.put("setShippingDate", new setShippingDate());
943
      processMap_.put("setDeliveryDate", new setDeliveryDate());
944
      processMap_.put("changeShippingStatus", new changeShippingStatus());
945
      processMap_.put("addTrail", new addTrail());
305 ashish 946
      processMap_.put("getAlerts", new getAlerts());
947
      processMap_.put("setAlert", new setAlert());
948
      processMap_.put("getExtraInfo", new getExtraInfo());
949
      processMap_.put("setExtraInfo", new setExtraInfo());
68 ashish 950
    }
951
 
952
    protected static interface ProcessFunction {
953
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
954
    }
955
 
956
    private Iface iface_;
957
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
958
 
959
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
960
    {
961
      TMessage msg = iprot.readMessageBegin();
962
      ProcessFunction fn = processMap_.get(msg.name);
963
      if (fn == null) {
964
        TProtocolUtil.skip(iprot, TType.STRUCT);
965
        iprot.readMessageEnd();
966
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
967
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
968
        x.write(oprot);
969
        oprot.writeMessageEnd();
970
        oprot.getTransport().flush();
971
        return true;
972
      }
973
      fn.process(msg.seqid, iprot, oprot);
974
      return true;
975
    }
976
 
977
    private class createTransaction implements ProcessFunction {
978
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
979
      {
980
        createTransaction_args args = new createTransaction_args();
981
        args.read(iprot);
982
        iprot.readMessageEnd();
983
        createTransaction_result result = new createTransaction_result();
984
        try {
132 ashish 985
          result.success = iface_.createTransaction(args.transaction);
986
          result.setSuccessIsSet(true);
68 ashish 987
        } catch (TransactionServiceException ex) {
988
          result.ex = ex;
989
        } catch (Throwable th) {
990
          LOGGER.error("Internal error processing createTransaction", th);
991
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
992
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
993
          x.write(oprot);
994
          oprot.writeMessageEnd();
995
          oprot.getTransport().flush();
996
          return;
997
        }
998
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
999
        result.write(oprot);
1000
        oprot.writeMessageEnd();
1001
        oprot.getTransport().flush();
1002
      }
1003
 
1004
    }
1005
 
1006
    private class getTransaction implements ProcessFunction {
1007
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1008
      {
1009
        getTransaction_args args = new getTransaction_args();
1010
        args.read(iprot);
1011
        iprot.readMessageEnd();
1012
        getTransaction_result result = new getTransaction_result();
1013
        try {
1014
          result.success = iface_.getTransaction(args.id);
1015
        } catch (TransactionServiceException ex) {
1016
          result.ex = ex;
1017
        } catch (Throwable th) {
1018
          LOGGER.error("Internal error processing getTransaction", th);
1019
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
1020
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
1021
          x.write(oprot);
1022
          oprot.writeMessageEnd();
1023
          oprot.getTransport().flush();
1024
          return;
1025
        }
1026
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
1027
        result.write(oprot);
1028
        oprot.writeMessageEnd();
1029
        oprot.getTransport().flush();
1030
      }
1031
 
1032
    }
1033
 
1034
    private class getAllTransactions implements ProcessFunction {
1035
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1036
      {
1037
        getAllTransactions_args args = new getAllTransactions_args();
1038
        args.read(iprot);
1039
        iprot.readMessageEnd();
1040
        getAllTransactions_result result = new getAllTransactions_result();
1041
        try {
132 ashish 1042
          result.success = iface_.getAllTransactions(args.status, args.from_date, args.to_date);
68 ashish 1043
        } catch (TransactionServiceException ex) {
1044
          result.ex = ex;
1045
        } catch (Throwable th) {
1046
          LOGGER.error("Internal error processing getAllTransactions", th);
1047
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllTransactions");
1048
          oprot.writeMessageBegin(new TMessage("getAllTransactions", TMessageType.EXCEPTION, seqid));
1049
          x.write(oprot);
1050
          oprot.writeMessageEnd();
1051
          oprot.getTransport().flush();
1052
          return;
1053
        }
1054
        oprot.writeMessageBegin(new TMessage("getAllTransactions", TMessageType.REPLY, seqid));
1055
        result.write(oprot);
1056
        oprot.writeMessageEnd();
1057
        oprot.getTransport().flush();
1058
      }
1059
 
1060
    }
1061
 
1062
    private class getTransactionsForShipmentStatus implements ProcessFunction {
1063
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1064
      {
1065
        getTransactionsForShipmentStatus_args args = new getTransactionsForShipmentStatus_args();
1066
        args.read(iprot);
1067
        iprot.readMessageEnd();
1068
        getTransactionsForShipmentStatus_result result = new getTransactionsForShipmentStatus_result();
1069
        try {
132 ashish 1070
          result.success = iface_.getTransactionsForShipmentStatus(args.status, args.from_date, args.to_date);
68 ashish 1071
        } catch (TransactionServiceException ex) {
1072
          result.ex = ex;
1073
        } catch (Throwable th) {
1074
          LOGGER.error("Internal error processing getTransactionsForShipmentStatus", th);
1075
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShipmentStatus");
1076
          oprot.writeMessageBegin(new TMessage("getTransactionsForShipmentStatus", TMessageType.EXCEPTION, seqid));
1077
          x.write(oprot);
1078
          oprot.writeMessageEnd();
1079
          oprot.getTransport().flush();
1080
          return;
1081
        }
1082
        oprot.writeMessageBegin(new TMessage("getTransactionsForShipmentStatus", TMessageType.REPLY, seqid));
1083
        result.write(oprot);
1084
        oprot.writeMessageEnd();
1085
        oprot.getTransport().flush();
1086
      }
1087
 
1088
    }
1089
 
1090
    private class getTransactionsForCustomer implements ProcessFunction {
1091
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1092
      {
1093
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1094
        args.read(iprot);
1095
        iprot.readMessageEnd();
1096
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1097
        try {
132 ashish 1098
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1099
        } catch (TransactionServiceException ex) {
1100
          result.ex = ex;
1101
        } catch (Throwable th) {
1102
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1103
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1104
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1105
          x.write(oprot);
1106
          oprot.writeMessageEnd();
1107
          oprot.getTransport().flush();
1108
          return;
1109
        }
1110
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1111
        result.write(oprot);
1112
        oprot.writeMessageEnd();
1113
        oprot.getTransport().flush();
1114
      }
1115
 
1116
    }
1117
 
1118
    private class getTransactionsForCustomerAndShipmentStatus implements ProcessFunction {
1119
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1120
      {
1121
        getTransactionsForCustomerAndShipmentStatus_args args = new getTransactionsForCustomerAndShipmentStatus_args();
1122
        args.read(iprot);
1123
        iprot.readMessageEnd();
1124
        getTransactionsForCustomerAndShipmentStatus_result result = new getTransactionsForCustomerAndShipmentStatus_result();
1125
        try {
132 ashish 1126
          result.success = iface_.getTransactionsForCustomerAndShipmentStatus(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1127
        } catch (TransactionServiceException ex) {
1128
          result.ex = ex;
1129
        } catch (Throwable th) {
1130
          LOGGER.error("Internal error processing getTransactionsForCustomerAndShipmentStatus", th);
1131
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomerAndShipmentStatus");
1132
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomerAndShipmentStatus", TMessageType.EXCEPTION, seqid));
1133
          x.write(oprot);
1134
          oprot.writeMessageEnd();
1135
          oprot.getTransport().flush();
1136
          return;
1137
        }
1138
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomerAndShipmentStatus", TMessageType.REPLY, seqid));
1139
        result.write(oprot);
1140
        oprot.writeMessageEnd();
1141
        oprot.getTransport().flush();
1142
      }
1143
 
1144
    }
1145
 
132 ashish 1146
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1147
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1148
      {
1149
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1150
        args.read(iprot);
1151
        iprot.readMessageEnd();
1152
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1153
        try {
1154
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
1155
        } catch (TransactionServiceException ex) {
1156
          result.ex = ex;
1157
        } catch (Throwable th) {
1158
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1159
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1160
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1161
          x.write(oprot);
1162
          oprot.writeMessageEnd();
1163
          oprot.getTransport().flush();
1164
          return;
1165
        }
1166
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1167
        result.write(oprot);
1168
        oprot.writeMessageEnd();
1169
        oprot.getTransport().flush();
1170
      }
1171
 
1172
    }
1173
 
68 ashish 1174
    private class getTransactionStatus implements ProcessFunction {
1175
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1176
      {
1177
        getTransactionStatus_args args = new getTransactionStatus_args();
1178
        args.read(iprot);
1179
        iprot.readMessageEnd();
1180
        getTransactionStatus_result result = new getTransactionStatus_result();
1181
        try {
1182
          result.success = iface_.getTransactionStatus(args.transactionId);
1183
        } catch (TransactionServiceException ex) {
1184
          result.ex = ex;
1185
        } catch (Throwable th) {
1186
          LOGGER.error("Internal error processing getTransactionStatus", th);
1187
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1188
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1189
          x.write(oprot);
1190
          oprot.writeMessageEnd();
1191
          oprot.getTransport().flush();
1192
          return;
1193
        }
1194
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1195
        result.write(oprot);
1196
        oprot.writeMessageEnd();
1197
        oprot.getTransport().flush();
1198
      }
1199
 
1200
    }
1201
 
1202
    private class changeTransactionStatus implements ProcessFunction {
1203
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1204
      {
1205
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1206
        args.read(iprot);
1207
        iprot.readMessageEnd();
1208
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1209
        try {
1210
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1211
          result.setSuccessIsSet(true);
1212
        } catch (TransactionServiceException ex) {
1213
          result.ex = ex;
1214
        } catch (Throwable th) {
1215
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1216
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1217
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1218
          x.write(oprot);
1219
          oprot.writeMessageEnd();
1220
          oprot.getTransport().flush();
1221
          return;
1222
        }
1223
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1224
        result.write(oprot);
1225
        oprot.writeMessageEnd();
1226
        oprot.getTransport().flush();
1227
      }
1228
 
1229
    }
1230
 
1231
    private class getOrderInfo implements ProcessFunction {
1232
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1233
      {
1234
        getOrderInfo_args args = new getOrderInfo_args();
1235
        args.read(iprot);
1236
        iprot.readMessageEnd();
1237
        getOrderInfo_result result = new getOrderInfo_result();
1238
        try {
1239
          result.success = iface_.getOrderInfo(args.transactionId);
1240
        } catch (TransactionServiceException ex) {
1241
          result.ex = ex;
1242
        } catch (Throwable th) {
1243
          LOGGER.error("Internal error processing getOrderInfo", th);
1244
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrderInfo");
1245
          oprot.writeMessageBegin(new TMessage("getOrderInfo", TMessageType.EXCEPTION, seqid));
1246
          x.write(oprot);
1247
          oprot.writeMessageEnd();
1248
          oprot.getTransport().flush();
1249
          return;
1250
        }
1251
        oprot.writeMessageBegin(new TMessage("getOrderInfo", TMessageType.REPLY, seqid));
1252
        result.write(oprot);
1253
        oprot.writeMessageEnd();
1254
        oprot.getTransport().flush();
1255
      }
1256
 
1257
    }
1258
 
1259
    private class getShippingInfo implements ProcessFunction {
1260
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1261
      {
1262
        getShippingInfo_args args = new getShippingInfo_args();
1263
        args.read(iprot);
1264
        iprot.readMessageEnd();
1265
        getShippingInfo_result result = new getShippingInfo_result();
1266
        try {
1267
          result.success = iface_.getShippingInfo(args.transactionId);
1268
        } catch (TransactionServiceException ex) {
1269
          result.ex = ex;
1270
        } catch (Throwable th) {
1271
          LOGGER.error("Internal error processing getShippingInfo", th);
1272
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getShippingInfo");
1273
          oprot.writeMessageBegin(new TMessage("getShippingInfo", TMessageType.EXCEPTION, seqid));
1274
          x.write(oprot);
1275
          oprot.writeMessageEnd();
1276
          oprot.getTransport().flush();
1277
          return;
1278
        }
1279
        oprot.writeMessageBegin(new TMessage("getShippingInfo", TMessageType.REPLY, seqid));
1280
        result.write(oprot);
1281
        oprot.writeMessageEnd();
1282
        oprot.getTransport().flush();
1283
      }
1284
 
1285
    }
1286
 
1287
    private class getBillingInfo implements ProcessFunction {
1288
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1289
      {
1290
        getBillingInfo_args args = new getBillingInfo_args();
1291
        args.read(iprot);
1292
        iprot.readMessageEnd();
1293
        getBillingInfo_result result = new getBillingInfo_result();
1294
        try {
1295
          result.success = iface_.getBillingInfo(args.transactionId);
1296
        } catch (TransactionServiceException ex) {
1297
          result.ex = ex;
1298
        } catch (Throwable th) {
1299
          LOGGER.error("Internal error processing getBillingInfo", th);
1300
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getBillingInfo");
1301
          oprot.writeMessageBegin(new TMessage("getBillingInfo", TMessageType.EXCEPTION, seqid));
1302
          x.write(oprot);
1303
          oprot.writeMessageEnd();
1304
          oprot.getTransport().flush();
1305
          return;
1306
        }
1307
        oprot.writeMessageBegin(new TMessage("getBillingInfo", TMessageType.REPLY, seqid));
1308
        result.write(oprot);
1309
        oprot.writeMessageEnd();
1310
        oprot.getTransport().flush();
1311
      }
1312
 
1313
    }
1314
 
1315
    private class addBilling implements ProcessFunction {
1316
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1317
      {
1318
        addBilling_args args = new addBilling_args();
1319
        args.read(iprot);
1320
        iprot.readMessageEnd();
1321
        addBilling_result result = new addBilling_result();
1322
        try {
1323
          result.success = iface_.addBilling(args.tranactionId, args.billing);
1324
          result.setSuccessIsSet(true);
1325
        } catch (TransactionServiceException ex) {
1326
          result.ex = ex;
1327
        } catch (Throwable th) {
1328
          LOGGER.error("Internal error processing addBilling", th);
1329
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBilling");
1330
          oprot.writeMessageBegin(new TMessage("addBilling", TMessageType.EXCEPTION, seqid));
1331
          x.write(oprot);
1332
          oprot.writeMessageEnd();
1333
          oprot.getTransport().flush();
1334
          return;
1335
        }
1336
        oprot.writeMessageBegin(new TMessage("addBilling", TMessageType.REPLY, seqid));
1337
        result.write(oprot);
1338
        oprot.writeMessageEnd();
1339
        oprot.getTransport().flush();
1340
      }
1341
 
1342
    }
1343
 
1344
    private class setShippingTracker implements ProcessFunction {
1345
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1346
      {
1347
        setShippingTracker_args args = new setShippingTracker_args();
1348
        args.read(iprot);
1349
        iprot.readMessageEnd();
1350
        setShippingTracker_result result = new setShippingTracker_result();
1351
        try {
1352
          result.success = iface_.setShippingTracker(args.transactionId, args.shippingId, args.trackingId, args.airwayBillNo, args.provider);
1353
          result.setSuccessIsSet(true);
1354
        } catch (TransactionServiceException ex) {
1355
          result.ex = ex;
1356
        } catch (Throwable th) {
1357
          LOGGER.error("Internal error processing setShippingTracker", th);
1358
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setShippingTracker");
1359
          oprot.writeMessageBegin(new TMessage("setShippingTracker", TMessageType.EXCEPTION, seqid));
1360
          x.write(oprot);
1361
          oprot.writeMessageEnd();
1362
          oprot.getTransport().flush();
1363
          return;
1364
        }
1365
        oprot.writeMessageBegin(new TMessage("setShippingTracker", TMessageType.REPLY, seqid));
1366
        result.write(oprot);
1367
        oprot.writeMessageEnd();
1368
        oprot.getTransport().flush();
1369
      }
1370
 
1371
    }
1372
 
1373
    private class setShippingDate implements ProcessFunction {
1374
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1375
      {
1376
        setShippingDate_args args = new setShippingDate_args();
1377
        args.read(iprot);
1378
        iprot.readMessageEnd();
1379
        setShippingDate_result result = new setShippingDate_result();
1380
        try {
1381
          result.success = iface_.setShippingDate(args.transactionId, args.shippingId, args.timestamp);
1382
          result.setSuccessIsSet(true);
1383
        } catch (TransactionServiceException ex) {
1384
          result.ex = ex;
1385
        } catch (Throwable th) {
1386
          LOGGER.error("Internal error processing setShippingDate", th);
1387
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setShippingDate");
1388
          oprot.writeMessageBegin(new TMessage("setShippingDate", TMessageType.EXCEPTION, seqid));
1389
          x.write(oprot);
1390
          oprot.writeMessageEnd();
1391
          oprot.getTransport().flush();
1392
          return;
1393
        }
1394
        oprot.writeMessageBegin(new TMessage("setShippingDate", TMessageType.REPLY, seqid));
1395
        result.write(oprot);
1396
        oprot.writeMessageEnd();
1397
        oprot.getTransport().flush();
1398
      }
1399
 
1400
    }
1401
 
1402
    private class setDeliveryDate implements ProcessFunction {
1403
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1404
      {
1405
        setDeliveryDate_args args = new setDeliveryDate_args();
1406
        args.read(iprot);
1407
        iprot.readMessageEnd();
1408
        setDeliveryDate_result result = new setDeliveryDate_result();
1409
        try {
1410
          result.success = iface_.setDeliveryDate(args.transactionId, args.shippingid, args.timestamp);
1411
          result.setSuccessIsSet(true);
1412
        } catch (TransactionServiceException ex) {
1413
          result.ex = ex;
1414
        } catch (Throwable th) {
1415
          LOGGER.error("Internal error processing setDeliveryDate", th);
1416
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setDeliveryDate");
1417
          oprot.writeMessageBegin(new TMessage("setDeliveryDate", TMessageType.EXCEPTION, seqid));
1418
          x.write(oprot);
1419
          oprot.writeMessageEnd();
1420
          oprot.getTransport().flush();
1421
          return;
1422
        }
1423
        oprot.writeMessageBegin(new TMessage("setDeliveryDate", TMessageType.REPLY, seqid));
1424
        result.write(oprot);
1425
        oprot.writeMessageEnd();
1426
        oprot.getTransport().flush();
1427
      }
1428
 
1429
    }
1430
 
1431
    private class changeShippingStatus implements ProcessFunction {
1432
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1433
      {
1434
        changeShippingStatus_args args = new changeShippingStatus_args();
1435
        args.read(iprot);
1436
        iprot.readMessageEnd();
1437
        changeShippingStatus_result result = new changeShippingStatus_result();
1438
        try {
1439
          result.success = iface_.changeShippingStatus(args.transactionId, args.shippingId, args.status, args.description);
1440
          result.setSuccessIsSet(true);
1441
        } catch (TransactionServiceException ex) {
1442
          result.ex = ex;
1443
        } catch (Throwable th) {
1444
          LOGGER.error("Internal error processing changeShippingStatus", th);
1445
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeShippingStatus");
1446
          oprot.writeMessageBegin(new TMessage("changeShippingStatus", TMessageType.EXCEPTION, seqid));
1447
          x.write(oprot);
1448
          oprot.writeMessageEnd();
1449
          oprot.getTransport().flush();
1450
          return;
1451
        }
1452
        oprot.writeMessageBegin(new TMessage("changeShippingStatus", TMessageType.REPLY, seqid));
1453
        result.write(oprot);
1454
        oprot.writeMessageEnd();
1455
        oprot.getTransport().flush();
1456
      }
1457
 
1458
    }
1459
 
1460
    private class addTrail implements ProcessFunction {
1461
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1462
      {
1463
        addTrail_args args = new addTrail_args();
1464
        args.read(iprot);
1465
        iprot.readMessageEnd();
1466
        addTrail_result result = new addTrail_result();
1467
        try {
1468
          result.success = iface_.addTrail(args.transactionId, args.description);
1469
          result.setSuccessIsSet(true);
1470
        } catch (TransactionServiceException ex) {
1471
          result.ex = ex;
1472
        } catch (Throwable th) {
1473
          LOGGER.error("Internal error processing addTrail", th);
1474
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addTrail");
1475
          oprot.writeMessageBegin(new TMessage("addTrail", TMessageType.EXCEPTION, seqid));
1476
          x.write(oprot);
1477
          oprot.writeMessageEnd();
1478
          oprot.getTransport().flush();
1479
          return;
1480
        }
1481
        oprot.writeMessageBegin(new TMessage("addTrail", TMessageType.REPLY, seqid));
1482
        result.write(oprot);
1483
        oprot.writeMessageEnd();
1484
        oprot.getTransport().flush();
1485
      }
1486
 
1487
    }
1488
 
305 ashish 1489
    private class getAlerts implements ProcessFunction {
1490
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1491
      {
1492
        getAlerts_args args = new getAlerts_args();
1493
        args.read(iprot);
1494
        iprot.readMessageEnd();
1495
        getAlerts_result result = new getAlerts_result();
1496
        result.success = iface_.getAlerts(args.transactionId, args.valid);
1497
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
1498
        result.write(oprot);
1499
        oprot.writeMessageEnd();
1500
        oprot.getTransport().flush();
1501
      }
1502
 
1503
    }
1504
 
1505
    private class setAlert implements ProcessFunction {
1506
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1507
      {
1508
        setAlert_args args = new setAlert_args();
1509
        args.read(iprot);
1510
        iprot.readMessageEnd();
1511
        setAlert_result result = new setAlert_result();
1512
        iface_.setAlert(args.transactionId, args.unset, args.type, args.comment);
1513
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
1514
        result.write(oprot);
1515
        oprot.writeMessageEnd();
1516
        oprot.getTransport().flush();
1517
      }
1518
 
1519
    }
1520
 
1521
    private class getExtraInfo implements ProcessFunction {
1522
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1523
      {
1524
        getExtraInfo_args args = new getExtraInfo_args();
1525
        args.read(iprot);
1526
        iprot.readMessageEnd();
1527
        getExtraInfo_result result = new getExtraInfo_result();
1528
        result.success = iface_.getExtraInfo(args.transaction_id);
1529
        oprot.writeMessageBegin(new TMessage("getExtraInfo", TMessageType.REPLY, seqid));
1530
        result.write(oprot);
1531
        oprot.writeMessageEnd();
1532
        oprot.getTransport().flush();
1533
      }
1534
 
1535
    }
1536
 
1537
    private class setExtraInfo implements ProcessFunction {
1538
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1539
      {
1540
        setExtraInfo_args args = new setExtraInfo_args();
1541
        args.read(iprot);
1542
        iprot.readMessageEnd();
1543
        setExtraInfo_result result = new setExtraInfo_result();
1544
        iface_.setExtraInfo(args.transaction_id, args.sku_id, args.model, args.colour, args.vendor);
1545
        oprot.writeMessageBegin(new TMessage("setExtraInfo", TMessageType.REPLY, seqid));
1546
        result.write(oprot);
1547
        oprot.writeMessageEnd();
1548
        oprot.getTransport().flush();
1549
      }
1550
 
1551
    }
1552
 
68 ashish 1553
  }
1554
 
1555
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable   {
1556
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
1557
 
1558
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
1559
 
1560
    private Transaction transaction;
1561
 
1562
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1563
    public enum _Fields implements TFieldIdEnum {
1564
      TRANSACTION((short)1, "transaction");
1565
 
1566
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1567
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1568
 
1569
      static {
1570
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1571
          byId.put((int)field._thriftId, field);
1572
          byName.put(field.getFieldName(), field);
1573
        }
1574
      }
1575
 
1576
      /**
1577
       * Find the _Fields constant that matches fieldId, or null if its not found.
1578
       */
1579
      public static _Fields findByThriftId(int fieldId) {
1580
        return byId.get(fieldId);
1581
      }
1582
 
1583
      /**
1584
       * Find the _Fields constant that matches fieldId, throwing an exception
1585
       * if it is not found.
1586
       */
1587
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1588
        _Fields fields = findByThriftId(fieldId);
1589
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1590
        return fields;
1591
      }
1592
 
1593
      /**
1594
       * Find the _Fields constant that matches name, or null if its not found.
1595
       */
1596
      public static _Fields findByName(String name) {
1597
        return byName.get(name);
1598
      }
1599
 
1600
      private final short _thriftId;
1601
      private final String _fieldName;
1602
 
1603
      _Fields(short thriftId, String fieldName) {
1604
        _thriftId = thriftId;
1605
        _fieldName = fieldName;
1606
      }
1607
 
1608
      public short getThriftFieldId() {
1609
        return _thriftId;
1610
      }
1611
 
1612
      public String getFieldName() {
1613
        return _fieldName;
1614
      }
1615
    }
1616
 
1617
    // isset id assignments
1618
 
1619
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1620
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
1621
          new StructMetaData(TType.STRUCT, Transaction.class)));
1622
    }});
1623
 
1624
    static {
1625
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
1626
    }
1627
 
1628
    public createTransaction_args() {
1629
    }
1630
 
1631
    public createTransaction_args(
1632
      Transaction transaction)
1633
    {
1634
      this();
1635
      this.transaction = transaction;
1636
    }
1637
 
1638
    /**
1639
     * Performs a deep copy on <i>other</i>.
1640
     */
1641
    public createTransaction_args(createTransaction_args other) {
1642
      if (other.isSetTransaction()) {
1643
        this.transaction = new Transaction(other.transaction);
1644
      }
1645
    }
1646
 
1647
    public createTransaction_args deepCopy() {
1648
      return new createTransaction_args(this);
1649
    }
1650
 
1651
    @Deprecated
1652
    public createTransaction_args clone() {
1653
      return new createTransaction_args(this);
1654
    }
1655
 
1656
    public Transaction getTransaction() {
1657
      return this.transaction;
1658
    }
1659
 
1660
    public createTransaction_args setTransaction(Transaction transaction) {
1661
      this.transaction = transaction;
1662
      return this;
1663
    }
1664
 
1665
    public void unsetTransaction() {
1666
      this.transaction = null;
1667
    }
1668
 
1669
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
1670
    public boolean isSetTransaction() {
1671
      return this.transaction != null;
1672
    }
1673
 
1674
    public void setTransactionIsSet(boolean value) {
1675
      if (!value) {
1676
        this.transaction = null;
1677
      }
1678
    }
1679
 
1680
    public void setFieldValue(_Fields field, Object value) {
1681
      switch (field) {
1682
      case TRANSACTION:
1683
        if (value == null) {
1684
          unsetTransaction();
1685
        } else {
1686
          setTransaction((Transaction)value);
1687
        }
1688
        break;
1689
 
1690
      }
1691
    }
1692
 
1693
    public void setFieldValue(int fieldID, Object value) {
1694
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1695
    }
1696
 
1697
    public Object getFieldValue(_Fields field) {
1698
      switch (field) {
1699
      case TRANSACTION:
1700
        return getTransaction();
1701
 
1702
      }
1703
      throw new IllegalStateException();
1704
    }
1705
 
1706
    public Object getFieldValue(int fieldId) {
1707
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1708
    }
1709
 
1710
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1711
    public boolean isSet(_Fields field) {
1712
      switch (field) {
1713
      case TRANSACTION:
1714
        return isSetTransaction();
1715
      }
1716
      throw new IllegalStateException();
1717
    }
1718
 
1719
    public boolean isSet(int fieldID) {
1720
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1721
    }
1722
 
1723
    @Override
1724
    public boolean equals(Object that) {
1725
      if (that == null)
1726
        return false;
1727
      if (that instanceof createTransaction_args)
1728
        return this.equals((createTransaction_args)that);
1729
      return false;
1730
    }
1731
 
1732
    public boolean equals(createTransaction_args that) {
1733
      if (that == null)
1734
        return false;
1735
 
1736
      boolean this_present_transaction = true && this.isSetTransaction();
1737
      boolean that_present_transaction = true && that.isSetTransaction();
1738
      if (this_present_transaction || that_present_transaction) {
1739
        if (!(this_present_transaction && that_present_transaction))
1740
          return false;
1741
        if (!this.transaction.equals(that.transaction))
1742
          return false;
1743
      }
1744
 
1745
      return true;
1746
    }
1747
 
1748
    @Override
1749
    public int hashCode() {
1750
      return 0;
1751
    }
1752
 
1753
    public void read(TProtocol iprot) throws TException {
1754
      TField field;
1755
      iprot.readStructBegin();
1756
      while (true)
1757
      {
1758
        field = iprot.readFieldBegin();
1759
        if (field.type == TType.STOP) { 
1760
          break;
1761
        }
1762
        _Fields fieldId = _Fields.findByThriftId(field.id);
1763
        if (fieldId == null) {
1764
          TProtocolUtil.skip(iprot, field.type);
1765
        } else {
1766
          switch (fieldId) {
1767
            case TRANSACTION:
1768
              if (field.type == TType.STRUCT) {
1769
                this.transaction = new Transaction();
1770
                this.transaction.read(iprot);
1771
              } else { 
1772
                TProtocolUtil.skip(iprot, field.type);
1773
              }
1774
              break;
1775
          }
1776
          iprot.readFieldEnd();
1777
        }
1778
      }
1779
      iprot.readStructEnd();
1780
      validate();
1781
    }
1782
 
1783
    public void write(TProtocol oprot) throws TException {
1784
      validate();
1785
 
1786
      oprot.writeStructBegin(STRUCT_DESC);
1787
      if (this.transaction != null) {
1788
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
1789
        this.transaction.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_args(");
1799
      boolean first = true;
1800
 
1801
      sb.append("transaction:");
1802
      if (this.transaction == null) {
1803
        sb.append("null");
1804
      } else {
1805
        sb.append(this.transaction);
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 createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
1819
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
1820
 
132 ashish 1821
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 1822
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
1823
 
132 ashish 1824
    private long success;
68 ashish 1825
    private TransactionServiceException ex;
1826
 
1827
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1828
    public enum _Fields implements TFieldIdEnum {
132 ashish 1829
      SUCCESS((short)0, "success"),
68 ashish 1830
      EX((short)1, "ex");
1831
 
1832
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1833
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1834
 
1835
      static {
1836
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1837
          byId.put((int)field._thriftId, field);
1838
          byName.put(field.getFieldName(), field);
1839
        }
1840
      }
1841
 
1842
      /**
1843
       * Find the _Fields constant that matches fieldId, or null if its not found.
1844
       */
1845
      public static _Fields findByThriftId(int fieldId) {
1846
        return byId.get(fieldId);
1847
      }
1848
 
1849
      /**
1850
       * Find the _Fields constant that matches fieldId, throwing an exception
1851
       * if it is not found.
1852
       */
1853
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1854
        _Fields fields = findByThriftId(fieldId);
1855
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1856
        return fields;
1857
      }
1858
 
1859
      /**
1860
       * Find the _Fields constant that matches name, or null if its not found.
1861
       */
1862
      public static _Fields findByName(String name) {
1863
        return byName.get(name);
1864
      }
1865
 
1866
      private final short _thriftId;
1867
      private final String _fieldName;
1868
 
1869
      _Fields(short thriftId, String fieldName) {
1870
        _thriftId = thriftId;
1871
        _fieldName = fieldName;
1872
      }
1873
 
1874
      public short getThriftFieldId() {
1875
        return _thriftId;
1876
      }
1877
 
1878
      public String getFieldName() {
1879
        return _fieldName;
1880
      }
1881
    }
1882
 
1883
    // isset id assignments
132 ashish 1884
    private static final int __SUCCESS_ISSET_ID = 0;
1885
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 1886
 
1887
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 1888
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1889
          new FieldValueMetaData(TType.I64)));
68 ashish 1890
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
1891
          new FieldValueMetaData(TType.STRUCT)));
1892
    }});
1893
 
1894
    static {
1895
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
1896
    }
1897
 
1898
    public createTransaction_result() {
1899
    }
1900
 
1901
    public createTransaction_result(
132 ashish 1902
      long success,
68 ashish 1903
      TransactionServiceException ex)
1904
    {
1905
      this();
132 ashish 1906
      this.success = success;
1907
      setSuccessIsSet(true);
68 ashish 1908
      this.ex = ex;
1909
    }
1910
 
1911
    /**
1912
     * Performs a deep copy on <i>other</i>.
1913
     */
1914
    public createTransaction_result(createTransaction_result other) {
132 ashish 1915
      __isset_bit_vector.clear();
1916
      __isset_bit_vector.or(other.__isset_bit_vector);
1917
      this.success = other.success;
68 ashish 1918
      if (other.isSetEx()) {
1919
        this.ex = new TransactionServiceException(other.ex);
1920
      }
1921
    }
1922
 
1923
    public createTransaction_result deepCopy() {
1924
      return new createTransaction_result(this);
1925
    }
1926
 
1927
    @Deprecated
1928
    public createTransaction_result clone() {
1929
      return new createTransaction_result(this);
1930
    }
1931
 
132 ashish 1932
    public long getSuccess() {
1933
      return this.success;
1934
    }
1935
 
1936
    public createTransaction_result setSuccess(long success) {
1937
      this.success = success;
1938
      setSuccessIsSet(true);
1939
      return this;
1940
    }
1941
 
1942
    public void unsetSuccess() {
1943
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
1944
    }
1945
 
1946
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
1947
    public boolean isSetSuccess() {
1948
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
1949
    }
1950
 
1951
    public void setSuccessIsSet(boolean value) {
1952
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
1953
    }
1954
 
68 ashish 1955
    public TransactionServiceException getEx() {
1956
      return this.ex;
1957
    }
1958
 
1959
    public createTransaction_result setEx(TransactionServiceException ex) {
1960
      this.ex = ex;
1961
      return this;
1962
    }
1963
 
1964
    public void unsetEx() {
1965
      this.ex = null;
1966
    }
1967
 
1968
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
1969
    public boolean isSetEx() {
1970
      return this.ex != null;
1971
    }
1972
 
1973
    public void setExIsSet(boolean value) {
1974
      if (!value) {
1975
        this.ex = null;
1976
      }
1977
    }
1978
 
1979
    public void setFieldValue(_Fields field, Object value) {
1980
      switch (field) {
132 ashish 1981
      case SUCCESS:
1982
        if (value == null) {
1983
          unsetSuccess();
1984
        } else {
1985
          setSuccess((Long)value);
1986
        }
1987
        break;
1988
 
68 ashish 1989
      case EX:
1990
        if (value == null) {
1991
          unsetEx();
1992
        } else {
1993
          setEx((TransactionServiceException)value);
1994
        }
1995
        break;
1996
 
1997
      }
1998
    }
1999
 
2000
    public void setFieldValue(int fieldID, Object value) {
2001
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2002
    }
2003
 
2004
    public Object getFieldValue(_Fields field) {
2005
      switch (field) {
132 ashish 2006
      case SUCCESS:
2007
        return new Long(getSuccess());
2008
 
68 ashish 2009
      case EX:
2010
        return getEx();
2011
 
2012
      }
2013
      throw new IllegalStateException();
2014
    }
2015
 
2016
    public Object getFieldValue(int fieldId) {
2017
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2018
    }
2019
 
2020
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2021
    public boolean isSet(_Fields field) {
2022
      switch (field) {
132 ashish 2023
      case SUCCESS:
2024
        return isSetSuccess();
68 ashish 2025
      case EX:
2026
        return isSetEx();
2027
      }
2028
      throw new IllegalStateException();
2029
    }
2030
 
2031
    public boolean isSet(int fieldID) {
2032
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2033
    }
2034
 
2035
    @Override
2036
    public boolean equals(Object that) {
2037
      if (that == null)
2038
        return false;
2039
      if (that instanceof createTransaction_result)
2040
        return this.equals((createTransaction_result)that);
2041
      return false;
2042
    }
2043
 
2044
    public boolean equals(createTransaction_result that) {
2045
      if (that == null)
2046
        return false;
2047
 
132 ashish 2048
      boolean this_present_success = true;
2049
      boolean that_present_success = true;
2050
      if (this_present_success || that_present_success) {
2051
        if (!(this_present_success && that_present_success))
2052
          return false;
2053
        if (this.success != that.success)
2054
          return false;
2055
      }
2056
 
68 ashish 2057
      boolean this_present_ex = true && this.isSetEx();
2058
      boolean that_present_ex = true && that.isSetEx();
2059
      if (this_present_ex || that_present_ex) {
2060
        if (!(this_present_ex && that_present_ex))
2061
          return false;
2062
        if (!this.ex.equals(that.ex))
2063
          return false;
2064
      }
2065
 
2066
      return true;
2067
    }
2068
 
2069
    @Override
2070
    public int hashCode() {
2071
      return 0;
2072
    }
2073
 
2074
    public int compareTo(createTransaction_result other) {
2075
      if (!getClass().equals(other.getClass())) {
2076
        return getClass().getName().compareTo(other.getClass().getName());
2077
      }
2078
 
2079
      int lastComparison = 0;
2080
      createTransaction_result typedOther = (createTransaction_result)other;
2081
 
132 ashish 2082
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
2083
      if (lastComparison != 0) {
2084
        return lastComparison;
2085
      }
2086
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
2087
      if (lastComparison != 0) {
2088
        return lastComparison;
2089
      }
68 ashish 2090
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
2091
      if (lastComparison != 0) {
2092
        return lastComparison;
2093
      }
2094
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
2095
      if (lastComparison != 0) {
2096
        return lastComparison;
2097
      }
2098
      return 0;
2099
    }
2100
 
2101
    public void read(TProtocol iprot) throws TException {
2102
      TField field;
2103
      iprot.readStructBegin();
2104
      while (true)
2105
      {
2106
        field = iprot.readFieldBegin();
2107
        if (field.type == TType.STOP) { 
2108
          break;
2109
        }
2110
        _Fields fieldId = _Fields.findByThriftId(field.id);
2111
        if (fieldId == null) {
2112
          TProtocolUtil.skip(iprot, field.type);
2113
        } else {
2114
          switch (fieldId) {
132 ashish 2115
            case SUCCESS:
2116
              if (field.type == TType.I64) {
2117
                this.success = iprot.readI64();
2118
                setSuccessIsSet(true);
2119
              } else { 
2120
                TProtocolUtil.skip(iprot, field.type);
2121
              }
2122
              break;
68 ashish 2123
            case EX:
2124
              if (field.type == TType.STRUCT) {
2125
                this.ex = new TransactionServiceException();
2126
                this.ex.read(iprot);
2127
              } else { 
2128
                TProtocolUtil.skip(iprot, field.type);
2129
              }
2130
              break;
2131
          }
2132
          iprot.readFieldEnd();
2133
        }
2134
      }
2135
      iprot.readStructEnd();
2136
      validate();
2137
    }
2138
 
2139
    public void write(TProtocol oprot) throws TException {
2140
      oprot.writeStructBegin(STRUCT_DESC);
2141
 
132 ashish 2142
      if (this.isSetSuccess()) {
2143
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2144
        oprot.writeI64(this.success);
2145
        oprot.writeFieldEnd();
2146
      } else if (this.isSetEx()) {
68 ashish 2147
        oprot.writeFieldBegin(EX_FIELD_DESC);
2148
        this.ex.write(oprot);
2149
        oprot.writeFieldEnd();
2150
      }
2151
      oprot.writeFieldStop();
2152
      oprot.writeStructEnd();
2153
    }
2154
 
2155
    @Override
2156
    public String toString() {
2157
      StringBuilder sb = new StringBuilder("createTransaction_result(");
2158
      boolean first = true;
2159
 
132 ashish 2160
      sb.append("success:");
2161
      sb.append(this.success);
2162
      first = false;
2163
      if (!first) sb.append(", ");
68 ashish 2164
      sb.append("ex:");
2165
      if (this.ex == null) {
2166
        sb.append("null");
2167
      } else {
2168
        sb.append(this.ex);
2169
      }
2170
      first = false;
2171
      sb.append(")");
2172
      return sb.toString();
2173
    }
2174
 
2175
    public void validate() throws TException {
2176
      // check for required fields
2177
    }
2178
 
2179
  }
2180
 
2181
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
2182
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
2183
 
2184
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
2185
 
2186
    private long id;
2187
 
2188
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2189
    public enum _Fields implements TFieldIdEnum {
2190
      ID((short)1, "id");
2191
 
2192
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2193
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2194
 
2195
      static {
2196
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2197
          byId.put((int)field._thriftId, field);
2198
          byName.put(field.getFieldName(), field);
2199
        }
2200
      }
2201
 
2202
      /**
2203
       * Find the _Fields constant that matches fieldId, or null if its not found.
2204
       */
2205
      public static _Fields findByThriftId(int fieldId) {
2206
        return byId.get(fieldId);
2207
      }
2208
 
2209
      /**
2210
       * Find the _Fields constant that matches fieldId, throwing an exception
2211
       * if it is not found.
2212
       */
2213
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2214
        _Fields fields = findByThriftId(fieldId);
2215
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2216
        return fields;
2217
      }
2218
 
2219
      /**
2220
       * Find the _Fields constant that matches name, or null if its not found.
2221
       */
2222
      public static _Fields findByName(String name) {
2223
        return byName.get(name);
2224
      }
2225
 
2226
      private final short _thriftId;
2227
      private final String _fieldName;
2228
 
2229
      _Fields(short thriftId, String fieldName) {
2230
        _thriftId = thriftId;
2231
        _fieldName = fieldName;
2232
      }
2233
 
2234
      public short getThriftFieldId() {
2235
        return _thriftId;
2236
      }
2237
 
2238
      public String getFieldName() {
2239
        return _fieldName;
2240
      }
2241
    }
2242
 
2243
    // isset id assignments
2244
    private static final int __ID_ISSET_ID = 0;
2245
    private BitSet __isset_bit_vector = new BitSet(1);
2246
 
2247
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2248
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
2249
          new FieldValueMetaData(TType.I64)));
2250
    }});
2251
 
2252
    static {
2253
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
2254
    }
2255
 
2256
    public getTransaction_args() {
2257
    }
2258
 
2259
    public getTransaction_args(
2260
      long id)
2261
    {
2262
      this();
2263
      this.id = id;
2264
      setIdIsSet(true);
2265
    }
2266
 
2267
    /**
2268
     * Performs a deep copy on <i>other</i>.
2269
     */
2270
    public getTransaction_args(getTransaction_args other) {
2271
      __isset_bit_vector.clear();
2272
      __isset_bit_vector.or(other.__isset_bit_vector);
2273
      this.id = other.id;
2274
    }
2275
 
2276
    public getTransaction_args deepCopy() {
2277
      return new getTransaction_args(this);
2278
    }
2279
 
2280
    @Deprecated
2281
    public getTransaction_args clone() {
2282
      return new getTransaction_args(this);
2283
    }
2284
 
2285
    public long getId() {
2286
      return this.id;
2287
    }
2288
 
2289
    public getTransaction_args setId(long id) {
2290
      this.id = id;
2291
      setIdIsSet(true);
2292
      return this;
2293
    }
2294
 
2295
    public void unsetId() {
2296
      __isset_bit_vector.clear(__ID_ISSET_ID);
2297
    }
2298
 
2299
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
2300
    public boolean isSetId() {
2301
      return __isset_bit_vector.get(__ID_ISSET_ID);
2302
    }
2303
 
2304
    public void setIdIsSet(boolean value) {
2305
      __isset_bit_vector.set(__ID_ISSET_ID, value);
2306
    }
2307
 
2308
    public void setFieldValue(_Fields field, Object value) {
2309
      switch (field) {
2310
      case ID:
2311
        if (value == null) {
2312
          unsetId();
2313
        } else {
2314
          setId((Long)value);
2315
        }
2316
        break;
2317
 
2318
      }
2319
    }
2320
 
2321
    public void setFieldValue(int fieldID, Object value) {
2322
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2323
    }
2324
 
2325
    public Object getFieldValue(_Fields field) {
2326
      switch (field) {
2327
      case ID:
2328
        return new Long(getId());
2329
 
2330
      }
2331
      throw new IllegalStateException();
2332
    }
2333
 
2334
    public Object getFieldValue(int fieldId) {
2335
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2336
    }
2337
 
2338
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2339
    public boolean isSet(_Fields field) {
2340
      switch (field) {
2341
      case ID:
2342
        return isSetId();
2343
      }
2344
      throw new IllegalStateException();
2345
    }
2346
 
2347
    public boolean isSet(int fieldID) {
2348
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2349
    }
2350
 
2351
    @Override
2352
    public boolean equals(Object that) {
2353
      if (that == null)
2354
        return false;
2355
      if (that instanceof getTransaction_args)
2356
        return this.equals((getTransaction_args)that);
2357
      return false;
2358
    }
2359
 
2360
    public boolean equals(getTransaction_args that) {
2361
      if (that == null)
2362
        return false;
2363
 
2364
      boolean this_present_id = true;
2365
      boolean that_present_id = true;
2366
      if (this_present_id || that_present_id) {
2367
        if (!(this_present_id && that_present_id))
2368
          return false;
2369
        if (this.id != that.id)
2370
          return false;
2371
      }
2372
 
2373
      return true;
2374
    }
2375
 
2376
    @Override
2377
    public int hashCode() {
2378
      return 0;
2379
    }
2380
 
2381
    public int compareTo(getTransaction_args other) {
2382
      if (!getClass().equals(other.getClass())) {
2383
        return getClass().getName().compareTo(other.getClass().getName());
2384
      }
2385
 
2386
      int lastComparison = 0;
2387
      getTransaction_args typedOther = (getTransaction_args)other;
2388
 
2389
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
2390
      if (lastComparison != 0) {
2391
        return lastComparison;
2392
      }
2393
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
2394
      if (lastComparison != 0) {
2395
        return lastComparison;
2396
      }
2397
      return 0;
2398
    }
2399
 
2400
    public void read(TProtocol iprot) throws TException {
2401
      TField field;
2402
      iprot.readStructBegin();
2403
      while (true)
2404
      {
2405
        field = iprot.readFieldBegin();
2406
        if (field.type == TType.STOP) { 
2407
          break;
2408
        }
2409
        _Fields fieldId = _Fields.findByThriftId(field.id);
2410
        if (fieldId == null) {
2411
          TProtocolUtil.skip(iprot, field.type);
2412
        } else {
2413
          switch (fieldId) {
2414
            case ID:
2415
              if (field.type == TType.I64) {
2416
                this.id = iprot.readI64();
2417
                setIdIsSet(true);
2418
              } else { 
2419
                TProtocolUtil.skip(iprot, field.type);
2420
              }
2421
              break;
2422
          }
2423
          iprot.readFieldEnd();
2424
        }
2425
      }
2426
      iprot.readStructEnd();
2427
      validate();
2428
    }
2429
 
2430
    public void write(TProtocol oprot) throws TException {
2431
      validate();
2432
 
2433
      oprot.writeStructBegin(STRUCT_DESC);
2434
      oprot.writeFieldBegin(ID_FIELD_DESC);
2435
      oprot.writeI64(this.id);
2436
      oprot.writeFieldEnd();
2437
      oprot.writeFieldStop();
2438
      oprot.writeStructEnd();
2439
    }
2440
 
2441
    @Override
2442
    public String toString() {
2443
      StringBuilder sb = new StringBuilder("getTransaction_args(");
2444
      boolean first = true;
2445
 
2446
      sb.append("id:");
2447
      sb.append(this.id);
2448
      first = false;
2449
      sb.append(")");
2450
      return sb.toString();
2451
    }
2452
 
2453
    public void validate() throws TException {
2454
      // check for required fields
2455
    }
2456
 
2457
  }
2458
 
2459
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable   {
2460
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
2461
 
2462
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
2463
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
2464
 
2465
    private Transaction success;
2466
    private TransactionServiceException ex;
2467
 
2468
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2469
    public enum _Fields implements TFieldIdEnum {
2470
      SUCCESS((short)0, "success"),
2471
      EX((short)1, "ex");
2472
 
2473
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2474
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2475
 
2476
      static {
2477
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2478
          byId.put((int)field._thriftId, field);
2479
          byName.put(field.getFieldName(), field);
2480
        }
2481
      }
2482
 
2483
      /**
2484
       * Find the _Fields constant that matches fieldId, or null if its not found.
2485
       */
2486
      public static _Fields findByThriftId(int fieldId) {
2487
        return byId.get(fieldId);
2488
      }
2489
 
2490
      /**
2491
       * Find the _Fields constant that matches fieldId, throwing an exception
2492
       * if it is not found.
2493
       */
2494
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2495
        _Fields fields = findByThriftId(fieldId);
2496
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2497
        return fields;
2498
      }
2499
 
2500
      /**
2501
       * Find the _Fields constant that matches name, or null if its not found.
2502
       */
2503
      public static _Fields findByName(String name) {
2504
        return byName.get(name);
2505
      }
2506
 
2507
      private final short _thriftId;
2508
      private final String _fieldName;
2509
 
2510
      _Fields(short thriftId, String fieldName) {
2511
        _thriftId = thriftId;
2512
        _fieldName = fieldName;
2513
      }
2514
 
2515
      public short getThriftFieldId() {
2516
        return _thriftId;
2517
      }
2518
 
2519
      public String getFieldName() {
2520
        return _fieldName;
2521
      }
2522
    }
2523
 
2524
    // isset id assignments
2525
 
2526
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2527
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2528
          new StructMetaData(TType.STRUCT, Transaction.class)));
2529
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
2530
          new FieldValueMetaData(TType.STRUCT)));
2531
    }});
2532
 
2533
    static {
2534
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
2535
    }
2536
 
2537
    public getTransaction_result() {
2538
    }
2539
 
2540
    public getTransaction_result(
2541
      Transaction success,
2542
      TransactionServiceException ex)
2543
    {
2544
      this();
2545
      this.success = success;
2546
      this.ex = ex;
2547
    }
2548
 
2549
    /**
2550
     * Performs a deep copy on <i>other</i>.
2551
     */
2552
    public getTransaction_result(getTransaction_result other) {
2553
      if (other.isSetSuccess()) {
2554
        this.success = new Transaction(other.success);
2555
      }
2556
      if (other.isSetEx()) {
2557
        this.ex = new TransactionServiceException(other.ex);
2558
      }
2559
    }
2560
 
2561
    public getTransaction_result deepCopy() {
2562
      return new getTransaction_result(this);
2563
    }
2564
 
2565
    @Deprecated
2566
    public getTransaction_result clone() {
2567
      return new getTransaction_result(this);
2568
    }
2569
 
2570
    public Transaction getSuccess() {
2571
      return this.success;
2572
    }
2573
 
2574
    public getTransaction_result setSuccess(Transaction success) {
2575
      this.success = success;
2576
      return this;
2577
    }
2578
 
2579
    public void unsetSuccess() {
2580
      this.success = null;
2581
    }
2582
 
2583
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2584
    public boolean isSetSuccess() {
2585
      return this.success != null;
2586
    }
2587
 
2588
    public void setSuccessIsSet(boolean value) {
2589
      if (!value) {
2590
        this.success = null;
2591
      }
2592
    }
2593
 
2594
    public TransactionServiceException getEx() {
2595
      return this.ex;
2596
    }
2597
 
2598
    public getTransaction_result setEx(TransactionServiceException ex) {
2599
      this.ex = ex;
2600
      return this;
2601
    }
2602
 
2603
    public void unsetEx() {
2604
      this.ex = null;
2605
    }
2606
 
2607
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
2608
    public boolean isSetEx() {
2609
      return this.ex != null;
2610
    }
2611
 
2612
    public void setExIsSet(boolean value) {
2613
      if (!value) {
2614
        this.ex = null;
2615
      }
2616
    }
2617
 
2618
    public void setFieldValue(_Fields field, Object value) {
2619
      switch (field) {
2620
      case SUCCESS:
2621
        if (value == null) {
2622
          unsetSuccess();
2623
        } else {
2624
          setSuccess((Transaction)value);
2625
        }
2626
        break;
2627
 
2628
      case EX:
2629
        if (value == null) {
2630
          unsetEx();
2631
        } else {
2632
          setEx((TransactionServiceException)value);
2633
        }
2634
        break;
2635
 
2636
      }
2637
    }
2638
 
2639
    public void setFieldValue(int fieldID, Object value) {
2640
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2641
    }
2642
 
2643
    public Object getFieldValue(_Fields field) {
2644
      switch (field) {
2645
      case SUCCESS:
2646
        return getSuccess();
2647
 
2648
      case EX:
2649
        return getEx();
2650
 
2651
      }
2652
      throw new IllegalStateException();
2653
    }
2654
 
2655
    public Object getFieldValue(int fieldId) {
2656
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2657
    }
2658
 
2659
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2660
    public boolean isSet(_Fields field) {
2661
      switch (field) {
2662
      case SUCCESS:
2663
        return isSetSuccess();
2664
      case EX:
2665
        return isSetEx();
2666
      }
2667
      throw new IllegalStateException();
2668
    }
2669
 
2670
    public boolean isSet(int fieldID) {
2671
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2672
    }
2673
 
2674
    @Override
2675
    public boolean equals(Object that) {
2676
      if (that == null)
2677
        return false;
2678
      if (that instanceof getTransaction_result)
2679
        return this.equals((getTransaction_result)that);
2680
      return false;
2681
    }
2682
 
2683
    public boolean equals(getTransaction_result that) {
2684
      if (that == null)
2685
        return false;
2686
 
2687
      boolean this_present_success = true && this.isSetSuccess();
2688
      boolean that_present_success = true && that.isSetSuccess();
2689
      if (this_present_success || that_present_success) {
2690
        if (!(this_present_success && that_present_success))
2691
          return false;
2692
        if (!this.success.equals(that.success))
2693
          return false;
2694
      }
2695
 
2696
      boolean this_present_ex = true && this.isSetEx();
2697
      boolean that_present_ex = true && that.isSetEx();
2698
      if (this_present_ex || that_present_ex) {
2699
        if (!(this_present_ex && that_present_ex))
2700
          return false;
2701
        if (!this.ex.equals(that.ex))
2702
          return false;
2703
      }
2704
 
2705
      return true;
2706
    }
2707
 
2708
    @Override
2709
    public int hashCode() {
2710
      return 0;
2711
    }
2712
 
2713
    public void read(TProtocol iprot) throws TException {
2714
      TField field;
2715
      iprot.readStructBegin();
2716
      while (true)
2717
      {
2718
        field = iprot.readFieldBegin();
2719
        if (field.type == TType.STOP) { 
2720
          break;
2721
        }
2722
        _Fields fieldId = _Fields.findByThriftId(field.id);
2723
        if (fieldId == null) {
2724
          TProtocolUtil.skip(iprot, field.type);
2725
        } else {
2726
          switch (fieldId) {
2727
            case SUCCESS:
2728
              if (field.type == TType.STRUCT) {
2729
                this.success = new Transaction();
2730
                this.success.read(iprot);
2731
              } else { 
2732
                TProtocolUtil.skip(iprot, field.type);
2733
              }
2734
              break;
2735
            case EX:
2736
              if (field.type == TType.STRUCT) {
2737
                this.ex = new TransactionServiceException();
2738
                this.ex.read(iprot);
2739
              } else { 
2740
                TProtocolUtil.skip(iprot, field.type);
2741
              }
2742
              break;
2743
          }
2744
          iprot.readFieldEnd();
2745
        }
2746
      }
2747
      iprot.readStructEnd();
2748
      validate();
2749
    }
2750
 
2751
    public void write(TProtocol oprot) throws TException {
2752
      oprot.writeStructBegin(STRUCT_DESC);
2753
 
2754
      if (this.isSetSuccess()) {
2755
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2756
        this.success.write(oprot);
2757
        oprot.writeFieldEnd();
2758
      } else if (this.isSetEx()) {
2759
        oprot.writeFieldBegin(EX_FIELD_DESC);
2760
        this.ex.write(oprot);
2761
        oprot.writeFieldEnd();
2762
      }
2763
      oprot.writeFieldStop();
2764
      oprot.writeStructEnd();
2765
    }
2766
 
2767
    @Override
2768
    public String toString() {
2769
      StringBuilder sb = new StringBuilder("getTransaction_result(");
2770
      boolean first = true;
2771
 
2772
      sb.append("success:");
2773
      if (this.success == null) {
2774
        sb.append("null");
2775
      } else {
2776
        sb.append(this.success);
2777
      }
2778
      first = false;
2779
      if (!first) sb.append(", ");
2780
      sb.append("ex:");
2781
      if (this.ex == null) {
2782
        sb.append("null");
2783
      } else {
2784
        sb.append(this.ex);
2785
      }
2786
      first = false;
2787
      sb.append(")");
2788
      return sb.toString();
2789
    }
2790
 
2791
    public void validate() throws TException {
2792
      // check for required fields
2793
    }
2794
 
2795
  }
2796
 
2797
  public static class getAllTransactions_args implements TBase<getAllTransactions_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllTransactions_args>   {
2798
    private static final TStruct STRUCT_DESC = new TStruct("getAllTransactions_args");
2799
 
2800
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
132 ashish 2801
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
2802
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 2803
 
2804
    private TransactionStatus status;
132 ashish 2805
    private long from_date;
2806
    private long to_date;
68 ashish 2807
 
2808
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2809
    public enum _Fields implements TFieldIdEnum {
2810
      /**
2811
       * 
2812
       * @see TransactionStatus
2813
       */
2814
      STATUS((short)1, "status"),
132 ashish 2815
      FROM_DATE((short)2, "from_date"),
2816
      TO_DATE((short)3, "to_date");
68 ashish 2817
 
2818
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2819
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2820
 
2821
      static {
2822
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2823
          byId.put((int)field._thriftId, field);
2824
          byName.put(field.getFieldName(), field);
2825
        }
2826
      }
2827
 
2828
      /**
2829
       * Find the _Fields constant that matches fieldId, or null if its not found.
2830
       */
2831
      public static _Fields findByThriftId(int fieldId) {
2832
        return byId.get(fieldId);
2833
      }
2834
 
2835
      /**
2836
       * Find the _Fields constant that matches fieldId, throwing an exception
2837
       * if it is not found.
2838
       */
2839
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2840
        _Fields fields = findByThriftId(fieldId);
2841
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2842
        return fields;
2843
      }
2844
 
2845
      /**
2846
       * Find the _Fields constant that matches name, or null if its not found.
2847
       */
2848
      public static _Fields findByName(String name) {
2849
        return byName.get(name);
2850
      }
2851
 
2852
      private final short _thriftId;
2853
      private final String _fieldName;
2854
 
2855
      _Fields(short thriftId, String fieldName) {
2856
        _thriftId = thriftId;
2857
        _fieldName = fieldName;
2858
      }
2859
 
2860
      public short getThriftFieldId() {
2861
        return _thriftId;
2862
      }
2863
 
2864
      public String getFieldName() {
2865
        return _fieldName;
2866
      }
2867
    }
2868
 
2869
    // isset id assignments
132 ashish 2870
    private static final int __FROM_DATE_ISSET_ID = 0;
2871
    private static final int __TO_DATE_ISSET_ID = 1;
68 ashish 2872
    private BitSet __isset_bit_vector = new BitSet(2);
2873
 
2874
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2875
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
2876
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
132 ashish 2877
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 2878
          new FieldValueMetaData(TType.I64)));
132 ashish 2879
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 2880
          new FieldValueMetaData(TType.I64)));
2881
    }});
2882
 
2883
    static {
2884
      FieldMetaData.addStructMetaDataMap(getAllTransactions_args.class, metaDataMap);
2885
    }
2886
 
2887
    public getAllTransactions_args() {
2888
    }
2889
 
2890
    public getAllTransactions_args(
2891
      TransactionStatus status,
132 ashish 2892
      long from_date,
2893
      long to_date)
68 ashish 2894
    {
2895
      this();
2896
      this.status = status;
132 ashish 2897
      this.from_date = from_date;
2898
      setFrom_dateIsSet(true);
2899
      this.to_date = to_date;
2900
      setTo_dateIsSet(true);
68 ashish 2901
    }
2902
 
2903
    /**
2904
     * Performs a deep copy on <i>other</i>.
2905
     */
2906
    public getAllTransactions_args(getAllTransactions_args other) {
2907
      __isset_bit_vector.clear();
2908
      __isset_bit_vector.or(other.__isset_bit_vector);
2909
      if (other.isSetStatus()) {
2910
        this.status = other.status;
2911
      }
132 ashish 2912
      this.from_date = other.from_date;
2913
      this.to_date = other.to_date;
68 ashish 2914
    }
2915
 
2916
    public getAllTransactions_args deepCopy() {
2917
      return new getAllTransactions_args(this);
2918
    }
2919
 
2920
    @Deprecated
2921
    public getAllTransactions_args clone() {
2922
      return new getAllTransactions_args(this);
2923
    }
2924
 
2925
    /**
2926
     * 
2927
     * @see TransactionStatus
2928
     */
2929
    public TransactionStatus getStatus() {
2930
      return this.status;
2931
    }
2932
 
2933
    /**
2934
     * 
2935
     * @see TransactionStatus
2936
     */
2937
    public getAllTransactions_args setStatus(TransactionStatus status) {
2938
      this.status = status;
2939
      return this;
2940
    }
2941
 
2942
    public void unsetStatus() {
2943
      this.status = null;
2944
    }
2945
 
2946
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
2947
    public boolean isSetStatus() {
2948
      return this.status != null;
2949
    }
2950
 
2951
    public void setStatusIsSet(boolean value) {
2952
      if (!value) {
2953
        this.status = null;
2954
      }
2955
    }
2956
 
132 ashish 2957
    public long getFrom_date() {
2958
      return this.from_date;
68 ashish 2959
    }
2960
 
132 ashish 2961
    public getAllTransactions_args setFrom_date(long from_date) {
2962
      this.from_date = from_date;
2963
      setFrom_dateIsSet(true);
68 ashish 2964
      return this;
2965
    }
2966
 
132 ashish 2967
    public void unsetFrom_date() {
2968
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 2969
    }
2970
 
132 ashish 2971
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
2972
    public boolean isSetFrom_date() {
2973
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 2974
    }
2975
 
132 ashish 2976
    public void setFrom_dateIsSet(boolean value) {
2977
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 2978
    }
2979
 
132 ashish 2980
    public long getTo_date() {
2981
      return this.to_date;
68 ashish 2982
    }
2983
 
132 ashish 2984
    public getAllTransactions_args setTo_date(long to_date) {
2985
      this.to_date = to_date;
2986
      setTo_dateIsSet(true);
68 ashish 2987
      return this;
2988
    }
2989
 
132 ashish 2990
    public void unsetTo_date() {
2991
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 2992
    }
2993
 
132 ashish 2994
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
2995
    public boolean isSetTo_date() {
2996
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 2997
    }
2998
 
132 ashish 2999
    public void setTo_dateIsSet(boolean value) {
3000
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 3001
    }
3002
 
3003
    public void setFieldValue(_Fields field, Object value) {
3004
      switch (field) {
3005
      case STATUS:
3006
        if (value == null) {
3007
          unsetStatus();
3008
        } else {
3009
          setStatus((TransactionStatus)value);
3010
        }
3011
        break;
3012
 
132 ashish 3013
      case FROM_DATE:
68 ashish 3014
        if (value == null) {
132 ashish 3015
          unsetFrom_date();
68 ashish 3016
        } else {
132 ashish 3017
          setFrom_date((Long)value);
68 ashish 3018
        }
3019
        break;
3020
 
132 ashish 3021
      case TO_DATE:
68 ashish 3022
        if (value == null) {
132 ashish 3023
          unsetTo_date();
68 ashish 3024
        } else {
132 ashish 3025
          setTo_date((Long)value);
68 ashish 3026
        }
3027
        break;
3028
 
3029
      }
3030
    }
3031
 
3032
    public void setFieldValue(int fieldID, Object value) {
3033
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3034
    }
3035
 
3036
    public Object getFieldValue(_Fields field) {
3037
      switch (field) {
3038
      case STATUS:
3039
        return getStatus();
3040
 
132 ashish 3041
      case FROM_DATE:
3042
        return new Long(getFrom_date());
68 ashish 3043
 
132 ashish 3044
      case TO_DATE:
3045
        return new Long(getTo_date());
68 ashish 3046
 
3047
      }
3048
      throw new IllegalStateException();
3049
    }
3050
 
3051
    public Object getFieldValue(int fieldId) {
3052
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3053
    }
3054
 
3055
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3056
    public boolean isSet(_Fields field) {
3057
      switch (field) {
3058
      case STATUS:
3059
        return isSetStatus();
132 ashish 3060
      case FROM_DATE:
3061
        return isSetFrom_date();
3062
      case TO_DATE:
3063
        return isSetTo_date();
68 ashish 3064
      }
3065
      throw new IllegalStateException();
3066
    }
3067
 
3068
    public boolean isSet(int fieldID) {
3069
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3070
    }
3071
 
3072
    @Override
3073
    public boolean equals(Object that) {
3074
      if (that == null)
3075
        return false;
3076
      if (that instanceof getAllTransactions_args)
3077
        return this.equals((getAllTransactions_args)that);
3078
      return false;
3079
    }
3080
 
3081
    public boolean equals(getAllTransactions_args that) {
3082
      if (that == null)
3083
        return false;
3084
 
3085
      boolean this_present_status = true && this.isSetStatus();
3086
      boolean that_present_status = true && that.isSetStatus();
3087
      if (this_present_status || that_present_status) {
3088
        if (!(this_present_status && that_present_status))
3089
          return false;
3090
        if (!this.status.equals(that.status))
3091
          return false;
3092
      }
3093
 
132 ashish 3094
      boolean this_present_from_date = true;
3095
      boolean that_present_from_date = true;
3096
      if (this_present_from_date || that_present_from_date) {
3097
        if (!(this_present_from_date && that_present_from_date))
68 ashish 3098
          return false;
132 ashish 3099
        if (this.from_date != that.from_date)
68 ashish 3100
          return false;
3101
      }
3102
 
132 ashish 3103
      boolean this_present_to_date = true;
3104
      boolean that_present_to_date = true;
3105
      if (this_present_to_date || that_present_to_date) {
3106
        if (!(this_present_to_date && that_present_to_date))
68 ashish 3107
          return false;
132 ashish 3108
        if (this.to_date != that.to_date)
68 ashish 3109
          return false;
3110
      }
3111
 
3112
      return true;
3113
    }
3114
 
3115
    @Override
3116
    public int hashCode() {
3117
      return 0;
3118
    }
3119
 
3120
    public int compareTo(getAllTransactions_args other) {
3121
      if (!getClass().equals(other.getClass())) {
3122
        return getClass().getName().compareTo(other.getClass().getName());
3123
      }
3124
 
3125
      int lastComparison = 0;
3126
      getAllTransactions_args typedOther = (getAllTransactions_args)other;
3127
 
3128
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
3129
      if (lastComparison != 0) {
3130
        return lastComparison;
3131
      }
3132
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
3133
      if (lastComparison != 0) {
3134
        return lastComparison;
3135
      }
132 ashish 3136
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 3137
      if (lastComparison != 0) {
3138
        return lastComparison;
3139
      }
132 ashish 3140
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 3141
      if (lastComparison != 0) {
3142
        return lastComparison;
3143
      }
132 ashish 3144
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 3145
      if (lastComparison != 0) {
3146
        return lastComparison;
3147
      }
132 ashish 3148
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 3149
      if (lastComparison != 0) {
3150
        return lastComparison;
3151
      }
3152
      return 0;
3153
    }
3154
 
3155
    public void read(TProtocol iprot) throws TException {
3156
      TField field;
3157
      iprot.readStructBegin();
3158
      while (true)
3159
      {
3160
        field = iprot.readFieldBegin();
3161
        if (field.type == TType.STOP) { 
3162
          break;
3163
        }
3164
        _Fields fieldId = _Fields.findByThriftId(field.id);
3165
        if (fieldId == null) {
3166
          TProtocolUtil.skip(iprot, field.type);
3167
        } else {
3168
          switch (fieldId) {
3169
            case STATUS:
3170
              if (field.type == TType.I32) {
3171
                this.status = TransactionStatus.findByValue(iprot.readI32());
3172
              } else { 
3173
                TProtocolUtil.skip(iprot, field.type);
3174
              }
3175
              break;
132 ashish 3176
            case FROM_DATE:
68 ashish 3177
              if (field.type == TType.I64) {
132 ashish 3178
                this.from_date = iprot.readI64();
3179
                setFrom_dateIsSet(true);
68 ashish 3180
              } else { 
3181
                TProtocolUtil.skip(iprot, field.type);
3182
              }
3183
              break;
132 ashish 3184
            case TO_DATE:
68 ashish 3185
              if (field.type == TType.I64) {
132 ashish 3186
                this.to_date = iprot.readI64();
3187
                setTo_dateIsSet(true);
68 ashish 3188
              } else { 
3189
                TProtocolUtil.skip(iprot, field.type);
3190
              }
3191
              break;
3192
          }
3193
          iprot.readFieldEnd();
3194
        }
3195
      }
3196
      iprot.readStructEnd();
3197
      validate();
3198
    }
3199
 
3200
    public void write(TProtocol oprot) throws TException {
3201
      validate();
3202
 
3203
      oprot.writeStructBegin(STRUCT_DESC);
3204
      if (this.status != null) {
3205
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
3206
        oprot.writeI32(this.status.getValue());
3207
        oprot.writeFieldEnd();
3208
      }
132 ashish 3209
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
3210
      oprot.writeI64(this.from_date);
68 ashish 3211
      oprot.writeFieldEnd();
132 ashish 3212
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
3213
      oprot.writeI64(this.to_date);
68 ashish 3214
      oprot.writeFieldEnd();
3215
      oprot.writeFieldStop();
3216
      oprot.writeStructEnd();
3217
    }
3218
 
3219
    @Override
3220
    public String toString() {
3221
      StringBuilder sb = new StringBuilder("getAllTransactions_args(");
3222
      boolean first = true;
3223
 
3224
      sb.append("status:");
3225
      if (this.status == null) {
3226
        sb.append("null");
3227
      } else {
3228
        String status_name = status.name();
3229
        if (status_name != null) {
3230
          sb.append(status_name);
3231
          sb.append(" (");
3232
        }
3233
        sb.append(this.status);
3234
        if (status_name != null) {
3235
          sb.append(")");
3236
        }
3237
      }
3238
      first = false;
3239
      if (!first) sb.append(", ");
132 ashish 3240
      sb.append("from_date:");
3241
      sb.append(this.from_date);
68 ashish 3242
      first = false;
3243
      if (!first) sb.append(", ");
132 ashish 3244
      sb.append("to_date:");
3245
      sb.append(this.to_date);
68 ashish 3246
      first = false;
3247
      sb.append(")");
3248
      return sb.toString();
3249
    }
3250
 
3251
    public void validate() throws TException {
3252
      // check for required fields
3253
    }
3254
 
3255
  }
3256
 
3257
  public static class getAllTransactions_result implements TBase<getAllTransactions_result._Fields>, java.io.Serializable, Cloneable   {
3258
    private static final TStruct STRUCT_DESC = new TStruct("getAllTransactions_result");
3259
 
3260
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
3261
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3262
 
3263
    private List<Transaction> success;
3264
    private TransactionServiceException ex;
3265
 
3266
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3267
    public enum _Fields implements TFieldIdEnum {
3268
      SUCCESS((short)0, "success"),
3269
      EX((short)1, "ex");
3270
 
3271
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3272
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3273
 
3274
      static {
3275
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3276
          byId.put((int)field._thriftId, field);
3277
          byName.put(field.getFieldName(), field);
3278
        }
3279
      }
3280
 
3281
      /**
3282
       * Find the _Fields constant that matches fieldId, or null if its not found.
3283
       */
3284
      public static _Fields findByThriftId(int fieldId) {
3285
        return byId.get(fieldId);
3286
      }
3287
 
3288
      /**
3289
       * Find the _Fields constant that matches fieldId, throwing an exception
3290
       * if it is not found.
3291
       */
3292
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3293
        _Fields fields = findByThriftId(fieldId);
3294
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3295
        return fields;
3296
      }
3297
 
3298
      /**
3299
       * Find the _Fields constant that matches name, or null if its not found.
3300
       */
3301
      public static _Fields findByName(String name) {
3302
        return byName.get(name);
3303
      }
3304
 
3305
      private final short _thriftId;
3306
      private final String _fieldName;
3307
 
3308
      _Fields(short thriftId, String fieldName) {
3309
        _thriftId = thriftId;
3310
        _fieldName = fieldName;
3311
      }
3312
 
3313
      public short getThriftFieldId() {
3314
        return _thriftId;
3315
      }
3316
 
3317
      public String getFieldName() {
3318
        return _fieldName;
3319
      }
3320
    }
3321
 
3322
    // isset id assignments
3323
 
3324
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3325
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3326
          new ListMetaData(TType.LIST, 
3327
              new StructMetaData(TType.STRUCT, Transaction.class))));
3328
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3329
          new FieldValueMetaData(TType.STRUCT)));
3330
    }});
3331
 
3332
    static {
3333
      FieldMetaData.addStructMetaDataMap(getAllTransactions_result.class, metaDataMap);
3334
    }
3335
 
3336
    public getAllTransactions_result() {
3337
    }
3338
 
3339
    public getAllTransactions_result(
3340
      List<Transaction> success,
3341
      TransactionServiceException ex)
3342
    {
3343
      this();
3344
      this.success = success;
3345
      this.ex = ex;
3346
    }
3347
 
3348
    /**
3349
     * Performs a deep copy on <i>other</i>.
3350
     */
3351
    public getAllTransactions_result(getAllTransactions_result other) {
3352
      if (other.isSetSuccess()) {
3353
        List<Transaction> __this__success = new ArrayList<Transaction>();
3354
        for (Transaction other_element : other.success) {
3355
          __this__success.add(new Transaction(other_element));
3356
        }
3357
        this.success = __this__success;
3358
      }
3359
      if (other.isSetEx()) {
3360
        this.ex = new TransactionServiceException(other.ex);
3361
      }
3362
    }
3363
 
3364
    public getAllTransactions_result deepCopy() {
3365
      return new getAllTransactions_result(this);
3366
    }
3367
 
3368
    @Deprecated
3369
    public getAllTransactions_result clone() {
3370
      return new getAllTransactions_result(this);
3371
    }
3372
 
3373
    public int getSuccessSize() {
3374
      return (this.success == null) ? 0 : this.success.size();
3375
    }
3376
 
3377
    public java.util.Iterator<Transaction> getSuccessIterator() {
3378
      return (this.success == null) ? null : this.success.iterator();
3379
    }
3380
 
3381
    public void addToSuccess(Transaction elem) {
3382
      if (this.success == null) {
3383
        this.success = new ArrayList<Transaction>();
3384
      }
3385
      this.success.add(elem);
3386
    }
3387
 
3388
    public List<Transaction> getSuccess() {
3389
      return this.success;
3390
    }
3391
 
3392
    public getAllTransactions_result setSuccess(List<Transaction> success) {
3393
      this.success = success;
3394
      return this;
3395
    }
3396
 
3397
    public void unsetSuccess() {
3398
      this.success = null;
3399
    }
3400
 
3401
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3402
    public boolean isSetSuccess() {
3403
      return this.success != null;
3404
    }
3405
 
3406
    public void setSuccessIsSet(boolean value) {
3407
      if (!value) {
3408
        this.success = null;
3409
      }
3410
    }
3411
 
3412
    public TransactionServiceException getEx() {
3413
      return this.ex;
3414
    }
3415
 
3416
    public getAllTransactions_result setEx(TransactionServiceException ex) {
3417
      this.ex = ex;
3418
      return this;
3419
    }
3420
 
3421
    public void unsetEx() {
3422
      this.ex = null;
3423
    }
3424
 
3425
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3426
    public boolean isSetEx() {
3427
      return this.ex != null;
3428
    }
3429
 
3430
    public void setExIsSet(boolean value) {
3431
      if (!value) {
3432
        this.ex = null;
3433
      }
3434
    }
3435
 
3436
    public void setFieldValue(_Fields field, Object value) {
3437
      switch (field) {
3438
      case SUCCESS:
3439
        if (value == null) {
3440
          unsetSuccess();
3441
        } else {
3442
          setSuccess((List<Transaction>)value);
3443
        }
3444
        break;
3445
 
3446
      case EX:
3447
        if (value == null) {
3448
          unsetEx();
3449
        } else {
3450
          setEx((TransactionServiceException)value);
3451
        }
3452
        break;
3453
 
3454
      }
3455
    }
3456
 
3457
    public void setFieldValue(int fieldID, Object value) {
3458
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3459
    }
3460
 
3461
    public Object getFieldValue(_Fields field) {
3462
      switch (field) {
3463
      case SUCCESS:
3464
        return getSuccess();
3465
 
3466
      case EX:
3467
        return getEx();
3468
 
3469
      }
3470
      throw new IllegalStateException();
3471
    }
3472
 
3473
    public Object getFieldValue(int fieldId) {
3474
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3475
    }
3476
 
3477
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3478
    public boolean isSet(_Fields field) {
3479
      switch (field) {
3480
      case SUCCESS:
3481
        return isSetSuccess();
3482
      case EX:
3483
        return isSetEx();
3484
      }
3485
      throw new IllegalStateException();
3486
    }
3487
 
3488
    public boolean isSet(int fieldID) {
3489
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3490
    }
3491
 
3492
    @Override
3493
    public boolean equals(Object that) {
3494
      if (that == null)
3495
        return false;
3496
      if (that instanceof getAllTransactions_result)
3497
        return this.equals((getAllTransactions_result)that);
3498
      return false;
3499
    }
3500
 
3501
    public boolean equals(getAllTransactions_result that) {
3502
      if (that == null)
3503
        return false;
3504
 
3505
      boolean this_present_success = true && this.isSetSuccess();
3506
      boolean that_present_success = true && that.isSetSuccess();
3507
      if (this_present_success || that_present_success) {
3508
        if (!(this_present_success && that_present_success))
3509
          return false;
3510
        if (!this.success.equals(that.success))
3511
          return false;
3512
      }
3513
 
3514
      boolean this_present_ex = true && this.isSetEx();
3515
      boolean that_present_ex = true && that.isSetEx();
3516
      if (this_present_ex || that_present_ex) {
3517
        if (!(this_present_ex && that_present_ex))
3518
          return false;
3519
        if (!this.ex.equals(that.ex))
3520
          return false;
3521
      }
3522
 
3523
      return true;
3524
    }
3525
 
3526
    @Override
3527
    public int hashCode() {
3528
      return 0;
3529
    }
3530
 
3531
    public void read(TProtocol iprot) throws TException {
3532
      TField field;
3533
      iprot.readStructBegin();
3534
      while (true)
3535
      {
3536
        field = iprot.readFieldBegin();
3537
        if (field.type == TType.STOP) { 
3538
          break;
3539
        }
3540
        _Fields fieldId = _Fields.findByThriftId(field.id);
3541
        if (fieldId == null) {
3542
          TProtocolUtil.skip(iprot, field.type);
3543
        } else {
3544
          switch (fieldId) {
3545
            case SUCCESS:
3546
              if (field.type == TType.LIST) {
3547
                {
132 ashish 3548
                  TList _list30 = iprot.readListBegin();
3549
                  this.success = new ArrayList<Transaction>(_list30.size);
3550
                  for (int _i31 = 0; _i31 < _list30.size; ++_i31)
68 ashish 3551
                  {
132 ashish 3552
                    Transaction _elem32;
3553
                    _elem32 = new Transaction();
3554
                    _elem32.read(iprot);
3555
                    this.success.add(_elem32);
68 ashish 3556
                  }
3557
                  iprot.readListEnd();
3558
                }
3559
              } else { 
3560
                TProtocolUtil.skip(iprot, field.type);
3561
              }
3562
              break;
3563
            case EX:
3564
              if (field.type == TType.STRUCT) {
3565
                this.ex = new TransactionServiceException();
3566
                this.ex.read(iprot);
3567
              } else { 
3568
                TProtocolUtil.skip(iprot, field.type);
3569
              }
3570
              break;
3571
          }
3572
          iprot.readFieldEnd();
3573
        }
3574
      }
3575
      iprot.readStructEnd();
3576
      validate();
3577
    }
3578
 
3579
    public void write(TProtocol oprot) throws TException {
3580
      oprot.writeStructBegin(STRUCT_DESC);
3581
 
3582
      if (this.isSetSuccess()) {
3583
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3584
        {
3585
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
132 ashish 3586
          for (Transaction _iter33 : this.success)
68 ashish 3587
          {
132 ashish 3588
            _iter33.write(oprot);
68 ashish 3589
          }
3590
          oprot.writeListEnd();
3591
        }
3592
        oprot.writeFieldEnd();
3593
      } else if (this.isSetEx()) {
3594
        oprot.writeFieldBegin(EX_FIELD_DESC);
3595
        this.ex.write(oprot);
3596
        oprot.writeFieldEnd();
3597
      }
3598
      oprot.writeFieldStop();
3599
      oprot.writeStructEnd();
3600
    }
3601
 
3602
    @Override
3603
    public String toString() {
3604
      StringBuilder sb = new StringBuilder("getAllTransactions_result(");
3605
      boolean first = true;
3606
 
3607
      sb.append("success:");
3608
      if (this.success == null) {
3609
        sb.append("null");
3610
      } else {
3611
        sb.append(this.success);
3612
      }
3613
      first = false;
3614
      if (!first) sb.append(", ");
3615
      sb.append("ex:");
3616
      if (this.ex == null) {
3617
        sb.append("null");
3618
      } else {
3619
        sb.append(this.ex);
3620
      }
3621
      first = false;
3622
      sb.append(")");
3623
      return sb.toString();
3624
    }
3625
 
3626
    public void validate() throws TException {
3627
      // check for required fields
3628
    }
3629
 
3630
  }
3631
 
3632
  public static class getTransactionsForShipmentStatus_args implements TBase<getTransactionsForShipmentStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShipmentStatus_args>   {
3633
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShipmentStatus_args");
3634
 
3635
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
132 ashish 3636
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
3637
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 3638
 
3639
    private ShipmentStatus status;
132 ashish 3640
    private long from_date;
3641
    private long to_date;
68 ashish 3642
 
3643
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3644
    public enum _Fields implements TFieldIdEnum {
3645
      /**
3646
       * 
3647
       * @see ShipmentStatus
3648
       */
3649
      STATUS((short)1, "status"),
132 ashish 3650
      FROM_DATE((short)2, "from_date"),
3651
      TO_DATE((short)3, "to_date");
68 ashish 3652
 
3653
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3654
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3655
 
3656
      static {
3657
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3658
          byId.put((int)field._thriftId, field);
3659
          byName.put(field.getFieldName(), field);
3660
        }
3661
      }
3662
 
3663
      /**
3664
       * Find the _Fields constant that matches fieldId, or null if its not found.
3665
       */
3666
      public static _Fields findByThriftId(int fieldId) {
3667
        return byId.get(fieldId);
3668
      }
3669
 
3670
      /**
3671
       * Find the _Fields constant that matches fieldId, throwing an exception
3672
       * if it is not found.
3673
       */
3674
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3675
        _Fields fields = findByThriftId(fieldId);
3676
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3677
        return fields;
3678
      }
3679
 
3680
      /**
3681
       * Find the _Fields constant that matches name, or null if its not found.
3682
       */
3683
      public static _Fields findByName(String name) {
3684
        return byName.get(name);
3685
      }
3686
 
3687
      private final short _thriftId;
3688
      private final String _fieldName;
3689
 
3690
      _Fields(short thriftId, String fieldName) {
3691
        _thriftId = thriftId;
3692
        _fieldName = fieldName;
3693
      }
3694
 
3695
      public short getThriftFieldId() {
3696
        return _thriftId;
3697
      }
3698
 
3699
      public String getFieldName() {
3700
        return _fieldName;
3701
      }
3702
    }
3703
 
3704
    // isset id assignments
132 ashish 3705
    private static final int __FROM_DATE_ISSET_ID = 0;
3706
    private static final int __TO_DATE_ISSET_ID = 1;
68 ashish 3707
    private BitSet __isset_bit_vector = new BitSet(2);
3708
 
3709
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3710
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
3711
          new EnumMetaData(TType.ENUM, ShipmentStatus.class)));
132 ashish 3712
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 3713
          new FieldValueMetaData(TType.I64)));
132 ashish 3714
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 3715
          new FieldValueMetaData(TType.I64)));
3716
    }});
3717
 
3718
    static {
3719
      FieldMetaData.addStructMetaDataMap(getTransactionsForShipmentStatus_args.class, metaDataMap);
3720
    }
3721
 
3722
    public getTransactionsForShipmentStatus_args() {
3723
    }
3724
 
3725
    public getTransactionsForShipmentStatus_args(
3726
      ShipmentStatus status,
132 ashish 3727
      long from_date,
3728
      long to_date)
68 ashish 3729
    {
3730
      this();
3731
      this.status = status;
132 ashish 3732
      this.from_date = from_date;
3733
      setFrom_dateIsSet(true);
3734
      this.to_date = to_date;
3735
      setTo_dateIsSet(true);
68 ashish 3736
    }
3737
 
3738
    /**
3739
     * Performs a deep copy on <i>other</i>.
3740
     */
3741
    public getTransactionsForShipmentStatus_args(getTransactionsForShipmentStatus_args other) {
3742
      __isset_bit_vector.clear();
3743
      __isset_bit_vector.or(other.__isset_bit_vector);
3744
      if (other.isSetStatus()) {
3745
        this.status = other.status;
3746
      }
132 ashish 3747
      this.from_date = other.from_date;
3748
      this.to_date = other.to_date;
68 ashish 3749
    }
3750
 
3751
    public getTransactionsForShipmentStatus_args deepCopy() {
3752
      return new getTransactionsForShipmentStatus_args(this);
3753
    }
3754
 
3755
    @Deprecated
3756
    public getTransactionsForShipmentStatus_args clone() {
3757
      return new getTransactionsForShipmentStatus_args(this);
3758
    }
3759
 
3760
    /**
3761
     * 
3762
     * @see ShipmentStatus
3763
     */
3764
    public ShipmentStatus getStatus() {
3765
      return this.status;
3766
    }
3767
 
3768
    /**
3769
     * 
3770
     * @see ShipmentStatus
3771
     */
3772
    public getTransactionsForShipmentStatus_args setStatus(ShipmentStatus status) {
3773
      this.status = status;
3774
      return this;
3775
    }
3776
 
3777
    public void unsetStatus() {
3778
      this.status = null;
3779
    }
3780
 
3781
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
3782
    public boolean isSetStatus() {
3783
      return this.status != null;
3784
    }
3785
 
3786
    public void setStatusIsSet(boolean value) {
3787
      if (!value) {
3788
        this.status = null;
3789
      }
3790
    }
3791
 
132 ashish 3792
    public long getFrom_date() {
3793
      return this.from_date;
68 ashish 3794
    }
3795
 
132 ashish 3796
    public getTransactionsForShipmentStatus_args setFrom_date(long from_date) {
3797
      this.from_date = from_date;
3798
      setFrom_dateIsSet(true);
68 ashish 3799
      return this;
3800
    }
3801
 
132 ashish 3802
    public void unsetFrom_date() {
3803
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 3804
    }
3805
 
132 ashish 3806
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
3807
    public boolean isSetFrom_date() {
3808
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 3809
    }
3810
 
132 ashish 3811
    public void setFrom_dateIsSet(boolean value) {
3812
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 3813
    }
3814
 
132 ashish 3815
    public long getTo_date() {
3816
      return this.to_date;
68 ashish 3817
    }
3818
 
132 ashish 3819
    public getTransactionsForShipmentStatus_args setTo_date(long to_date) {
3820
      this.to_date = to_date;
3821
      setTo_dateIsSet(true);
68 ashish 3822
      return this;
3823
    }
3824
 
132 ashish 3825
    public void unsetTo_date() {
3826
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 3827
    }
3828
 
132 ashish 3829
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
3830
    public boolean isSetTo_date() {
3831
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 3832
    }
3833
 
132 ashish 3834
    public void setTo_dateIsSet(boolean value) {
3835
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 3836
    }
3837
 
3838
    public void setFieldValue(_Fields field, Object value) {
3839
      switch (field) {
3840
      case STATUS:
3841
        if (value == null) {
3842
          unsetStatus();
3843
        } else {
3844
          setStatus((ShipmentStatus)value);
3845
        }
3846
        break;
3847
 
132 ashish 3848
      case FROM_DATE:
68 ashish 3849
        if (value == null) {
132 ashish 3850
          unsetFrom_date();
68 ashish 3851
        } else {
132 ashish 3852
          setFrom_date((Long)value);
68 ashish 3853
        }
3854
        break;
3855
 
132 ashish 3856
      case TO_DATE:
68 ashish 3857
        if (value == null) {
132 ashish 3858
          unsetTo_date();
68 ashish 3859
        } else {
132 ashish 3860
          setTo_date((Long)value);
68 ashish 3861
        }
3862
        break;
3863
 
3864
      }
3865
    }
3866
 
3867
    public void setFieldValue(int fieldID, Object value) {
3868
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3869
    }
3870
 
3871
    public Object getFieldValue(_Fields field) {
3872
      switch (field) {
3873
      case STATUS:
3874
        return getStatus();
3875
 
132 ashish 3876
      case FROM_DATE:
3877
        return new Long(getFrom_date());
68 ashish 3878
 
132 ashish 3879
      case TO_DATE:
3880
        return new Long(getTo_date());
68 ashish 3881
 
3882
      }
3883
      throw new IllegalStateException();
3884
    }
3885
 
3886
    public Object getFieldValue(int fieldId) {
3887
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3888
    }
3889
 
3890
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3891
    public boolean isSet(_Fields field) {
3892
      switch (field) {
3893
      case STATUS:
3894
        return isSetStatus();
132 ashish 3895
      case FROM_DATE:
3896
        return isSetFrom_date();
3897
      case TO_DATE:
3898
        return isSetTo_date();
68 ashish 3899
      }
3900
      throw new IllegalStateException();
3901
    }
3902
 
3903
    public boolean isSet(int fieldID) {
3904
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3905
    }
3906
 
3907
    @Override
3908
    public boolean equals(Object that) {
3909
      if (that == null)
3910
        return false;
3911
      if (that instanceof getTransactionsForShipmentStatus_args)
3912
        return this.equals((getTransactionsForShipmentStatus_args)that);
3913
      return false;
3914
    }
3915
 
3916
    public boolean equals(getTransactionsForShipmentStatus_args that) {
3917
      if (that == null)
3918
        return false;
3919
 
3920
      boolean this_present_status = true && this.isSetStatus();
3921
      boolean that_present_status = true && that.isSetStatus();
3922
      if (this_present_status || that_present_status) {
3923
        if (!(this_present_status && that_present_status))
3924
          return false;
3925
        if (!this.status.equals(that.status))
3926
          return false;
3927
      }
3928
 
132 ashish 3929
      boolean this_present_from_date = true;
3930
      boolean that_present_from_date = true;
3931
      if (this_present_from_date || that_present_from_date) {
3932
        if (!(this_present_from_date && that_present_from_date))
68 ashish 3933
          return false;
132 ashish 3934
        if (this.from_date != that.from_date)
68 ashish 3935
          return false;
3936
      }
3937
 
132 ashish 3938
      boolean this_present_to_date = true;
3939
      boolean that_present_to_date = true;
3940
      if (this_present_to_date || that_present_to_date) {
3941
        if (!(this_present_to_date && that_present_to_date))
68 ashish 3942
          return false;
132 ashish 3943
        if (this.to_date != that.to_date)
68 ashish 3944
          return false;
3945
      }
3946
 
3947
      return true;
3948
    }
3949
 
3950
    @Override
3951
    public int hashCode() {
3952
      return 0;
3953
    }
3954
 
3955
    public int compareTo(getTransactionsForShipmentStatus_args other) {
3956
      if (!getClass().equals(other.getClass())) {
3957
        return getClass().getName().compareTo(other.getClass().getName());
3958
      }
3959
 
3960
      int lastComparison = 0;
3961
      getTransactionsForShipmentStatus_args typedOther = (getTransactionsForShipmentStatus_args)other;
3962
 
3963
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
3964
      if (lastComparison != 0) {
3965
        return lastComparison;
3966
      }
3967
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
3968
      if (lastComparison != 0) {
3969
        return lastComparison;
3970
      }
132 ashish 3971
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 3972
      if (lastComparison != 0) {
3973
        return lastComparison;
3974
      }
132 ashish 3975
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 3976
      if (lastComparison != 0) {
3977
        return lastComparison;
3978
      }
132 ashish 3979
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 3980
      if (lastComparison != 0) {
3981
        return lastComparison;
3982
      }
132 ashish 3983
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 3984
      if (lastComparison != 0) {
3985
        return lastComparison;
3986
      }
3987
      return 0;
3988
    }
3989
 
3990
    public void read(TProtocol iprot) throws TException {
3991
      TField field;
3992
      iprot.readStructBegin();
3993
      while (true)
3994
      {
3995
        field = iprot.readFieldBegin();
3996
        if (field.type == TType.STOP) { 
3997
          break;
3998
        }
3999
        _Fields fieldId = _Fields.findByThriftId(field.id);
4000
        if (fieldId == null) {
4001
          TProtocolUtil.skip(iprot, field.type);
4002
        } else {
4003
          switch (fieldId) {
4004
            case STATUS:
4005
              if (field.type == TType.I32) {
4006
                this.status = ShipmentStatus.findByValue(iprot.readI32());
4007
              } else { 
4008
                TProtocolUtil.skip(iprot, field.type);
4009
              }
4010
              break;
132 ashish 4011
            case FROM_DATE:
68 ashish 4012
              if (field.type == TType.I64) {
132 ashish 4013
                this.from_date = iprot.readI64();
4014
                setFrom_dateIsSet(true);
68 ashish 4015
              } else { 
4016
                TProtocolUtil.skip(iprot, field.type);
4017
              }
4018
              break;
132 ashish 4019
            case TO_DATE:
68 ashish 4020
              if (field.type == TType.I64) {
132 ashish 4021
                this.to_date = iprot.readI64();
4022
                setTo_dateIsSet(true);
68 ashish 4023
              } else { 
4024
                TProtocolUtil.skip(iprot, field.type);
4025
              }
4026
              break;
4027
          }
4028
          iprot.readFieldEnd();
4029
        }
4030
      }
4031
      iprot.readStructEnd();
4032
      validate();
4033
    }
4034
 
4035
    public void write(TProtocol oprot) throws TException {
4036
      validate();
4037
 
4038
      oprot.writeStructBegin(STRUCT_DESC);
4039
      if (this.status != null) {
4040
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4041
        oprot.writeI32(this.status.getValue());
4042
        oprot.writeFieldEnd();
4043
      }
132 ashish 4044
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
4045
      oprot.writeI64(this.from_date);
68 ashish 4046
      oprot.writeFieldEnd();
132 ashish 4047
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
4048
      oprot.writeI64(this.to_date);
68 ashish 4049
      oprot.writeFieldEnd();
4050
      oprot.writeFieldStop();
4051
      oprot.writeStructEnd();
4052
    }
4053
 
4054
    @Override
4055
    public String toString() {
4056
      StringBuilder sb = new StringBuilder("getTransactionsForShipmentStatus_args(");
4057
      boolean first = true;
4058
 
4059
      sb.append("status:");
4060
      if (this.status == null) {
4061
        sb.append("null");
4062
      } else {
4063
        String status_name = status.name();
4064
        if (status_name != null) {
4065
          sb.append(status_name);
4066
          sb.append(" (");
4067
        }
4068
        sb.append(this.status);
4069
        if (status_name != null) {
4070
          sb.append(")");
4071
        }
4072
      }
4073
      first = false;
4074
      if (!first) sb.append(", ");
132 ashish 4075
      sb.append("from_date:");
4076
      sb.append(this.from_date);
68 ashish 4077
      first = false;
4078
      if (!first) sb.append(", ");
132 ashish 4079
      sb.append("to_date:");
4080
      sb.append(this.to_date);
68 ashish 4081
      first = false;
4082
      sb.append(")");
4083
      return sb.toString();
4084
    }
4085
 
4086
    public void validate() throws TException {
4087
      // check for required fields
4088
    }
4089
 
4090
  }
4091
 
4092
  public static class getTransactionsForShipmentStatus_result implements TBase<getTransactionsForShipmentStatus_result._Fields>, java.io.Serializable, Cloneable   {
4093
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShipmentStatus_result");
4094
 
4095
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4096
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4097
 
4098
    private List<Transaction> success;
4099
    private TransactionServiceException ex;
4100
 
4101
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4102
    public enum _Fields implements TFieldIdEnum {
4103
      SUCCESS((short)0, "success"),
4104
      EX((short)1, "ex");
4105
 
4106
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4107
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4108
 
4109
      static {
4110
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4111
          byId.put((int)field._thriftId, field);
4112
          byName.put(field.getFieldName(), field);
4113
        }
4114
      }
4115
 
4116
      /**
4117
       * Find the _Fields constant that matches fieldId, or null if its not found.
4118
       */
4119
      public static _Fields findByThriftId(int fieldId) {
4120
        return byId.get(fieldId);
4121
      }
4122
 
4123
      /**
4124
       * Find the _Fields constant that matches fieldId, throwing an exception
4125
       * if it is not found.
4126
       */
4127
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4128
        _Fields fields = findByThriftId(fieldId);
4129
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4130
        return fields;
4131
      }
4132
 
4133
      /**
4134
       * Find the _Fields constant that matches name, or null if its not found.
4135
       */
4136
      public static _Fields findByName(String name) {
4137
        return byName.get(name);
4138
      }
4139
 
4140
      private final short _thriftId;
4141
      private final String _fieldName;
4142
 
4143
      _Fields(short thriftId, String fieldName) {
4144
        _thriftId = thriftId;
4145
        _fieldName = fieldName;
4146
      }
4147
 
4148
      public short getThriftFieldId() {
4149
        return _thriftId;
4150
      }
4151
 
4152
      public String getFieldName() {
4153
        return _fieldName;
4154
      }
4155
    }
4156
 
4157
    // isset id assignments
4158
 
4159
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4160
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4161
          new ListMetaData(TType.LIST, 
4162
              new StructMetaData(TType.STRUCT, Transaction.class))));
4163
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4164
          new FieldValueMetaData(TType.STRUCT)));
4165
    }});
4166
 
4167
    static {
4168
      FieldMetaData.addStructMetaDataMap(getTransactionsForShipmentStatus_result.class, metaDataMap);
4169
    }
4170
 
4171
    public getTransactionsForShipmentStatus_result() {
4172
    }
4173
 
4174
    public getTransactionsForShipmentStatus_result(
4175
      List<Transaction> success,
4176
      TransactionServiceException ex)
4177
    {
4178
      this();
4179
      this.success = success;
4180
      this.ex = ex;
4181
    }
4182
 
4183
    /**
4184
     * Performs a deep copy on <i>other</i>.
4185
     */
4186
    public getTransactionsForShipmentStatus_result(getTransactionsForShipmentStatus_result other) {
4187
      if (other.isSetSuccess()) {
4188
        List<Transaction> __this__success = new ArrayList<Transaction>();
4189
        for (Transaction other_element : other.success) {
4190
          __this__success.add(new Transaction(other_element));
4191
        }
4192
        this.success = __this__success;
4193
      }
4194
      if (other.isSetEx()) {
4195
        this.ex = new TransactionServiceException(other.ex);
4196
      }
4197
    }
4198
 
4199
    public getTransactionsForShipmentStatus_result deepCopy() {
4200
      return new getTransactionsForShipmentStatus_result(this);
4201
    }
4202
 
4203
    @Deprecated
4204
    public getTransactionsForShipmentStatus_result clone() {
4205
      return new getTransactionsForShipmentStatus_result(this);
4206
    }
4207
 
4208
    public int getSuccessSize() {
4209
      return (this.success == null) ? 0 : this.success.size();
4210
    }
4211
 
4212
    public java.util.Iterator<Transaction> getSuccessIterator() {
4213
      return (this.success == null) ? null : this.success.iterator();
4214
    }
4215
 
4216
    public void addToSuccess(Transaction elem) {
4217
      if (this.success == null) {
4218
        this.success = new ArrayList<Transaction>();
4219
      }
4220
      this.success.add(elem);
4221
    }
4222
 
4223
    public List<Transaction> getSuccess() {
4224
      return this.success;
4225
    }
4226
 
4227
    public getTransactionsForShipmentStatus_result setSuccess(List<Transaction> success) {
4228
      this.success = success;
4229
      return this;
4230
    }
4231
 
4232
    public void unsetSuccess() {
4233
      this.success = null;
4234
    }
4235
 
4236
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4237
    public boolean isSetSuccess() {
4238
      return this.success != null;
4239
    }
4240
 
4241
    public void setSuccessIsSet(boolean value) {
4242
      if (!value) {
4243
        this.success = null;
4244
      }
4245
    }
4246
 
4247
    public TransactionServiceException getEx() {
4248
      return this.ex;
4249
    }
4250
 
4251
    public getTransactionsForShipmentStatus_result setEx(TransactionServiceException ex) {
4252
      this.ex = ex;
4253
      return this;
4254
    }
4255
 
4256
    public void unsetEx() {
4257
      this.ex = null;
4258
    }
4259
 
4260
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4261
    public boolean isSetEx() {
4262
      return this.ex != null;
4263
    }
4264
 
4265
    public void setExIsSet(boolean value) {
4266
      if (!value) {
4267
        this.ex = null;
4268
      }
4269
    }
4270
 
4271
    public void setFieldValue(_Fields field, Object value) {
4272
      switch (field) {
4273
      case SUCCESS:
4274
        if (value == null) {
4275
          unsetSuccess();
4276
        } else {
4277
          setSuccess((List<Transaction>)value);
4278
        }
4279
        break;
4280
 
4281
      case EX:
4282
        if (value == null) {
4283
          unsetEx();
4284
        } else {
4285
          setEx((TransactionServiceException)value);
4286
        }
4287
        break;
4288
 
4289
      }
4290
    }
4291
 
4292
    public void setFieldValue(int fieldID, Object value) {
4293
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4294
    }
4295
 
4296
    public Object getFieldValue(_Fields field) {
4297
      switch (field) {
4298
      case SUCCESS:
4299
        return getSuccess();
4300
 
4301
      case EX:
4302
        return getEx();
4303
 
4304
      }
4305
      throw new IllegalStateException();
4306
    }
4307
 
4308
    public Object getFieldValue(int fieldId) {
4309
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4310
    }
4311
 
4312
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4313
    public boolean isSet(_Fields field) {
4314
      switch (field) {
4315
      case SUCCESS:
4316
        return isSetSuccess();
4317
      case EX:
4318
        return isSetEx();
4319
      }
4320
      throw new IllegalStateException();
4321
    }
4322
 
4323
    public boolean isSet(int fieldID) {
4324
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4325
    }
4326
 
4327
    @Override
4328
    public boolean equals(Object that) {
4329
      if (that == null)
4330
        return false;
4331
      if (that instanceof getTransactionsForShipmentStatus_result)
4332
        return this.equals((getTransactionsForShipmentStatus_result)that);
4333
      return false;
4334
    }
4335
 
4336
    public boolean equals(getTransactionsForShipmentStatus_result that) {
4337
      if (that == null)
4338
        return false;
4339
 
4340
      boolean this_present_success = true && this.isSetSuccess();
4341
      boolean that_present_success = true && that.isSetSuccess();
4342
      if (this_present_success || that_present_success) {
4343
        if (!(this_present_success && that_present_success))
4344
          return false;
4345
        if (!this.success.equals(that.success))
4346
          return false;
4347
      }
4348
 
4349
      boolean this_present_ex = true && this.isSetEx();
4350
      boolean that_present_ex = true && that.isSetEx();
4351
      if (this_present_ex || that_present_ex) {
4352
        if (!(this_present_ex && that_present_ex))
4353
          return false;
4354
        if (!this.ex.equals(that.ex))
4355
          return false;
4356
      }
4357
 
4358
      return true;
4359
    }
4360
 
4361
    @Override
4362
    public int hashCode() {
4363
      return 0;
4364
    }
4365
 
4366
    public void read(TProtocol iprot) throws TException {
4367
      TField field;
4368
      iprot.readStructBegin();
4369
      while (true)
4370
      {
4371
        field = iprot.readFieldBegin();
4372
        if (field.type == TType.STOP) { 
4373
          break;
4374
        }
4375
        _Fields fieldId = _Fields.findByThriftId(field.id);
4376
        if (fieldId == null) {
4377
          TProtocolUtil.skip(iprot, field.type);
4378
        } else {
4379
          switch (fieldId) {
4380
            case SUCCESS:
4381
              if (field.type == TType.LIST) {
4382
                {
132 ashish 4383
                  TList _list34 = iprot.readListBegin();
4384
                  this.success = new ArrayList<Transaction>(_list34.size);
4385
                  for (int _i35 = 0; _i35 < _list34.size; ++_i35)
68 ashish 4386
                  {
132 ashish 4387
                    Transaction _elem36;
4388
                    _elem36 = new Transaction();
4389
                    _elem36.read(iprot);
4390
                    this.success.add(_elem36);
68 ashish 4391
                  }
4392
                  iprot.readListEnd();
4393
                }
4394
              } else { 
4395
                TProtocolUtil.skip(iprot, field.type);
4396
              }
4397
              break;
4398
            case EX:
4399
              if (field.type == TType.STRUCT) {
4400
                this.ex = new TransactionServiceException();
4401
                this.ex.read(iprot);
4402
              } else { 
4403
                TProtocolUtil.skip(iprot, field.type);
4404
              }
4405
              break;
4406
          }
4407
          iprot.readFieldEnd();
4408
        }
4409
      }
4410
      iprot.readStructEnd();
4411
      validate();
4412
    }
4413
 
4414
    public void write(TProtocol oprot) throws TException {
4415
      oprot.writeStructBegin(STRUCT_DESC);
4416
 
4417
      if (this.isSetSuccess()) {
4418
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4419
        {
4420
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
132 ashish 4421
          for (Transaction _iter37 : this.success)
68 ashish 4422
          {
132 ashish 4423
            _iter37.write(oprot);
68 ashish 4424
          }
4425
          oprot.writeListEnd();
4426
        }
4427
        oprot.writeFieldEnd();
4428
      } else if (this.isSetEx()) {
4429
        oprot.writeFieldBegin(EX_FIELD_DESC);
4430
        this.ex.write(oprot);
4431
        oprot.writeFieldEnd();
4432
      }
4433
      oprot.writeFieldStop();
4434
      oprot.writeStructEnd();
4435
    }
4436
 
4437
    @Override
4438
    public String toString() {
4439
      StringBuilder sb = new StringBuilder("getTransactionsForShipmentStatus_result(");
4440
      boolean first = true;
4441
 
4442
      sb.append("success:");
4443
      if (this.success == null) {
4444
        sb.append("null");
4445
      } else {
4446
        sb.append(this.success);
4447
      }
4448
      first = false;
4449
      if (!first) sb.append(", ");
4450
      sb.append("ex:");
4451
      if (this.ex == null) {
4452
        sb.append("null");
4453
      } else {
4454
        sb.append(this.ex);
4455
      }
4456
      first = false;
4457
      sb.append(")");
4458
      return sb.toString();
4459
    }
4460
 
4461
    public void validate() throws TException {
4462
      // check for required fields
4463
    }
4464
 
4465
  }
4466
 
4467
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
4468
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
4469
 
4470
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 4471
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
4472
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 4473
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
4474
 
4475
    private long customerId;
132 ashish 4476
    private long from_date;
4477
    private long to_date;
68 ashish 4478
    private TransactionStatus status;
4479
 
4480
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4481
    public enum _Fields implements TFieldIdEnum {
4482
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 4483
      FROM_DATE((short)2, "from_date"),
4484
      TO_DATE((short)3, "to_date"),
68 ashish 4485
      /**
4486
       * 
4487
       * @see TransactionStatus
4488
       */
4489
      STATUS((short)4, "status");
4490
 
4491
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4492
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4493
 
4494
      static {
4495
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4496
          byId.put((int)field._thriftId, field);
4497
          byName.put(field.getFieldName(), field);
4498
        }
4499
      }
4500
 
4501
      /**
4502
       * Find the _Fields constant that matches fieldId, or null if its not found.
4503
       */
4504
      public static _Fields findByThriftId(int fieldId) {
4505
        return byId.get(fieldId);
4506
      }
4507
 
4508
      /**
4509
       * Find the _Fields constant that matches fieldId, throwing an exception
4510
       * if it is not found.
4511
       */
4512
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4513
        _Fields fields = findByThriftId(fieldId);
4514
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4515
        return fields;
4516
      }
4517
 
4518
      /**
4519
       * Find the _Fields constant that matches name, or null if its not found.
4520
       */
4521
      public static _Fields findByName(String name) {
4522
        return byName.get(name);
4523
      }
4524
 
4525
      private final short _thriftId;
4526
      private final String _fieldName;
4527
 
4528
      _Fields(short thriftId, String fieldName) {
4529
        _thriftId = thriftId;
4530
        _fieldName = fieldName;
4531
      }
4532
 
4533
      public short getThriftFieldId() {
4534
        return _thriftId;
4535
      }
4536
 
4537
      public String getFieldName() {
4538
        return _fieldName;
4539
      }
4540
    }
4541
 
4542
    // isset id assignments
4543
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 4544
    private static final int __FROM_DATE_ISSET_ID = 1;
4545
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 4546
    private BitSet __isset_bit_vector = new BitSet(3);
4547
 
4548
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4549
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
4550
          new FieldValueMetaData(TType.I64)));
132 ashish 4551
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 4552
          new FieldValueMetaData(TType.I64)));
132 ashish 4553
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 4554
          new FieldValueMetaData(TType.I64)));
4555
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
4556
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
4557
    }});
4558
 
4559
    static {
4560
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
4561
    }
4562
 
4563
    public getTransactionsForCustomer_args() {
4564
    }
4565
 
4566
    public getTransactionsForCustomer_args(
4567
      long customerId,
132 ashish 4568
      long from_date,
4569
      long to_date,
68 ashish 4570
      TransactionStatus status)
4571
    {
4572
      this();
4573
      this.customerId = customerId;
4574
      setCustomerIdIsSet(true);
132 ashish 4575
      this.from_date = from_date;
4576
      setFrom_dateIsSet(true);
4577
      this.to_date = to_date;
4578
      setTo_dateIsSet(true);
68 ashish 4579
      this.status = status;
4580
    }
4581
 
4582
    /**
4583
     * Performs a deep copy on <i>other</i>.
4584
     */
4585
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
4586
      __isset_bit_vector.clear();
4587
      __isset_bit_vector.or(other.__isset_bit_vector);
4588
      this.customerId = other.customerId;
132 ashish 4589
      this.from_date = other.from_date;
4590
      this.to_date = other.to_date;
68 ashish 4591
      if (other.isSetStatus()) {
4592
        this.status = other.status;
4593
      }
4594
    }
4595
 
4596
    public getTransactionsForCustomer_args deepCopy() {
4597
      return new getTransactionsForCustomer_args(this);
4598
    }
4599
 
4600
    @Deprecated
4601
    public getTransactionsForCustomer_args clone() {
4602
      return new getTransactionsForCustomer_args(this);
4603
    }
4604
 
4605
    public long getCustomerId() {
4606
      return this.customerId;
4607
    }
4608
 
4609
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
4610
      this.customerId = customerId;
4611
      setCustomerIdIsSet(true);
4612
      return this;
4613
    }
4614
 
4615
    public void unsetCustomerId() {
4616
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
4617
    }
4618
 
4619
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
4620
    public boolean isSetCustomerId() {
4621
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
4622
    }
4623
 
4624
    public void setCustomerIdIsSet(boolean value) {
4625
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
4626
    }
4627
 
132 ashish 4628
    public long getFrom_date() {
4629
      return this.from_date;
68 ashish 4630
    }
4631
 
132 ashish 4632
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
4633
      this.from_date = from_date;
4634
      setFrom_dateIsSet(true);
68 ashish 4635
      return this;
4636
    }
4637
 
132 ashish 4638
    public void unsetFrom_date() {
4639
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 4640
    }
4641
 
132 ashish 4642
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
4643
    public boolean isSetFrom_date() {
4644
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 4645
    }
4646
 
132 ashish 4647
    public void setFrom_dateIsSet(boolean value) {
4648
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 4649
    }
4650
 
132 ashish 4651
    public long getTo_date() {
4652
      return this.to_date;
68 ashish 4653
    }
4654
 
132 ashish 4655
    public getTransactionsForCustomer_args setTo_date(long to_date) {
4656
      this.to_date = to_date;
4657
      setTo_dateIsSet(true);
68 ashish 4658
      return this;
4659
    }
4660
 
132 ashish 4661
    public void unsetTo_date() {
4662
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 4663
    }
4664
 
132 ashish 4665
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
4666
    public boolean isSetTo_date() {
4667
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 4668
    }
4669
 
132 ashish 4670
    public void setTo_dateIsSet(boolean value) {
4671
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 4672
    }
4673
 
4674
    /**
4675
     * 
4676
     * @see TransactionStatus
4677
     */
4678
    public TransactionStatus getStatus() {
4679
      return this.status;
4680
    }
4681
 
4682
    /**
4683
     * 
4684
     * @see TransactionStatus
4685
     */
4686
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
4687
      this.status = status;
4688
      return this;
4689
    }
4690
 
4691
    public void unsetStatus() {
4692
      this.status = null;
4693
    }
4694
 
4695
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
4696
    public boolean isSetStatus() {
4697
      return this.status != null;
4698
    }
4699
 
4700
    public void setStatusIsSet(boolean value) {
4701
      if (!value) {
4702
        this.status = null;
4703
      }
4704
    }
4705
 
4706
    public void setFieldValue(_Fields field, Object value) {
4707
      switch (field) {
4708
      case CUSTOMER_ID:
4709
        if (value == null) {
4710
          unsetCustomerId();
4711
        } else {
4712
          setCustomerId((Long)value);
4713
        }
4714
        break;
4715
 
132 ashish 4716
      case FROM_DATE:
68 ashish 4717
        if (value == null) {
132 ashish 4718
          unsetFrom_date();
68 ashish 4719
        } else {
132 ashish 4720
          setFrom_date((Long)value);
68 ashish 4721
        }
4722
        break;
4723
 
132 ashish 4724
      case TO_DATE:
68 ashish 4725
        if (value == null) {
132 ashish 4726
          unsetTo_date();
68 ashish 4727
        } else {
132 ashish 4728
          setTo_date((Long)value);
68 ashish 4729
        }
4730
        break;
4731
 
4732
      case STATUS:
4733
        if (value == null) {
4734
          unsetStatus();
4735
        } else {
4736
          setStatus((TransactionStatus)value);
4737
        }
4738
        break;
4739
 
4740
      }
4741
    }
4742
 
4743
    public void setFieldValue(int fieldID, Object value) {
4744
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4745
    }
4746
 
4747
    public Object getFieldValue(_Fields field) {
4748
      switch (field) {
4749
      case CUSTOMER_ID:
4750
        return new Long(getCustomerId());
4751
 
132 ashish 4752
      case FROM_DATE:
4753
        return new Long(getFrom_date());
68 ashish 4754
 
132 ashish 4755
      case TO_DATE:
4756
        return new Long(getTo_date());
68 ashish 4757
 
4758
      case STATUS:
4759
        return getStatus();
4760
 
4761
      }
4762
      throw new IllegalStateException();
4763
    }
4764
 
4765
    public Object getFieldValue(int fieldId) {
4766
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4767
    }
4768
 
4769
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4770
    public boolean isSet(_Fields field) {
4771
      switch (field) {
4772
      case CUSTOMER_ID:
4773
        return isSetCustomerId();
132 ashish 4774
      case FROM_DATE:
4775
        return isSetFrom_date();
4776
      case TO_DATE:
4777
        return isSetTo_date();
68 ashish 4778
      case STATUS:
4779
        return isSetStatus();
4780
      }
4781
      throw new IllegalStateException();
4782
    }
4783
 
4784
    public boolean isSet(int fieldID) {
4785
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4786
    }
4787
 
4788
    @Override
4789
    public boolean equals(Object that) {
4790
      if (that == null)
4791
        return false;
4792
      if (that instanceof getTransactionsForCustomer_args)
4793
        return this.equals((getTransactionsForCustomer_args)that);
4794
      return false;
4795
    }
4796
 
4797
    public boolean equals(getTransactionsForCustomer_args that) {
4798
      if (that == null)
4799
        return false;
4800
 
4801
      boolean this_present_customerId = true;
4802
      boolean that_present_customerId = true;
4803
      if (this_present_customerId || that_present_customerId) {
4804
        if (!(this_present_customerId && that_present_customerId))
4805
          return false;
4806
        if (this.customerId != that.customerId)
4807
          return false;
4808
      }
4809
 
132 ashish 4810
      boolean this_present_from_date = true;
4811
      boolean that_present_from_date = true;
4812
      if (this_present_from_date || that_present_from_date) {
4813
        if (!(this_present_from_date && that_present_from_date))
68 ashish 4814
          return false;
132 ashish 4815
        if (this.from_date != that.from_date)
68 ashish 4816
          return false;
4817
      }
4818
 
132 ashish 4819
      boolean this_present_to_date = true;
4820
      boolean that_present_to_date = true;
4821
      if (this_present_to_date || that_present_to_date) {
4822
        if (!(this_present_to_date && that_present_to_date))
68 ashish 4823
          return false;
132 ashish 4824
        if (this.to_date != that.to_date)
68 ashish 4825
          return false;
4826
      }
4827
 
4828
      boolean this_present_status = true && this.isSetStatus();
4829
      boolean that_present_status = true && that.isSetStatus();
4830
      if (this_present_status || that_present_status) {
4831
        if (!(this_present_status && that_present_status))
4832
          return false;
4833
        if (!this.status.equals(that.status))
4834
          return false;
4835
      }
4836
 
4837
      return true;
4838
    }
4839
 
4840
    @Override
4841
    public int hashCode() {
4842
      return 0;
4843
    }
4844
 
4845
    public int compareTo(getTransactionsForCustomer_args other) {
4846
      if (!getClass().equals(other.getClass())) {
4847
        return getClass().getName().compareTo(other.getClass().getName());
4848
      }
4849
 
4850
      int lastComparison = 0;
4851
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
4852
 
4853
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
4854
      if (lastComparison != 0) {
4855
        return lastComparison;
4856
      }
4857
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
4858
      if (lastComparison != 0) {
4859
        return lastComparison;
4860
      }
132 ashish 4861
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 4862
      if (lastComparison != 0) {
4863
        return lastComparison;
4864
      }
132 ashish 4865
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 4866
      if (lastComparison != 0) {
4867
        return lastComparison;
4868
      }
132 ashish 4869
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 4870
      if (lastComparison != 0) {
4871
        return lastComparison;
4872
      }
132 ashish 4873
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 4874
      if (lastComparison != 0) {
4875
        return lastComparison;
4876
      }
4877
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
4878
      if (lastComparison != 0) {
4879
        return lastComparison;
4880
      }
4881
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
4882
      if (lastComparison != 0) {
4883
        return lastComparison;
4884
      }
4885
      return 0;
4886
    }
4887
 
4888
    public void read(TProtocol iprot) throws TException {
4889
      TField field;
4890
      iprot.readStructBegin();
4891
      while (true)
4892
      {
4893
        field = iprot.readFieldBegin();
4894
        if (field.type == TType.STOP) { 
4895
          break;
4896
        }
4897
        _Fields fieldId = _Fields.findByThriftId(field.id);
4898
        if (fieldId == null) {
4899
          TProtocolUtil.skip(iprot, field.type);
4900
        } else {
4901
          switch (fieldId) {
4902
            case CUSTOMER_ID:
4903
              if (field.type == TType.I64) {
4904
                this.customerId = iprot.readI64();
4905
                setCustomerIdIsSet(true);
4906
              } else { 
4907
                TProtocolUtil.skip(iprot, field.type);
4908
              }
4909
              break;
132 ashish 4910
            case FROM_DATE:
68 ashish 4911
              if (field.type == TType.I64) {
132 ashish 4912
                this.from_date = iprot.readI64();
4913
                setFrom_dateIsSet(true);
68 ashish 4914
              } else { 
4915
                TProtocolUtil.skip(iprot, field.type);
4916
              }
4917
              break;
132 ashish 4918
            case TO_DATE:
68 ashish 4919
              if (field.type == TType.I64) {
132 ashish 4920
                this.to_date = iprot.readI64();
4921
                setTo_dateIsSet(true);
68 ashish 4922
              } else { 
4923
                TProtocolUtil.skip(iprot, field.type);
4924
              }
4925
              break;
4926
            case STATUS:
4927
              if (field.type == TType.I32) {
4928
                this.status = TransactionStatus.findByValue(iprot.readI32());
4929
              } else { 
4930
                TProtocolUtil.skip(iprot, field.type);
4931
              }
4932
              break;
4933
          }
4934
          iprot.readFieldEnd();
4935
        }
4936
      }
4937
      iprot.readStructEnd();
4938
      validate();
4939
    }
4940
 
4941
    public void write(TProtocol oprot) throws TException {
4942
      validate();
4943
 
4944
      oprot.writeStructBegin(STRUCT_DESC);
4945
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
4946
      oprot.writeI64(this.customerId);
4947
      oprot.writeFieldEnd();
132 ashish 4948
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
4949
      oprot.writeI64(this.from_date);
68 ashish 4950
      oprot.writeFieldEnd();
132 ashish 4951
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
4952
      oprot.writeI64(this.to_date);
68 ashish 4953
      oprot.writeFieldEnd();
4954
      if (this.status != null) {
4955
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4956
        oprot.writeI32(this.status.getValue());
4957
        oprot.writeFieldEnd();
4958
      }
4959
      oprot.writeFieldStop();
4960
      oprot.writeStructEnd();
4961
    }
4962
 
4963
    @Override
4964
    public String toString() {
4965
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
4966
      boolean first = true;
4967
 
4968
      sb.append("customerId:");
4969
      sb.append(this.customerId);
4970
      first = false;
4971
      if (!first) sb.append(", ");
132 ashish 4972
      sb.append("from_date:");
4973
      sb.append(this.from_date);
68 ashish 4974
      first = false;
4975
      if (!first) sb.append(", ");
132 ashish 4976
      sb.append("to_date:");
4977
      sb.append(this.to_date);
68 ashish 4978
      first = false;
4979
      if (!first) sb.append(", ");
4980
      sb.append("status:");
4981
      if (this.status == null) {
4982
        sb.append("null");
4983
      } else {
4984
        String status_name = status.name();
4985
        if (status_name != null) {
4986
          sb.append(status_name);
4987
          sb.append(" (");
4988
        }
4989
        sb.append(this.status);
4990
        if (status_name != null) {
4991
          sb.append(")");
4992
        }
4993
      }
4994
      first = false;
4995
      sb.append(")");
4996
      return sb.toString();
4997
    }
4998
 
4999
    public void validate() throws TException {
5000
      // check for required fields
5001
    }
5002
 
5003
  }
5004
 
5005
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable   {
5006
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
5007
 
5008
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
5009
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5010
 
5011
    private List<Transaction> success;
5012
    private TransactionServiceException ex;
5013
 
5014
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5015
    public enum _Fields implements TFieldIdEnum {
5016
      SUCCESS((short)0, "success"),
5017
      EX((short)1, "ex");
5018
 
5019
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5020
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5021
 
5022
      static {
5023
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5024
          byId.put((int)field._thriftId, field);
5025
          byName.put(field.getFieldName(), field);
5026
        }
5027
      }
5028
 
5029
      /**
5030
       * Find the _Fields constant that matches fieldId, or null if its not found.
5031
       */
5032
      public static _Fields findByThriftId(int fieldId) {
5033
        return byId.get(fieldId);
5034
      }
5035
 
5036
      /**
5037
       * Find the _Fields constant that matches fieldId, throwing an exception
5038
       * if it is not found.
5039
       */
5040
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5041
        _Fields fields = findByThriftId(fieldId);
5042
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5043
        return fields;
5044
      }
5045
 
5046
      /**
5047
       * Find the _Fields constant that matches name, or null if its not found.
5048
       */
5049
      public static _Fields findByName(String name) {
5050
        return byName.get(name);
5051
      }
5052
 
5053
      private final short _thriftId;
5054
      private final String _fieldName;
5055
 
5056
      _Fields(short thriftId, String fieldName) {
5057
        _thriftId = thriftId;
5058
        _fieldName = fieldName;
5059
      }
5060
 
5061
      public short getThriftFieldId() {
5062
        return _thriftId;
5063
      }
5064
 
5065
      public String getFieldName() {
5066
        return _fieldName;
5067
      }
5068
    }
5069
 
5070
    // isset id assignments
5071
 
5072
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5073
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5074
          new ListMetaData(TType.LIST, 
5075
              new StructMetaData(TType.STRUCT, Transaction.class))));
5076
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5077
          new FieldValueMetaData(TType.STRUCT)));
5078
    }});
5079
 
5080
    static {
5081
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
5082
    }
5083
 
5084
    public getTransactionsForCustomer_result() {
5085
    }
5086
 
5087
    public getTransactionsForCustomer_result(
5088
      List<Transaction> success,
5089
      TransactionServiceException ex)
5090
    {
5091
      this();
5092
      this.success = success;
5093
      this.ex = ex;
5094
    }
5095
 
5096
    /**
5097
     * Performs a deep copy on <i>other</i>.
5098
     */
5099
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
5100
      if (other.isSetSuccess()) {
5101
        List<Transaction> __this__success = new ArrayList<Transaction>();
5102
        for (Transaction other_element : other.success) {
5103
          __this__success.add(new Transaction(other_element));
5104
        }
5105
        this.success = __this__success;
5106
      }
5107
      if (other.isSetEx()) {
5108
        this.ex = new TransactionServiceException(other.ex);
5109
      }
5110
    }
5111
 
5112
    public getTransactionsForCustomer_result deepCopy() {
5113
      return new getTransactionsForCustomer_result(this);
5114
    }
5115
 
5116
    @Deprecated
5117
    public getTransactionsForCustomer_result clone() {
5118
      return new getTransactionsForCustomer_result(this);
5119
    }
5120
 
5121
    public int getSuccessSize() {
5122
      return (this.success == null) ? 0 : this.success.size();
5123
    }
5124
 
5125
    public java.util.Iterator<Transaction> getSuccessIterator() {
5126
      return (this.success == null) ? null : this.success.iterator();
5127
    }
5128
 
5129
    public void addToSuccess(Transaction elem) {
5130
      if (this.success == null) {
5131
        this.success = new ArrayList<Transaction>();
5132
      }
5133
      this.success.add(elem);
5134
    }
5135
 
5136
    public List<Transaction> getSuccess() {
5137
      return this.success;
5138
    }
5139
 
5140
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
5141
      this.success = success;
5142
      return this;
5143
    }
5144
 
5145
    public void unsetSuccess() {
5146
      this.success = null;
5147
    }
5148
 
5149
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5150
    public boolean isSetSuccess() {
5151
      return this.success != null;
5152
    }
5153
 
5154
    public void setSuccessIsSet(boolean value) {
5155
      if (!value) {
5156
        this.success = null;
5157
      }
5158
    }
5159
 
5160
    public TransactionServiceException getEx() {
5161
      return this.ex;
5162
    }
5163
 
5164
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
5165
      this.ex = ex;
5166
      return this;
5167
    }
5168
 
5169
    public void unsetEx() {
5170
      this.ex = null;
5171
    }
5172
 
5173
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5174
    public boolean isSetEx() {
5175
      return this.ex != null;
5176
    }
5177
 
5178
    public void setExIsSet(boolean value) {
5179
      if (!value) {
5180
        this.ex = null;
5181
      }
5182
    }
5183
 
5184
    public void setFieldValue(_Fields field, Object value) {
5185
      switch (field) {
5186
      case SUCCESS:
5187
        if (value == null) {
5188
          unsetSuccess();
5189
        } else {
5190
          setSuccess((List<Transaction>)value);
5191
        }
5192
        break;
5193
 
5194
      case EX:
5195
        if (value == null) {
5196
          unsetEx();
5197
        } else {
5198
          setEx((TransactionServiceException)value);
5199
        }
5200
        break;
5201
 
5202
      }
5203
    }
5204
 
5205
    public void setFieldValue(int fieldID, Object value) {
5206
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5207
    }
5208
 
5209
    public Object getFieldValue(_Fields field) {
5210
      switch (field) {
5211
      case SUCCESS:
5212
        return getSuccess();
5213
 
5214
      case EX:
5215
        return getEx();
5216
 
5217
      }
5218
      throw new IllegalStateException();
5219
    }
5220
 
5221
    public Object getFieldValue(int fieldId) {
5222
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5223
    }
5224
 
5225
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5226
    public boolean isSet(_Fields field) {
5227
      switch (field) {
5228
      case SUCCESS:
5229
        return isSetSuccess();
5230
      case EX:
5231
        return isSetEx();
5232
      }
5233
      throw new IllegalStateException();
5234
    }
5235
 
5236
    public boolean isSet(int fieldID) {
5237
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5238
    }
5239
 
5240
    @Override
5241
    public boolean equals(Object that) {
5242
      if (that == null)
5243
        return false;
5244
      if (that instanceof getTransactionsForCustomer_result)
5245
        return this.equals((getTransactionsForCustomer_result)that);
5246
      return false;
5247
    }
5248
 
5249
    public boolean equals(getTransactionsForCustomer_result that) {
5250
      if (that == null)
5251
        return false;
5252
 
5253
      boolean this_present_success = true && this.isSetSuccess();
5254
      boolean that_present_success = true && that.isSetSuccess();
5255
      if (this_present_success || that_present_success) {
5256
        if (!(this_present_success && that_present_success))
5257
          return false;
5258
        if (!this.success.equals(that.success))
5259
          return false;
5260
      }
5261
 
5262
      boolean this_present_ex = true && this.isSetEx();
5263
      boolean that_present_ex = true && that.isSetEx();
5264
      if (this_present_ex || that_present_ex) {
5265
        if (!(this_present_ex && that_present_ex))
5266
          return false;
5267
        if (!this.ex.equals(that.ex))
5268
          return false;
5269
      }
5270
 
5271
      return true;
5272
    }
5273
 
5274
    @Override
5275
    public int hashCode() {
5276
      return 0;
5277
    }
5278
 
5279
    public void read(TProtocol iprot) throws TException {
5280
      TField field;
5281
      iprot.readStructBegin();
5282
      while (true)
5283
      {
5284
        field = iprot.readFieldBegin();
5285
        if (field.type == TType.STOP) { 
5286
          break;
5287
        }
5288
        _Fields fieldId = _Fields.findByThriftId(field.id);
5289
        if (fieldId == null) {
5290
          TProtocolUtil.skip(iprot, field.type);
5291
        } else {
5292
          switch (fieldId) {
5293
            case SUCCESS:
5294
              if (field.type == TType.LIST) {
5295
                {
132 ashish 5296
                  TList _list38 = iprot.readListBegin();
5297
                  this.success = new ArrayList<Transaction>(_list38.size);
5298
                  for (int _i39 = 0; _i39 < _list38.size; ++_i39)
68 ashish 5299
                  {
132 ashish 5300
                    Transaction _elem40;
5301
                    _elem40 = new Transaction();
5302
                    _elem40.read(iprot);
5303
                    this.success.add(_elem40);
68 ashish 5304
                  }
5305
                  iprot.readListEnd();
5306
                }
5307
              } else { 
5308
                TProtocolUtil.skip(iprot, field.type);
5309
              }
5310
              break;
5311
            case EX:
5312
              if (field.type == TType.STRUCT) {
5313
                this.ex = new TransactionServiceException();
5314
                this.ex.read(iprot);
5315
              } else { 
5316
                TProtocolUtil.skip(iprot, field.type);
5317
              }
5318
              break;
5319
          }
5320
          iprot.readFieldEnd();
5321
        }
5322
      }
5323
      iprot.readStructEnd();
5324
      validate();
5325
    }
5326
 
5327
    public void write(TProtocol oprot) throws TException {
5328
      oprot.writeStructBegin(STRUCT_DESC);
5329
 
5330
      if (this.isSetSuccess()) {
5331
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5332
        {
5333
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
132 ashish 5334
          for (Transaction _iter41 : this.success)
68 ashish 5335
          {
132 ashish 5336
            _iter41.write(oprot);
68 ashish 5337
          }
5338
          oprot.writeListEnd();
5339
        }
5340
        oprot.writeFieldEnd();
5341
      } else if (this.isSetEx()) {
5342
        oprot.writeFieldBegin(EX_FIELD_DESC);
5343
        this.ex.write(oprot);
5344
        oprot.writeFieldEnd();
5345
      }
5346
      oprot.writeFieldStop();
5347
      oprot.writeStructEnd();
5348
    }
5349
 
5350
    @Override
5351
    public String toString() {
5352
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
5353
      boolean first = true;
5354
 
5355
      sb.append("success:");
5356
      if (this.success == null) {
5357
        sb.append("null");
5358
      } else {
5359
        sb.append(this.success);
5360
      }
5361
      first = false;
5362
      if (!first) sb.append(", ");
5363
      sb.append("ex:");
5364
      if (this.ex == null) {
5365
        sb.append("null");
5366
      } else {
5367
        sb.append(this.ex);
5368
      }
5369
      first = false;
5370
      sb.append(")");
5371
      return sb.toString();
5372
    }
5373
 
5374
    public void validate() throws TException {
5375
      // check for required fields
5376
    }
5377
 
5378
  }
5379
 
5380
  public static class getTransactionsForCustomerAndShipmentStatus_args implements TBase<getTransactionsForCustomerAndShipmentStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomerAndShipmentStatus_args>   {
5381
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomerAndShipmentStatus_args");
5382
 
5383
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 5384
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
5385
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 5386
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
5387
 
5388
    private long customerId;
132 ashish 5389
    private long from_date;
5390
    private long to_date;
68 ashish 5391
    private ShipmentStatus status;
5392
 
5393
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5394
    public enum _Fields implements TFieldIdEnum {
5395
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 5396
      FROM_DATE((short)2, "from_date"),
5397
      TO_DATE((short)3, "to_date"),
68 ashish 5398
      /**
5399
       * 
5400
       * @see ShipmentStatus
5401
       */
5402
      STATUS((short)4, "status");
5403
 
5404
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5405
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5406
 
5407
      static {
5408
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5409
          byId.put((int)field._thriftId, field);
5410
          byName.put(field.getFieldName(), field);
5411
        }
5412
      }
5413
 
5414
      /**
5415
       * Find the _Fields constant that matches fieldId, or null if its not found.
5416
       */
5417
      public static _Fields findByThriftId(int fieldId) {
5418
        return byId.get(fieldId);
5419
      }
5420
 
5421
      /**
5422
       * Find the _Fields constant that matches fieldId, throwing an exception
5423
       * if it is not found.
5424
       */
5425
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5426
        _Fields fields = findByThriftId(fieldId);
5427
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5428
        return fields;
5429
      }
5430
 
5431
      /**
5432
       * Find the _Fields constant that matches name, or null if its not found.
5433
       */
5434
      public static _Fields findByName(String name) {
5435
        return byName.get(name);
5436
      }
5437
 
5438
      private final short _thriftId;
5439
      private final String _fieldName;
5440
 
5441
      _Fields(short thriftId, String fieldName) {
5442
        _thriftId = thriftId;
5443
        _fieldName = fieldName;
5444
      }
5445
 
5446
      public short getThriftFieldId() {
5447
        return _thriftId;
5448
      }
5449
 
5450
      public String getFieldName() {
5451
        return _fieldName;
5452
      }
5453
    }
5454
 
5455
    // isset id assignments
5456
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 5457
    private static final int __FROM_DATE_ISSET_ID = 1;
5458
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 5459
    private BitSet __isset_bit_vector = new BitSet(3);
5460
 
5461
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5462
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
5463
          new FieldValueMetaData(TType.I64)));
132 ashish 5464
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 5465
          new FieldValueMetaData(TType.I64)));
132 ashish 5466
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 5467
          new FieldValueMetaData(TType.I64)));
5468
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
5469
          new EnumMetaData(TType.ENUM, ShipmentStatus.class)));
5470
    }});
5471
 
5472
    static {
5473
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomerAndShipmentStatus_args.class, metaDataMap);
5474
    }
5475
 
5476
    public getTransactionsForCustomerAndShipmentStatus_args() {
5477
    }
5478
 
5479
    public getTransactionsForCustomerAndShipmentStatus_args(
5480
      long customerId,
132 ashish 5481
      long from_date,
5482
      long to_date,
68 ashish 5483
      ShipmentStatus status)
5484
    {
5485
      this();
5486
      this.customerId = customerId;
5487
      setCustomerIdIsSet(true);
132 ashish 5488
      this.from_date = from_date;
5489
      setFrom_dateIsSet(true);
5490
      this.to_date = to_date;
5491
      setTo_dateIsSet(true);
68 ashish 5492
      this.status = status;
5493
    }
5494
 
5495
    /**
5496
     * Performs a deep copy on <i>other</i>.
5497
     */
5498
    public getTransactionsForCustomerAndShipmentStatus_args(getTransactionsForCustomerAndShipmentStatus_args other) {
5499
      __isset_bit_vector.clear();
5500
      __isset_bit_vector.or(other.__isset_bit_vector);
5501
      this.customerId = other.customerId;
132 ashish 5502
      this.from_date = other.from_date;
5503
      this.to_date = other.to_date;
68 ashish 5504
      if (other.isSetStatus()) {
5505
        this.status = other.status;
5506
      }
5507
    }
5508
 
5509
    public getTransactionsForCustomerAndShipmentStatus_args deepCopy() {
5510
      return new getTransactionsForCustomerAndShipmentStatus_args(this);
5511
    }
5512
 
5513
    @Deprecated
5514
    public getTransactionsForCustomerAndShipmentStatus_args clone() {
5515
      return new getTransactionsForCustomerAndShipmentStatus_args(this);
5516
    }
5517
 
5518
    public long getCustomerId() {
5519
      return this.customerId;
5520
    }
5521
 
5522
    public getTransactionsForCustomerAndShipmentStatus_args setCustomerId(long customerId) {
5523
      this.customerId = customerId;
5524
      setCustomerIdIsSet(true);
5525
      return this;
5526
    }
5527
 
5528
    public void unsetCustomerId() {
5529
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
5530
    }
5531
 
5532
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
5533
    public boolean isSetCustomerId() {
5534
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
5535
    }
5536
 
5537
    public void setCustomerIdIsSet(boolean value) {
5538
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
5539
    }
5540
 
132 ashish 5541
    public long getFrom_date() {
5542
      return this.from_date;
68 ashish 5543
    }
5544
 
132 ashish 5545
    public getTransactionsForCustomerAndShipmentStatus_args setFrom_date(long from_date) {
5546
      this.from_date = from_date;
5547
      setFrom_dateIsSet(true);
68 ashish 5548
      return this;
5549
    }
5550
 
132 ashish 5551
    public void unsetFrom_date() {
5552
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 5553
    }
5554
 
132 ashish 5555
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
5556
    public boolean isSetFrom_date() {
5557
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 5558
    }
5559
 
132 ashish 5560
    public void setFrom_dateIsSet(boolean value) {
5561
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 5562
    }
5563
 
132 ashish 5564
    public long getTo_date() {
5565
      return this.to_date;
68 ashish 5566
    }
5567
 
132 ashish 5568
    public getTransactionsForCustomerAndShipmentStatus_args setTo_date(long to_date) {
5569
      this.to_date = to_date;
5570
      setTo_dateIsSet(true);
68 ashish 5571
      return this;
5572
    }
5573
 
132 ashish 5574
    public void unsetTo_date() {
5575
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 5576
    }
5577
 
132 ashish 5578
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
5579
    public boolean isSetTo_date() {
5580
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 5581
    }
5582
 
132 ashish 5583
    public void setTo_dateIsSet(boolean value) {
5584
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 5585
    }
5586
 
5587
    /**
5588
     * 
5589
     * @see ShipmentStatus
5590
     */
5591
    public ShipmentStatus getStatus() {
5592
      return this.status;
5593
    }
5594
 
5595
    /**
5596
     * 
5597
     * @see ShipmentStatus
5598
     */
5599
    public getTransactionsForCustomerAndShipmentStatus_args setStatus(ShipmentStatus status) {
5600
      this.status = status;
5601
      return this;
5602
    }
5603
 
5604
    public void unsetStatus() {
5605
      this.status = null;
5606
    }
5607
 
5608
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
5609
    public boolean isSetStatus() {
5610
      return this.status != null;
5611
    }
5612
 
5613
    public void setStatusIsSet(boolean value) {
5614
      if (!value) {
5615
        this.status = null;
5616
      }
5617
    }
5618
 
5619
    public void setFieldValue(_Fields field, Object value) {
5620
      switch (field) {
5621
      case CUSTOMER_ID:
5622
        if (value == null) {
5623
          unsetCustomerId();
5624
        } else {
5625
          setCustomerId((Long)value);
5626
        }
5627
        break;
5628
 
132 ashish 5629
      case FROM_DATE:
68 ashish 5630
        if (value == null) {
132 ashish 5631
          unsetFrom_date();
68 ashish 5632
        } else {
132 ashish 5633
          setFrom_date((Long)value);
68 ashish 5634
        }
5635
        break;
5636
 
132 ashish 5637
      case TO_DATE:
68 ashish 5638
        if (value == null) {
132 ashish 5639
          unsetTo_date();
68 ashish 5640
        } else {
132 ashish 5641
          setTo_date((Long)value);
68 ashish 5642
        }
5643
        break;
5644
 
5645
      case STATUS:
5646
        if (value == null) {
5647
          unsetStatus();
5648
        } else {
5649
          setStatus((ShipmentStatus)value);
5650
        }
5651
        break;
5652
 
5653
      }
5654
    }
5655
 
5656
    public void setFieldValue(int fieldID, Object value) {
5657
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5658
    }
5659
 
5660
    public Object getFieldValue(_Fields field) {
5661
      switch (field) {
5662
      case CUSTOMER_ID:
5663
        return new Long(getCustomerId());
5664
 
132 ashish 5665
      case FROM_DATE:
5666
        return new Long(getFrom_date());
68 ashish 5667
 
132 ashish 5668
      case TO_DATE:
5669
        return new Long(getTo_date());
68 ashish 5670
 
5671
      case STATUS:
5672
        return getStatus();
5673
 
5674
      }
5675
      throw new IllegalStateException();
5676
    }
5677
 
5678
    public Object getFieldValue(int fieldId) {
5679
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5680
    }
5681
 
5682
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5683
    public boolean isSet(_Fields field) {
5684
      switch (field) {
5685
      case CUSTOMER_ID:
5686
        return isSetCustomerId();
132 ashish 5687
      case FROM_DATE:
5688
        return isSetFrom_date();
5689
      case TO_DATE:
5690
        return isSetTo_date();
68 ashish 5691
      case STATUS:
5692
        return isSetStatus();
5693
      }
5694
      throw new IllegalStateException();
5695
    }
5696
 
5697
    public boolean isSet(int fieldID) {
5698
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5699
    }
5700
 
5701
    @Override
5702
    public boolean equals(Object that) {
5703
      if (that == null)
5704
        return false;
5705
      if (that instanceof getTransactionsForCustomerAndShipmentStatus_args)
5706
        return this.equals((getTransactionsForCustomerAndShipmentStatus_args)that);
5707
      return false;
5708
    }
5709
 
5710
    public boolean equals(getTransactionsForCustomerAndShipmentStatus_args that) {
5711
      if (that == null)
5712
        return false;
5713
 
5714
      boolean this_present_customerId = true;
5715
      boolean that_present_customerId = true;
5716
      if (this_present_customerId || that_present_customerId) {
5717
        if (!(this_present_customerId && that_present_customerId))
5718
          return false;
5719
        if (this.customerId != that.customerId)
5720
          return false;
5721
      }
5722
 
132 ashish 5723
      boolean this_present_from_date = true;
5724
      boolean that_present_from_date = true;
5725
      if (this_present_from_date || that_present_from_date) {
5726
        if (!(this_present_from_date && that_present_from_date))
68 ashish 5727
          return false;
132 ashish 5728
        if (this.from_date != that.from_date)
68 ashish 5729
          return false;
5730
      }
5731
 
132 ashish 5732
      boolean this_present_to_date = true;
5733
      boolean that_present_to_date = true;
5734
      if (this_present_to_date || that_present_to_date) {
5735
        if (!(this_present_to_date && that_present_to_date))
68 ashish 5736
          return false;
132 ashish 5737
        if (this.to_date != that.to_date)
68 ashish 5738
          return false;
5739
      }
5740
 
5741
      boolean this_present_status = true && this.isSetStatus();
5742
      boolean that_present_status = true && that.isSetStatus();
5743
      if (this_present_status || that_present_status) {
5744
        if (!(this_present_status && that_present_status))
5745
          return false;
5746
        if (!this.status.equals(that.status))
5747
          return false;
5748
      }
5749
 
5750
      return true;
5751
    }
5752
 
5753
    @Override
5754
    public int hashCode() {
5755
      return 0;
5756
    }
5757
 
5758
    public int compareTo(getTransactionsForCustomerAndShipmentStatus_args other) {
5759
      if (!getClass().equals(other.getClass())) {
5760
        return getClass().getName().compareTo(other.getClass().getName());
5761
      }
5762
 
5763
      int lastComparison = 0;
5764
      getTransactionsForCustomerAndShipmentStatus_args typedOther = (getTransactionsForCustomerAndShipmentStatus_args)other;
5765
 
5766
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
5767
      if (lastComparison != 0) {
5768
        return lastComparison;
5769
      }
5770
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
5771
      if (lastComparison != 0) {
5772
        return lastComparison;
5773
      }
132 ashish 5774
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 5775
      if (lastComparison != 0) {
5776
        return lastComparison;
5777
      }
132 ashish 5778
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 5779
      if (lastComparison != 0) {
5780
        return lastComparison;
5781
      }
132 ashish 5782
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 5783
      if (lastComparison != 0) {
5784
        return lastComparison;
5785
      }
132 ashish 5786
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 5787
      if (lastComparison != 0) {
5788
        return lastComparison;
5789
      }
5790
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
5791
      if (lastComparison != 0) {
5792
        return lastComparison;
5793
      }
5794
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
5795
      if (lastComparison != 0) {
5796
        return lastComparison;
5797
      }
5798
      return 0;
5799
    }
5800
 
5801
    public void read(TProtocol iprot) throws TException {
5802
      TField field;
5803
      iprot.readStructBegin();
5804
      while (true)
5805
      {
5806
        field = iprot.readFieldBegin();
5807
        if (field.type == TType.STOP) { 
5808
          break;
5809
        }
5810
        _Fields fieldId = _Fields.findByThriftId(field.id);
5811
        if (fieldId == null) {
5812
          TProtocolUtil.skip(iprot, field.type);
5813
        } else {
5814
          switch (fieldId) {
5815
            case CUSTOMER_ID:
5816
              if (field.type == TType.I64) {
5817
                this.customerId = iprot.readI64();
5818
                setCustomerIdIsSet(true);
5819
              } else { 
5820
                TProtocolUtil.skip(iprot, field.type);
5821
              }
5822
              break;
132 ashish 5823
            case FROM_DATE:
68 ashish 5824
              if (field.type == TType.I64) {
132 ashish 5825
                this.from_date = iprot.readI64();
5826
                setFrom_dateIsSet(true);
68 ashish 5827
              } else { 
5828
                TProtocolUtil.skip(iprot, field.type);
5829
              }
5830
              break;
132 ashish 5831
            case TO_DATE:
68 ashish 5832
              if (field.type == TType.I64) {
132 ashish 5833
                this.to_date = iprot.readI64();
5834
                setTo_dateIsSet(true);
68 ashish 5835
              } else { 
5836
                TProtocolUtil.skip(iprot, field.type);
5837
              }
5838
              break;
5839
            case STATUS:
5840
              if (field.type == TType.I32) {
5841
                this.status = ShipmentStatus.findByValue(iprot.readI32());
5842
              } else { 
5843
                TProtocolUtil.skip(iprot, field.type);
5844
              }
5845
              break;
5846
          }
5847
          iprot.readFieldEnd();
5848
        }
5849
      }
5850
      iprot.readStructEnd();
5851
      validate();
5852
    }
5853
 
5854
    public void write(TProtocol oprot) throws TException {
5855
      validate();
5856
 
5857
      oprot.writeStructBegin(STRUCT_DESC);
5858
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
5859
      oprot.writeI64(this.customerId);
5860
      oprot.writeFieldEnd();
132 ashish 5861
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
5862
      oprot.writeI64(this.from_date);
68 ashish 5863
      oprot.writeFieldEnd();
132 ashish 5864
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
5865
      oprot.writeI64(this.to_date);
68 ashish 5866
      oprot.writeFieldEnd();
5867
      if (this.status != null) {
5868
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
5869
        oprot.writeI32(this.status.getValue());
5870
        oprot.writeFieldEnd();
5871
      }
5872
      oprot.writeFieldStop();
5873
      oprot.writeStructEnd();
5874
    }
5875
 
5876
    @Override
5877
    public String toString() {
5878
      StringBuilder sb = new StringBuilder("getTransactionsForCustomerAndShipmentStatus_args(");
5879
      boolean first = true;
5880
 
5881
      sb.append("customerId:");
5882
      sb.append(this.customerId);
5883
      first = false;
5884
      if (!first) sb.append(", ");
132 ashish 5885
      sb.append("from_date:");
5886
      sb.append(this.from_date);
68 ashish 5887
      first = false;
5888
      if (!first) sb.append(", ");
132 ashish 5889
      sb.append("to_date:");
5890
      sb.append(this.to_date);
68 ashish 5891
      first = false;
5892
      if (!first) sb.append(", ");
5893
      sb.append("status:");
5894
      if (this.status == null) {
5895
        sb.append("null");
5896
      } else {
5897
        String status_name = status.name();
5898
        if (status_name != null) {
5899
          sb.append(status_name);
5900
          sb.append(" (");
5901
        }
5902
        sb.append(this.status);
5903
        if (status_name != null) {
5904
          sb.append(")");
5905
        }
5906
      }
5907
      first = false;
5908
      sb.append(")");
5909
      return sb.toString();
5910
    }
5911
 
5912
    public void validate() throws TException {
5913
      // check for required fields
5914
    }
5915
 
5916
  }
5917
 
5918
  public static class getTransactionsForCustomerAndShipmentStatus_result implements TBase<getTransactionsForCustomerAndShipmentStatus_result._Fields>, java.io.Serializable, Cloneable   {
5919
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomerAndShipmentStatus_result");
5920
 
5921
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
5922
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5923
 
5924
    private List<Transaction> success;
5925
    private TransactionServiceException ex;
5926
 
5927
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5928
    public enum _Fields implements TFieldIdEnum {
5929
      SUCCESS((short)0, "success"),
5930
      EX((short)1, "ex");
5931
 
5932
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5933
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5934
 
5935
      static {
5936
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5937
          byId.put((int)field._thriftId, field);
5938
          byName.put(field.getFieldName(), field);
5939
        }
5940
      }
5941
 
5942
      /**
5943
       * Find the _Fields constant that matches fieldId, or null if its not found.
5944
       */
5945
      public static _Fields findByThriftId(int fieldId) {
5946
        return byId.get(fieldId);
5947
      }
5948
 
5949
      /**
5950
       * Find the _Fields constant that matches fieldId, throwing an exception
5951
       * if it is not found.
5952
       */
5953
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5954
        _Fields fields = findByThriftId(fieldId);
5955
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5956
        return fields;
5957
      }
5958
 
5959
      /**
5960
       * Find the _Fields constant that matches name, or null if its not found.
5961
       */
5962
      public static _Fields findByName(String name) {
5963
        return byName.get(name);
5964
      }
5965
 
5966
      private final short _thriftId;
5967
      private final String _fieldName;
5968
 
5969
      _Fields(short thriftId, String fieldName) {
5970
        _thriftId = thriftId;
5971
        _fieldName = fieldName;
5972
      }
5973
 
5974
      public short getThriftFieldId() {
5975
        return _thriftId;
5976
      }
5977
 
5978
      public String getFieldName() {
5979
        return _fieldName;
5980
      }
5981
    }
5982
 
5983
    // isset id assignments
5984
 
5985
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5986
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5987
          new ListMetaData(TType.LIST, 
5988
              new StructMetaData(TType.STRUCT, Transaction.class))));
5989
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5990
          new FieldValueMetaData(TType.STRUCT)));
5991
    }});
5992
 
5993
    static {
5994
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomerAndShipmentStatus_result.class, metaDataMap);
5995
    }
5996
 
5997
    public getTransactionsForCustomerAndShipmentStatus_result() {
5998
    }
5999
 
6000
    public getTransactionsForCustomerAndShipmentStatus_result(
6001
      List<Transaction> success,
6002
      TransactionServiceException ex)
6003
    {
6004
      this();
6005
      this.success = success;
6006
      this.ex = ex;
6007
    }
6008
 
6009
    /**
6010
     * Performs a deep copy on <i>other</i>.
6011
     */
6012
    public getTransactionsForCustomerAndShipmentStatus_result(getTransactionsForCustomerAndShipmentStatus_result other) {
6013
      if (other.isSetSuccess()) {
6014
        List<Transaction> __this__success = new ArrayList<Transaction>();
6015
        for (Transaction other_element : other.success) {
6016
          __this__success.add(new Transaction(other_element));
6017
        }
6018
        this.success = __this__success;
6019
      }
6020
      if (other.isSetEx()) {
6021
        this.ex = new TransactionServiceException(other.ex);
6022
      }
6023
    }
6024
 
6025
    public getTransactionsForCustomerAndShipmentStatus_result deepCopy() {
6026
      return new getTransactionsForCustomerAndShipmentStatus_result(this);
6027
    }
6028
 
6029
    @Deprecated
6030
    public getTransactionsForCustomerAndShipmentStatus_result clone() {
6031
      return new getTransactionsForCustomerAndShipmentStatus_result(this);
6032
    }
6033
 
6034
    public int getSuccessSize() {
6035
      return (this.success == null) ? 0 : this.success.size();
6036
    }
6037
 
6038
    public java.util.Iterator<Transaction> getSuccessIterator() {
6039
      return (this.success == null) ? null : this.success.iterator();
6040
    }
6041
 
6042
    public void addToSuccess(Transaction elem) {
6043
      if (this.success == null) {
6044
        this.success = new ArrayList<Transaction>();
6045
      }
6046
      this.success.add(elem);
6047
    }
6048
 
6049
    public List<Transaction> getSuccess() {
6050
      return this.success;
6051
    }
6052
 
6053
    public getTransactionsForCustomerAndShipmentStatus_result setSuccess(List<Transaction> success) {
6054
      this.success = success;
6055
      return this;
6056
    }
6057
 
6058
    public void unsetSuccess() {
6059
      this.success = null;
6060
    }
6061
 
6062
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6063
    public boolean isSetSuccess() {
6064
      return this.success != null;
6065
    }
6066
 
6067
    public void setSuccessIsSet(boolean value) {
6068
      if (!value) {
6069
        this.success = null;
6070
      }
6071
    }
6072
 
6073
    public TransactionServiceException getEx() {
6074
      return this.ex;
6075
    }
6076
 
6077
    public getTransactionsForCustomerAndShipmentStatus_result setEx(TransactionServiceException ex) {
6078
      this.ex = ex;
6079
      return this;
6080
    }
6081
 
6082
    public void unsetEx() {
6083
      this.ex = null;
6084
    }
6085
 
6086
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6087
    public boolean isSetEx() {
6088
      return this.ex != null;
6089
    }
6090
 
6091
    public void setExIsSet(boolean value) {
6092
      if (!value) {
6093
        this.ex = null;
6094
      }
6095
    }
6096
 
6097
    public void setFieldValue(_Fields field, Object value) {
6098
      switch (field) {
6099
      case SUCCESS:
6100
        if (value == null) {
6101
          unsetSuccess();
6102
        } else {
6103
          setSuccess((List<Transaction>)value);
6104
        }
6105
        break;
6106
 
6107
      case EX:
6108
        if (value == null) {
6109
          unsetEx();
6110
        } else {
6111
          setEx((TransactionServiceException)value);
6112
        }
6113
        break;
6114
 
6115
      }
6116
    }
6117
 
6118
    public void setFieldValue(int fieldID, Object value) {
6119
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6120
    }
6121
 
6122
    public Object getFieldValue(_Fields field) {
6123
      switch (field) {
6124
      case SUCCESS:
6125
        return getSuccess();
6126
 
6127
      case EX:
6128
        return getEx();
6129
 
6130
      }
6131
      throw new IllegalStateException();
6132
    }
6133
 
6134
    public Object getFieldValue(int fieldId) {
6135
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6136
    }
6137
 
6138
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6139
    public boolean isSet(_Fields field) {
6140
      switch (field) {
6141
      case SUCCESS:
6142
        return isSetSuccess();
6143
      case EX:
6144
        return isSetEx();
6145
      }
6146
      throw new IllegalStateException();
6147
    }
6148
 
6149
    public boolean isSet(int fieldID) {
6150
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6151
    }
6152
 
6153
    @Override
6154
    public boolean equals(Object that) {
6155
      if (that == null)
6156
        return false;
6157
      if (that instanceof getTransactionsForCustomerAndShipmentStatus_result)
6158
        return this.equals((getTransactionsForCustomerAndShipmentStatus_result)that);
6159
      return false;
6160
    }
6161
 
6162
    public boolean equals(getTransactionsForCustomerAndShipmentStatus_result that) {
6163
      if (that == null)
6164
        return false;
6165
 
6166
      boolean this_present_success = true && this.isSetSuccess();
6167
      boolean that_present_success = true && that.isSetSuccess();
6168
      if (this_present_success || that_present_success) {
6169
        if (!(this_present_success && that_present_success))
6170
          return false;
6171
        if (!this.success.equals(that.success))
6172
          return false;
6173
      }
6174
 
6175
      boolean this_present_ex = true && this.isSetEx();
6176
      boolean that_present_ex = true && that.isSetEx();
6177
      if (this_present_ex || that_present_ex) {
6178
        if (!(this_present_ex && that_present_ex))
6179
          return false;
6180
        if (!this.ex.equals(that.ex))
6181
          return false;
6182
      }
6183
 
6184
      return true;
6185
    }
6186
 
6187
    @Override
6188
    public int hashCode() {
6189
      return 0;
6190
    }
6191
 
6192
    public void read(TProtocol iprot) throws TException {
6193
      TField field;
6194
      iprot.readStructBegin();
6195
      while (true)
6196
      {
6197
        field = iprot.readFieldBegin();
6198
        if (field.type == TType.STOP) { 
6199
          break;
6200
        }
6201
        _Fields fieldId = _Fields.findByThriftId(field.id);
6202
        if (fieldId == null) {
6203
          TProtocolUtil.skip(iprot, field.type);
6204
        } else {
6205
          switch (fieldId) {
6206
            case SUCCESS:
6207
              if (field.type == TType.LIST) {
6208
                {
132 ashish 6209
                  TList _list42 = iprot.readListBegin();
6210
                  this.success = new ArrayList<Transaction>(_list42.size);
6211
                  for (int _i43 = 0; _i43 < _list42.size; ++_i43)
68 ashish 6212
                  {
132 ashish 6213
                    Transaction _elem44;
6214
                    _elem44 = new Transaction();
6215
                    _elem44.read(iprot);
6216
                    this.success.add(_elem44);
68 ashish 6217
                  }
6218
                  iprot.readListEnd();
6219
                }
6220
              } else { 
6221
                TProtocolUtil.skip(iprot, field.type);
6222
              }
6223
              break;
6224
            case EX:
6225
              if (field.type == TType.STRUCT) {
6226
                this.ex = new TransactionServiceException();
6227
                this.ex.read(iprot);
6228
              } else { 
6229
                TProtocolUtil.skip(iprot, field.type);
6230
              }
6231
              break;
6232
          }
6233
          iprot.readFieldEnd();
6234
        }
6235
      }
6236
      iprot.readStructEnd();
6237
      validate();
6238
    }
6239
 
6240
    public void write(TProtocol oprot) throws TException {
6241
      oprot.writeStructBegin(STRUCT_DESC);
6242
 
6243
      if (this.isSetSuccess()) {
6244
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6245
        {
6246
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
132 ashish 6247
          for (Transaction _iter45 : this.success)
68 ashish 6248
          {
132 ashish 6249
            _iter45.write(oprot);
68 ashish 6250
          }
6251
          oprot.writeListEnd();
6252
        }
6253
        oprot.writeFieldEnd();
6254
      } else if (this.isSetEx()) {
6255
        oprot.writeFieldBegin(EX_FIELD_DESC);
6256
        this.ex.write(oprot);
6257
        oprot.writeFieldEnd();
6258
      }
6259
      oprot.writeFieldStop();
6260
      oprot.writeStructEnd();
6261
    }
6262
 
6263
    @Override
6264
    public String toString() {
6265
      StringBuilder sb = new StringBuilder("getTransactionsForCustomerAndShipmentStatus_result(");
6266
      boolean first = true;
6267
 
6268
      sb.append("success:");
6269
      if (this.success == null) {
6270
        sb.append("null");
6271
      } else {
6272
        sb.append(this.success);
6273
      }
6274
      first = false;
6275
      if (!first) sb.append(", ");
6276
      sb.append("ex:");
6277
      if (this.ex == null) {
6278
        sb.append("null");
6279
      } else {
6280
        sb.append(this.ex);
6281
      }
6282
      first = false;
6283
      sb.append(")");
6284
      return sb.toString();
6285
    }
6286
 
6287
    public void validate() throws TException {
6288
      // check for required fields
6289
    }
6290
 
6291
  }
6292
 
132 ashish 6293
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
6294
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
6295
 
6296
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
6297
 
6298
    private long shoppingCartId;
6299
 
6300
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6301
    public enum _Fields implements TFieldIdEnum {
6302
      SHOPPING_CART_ID((short)1, "shoppingCartId");
6303
 
6304
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6305
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6306
 
6307
      static {
6308
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6309
          byId.put((int)field._thriftId, field);
6310
          byName.put(field.getFieldName(), field);
6311
        }
6312
      }
6313
 
6314
      /**
6315
       * Find the _Fields constant that matches fieldId, or null if its not found.
6316
       */
6317
      public static _Fields findByThriftId(int fieldId) {
6318
        return byId.get(fieldId);
6319
      }
6320
 
6321
      /**
6322
       * Find the _Fields constant that matches fieldId, throwing an exception
6323
       * if it is not found.
6324
       */
6325
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6326
        _Fields fields = findByThriftId(fieldId);
6327
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6328
        return fields;
6329
      }
6330
 
6331
      /**
6332
       * Find the _Fields constant that matches name, or null if its not found.
6333
       */
6334
      public static _Fields findByName(String name) {
6335
        return byName.get(name);
6336
      }
6337
 
6338
      private final short _thriftId;
6339
      private final String _fieldName;
6340
 
6341
      _Fields(short thriftId, String fieldName) {
6342
        _thriftId = thriftId;
6343
        _fieldName = fieldName;
6344
      }
6345
 
6346
      public short getThriftFieldId() {
6347
        return _thriftId;
6348
      }
6349
 
6350
      public String getFieldName() {
6351
        return _fieldName;
6352
      }
6353
    }
6354
 
6355
    // isset id assignments
6356
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
6357
    private BitSet __isset_bit_vector = new BitSet(1);
6358
 
6359
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6360
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
6361
          new FieldValueMetaData(TType.I64)));
6362
    }});
6363
 
6364
    static {
6365
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
6366
    }
6367
 
6368
    public getTransactionsForShoppingCartId_args() {
6369
    }
6370
 
6371
    public getTransactionsForShoppingCartId_args(
6372
      long shoppingCartId)
6373
    {
6374
      this();
6375
      this.shoppingCartId = shoppingCartId;
6376
      setShoppingCartIdIsSet(true);
6377
    }
6378
 
6379
    /**
6380
     * Performs a deep copy on <i>other</i>.
6381
     */
6382
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
6383
      __isset_bit_vector.clear();
6384
      __isset_bit_vector.or(other.__isset_bit_vector);
6385
      this.shoppingCartId = other.shoppingCartId;
6386
    }
6387
 
6388
    public getTransactionsForShoppingCartId_args deepCopy() {
6389
      return new getTransactionsForShoppingCartId_args(this);
6390
    }
6391
 
6392
    @Deprecated
6393
    public getTransactionsForShoppingCartId_args clone() {
6394
      return new getTransactionsForShoppingCartId_args(this);
6395
    }
6396
 
6397
    public long getShoppingCartId() {
6398
      return this.shoppingCartId;
6399
    }
6400
 
6401
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
6402
      this.shoppingCartId = shoppingCartId;
6403
      setShoppingCartIdIsSet(true);
6404
      return this;
6405
    }
6406
 
6407
    public void unsetShoppingCartId() {
6408
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
6409
    }
6410
 
6411
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
6412
    public boolean isSetShoppingCartId() {
6413
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
6414
    }
6415
 
6416
    public void setShoppingCartIdIsSet(boolean value) {
6417
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
6418
    }
6419
 
6420
    public void setFieldValue(_Fields field, Object value) {
6421
      switch (field) {
6422
      case SHOPPING_CART_ID:
6423
        if (value == null) {
6424
          unsetShoppingCartId();
6425
        } else {
6426
          setShoppingCartId((Long)value);
6427
        }
6428
        break;
6429
 
6430
      }
6431
    }
6432
 
6433
    public void setFieldValue(int fieldID, Object value) {
6434
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6435
    }
6436
 
6437
    public Object getFieldValue(_Fields field) {
6438
      switch (field) {
6439
      case SHOPPING_CART_ID:
6440
        return new Long(getShoppingCartId());
6441
 
6442
      }
6443
      throw new IllegalStateException();
6444
    }
6445
 
6446
    public Object getFieldValue(int fieldId) {
6447
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6448
    }
6449
 
6450
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6451
    public boolean isSet(_Fields field) {
6452
      switch (field) {
6453
      case SHOPPING_CART_ID:
6454
        return isSetShoppingCartId();
6455
      }
6456
      throw new IllegalStateException();
6457
    }
6458
 
6459
    public boolean isSet(int fieldID) {
6460
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6461
    }
6462
 
6463
    @Override
6464
    public boolean equals(Object that) {
6465
      if (that == null)
6466
        return false;
6467
      if (that instanceof getTransactionsForShoppingCartId_args)
6468
        return this.equals((getTransactionsForShoppingCartId_args)that);
6469
      return false;
6470
    }
6471
 
6472
    public boolean equals(getTransactionsForShoppingCartId_args that) {
6473
      if (that == null)
6474
        return false;
6475
 
6476
      boolean this_present_shoppingCartId = true;
6477
      boolean that_present_shoppingCartId = true;
6478
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
6479
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
6480
          return false;
6481
        if (this.shoppingCartId != that.shoppingCartId)
6482
          return false;
6483
      }
6484
 
6485
      return true;
6486
    }
6487
 
6488
    @Override
6489
    public int hashCode() {
6490
      return 0;
6491
    }
6492
 
6493
    public int compareTo(getTransactionsForShoppingCartId_args other) {
6494
      if (!getClass().equals(other.getClass())) {
6495
        return getClass().getName().compareTo(other.getClass().getName());
6496
      }
6497
 
6498
      int lastComparison = 0;
6499
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
6500
 
6501
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
6502
      if (lastComparison != 0) {
6503
        return lastComparison;
6504
      }
6505
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
6506
      if (lastComparison != 0) {
6507
        return lastComparison;
6508
      }
6509
      return 0;
6510
    }
6511
 
6512
    public void read(TProtocol iprot) throws TException {
6513
      TField field;
6514
      iprot.readStructBegin();
6515
      while (true)
6516
      {
6517
        field = iprot.readFieldBegin();
6518
        if (field.type == TType.STOP) { 
6519
          break;
6520
        }
6521
        _Fields fieldId = _Fields.findByThriftId(field.id);
6522
        if (fieldId == null) {
6523
          TProtocolUtil.skip(iprot, field.type);
6524
        } else {
6525
          switch (fieldId) {
6526
            case SHOPPING_CART_ID:
6527
              if (field.type == TType.I64) {
6528
                this.shoppingCartId = iprot.readI64();
6529
                setShoppingCartIdIsSet(true);
6530
              } else { 
6531
                TProtocolUtil.skip(iprot, field.type);
6532
              }
6533
              break;
6534
          }
6535
          iprot.readFieldEnd();
6536
        }
6537
      }
6538
      iprot.readStructEnd();
6539
      validate();
6540
    }
6541
 
6542
    public void write(TProtocol oprot) throws TException {
6543
      validate();
6544
 
6545
      oprot.writeStructBegin(STRUCT_DESC);
6546
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
6547
      oprot.writeI64(this.shoppingCartId);
6548
      oprot.writeFieldEnd();
6549
      oprot.writeFieldStop();
6550
      oprot.writeStructEnd();
6551
    }
6552
 
6553
    @Override
6554
    public String toString() {
6555
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
6556
      boolean first = true;
6557
 
6558
      sb.append("shoppingCartId:");
6559
      sb.append(this.shoppingCartId);
6560
      first = false;
6561
      sb.append(")");
6562
      return sb.toString();
6563
    }
6564
 
6565
    public void validate() throws TException {
6566
      // check for required fields
6567
    }
6568
 
6569
  }
6570
 
6571
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable   {
6572
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
6573
 
6574
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
6575
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6576
 
6577
    private List<Transaction> success;
6578
    private TransactionServiceException ex;
6579
 
6580
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6581
    public enum _Fields implements TFieldIdEnum {
6582
      SUCCESS((short)0, "success"),
6583
      EX((short)1, "ex");
6584
 
6585
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6586
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6587
 
6588
      static {
6589
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6590
          byId.put((int)field._thriftId, field);
6591
          byName.put(field.getFieldName(), field);
6592
        }
6593
      }
6594
 
6595
      /**
6596
       * Find the _Fields constant that matches fieldId, or null if its not found.
6597
       */
6598
      public static _Fields findByThriftId(int fieldId) {
6599
        return byId.get(fieldId);
6600
      }
6601
 
6602
      /**
6603
       * Find the _Fields constant that matches fieldId, throwing an exception
6604
       * if it is not found.
6605
       */
6606
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6607
        _Fields fields = findByThriftId(fieldId);
6608
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6609
        return fields;
6610
      }
6611
 
6612
      /**
6613
       * Find the _Fields constant that matches name, or null if its not found.
6614
       */
6615
      public static _Fields findByName(String name) {
6616
        return byName.get(name);
6617
      }
6618
 
6619
      private final short _thriftId;
6620
      private final String _fieldName;
6621
 
6622
      _Fields(short thriftId, String fieldName) {
6623
        _thriftId = thriftId;
6624
        _fieldName = fieldName;
6625
      }
6626
 
6627
      public short getThriftFieldId() {
6628
        return _thriftId;
6629
      }
6630
 
6631
      public String getFieldName() {
6632
        return _fieldName;
6633
      }
6634
    }
6635
 
6636
    // isset id assignments
6637
 
6638
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6639
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6640
          new ListMetaData(TType.LIST, 
6641
              new StructMetaData(TType.STRUCT, Transaction.class))));
6642
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6643
          new FieldValueMetaData(TType.STRUCT)));
6644
    }});
6645
 
6646
    static {
6647
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
6648
    }
6649
 
6650
    public getTransactionsForShoppingCartId_result() {
6651
    }
6652
 
6653
    public getTransactionsForShoppingCartId_result(
6654
      List<Transaction> success,
6655
      TransactionServiceException ex)
6656
    {
6657
      this();
6658
      this.success = success;
6659
      this.ex = ex;
6660
    }
6661
 
6662
    /**
6663
     * Performs a deep copy on <i>other</i>.
6664
     */
6665
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
6666
      if (other.isSetSuccess()) {
6667
        List<Transaction> __this__success = new ArrayList<Transaction>();
6668
        for (Transaction other_element : other.success) {
6669
          __this__success.add(new Transaction(other_element));
6670
        }
6671
        this.success = __this__success;
6672
      }
6673
      if (other.isSetEx()) {
6674
        this.ex = new TransactionServiceException(other.ex);
6675
      }
6676
    }
6677
 
6678
    public getTransactionsForShoppingCartId_result deepCopy() {
6679
      return new getTransactionsForShoppingCartId_result(this);
6680
    }
6681
 
6682
    @Deprecated
6683
    public getTransactionsForShoppingCartId_result clone() {
6684
      return new getTransactionsForShoppingCartId_result(this);
6685
    }
6686
 
6687
    public int getSuccessSize() {
6688
      return (this.success == null) ? 0 : this.success.size();
6689
    }
6690
 
6691
    public java.util.Iterator<Transaction> getSuccessIterator() {
6692
      return (this.success == null) ? null : this.success.iterator();
6693
    }
6694
 
6695
    public void addToSuccess(Transaction elem) {
6696
      if (this.success == null) {
6697
        this.success = new ArrayList<Transaction>();
6698
      }
6699
      this.success.add(elem);
6700
    }
6701
 
6702
    public List<Transaction> getSuccess() {
6703
      return this.success;
6704
    }
6705
 
6706
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
6707
      this.success = success;
6708
      return this;
6709
    }
6710
 
6711
    public void unsetSuccess() {
6712
      this.success = null;
6713
    }
6714
 
6715
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6716
    public boolean isSetSuccess() {
6717
      return this.success != null;
6718
    }
6719
 
6720
    public void setSuccessIsSet(boolean value) {
6721
      if (!value) {
6722
        this.success = null;
6723
      }
6724
    }
6725
 
6726
    public TransactionServiceException getEx() {
6727
      return this.ex;
6728
    }
6729
 
6730
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
6731
      this.ex = ex;
6732
      return this;
6733
    }
6734
 
6735
    public void unsetEx() {
6736
      this.ex = null;
6737
    }
6738
 
6739
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6740
    public boolean isSetEx() {
6741
      return this.ex != null;
6742
    }
6743
 
6744
    public void setExIsSet(boolean value) {
6745
      if (!value) {
6746
        this.ex = null;
6747
      }
6748
    }
6749
 
6750
    public void setFieldValue(_Fields field, Object value) {
6751
      switch (field) {
6752
      case SUCCESS:
6753
        if (value == null) {
6754
          unsetSuccess();
6755
        } else {
6756
          setSuccess((List<Transaction>)value);
6757
        }
6758
        break;
6759
 
6760
      case EX:
6761
        if (value == null) {
6762
          unsetEx();
6763
        } else {
6764
          setEx((TransactionServiceException)value);
6765
        }
6766
        break;
6767
 
6768
      }
6769
    }
6770
 
6771
    public void setFieldValue(int fieldID, Object value) {
6772
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6773
    }
6774
 
6775
    public Object getFieldValue(_Fields field) {
6776
      switch (field) {
6777
      case SUCCESS:
6778
        return getSuccess();
6779
 
6780
      case EX:
6781
        return getEx();
6782
 
6783
      }
6784
      throw new IllegalStateException();
6785
    }
6786
 
6787
    public Object getFieldValue(int fieldId) {
6788
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6789
    }
6790
 
6791
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6792
    public boolean isSet(_Fields field) {
6793
      switch (field) {
6794
      case SUCCESS:
6795
        return isSetSuccess();
6796
      case EX:
6797
        return isSetEx();
6798
      }
6799
      throw new IllegalStateException();
6800
    }
6801
 
6802
    public boolean isSet(int fieldID) {
6803
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6804
    }
6805
 
6806
    @Override
6807
    public boolean equals(Object that) {
6808
      if (that == null)
6809
        return false;
6810
      if (that instanceof getTransactionsForShoppingCartId_result)
6811
        return this.equals((getTransactionsForShoppingCartId_result)that);
6812
      return false;
6813
    }
6814
 
6815
    public boolean equals(getTransactionsForShoppingCartId_result that) {
6816
      if (that == null)
6817
        return false;
6818
 
6819
      boolean this_present_success = true && this.isSetSuccess();
6820
      boolean that_present_success = true && that.isSetSuccess();
6821
      if (this_present_success || that_present_success) {
6822
        if (!(this_present_success && that_present_success))
6823
          return false;
6824
        if (!this.success.equals(that.success))
6825
          return false;
6826
      }
6827
 
6828
      boolean this_present_ex = true && this.isSetEx();
6829
      boolean that_present_ex = true && that.isSetEx();
6830
      if (this_present_ex || that_present_ex) {
6831
        if (!(this_present_ex && that_present_ex))
6832
          return false;
6833
        if (!this.ex.equals(that.ex))
6834
          return false;
6835
      }
6836
 
6837
      return true;
6838
    }
6839
 
6840
    @Override
6841
    public int hashCode() {
6842
      return 0;
6843
    }
6844
 
6845
    public void read(TProtocol iprot) throws TException {
6846
      TField field;
6847
      iprot.readStructBegin();
6848
      while (true)
6849
      {
6850
        field = iprot.readFieldBegin();
6851
        if (field.type == TType.STOP) { 
6852
          break;
6853
        }
6854
        _Fields fieldId = _Fields.findByThriftId(field.id);
6855
        if (fieldId == null) {
6856
          TProtocolUtil.skip(iprot, field.type);
6857
        } else {
6858
          switch (fieldId) {
6859
            case SUCCESS:
6860
              if (field.type == TType.LIST) {
6861
                {
6862
                  TList _list46 = iprot.readListBegin();
6863
                  this.success = new ArrayList<Transaction>(_list46.size);
6864
                  for (int _i47 = 0; _i47 < _list46.size; ++_i47)
6865
                  {
6866
                    Transaction _elem48;
6867
                    _elem48 = new Transaction();
6868
                    _elem48.read(iprot);
6869
                    this.success.add(_elem48);
6870
                  }
6871
                  iprot.readListEnd();
6872
                }
6873
              } else { 
6874
                TProtocolUtil.skip(iprot, field.type);
6875
              }
6876
              break;
6877
            case EX:
6878
              if (field.type == TType.STRUCT) {
6879
                this.ex = new TransactionServiceException();
6880
                this.ex.read(iprot);
6881
              } else { 
6882
                TProtocolUtil.skip(iprot, field.type);
6883
              }
6884
              break;
6885
          }
6886
          iprot.readFieldEnd();
6887
        }
6888
      }
6889
      iprot.readStructEnd();
6890
      validate();
6891
    }
6892
 
6893
    public void write(TProtocol oprot) throws TException {
6894
      oprot.writeStructBegin(STRUCT_DESC);
6895
 
6896
      if (this.isSetSuccess()) {
6897
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6898
        {
6899
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
6900
          for (Transaction _iter49 : this.success)
6901
          {
6902
            _iter49.write(oprot);
6903
          }
6904
          oprot.writeListEnd();
6905
        }
6906
        oprot.writeFieldEnd();
6907
      } else if (this.isSetEx()) {
6908
        oprot.writeFieldBegin(EX_FIELD_DESC);
6909
        this.ex.write(oprot);
6910
        oprot.writeFieldEnd();
6911
      }
6912
      oprot.writeFieldStop();
6913
      oprot.writeStructEnd();
6914
    }
6915
 
6916
    @Override
6917
    public String toString() {
6918
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
6919
      boolean first = true;
6920
 
6921
      sb.append("success:");
6922
      if (this.success == null) {
6923
        sb.append("null");
6924
      } else {
6925
        sb.append(this.success);
6926
      }
6927
      first = false;
6928
      if (!first) sb.append(", ");
6929
      sb.append("ex:");
6930
      if (this.ex == null) {
6931
        sb.append("null");
6932
      } else {
6933
        sb.append(this.ex);
6934
      }
6935
      first = false;
6936
      sb.append(")");
6937
      return sb.toString();
6938
    }
6939
 
6940
    public void validate() throws TException {
6941
      // check for required fields
6942
    }
6943
 
6944
  }
6945
 
68 ashish 6946
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
6947
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
6948
 
6949
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
6950
 
6951
    private long transactionId;
6952
 
6953
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6954
    public enum _Fields implements TFieldIdEnum {
6955
      TRANSACTION_ID((short)1, "transactionId");
6956
 
6957
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6958
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6959
 
6960
      static {
6961
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6962
          byId.put((int)field._thriftId, field);
6963
          byName.put(field.getFieldName(), field);
6964
        }
6965
      }
6966
 
6967
      /**
6968
       * Find the _Fields constant that matches fieldId, or null if its not found.
6969
       */
6970
      public static _Fields findByThriftId(int fieldId) {
6971
        return byId.get(fieldId);
6972
      }
6973
 
6974
      /**
6975
       * Find the _Fields constant that matches fieldId, throwing an exception
6976
       * if it is not found.
6977
       */
6978
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6979
        _Fields fields = findByThriftId(fieldId);
6980
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6981
        return fields;
6982
      }
6983
 
6984
      /**
6985
       * Find the _Fields constant that matches name, or null if its not found.
6986
       */
6987
      public static _Fields findByName(String name) {
6988
        return byName.get(name);
6989
      }
6990
 
6991
      private final short _thriftId;
6992
      private final String _fieldName;
6993
 
6994
      _Fields(short thriftId, String fieldName) {
6995
        _thriftId = thriftId;
6996
        _fieldName = fieldName;
6997
      }
6998
 
6999
      public short getThriftFieldId() {
7000
        return _thriftId;
7001
      }
7002
 
7003
      public String getFieldName() {
7004
        return _fieldName;
7005
      }
7006
    }
7007
 
7008
    // isset id assignments
7009
    private static final int __TRANSACTIONID_ISSET_ID = 0;
7010
    private BitSet __isset_bit_vector = new BitSet(1);
7011
 
7012
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7013
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
7014
          new FieldValueMetaData(TType.I64)));
7015
    }});
7016
 
7017
    static {
7018
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
7019
    }
7020
 
7021
    public getTransactionStatus_args() {
7022
    }
7023
 
7024
    public getTransactionStatus_args(
7025
      long transactionId)
7026
    {
7027
      this();
7028
      this.transactionId = transactionId;
7029
      setTransactionIdIsSet(true);
7030
    }
7031
 
7032
    /**
7033
     * Performs a deep copy on <i>other</i>.
7034
     */
7035
    public getTransactionStatus_args(getTransactionStatus_args other) {
7036
      __isset_bit_vector.clear();
7037
      __isset_bit_vector.or(other.__isset_bit_vector);
7038
      this.transactionId = other.transactionId;
7039
    }
7040
 
7041
    public getTransactionStatus_args deepCopy() {
7042
      return new getTransactionStatus_args(this);
7043
    }
7044
 
7045
    @Deprecated
7046
    public getTransactionStatus_args clone() {
7047
      return new getTransactionStatus_args(this);
7048
    }
7049
 
7050
    public long getTransactionId() {
7051
      return this.transactionId;
7052
    }
7053
 
7054
    public getTransactionStatus_args setTransactionId(long transactionId) {
7055
      this.transactionId = transactionId;
7056
      setTransactionIdIsSet(true);
7057
      return this;
7058
    }
7059
 
7060
    public void unsetTransactionId() {
7061
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
7062
    }
7063
 
7064
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
7065
    public boolean isSetTransactionId() {
7066
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
7067
    }
7068
 
7069
    public void setTransactionIdIsSet(boolean value) {
7070
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
7071
    }
7072
 
7073
    public void setFieldValue(_Fields field, Object value) {
7074
      switch (field) {
7075
      case TRANSACTION_ID:
7076
        if (value == null) {
7077
          unsetTransactionId();
7078
        } else {
7079
          setTransactionId((Long)value);
7080
        }
7081
        break;
7082
 
7083
      }
7084
    }
7085
 
7086
    public void setFieldValue(int fieldID, Object value) {
7087
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7088
    }
7089
 
7090
    public Object getFieldValue(_Fields field) {
7091
      switch (field) {
7092
      case TRANSACTION_ID:
7093
        return new Long(getTransactionId());
7094
 
7095
      }
7096
      throw new IllegalStateException();
7097
    }
7098
 
7099
    public Object getFieldValue(int fieldId) {
7100
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7101
    }
7102
 
7103
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7104
    public boolean isSet(_Fields field) {
7105
      switch (field) {
7106
      case TRANSACTION_ID:
7107
        return isSetTransactionId();
7108
      }
7109
      throw new IllegalStateException();
7110
    }
7111
 
7112
    public boolean isSet(int fieldID) {
7113
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7114
    }
7115
 
7116
    @Override
7117
    public boolean equals(Object that) {
7118
      if (that == null)
7119
        return false;
7120
      if (that instanceof getTransactionStatus_args)
7121
        return this.equals((getTransactionStatus_args)that);
7122
      return false;
7123
    }
7124
 
7125
    public boolean equals(getTransactionStatus_args that) {
7126
      if (that == null)
7127
        return false;
7128
 
7129
      boolean this_present_transactionId = true;
7130
      boolean that_present_transactionId = true;
7131
      if (this_present_transactionId || that_present_transactionId) {
7132
        if (!(this_present_transactionId && that_present_transactionId))
7133
          return false;
7134
        if (this.transactionId != that.transactionId)
7135
          return false;
7136
      }
7137
 
7138
      return true;
7139
    }
7140
 
7141
    @Override
7142
    public int hashCode() {
7143
      return 0;
7144
    }
7145
 
7146
    public int compareTo(getTransactionStatus_args other) {
7147
      if (!getClass().equals(other.getClass())) {
7148
        return getClass().getName().compareTo(other.getClass().getName());
7149
      }
7150
 
7151
      int lastComparison = 0;
7152
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
7153
 
7154
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7155
      if (lastComparison != 0) {
7156
        return lastComparison;
7157
      }
7158
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7159
      if (lastComparison != 0) {
7160
        return lastComparison;
7161
      }
7162
      return 0;
7163
    }
7164
 
7165
    public void read(TProtocol iprot) throws TException {
7166
      TField field;
7167
      iprot.readStructBegin();
7168
      while (true)
7169
      {
7170
        field = iprot.readFieldBegin();
7171
        if (field.type == TType.STOP) { 
7172
          break;
7173
        }
7174
        _Fields fieldId = _Fields.findByThriftId(field.id);
7175
        if (fieldId == null) {
7176
          TProtocolUtil.skip(iprot, field.type);
7177
        } else {
7178
          switch (fieldId) {
7179
            case TRANSACTION_ID:
7180
              if (field.type == TType.I64) {
7181
                this.transactionId = iprot.readI64();
7182
                setTransactionIdIsSet(true);
7183
              } else { 
7184
                TProtocolUtil.skip(iprot, field.type);
7185
              }
7186
              break;
7187
          }
7188
          iprot.readFieldEnd();
7189
        }
7190
      }
7191
      iprot.readStructEnd();
7192
      validate();
7193
    }
7194
 
7195
    public void write(TProtocol oprot) throws TException {
7196
      validate();
7197
 
7198
      oprot.writeStructBegin(STRUCT_DESC);
7199
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
7200
      oprot.writeI64(this.transactionId);
7201
      oprot.writeFieldEnd();
7202
      oprot.writeFieldStop();
7203
      oprot.writeStructEnd();
7204
    }
7205
 
7206
    @Override
7207
    public String toString() {
7208
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
7209
      boolean first = true;
7210
 
7211
      sb.append("transactionId:");
7212
      sb.append(this.transactionId);
7213
      first = false;
7214
      sb.append(")");
7215
      return sb.toString();
7216
    }
7217
 
7218
    public void validate() throws TException {
7219
      // check for required fields
7220
    }
7221
 
7222
  }
7223
 
7224
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
7225
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
7226
 
7227
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
7228
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7229
 
7230
    private TransactionStatus success;
7231
    private TransactionServiceException ex;
7232
 
7233
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7234
    public enum _Fields implements TFieldIdEnum {
7235
      /**
7236
       * 
7237
       * @see TransactionStatus
7238
       */
7239
      SUCCESS((short)0, "success"),
7240
      EX((short)1, "ex");
7241
 
7242
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7243
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7244
 
7245
      static {
7246
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7247
          byId.put((int)field._thriftId, field);
7248
          byName.put(field.getFieldName(), field);
7249
        }
7250
      }
7251
 
7252
      /**
7253
       * Find the _Fields constant that matches fieldId, or null if its not found.
7254
       */
7255
      public static _Fields findByThriftId(int fieldId) {
7256
        return byId.get(fieldId);
7257
      }
7258
 
7259
      /**
7260
       * Find the _Fields constant that matches fieldId, throwing an exception
7261
       * if it is not found.
7262
       */
7263
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7264
        _Fields fields = findByThriftId(fieldId);
7265
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7266
        return fields;
7267
      }
7268
 
7269
      /**
7270
       * Find the _Fields constant that matches name, or null if its not found.
7271
       */
7272
      public static _Fields findByName(String name) {
7273
        return byName.get(name);
7274
      }
7275
 
7276
      private final short _thriftId;
7277
      private final String _fieldName;
7278
 
7279
      _Fields(short thriftId, String fieldName) {
7280
        _thriftId = thriftId;
7281
        _fieldName = fieldName;
7282
      }
7283
 
7284
      public short getThriftFieldId() {
7285
        return _thriftId;
7286
      }
7287
 
7288
      public String getFieldName() {
7289
        return _fieldName;
7290
      }
7291
    }
7292
 
7293
    // isset id assignments
7294
 
7295
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7296
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7297
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
7298
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7299
          new FieldValueMetaData(TType.STRUCT)));
7300
    }});
7301
 
7302
    static {
7303
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
7304
    }
7305
 
7306
    public getTransactionStatus_result() {
7307
    }
7308
 
7309
    public getTransactionStatus_result(
7310
      TransactionStatus success,
7311
      TransactionServiceException ex)
7312
    {
7313
      this();
7314
      this.success = success;
7315
      this.ex = ex;
7316
    }
7317
 
7318
    /**
7319
     * Performs a deep copy on <i>other</i>.
7320
     */
7321
    public getTransactionStatus_result(getTransactionStatus_result other) {
7322
      if (other.isSetSuccess()) {
7323
        this.success = other.success;
7324
      }
7325
      if (other.isSetEx()) {
7326
        this.ex = new TransactionServiceException(other.ex);
7327
      }
7328
    }
7329
 
7330
    public getTransactionStatus_result deepCopy() {
7331
      return new getTransactionStatus_result(this);
7332
    }
7333
 
7334
    @Deprecated
7335
    public getTransactionStatus_result clone() {
7336
      return new getTransactionStatus_result(this);
7337
    }
7338
 
7339
    /**
7340
     * 
7341
     * @see TransactionStatus
7342
     */
7343
    public TransactionStatus getSuccess() {
7344
      return this.success;
7345
    }
7346
 
7347
    /**
7348
     * 
7349
     * @see TransactionStatus
7350
     */
7351
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
7352
      this.success = success;
7353
      return this;
7354
    }
7355
 
7356
    public void unsetSuccess() {
7357
      this.success = null;
7358
    }
7359
 
7360
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7361
    public boolean isSetSuccess() {
7362
      return this.success != null;
7363
    }
7364
 
7365
    public void setSuccessIsSet(boolean value) {
7366
      if (!value) {
7367
        this.success = null;
7368
      }
7369
    }
7370
 
7371
    public TransactionServiceException getEx() {
7372
      return this.ex;
7373
    }
7374
 
7375
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
7376
      this.ex = ex;
7377
      return this;
7378
    }
7379
 
7380
    public void unsetEx() {
7381
      this.ex = null;
7382
    }
7383
 
7384
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7385
    public boolean isSetEx() {
7386
      return this.ex != null;
7387
    }
7388
 
7389
    public void setExIsSet(boolean value) {
7390
      if (!value) {
7391
        this.ex = null;
7392
      }
7393
    }
7394
 
7395
    public void setFieldValue(_Fields field, Object value) {
7396
      switch (field) {
7397
      case SUCCESS:
7398
        if (value == null) {
7399
          unsetSuccess();
7400
        } else {
7401
          setSuccess((TransactionStatus)value);
7402
        }
7403
        break;
7404
 
7405
      case EX:
7406
        if (value == null) {
7407
          unsetEx();
7408
        } else {
7409
          setEx((TransactionServiceException)value);
7410
        }
7411
        break;
7412
 
7413
      }
7414
    }
7415
 
7416
    public void setFieldValue(int fieldID, Object value) {
7417
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7418
    }
7419
 
7420
    public Object getFieldValue(_Fields field) {
7421
      switch (field) {
7422
      case SUCCESS:
7423
        return getSuccess();
7424
 
7425
      case EX:
7426
        return getEx();
7427
 
7428
      }
7429
      throw new IllegalStateException();
7430
    }
7431
 
7432
    public Object getFieldValue(int fieldId) {
7433
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7434
    }
7435
 
7436
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7437
    public boolean isSet(_Fields field) {
7438
      switch (field) {
7439
      case SUCCESS:
7440
        return isSetSuccess();
7441
      case EX:
7442
        return isSetEx();
7443
      }
7444
      throw new IllegalStateException();
7445
    }
7446
 
7447
    public boolean isSet(int fieldID) {
7448
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7449
    }
7450
 
7451
    @Override
7452
    public boolean equals(Object that) {
7453
      if (that == null)
7454
        return false;
7455
      if (that instanceof getTransactionStatus_result)
7456
        return this.equals((getTransactionStatus_result)that);
7457
      return false;
7458
    }
7459
 
7460
    public boolean equals(getTransactionStatus_result that) {
7461
      if (that == null)
7462
        return false;
7463
 
7464
      boolean this_present_success = true && this.isSetSuccess();
7465
      boolean that_present_success = true && that.isSetSuccess();
7466
      if (this_present_success || that_present_success) {
7467
        if (!(this_present_success && that_present_success))
7468
          return false;
7469
        if (!this.success.equals(that.success))
7470
          return false;
7471
      }
7472
 
7473
      boolean this_present_ex = true && this.isSetEx();
7474
      boolean that_present_ex = true && that.isSetEx();
7475
      if (this_present_ex || that_present_ex) {
7476
        if (!(this_present_ex && that_present_ex))
7477
          return false;
7478
        if (!this.ex.equals(that.ex))
7479
          return false;
7480
      }
7481
 
7482
      return true;
7483
    }
7484
 
7485
    @Override
7486
    public int hashCode() {
7487
      return 0;
7488
    }
7489
 
7490
    public int compareTo(getTransactionStatus_result other) {
7491
      if (!getClass().equals(other.getClass())) {
7492
        return getClass().getName().compareTo(other.getClass().getName());
7493
      }
7494
 
7495
      int lastComparison = 0;
7496
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
7497
 
7498
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7499
      if (lastComparison != 0) {
7500
        return lastComparison;
7501
      }
7502
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7503
      if (lastComparison != 0) {
7504
        return lastComparison;
7505
      }
7506
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7507
      if (lastComparison != 0) {
7508
        return lastComparison;
7509
      }
7510
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7511
      if (lastComparison != 0) {
7512
        return lastComparison;
7513
      }
7514
      return 0;
7515
    }
7516
 
7517
    public void read(TProtocol iprot) throws TException {
7518
      TField field;
7519
      iprot.readStructBegin();
7520
      while (true)
7521
      {
7522
        field = iprot.readFieldBegin();
7523
        if (field.type == TType.STOP) { 
7524
          break;
7525
        }
7526
        _Fields fieldId = _Fields.findByThriftId(field.id);
7527
        if (fieldId == null) {
7528
          TProtocolUtil.skip(iprot, field.type);
7529
        } else {
7530
          switch (fieldId) {
7531
            case SUCCESS:
7532
              if (field.type == TType.I32) {
7533
                this.success = TransactionStatus.findByValue(iprot.readI32());
7534
              } else { 
7535
                TProtocolUtil.skip(iprot, field.type);
7536
              }
7537
              break;
7538
            case EX:
7539
              if (field.type == TType.STRUCT) {
7540
                this.ex = new TransactionServiceException();
7541
                this.ex.read(iprot);
7542
              } else { 
7543
                TProtocolUtil.skip(iprot, field.type);
7544
              }
7545
              break;
7546
          }
7547
          iprot.readFieldEnd();
7548
        }
7549
      }
7550
      iprot.readStructEnd();
7551
      validate();
7552
    }
7553
 
7554
    public void write(TProtocol oprot) throws TException {
7555
      oprot.writeStructBegin(STRUCT_DESC);
7556
 
7557
      if (this.isSetSuccess()) {
7558
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7559
        oprot.writeI32(this.success.getValue());
7560
        oprot.writeFieldEnd();
7561
      } else if (this.isSetEx()) {
7562
        oprot.writeFieldBegin(EX_FIELD_DESC);
7563
        this.ex.write(oprot);
7564
        oprot.writeFieldEnd();
7565
      }
7566
      oprot.writeFieldStop();
7567
      oprot.writeStructEnd();
7568
    }
7569
 
7570
    @Override
7571
    public String toString() {
7572
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
7573
      boolean first = true;
7574
 
7575
      sb.append("success:");
7576
      if (this.success == null) {
7577
        sb.append("null");
7578
      } else {
7579
        String success_name = success.name();
7580
        if (success_name != null) {
7581
          sb.append(success_name);
7582
          sb.append(" (");
7583
        }
7584
        sb.append(this.success);
7585
        if (success_name != null) {
7586
          sb.append(")");
7587
        }
7588
      }
7589
      first = false;
7590
      if (!first) sb.append(", ");
7591
      sb.append("ex:");
7592
      if (this.ex == null) {
7593
        sb.append("null");
7594
      } else {
7595
        sb.append(this.ex);
7596
      }
7597
      first = false;
7598
      sb.append(")");
7599
      return sb.toString();
7600
    }
7601
 
7602
    public void validate() throws TException {
7603
      // check for required fields
7604
    }
7605
 
7606
  }
7607
 
7608
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
7609
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
7610
 
7611
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
7612
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
7613
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
7614
 
7615
    private long transactionId;
7616
    private TransactionStatus status;
7617
    private String description;
7618
 
7619
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7620
    public enum _Fields implements TFieldIdEnum {
7621
      TRANSACTION_ID((short)1, "transactionId"),
7622
      /**
7623
       * 
7624
       * @see TransactionStatus
7625
       */
7626
      STATUS((short)2, "status"),
7627
      DESCRIPTION((short)3, "description");
7628
 
7629
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7630
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7631
 
7632
      static {
7633
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7634
          byId.put((int)field._thriftId, field);
7635
          byName.put(field.getFieldName(), field);
7636
        }
7637
      }
7638
 
7639
      /**
7640
       * Find the _Fields constant that matches fieldId, or null if its not found.
7641
       */
7642
      public static _Fields findByThriftId(int fieldId) {
7643
        return byId.get(fieldId);
7644
      }
7645
 
7646
      /**
7647
       * Find the _Fields constant that matches fieldId, throwing an exception
7648
       * if it is not found.
7649
       */
7650
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7651
        _Fields fields = findByThriftId(fieldId);
7652
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7653
        return fields;
7654
      }
7655
 
7656
      /**
7657
       * Find the _Fields constant that matches name, or null if its not found.
7658
       */
7659
      public static _Fields findByName(String name) {
7660
        return byName.get(name);
7661
      }
7662
 
7663
      private final short _thriftId;
7664
      private final String _fieldName;
7665
 
7666
      _Fields(short thriftId, String fieldName) {
7667
        _thriftId = thriftId;
7668
        _fieldName = fieldName;
7669
      }
7670
 
7671
      public short getThriftFieldId() {
7672
        return _thriftId;
7673
      }
7674
 
7675
      public String getFieldName() {
7676
        return _fieldName;
7677
      }
7678
    }
7679
 
7680
    // isset id assignments
7681
    private static final int __TRANSACTIONID_ISSET_ID = 0;
7682
    private BitSet __isset_bit_vector = new BitSet(1);
7683
 
7684
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7685
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
7686
          new FieldValueMetaData(TType.I64)));
7687
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
7688
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
7689
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
7690
          new FieldValueMetaData(TType.STRING)));
7691
    }});
7692
 
7693
    static {
7694
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
7695
    }
7696
 
7697
    public changeTransactionStatus_args() {
7698
    }
7699
 
7700
    public changeTransactionStatus_args(
7701
      long transactionId,
7702
      TransactionStatus status,
7703
      String description)
7704
    {
7705
      this();
7706
      this.transactionId = transactionId;
7707
      setTransactionIdIsSet(true);
7708
      this.status = status;
7709
      this.description = description;
7710
    }
7711
 
7712
    /**
7713
     * Performs a deep copy on <i>other</i>.
7714
     */
7715
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
7716
      __isset_bit_vector.clear();
7717
      __isset_bit_vector.or(other.__isset_bit_vector);
7718
      this.transactionId = other.transactionId;
7719
      if (other.isSetStatus()) {
7720
        this.status = other.status;
7721
      }
7722
      if (other.isSetDescription()) {
7723
        this.description = other.description;
7724
      }
7725
    }
7726
 
7727
    public changeTransactionStatus_args deepCopy() {
7728
      return new changeTransactionStatus_args(this);
7729
    }
7730
 
7731
    @Deprecated
7732
    public changeTransactionStatus_args clone() {
7733
      return new changeTransactionStatus_args(this);
7734
    }
7735
 
7736
    public long getTransactionId() {
7737
      return this.transactionId;
7738
    }
7739
 
7740
    public changeTransactionStatus_args setTransactionId(long transactionId) {
7741
      this.transactionId = transactionId;
7742
      setTransactionIdIsSet(true);
7743
      return this;
7744
    }
7745
 
7746
    public void unsetTransactionId() {
7747
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
7748
    }
7749
 
7750
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
7751
    public boolean isSetTransactionId() {
7752
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
7753
    }
7754
 
7755
    public void setTransactionIdIsSet(boolean value) {
7756
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
7757
    }
7758
 
7759
    /**
7760
     * 
7761
     * @see TransactionStatus
7762
     */
7763
    public TransactionStatus getStatus() {
7764
      return this.status;
7765
    }
7766
 
7767
    /**
7768
     * 
7769
     * @see TransactionStatus
7770
     */
7771
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
7772
      this.status = status;
7773
      return this;
7774
    }
7775
 
7776
    public void unsetStatus() {
7777
      this.status = null;
7778
    }
7779
 
7780
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
7781
    public boolean isSetStatus() {
7782
      return this.status != null;
7783
    }
7784
 
7785
    public void setStatusIsSet(boolean value) {
7786
      if (!value) {
7787
        this.status = null;
7788
      }
7789
    }
7790
 
7791
    public String getDescription() {
7792
      return this.description;
7793
    }
7794
 
7795
    public changeTransactionStatus_args setDescription(String description) {
7796
      this.description = description;
7797
      return this;
7798
    }
7799
 
7800
    public void unsetDescription() {
7801
      this.description = null;
7802
    }
7803
 
7804
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
7805
    public boolean isSetDescription() {
7806
      return this.description != null;
7807
    }
7808
 
7809
    public void setDescriptionIsSet(boolean value) {
7810
      if (!value) {
7811
        this.description = null;
7812
      }
7813
    }
7814
 
7815
    public void setFieldValue(_Fields field, Object value) {
7816
      switch (field) {
7817
      case TRANSACTION_ID:
7818
        if (value == null) {
7819
          unsetTransactionId();
7820
        } else {
7821
          setTransactionId((Long)value);
7822
        }
7823
        break;
7824
 
7825
      case STATUS:
7826
        if (value == null) {
7827
          unsetStatus();
7828
        } else {
7829
          setStatus((TransactionStatus)value);
7830
        }
7831
        break;
7832
 
7833
      case DESCRIPTION:
7834
        if (value == null) {
7835
          unsetDescription();
7836
        } else {
7837
          setDescription((String)value);
7838
        }
7839
        break;
7840
 
7841
      }
7842
    }
7843
 
7844
    public void setFieldValue(int fieldID, Object value) {
7845
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7846
    }
7847
 
7848
    public Object getFieldValue(_Fields field) {
7849
      switch (field) {
7850
      case TRANSACTION_ID:
7851
        return new Long(getTransactionId());
7852
 
7853
      case STATUS:
7854
        return getStatus();
7855
 
7856
      case DESCRIPTION:
7857
        return getDescription();
7858
 
7859
      }
7860
      throw new IllegalStateException();
7861
    }
7862
 
7863
    public Object getFieldValue(int fieldId) {
7864
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7865
    }
7866
 
7867
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7868
    public boolean isSet(_Fields field) {
7869
      switch (field) {
7870
      case TRANSACTION_ID:
7871
        return isSetTransactionId();
7872
      case STATUS:
7873
        return isSetStatus();
7874
      case DESCRIPTION:
7875
        return isSetDescription();
7876
      }
7877
      throw new IllegalStateException();
7878
    }
7879
 
7880
    public boolean isSet(int fieldID) {
7881
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7882
    }
7883
 
7884
    @Override
7885
    public boolean equals(Object that) {
7886
      if (that == null)
7887
        return false;
7888
      if (that instanceof changeTransactionStatus_args)
7889
        return this.equals((changeTransactionStatus_args)that);
7890
      return false;
7891
    }
7892
 
7893
    public boolean equals(changeTransactionStatus_args that) {
7894
      if (that == null)
7895
        return false;
7896
 
7897
      boolean this_present_transactionId = true;
7898
      boolean that_present_transactionId = true;
7899
      if (this_present_transactionId || that_present_transactionId) {
7900
        if (!(this_present_transactionId && that_present_transactionId))
7901
          return false;
7902
        if (this.transactionId != that.transactionId)
7903
          return false;
7904
      }
7905
 
7906
      boolean this_present_status = true && this.isSetStatus();
7907
      boolean that_present_status = true && that.isSetStatus();
7908
      if (this_present_status || that_present_status) {
7909
        if (!(this_present_status && that_present_status))
7910
          return false;
7911
        if (!this.status.equals(that.status))
7912
          return false;
7913
      }
7914
 
7915
      boolean this_present_description = true && this.isSetDescription();
7916
      boolean that_present_description = true && that.isSetDescription();
7917
      if (this_present_description || that_present_description) {
7918
        if (!(this_present_description && that_present_description))
7919
          return false;
7920
        if (!this.description.equals(that.description))
7921
          return false;
7922
      }
7923
 
7924
      return true;
7925
    }
7926
 
7927
    @Override
7928
    public int hashCode() {
7929
      return 0;
7930
    }
7931
 
7932
    public int compareTo(changeTransactionStatus_args other) {
7933
      if (!getClass().equals(other.getClass())) {
7934
        return getClass().getName().compareTo(other.getClass().getName());
7935
      }
7936
 
7937
      int lastComparison = 0;
7938
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
7939
 
7940
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7941
      if (lastComparison != 0) {
7942
        return lastComparison;
7943
      }
7944
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7945
      if (lastComparison != 0) {
7946
        return lastComparison;
7947
      }
7948
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
7949
      if (lastComparison != 0) {
7950
        return lastComparison;
7951
      }
7952
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
7953
      if (lastComparison != 0) {
7954
        return lastComparison;
7955
      }
7956
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
7957
      if (lastComparison != 0) {
7958
        return lastComparison;
7959
      }
7960
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
7961
      if (lastComparison != 0) {
7962
        return lastComparison;
7963
      }
7964
      return 0;
7965
    }
7966
 
7967
    public void read(TProtocol iprot) throws TException {
7968
      TField field;
7969
      iprot.readStructBegin();
7970
      while (true)
7971
      {
7972
        field = iprot.readFieldBegin();
7973
        if (field.type == TType.STOP) { 
7974
          break;
7975
        }
7976
        _Fields fieldId = _Fields.findByThriftId(field.id);
7977
        if (fieldId == null) {
7978
          TProtocolUtil.skip(iprot, field.type);
7979
        } else {
7980
          switch (fieldId) {
7981
            case TRANSACTION_ID:
7982
              if (field.type == TType.I64) {
7983
                this.transactionId = iprot.readI64();
7984
                setTransactionIdIsSet(true);
7985
              } else { 
7986
                TProtocolUtil.skip(iprot, field.type);
7987
              }
7988
              break;
7989
            case STATUS:
7990
              if (field.type == TType.I32) {
7991
                this.status = TransactionStatus.findByValue(iprot.readI32());
7992
              } else { 
7993
                TProtocolUtil.skip(iprot, field.type);
7994
              }
7995
              break;
7996
            case DESCRIPTION:
7997
              if (field.type == TType.STRING) {
7998
                this.description = iprot.readString();
7999
              } else { 
8000
                TProtocolUtil.skip(iprot, field.type);
8001
              }
8002
              break;
8003
          }
8004
          iprot.readFieldEnd();
8005
        }
8006
      }
8007
      iprot.readStructEnd();
8008
      validate();
8009
    }
8010
 
8011
    public void write(TProtocol oprot) throws TException {
8012
      validate();
8013
 
8014
      oprot.writeStructBegin(STRUCT_DESC);
8015
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
8016
      oprot.writeI64(this.transactionId);
8017
      oprot.writeFieldEnd();
8018
      if (this.status != null) {
8019
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8020
        oprot.writeI32(this.status.getValue());
8021
        oprot.writeFieldEnd();
8022
      }
8023
      if (this.description != null) {
8024
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
8025
        oprot.writeString(this.description);
8026
        oprot.writeFieldEnd();
8027
      }
8028
      oprot.writeFieldStop();
8029
      oprot.writeStructEnd();
8030
    }
8031
 
8032
    @Override
8033
    public String toString() {
8034
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
8035
      boolean first = true;
8036
 
8037
      sb.append("transactionId:");
8038
      sb.append(this.transactionId);
8039
      first = false;
8040
      if (!first) sb.append(", ");
8041
      sb.append("status:");
8042
      if (this.status == null) {
8043
        sb.append("null");
8044
      } else {
8045
        String status_name = status.name();
8046
        if (status_name != null) {
8047
          sb.append(status_name);
8048
          sb.append(" (");
8049
        }
8050
        sb.append(this.status);
8051
        if (status_name != null) {
8052
          sb.append(")");
8053
        }
8054
      }
8055
      first = false;
8056
      if (!first) sb.append(", ");
8057
      sb.append("description:");
8058
      if (this.description == null) {
8059
        sb.append("null");
8060
      } else {
8061
        sb.append(this.description);
8062
      }
8063
      first = false;
8064
      sb.append(")");
8065
      return sb.toString();
8066
    }
8067
 
8068
    public void validate() throws TException {
8069
      // check for required fields
8070
    }
8071
 
8072
  }
8073
 
8074
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
8075
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
8076
 
8077
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8078
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8079
 
8080
    private boolean success;
8081
    private TransactionServiceException ex;
8082
 
8083
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8084
    public enum _Fields implements TFieldIdEnum {
8085
      SUCCESS((short)0, "success"),
8086
      EX((short)1, "ex");
8087
 
8088
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8089
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8090
 
8091
      static {
8092
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8093
          byId.put((int)field._thriftId, field);
8094
          byName.put(field.getFieldName(), field);
8095
        }
8096
      }
8097
 
8098
      /**
8099
       * Find the _Fields constant that matches fieldId, or null if its not found.
8100
       */
8101
      public static _Fields findByThriftId(int fieldId) {
8102
        return byId.get(fieldId);
8103
      }
8104
 
8105
      /**
8106
       * Find the _Fields constant that matches fieldId, throwing an exception
8107
       * if it is not found.
8108
       */
8109
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8110
        _Fields fields = findByThriftId(fieldId);
8111
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8112
        return fields;
8113
      }
8114
 
8115
      /**
8116
       * Find the _Fields constant that matches name, or null if its not found.
8117
       */
8118
      public static _Fields findByName(String name) {
8119
        return byName.get(name);
8120
      }
8121
 
8122
      private final short _thriftId;
8123
      private final String _fieldName;
8124
 
8125
      _Fields(short thriftId, String fieldName) {
8126
        _thriftId = thriftId;
8127
        _fieldName = fieldName;
8128
      }
8129
 
8130
      public short getThriftFieldId() {
8131
        return _thriftId;
8132
      }
8133
 
8134
      public String getFieldName() {
8135
        return _fieldName;
8136
      }
8137
    }
8138
 
8139
    // isset id assignments
8140
    private static final int __SUCCESS_ISSET_ID = 0;
8141
    private BitSet __isset_bit_vector = new BitSet(1);
8142
 
8143
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8144
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8145
          new FieldValueMetaData(TType.BOOL)));
8146
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8147
          new FieldValueMetaData(TType.STRUCT)));
8148
    }});
8149
 
8150
    static {
8151
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
8152
    }
8153
 
8154
    public changeTransactionStatus_result() {
8155
    }
8156
 
8157
    public changeTransactionStatus_result(
8158
      boolean success,
8159
      TransactionServiceException ex)
8160
    {
8161
      this();
8162
      this.success = success;
8163
      setSuccessIsSet(true);
8164
      this.ex = ex;
8165
    }
8166
 
8167
    /**
8168
     * Performs a deep copy on <i>other</i>.
8169
     */
8170
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
8171
      __isset_bit_vector.clear();
8172
      __isset_bit_vector.or(other.__isset_bit_vector);
8173
      this.success = other.success;
8174
      if (other.isSetEx()) {
8175
        this.ex = new TransactionServiceException(other.ex);
8176
      }
8177
    }
8178
 
8179
    public changeTransactionStatus_result deepCopy() {
8180
      return new changeTransactionStatus_result(this);
8181
    }
8182
 
8183
    @Deprecated
8184
    public changeTransactionStatus_result clone() {
8185
      return new changeTransactionStatus_result(this);
8186
    }
8187
 
8188
    public boolean isSuccess() {
8189
      return this.success;
8190
    }
8191
 
8192
    public changeTransactionStatus_result setSuccess(boolean success) {
8193
      this.success = success;
8194
      setSuccessIsSet(true);
8195
      return this;
8196
    }
8197
 
8198
    public void unsetSuccess() {
8199
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8200
    }
8201
 
8202
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8203
    public boolean isSetSuccess() {
8204
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8205
    }
8206
 
8207
    public void setSuccessIsSet(boolean value) {
8208
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8209
    }
8210
 
8211
    public TransactionServiceException getEx() {
8212
      return this.ex;
8213
    }
8214
 
8215
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
8216
      this.ex = ex;
8217
      return this;
8218
    }
8219
 
8220
    public void unsetEx() {
8221
      this.ex = null;
8222
    }
8223
 
8224
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8225
    public boolean isSetEx() {
8226
      return this.ex != null;
8227
    }
8228
 
8229
    public void setExIsSet(boolean value) {
8230
      if (!value) {
8231
        this.ex = null;
8232
      }
8233
    }
8234
 
8235
    public void setFieldValue(_Fields field, Object value) {
8236
      switch (field) {
8237
      case SUCCESS:
8238
        if (value == null) {
8239
          unsetSuccess();
8240
        } else {
8241
          setSuccess((Boolean)value);
8242
        }
8243
        break;
8244
 
8245
      case EX:
8246
        if (value == null) {
8247
          unsetEx();
8248
        } else {
8249
          setEx((TransactionServiceException)value);
8250
        }
8251
        break;
8252
 
8253
      }
8254
    }
8255
 
8256
    public void setFieldValue(int fieldID, Object value) {
8257
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8258
    }
8259
 
8260
    public Object getFieldValue(_Fields field) {
8261
      switch (field) {
8262
      case SUCCESS:
8263
        return new Boolean(isSuccess());
8264
 
8265
      case EX:
8266
        return getEx();
8267
 
8268
      }
8269
      throw new IllegalStateException();
8270
    }
8271
 
8272
    public Object getFieldValue(int fieldId) {
8273
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8274
    }
8275
 
8276
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8277
    public boolean isSet(_Fields field) {
8278
      switch (field) {
8279
      case SUCCESS:
8280
        return isSetSuccess();
8281
      case EX:
8282
        return isSetEx();
8283
      }
8284
      throw new IllegalStateException();
8285
    }
8286
 
8287
    public boolean isSet(int fieldID) {
8288
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8289
    }
8290
 
8291
    @Override
8292
    public boolean equals(Object that) {
8293
      if (that == null)
8294
        return false;
8295
      if (that instanceof changeTransactionStatus_result)
8296
        return this.equals((changeTransactionStatus_result)that);
8297
      return false;
8298
    }
8299
 
8300
    public boolean equals(changeTransactionStatus_result that) {
8301
      if (that == null)
8302
        return false;
8303
 
8304
      boolean this_present_success = true;
8305
      boolean that_present_success = true;
8306
      if (this_present_success || that_present_success) {
8307
        if (!(this_present_success && that_present_success))
8308
          return false;
8309
        if (this.success != that.success)
8310
          return false;
8311
      }
8312
 
8313
      boolean this_present_ex = true && this.isSetEx();
8314
      boolean that_present_ex = true && that.isSetEx();
8315
      if (this_present_ex || that_present_ex) {
8316
        if (!(this_present_ex && that_present_ex))
8317
          return false;
8318
        if (!this.ex.equals(that.ex))
8319
          return false;
8320
      }
8321
 
8322
      return true;
8323
    }
8324
 
8325
    @Override
8326
    public int hashCode() {
8327
      return 0;
8328
    }
8329
 
8330
    public int compareTo(changeTransactionStatus_result other) {
8331
      if (!getClass().equals(other.getClass())) {
8332
        return getClass().getName().compareTo(other.getClass().getName());
8333
      }
8334
 
8335
      int lastComparison = 0;
8336
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
8337
 
8338
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8339
      if (lastComparison != 0) {
8340
        return lastComparison;
8341
      }
8342
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8343
      if (lastComparison != 0) {
8344
        return lastComparison;
8345
      }
8346
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8347
      if (lastComparison != 0) {
8348
        return lastComparison;
8349
      }
8350
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8351
      if (lastComparison != 0) {
8352
        return lastComparison;
8353
      }
8354
      return 0;
8355
    }
8356
 
8357
    public void read(TProtocol iprot) throws TException {
8358
      TField field;
8359
      iprot.readStructBegin();
8360
      while (true)
8361
      {
8362
        field = iprot.readFieldBegin();
8363
        if (field.type == TType.STOP) { 
8364
          break;
8365
        }
8366
        _Fields fieldId = _Fields.findByThriftId(field.id);
8367
        if (fieldId == null) {
8368
          TProtocolUtil.skip(iprot, field.type);
8369
        } else {
8370
          switch (fieldId) {
8371
            case SUCCESS:
8372
              if (field.type == TType.BOOL) {
8373
                this.success = iprot.readBool();
8374
                setSuccessIsSet(true);
8375
              } else { 
8376
                TProtocolUtil.skip(iprot, field.type);
8377
              }
8378
              break;
8379
            case EX:
8380
              if (field.type == TType.STRUCT) {
8381
                this.ex = new TransactionServiceException();
8382
                this.ex.read(iprot);
8383
              } else { 
8384
                TProtocolUtil.skip(iprot, field.type);
8385
              }
8386
              break;
8387
          }
8388
          iprot.readFieldEnd();
8389
        }
8390
      }
8391
      iprot.readStructEnd();
8392
      validate();
8393
    }
8394
 
8395
    public void write(TProtocol oprot) throws TException {
8396
      oprot.writeStructBegin(STRUCT_DESC);
8397
 
8398
      if (this.isSetSuccess()) {
8399
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8400
        oprot.writeBool(this.success);
8401
        oprot.writeFieldEnd();
8402
      } else if (this.isSetEx()) {
8403
        oprot.writeFieldBegin(EX_FIELD_DESC);
8404
        this.ex.write(oprot);
8405
        oprot.writeFieldEnd();
8406
      }
8407
      oprot.writeFieldStop();
8408
      oprot.writeStructEnd();
8409
    }
8410
 
8411
    @Override
8412
    public String toString() {
8413
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
8414
      boolean first = true;
8415
 
8416
      sb.append("success:");
8417
      sb.append(this.success);
8418
      first = false;
8419
      if (!first) sb.append(", ");
8420
      sb.append("ex:");
8421
      if (this.ex == null) {
8422
        sb.append("null");
8423
      } else {
8424
        sb.append(this.ex);
8425
      }
8426
      first = false;
8427
      sb.append(")");
8428
      return sb.toString();
8429
    }
8430
 
8431
    public void validate() throws TException {
8432
      // check for required fields
8433
    }
8434
 
8435
  }
8436
 
8437
  public static class getOrderInfo_args implements TBase<getOrderInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderInfo_args>   {
8438
    private static final TStruct STRUCT_DESC = new TStruct("getOrderInfo_args");
8439
 
8440
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
8441
 
8442
    private long transactionId;
8443
 
8444
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8445
    public enum _Fields implements TFieldIdEnum {
8446
      TRANSACTION_ID((short)1, "transactionId");
8447
 
8448
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8449
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8450
 
8451
      static {
8452
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8453
          byId.put((int)field._thriftId, field);
8454
          byName.put(field.getFieldName(), field);
8455
        }
8456
      }
8457
 
8458
      /**
8459
       * Find the _Fields constant that matches fieldId, or null if its not found.
8460
       */
8461
      public static _Fields findByThriftId(int fieldId) {
8462
        return byId.get(fieldId);
8463
      }
8464
 
8465
      /**
8466
       * Find the _Fields constant that matches fieldId, throwing an exception
8467
       * if it is not found.
8468
       */
8469
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8470
        _Fields fields = findByThriftId(fieldId);
8471
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8472
        return fields;
8473
      }
8474
 
8475
      /**
8476
       * Find the _Fields constant that matches name, or null if its not found.
8477
       */
8478
      public static _Fields findByName(String name) {
8479
        return byName.get(name);
8480
      }
8481
 
8482
      private final short _thriftId;
8483
      private final String _fieldName;
8484
 
8485
      _Fields(short thriftId, String fieldName) {
8486
        _thriftId = thriftId;
8487
        _fieldName = fieldName;
8488
      }
8489
 
8490
      public short getThriftFieldId() {
8491
        return _thriftId;
8492
      }
8493
 
8494
      public String getFieldName() {
8495
        return _fieldName;
8496
      }
8497
    }
8498
 
8499
    // isset id assignments
8500
    private static final int __TRANSACTIONID_ISSET_ID = 0;
8501
    private BitSet __isset_bit_vector = new BitSet(1);
8502
 
8503
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8504
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
8505
          new FieldValueMetaData(TType.I64)));
8506
    }});
8507
 
8508
    static {
8509
      FieldMetaData.addStructMetaDataMap(getOrderInfo_args.class, metaDataMap);
8510
    }
8511
 
8512
    public getOrderInfo_args() {
8513
    }
8514
 
8515
    public getOrderInfo_args(
8516
      long transactionId)
8517
    {
8518
      this();
8519
      this.transactionId = transactionId;
8520
      setTransactionIdIsSet(true);
8521
    }
8522
 
8523
    /**
8524
     * Performs a deep copy on <i>other</i>.
8525
     */
8526
    public getOrderInfo_args(getOrderInfo_args other) {
8527
      __isset_bit_vector.clear();
8528
      __isset_bit_vector.or(other.__isset_bit_vector);
8529
      this.transactionId = other.transactionId;
8530
    }
8531
 
8532
    public getOrderInfo_args deepCopy() {
8533
      return new getOrderInfo_args(this);
8534
    }
8535
 
8536
    @Deprecated
8537
    public getOrderInfo_args clone() {
8538
      return new getOrderInfo_args(this);
8539
    }
8540
 
8541
    public long getTransactionId() {
8542
      return this.transactionId;
8543
    }
8544
 
8545
    public getOrderInfo_args setTransactionId(long transactionId) {
8546
      this.transactionId = transactionId;
8547
      setTransactionIdIsSet(true);
8548
      return this;
8549
    }
8550
 
8551
    public void unsetTransactionId() {
8552
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
8553
    }
8554
 
8555
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
8556
    public boolean isSetTransactionId() {
8557
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
8558
    }
8559
 
8560
    public void setTransactionIdIsSet(boolean value) {
8561
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
8562
    }
8563
 
8564
    public void setFieldValue(_Fields field, Object value) {
8565
      switch (field) {
8566
      case TRANSACTION_ID:
8567
        if (value == null) {
8568
          unsetTransactionId();
8569
        } else {
8570
          setTransactionId((Long)value);
8571
        }
8572
        break;
8573
 
8574
      }
8575
    }
8576
 
8577
    public void setFieldValue(int fieldID, Object value) {
8578
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8579
    }
8580
 
8581
    public Object getFieldValue(_Fields field) {
8582
      switch (field) {
8583
      case TRANSACTION_ID:
8584
        return new Long(getTransactionId());
8585
 
8586
      }
8587
      throw new IllegalStateException();
8588
    }
8589
 
8590
    public Object getFieldValue(int fieldId) {
8591
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8592
    }
8593
 
8594
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8595
    public boolean isSet(_Fields field) {
8596
      switch (field) {
8597
      case TRANSACTION_ID:
8598
        return isSetTransactionId();
8599
      }
8600
      throw new IllegalStateException();
8601
    }
8602
 
8603
    public boolean isSet(int fieldID) {
8604
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8605
    }
8606
 
8607
    @Override
8608
    public boolean equals(Object that) {
8609
      if (that == null)
8610
        return false;
8611
      if (that instanceof getOrderInfo_args)
8612
        return this.equals((getOrderInfo_args)that);
8613
      return false;
8614
    }
8615
 
8616
    public boolean equals(getOrderInfo_args that) {
8617
      if (that == null)
8618
        return false;
8619
 
8620
      boolean this_present_transactionId = true;
8621
      boolean that_present_transactionId = true;
8622
      if (this_present_transactionId || that_present_transactionId) {
8623
        if (!(this_present_transactionId && that_present_transactionId))
8624
          return false;
8625
        if (this.transactionId != that.transactionId)
8626
          return false;
8627
      }
8628
 
8629
      return true;
8630
    }
8631
 
8632
    @Override
8633
    public int hashCode() {
8634
      return 0;
8635
    }
8636
 
8637
    public int compareTo(getOrderInfo_args other) {
8638
      if (!getClass().equals(other.getClass())) {
8639
        return getClass().getName().compareTo(other.getClass().getName());
8640
      }
8641
 
8642
      int lastComparison = 0;
8643
      getOrderInfo_args typedOther = (getOrderInfo_args)other;
8644
 
8645
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
8646
      if (lastComparison != 0) {
8647
        return lastComparison;
8648
      }
8649
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
8650
      if (lastComparison != 0) {
8651
        return lastComparison;
8652
      }
8653
      return 0;
8654
    }
8655
 
8656
    public void read(TProtocol iprot) throws TException {
8657
      TField field;
8658
      iprot.readStructBegin();
8659
      while (true)
8660
      {
8661
        field = iprot.readFieldBegin();
8662
        if (field.type == TType.STOP) { 
8663
          break;
8664
        }
8665
        _Fields fieldId = _Fields.findByThriftId(field.id);
8666
        if (fieldId == null) {
8667
          TProtocolUtil.skip(iprot, field.type);
8668
        } else {
8669
          switch (fieldId) {
8670
            case TRANSACTION_ID:
8671
              if (field.type == TType.I64) {
8672
                this.transactionId = iprot.readI64();
8673
                setTransactionIdIsSet(true);
8674
              } else { 
8675
                TProtocolUtil.skip(iprot, field.type);
8676
              }
8677
              break;
8678
          }
8679
          iprot.readFieldEnd();
8680
        }
8681
      }
8682
      iprot.readStructEnd();
8683
      validate();
8684
    }
8685
 
8686
    public void write(TProtocol oprot) throws TException {
8687
      validate();
8688
 
8689
      oprot.writeStructBegin(STRUCT_DESC);
8690
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
8691
      oprot.writeI64(this.transactionId);
8692
      oprot.writeFieldEnd();
8693
      oprot.writeFieldStop();
8694
      oprot.writeStructEnd();
8695
    }
8696
 
8697
    @Override
8698
    public String toString() {
8699
      StringBuilder sb = new StringBuilder("getOrderInfo_args(");
8700
      boolean first = true;
8701
 
8702
      sb.append("transactionId:");
8703
      sb.append(this.transactionId);
8704
      first = false;
8705
      sb.append(")");
8706
      return sb.toString();
8707
    }
8708
 
8709
    public void validate() throws TException {
8710
      // check for required fields
8711
    }
8712
 
8713
  }
8714
 
8715
  public static class getOrderInfo_result implements TBase<getOrderInfo_result._Fields>, java.io.Serializable, Cloneable   {
8716
    private static final TStruct STRUCT_DESC = new TStruct("getOrderInfo_result");
8717
 
8718
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
8719
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8720
 
8721
    private OrderInfo success;
8722
    private TransactionServiceException ex;
8723
 
8724
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8725
    public enum _Fields implements TFieldIdEnum {
8726
      SUCCESS((short)0, "success"),
8727
      EX((short)1, "ex");
8728
 
8729
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8730
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8731
 
8732
      static {
8733
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8734
          byId.put((int)field._thriftId, field);
8735
          byName.put(field.getFieldName(), field);
8736
        }
8737
      }
8738
 
8739
      /**
8740
       * Find the _Fields constant that matches fieldId, or null if its not found.
8741
       */
8742
      public static _Fields findByThriftId(int fieldId) {
8743
        return byId.get(fieldId);
8744
      }
8745
 
8746
      /**
8747
       * Find the _Fields constant that matches fieldId, throwing an exception
8748
       * if it is not found.
8749
       */
8750
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8751
        _Fields fields = findByThriftId(fieldId);
8752
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8753
        return fields;
8754
      }
8755
 
8756
      /**
8757
       * Find the _Fields constant that matches name, or null if its not found.
8758
       */
8759
      public static _Fields findByName(String name) {
8760
        return byName.get(name);
8761
      }
8762
 
8763
      private final short _thriftId;
8764
      private final String _fieldName;
8765
 
8766
      _Fields(short thriftId, String fieldName) {
8767
        _thriftId = thriftId;
8768
        _fieldName = fieldName;
8769
      }
8770
 
8771
      public short getThriftFieldId() {
8772
        return _thriftId;
8773
      }
8774
 
8775
      public String getFieldName() {
8776
        return _fieldName;
8777
      }
8778
    }
8779
 
8780
    // isset id assignments
8781
 
8782
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8783
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8784
          new StructMetaData(TType.STRUCT, OrderInfo.class)));
8785
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8786
          new FieldValueMetaData(TType.STRUCT)));
8787
    }});
8788
 
8789
    static {
8790
      FieldMetaData.addStructMetaDataMap(getOrderInfo_result.class, metaDataMap);
8791
    }
8792
 
8793
    public getOrderInfo_result() {
8794
    }
8795
 
8796
    public getOrderInfo_result(
8797
      OrderInfo success,
8798
      TransactionServiceException ex)
8799
    {
8800
      this();
8801
      this.success = success;
8802
      this.ex = ex;
8803
    }
8804
 
8805
    /**
8806
     * Performs a deep copy on <i>other</i>.
8807
     */
8808
    public getOrderInfo_result(getOrderInfo_result other) {
8809
      if (other.isSetSuccess()) {
8810
        this.success = new OrderInfo(other.success);
8811
      }
8812
      if (other.isSetEx()) {
8813
        this.ex = new TransactionServiceException(other.ex);
8814
      }
8815
    }
8816
 
8817
    public getOrderInfo_result deepCopy() {
8818
      return new getOrderInfo_result(this);
8819
    }
8820
 
8821
    @Deprecated
8822
    public getOrderInfo_result clone() {
8823
      return new getOrderInfo_result(this);
8824
    }
8825
 
8826
    public OrderInfo getSuccess() {
8827
      return this.success;
8828
    }
8829
 
8830
    public getOrderInfo_result setSuccess(OrderInfo success) {
8831
      this.success = success;
8832
      return this;
8833
    }
8834
 
8835
    public void unsetSuccess() {
8836
      this.success = null;
8837
    }
8838
 
8839
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8840
    public boolean isSetSuccess() {
8841
      return this.success != null;
8842
    }
8843
 
8844
    public void setSuccessIsSet(boolean value) {
8845
      if (!value) {
8846
        this.success = null;
8847
      }
8848
    }
8849
 
8850
    public TransactionServiceException getEx() {
8851
      return this.ex;
8852
    }
8853
 
8854
    public getOrderInfo_result setEx(TransactionServiceException ex) {
8855
      this.ex = ex;
8856
      return this;
8857
    }
8858
 
8859
    public void unsetEx() {
8860
      this.ex = null;
8861
    }
8862
 
8863
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8864
    public boolean isSetEx() {
8865
      return this.ex != null;
8866
    }
8867
 
8868
    public void setExIsSet(boolean value) {
8869
      if (!value) {
8870
        this.ex = null;
8871
      }
8872
    }
8873
 
8874
    public void setFieldValue(_Fields field, Object value) {
8875
      switch (field) {
8876
      case SUCCESS:
8877
        if (value == null) {
8878
          unsetSuccess();
8879
        } else {
8880
          setSuccess((OrderInfo)value);
8881
        }
8882
        break;
8883
 
8884
      case EX:
8885
        if (value == null) {
8886
          unsetEx();
8887
        } else {
8888
          setEx((TransactionServiceException)value);
8889
        }
8890
        break;
8891
 
8892
      }
8893
    }
8894
 
8895
    public void setFieldValue(int fieldID, Object value) {
8896
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8897
    }
8898
 
8899
    public Object getFieldValue(_Fields field) {
8900
      switch (field) {
8901
      case SUCCESS:
8902
        return getSuccess();
8903
 
8904
      case EX:
8905
        return getEx();
8906
 
8907
      }
8908
      throw new IllegalStateException();
8909
    }
8910
 
8911
    public Object getFieldValue(int fieldId) {
8912
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8913
    }
8914
 
8915
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8916
    public boolean isSet(_Fields field) {
8917
      switch (field) {
8918
      case SUCCESS:
8919
        return isSetSuccess();
8920
      case EX:
8921
        return isSetEx();
8922
      }
8923
      throw new IllegalStateException();
8924
    }
8925
 
8926
    public boolean isSet(int fieldID) {
8927
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8928
    }
8929
 
8930
    @Override
8931
    public boolean equals(Object that) {
8932
      if (that == null)
8933
        return false;
8934
      if (that instanceof getOrderInfo_result)
8935
        return this.equals((getOrderInfo_result)that);
8936
      return false;
8937
    }
8938
 
8939
    public boolean equals(getOrderInfo_result that) {
8940
      if (that == null)
8941
        return false;
8942
 
8943
      boolean this_present_success = true && this.isSetSuccess();
8944
      boolean that_present_success = true && that.isSetSuccess();
8945
      if (this_present_success || that_present_success) {
8946
        if (!(this_present_success && that_present_success))
8947
          return false;
8948
        if (!this.success.equals(that.success))
8949
          return false;
8950
      }
8951
 
8952
      boolean this_present_ex = true && this.isSetEx();
8953
      boolean that_present_ex = true && that.isSetEx();
8954
      if (this_present_ex || that_present_ex) {
8955
        if (!(this_present_ex && that_present_ex))
8956
          return false;
8957
        if (!this.ex.equals(that.ex))
8958
          return false;
8959
      }
8960
 
8961
      return true;
8962
    }
8963
 
8964
    @Override
8965
    public int hashCode() {
8966
      return 0;
8967
    }
8968
 
8969
    public void read(TProtocol iprot) throws TException {
8970
      TField field;
8971
      iprot.readStructBegin();
8972
      while (true)
8973
      {
8974
        field = iprot.readFieldBegin();
8975
        if (field.type == TType.STOP) { 
8976
          break;
8977
        }
8978
        _Fields fieldId = _Fields.findByThriftId(field.id);
8979
        if (fieldId == null) {
8980
          TProtocolUtil.skip(iprot, field.type);
8981
        } else {
8982
          switch (fieldId) {
8983
            case SUCCESS:
8984
              if (field.type == TType.STRUCT) {
8985
                this.success = new OrderInfo();
8986
                this.success.read(iprot);
8987
              } else { 
8988
                TProtocolUtil.skip(iprot, field.type);
8989
              }
8990
              break;
8991
            case EX:
8992
              if (field.type == TType.STRUCT) {
8993
                this.ex = new TransactionServiceException();
8994
                this.ex.read(iprot);
8995
              } else { 
8996
                TProtocolUtil.skip(iprot, field.type);
8997
              }
8998
              break;
8999
          }
9000
          iprot.readFieldEnd();
9001
        }
9002
      }
9003
      iprot.readStructEnd();
9004
      validate();
9005
    }
9006
 
9007
    public void write(TProtocol oprot) throws TException {
9008
      oprot.writeStructBegin(STRUCT_DESC);
9009
 
9010
      if (this.isSetSuccess()) {
9011
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9012
        this.success.write(oprot);
9013
        oprot.writeFieldEnd();
9014
      } else if (this.isSetEx()) {
9015
        oprot.writeFieldBegin(EX_FIELD_DESC);
9016
        this.ex.write(oprot);
9017
        oprot.writeFieldEnd();
9018
      }
9019
      oprot.writeFieldStop();
9020
      oprot.writeStructEnd();
9021
    }
9022
 
9023
    @Override
9024
    public String toString() {
9025
      StringBuilder sb = new StringBuilder("getOrderInfo_result(");
9026
      boolean first = true;
9027
 
9028
      sb.append("success:");
9029
      if (this.success == null) {
9030
        sb.append("null");
9031
      } else {
9032
        sb.append(this.success);
9033
      }
9034
      first = false;
9035
      if (!first) sb.append(", ");
9036
      sb.append("ex:");
9037
      if (this.ex == null) {
9038
        sb.append("null");
9039
      } else {
9040
        sb.append(this.ex);
9041
      }
9042
      first = false;
9043
      sb.append(")");
9044
      return sb.toString();
9045
    }
9046
 
9047
    public void validate() throws TException {
9048
      // check for required fields
9049
    }
9050
 
9051
  }
9052
 
9053
  public static class getShippingInfo_args implements TBase<getShippingInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getShippingInfo_args>   {
9054
    private static final TStruct STRUCT_DESC = new TStruct("getShippingInfo_args");
9055
 
9056
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
9057
 
9058
    private long transactionId;
9059
 
9060
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9061
    public enum _Fields implements TFieldIdEnum {
9062
      TRANSACTION_ID((short)1, "transactionId");
9063
 
9064
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9065
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9066
 
9067
      static {
9068
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9069
          byId.put((int)field._thriftId, field);
9070
          byName.put(field.getFieldName(), field);
9071
        }
9072
      }
9073
 
9074
      /**
9075
       * Find the _Fields constant that matches fieldId, or null if its not found.
9076
       */
9077
      public static _Fields findByThriftId(int fieldId) {
9078
        return byId.get(fieldId);
9079
      }
9080
 
9081
      /**
9082
       * Find the _Fields constant that matches fieldId, throwing an exception
9083
       * if it is not found.
9084
       */
9085
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9086
        _Fields fields = findByThriftId(fieldId);
9087
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9088
        return fields;
9089
      }
9090
 
9091
      /**
9092
       * Find the _Fields constant that matches name, or null if its not found.
9093
       */
9094
      public static _Fields findByName(String name) {
9095
        return byName.get(name);
9096
      }
9097
 
9098
      private final short _thriftId;
9099
      private final String _fieldName;
9100
 
9101
      _Fields(short thriftId, String fieldName) {
9102
        _thriftId = thriftId;
9103
        _fieldName = fieldName;
9104
      }
9105
 
9106
      public short getThriftFieldId() {
9107
        return _thriftId;
9108
      }
9109
 
9110
      public String getFieldName() {
9111
        return _fieldName;
9112
      }
9113
    }
9114
 
9115
    // isset id assignments
9116
    private static final int __TRANSACTIONID_ISSET_ID = 0;
9117
    private BitSet __isset_bit_vector = new BitSet(1);
9118
 
9119
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9120
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
9121
          new FieldValueMetaData(TType.I64)));
9122
    }});
9123
 
9124
    static {
9125
      FieldMetaData.addStructMetaDataMap(getShippingInfo_args.class, metaDataMap);
9126
    }
9127
 
9128
    public getShippingInfo_args() {
9129
    }
9130
 
9131
    public getShippingInfo_args(
9132
      long transactionId)
9133
    {
9134
      this();
9135
      this.transactionId = transactionId;
9136
      setTransactionIdIsSet(true);
9137
    }
9138
 
9139
    /**
9140
     * Performs a deep copy on <i>other</i>.
9141
     */
9142
    public getShippingInfo_args(getShippingInfo_args other) {
9143
      __isset_bit_vector.clear();
9144
      __isset_bit_vector.or(other.__isset_bit_vector);
9145
      this.transactionId = other.transactionId;
9146
    }
9147
 
9148
    public getShippingInfo_args deepCopy() {
9149
      return new getShippingInfo_args(this);
9150
    }
9151
 
9152
    @Deprecated
9153
    public getShippingInfo_args clone() {
9154
      return new getShippingInfo_args(this);
9155
    }
9156
 
9157
    public long getTransactionId() {
9158
      return this.transactionId;
9159
    }
9160
 
9161
    public getShippingInfo_args setTransactionId(long transactionId) {
9162
      this.transactionId = transactionId;
9163
      setTransactionIdIsSet(true);
9164
      return this;
9165
    }
9166
 
9167
    public void unsetTransactionId() {
9168
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
9169
    }
9170
 
9171
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
9172
    public boolean isSetTransactionId() {
9173
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
9174
    }
9175
 
9176
    public void setTransactionIdIsSet(boolean value) {
9177
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
9178
    }
9179
 
9180
    public void setFieldValue(_Fields field, Object value) {
9181
      switch (field) {
9182
      case TRANSACTION_ID:
9183
        if (value == null) {
9184
          unsetTransactionId();
9185
        } else {
9186
          setTransactionId((Long)value);
9187
        }
9188
        break;
9189
 
9190
      }
9191
    }
9192
 
9193
    public void setFieldValue(int fieldID, Object value) {
9194
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9195
    }
9196
 
9197
    public Object getFieldValue(_Fields field) {
9198
      switch (field) {
9199
      case TRANSACTION_ID:
9200
        return new Long(getTransactionId());
9201
 
9202
      }
9203
      throw new IllegalStateException();
9204
    }
9205
 
9206
    public Object getFieldValue(int fieldId) {
9207
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9208
    }
9209
 
9210
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9211
    public boolean isSet(_Fields field) {
9212
      switch (field) {
9213
      case TRANSACTION_ID:
9214
        return isSetTransactionId();
9215
      }
9216
      throw new IllegalStateException();
9217
    }
9218
 
9219
    public boolean isSet(int fieldID) {
9220
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9221
    }
9222
 
9223
    @Override
9224
    public boolean equals(Object that) {
9225
      if (that == null)
9226
        return false;
9227
      if (that instanceof getShippingInfo_args)
9228
        return this.equals((getShippingInfo_args)that);
9229
      return false;
9230
    }
9231
 
9232
    public boolean equals(getShippingInfo_args that) {
9233
      if (that == null)
9234
        return false;
9235
 
9236
      boolean this_present_transactionId = true;
9237
      boolean that_present_transactionId = true;
9238
      if (this_present_transactionId || that_present_transactionId) {
9239
        if (!(this_present_transactionId && that_present_transactionId))
9240
          return false;
9241
        if (this.transactionId != that.transactionId)
9242
          return false;
9243
      }
9244
 
9245
      return true;
9246
    }
9247
 
9248
    @Override
9249
    public int hashCode() {
9250
      return 0;
9251
    }
9252
 
9253
    public int compareTo(getShippingInfo_args other) {
9254
      if (!getClass().equals(other.getClass())) {
9255
        return getClass().getName().compareTo(other.getClass().getName());
9256
      }
9257
 
9258
      int lastComparison = 0;
9259
      getShippingInfo_args typedOther = (getShippingInfo_args)other;
9260
 
9261
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
9262
      if (lastComparison != 0) {
9263
        return lastComparison;
9264
      }
9265
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
9266
      if (lastComparison != 0) {
9267
        return lastComparison;
9268
      }
9269
      return 0;
9270
    }
9271
 
9272
    public void read(TProtocol iprot) throws TException {
9273
      TField field;
9274
      iprot.readStructBegin();
9275
      while (true)
9276
      {
9277
        field = iprot.readFieldBegin();
9278
        if (field.type == TType.STOP) { 
9279
          break;
9280
        }
9281
        _Fields fieldId = _Fields.findByThriftId(field.id);
9282
        if (fieldId == null) {
9283
          TProtocolUtil.skip(iprot, field.type);
9284
        } else {
9285
          switch (fieldId) {
9286
            case TRANSACTION_ID:
9287
              if (field.type == TType.I64) {
9288
                this.transactionId = iprot.readI64();
9289
                setTransactionIdIsSet(true);
9290
              } else { 
9291
                TProtocolUtil.skip(iprot, field.type);
9292
              }
9293
              break;
9294
          }
9295
          iprot.readFieldEnd();
9296
        }
9297
      }
9298
      iprot.readStructEnd();
9299
      validate();
9300
    }
9301
 
9302
    public void write(TProtocol oprot) throws TException {
9303
      validate();
9304
 
9305
      oprot.writeStructBegin(STRUCT_DESC);
9306
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
9307
      oprot.writeI64(this.transactionId);
9308
      oprot.writeFieldEnd();
9309
      oprot.writeFieldStop();
9310
      oprot.writeStructEnd();
9311
    }
9312
 
9313
    @Override
9314
    public String toString() {
9315
      StringBuilder sb = new StringBuilder("getShippingInfo_args(");
9316
      boolean first = true;
9317
 
9318
      sb.append("transactionId:");
9319
      sb.append(this.transactionId);
9320
      first = false;
9321
      sb.append(")");
9322
      return sb.toString();
9323
    }
9324
 
9325
    public void validate() throws TException {
9326
      // check for required fields
9327
    }
9328
 
9329
  }
9330
 
9331
  public static class getShippingInfo_result implements TBase<getShippingInfo_result._Fields>, java.io.Serializable, Cloneable   {
9332
    private static final TStruct STRUCT_DESC = new TStruct("getShippingInfo_result");
9333
 
9334
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
9335
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9336
 
9337
    private ShipmentInfo success;
9338
    private TransactionServiceException ex;
9339
 
9340
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9341
    public enum _Fields implements TFieldIdEnum {
9342
      SUCCESS((short)0, "success"),
9343
      EX((short)1, "ex");
9344
 
9345
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9346
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9347
 
9348
      static {
9349
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9350
          byId.put((int)field._thriftId, field);
9351
          byName.put(field.getFieldName(), field);
9352
        }
9353
      }
9354
 
9355
      /**
9356
       * Find the _Fields constant that matches fieldId, or null if its not found.
9357
       */
9358
      public static _Fields findByThriftId(int fieldId) {
9359
        return byId.get(fieldId);
9360
      }
9361
 
9362
      /**
9363
       * Find the _Fields constant that matches fieldId, throwing an exception
9364
       * if it is not found.
9365
       */
9366
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9367
        _Fields fields = findByThriftId(fieldId);
9368
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9369
        return fields;
9370
      }
9371
 
9372
      /**
9373
       * Find the _Fields constant that matches name, or null if its not found.
9374
       */
9375
      public static _Fields findByName(String name) {
9376
        return byName.get(name);
9377
      }
9378
 
9379
      private final short _thriftId;
9380
      private final String _fieldName;
9381
 
9382
      _Fields(short thriftId, String fieldName) {
9383
        _thriftId = thriftId;
9384
        _fieldName = fieldName;
9385
      }
9386
 
9387
      public short getThriftFieldId() {
9388
        return _thriftId;
9389
      }
9390
 
9391
      public String getFieldName() {
9392
        return _fieldName;
9393
      }
9394
    }
9395
 
9396
    // isset id assignments
9397
 
9398
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9399
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9400
          new StructMetaData(TType.STRUCT, ShipmentInfo.class)));
9401
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9402
          new FieldValueMetaData(TType.STRUCT)));
9403
    }});
9404
 
9405
    static {
9406
      FieldMetaData.addStructMetaDataMap(getShippingInfo_result.class, metaDataMap);
9407
    }
9408
 
9409
    public getShippingInfo_result() {
9410
    }
9411
 
9412
    public getShippingInfo_result(
9413
      ShipmentInfo success,
9414
      TransactionServiceException ex)
9415
    {
9416
      this();
9417
      this.success = success;
9418
      this.ex = ex;
9419
    }
9420
 
9421
    /**
9422
     * Performs a deep copy on <i>other</i>.
9423
     */
9424
    public getShippingInfo_result(getShippingInfo_result other) {
9425
      if (other.isSetSuccess()) {
9426
        this.success = new ShipmentInfo(other.success);
9427
      }
9428
      if (other.isSetEx()) {
9429
        this.ex = new TransactionServiceException(other.ex);
9430
      }
9431
    }
9432
 
9433
    public getShippingInfo_result deepCopy() {
9434
      return new getShippingInfo_result(this);
9435
    }
9436
 
9437
    @Deprecated
9438
    public getShippingInfo_result clone() {
9439
      return new getShippingInfo_result(this);
9440
    }
9441
 
9442
    public ShipmentInfo getSuccess() {
9443
      return this.success;
9444
    }
9445
 
9446
    public getShippingInfo_result setSuccess(ShipmentInfo success) {
9447
      this.success = success;
9448
      return this;
9449
    }
9450
 
9451
    public void unsetSuccess() {
9452
      this.success = null;
9453
    }
9454
 
9455
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9456
    public boolean isSetSuccess() {
9457
      return this.success != null;
9458
    }
9459
 
9460
    public void setSuccessIsSet(boolean value) {
9461
      if (!value) {
9462
        this.success = null;
9463
      }
9464
    }
9465
 
9466
    public TransactionServiceException getEx() {
9467
      return this.ex;
9468
    }
9469
 
9470
    public getShippingInfo_result setEx(TransactionServiceException ex) {
9471
      this.ex = ex;
9472
      return this;
9473
    }
9474
 
9475
    public void unsetEx() {
9476
      this.ex = null;
9477
    }
9478
 
9479
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9480
    public boolean isSetEx() {
9481
      return this.ex != null;
9482
    }
9483
 
9484
    public void setExIsSet(boolean value) {
9485
      if (!value) {
9486
        this.ex = null;
9487
      }
9488
    }
9489
 
9490
    public void setFieldValue(_Fields field, Object value) {
9491
      switch (field) {
9492
      case SUCCESS:
9493
        if (value == null) {
9494
          unsetSuccess();
9495
        } else {
9496
          setSuccess((ShipmentInfo)value);
9497
        }
9498
        break;
9499
 
9500
      case EX:
9501
        if (value == null) {
9502
          unsetEx();
9503
        } else {
9504
          setEx((TransactionServiceException)value);
9505
        }
9506
        break;
9507
 
9508
      }
9509
    }
9510
 
9511
    public void setFieldValue(int fieldID, Object value) {
9512
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9513
    }
9514
 
9515
    public Object getFieldValue(_Fields field) {
9516
      switch (field) {
9517
      case SUCCESS:
9518
        return getSuccess();
9519
 
9520
      case EX:
9521
        return getEx();
9522
 
9523
      }
9524
      throw new IllegalStateException();
9525
    }
9526
 
9527
    public Object getFieldValue(int fieldId) {
9528
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9529
    }
9530
 
9531
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9532
    public boolean isSet(_Fields field) {
9533
      switch (field) {
9534
      case SUCCESS:
9535
        return isSetSuccess();
9536
      case EX:
9537
        return isSetEx();
9538
      }
9539
      throw new IllegalStateException();
9540
    }
9541
 
9542
    public boolean isSet(int fieldID) {
9543
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9544
    }
9545
 
9546
    @Override
9547
    public boolean equals(Object that) {
9548
      if (that == null)
9549
        return false;
9550
      if (that instanceof getShippingInfo_result)
9551
        return this.equals((getShippingInfo_result)that);
9552
      return false;
9553
    }
9554
 
9555
    public boolean equals(getShippingInfo_result that) {
9556
      if (that == null)
9557
        return false;
9558
 
9559
      boolean this_present_success = true && this.isSetSuccess();
9560
      boolean that_present_success = true && that.isSetSuccess();
9561
      if (this_present_success || that_present_success) {
9562
        if (!(this_present_success && that_present_success))
9563
          return false;
9564
        if (!this.success.equals(that.success))
9565
          return false;
9566
      }
9567
 
9568
      boolean this_present_ex = true && this.isSetEx();
9569
      boolean that_present_ex = true && that.isSetEx();
9570
      if (this_present_ex || that_present_ex) {
9571
        if (!(this_present_ex && that_present_ex))
9572
          return false;
9573
        if (!this.ex.equals(that.ex))
9574
          return false;
9575
      }
9576
 
9577
      return true;
9578
    }
9579
 
9580
    @Override
9581
    public int hashCode() {
9582
      return 0;
9583
    }
9584
 
9585
    public void read(TProtocol iprot) throws TException {
9586
      TField field;
9587
      iprot.readStructBegin();
9588
      while (true)
9589
      {
9590
        field = iprot.readFieldBegin();
9591
        if (field.type == TType.STOP) { 
9592
          break;
9593
        }
9594
        _Fields fieldId = _Fields.findByThriftId(field.id);
9595
        if (fieldId == null) {
9596
          TProtocolUtil.skip(iprot, field.type);
9597
        } else {
9598
          switch (fieldId) {
9599
            case SUCCESS:
9600
              if (field.type == TType.STRUCT) {
9601
                this.success = new ShipmentInfo();
9602
                this.success.read(iprot);
9603
              } else { 
9604
                TProtocolUtil.skip(iprot, field.type);
9605
              }
9606
              break;
9607
            case EX:
9608
              if (field.type == TType.STRUCT) {
9609
                this.ex = new TransactionServiceException();
9610
                this.ex.read(iprot);
9611
              } else { 
9612
                TProtocolUtil.skip(iprot, field.type);
9613
              }
9614
              break;
9615
          }
9616
          iprot.readFieldEnd();
9617
        }
9618
      }
9619
      iprot.readStructEnd();
9620
      validate();
9621
    }
9622
 
9623
    public void write(TProtocol oprot) throws TException {
9624
      oprot.writeStructBegin(STRUCT_DESC);
9625
 
9626
      if (this.isSetSuccess()) {
9627
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9628
        this.success.write(oprot);
9629
        oprot.writeFieldEnd();
9630
      } else if (this.isSetEx()) {
9631
        oprot.writeFieldBegin(EX_FIELD_DESC);
9632
        this.ex.write(oprot);
9633
        oprot.writeFieldEnd();
9634
      }
9635
      oprot.writeFieldStop();
9636
      oprot.writeStructEnd();
9637
    }
9638
 
9639
    @Override
9640
    public String toString() {
9641
      StringBuilder sb = new StringBuilder("getShippingInfo_result(");
9642
      boolean first = true;
9643
 
9644
      sb.append("success:");
9645
      if (this.success == null) {
9646
        sb.append("null");
9647
      } else {
9648
        sb.append(this.success);
9649
      }
9650
      first = false;
9651
      if (!first) sb.append(", ");
9652
      sb.append("ex:");
9653
      if (this.ex == null) {
9654
        sb.append("null");
9655
      } else {
9656
        sb.append(this.ex);
9657
      }
9658
      first = false;
9659
      sb.append(")");
9660
      return sb.toString();
9661
    }
9662
 
9663
    public void validate() throws TException {
9664
      // check for required fields
9665
    }
9666
 
9667
  }
9668
 
9669
  public static class getBillingInfo_args implements TBase<getBillingInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getBillingInfo_args>   {
9670
    private static final TStruct STRUCT_DESC = new TStruct("getBillingInfo_args");
9671
 
9672
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
9673
 
9674
    private long transactionId;
9675
 
9676
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9677
    public enum _Fields implements TFieldIdEnum {
9678
      TRANSACTION_ID((short)1, "transactionId");
9679
 
9680
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9681
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9682
 
9683
      static {
9684
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9685
          byId.put((int)field._thriftId, field);
9686
          byName.put(field.getFieldName(), field);
9687
        }
9688
      }
9689
 
9690
      /**
9691
       * Find the _Fields constant that matches fieldId, or null if its not found.
9692
       */
9693
      public static _Fields findByThriftId(int fieldId) {
9694
        return byId.get(fieldId);
9695
      }
9696
 
9697
      /**
9698
       * Find the _Fields constant that matches fieldId, throwing an exception
9699
       * if it is not found.
9700
       */
9701
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9702
        _Fields fields = findByThriftId(fieldId);
9703
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9704
        return fields;
9705
      }
9706
 
9707
      /**
9708
       * Find the _Fields constant that matches name, or null if its not found.
9709
       */
9710
      public static _Fields findByName(String name) {
9711
        return byName.get(name);
9712
      }
9713
 
9714
      private final short _thriftId;
9715
      private final String _fieldName;
9716
 
9717
      _Fields(short thriftId, String fieldName) {
9718
        _thriftId = thriftId;
9719
        _fieldName = fieldName;
9720
      }
9721
 
9722
      public short getThriftFieldId() {
9723
        return _thriftId;
9724
      }
9725
 
9726
      public String getFieldName() {
9727
        return _fieldName;
9728
      }
9729
    }
9730
 
9731
    // isset id assignments
9732
    private static final int __TRANSACTIONID_ISSET_ID = 0;
9733
    private BitSet __isset_bit_vector = new BitSet(1);
9734
 
9735
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9736
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
9737
          new FieldValueMetaData(TType.I64)));
9738
    }});
9739
 
9740
    static {
9741
      FieldMetaData.addStructMetaDataMap(getBillingInfo_args.class, metaDataMap);
9742
    }
9743
 
9744
    public getBillingInfo_args() {
9745
    }
9746
 
9747
    public getBillingInfo_args(
9748
      long transactionId)
9749
    {
9750
      this();
9751
      this.transactionId = transactionId;
9752
      setTransactionIdIsSet(true);
9753
    }
9754
 
9755
    /**
9756
     * Performs a deep copy on <i>other</i>.
9757
     */
9758
    public getBillingInfo_args(getBillingInfo_args other) {
9759
      __isset_bit_vector.clear();
9760
      __isset_bit_vector.or(other.__isset_bit_vector);
9761
      this.transactionId = other.transactionId;
9762
    }
9763
 
9764
    public getBillingInfo_args deepCopy() {
9765
      return new getBillingInfo_args(this);
9766
    }
9767
 
9768
    @Deprecated
9769
    public getBillingInfo_args clone() {
9770
      return new getBillingInfo_args(this);
9771
    }
9772
 
9773
    public long getTransactionId() {
9774
      return this.transactionId;
9775
    }
9776
 
9777
    public getBillingInfo_args setTransactionId(long transactionId) {
9778
      this.transactionId = transactionId;
9779
      setTransactionIdIsSet(true);
9780
      return this;
9781
    }
9782
 
9783
    public void unsetTransactionId() {
9784
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
9785
    }
9786
 
9787
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
9788
    public boolean isSetTransactionId() {
9789
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
9790
    }
9791
 
9792
    public void setTransactionIdIsSet(boolean value) {
9793
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
9794
    }
9795
 
9796
    public void setFieldValue(_Fields field, Object value) {
9797
      switch (field) {
9798
      case TRANSACTION_ID:
9799
        if (value == null) {
9800
          unsetTransactionId();
9801
        } else {
9802
          setTransactionId((Long)value);
9803
        }
9804
        break;
9805
 
9806
      }
9807
    }
9808
 
9809
    public void setFieldValue(int fieldID, Object value) {
9810
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9811
    }
9812
 
9813
    public Object getFieldValue(_Fields field) {
9814
      switch (field) {
9815
      case TRANSACTION_ID:
9816
        return new Long(getTransactionId());
9817
 
9818
      }
9819
      throw new IllegalStateException();
9820
    }
9821
 
9822
    public Object getFieldValue(int fieldId) {
9823
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9824
    }
9825
 
9826
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9827
    public boolean isSet(_Fields field) {
9828
      switch (field) {
9829
      case TRANSACTION_ID:
9830
        return isSetTransactionId();
9831
      }
9832
      throw new IllegalStateException();
9833
    }
9834
 
9835
    public boolean isSet(int fieldID) {
9836
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9837
    }
9838
 
9839
    @Override
9840
    public boolean equals(Object that) {
9841
      if (that == null)
9842
        return false;
9843
      if (that instanceof getBillingInfo_args)
9844
        return this.equals((getBillingInfo_args)that);
9845
      return false;
9846
    }
9847
 
9848
    public boolean equals(getBillingInfo_args that) {
9849
      if (that == null)
9850
        return false;
9851
 
9852
      boolean this_present_transactionId = true;
9853
      boolean that_present_transactionId = true;
9854
      if (this_present_transactionId || that_present_transactionId) {
9855
        if (!(this_present_transactionId && that_present_transactionId))
9856
          return false;
9857
        if (this.transactionId != that.transactionId)
9858
          return false;
9859
      }
9860
 
9861
      return true;
9862
    }
9863
 
9864
    @Override
9865
    public int hashCode() {
9866
      return 0;
9867
    }
9868
 
9869
    public int compareTo(getBillingInfo_args other) {
9870
      if (!getClass().equals(other.getClass())) {
9871
        return getClass().getName().compareTo(other.getClass().getName());
9872
      }
9873
 
9874
      int lastComparison = 0;
9875
      getBillingInfo_args typedOther = (getBillingInfo_args)other;
9876
 
9877
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
9878
      if (lastComparison != 0) {
9879
        return lastComparison;
9880
      }
9881
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
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 TRANSACTION_ID:
9903
              if (field.type == TType.I64) {
9904
                this.transactionId = iprot.readI64();
9905
                setTransactionIdIsSet(true);
9906
              } else { 
9907
                TProtocolUtil.skip(iprot, field.type);
9908
              }
9909
              break;
9910
          }
9911
          iprot.readFieldEnd();
9912
        }
9913
      }
9914
      iprot.readStructEnd();
9915
      validate();
9916
    }
9917
 
9918
    public void write(TProtocol oprot) throws TException {
9919
      validate();
9920
 
9921
      oprot.writeStructBegin(STRUCT_DESC);
9922
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
9923
      oprot.writeI64(this.transactionId);
9924
      oprot.writeFieldEnd();
9925
      oprot.writeFieldStop();
9926
      oprot.writeStructEnd();
9927
    }
9928
 
9929
    @Override
9930
    public String toString() {
9931
      StringBuilder sb = new StringBuilder("getBillingInfo_args(");
9932
      boolean first = true;
9933
 
9934
      sb.append("transactionId:");
9935
      sb.append(this.transactionId);
9936
      first = false;
9937
      sb.append(")");
9938
      return sb.toString();
9939
    }
9940
 
9941
    public void validate() throws TException {
9942
      // check for required fields
9943
    }
9944
 
9945
  }
9946
 
9947
  public static class getBillingInfo_result implements TBase<getBillingInfo_result._Fields>, java.io.Serializable, Cloneable   {
9948
    private static final TStruct STRUCT_DESC = new TStruct("getBillingInfo_result");
9949
 
9950
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
9951
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9952
 
9953
    private BillingInfo success;
9954
    private TransactionServiceException ex;
9955
 
9956
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9957
    public enum _Fields implements TFieldIdEnum {
9958
      SUCCESS((short)0, "success"),
9959
      EX((short)1, "ex");
9960
 
9961
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9962
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9963
 
9964
      static {
9965
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9966
          byId.put((int)field._thriftId, field);
9967
          byName.put(field.getFieldName(), field);
9968
        }
9969
      }
9970
 
9971
      /**
9972
       * Find the _Fields constant that matches fieldId, or null if its not found.
9973
       */
9974
      public static _Fields findByThriftId(int fieldId) {
9975
        return byId.get(fieldId);
9976
      }
9977
 
9978
      /**
9979
       * Find the _Fields constant that matches fieldId, throwing an exception
9980
       * if it is not found.
9981
       */
9982
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9983
        _Fields fields = findByThriftId(fieldId);
9984
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9985
        return fields;
9986
      }
9987
 
9988
      /**
9989
       * Find the _Fields constant that matches name, or null if its not found.
9990
       */
9991
      public static _Fields findByName(String name) {
9992
        return byName.get(name);
9993
      }
9994
 
9995
      private final short _thriftId;
9996
      private final String _fieldName;
9997
 
9998
      _Fields(short thriftId, String fieldName) {
9999
        _thriftId = thriftId;
10000
        _fieldName = fieldName;
10001
      }
10002
 
10003
      public short getThriftFieldId() {
10004
        return _thriftId;
10005
      }
10006
 
10007
      public String getFieldName() {
10008
        return _fieldName;
10009
      }
10010
    }
10011
 
10012
    // isset id assignments
10013
 
10014
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10015
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10016
          new StructMetaData(TType.STRUCT, BillingInfo.class)));
10017
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10018
          new FieldValueMetaData(TType.STRUCT)));
10019
    }});
10020
 
10021
    static {
10022
      FieldMetaData.addStructMetaDataMap(getBillingInfo_result.class, metaDataMap);
10023
    }
10024
 
10025
    public getBillingInfo_result() {
10026
    }
10027
 
10028
    public getBillingInfo_result(
10029
      BillingInfo success,
10030
      TransactionServiceException ex)
10031
    {
10032
      this();
10033
      this.success = success;
10034
      this.ex = ex;
10035
    }
10036
 
10037
    /**
10038
     * Performs a deep copy on <i>other</i>.
10039
     */
10040
    public getBillingInfo_result(getBillingInfo_result other) {
10041
      if (other.isSetSuccess()) {
10042
        this.success = new BillingInfo(other.success);
10043
      }
10044
      if (other.isSetEx()) {
10045
        this.ex = new TransactionServiceException(other.ex);
10046
      }
10047
    }
10048
 
10049
    public getBillingInfo_result deepCopy() {
10050
      return new getBillingInfo_result(this);
10051
    }
10052
 
10053
    @Deprecated
10054
    public getBillingInfo_result clone() {
10055
      return new getBillingInfo_result(this);
10056
    }
10057
 
10058
    public BillingInfo getSuccess() {
10059
      return this.success;
10060
    }
10061
 
10062
    public getBillingInfo_result setSuccess(BillingInfo success) {
10063
      this.success = success;
10064
      return this;
10065
    }
10066
 
10067
    public void unsetSuccess() {
10068
      this.success = null;
10069
    }
10070
 
10071
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10072
    public boolean isSetSuccess() {
10073
      return this.success != null;
10074
    }
10075
 
10076
    public void setSuccessIsSet(boolean value) {
10077
      if (!value) {
10078
        this.success = null;
10079
      }
10080
    }
10081
 
10082
    public TransactionServiceException getEx() {
10083
      return this.ex;
10084
    }
10085
 
10086
    public getBillingInfo_result setEx(TransactionServiceException ex) {
10087
      this.ex = ex;
10088
      return this;
10089
    }
10090
 
10091
    public void unsetEx() {
10092
      this.ex = null;
10093
    }
10094
 
10095
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10096
    public boolean isSetEx() {
10097
      return this.ex != null;
10098
    }
10099
 
10100
    public void setExIsSet(boolean value) {
10101
      if (!value) {
10102
        this.ex = null;
10103
      }
10104
    }
10105
 
10106
    public void setFieldValue(_Fields field, Object value) {
10107
      switch (field) {
10108
      case SUCCESS:
10109
        if (value == null) {
10110
          unsetSuccess();
10111
        } else {
10112
          setSuccess((BillingInfo)value);
10113
        }
10114
        break;
10115
 
10116
      case EX:
10117
        if (value == null) {
10118
          unsetEx();
10119
        } else {
10120
          setEx((TransactionServiceException)value);
10121
        }
10122
        break;
10123
 
10124
      }
10125
    }
10126
 
10127
    public void setFieldValue(int fieldID, Object value) {
10128
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10129
    }
10130
 
10131
    public Object getFieldValue(_Fields field) {
10132
      switch (field) {
10133
      case SUCCESS:
10134
        return getSuccess();
10135
 
10136
      case EX:
10137
        return getEx();
10138
 
10139
      }
10140
      throw new IllegalStateException();
10141
    }
10142
 
10143
    public Object getFieldValue(int fieldId) {
10144
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10145
    }
10146
 
10147
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10148
    public boolean isSet(_Fields field) {
10149
      switch (field) {
10150
      case SUCCESS:
10151
        return isSetSuccess();
10152
      case EX:
10153
        return isSetEx();
10154
      }
10155
      throw new IllegalStateException();
10156
    }
10157
 
10158
    public boolean isSet(int fieldID) {
10159
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10160
    }
10161
 
10162
    @Override
10163
    public boolean equals(Object that) {
10164
      if (that == null)
10165
        return false;
10166
      if (that instanceof getBillingInfo_result)
10167
        return this.equals((getBillingInfo_result)that);
10168
      return false;
10169
    }
10170
 
10171
    public boolean equals(getBillingInfo_result that) {
10172
      if (that == null)
10173
        return false;
10174
 
10175
      boolean this_present_success = true && this.isSetSuccess();
10176
      boolean that_present_success = true && that.isSetSuccess();
10177
      if (this_present_success || that_present_success) {
10178
        if (!(this_present_success && that_present_success))
10179
          return false;
10180
        if (!this.success.equals(that.success))
10181
          return false;
10182
      }
10183
 
10184
      boolean this_present_ex = true && this.isSetEx();
10185
      boolean that_present_ex = true && that.isSetEx();
10186
      if (this_present_ex || that_present_ex) {
10187
        if (!(this_present_ex && that_present_ex))
10188
          return false;
10189
        if (!this.ex.equals(that.ex))
10190
          return false;
10191
      }
10192
 
10193
      return true;
10194
    }
10195
 
10196
    @Override
10197
    public int hashCode() {
10198
      return 0;
10199
    }
10200
 
10201
    public void read(TProtocol iprot) throws TException {
10202
      TField field;
10203
      iprot.readStructBegin();
10204
      while (true)
10205
      {
10206
        field = iprot.readFieldBegin();
10207
        if (field.type == TType.STOP) { 
10208
          break;
10209
        }
10210
        _Fields fieldId = _Fields.findByThriftId(field.id);
10211
        if (fieldId == null) {
10212
          TProtocolUtil.skip(iprot, field.type);
10213
        } else {
10214
          switch (fieldId) {
10215
            case SUCCESS:
10216
              if (field.type == TType.STRUCT) {
10217
                this.success = new BillingInfo();
10218
                this.success.read(iprot);
10219
              } else { 
10220
                TProtocolUtil.skip(iprot, field.type);
10221
              }
10222
              break;
10223
            case EX:
10224
              if (field.type == TType.STRUCT) {
10225
                this.ex = new TransactionServiceException();
10226
                this.ex.read(iprot);
10227
              } else { 
10228
                TProtocolUtil.skip(iprot, field.type);
10229
              }
10230
              break;
10231
          }
10232
          iprot.readFieldEnd();
10233
        }
10234
      }
10235
      iprot.readStructEnd();
10236
      validate();
10237
    }
10238
 
10239
    public void write(TProtocol oprot) throws TException {
10240
      oprot.writeStructBegin(STRUCT_DESC);
10241
 
10242
      if (this.isSetSuccess()) {
10243
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10244
        this.success.write(oprot);
10245
        oprot.writeFieldEnd();
10246
      } else if (this.isSetEx()) {
10247
        oprot.writeFieldBegin(EX_FIELD_DESC);
10248
        this.ex.write(oprot);
10249
        oprot.writeFieldEnd();
10250
      }
10251
      oprot.writeFieldStop();
10252
      oprot.writeStructEnd();
10253
    }
10254
 
10255
    @Override
10256
    public String toString() {
10257
      StringBuilder sb = new StringBuilder("getBillingInfo_result(");
10258
      boolean first = true;
10259
 
10260
      sb.append("success:");
10261
      if (this.success == null) {
10262
        sb.append("null");
10263
      } else {
10264
        sb.append(this.success);
10265
      }
10266
      first = false;
10267
      if (!first) sb.append(", ");
10268
      sb.append("ex:");
10269
      if (this.ex == null) {
10270
        sb.append("null");
10271
      } else {
10272
        sb.append(this.ex);
10273
      }
10274
      first = false;
10275
      sb.append(")");
10276
      return sb.toString();
10277
    }
10278
 
10279
    public void validate() throws TException {
10280
      // check for required fields
10281
    }
10282
 
10283
  }
10284
 
10285
  public static class addBilling_args implements TBase<addBilling_args._Fields>, java.io.Serializable, Cloneable   {
10286
    private static final TStruct STRUCT_DESC = new TStruct("addBilling_args");
10287
 
10288
    private static final TField TRANACTION_ID_FIELD_DESC = new TField("tranactionId", TType.I64, (short)1);
10289
    private static final TField BILLING_FIELD_DESC = new TField("billing", TType.STRUCT, (short)2);
10290
 
10291
    private long tranactionId;
10292
    private Billing billing;
10293
 
10294
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10295
    public enum _Fields implements TFieldIdEnum {
10296
      TRANACTION_ID((short)1, "tranactionId"),
10297
      BILLING((short)2, "billing");
10298
 
10299
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10300
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10301
 
10302
      static {
10303
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10304
          byId.put((int)field._thriftId, field);
10305
          byName.put(field.getFieldName(), field);
10306
        }
10307
      }
10308
 
10309
      /**
10310
       * Find the _Fields constant that matches fieldId, or null if its not found.
10311
       */
10312
      public static _Fields findByThriftId(int fieldId) {
10313
        return byId.get(fieldId);
10314
      }
10315
 
10316
      /**
10317
       * Find the _Fields constant that matches fieldId, throwing an exception
10318
       * if it is not found.
10319
       */
10320
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10321
        _Fields fields = findByThriftId(fieldId);
10322
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10323
        return fields;
10324
      }
10325
 
10326
      /**
10327
       * Find the _Fields constant that matches name, or null if its not found.
10328
       */
10329
      public static _Fields findByName(String name) {
10330
        return byName.get(name);
10331
      }
10332
 
10333
      private final short _thriftId;
10334
      private final String _fieldName;
10335
 
10336
      _Fields(short thriftId, String fieldName) {
10337
        _thriftId = thriftId;
10338
        _fieldName = fieldName;
10339
      }
10340
 
10341
      public short getThriftFieldId() {
10342
        return _thriftId;
10343
      }
10344
 
10345
      public String getFieldName() {
10346
        return _fieldName;
10347
      }
10348
    }
10349
 
10350
    // isset id assignments
10351
    private static final int __TRANACTIONID_ISSET_ID = 0;
10352
    private BitSet __isset_bit_vector = new BitSet(1);
10353
 
10354
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10355
      put(_Fields.TRANACTION_ID, new FieldMetaData("tranactionId", TFieldRequirementType.DEFAULT, 
10356
          new FieldValueMetaData(TType.I64)));
10357
      put(_Fields.BILLING, new FieldMetaData("billing", TFieldRequirementType.DEFAULT, 
10358
          new StructMetaData(TType.STRUCT, Billing.class)));
10359
    }});
10360
 
10361
    static {
10362
      FieldMetaData.addStructMetaDataMap(addBilling_args.class, metaDataMap);
10363
    }
10364
 
10365
    public addBilling_args() {
10366
    }
10367
 
10368
    public addBilling_args(
10369
      long tranactionId,
10370
      Billing billing)
10371
    {
10372
      this();
10373
      this.tranactionId = tranactionId;
10374
      setTranactionIdIsSet(true);
10375
      this.billing = billing;
10376
    }
10377
 
10378
    /**
10379
     * Performs a deep copy on <i>other</i>.
10380
     */
10381
    public addBilling_args(addBilling_args other) {
10382
      __isset_bit_vector.clear();
10383
      __isset_bit_vector.or(other.__isset_bit_vector);
10384
      this.tranactionId = other.tranactionId;
10385
      if (other.isSetBilling()) {
10386
        this.billing = new Billing(other.billing);
10387
      }
10388
    }
10389
 
10390
    public addBilling_args deepCopy() {
10391
      return new addBilling_args(this);
10392
    }
10393
 
10394
    @Deprecated
10395
    public addBilling_args clone() {
10396
      return new addBilling_args(this);
10397
    }
10398
 
10399
    public long getTranactionId() {
10400
      return this.tranactionId;
10401
    }
10402
 
10403
    public addBilling_args setTranactionId(long tranactionId) {
10404
      this.tranactionId = tranactionId;
10405
      setTranactionIdIsSet(true);
10406
      return this;
10407
    }
10408
 
10409
    public void unsetTranactionId() {
10410
      __isset_bit_vector.clear(__TRANACTIONID_ISSET_ID);
10411
    }
10412
 
10413
    /** Returns true if field tranactionId is set (has been asigned a value) and false otherwise */
10414
    public boolean isSetTranactionId() {
10415
      return __isset_bit_vector.get(__TRANACTIONID_ISSET_ID);
10416
    }
10417
 
10418
    public void setTranactionIdIsSet(boolean value) {
10419
      __isset_bit_vector.set(__TRANACTIONID_ISSET_ID, value);
10420
    }
10421
 
10422
    public Billing getBilling() {
10423
      return this.billing;
10424
    }
10425
 
10426
    public addBilling_args setBilling(Billing billing) {
10427
      this.billing = billing;
10428
      return this;
10429
    }
10430
 
10431
    public void unsetBilling() {
10432
      this.billing = null;
10433
    }
10434
 
10435
    /** Returns true if field billing is set (has been asigned a value) and false otherwise */
10436
    public boolean isSetBilling() {
10437
      return this.billing != null;
10438
    }
10439
 
10440
    public void setBillingIsSet(boolean value) {
10441
      if (!value) {
10442
        this.billing = null;
10443
      }
10444
    }
10445
 
10446
    public void setFieldValue(_Fields field, Object value) {
10447
      switch (field) {
10448
      case TRANACTION_ID:
10449
        if (value == null) {
10450
          unsetTranactionId();
10451
        } else {
10452
          setTranactionId((Long)value);
10453
        }
10454
        break;
10455
 
10456
      case BILLING:
10457
        if (value == null) {
10458
          unsetBilling();
10459
        } else {
10460
          setBilling((Billing)value);
10461
        }
10462
        break;
10463
 
10464
      }
10465
    }
10466
 
10467
    public void setFieldValue(int fieldID, Object value) {
10468
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10469
    }
10470
 
10471
    public Object getFieldValue(_Fields field) {
10472
      switch (field) {
10473
      case TRANACTION_ID:
10474
        return new Long(getTranactionId());
10475
 
10476
      case BILLING:
10477
        return getBilling();
10478
 
10479
      }
10480
      throw new IllegalStateException();
10481
    }
10482
 
10483
    public Object getFieldValue(int fieldId) {
10484
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10485
    }
10486
 
10487
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10488
    public boolean isSet(_Fields field) {
10489
      switch (field) {
10490
      case TRANACTION_ID:
10491
        return isSetTranactionId();
10492
      case BILLING:
10493
        return isSetBilling();
10494
      }
10495
      throw new IllegalStateException();
10496
    }
10497
 
10498
    public boolean isSet(int fieldID) {
10499
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10500
    }
10501
 
10502
    @Override
10503
    public boolean equals(Object that) {
10504
      if (that == null)
10505
        return false;
10506
      if (that instanceof addBilling_args)
10507
        return this.equals((addBilling_args)that);
10508
      return false;
10509
    }
10510
 
10511
    public boolean equals(addBilling_args that) {
10512
      if (that == null)
10513
        return false;
10514
 
10515
      boolean this_present_tranactionId = true;
10516
      boolean that_present_tranactionId = true;
10517
      if (this_present_tranactionId || that_present_tranactionId) {
10518
        if (!(this_present_tranactionId && that_present_tranactionId))
10519
          return false;
10520
        if (this.tranactionId != that.tranactionId)
10521
          return false;
10522
      }
10523
 
10524
      boolean this_present_billing = true && this.isSetBilling();
10525
      boolean that_present_billing = true && that.isSetBilling();
10526
      if (this_present_billing || that_present_billing) {
10527
        if (!(this_present_billing && that_present_billing))
10528
          return false;
10529
        if (!this.billing.equals(that.billing))
10530
          return false;
10531
      }
10532
 
10533
      return true;
10534
    }
10535
 
10536
    @Override
10537
    public int hashCode() {
10538
      return 0;
10539
    }
10540
 
10541
    public void read(TProtocol iprot) throws TException {
10542
      TField field;
10543
      iprot.readStructBegin();
10544
      while (true)
10545
      {
10546
        field = iprot.readFieldBegin();
10547
        if (field.type == TType.STOP) { 
10548
          break;
10549
        }
10550
        _Fields fieldId = _Fields.findByThriftId(field.id);
10551
        if (fieldId == null) {
10552
          TProtocolUtil.skip(iprot, field.type);
10553
        } else {
10554
          switch (fieldId) {
10555
            case TRANACTION_ID:
10556
              if (field.type == TType.I64) {
10557
                this.tranactionId = iprot.readI64();
10558
                setTranactionIdIsSet(true);
10559
              } else { 
10560
                TProtocolUtil.skip(iprot, field.type);
10561
              }
10562
              break;
10563
            case BILLING:
10564
              if (field.type == TType.STRUCT) {
10565
                this.billing = new Billing();
10566
                this.billing.read(iprot);
10567
              } else { 
10568
                TProtocolUtil.skip(iprot, field.type);
10569
              }
10570
              break;
10571
          }
10572
          iprot.readFieldEnd();
10573
        }
10574
      }
10575
      iprot.readStructEnd();
10576
      validate();
10577
    }
10578
 
10579
    public void write(TProtocol oprot) throws TException {
10580
      validate();
10581
 
10582
      oprot.writeStructBegin(STRUCT_DESC);
10583
      oprot.writeFieldBegin(TRANACTION_ID_FIELD_DESC);
10584
      oprot.writeI64(this.tranactionId);
10585
      oprot.writeFieldEnd();
10586
      if (this.billing != null) {
10587
        oprot.writeFieldBegin(BILLING_FIELD_DESC);
10588
        this.billing.write(oprot);
10589
        oprot.writeFieldEnd();
10590
      }
10591
      oprot.writeFieldStop();
10592
      oprot.writeStructEnd();
10593
    }
10594
 
10595
    @Override
10596
    public String toString() {
10597
      StringBuilder sb = new StringBuilder("addBilling_args(");
10598
      boolean first = true;
10599
 
10600
      sb.append("tranactionId:");
10601
      sb.append(this.tranactionId);
10602
      first = false;
10603
      if (!first) sb.append(", ");
10604
      sb.append("billing:");
10605
      if (this.billing == null) {
10606
        sb.append("null");
10607
      } else {
10608
        sb.append(this.billing);
10609
      }
10610
      first = false;
10611
      sb.append(")");
10612
      return sb.toString();
10613
    }
10614
 
10615
    public void validate() throws TException {
10616
      // check for required fields
10617
    }
10618
 
10619
  }
10620
 
10621
  public static class addBilling_result implements TBase<addBilling_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBilling_result>   {
10622
    private static final TStruct STRUCT_DESC = new TStruct("addBilling_result");
10623
 
10624
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10625
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10626
 
10627
    private boolean success;
10628
    private TransactionServiceException ex;
10629
 
10630
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10631
    public enum _Fields implements TFieldIdEnum {
10632
      SUCCESS((short)0, "success"),
10633
      EX((short)1, "ex");
10634
 
10635
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10636
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10637
 
10638
      static {
10639
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10640
          byId.put((int)field._thriftId, field);
10641
          byName.put(field.getFieldName(), field);
10642
        }
10643
      }
10644
 
10645
      /**
10646
       * Find the _Fields constant that matches fieldId, or null if its not found.
10647
       */
10648
      public static _Fields findByThriftId(int fieldId) {
10649
        return byId.get(fieldId);
10650
      }
10651
 
10652
      /**
10653
       * Find the _Fields constant that matches fieldId, throwing an exception
10654
       * if it is not found.
10655
       */
10656
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10657
        _Fields fields = findByThriftId(fieldId);
10658
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10659
        return fields;
10660
      }
10661
 
10662
      /**
10663
       * Find the _Fields constant that matches name, or null if its not found.
10664
       */
10665
      public static _Fields findByName(String name) {
10666
        return byName.get(name);
10667
      }
10668
 
10669
      private final short _thriftId;
10670
      private final String _fieldName;
10671
 
10672
      _Fields(short thriftId, String fieldName) {
10673
        _thriftId = thriftId;
10674
        _fieldName = fieldName;
10675
      }
10676
 
10677
      public short getThriftFieldId() {
10678
        return _thriftId;
10679
      }
10680
 
10681
      public String getFieldName() {
10682
        return _fieldName;
10683
      }
10684
    }
10685
 
10686
    // isset id assignments
10687
    private static final int __SUCCESS_ISSET_ID = 0;
10688
    private BitSet __isset_bit_vector = new BitSet(1);
10689
 
10690
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10691
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10692
          new FieldValueMetaData(TType.BOOL)));
10693
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10694
          new FieldValueMetaData(TType.STRUCT)));
10695
    }});
10696
 
10697
    static {
10698
      FieldMetaData.addStructMetaDataMap(addBilling_result.class, metaDataMap);
10699
    }
10700
 
10701
    public addBilling_result() {
10702
    }
10703
 
10704
    public addBilling_result(
10705
      boolean success,
10706
      TransactionServiceException ex)
10707
    {
10708
      this();
10709
      this.success = success;
10710
      setSuccessIsSet(true);
10711
      this.ex = ex;
10712
    }
10713
 
10714
    /**
10715
     * Performs a deep copy on <i>other</i>.
10716
     */
10717
    public addBilling_result(addBilling_result other) {
10718
      __isset_bit_vector.clear();
10719
      __isset_bit_vector.or(other.__isset_bit_vector);
10720
      this.success = other.success;
10721
      if (other.isSetEx()) {
10722
        this.ex = new TransactionServiceException(other.ex);
10723
      }
10724
    }
10725
 
10726
    public addBilling_result deepCopy() {
10727
      return new addBilling_result(this);
10728
    }
10729
 
10730
    @Deprecated
10731
    public addBilling_result clone() {
10732
      return new addBilling_result(this);
10733
    }
10734
 
10735
    public boolean isSuccess() {
10736
      return this.success;
10737
    }
10738
 
10739
    public addBilling_result setSuccess(boolean success) {
10740
      this.success = success;
10741
      setSuccessIsSet(true);
10742
      return this;
10743
    }
10744
 
10745
    public void unsetSuccess() {
10746
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10747
    }
10748
 
10749
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10750
    public boolean isSetSuccess() {
10751
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10752
    }
10753
 
10754
    public void setSuccessIsSet(boolean value) {
10755
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10756
    }
10757
 
10758
    public TransactionServiceException getEx() {
10759
      return this.ex;
10760
    }
10761
 
10762
    public addBilling_result setEx(TransactionServiceException ex) {
10763
      this.ex = ex;
10764
      return this;
10765
    }
10766
 
10767
    public void unsetEx() {
10768
      this.ex = null;
10769
    }
10770
 
10771
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10772
    public boolean isSetEx() {
10773
      return this.ex != null;
10774
    }
10775
 
10776
    public void setExIsSet(boolean value) {
10777
      if (!value) {
10778
        this.ex = null;
10779
      }
10780
    }
10781
 
10782
    public void setFieldValue(_Fields field, Object value) {
10783
      switch (field) {
10784
      case SUCCESS:
10785
        if (value == null) {
10786
          unsetSuccess();
10787
        } else {
10788
          setSuccess((Boolean)value);
10789
        }
10790
        break;
10791
 
10792
      case EX:
10793
        if (value == null) {
10794
          unsetEx();
10795
        } else {
10796
          setEx((TransactionServiceException)value);
10797
        }
10798
        break;
10799
 
10800
      }
10801
    }
10802
 
10803
    public void setFieldValue(int fieldID, Object value) {
10804
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10805
    }
10806
 
10807
    public Object getFieldValue(_Fields field) {
10808
      switch (field) {
10809
      case SUCCESS:
10810
        return new Boolean(isSuccess());
10811
 
10812
      case EX:
10813
        return getEx();
10814
 
10815
      }
10816
      throw new IllegalStateException();
10817
    }
10818
 
10819
    public Object getFieldValue(int fieldId) {
10820
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10821
    }
10822
 
10823
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10824
    public boolean isSet(_Fields field) {
10825
      switch (field) {
10826
      case SUCCESS:
10827
        return isSetSuccess();
10828
      case EX:
10829
        return isSetEx();
10830
      }
10831
      throw new IllegalStateException();
10832
    }
10833
 
10834
    public boolean isSet(int fieldID) {
10835
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10836
    }
10837
 
10838
    @Override
10839
    public boolean equals(Object that) {
10840
      if (that == null)
10841
        return false;
10842
      if (that instanceof addBilling_result)
10843
        return this.equals((addBilling_result)that);
10844
      return false;
10845
    }
10846
 
10847
    public boolean equals(addBilling_result that) {
10848
      if (that == null)
10849
        return false;
10850
 
10851
      boolean this_present_success = true;
10852
      boolean that_present_success = true;
10853
      if (this_present_success || that_present_success) {
10854
        if (!(this_present_success && that_present_success))
10855
          return false;
10856
        if (this.success != that.success)
10857
          return false;
10858
      }
10859
 
10860
      boolean this_present_ex = true && this.isSetEx();
10861
      boolean that_present_ex = true && that.isSetEx();
10862
      if (this_present_ex || that_present_ex) {
10863
        if (!(this_present_ex && that_present_ex))
10864
          return false;
10865
        if (!this.ex.equals(that.ex))
10866
          return false;
10867
      }
10868
 
10869
      return true;
10870
    }
10871
 
10872
    @Override
10873
    public int hashCode() {
10874
      return 0;
10875
    }
10876
 
10877
    public int compareTo(addBilling_result other) {
10878
      if (!getClass().equals(other.getClass())) {
10879
        return getClass().getName().compareTo(other.getClass().getName());
10880
      }
10881
 
10882
      int lastComparison = 0;
10883
      addBilling_result typedOther = (addBilling_result)other;
10884
 
10885
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10886
      if (lastComparison != 0) {
10887
        return lastComparison;
10888
      }
10889
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10890
      if (lastComparison != 0) {
10891
        return lastComparison;
10892
      }
10893
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10894
      if (lastComparison != 0) {
10895
        return lastComparison;
10896
      }
10897
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10898
      if (lastComparison != 0) {
10899
        return lastComparison;
10900
      }
10901
      return 0;
10902
    }
10903
 
10904
    public void read(TProtocol iprot) throws TException {
10905
      TField field;
10906
      iprot.readStructBegin();
10907
      while (true)
10908
      {
10909
        field = iprot.readFieldBegin();
10910
        if (field.type == TType.STOP) { 
10911
          break;
10912
        }
10913
        _Fields fieldId = _Fields.findByThriftId(field.id);
10914
        if (fieldId == null) {
10915
          TProtocolUtil.skip(iprot, field.type);
10916
        } else {
10917
          switch (fieldId) {
10918
            case SUCCESS:
10919
              if (field.type == TType.BOOL) {
10920
                this.success = iprot.readBool();
10921
                setSuccessIsSet(true);
10922
              } else { 
10923
                TProtocolUtil.skip(iprot, field.type);
10924
              }
10925
              break;
10926
            case EX:
10927
              if (field.type == TType.STRUCT) {
10928
                this.ex = new TransactionServiceException();
10929
                this.ex.read(iprot);
10930
              } else { 
10931
                TProtocolUtil.skip(iprot, field.type);
10932
              }
10933
              break;
10934
          }
10935
          iprot.readFieldEnd();
10936
        }
10937
      }
10938
      iprot.readStructEnd();
10939
      validate();
10940
    }
10941
 
10942
    public void write(TProtocol oprot) throws TException {
10943
      oprot.writeStructBegin(STRUCT_DESC);
10944
 
10945
      if (this.isSetSuccess()) {
10946
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10947
        oprot.writeBool(this.success);
10948
        oprot.writeFieldEnd();
10949
      } else if (this.isSetEx()) {
10950
        oprot.writeFieldBegin(EX_FIELD_DESC);
10951
        this.ex.write(oprot);
10952
        oprot.writeFieldEnd();
10953
      }
10954
      oprot.writeFieldStop();
10955
      oprot.writeStructEnd();
10956
    }
10957
 
10958
    @Override
10959
    public String toString() {
10960
      StringBuilder sb = new StringBuilder("addBilling_result(");
10961
      boolean first = true;
10962
 
10963
      sb.append("success:");
10964
      sb.append(this.success);
10965
      first = false;
10966
      if (!first) sb.append(", ");
10967
      sb.append("ex:");
10968
      if (this.ex == null) {
10969
        sb.append("null");
10970
      } else {
10971
        sb.append(this.ex);
10972
      }
10973
      first = false;
10974
      sb.append(")");
10975
      return sb.toString();
10976
    }
10977
 
10978
    public void validate() throws TException {
10979
      // check for required fields
10980
    }
10981
 
10982
  }
10983
 
10984
  public static class setShippingTracker_args implements TBase<setShippingTracker_args._Fields>, java.io.Serializable, Cloneable, Comparable<setShippingTracker_args>   {
10985
    private static final TStruct STRUCT_DESC = new TStruct("setShippingTracker_args");
10986
 
10987
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
10988
    private static final TField SHIPPING_ID_FIELD_DESC = new TField("shippingId", TType.I64, (short)2);
10989
    private static final TField TRACKING_ID_FIELD_DESC = new TField("trackingId", TType.STRING, (short)3);
10990
    private static final TField AIRWAY_BILL_NO_FIELD_DESC = new TField("airwayBillNo", TType.STRING, (short)4);
10991
    private static final TField PROVIDER_FIELD_DESC = new TField("provider", TType.STRING, (short)5);
10992
 
10993
    private long transactionId;
10994
    private long shippingId;
10995
    private String trackingId;
10996
    private String airwayBillNo;
10997
    private String provider;
10998
 
10999
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11000
    public enum _Fields implements TFieldIdEnum {
11001
      TRANSACTION_ID((short)1, "transactionId"),
11002
      SHIPPING_ID((short)2, "shippingId"),
11003
      TRACKING_ID((short)3, "trackingId"),
11004
      AIRWAY_BILL_NO((short)4, "airwayBillNo"),
11005
      PROVIDER((short)5, "provider");
11006
 
11007
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11008
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11009
 
11010
      static {
11011
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11012
          byId.put((int)field._thriftId, field);
11013
          byName.put(field.getFieldName(), field);
11014
        }
11015
      }
11016
 
11017
      /**
11018
       * Find the _Fields constant that matches fieldId, or null if its not found.
11019
       */
11020
      public static _Fields findByThriftId(int fieldId) {
11021
        return byId.get(fieldId);
11022
      }
11023
 
11024
      /**
11025
       * Find the _Fields constant that matches fieldId, throwing an exception
11026
       * if it is not found.
11027
       */
11028
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11029
        _Fields fields = findByThriftId(fieldId);
11030
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11031
        return fields;
11032
      }
11033
 
11034
      /**
11035
       * Find the _Fields constant that matches name, or null if its not found.
11036
       */
11037
      public static _Fields findByName(String name) {
11038
        return byName.get(name);
11039
      }
11040
 
11041
      private final short _thriftId;
11042
      private final String _fieldName;
11043
 
11044
      _Fields(short thriftId, String fieldName) {
11045
        _thriftId = thriftId;
11046
        _fieldName = fieldName;
11047
      }
11048
 
11049
      public short getThriftFieldId() {
11050
        return _thriftId;
11051
      }
11052
 
11053
      public String getFieldName() {
11054
        return _fieldName;
11055
      }
11056
    }
11057
 
11058
    // isset id assignments
11059
    private static final int __TRANSACTIONID_ISSET_ID = 0;
11060
    private static final int __SHIPPINGID_ISSET_ID = 1;
11061
    private BitSet __isset_bit_vector = new BitSet(2);
11062
 
11063
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11064
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
11065
          new FieldValueMetaData(TType.I64)));
11066
      put(_Fields.SHIPPING_ID, new FieldMetaData("shippingId", TFieldRequirementType.DEFAULT, 
11067
          new FieldValueMetaData(TType.I64)));
11068
      put(_Fields.TRACKING_ID, new FieldMetaData("trackingId", TFieldRequirementType.DEFAULT, 
11069
          new FieldValueMetaData(TType.STRING)));
11070
      put(_Fields.AIRWAY_BILL_NO, new FieldMetaData("airwayBillNo", TFieldRequirementType.DEFAULT, 
11071
          new FieldValueMetaData(TType.STRING)));
11072
      put(_Fields.PROVIDER, new FieldMetaData("provider", TFieldRequirementType.DEFAULT, 
11073
          new FieldValueMetaData(TType.STRING)));
11074
    }});
11075
 
11076
    static {
11077
      FieldMetaData.addStructMetaDataMap(setShippingTracker_args.class, metaDataMap);
11078
    }
11079
 
11080
    public setShippingTracker_args() {
11081
    }
11082
 
11083
    public setShippingTracker_args(
11084
      long transactionId,
11085
      long shippingId,
11086
      String trackingId,
11087
      String airwayBillNo,
11088
      String provider)
11089
    {
11090
      this();
11091
      this.transactionId = transactionId;
11092
      setTransactionIdIsSet(true);
11093
      this.shippingId = shippingId;
11094
      setShippingIdIsSet(true);
11095
      this.trackingId = trackingId;
11096
      this.airwayBillNo = airwayBillNo;
11097
      this.provider = provider;
11098
    }
11099
 
11100
    /**
11101
     * Performs a deep copy on <i>other</i>.
11102
     */
11103
    public setShippingTracker_args(setShippingTracker_args other) {
11104
      __isset_bit_vector.clear();
11105
      __isset_bit_vector.or(other.__isset_bit_vector);
11106
      this.transactionId = other.transactionId;
11107
      this.shippingId = other.shippingId;
11108
      if (other.isSetTrackingId()) {
11109
        this.trackingId = other.trackingId;
11110
      }
11111
      if (other.isSetAirwayBillNo()) {
11112
        this.airwayBillNo = other.airwayBillNo;
11113
      }
11114
      if (other.isSetProvider()) {
11115
        this.provider = other.provider;
11116
      }
11117
    }
11118
 
11119
    public setShippingTracker_args deepCopy() {
11120
      return new setShippingTracker_args(this);
11121
    }
11122
 
11123
    @Deprecated
11124
    public setShippingTracker_args clone() {
11125
      return new setShippingTracker_args(this);
11126
    }
11127
 
11128
    public long getTransactionId() {
11129
      return this.transactionId;
11130
    }
11131
 
11132
    public setShippingTracker_args setTransactionId(long transactionId) {
11133
      this.transactionId = transactionId;
11134
      setTransactionIdIsSet(true);
11135
      return this;
11136
    }
11137
 
11138
    public void unsetTransactionId() {
11139
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
11140
    }
11141
 
11142
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
11143
    public boolean isSetTransactionId() {
11144
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
11145
    }
11146
 
11147
    public void setTransactionIdIsSet(boolean value) {
11148
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
11149
    }
11150
 
11151
    public long getShippingId() {
11152
      return this.shippingId;
11153
    }
11154
 
11155
    public setShippingTracker_args setShippingId(long shippingId) {
11156
      this.shippingId = shippingId;
11157
      setShippingIdIsSet(true);
11158
      return this;
11159
    }
11160
 
11161
    public void unsetShippingId() {
11162
      __isset_bit_vector.clear(__SHIPPINGID_ISSET_ID);
11163
    }
11164
 
11165
    /** Returns true if field shippingId is set (has been asigned a value) and false otherwise */
11166
    public boolean isSetShippingId() {
11167
      return __isset_bit_vector.get(__SHIPPINGID_ISSET_ID);
11168
    }
11169
 
11170
    public void setShippingIdIsSet(boolean value) {
11171
      __isset_bit_vector.set(__SHIPPINGID_ISSET_ID, value);
11172
    }
11173
 
11174
    public String getTrackingId() {
11175
      return this.trackingId;
11176
    }
11177
 
11178
    public setShippingTracker_args setTrackingId(String trackingId) {
11179
      this.trackingId = trackingId;
11180
      return this;
11181
    }
11182
 
11183
    public void unsetTrackingId() {
11184
      this.trackingId = null;
11185
    }
11186
 
11187
    /** Returns true if field trackingId is set (has been asigned a value) and false otherwise */
11188
    public boolean isSetTrackingId() {
11189
      return this.trackingId != null;
11190
    }
11191
 
11192
    public void setTrackingIdIsSet(boolean value) {
11193
      if (!value) {
11194
        this.trackingId = null;
11195
      }
11196
    }
11197
 
11198
    public String getAirwayBillNo() {
11199
      return this.airwayBillNo;
11200
    }
11201
 
11202
    public setShippingTracker_args setAirwayBillNo(String airwayBillNo) {
11203
      this.airwayBillNo = airwayBillNo;
11204
      return this;
11205
    }
11206
 
11207
    public void unsetAirwayBillNo() {
11208
      this.airwayBillNo = null;
11209
    }
11210
 
11211
    /** Returns true if field airwayBillNo is set (has been asigned a value) and false otherwise */
11212
    public boolean isSetAirwayBillNo() {
11213
      return this.airwayBillNo != null;
11214
    }
11215
 
11216
    public void setAirwayBillNoIsSet(boolean value) {
11217
      if (!value) {
11218
        this.airwayBillNo = null;
11219
      }
11220
    }
11221
 
11222
    public String getProvider() {
11223
      return this.provider;
11224
    }
11225
 
11226
    public setShippingTracker_args setProvider(String provider) {
11227
      this.provider = provider;
11228
      return this;
11229
    }
11230
 
11231
    public void unsetProvider() {
11232
      this.provider = null;
11233
    }
11234
 
11235
    /** Returns true if field provider is set (has been asigned a value) and false otherwise */
11236
    public boolean isSetProvider() {
11237
      return this.provider != null;
11238
    }
11239
 
11240
    public void setProviderIsSet(boolean value) {
11241
      if (!value) {
11242
        this.provider = null;
11243
      }
11244
    }
11245
 
11246
    public void setFieldValue(_Fields field, Object value) {
11247
      switch (field) {
11248
      case TRANSACTION_ID:
11249
        if (value == null) {
11250
          unsetTransactionId();
11251
        } else {
11252
          setTransactionId((Long)value);
11253
        }
11254
        break;
11255
 
11256
      case SHIPPING_ID:
11257
        if (value == null) {
11258
          unsetShippingId();
11259
        } else {
11260
          setShippingId((Long)value);
11261
        }
11262
        break;
11263
 
11264
      case TRACKING_ID:
11265
        if (value == null) {
11266
          unsetTrackingId();
11267
        } else {
11268
          setTrackingId((String)value);
11269
        }
11270
        break;
11271
 
11272
      case AIRWAY_BILL_NO:
11273
        if (value == null) {
11274
          unsetAirwayBillNo();
11275
        } else {
11276
          setAirwayBillNo((String)value);
11277
        }
11278
        break;
11279
 
11280
      case PROVIDER:
11281
        if (value == null) {
11282
          unsetProvider();
11283
        } else {
11284
          setProvider((String)value);
11285
        }
11286
        break;
11287
 
11288
      }
11289
    }
11290
 
11291
    public void setFieldValue(int fieldID, Object value) {
11292
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11293
    }
11294
 
11295
    public Object getFieldValue(_Fields field) {
11296
      switch (field) {
11297
      case TRANSACTION_ID:
11298
        return new Long(getTransactionId());
11299
 
11300
      case SHIPPING_ID:
11301
        return new Long(getShippingId());
11302
 
11303
      case TRACKING_ID:
11304
        return getTrackingId();
11305
 
11306
      case AIRWAY_BILL_NO:
11307
        return getAirwayBillNo();
11308
 
11309
      case PROVIDER:
11310
        return getProvider();
11311
 
11312
      }
11313
      throw new IllegalStateException();
11314
    }
11315
 
11316
    public Object getFieldValue(int fieldId) {
11317
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11318
    }
11319
 
11320
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11321
    public boolean isSet(_Fields field) {
11322
      switch (field) {
11323
      case TRANSACTION_ID:
11324
        return isSetTransactionId();
11325
      case SHIPPING_ID:
11326
        return isSetShippingId();
11327
      case TRACKING_ID:
11328
        return isSetTrackingId();
11329
      case AIRWAY_BILL_NO:
11330
        return isSetAirwayBillNo();
11331
      case PROVIDER:
11332
        return isSetProvider();
11333
      }
11334
      throw new IllegalStateException();
11335
    }
11336
 
11337
    public boolean isSet(int fieldID) {
11338
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11339
    }
11340
 
11341
    @Override
11342
    public boolean equals(Object that) {
11343
      if (that == null)
11344
        return false;
11345
      if (that instanceof setShippingTracker_args)
11346
        return this.equals((setShippingTracker_args)that);
11347
      return false;
11348
    }
11349
 
11350
    public boolean equals(setShippingTracker_args that) {
11351
      if (that == null)
11352
        return false;
11353
 
11354
      boolean this_present_transactionId = true;
11355
      boolean that_present_transactionId = true;
11356
      if (this_present_transactionId || that_present_transactionId) {
11357
        if (!(this_present_transactionId && that_present_transactionId))
11358
          return false;
11359
        if (this.transactionId != that.transactionId)
11360
          return false;
11361
      }
11362
 
11363
      boolean this_present_shippingId = true;
11364
      boolean that_present_shippingId = true;
11365
      if (this_present_shippingId || that_present_shippingId) {
11366
        if (!(this_present_shippingId && that_present_shippingId))
11367
          return false;
11368
        if (this.shippingId != that.shippingId)
11369
          return false;
11370
      }
11371
 
11372
      boolean this_present_trackingId = true && this.isSetTrackingId();
11373
      boolean that_present_trackingId = true && that.isSetTrackingId();
11374
      if (this_present_trackingId || that_present_trackingId) {
11375
        if (!(this_present_trackingId && that_present_trackingId))
11376
          return false;
11377
        if (!this.trackingId.equals(that.trackingId))
11378
          return false;
11379
      }
11380
 
11381
      boolean this_present_airwayBillNo = true && this.isSetAirwayBillNo();
11382
      boolean that_present_airwayBillNo = true && that.isSetAirwayBillNo();
11383
      if (this_present_airwayBillNo || that_present_airwayBillNo) {
11384
        if (!(this_present_airwayBillNo && that_present_airwayBillNo))
11385
          return false;
11386
        if (!this.airwayBillNo.equals(that.airwayBillNo))
11387
          return false;
11388
      }
11389
 
11390
      boolean this_present_provider = true && this.isSetProvider();
11391
      boolean that_present_provider = true && that.isSetProvider();
11392
      if (this_present_provider || that_present_provider) {
11393
        if (!(this_present_provider && that_present_provider))
11394
          return false;
11395
        if (!this.provider.equals(that.provider))
11396
          return false;
11397
      }
11398
 
11399
      return true;
11400
    }
11401
 
11402
    @Override
11403
    public int hashCode() {
11404
      return 0;
11405
    }
11406
 
11407
    public int compareTo(setShippingTracker_args other) {
11408
      if (!getClass().equals(other.getClass())) {
11409
        return getClass().getName().compareTo(other.getClass().getName());
11410
      }
11411
 
11412
      int lastComparison = 0;
11413
      setShippingTracker_args typedOther = (setShippingTracker_args)other;
11414
 
11415
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
11416
      if (lastComparison != 0) {
11417
        return lastComparison;
11418
      }
11419
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
11420
      if (lastComparison != 0) {
11421
        return lastComparison;
11422
      }
11423
      lastComparison = Boolean.valueOf(isSetShippingId()).compareTo(isSetShippingId());
11424
      if (lastComparison != 0) {
11425
        return lastComparison;
11426
      }
11427
      lastComparison = TBaseHelper.compareTo(shippingId, typedOther.shippingId);
11428
      if (lastComparison != 0) {
11429
        return lastComparison;
11430
      }
11431
      lastComparison = Boolean.valueOf(isSetTrackingId()).compareTo(isSetTrackingId());
11432
      if (lastComparison != 0) {
11433
        return lastComparison;
11434
      }
11435
      lastComparison = TBaseHelper.compareTo(trackingId, typedOther.trackingId);
11436
      if (lastComparison != 0) {
11437
        return lastComparison;
11438
      }
11439
      lastComparison = Boolean.valueOf(isSetAirwayBillNo()).compareTo(isSetAirwayBillNo());
11440
      if (lastComparison != 0) {
11441
        return lastComparison;
11442
      }
11443
      lastComparison = TBaseHelper.compareTo(airwayBillNo, typedOther.airwayBillNo);
11444
      if (lastComparison != 0) {
11445
        return lastComparison;
11446
      }
11447
      lastComparison = Boolean.valueOf(isSetProvider()).compareTo(isSetProvider());
11448
      if (lastComparison != 0) {
11449
        return lastComparison;
11450
      }
11451
      lastComparison = TBaseHelper.compareTo(provider, typedOther.provider);
11452
      if (lastComparison != 0) {
11453
        return lastComparison;
11454
      }
11455
      return 0;
11456
    }
11457
 
11458
    public void read(TProtocol iprot) throws TException {
11459
      TField field;
11460
      iprot.readStructBegin();
11461
      while (true)
11462
      {
11463
        field = iprot.readFieldBegin();
11464
        if (field.type == TType.STOP) { 
11465
          break;
11466
        }
11467
        _Fields fieldId = _Fields.findByThriftId(field.id);
11468
        if (fieldId == null) {
11469
          TProtocolUtil.skip(iprot, field.type);
11470
        } else {
11471
          switch (fieldId) {
11472
            case TRANSACTION_ID:
11473
              if (field.type == TType.I64) {
11474
                this.transactionId = iprot.readI64();
11475
                setTransactionIdIsSet(true);
11476
              } else { 
11477
                TProtocolUtil.skip(iprot, field.type);
11478
              }
11479
              break;
11480
            case SHIPPING_ID:
11481
              if (field.type == TType.I64) {
11482
                this.shippingId = iprot.readI64();
11483
                setShippingIdIsSet(true);
11484
              } else { 
11485
                TProtocolUtil.skip(iprot, field.type);
11486
              }
11487
              break;
11488
            case TRACKING_ID:
11489
              if (field.type == TType.STRING) {
11490
                this.trackingId = iprot.readString();
11491
              } else { 
11492
                TProtocolUtil.skip(iprot, field.type);
11493
              }
11494
              break;
11495
            case AIRWAY_BILL_NO:
11496
              if (field.type == TType.STRING) {
11497
                this.airwayBillNo = iprot.readString();
11498
              } else { 
11499
                TProtocolUtil.skip(iprot, field.type);
11500
              }
11501
              break;
11502
            case PROVIDER:
11503
              if (field.type == TType.STRING) {
11504
                this.provider = iprot.readString();
11505
              } else { 
11506
                TProtocolUtil.skip(iprot, field.type);
11507
              }
11508
              break;
11509
          }
11510
          iprot.readFieldEnd();
11511
        }
11512
      }
11513
      iprot.readStructEnd();
11514
      validate();
11515
    }
11516
 
11517
    public void write(TProtocol oprot) throws TException {
11518
      validate();
11519
 
11520
      oprot.writeStructBegin(STRUCT_DESC);
11521
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
11522
      oprot.writeI64(this.transactionId);
11523
      oprot.writeFieldEnd();
11524
      oprot.writeFieldBegin(SHIPPING_ID_FIELD_DESC);
11525
      oprot.writeI64(this.shippingId);
11526
      oprot.writeFieldEnd();
11527
      if (this.trackingId != null) {
11528
        oprot.writeFieldBegin(TRACKING_ID_FIELD_DESC);
11529
        oprot.writeString(this.trackingId);
11530
        oprot.writeFieldEnd();
11531
      }
11532
      if (this.airwayBillNo != null) {
11533
        oprot.writeFieldBegin(AIRWAY_BILL_NO_FIELD_DESC);
11534
        oprot.writeString(this.airwayBillNo);
11535
        oprot.writeFieldEnd();
11536
      }
11537
      if (this.provider != null) {
11538
        oprot.writeFieldBegin(PROVIDER_FIELD_DESC);
11539
        oprot.writeString(this.provider);
11540
        oprot.writeFieldEnd();
11541
      }
11542
      oprot.writeFieldStop();
11543
      oprot.writeStructEnd();
11544
    }
11545
 
11546
    @Override
11547
    public String toString() {
11548
      StringBuilder sb = new StringBuilder("setShippingTracker_args(");
11549
      boolean first = true;
11550
 
11551
      sb.append("transactionId:");
11552
      sb.append(this.transactionId);
11553
      first = false;
11554
      if (!first) sb.append(", ");
11555
      sb.append("shippingId:");
11556
      sb.append(this.shippingId);
11557
      first = false;
11558
      if (!first) sb.append(", ");
11559
      sb.append("trackingId:");
11560
      if (this.trackingId == null) {
11561
        sb.append("null");
11562
      } else {
11563
        sb.append(this.trackingId);
11564
      }
11565
      first = false;
11566
      if (!first) sb.append(", ");
11567
      sb.append("airwayBillNo:");
11568
      if (this.airwayBillNo == null) {
11569
        sb.append("null");
11570
      } else {
11571
        sb.append(this.airwayBillNo);
11572
      }
11573
      first = false;
11574
      if (!first) sb.append(", ");
11575
      sb.append("provider:");
11576
      if (this.provider == null) {
11577
        sb.append("null");
11578
      } else {
11579
        sb.append(this.provider);
11580
      }
11581
      first = false;
11582
      sb.append(")");
11583
      return sb.toString();
11584
    }
11585
 
11586
    public void validate() throws TException {
11587
      // check for required fields
11588
    }
11589
 
11590
  }
11591
 
11592
  public static class setShippingTracker_result implements TBase<setShippingTracker_result._Fields>, java.io.Serializable, Cloneable, Comparable<setShippingTracker_result>   {
11593
    private static final TStruct STRUCT_DESC = new TStruct("setShippingTracker_result");
11594
 
11595
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11596
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11597
 
11598
    private boolean success;
11599
    private TransactionServiceException ex;
11600
 
11601
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11602
    public enum _Fields implements TFieldIdEnum {
11603
      SUCCESS((short)0, "success"),
11604
      EX((short)1, "ex");
11605
 
11606
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11607
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11608
 
11609
      static {
11610
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11611
          byId.put((int)field._thriftId, field);
11612
          byName.put(field.getFieldName(), field);
11613
        }
11614
      }
11615
 
11616
      /**
11617
       * Find the _Fields constant that matches fieldId, or null if its not found.
11618
       */
11619
      public static _Fields findByThriftId(int fieldId) {
11620
        return byId.get(fieldId);
11621
      }
11622
 
11623
      /**
11624
       * Find the _Fields constant that matches fieldId, throwing an exception
11625
       * if it is not found.
11626
       */
11627
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11628
        _Fields fields = findByThriftId(fieldId);
11629
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11630
        return fields;
11631
      }
11632
 
11633
      /**
11634
       * Find the _Fields constant that matches name, or null if its not found.
11635
       */
11636
      public static _Fields findByName(String name) {
11637
        return byName.get(name);
11638
      }
11639
 
11640
      private final short _thriftId;
11641
      private final String _fieldName;
11642
 
11643
      _Fields(short thriftId, String fieldName) {
11644
        _thriftId = thriftId;
11645
        _fieldName = fieldName;
11646
      }
11647
 
11648
      public short getThriftFieldId() {
11649
        return _thriftId;
11650
      }
11651
 
11652
      public String getFieldName() {
11653
        return _fieldName;
11654
      }
11655
    }
11656
 
11657
    // isset id assignments
11658
    private static final int __SUCCESS_ISSET_ID = 0;
11659
    private BitSet __isset_bit_vector = new BitSet(1);
11660
 
11661
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11662
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11663
          new FieldValueMetaData(TType.BOOL)));
11664
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11665
          new FieldValueMetaData(TType.STRUCT)));
11666
    }});
11667
 
11668
    static {
11669
      FieldMetaData.addStructMetaDataMap(setShippingTracker_result.class, metaDataMap);
11670
    }
11671
 
11672
    public setShippingTracker_result() {
11673
    }
11674
 
11675
    public setShippingTracker_result(
11676
      boolean success,
11677
      TransactionServiceException ex)
11678
    {
11679
      this();
11680
      this.success = success;
11681
      setSuccessIsSet(true);
11682
      this.ex = ex;
11683
    }
11684
 
11685
    /**
11686
     * Performs a deep copy on <i>other</i>.
11687
     */
11688
    public setShippingTracker_result(setShippingTracker_result other) {
11689
      __isset_bit_vector.clear();
11690
      __isset_bit_vector.or(other.__isset_bit_vector);
11691
      this.success = other.success;
11692
      if (other.isSetEx()) {
11693
        this.ex = new TransactionServiceException(other.ex);
11694
      }
11695
    }
11696
 
11697
    public setShippingTracker_result deepCopy() {
11698
      return new setShippingTracker_result(this);
11699
    }
11700
 
11701
    @Deprecated
11702
    public setShippingTracker_result clone() {
11703
      return new setShippingTracker_result(this);
11704
    }
11705
 
11706
    public boolean isSuccess() {
11707
      return this.success;
11708
    }
11709
 
11710
    public setShippingTracker_result setSuccess(boolean success) {
11711
      this.success = success;
11712
      setSuccessIsSet(true);
11713
      return this;
11714
    }
11715
 
11716
    public void unsetSuccess() {
11717
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11718
    }
11719
 
11720
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11721
    public boolean isSetSuccess() {
11722
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11723
    }
11724
 
11725
    public void setSuccessIsSet(boolean value) {
11726
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11727
    }
11728
 
11729
    public TransactionServiceException getEx() {
11730
      return this.ex;
11731
    }
11732
 
11733
    public setShippingTracker_result setEx(TransactionServiceException ex) {
11734
      this.ex = ex;
11735
      return this;
11736
    }
11737
 
11738
    public void unsetEx() {
11739
      this.ex = null;
11740
    }
11741
 
11742
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11743
    public boolean isSetEx() {
11744
      return this.ex != null;
11745
    }
11746
 
11747
    public void setExIsSet(boolean value) {
11748
      if (!value) {
11749
        this.ex = null;
11750
      }
11751
    }
11752
 
11753
    public void setFieldValue(_Fields field, Object value) {
11754
      switch (field) {
11755
      case SUCCESS:
11756
        if (value == null) {
11757
          unsetSuccess();
11758
        } else {
11759
          setSuccess((Boolean)value);
11760
        }
11761
        break;
11762
 
11763
      case EX:
11764
        if (value == null) {
11765
          unsetEx();
11766
        } else {
11767
          setEx((TransactionServiceException)value);
11768
        }
11769
        break;
11770
 
11771
      }
11772
    }
11773
 
11774
    public void setFieldValue(int fieldID, Object value) {
11775
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11776
    }
11777
 
11778
    public Object getFieldValue(_Fields field) {
11779
      switch (field) {
11780
      case SUCCESS:
11781
        return new Boolean(isSuccess());
11782
 
11783
      case EX:
11784
        return getEx();
11785
 
11786
      }
11787
      throw new IllegalStateException();
11788
    }
11789
 
11790
    public Object getFieldValue(int fieldId) {
11791
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11792
    }
11793
 
11794
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11795
    public boolean isSet(_Fields field) {
11796
      switch (field) {
11797
      case SUCCESS:
11798
        return isSetSuccess();
11799
      case EX:
11800
        return isSetEx();
11801
      }
11802
      throw new IllegalStateException();
11803
    }
11804
 
11805
    public boolean isSet(int fieldID) {
11806
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11807
    }
11808
 
11809
    @Override
11810
    public boolean equals(Object that) {
11811
      if (that == null)
11812
        return false;
11813
      if (that instanceof setShippingTracker_result)
11814
        return this.equals((setShippingTracker_result)that);
11815
      return false;
11816
    }
11817
 
11818
    public boolean equals(setShippingTracker_result that) {
11819
      if (that == null)
11820
        return false;
11821
 
11822
      boolean this_present_success = true;
11823
      boolean that_present_success = true;
11824
      if (this_present_success || that_present_success) {
11825
        if (!(this_present_success && that_present_success))
11826
          return false;
11827
        if (this.success != that.success)
11828
          return false;
11829
      }
11830
 
11831
      boolean this_present_ex = true && this.isSetEx();
11832
      boolean that_present_ex = true && that.isSetEx();
11833
      if (this_present_ex || that_present_ex) {
11834
        if (!(this_present_ex && that_present_ex))
11835
          return false;
11836
        if (!this.ex.equals(that.ex))
11837
          return false;
11838
      }
11839
 
11840
      return true;
11841
    }
11842
 
11843
    @Override
11844
    public int hashCode() {
11845
      return 0;
11846
    }
11847
 
11848
    public int compareTo(setShippingTracker_result other) {
11849
      if (!getClass().equals(other.getClass())) {
11850
        return getClass().getName().compareTo(other.getClass().getName());
11851
      }
11852
 
11853
      int lastComparison = 0;
11854
      setShippingTracker_result typedOther = (setShippingTracker_result)other;
11855
 
11856
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11857
      if (lastComparison != 0) {
11858
        return lastComparison;
11859
      }
11860
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11861
      if (lastComparison != 0) {
11862
        return lastComparison;
11863
      }
11864
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11865
      if (lastComparison != 0) {
11866
        return lastComparison;
11867
      }
11868
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11869
      if (lastComparison != 0) {
11870
        return lastComparison;
11871
      }
11872
      return 0;
11873
    }
11874
 
11875
    public void read(TProtocol iprot) throws TException {
11876
      TField field;
11877
      iprot.readStructBegin();
11878
      while (true)
11879
      {
11880
        field = iprot.readFieldBegin();
11881
        if (field.type == TType.STOP) { 
11882
          break;
11883
        }
11884
        _Fields fieldId = _Fields.findByThriftId(field.id);
11885
        if (fieldId == null) {
11886
          TProtocolUtil.skip(iprot, field.type);
11887
        } else {
11888
          switch (fieldId) {
11889
            case SUCCESS:
11890
              if (field.type == TType.BOOL) {
11891
                this.success = iprot.readBool();
11892
                setSuccessIsSet(true);
11893
              } else { 
11894
                TProtocolUtil.skip(iprot, field.type);
11895
              }
11896
              break;
11897
            case EX:
11898
              if (field.type == TType.STRUCT) {
11899
                this.ex = new TransactionServiceException();
11900
                this.ex.read(iprot);
11901
              } else { 
11902
                TProtocolUtil.skip(iprot, field.type);
11903
              }
11904
              break;
11905
          }
11906
          iprot.readFieldEnd();
11907
        }
11908
      }
11909
      iprot.readStructEnd();
11910
      validate();
11911
    }
11912
 
11913
    public void write(TProtocol oprot) throws TException {
11914
      oprot.writeStructBegin(STRUCT_DESC);
11915
 
11916
      if (this.isSetSuccess()) {
11917
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11918
        oprot.writeBool(this.success);
11919
        oprot.writeFieldEnd();
11920
      } else if (this.isSetEx()) {
11921
        oprot.writeFieldBegin(EX_FIELD_DESC);
11922
        this.ex.write(oprot);
11923
        oprot.writeFieldEnd();
11924
      }
11925
      oprot.writeFieldStop();
11926
      oprot.writeStructEnd();
11927
    }
11928
 
11929
    @Override
11930
    public String toString() {
11931
      StringBuilder sb = new StringBuilder("setShippingTracker_result(");
11932
      boolean first = true;
11933
 
11934
      sb.append("success:");
11935
      sb.append(this.success);
11936
      first = false;
11937
      if (!first) sb.append(", ");
11938
      sb.append("ex:");
11939
      if (this.ex == null) {
11940
        sb.append("null");
11941
      } else {
11942
        sb.append(this.ex);
11943
      }
11944
      first = false;
11945
      sb.append(")");
11946
      return sb.toString();
11947
    }
11948
 
11949
    public void validate() throws TException {
11950
      // check for required fields
11951
    }
11952
 
11953
  }
11954
 
11955
  public static class setShippingDate_args implements TBase<setShippingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<setShippingDate_args>   {
11956
    private static final TStruct STRUCT_DESC = new TStruct("setShippingDate_args");
11957
 
11958
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
11959
    private static final TField SHIPPING_ID_FIELD_DESC = new TField("shippingId", TType.I64, (short)2);
11960
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)3);
11961
 
11962
    private long transactionId;
11963
    private long shippingId;
11964
    private long timestamp;
11965
 
11966
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11967
    public enum _Fields implements TFieldIdEnum {
11968
      TRANSACTION_ID((short)1, "transactionId"),
11969
      SHIPPING_ID((short)2, "shippingId"),
11970
      TIMESTAMP((short)3, "timestamp");
11971
 
11972
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11973
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11974
 
11975
      static {
11976
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11977
          byId.put((int)field._thriftId, field);
11978
          byName.put(field.getFieldName(), field);
11979
        }
11980
      }
11981
 
11982
      /**
11983
       * Find the _Fields constant that matches fieldId, or null if its not found.
11984
       */
11985
      public static _Fields findByThriftId(int fieldId) {
11986
        return byId.get(fieldId);
11987
      }
11988
 
11989
      /**
11990
       * Find the _Fields constant that matches fieldId, throwing an exception
11991
       * if it is not found.
11992
       */
11993
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11994
        _Fields fields = findByThriftId(fieldId);
11995
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11996
        return fields;
11997
      }
11998
 
11999
      /**
12000
       * Find the _Fields constant that matches name, or null if its not found.
12001
       */
12002
      public static _Fields findByName(String name) {
12003
        return byName.get(name);
12004
      }
12005
 
12006
      private final short _thriftId;
12007
      private final String _fieldName;
12008
 
12009
      _Fields(short thriftId, String fieldName) {
12010
        _thriftId = thriftId;
12011
        _fieldName = fieldName;
12012
      }
12013
 
12014
      public short getThriftFieldId() {
12015
        return _thriftId;
12016
      }
12017
 
12018
      public String getFieldName() {
12019
        return _fieldName;
12020
      }
12021
    }
12022
 
12023
    // isset id assignments
12024
    private static final int __TRANSACTIONID_ISSET_ID = 0;
12025
    private static final int __SHIPPINGID_ISSET_ID = 1;
12026
    private static final int __TIMESTAMP_ISSET_ID = 2;
12027
    private BitSet __isset_bit_vector = new BitSet(3);
12028
 
12029
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12030
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
12031
          new FieldValueMetaData(TType.I64)));
12032
      put(_Fields.SHIPPING_ID, new FieldMetaData("shippingId", TFieldRequirementType.DEFAULT, 
12033
          new FieldValueMetaData(TType.I64)));
12034
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
12035
          new FieldValueMetaData(TType.I64)));
12036
    }});
12037
 
12038
    static {
12039
      FieldMetaData.addStructMetaDataMap(setShippingDate_args.class, metaDataMap);
12040
    }
12041
 
12042
    public setShippingDate_args() {
12043
    }
12044
 
12045
    public setShippingDate_args(
12046
      long transactionId,
12047
      long shippingId,
12048
      long timestamp)
12049
    {
12050
      this();
12051
      this.transactionId = transactionId;
12052
      setTransactionIdIsSet(true);
12053
      this.shippingId = shippingId;
12054
      setShippingIdIsSet(true);
12055
      this.timestamp = timestamp;
12056
      setTimestampIsSet(true);
12057
    }
12058
 
12059
    /**
12060
     * Performs a deep copy on <i>other</i>.
12061
     */
12062
    public setShippingDate_args(setShippingDate_args other) {
12063
      __isset_bit_vector.clear();
12064
      __isset_bit_vector.or(other.__isset_bit_vector);
12065
      this.transactionId = other.transactionId;
12066
      this.shippingId = other.shippingId;
12067
      this.timestamp = other.timestamp;
12068
    }
12069
 
12070
    public setShippingDate_args deepCopy() {
12071
      return new setShippingDate_args(this);
12072
    }
12073
 
12074
    @Deprecated
12075
    public setShippingDate_args clone() {
12076
      return new setShippingDate_args(this);
12077
    }
12078
 
12079
    public long getTransactionId() {
12080
      return this.transactionId;
12081
    }
12082
 
12083
    public setShippingDate_args setTransactionId(long transactionId) {
12084
      this.transactionId = transactionId;
12085
      setTransactionIdIsSet(true);
12086
      return this;
12087
    }
12088
 
12089
    public void unsetTransactionId() {
12090
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
12091
    }
12092
 
12093
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
12094
    public boolean isSetTransactionId() {
12095
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
12096
    }
12097
 
12098
    public void setTransactionIdIsSet(boolean value) {
12099
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
12100
    }
12101
 
12102
    public long getShippingId() {
12103
      return this.shippingId;
12104
    }
12105
 
12106
    public setShippingDate_args setShippingId(long shippingId) {
12107
      this.shippingId = shippingId;
12108
      setShippingIdIsSet(true);
12109
      return this;
12110
    }
12111
 
12112
    public void unsetShippingId() {
12113
      __isset_bit_vector.clear(__SHIPPINGID_ISSET_ID);
12114
    }
12115
 
12116
    /** Returns true if field shippingId is set (has been asigned a value) and false otherwise */
12117
    public boolean isSetShippingId() {
12118
      return __isset_bit_vector.get(__SHIPPINGID_ISSET_ID);
12119
    }
12120
 
12121
    public void setShippingIdIsSet(boolean value) {
12122
      __isset_bit_vector.set(__SHIPPINGID_ISSET_ID, value);
12123
    }
12124
 
12125
    public long getTimestamp() {
12126
      return this.timestamp;
12127
    }
12128
 
12129
    public setShippingDate_args setTimestamp(long timestamp) {
12130
      this.timestamp = timestamp;
12131
      setTimestampIsSet(true);
12132
      return this;
12133
    }
12134
 
12135
    public void unsetTimestamp() {
12136
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
12137
    }
12138
 
12139
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
12140
    public boolean isSetTimestamp() {
12141
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
12142
    }
12143
 
12144
    public void setTimestampIsSet(boolean value) {
12145
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
12146
    }
12147
 
12148
    public void setFieldValue(_Fields field, Object value) {
12149
      switch (field) {
12150
      case TRANSACTION_ID:
12151
        if (value == null) {
12152
          unsetTransactionId();
12153
        } else {
12154
          setTransactionId((Long)value);
12155
        }
12156
        break;
12157
 
12158
      case SHIPPING_ID:
12159
        if (value == null) {
12160
          unsetShippingId();
12161
        } else {
12162
          setShippingId((Long)value);
12163
        }
12164
        break;
12165
 
12166
      case TIMESTAMP:
12167
        if (value == null) {
12168
          unsetTimestamp();
12169
        } else {
12170
          setTimestamp((Long)value);
12171
        }
12172
        break;
12173
 
12174
      }
12175
    }
12176
 
12177
    public void setFieldValue(int fieldID, Object value) {
12178
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12179
    }
12180
 
12181
    public Object getFieldValue(_Fields field) {
12182
      switch (field) {
12183
      case TRANSACTION_ID:
12184
        return new Long(getTransactionId());
12185
 
12186
      case SHIPPING_ID:
12187
        return new Long(getShippingId());
12188
 
12189
      case TIMESTAMP:
12190
        return new Long(getTimestamp());
12191
 
12192
      }
12193
      throw new IllegalStateException();
12194
    }
12195
 
12196
    public Object getFieldValue(int fieldId) {
12197
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12198
    }
12199
 
12200
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12201
    public boolean isSet(_Fields field) {
12202
      switch (field) {
12203
      case TRANSACTION_ID:
12204
        return isSetTransactionId();
12205
      case SHIPPING_ID:
12206
        return isSetShippingId();
12207
      case TIMESTAMP:
12208
        return isSetTimestamp();
12209
      }
12210
      throw new IllegalStateException();
12211
    }
12212
 
12213
    public boolean isSet(int fieldID) {
12214
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12215
    }
12216
 
12217
    @Override
12218
    public boolean equals(Object that) {
12219
      if (that == null)
12220
        return false;
12221
      if (that instanceof setShippingDate_args)
12222
        return this.equals((setShippingDate_args)that);
12223
      return false;
12224
    }
12225
 
12226
    public boolean equals(setShippingDate_args that) {
12227
      if (that == null)
12228
        return false;
12229
 
12230
      boolean this_present_transactionId = true;
12231
      boolean that_present_transactionId = true;
12232
      if (this_present_transactionId || that_present_transactionId) {
12233
        if (!(this_present_transactionId && that_present_transactionId))
12234
          return false;
12235
        if (this.transactionId != that.transactionId)
12236
          return false;
12237
      }
12238
 
12239
      boolean this_present_shippingId = true;
12240
      boolean that_present_shippingId = true;
12241
      if (this_present_shippingId || that_present_shippingId) {
12242
        if (!(this_present_shippingId && that_present_shippingId))
12243
          return false;
12244
        if (this.shippingId != that.shippingId)
12245
          return false;
12246
      }
12247
 
12248
      boolean this_present_timestamp = true;
12249
      boolean that_present_timestamp = true;
12250
      if (this_present_timestamp || that_present_timestamp) {
12251
        if (!(this_present_timestamp && that_present_timestamp))
12252
          return false;
12253
        if (this.timestamp != that.timestamp)
12254
          return false;
12255
      }
12256
 
12257
      return true;
12258
    }
12259
 
12260
    @Override
12261
    public int hashCode() {
12262
      return 0;
12263
    }
12264
 
12265
    public int compareTo(setShippingDate_args other) {
12266
      if (!getClass().equals(other.getClass())) {
12267
        return getClass().getName().compareTo(other.getClass().getName());
12268
      }
12269
 
12270
      int lastComparison = 0;
12271
      setShippingDate_args typedOther = (setShippingDate_args)other;
12272
 
12273
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
12274
      if (lastComparison != 0) {
12275
        return lastComparison;
12276
      }
12277
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
12278
      if (lastComparison != 0) {
12279
        return lastComparison;
12280
      }
12281
      lastComparison = Boolean.valueOf(isSetShippingId()).compareTo(isSetShippingId());
12282
      if (lastComparison != 0) {
12283
        return lastComparison;
12284
      }
12285
      lastComparison = TBaseHelper.compareTo(shippingId, typedOther.shippingId);
12286
      if (lastComparison != 0) {
12287
        return lastComparison;
12288
      }
12289
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
12290
      if (lastComparison != 0) {
12291
        return lastComparison;
12292
      }
12293
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
12294
      if (lastComparison != 0) {
12295
        return lastComparison;
12296
      }
12297
      return 0;
12298
    }
12299
 
12300
    public void read(TProtocol iprot) throws TException {
12301
      TField field;
12302
      iprot.readStructBegin();
12303
      while (true)
12304
      {
12305
        field = iprot.readFieldBegin();
12306
        if (field.type == TType.STOP) { 
12307
          break;
12308
        }
12309
        _Fields fieldId = _Fields.findByThriftId(field.id);
12310
        if (fieldId == null) {
12311
          TProtocolUtil.skip(iprot, field.type);
12312
        } else {
12313
          switch (fieldId) {
12314
            case TRANSACTION_ID:
12315
              if (field.type == TType.I64) {
12316
                this.transactionId = iprot.readI64();
12317
                setTransactionIdIsSet(true);
12318
              } else { 
12319
                TProtocolUtil.skip(iprot, field.type);
12320
              }
12321
              break;
12322
            case SHIPPING_ID:
12323
              if (field.type == TType.I64) {
12324
                this.shippingId = iprot.readI64();
12325
                setShippingIdIsSet(true);
12326
              } else { 
12327
                TProtocolUtil.skip(iprot, field.type);
12328
              }
12329
              break;
12330
            case TIMESTAMP:
12331
              if (field.type == TType.I64) {
12332
                this.timestamp = iprot.readI64();
12333
                setTimestampIsSet(true);
12334
              } else { 
12335
                TProtocolUtil.skip(iprot, field.type);
12336
              }
12337
              break;
12338
          }
12339
          iprot.readFieldEnd();
12340
        }
12341
      }
12342
      iprot.readStructEnd();
12343
      validate();
12344
    }
12345
 
12346
    public void write(TProtocol oprot) throws TException {
12347
      validate();
12348
 
12349
      oprot.writeStructBegin(STRUCT_DESC);
12350
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
12351
      oprot.writeI64(this.transactionId);
12352
      oprot.writeFieldEnd();
12353
      oprot.writeFieldBegin(SHIPPING_ID_FIELD_DESC);
12354
      oprot.writeI64(this.shippingId);
12355
      oprot.writeFieldEnd();
12356
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
12357
      oprot.writeI64(this.timestamp);
12358
      oprot.writeFieldEnd();
12359
      oprot.writeFieldStop();
12360
      oprot.writeStructEnd();
12361
    }
12362
 
12363
    @Override
12364
    public String toString() {
12365
      StringBuilder sb = new StringBuilder("setShippingDate_args(");
12366
      boolean first = true;
12367
 
12368
      sb.append("transactionId:");
12369
      sb.append(this.transactionId);
12370
      first = false;
12371
      if (!first) sb.append(", ");
12372
      sb.append("shippingId:");
12373
      sb.append(this.shippingId);
12374
      first = false;
12375
      if (!first) sb.append(", ");
12376
      sb.append("timestamp:");
12377
      sb.append(this.timestamp);
12378
      first = false;
12379
      sb.append(")");
12380
      return sb.toString();
12381
    }
12382
 
12383
    public void validate() throws TException {
12384
      // check for required fields
12385
    }
12386
 
12387
  }
12388
 
12389
  public static class setShippingDate_result implements TBase<setShippingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<setShippingDate_result>   {
12390
    private static final TStruct STRUCT_DESC = new TStruct("setShippingDate_result");
12391
 
12392
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12393
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12394
 
12395
    private boolean success;
12396
    private TransactionServiceException ex;
12397
 
12398
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12399
    public enum _Fields implements TFieldIdEnum {
12400
      SUCCESS((short)0, "success"),
12401
      EX((short)1, "ex");
12402
 
12403
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12404
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12405
 
12406
      static {
12407
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12408
          byId.put((int)field._thriftId, field);
12409
          byName.put(field.getFieldName(), field);
12410
        }
12411
      }
12412
 
12413
      /**
12414
       * Find the _Fields constant that matches fieldId, or null if its not found.
12415
       */
12416
      public static _Fields findByThriftId(int fieldId) {
12417
        return byId.get(fieldId);
12418
      }
12419
 
12420
      /**
12421
       * Find the _Fields constant that matches fieldId, throwing an exception
12422
       * if it is not found.
12423
       */
12424
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12425
        _Fields fields = findByThriftId(fieldId);
12426
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12427
        return fields;
12428
      }
12429
 
12430
      /**
12431
       * Find the _Fields constant that matches name, or null if its not found.
12432
       */
12433
      public static _Fields findByName(String name) {
12434
        return byName.get(name);
12435
      }
12436
 
12437
      private final short _thriftId;
12438
      private final String _fieldName;
12439
 
12440
      _Fields(short thriftId, String fieldName) {
12441
        _thriftId = thriftId;
12442
        _fieldName = fieldName;
12443
      }
12444
 
12445
      public short getThriftFieldId() {
12446
        return _thriftId;
12447
      }
12448
 
12449
      public String getFieldName() {
12450
        return _fieldName;
12451
      }
12452
    }
12453
 
12454
    // isset id assignments
12455
    private static final int __SUCCESS_ISSET_ID = 0;
12456
    private BitSet __isset_bit_vector = new BitSet(1);
12457
 
12458
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12459
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12460
          new FieldValueMetaData(TType.BOOL)));
12461
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12462
          new FieldValueMetaData(TType.STRUCT)));
12463
    }});
12464
 
12465
    static {
12466
      FieldMetaData.addStructMetaDataMap(setShippingDate_result.class, metaDataMap);
12467
    }
12468
 
12469
    public setShippingDate_result() {
12470
    }
12471
 
12472
    public setShippingDate_result(
12473
      boolean success,
12474
      TransactionServiceException ex)
12475
    {
12476
      this();
12477
      this.success = success;
12478
      setSuccessIsSet(true);
12479
      this.ex = ex;
12480
    }
12481
 
12482
    /**
12483
     * Performs a deep copy on <i>other</i>.
12484
     */
12485
    public setShippingDate_result(setShippingDate_result other) {
12486
      __isset_bit_vector.clear();
12487
      __isset_bit_vector.or(other.__isset_bit_vector);
12488
      this.success = other.success;
12489
      if (other.isSetEx()) {
12490
        this.ex = new TransactionServiceException(other.ex);
12491
      }
12492
    }
12493
 
12494
    public setShippingDate_result deepCopy() {
12495
      return new setShippingDate_result(this);
12496
    }
12497
 
12498
    @Deprecated
12499
    public setShippingDate_result clone() {
12500
      return new setShippingDate_result(this);
12501
    }
12502
 
12503
    public boolean isSuccess() {
12504
      return this.success;
12505
    }
12506
 
12507
    public setShippingDate_result setSuccess(boolean success) {
12508
      this.success = success;
12509
      setSuccessIsSet(true);
12510
      return this;
12511
    }
12512
 
12513
    public void unsetSuccess() {
12514
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12515
    }
12516
 
12517
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12518
    public boolean isSetSuccess() {
12519
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12520
    }
12521
 
12522
    public void setSuccessIsSet(boolean value) {
12523
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12524
    }
12525
 
12526
    public TransactionServiceException getEx() {
12527
      return this.ex;
12528
    }
12529
 
12530
    public setShippingDate_result setEx(TransactionServiceException ex) {
12531
      this.ex = ex;
12532
      return this;
12533
    }
12534
 
12535
    public void unsetEx() {
12536
      this.ex = null;
12537
    }
12538
 
12539
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12540
    public boolean isSetEx() {
12541
      return this.ex != null;
12542
    }
12543
 
12544
    public void setExIsSet(boolean value) {
12545
      if (!value) {
12546
        this.ex = null;
12547
      }
12548
    }
12549
 
12550
    public void setFieldValue(_Fields field, Object value) {
12551
      switch (field) {
12552
      case SUCCESS:
12553
        if (value == null) {
12554
          unsetSuccess();
12555
        } else {
12556
          setSuccess((Boolean)value);
12557
        }
12558
        break;
12559
 
12560
      case EX:
12561
        if (value == null) {
12562
          unsetEx();
12563
        } else {
12564
          setEx((TransactionServiceException)value);
12565
        }
12566
        break;
12567
 
12568
      }
12569
    }
12570
 
12571
    public void setFieldValue(int fieldID, Object value) {
12572
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12573
    }
12574
 
12575
    public Object getFieldValue(_Fields field) {
12576
      switch (field) {
12577
      case SUCCESS:
12578
        return new Boolean(isSuccess());
12579
 
12580
      case EX:
12581
        return getEx();
12582
 
12583
      }
12584
      throw new IllegalStateException();
12585
    }
12586
 
12587
    public Object getFieldValue(int fieldId) {
12588
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12589
    }
12590
 
12591
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12592
    public boolean isSet(_Fields field) {
12593
      switch (field) {
12594
      case SUCCESS:
12595
        return isSetSuccess();
12596
      case EX:
12597
        return isSetEx();
12598
      }
12599
      throw new IllegalStateException();
12600
    }
12601
 
12602
    public boolean isSet(int fieldID) {
12603
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12604
    }
12605
 
12606
    @Override
12607
    public boolean equals(Object that) {
12608
      if (that == null)
12609
        return false;
12610
      if (that instanceof setShippingDate_result)
12611
        return this.equals((setShippingDate_result)that);
12612
      return false;
12613
    }
12614
 
12615
    public boolean equals(setShippingDate_result that) {
12616
      if (that == null)
12617
        return false;
12618
 
12619
      boolean this_present_success = true;
12620
      boolean that_present_success = true;
12621
      if (this_present_success || that_present_success) {
12622
        if (!(this_present_success && that_present_success))
12623
          return false;
12624
        if (this.success != that.success)
12625
          return false;
12626
      }
12627
 
12628
      boolean this_present_ex = true && this.isSetEx();
12629
      boolean that_present_ex = true && that.isSetEx();
12630
      if (this_present_ex || that_present_ex) {
12631
        if (!(this_present_ex && that_present_ex))
12632
          return false;
12633
        if (!this.ex.equals(that.ex))
12634
          return false;
12635
      }
12636
 
12637
      return true;
12638
    }
12639
 
12640
    @Override
12641
    public int hashCode() {
12642
      return 0;
12643
    }
12644
 
12645
    public int compareTo(setShippingDate_result other) {
12646
      if (!getClass().equals(other.getClass())) {
12647
        return getClass().getName().compareTo(other.getClass().getName());
12648
      }
12649
 
12650
      int lastComparison = 0;
12651
      setShippingDate_result typedOther = (setShippingDate_result)other;
12652
 
12653
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12654
      if (lastComparison != 0) {
12655
        return lastComparison;
12656
      }
12657
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12658
      if (lastComparison != 0) {
12659
        return lastComparison;
12660
      }
12661
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12662
      if (lastComparison != 0) {
12663
        return lastComparison;
12664
      }
12665
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12666
      if (lastComparison != 0) {
12667
        return lastComparison;
12668
      }
12669
      return 0;
12670
    }
12671
 
12672
    public void read(TProtocol iprot) throws TException {
12673
      TField field;
12674
      iprot.readStructBegin();
12675
      while (true)
12676
      {
12677
        field = iprot.readFieldBegin();
12678
        if (field.type == TType.STOP) { 
12679
          break;
12680
        }
12681
        _Fields fieldId = _Fields.findByThriftId(field.id);
12682
        if (fieldId == null) {
12683
          TProtocolUtil.skip(iprot, field.type);
12684
        } else {
12685
          switch (fieldId) {
12686
            case SUCCESS:
12687
              if (field.type == TType.BOOL) {
12688
                this.success = iprot.readBool();
12689
                setSuccessIsSet(true);
12690
              } else { 
12691
                TProtocolUtil.skip(iprot, field.type);
12692
              }
12693
              break;
12694
            case EX:
12695
              if (field.type == TType.STRUCT) {
12696
                this.ex = new TransactionServiceException();
12697
                this.ex.read(iprot);
12698
              } else { 
12699
                TProtocolUtil.skip(iprot, field.type);
12700
              }
12701
              break;
12702
          }
12703
          iprot.readFieldEnd();
12704
        }
12705
      }
12706
      iprot.readStructEnd();
12707
      validate();
12708
    }
12709
 
12710
    public void write(TProtocol oprot) throws TException {
12711
      oprot.writeStructBegin(STRUCT_DESC);
12712
 
12713
      if (this.isSetSuccess()) {
12714
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12715
        oprot.writeBool(this.success);
12716
        oprot.writeFieldEnd();
12717
      } else if (this.isSetEx()) {
12718
        oprot.writeFieldBegin(EX_FIELD_DESC);
12719
        this.ex.write(oprot);
12720
        oprot.writeFieldEnd();
12721
      }
12722
      oprot.writeFieldStop();
12723
      oprot.writeStructEnd();
12724
    }
12725
 
12726
    @Override
12727
    public String toString() {
12728
      StringBuilder sb = new StringBuilder("setShippingDate_result(");
12729
      boolean first = true;
12730
 
12731
      sb.append("success:");
12732
      sb.append(this.success);
12733
      first = false;
12734
      if (!first) sb.append(", ");
12735
      sb.append("ex:");
12736
      if (this.ex == null) {
12737
        sb.append("null");
12738
      } else {
12739
        sb.append(this.ex);
12740
      }
12741
      first = false;
12742
      sb.append(")");
12743
      return sb.toString();
12744
    }
12745
 
12746
    public void validate() throws TException {
12747
      // check for required fields
12748
    }
12749
 
12750
  }
12751
 
12752
  public static class setDeliveryDate_args implements TBase<setDeliveryDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<setDeliveryDate_args>   {
12753
    private static final TStruct STRUCT_DESC = new TStruct("setDeliveryDate_args");
12754
 
12755
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
12756
    private static final TField SHIPPINGID_FIELD_DESC = new TField("shippingid", TType.I64, (short)2);
12757
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)3);
12758
 
12759
    private long transactionId;
12760
    private long shippingid;
12761
    private long timestamp;
12762
 
12763
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12764
    public enum _Fields implements TFieldIdEnum {
12765
      TRANSACTION_ID((short)1, "transactionId"),
12766
      SHIPPINGID((short)2, "shippingid"),
12767
      TIMESTAMP((short)3, "timestamp");
12768
 
12769
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12770
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12771
 
12772
      static {
12773
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12774
          byId.put((int)field._thriftId, field);
12775
          byName.put(field.getFieldName(), field);
12776
        }
12777
      }
12778
 
12779
      /**
12780
       * Find the _Fields constant that matches fieldId, or null if its not found.
12781
       */
12782
      public static _Fields findByThriftId(int fieldId) {
12783
        return byId.get(fieldId);
12784
      }
12785
 
12786
      /**
12787
       * Find the _Fields constant that matches fieldId, throwing an exception
12788
       * if it is not found.
12789
       */
12790
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12791
        _Fields fields = findByThriftId(fieldId);
12792
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12793
        return fields;
12794
      }
12795
 
12796
      /**
12797
       * Find the _Fields constant that matches name, or null if its not found.
12798
       */
12799
      public static _Fields findByName(String name) {
12800
        return byName.get(name);
12801
      }
12802
 
12803
      private final short _thriftId;
12804
      private final String _fieldName;
12805
 
12806
      _Fields(short thriftId, String fieldName) {
12807
        _thriftId = thriftId;
12808
        _fieldName = fieldName;
12809
      }
12810
 
12811
      public short getThriftFieldId() {
12812
        return _thriftId;
12813
      }
12814
 
12815
      public String getFieldName() {
12816
        return _fieldName;
12817
      }
12818
    }
12819
 
12820
    // isset id assignments
12821
    private static final int __TRANSACTIONID_ISSET_ID = 0;
12822
    private static final int __SHIPPINGID_ISSET_ID = 1;
12823
    private static final int __TIMESTAMP_ISSET_ID = 2;
12824
    private BitSet __isset_bit_vector = new BitSet(3);
12825
 
12826
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12827
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
12828
          new FieldValueMetaData(TType.I64)));
12829
      put(_Fields.SHIPPINGID, new FieldMetaData("shippingid", TFieldRequirementType.DEFAULT, 
12830
          new FieldValueMetaData(TType.I64)));
12831
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
12832
          new FieldValueMetaData(TType.I64)));
12833
    }});
12834
 
12835
    static {
12836
      FieldMetaData.addStructMetaDataMap(setDeliveryDate_args.class, metaDataMap);
12837
    }
12838
 
12839
    public setDeliveryDate_args() {
12840
    }
12841
 
12842
    public setDeliveryDate_args(
12843
      long transactionId,
12844
      long shippingid,
12845
      long timestamp)
12846
    {
12847
      this();
12848
      this.transactionId = transactionId;
12849
      setTransactionIdIsSet(true);
12850
      this.shippingid = shippingid;
12851
      setShippingidIsSet(true);
12852
      this.timestamp = timestamp;
12853
      setTimestampIsSet(true);
12854
    }
12855
 
12856
    /**
12857
     * Performs a deep copy on <i>other</i>.
12858
     */
12859
    public setDeliveryDate_args(setDeliveryDate_args other) {
12860
      __isset_bit_vector.clear();
12861
      __isset_bit_vector.or(other.__isset_bit_vector);
12862
      this.transactionId = other.transactionId;
12863
      this.shippingid = other.shippingid;
12864
      this.timestamp = other.timestamp;
12865
    }
12866
 
12867
    public setDeliveryDate_args deepCopy() {
12868
      return new setDeliveryDate_args(this);
12869
    }
12870
 
12871
    @Deprecated
12872
    public setDeliveryDate_args clone() {
12873
      return new setDeliveryDate_args(this);
12874
    }
12875
 
12876
    public long getTransactionId() {
12877
      return this.transactionId;
12878
    }
12879
 
12880
    public setDeliveryDate_args setTransactionId(long transactionId) {
12881
      this.transactionId = transactionId;
12882
      setTransactionIdIsSet(true);
12883
      return this;
12884
    }
12885
 
12886
    public void unsetTransactionId() {
12887
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
12888
    }
12889
 
12890
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
12891
    public boolean isSetTransactionId() {
12892
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
12893
    }
12894
 
12895
    public void setTransactionIdIsSet(boolean value) {
12896
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
12897
    }
12898
 
12899
    public long getShippingid() {
12900
      return this.shippingid;
12901
    }
12902
 
12903
    public setDeliveryDate_args setShippingid(long shippingid) {
12904
      this.shippingid = shippingid;
12905
      setShippingidIsSet(true);
12906
      return this;
12907
    }
12908
 
12909
    public void unsetShippingid() {
12910
      __isset_bit_vector.clear(__SHIPPINGID_ISSET_ID);
12911
    }
12912
 
12913
    /** Returns true if field shippingid is set (has been asigned a value) and false otherwise */
12914
    public boolean isSetShippingid() {
12915
      return __isset_bit_vector.get(__SHIPPINGID_ISSET_ID);
12916
    }
12917
 
12918
    public void setShippingidIsSet(boolean value) {
12919
      __isset_bit_vector.set(__SHIPPINGID_ISSET_ID, value);
12920
    }
12921
 
12922
    public long getTimestamp() {
12923
      return this.timestamp;
12924
    }
12925
 
12926
    public setDeliveryDate_args setTimestamp(long timestamp) {
12927
      this.timestamp = timestamp;
12928
      setTimestampIsSet(true);
12929
      return this;
12930
    }
12931
 
12932
    public void unsetTimestamp() {
12933
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
12934
    }
12935
 
12936
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
12937
    public boolean isSetTimestamp() {
12938
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
12939
    }
12940
 
12941
    public void setTimestampIsSet(boolean value) {
12942
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
12943
    }
12944
 
12945
    public void setFieldValue(_Fields field, Object value) {
12946
      switch (field) {
12947
      case TRANSACTION_ID:
12948
        if (value == null) {
12949
          unsetTransactionId();
12950
        } else {
12951
          setTransactionId((Long)value);
12952
        }
12953
        break;
12954
 
12955
      case SHIPPINGID:
12956
        if (value == null) {
12957
          unsetShippingid();
12958
        } else {
12959
          setShippingid((Long)value);
12960
        }
12961
        break;
12962
 
12963
      case TIMESTAMP:
12964
        if (value == null) {
12965
          unsetTimestamp();
12966
        } else {
12967
          setTimestamp((Long)value);
12968
        }
12969
        break;
12970
 
12971
      }
12972
    }
12973
 
12974
    public void setFieldValue(int fieldID, Object value) {
12975
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12976
    }
12977
 
12978
    public Object getFieldValue(_Fields field) {
12979
      switch (field) {
12980
      case TRANSACTION_ID:
12981
        return new Long(getTransactionId());
12982
 
12983
      case SHIPPINGID:
12984
        return new Long(getShippingid());
12985
 
12986
      case TIMESTAMP:
12987
        return new Long(getTimestamp());
12988
 
12989
      }
12990
      throw new IllegalStateException();
12991
    }
12992
 
12993
    public Object getFieldValue(int fieldId) {
12994
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12995
    }
12996
 
12997
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12998
    public boolean isSet(_Fields field) {
12999
      switch (field) {
13000
      case TRANSACTION_ID:
13001
        return isSetTransactionId();
13002
      case SHIPPINGID:
13003
        return isSetShippingid();
13004
      case TIMESTAMP:
13005
        return isSetTimestamp();
13006
      }
13007
      throw new IllegalStateException();
13008
    }
13009
 
13010
    public boolean isSet(int fieldID) {
13011
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13012
    }
13013
 
13014
    @Override
13015
    public boolean equals(Object that) {
13016
      if (that == null)
13017
        return false;
13018
      if (that instanceof setDeliveryDate_args)
13019
        return this.equals((setDeliveryDate_args)that);
13020
      return false;
13021
    }
13022
 
13023
    public boolean equals(setDeliveryDate_args that) {
13024
      if (that == null)
13025
        return false;
13026
 
13027
      boolean this_present_transactionId = true;
13028
      boolean that_present_transactionId = true;
13029
      if (this_present_transactionId || that_present_transactionId) {
13030
        if (!(this_present_transactionId && that_present_transactionId))
13031
          return false;
13032
        if (this.transactionId != that.transactionId)
13033
          return false;
13034
      }
13035
 
13036
      boolean this_present_shippingid = true;
13037
      boolean that_present_shippingid = true;
13038
      if (this_present_shippingid || that_present_shippingid) {
13039
        if (!(this_present_shippingid && that_present_shippingid))
13040
          return false;
13041
        if (this.shippingid != that.shippingid)
13042
          return false;
13043
      }
13044
 
13045
      boolean this_present_timestamp = true;
13046
      boolean that_present_timestamp = true;
13047
      if (this_present_timestamp || that_present_timestamp) {
13048
        if (!(this_present_timestamp && that_present_timestamp))
13049
          return false;
13050
        if (this.timestamp != that.timestamp)
13051
          return false;
13052
      }
13053
 
13054
      return true;
13055
    }
13056
 
13057
    @Override
13058
    public int hashCode() {
13059
      return 0;
13060
    }
13061
 
13062
    public int compareTo(setDeliveryDate_args other) {
13063
      if (!getClass().equals(other.getClass())) {
13064
        return getClass().getName().compareTo(other.getClass().getName());
13065
      }
13066
 
13067
      int lastComparison = 0;
13068
      setDeliveryDate_args typedOther = (setDeliveryDate_args)other;
13069
 
13070
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
13071
      if (lastComparison != 0) {
13072
        return lastComparison;
13073
      }
13074
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
13075
      if (lastComparison != 0) {
13076
        return lastComparison;
13077
      }
13078
      lastComparison = Boolean.valueOf(isSetShippingid()).compareTo(isSetShippingid());
13079
      if (lastComparison != 0) {
13080
        return lastComparison;
13081
      }
13082
      lastComparison = TBaseHelper.compareTo(shippingid, typedOther.shippingid);
13083
      if (lastComparison != 0) {
13084
        return lastComparison;
13085
      }
13086
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
13087
      if (lastComparison != 0) {
13088
        return lastComparison;
13089
      }
13090
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
13091
      if (lastComparison != 0) {
13092
        return lastComparison;
13093
      }
13094
      return 0;
13095
    }
13096
 
13097
    public void read(TProtocol iprot) throws TException {
13098
      TField field;
13099
      iprot.readStructBegin();
13100
      while (true)
13101
      {
13102
        field = iprot.readFieldBegin();
13103
        if (field.type == TType.STOP) { 
13104
          break;
13105
        }
13106
        _Fields fieldId = _Fields.findByThriftId(field.id);
13107
        if (fieldId == null) {
13108
          TProtocolUtil.skip(iprot, field.type);
13109
        } else {
13110
          switch (fieldId) {
13111
            case TRANSACTION_ID:
13112
              if (field.type == TType.I64) {
13113
                this.transactionId = iprot.readI64();
13114
                setTransactionIdIsSet(true);
13115
              } else { 
13116
                TProtocolUtil.skip(iprot, field.type);
13117
              }
13118
              break;
13119
            case SHIPPINGID:
13120
              if (field.type == TType.I64) {
13121
                this.shippingid = iprot.readI64();
13122
                setShippingidIsSet(true);
13123
              } else { 
13124
                TProtocolUtil.skip(iprot, field.type);
13125
              }
13126
              break;
13127
            case TIMESTAMP:
13128
              if (field.type == TType.I64) {
13129
                this.timestamp = iprot.readI64();
13130
                setTimestampIsSet(true);
13131
              } else { 
13132
                TProtocolUtil.skip(iprot, field.type);
13133
              }
13134
              break;
13135
          }
13136
          iprot.readFieldEnd();
13137
        }
13138
      }
13139
      iprot.readStructEnd();
13140
      validate();
13141
    }
13142
 
13143
    public void write(TProtocol oprot) throws TException {
13144
      validate();
13145
 
13146
      oprot.writeStructBegin(STRUCT_DESC);
13147
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
13148
      oprot.writeI64(this.transactionId);
13149
      oprot.writeFieldEnd();
13150
      oprot.writeFieldBegin(SHIPPINGID_FIELD_DESC);
13151
      oprot.writeI64(this.shippingid);
13152
      oprot.writeFieldEnd();
13153
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
13154
      oprot.writeI64(this.timestamp);
13155
      oprot.writeFieldEnd();
13156
      oprot.writeFieldStop();
13157
      oprot.writeStructEnd();
13158
    }
13159
 
13160
    @Override
13161
    public String toString() {
13162
      StringBuilder sb = new StringBuilder("setDeliveryDate_args(");
13163
      boolean first = true;
13164
 
13165
      sb.append("transactionId:");
13166
      sb.append(this.transactionId);
13167
      first = false;
13168
      if (!first) sb.append(", ");
13169
      sb.append("shippingid:");
13170
      sb.append(this.shippingid);
13171
      first = false;
13172
      if (!first) sb.append(", ");
13173
      sb.append("timestamp:");
13174
      sb.append(this.timestamp);
13175
      first = false;
13176
      sb.append(")");
13177
      return sb.toString();
13178
    }
13179
 
13180
    public void validate() throws TException {
13181
      // check for required fields
13182
    }
13183
 
13184
  }
13185
 
13186
  public static class setDeliveryDate_result implements TBase<setDeliveryDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<setDeliveryDate_result>   {
13187
    private static final TStruct STRUCT_DESC = new TStruct("setDeliveryDate_result");
13188
 
13189
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13190
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13191
 
13192
    private boolean success;
13193
    private TransactionServiceException ex;
13194
 
13195
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13196
    public enum _Fields implements TFieldIdEnum {
13197
      SUCCESS((short)0, "success"),
13198
      EX((short)1, "ex");
13199
 
13200
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13201
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13202
 
13203
      static {
13204
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13205
          byId.put((int)field._thriftId, field);
13206
          byName.put(field.getFieldName(), field);
13207
        }
13208
      }
13209
 
13210
      /**
13211
       * Find the _Fields constant that matches fieldId, or null if its not found.
13212
       */
13213
      public static _Fields findByThriftId(int fieldId) {
13214
        return byId.get(fieldId);
13215
      }
13216
 
13217
      /**
13218
       * Find the _Fields constant that matches fieldId, throwing an exception
13219
       * if it is not found.
13220
       */
13221
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13222
        _Fields fields = findByThriftId(fieldId);
13223
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13224
        return fields;
13225
      }
13226
 
13227
      /**
13228
       * Find the _Fields constant that matches name, or null if its not found.
13229
       */
13230
      public static _Fields findByName(String name) {
13231
        return byName.get(name);
13232
      }
13233
 
13234
      private final short _thriftId;
13235
      private final String _fieldName;
13236
 
13237
      _Fields(short thriftId, String fieldName) {
13238
        _thriftId = thriftId;
13239
        _fieldName = fieldName;
13240
      }
13241
 
13242
      public short getThriftFieldId() {
13243
        return _thriftId;
13244
      }
13245
 
13246
      public String getFieldName() {
13247
        return _fieldName;
13248
      }
13249
    }
13250
 
13251
    // isset id assignments
13252
    private static final int __SUCCESS_ISSET_ID = 0;
13253
    private BitSet __isset_bit_vector = new BitSet(1);
13254
 
13255
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13256
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13257
          new FieldValueMetaData(TType.BOOL)));
13258
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13259
          new FieldValueMetaData(TType.STRUCT)));
13260
    }});
13261
 
13262
    static {
13263
      FieldMetaData.addStructMetaDataMap(setDeliveryDate_result.class, metaDataMap);
13264
    }
13265
 
13266
    public setDeliveryDate_result() {
13267
    }
13268
 
13269
    public setDeliveryDate_result(
13270
      boolean success,
13271
      TransactionServiceException ex)
13272
    {
13273
      this();
13274
      this.success = success;
13275
      setSuccessIsSet(true);
13276
      this.ex = ex;
13277
    }
13278
 
13279
    /**
13280
     * Performs a deep copy on <i>other</i>.
13281
     */
13282
    public setDeliveryDate_result(setDeliveryDate_result other) {
13283
      __isset_bit_vector.clear();
13284
      __isset_bit_vector.or(other.__isset_bit_vector);
13285
      this.success = other.success;
13286
      if (other.isSetEx()) {
13287
        this.ex = new TransactionServiceException(other.ex);
13288
      }
13289
    }
13290
 
13291
    public setDeliveryDate_result deepCopy() {
13292
      return new setDeliveryDate_result(this);
13293
    }
13294
 
13295
    @Deprecated
13296
    public setDeliveryDate_result clone() {
13297
      return new setDeliveryDate_result(this);
13298
    }
13299
 
13300
    public boolean isSuccess() {
13301
      return this.success;
13302
    }
13303
 
13304
    public setDeliveryDate_result setSuccess(boolean success) {
13305
      this.success = success;
13306
      setSuccessIsSet(true);
13307
      return this;
13308
    }
13309
 
13310
    public void unsetSuccess() {
13311
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13312
    }
13313
 
13314
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13315
    public boolean isSetSuccess() {
13316
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13317
    }
13318
 
13319
    public void setSuccessIsSet(boolean value) {
13320
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13321
    }
13322
 
13323
    public TransactionServiceException getEx() {
13324
      return this.ex;
13325
    }
13326
 
13327
    public setDeliveryDate_result setEx(TransactionServiceException ex) {
13328
      this.ex = ex;
13329
      return this;
13330
    }
13331
 
13332
    public void unsetEx() {
13333
      this.ex = null;
13334
    }
13335
 
13336
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13337
    public boolean isSetEx() {
13338
      return this.ex != null;
13339
    }
13340
 
13341
    public void setExIsSet(boolean value) {
13342
      if (!value) {
13343
        this.ex = null;
13344
      }
13345
    }
13346
 
13347
    public void setFieldValue(_Fields field, Object value) {
13348
      switch (field) {
13349
      case SUCCESS:
13350
        if (value == null) {
13351
          unsetSuccess();
13352
        } else {
13353
          setSuccess((Boolean)value);
13354
        }
13355
        break;
13356
 
13357
      case EX:
13358
        if (value == null) {
13359
          unsetEx();
13360
        } else {
13361
          setEx((TransactionServiceException)value);
13362
        }
13363
        break;
13364
 
13365
      }
13366
    }
13367
 
13368
    public void setFieldValue(int fieldID, Object value) {
13369
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13370
    }
13371
 
13372
    public Object getFieldValue(_Fields field) {
13373
      switch (field) {
13374
      case SUCCESS:
13375
        return new Boolean(isSuccess());
13376
 
13377
      case EX:
13378
        return getEx();
13379
 
13380
      }
13381
      throw new IllegalStateException();
13382
    }
13383
 
13384
    public Object getFieldValue(int fieldId) {
13385
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13386
    }
13387
 
13388
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13389
    public boolean isSet(_Fields field) {
13390
      switch (field) {
13391
      case SUCCESS:
13392
        return isSetSuccess();
13393
      case EX:
13394
        return isSetEx();
13395
      }
13396
      throw new IllegalStateException();
13397
    }
13398
 
13399
    public boolean isSet(int fieldID) {
13400
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13401
    }
13402
 
13403
    @Override
13404
    public boolean equals(Object that) {
13405
      if (that == null)
13406
        return false;
13407
      if (that instanceof setDeliveryDate_result)
13408
        return this.equals((setDeliveryDate_result)that);
13409
      return false;
13410
    }
13411
 
13412
    public boolean equals(setDeliveryDate_result that) {
13413
      if (that == null)
13414
        return false;
13415
 
13416
      boolean this_present_success = true;
13417
      boolean that_present_success = true;
13418
      if (this_present_success || that_present_success) {
13419
        if (!(this_present_success && that_present_success))
13420
          return false;
13421
        if (this.success != that.success)
13422
          return false;
13423
      }
13424
 
13425
      boolean this_present_ex = true && this.isSetEx();
13426
      boolean that_present_ex = true && that.isSetEx();
13427
      if (this_present_ex || that_present_ex) {
13428
        if (!(this_present_ex && that_present_ex))
13429
          return false;
13430
        if (!this.ex.equals(that.ex))
13431
          return false;
13432
      }
13433
 
13434
      return true;
13435
    }
13436
 
13437
    @Override
13438
    public int hashCode() {
13439
      return 0;
13440
    }
13441
 
13442
    public int compareTo(setDeliveryDate_result other) {
13443
      if (!getClass().equals(other.getClass())) {
13444
        return getClass().getName().compareTo(other.getClass().getName());
13445
      }
13446
 
13447
      int lastComparison = 0;
13448
      setDeliveryDate_result typedOther = (setDeliveryDate_result)other;
13449
 
13450
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13451
      if (lastComparison != 0) {
13452
        return lastComparison;
13453
      }
13454
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13455
      if (lastComparison != 0) {
13456
        return lastComparison;
13457
      }
13458
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13459
      if (lastComparison != 0) {
13460
        return lastComparison;
13461
      }
13462
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13463
      if (lastComparison != 0) {
13464
        return lastComparison;
13465
      }
13466
      return 0;
13467
    }
13468
 
13469
    public void read(TProtocol iprot) throws TException {
13470
      TField field;
13471
      iprot.readStructBegin();
13472
      while (true)
13473
      {
13474
        field = iprot.readFieldBegin();
13475
        if (field.type == TType.STOP) { 
13476
          break;
13477
        }
13478
        _Fields fieldId = _Fields.findByThriftId(field.id);
13479
        if (fieldId == null) {
13480
          TProtocolUtil.skip(iprot, field.type);
13481
        } else {
13482
          switch (fieldId) {
13483
            case SUCCESS:
13484
              if (field.type == TType.BOOL) {
13485
                this.success = iprot.readBool();
13486
                setSuccessIsSet(true);
13487
              } else { 
13488
                TProtocolUtil.skip(iprot, field.type);
13489
              }
13490
              break;
13491
            case EX:
13492
              if (field.type == TType.STRUCT) {
13493
                this.ex = new TransactionServiceException();
13494
                this.ex.read(iprot);
13495
              } else { 
13496
                TProtocolUtil.skip(iprot, field.type);
13497
              }
13498
              break;
13499
          }
13500
          iprot.readFieldEnd();
13501
        }
13502
      }
13503
      iprot.readStructEnd();
13504
      validate();
13505
    }
13506
 
13507
    public void write(TProtocol oprot) throws TException {
13508
      oprot.writeStructBegin(STRUCT_DESC);
13509
 
13510
      if (this.isSetSuccess()) {
13511
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13512
        oprot.writeBool(this.success);
13513
        oprot.writeFieldEnd();
13514
      } else if (this.isSetEx()) {
13515
        oprot.writeFieldBegin(EX_FIELD_DESC);
13516
        this.ex.write(oprot);
13517
        oprot.writeFieldEnd();
13518
      }
13519
      oprot.writeFieldStop();
13520
      oprot.writeStructEnd();
13521
    }
13522
 
13523
    @Override
13524
    public String toString() {
13525
      StringBuilder sb = new StringBuilder("setDeliveryDate_result(");
13526
      boolean first = true;
13527
 
13528
      sb.append("success:");
13529
      sb.append(this.success);
13530
      first = false;
13531
      if (!first) sb.append(", ");
13532
      sb.append("ex:");
13533
      if (this.ex == null) {
13534
        sb.append("null");
13535
      } else {
13536
        sb.append(this.ex);
13537
      }
13538
      first = false;
13539
      sb.append(")");
13540
      return sb.toString();
13541
    }
13542
 
13543
    public void validate() throws TException {
13544
      // check for required fields
13545
    }
13546
 
13547
  }
13548
 
13549
  public static class changeShippingStatus_args implements TBase<changeShippingStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeShippingStatus_args>   {
13550
    private static final TStruct STRUCT_DESC = new TStruct("changeShippingStatus_args");
13551
 
13552
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
13553
    private static final TField SHIPPING_ID_FIELD_DESC = new TField("shippingId", TType.I64, (short)2);
13554
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
13555
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)4);
13556
 
13557
    private long transactionId;
13558
    private long shippingId;
13559
    private ShipmentStatus status;
13560
    private String description;
13561
 
13562
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13563
    public enum _Fields implements TFieldIdEnum {
13564
      TRANSACTION_ID((short)1, "transactionId"),
13565
      SHIPPING_ID((short)2, "shippingId"),
13566
      /**
13567
       * 
13568
       * @see ShipmentStatus
13569
       */
13570
      STATUS((short)3, "status"),
13571
      DESCRIPTION((short)4, "description");
13572
 
13573
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13574
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13575
 
13576
      static {
13577
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13578
          byId.put((int)field._thriftId, field);
13579
          byName.put(field.getFieldName(), field);
13580
        }
13581
      }
13582
 
13583
      /**
13584
       * Find the _Fields constant that matches fieldId, or null if its not found.
13585
       */
13586
      public static _Fields findByThriftId(int fieldId) {
13587
        return byId.get(fieldId);
13588
      }
13589
 
13590
      /**
13591
       * Find the _Fields constant that matches fieldId, throwing an exception
13592
       * if it is not found.
13593
       */
13594
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13595
        _Fields fields = findByThriftId(fieldId);
13596
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13597
        return fields;
13598
      }
13599
 
13600
      /**
13601
       * Find the _Fields constant that matches name, or null if its not found.
13602
       */
13603
      public static _Fields findByName(String name) {
13604
        return byName.get(name);
13605
      }
13606
 
13607
      private final short _thriftId;
13608
      private final String _fieldName;
13609
 
13610
      _Fields(short thriftId, String fieldName) {
13611
        _thriftId = thriftId;
13612
        _fieldName = fieldName;
13613
      }
13614
 
13615
      public short getThriftFieldId() {
13616
        return _thriftId;
13617
      }
13618
 
13619
      public String getFieldName() {
13620
        return _fieldName;
13621
      }
13622
    }
13623
 
13624
    // isset id assignments
13625
    private static final int __TRANSACTIONID_ISSET_ID = 0;
13626
    private static final int __SHIPPINGID_ISSET_ID = 1;
13627
    private BitSet __isset_bit_vector = new BitSet(2);
13628
 
13629
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13630
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
13631
          new FieldValueMetaData(TType.I64)));
13632
      put(_Fields.SHIPPING_ID, new FieldMetaData("shippingId", TFieldRequirementType.DEFAULT, 
13633
          new FieldValueMetaData(TType.I64)));
13634
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
13635
          new EnumMetaData(TType.ENUM, ShipmentStatus.class)));
13636
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
13637
          new FieldValueMetaData(TType.STRING)));
13638
    }});
13639
 
13640
    static {
13641
      FieldMetaData.addStructMetaDataMap(changeShippingStatus_args.class, metaDataMap);
13642
    }
13643
 
13644
    public changeShippingStatus_args() {
13645
    }
13646
 
13647
    public changeShippingStatus_args(
13648
      long transactionId,
13649
      long shippingId,
13650
      ShipmentStatus status,
13651
      String description)
13652
    {
13653
      this();
13654
      this.transactionId = transactionId;
13655
      setTransactionIdIsSet(true);
13656
      this.shippingId = shippingId;
13657
      setShippingIdIsSet(true);
13658
      this.status = status;
13659
      this.description = description;
13660
    }
13661
 
13662
    /**
13663
     * Performs a deep copy on <i>other</i>.
13664
     */
13665
    public changeShippingStatus_args(changeShippingStatus_args other) {
13666
      __isset_bit_vector.clear();
13667
      __isset_bit_vector.or(other.__isset_bit_vector);
13668
      this.transactionId = other.transactionId;
13669
      this.shippingId = other.shippingId;
13670
      if (other.isSetStatus()) {
13671
        this.status = other.status;
13672
      }
13673
      if (other.isSetDescription()) {
13674
        this.description = other.description;
13675
      }
13676
    }
13677
 
13678
    public changeShippingStatus_args deepCopy() {
13679
      return new changeShippingStatus_args(this);
13680
    }
13681
 
13682
    @Deprecated
13683
    public changeShippingStatus_args clone() {
13684
      return new changeShippingStatus_args(this);
13685
    }
13686
 
13687
    public long getTransactionId() {
13688
      return this.transactionId;
13689
    }
13690
 
13691
    public changeShippingStatus_args setTransactionId(long transactionId) {
13692
      this.transactionId = transactionId;
13693
      setTransactionIdIsSet(true);
13694
      return this;
13695
    }
13696
 
13697
    public void unsetTransactionId() {
13698
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
13699
    }
13700
 
13701
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
13702
    public boolean isSetTransactionId() {
13703
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
13704
    }
13705
 
13706
    public void setTransactionIdIsSet(boolean value) {
13707
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
13708
    }
13709
 
13710
    public long getShippingId() {
13711
      return this.shippingId;
13712
    }
13713
 
13714
    public changeShippingStatus_args setShippingId(long shippingId) {
13715
      this.shippingId = shippingId;
13716
      setShippingIdIsSet(true);
13717
      return this;
13718
    }
13719
 
13720
    public void unsetShippingId() {
13721
      __isset_bit_vector.clear(__SHIPPINGID_ISSET_ID);
13722
    }
13723
 
13724
    /** Returns true if field shippingId is set (has been asigned a value) and false otherwise */
13725
    public boolean isSetShippingId() {
13726
      return __isset_bit_vector.get(__SHIPPINGID_ISSET_ID);
13727
    }
13728
 
13729
    public void setShippingIdIsSet(boolean value) {
13730
      __isset_bit_vector.set(__SHIPPINGID_ISSET_ID, value);
13731
    }
13732
 
13733
    /**
13734
     * 
13735
     * @see ShipmentStatus
13736
     */
13737
    public ShipmentStatus getStatus() {
13738
      return this.status;
13739
    }
13740
 
13741
    /**
13742
     * 
13743
     * @see ShipmentStatus
13744
     */
13745
    public changeShippingStatus_args setStatus(ShipmentStatus status) {
13746
      this.status = status;
13747
      return this;
13748
    }
13749
 
13750
    public void unsetStatus() {
13751
      this.status = null;
13752
    }
13753
 
13754
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
13755
    public boolean isSetStatus() {
13756
      return this.status != null;
13757
    }
13758
 
13759
    public void setStatusIsSet(boolean value) {
13760
      if (!value) {
13761
        this.status = null;
13762
      }
13763
    }
13764
 
13765
    public String getDescription() {
13766
      return this.description;
13767
    }
13768
 
13769
    public changeShippingStatus_args setDescription(String description) {
13770
      this.description = description;
13771
      return this;
13772
    }
13773
 
13774
    public void unsetDescription() {
13775
      this.description = null;
13776
    }
13777
 
13778
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
13779
    public boolean isSetDescription() {
13780
      return this.description != null;
13781
    }
13782
 
13783
    public void setDescriptionIsSet(boolean value) {
13784
      if (!value) {
13785
        this.description = null;
13786
      }
13787
    }
13788
 
13789
    public void setFieldValue(_Fields field, Object value) {
13790
      switch (field) {
13791
      case TRANSACTION_ID:
13792
        if (value == null) {
13793
          unsetTransactionId();
13794
        } else {
13795
          setTransactionId((Long)value);
13796
        }
13797
        break;
13798
 
13799
      case SHIPPING_ID:
13800
        if (value == null) {
13801
          unsetShippingId();
13802
        } else {
13803
          setShippingId((Long)value);
13804
        }
13805
        break;
13806
 
13807
      case STATUS:
13808
        if (value == null) {
13809
          unsetStatus();
13810
        } else {
13811
          setStatus((ShipmentStatus)value);
13812
        }
13813
        break;
13814
 
13815
      case DESCRIPTION:
13816
        if (value == null) {
13817
          unsetDescription();
13818
        } else {
13819
          setDescription((String)value);
13820
        }
13821
        break;
13822
 
13823
      }
13824
    }
13825
 
13826
    public void setFieldValue(int fieldID, Object value) {
13827
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13828
    }
13829
 
13830
    public Object getFieldValue(_Fields field) {
13831
      switch (field) {
13832
      case TRANSACTION_ID:
13833
        return new Long(getTransactionId());
13834
 
13835
      case SHIPPING_ID:
13836
        return new Long(getShippingId());
13837
 
13838
      case STATUS:
13839
        return getStatus();
13840
 
13841
      case DESCRIPTION:
13842
        return getDescription();
13843
 
13844
      }
13845
      throw new IllegalStateException();
13846
    }
13847
 
13848
    public Object getFieldValue(int fieldId) {
13849
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13850
    }
13851
 
13852
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13853
    public boolean isSet(_Fields field) {
13854
      switch (field) {
13855
      case TRANSACTION_ID:
13856
        return isSetTransactionId();
13857
      case SHIPPING_ID:
13858
        return isSetShippingId();
13859
      case STATUS:
13860
        return isSetStatus();
13861
      case DESCRIPTION:
13862
        return isSetDescription();
13863
      }
13864
      throw new IllegalStateException();
13865
    }
13866
 
13867
    public boolean isSet(int fieldID) {
13868
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13869
    }
13870
 
13871
    @Override
13872
    public boolean equals(Object that) {
13873
      if (that == null)
13874
        return false;
13875
      if (that instanceof changeShippingStatus_args)
13876
        return this.equals((changeShippingStatus_args)that);
13877
      return false;
13878
    }
13879
 
13880
    public boolean equals(changeShippingStatus_args that) {
13881
      if (that == null)
13882
        return false;
13883
 
13884
      boolean this_present_transactionId = true;
13885
      boolean that_present_transactionId = true;
13886
      if (this_present_transactionId || that_present_transactionId) {
13887
        if (!(this_present_transactionId && that_present_transactionId))
13888
          return false;
13889
        if (this.transactionId != that.transactionId)
13890
          return false;
13891
      }
13892
 
13893
      boolean this_present_shippingId = true;
13894
      boolean that_present_shippingId = true;
13895
      if (this_present_shippingId || that_present_shippingId) {
13896
        if (!(this_present_shippingId && that_present_shippingId))
13897
          return false;
13898
        if (this.shippingId != that.shippingId)
13899
          return false;
13900
      }
13901
 
13902
      boolean this_present_status = true && this.isSetStatus();
13903
      boolean that_present_status = true && that.isSetStatus();
13904
      if (this_present_status || that_present_status) {
13905
        if (!(this_present_status && that_present_status))
13906
          return false;
13907
        if (!this.status.equals(that.status))
13908
          return false;
13909
      }
13910
 
13911
      boolean this_present_description = true && this.isSetDescription();
13912
      boolean that_present_description = true && that.isSetDescription();
13913
      if (this_present_description || that_present_description) {
13914
        if (!(this_present_description && that_present_description))
13915
          return false;
13916
        if (!this.description.equals(that.description))
13917
          return false;
13918
      }
13919
 
13920
      return true;
13921
    }
13922
 
13923
    @Override
13924
    public int hashCode() {
13925
      return 0;
13926
    }
13927
 
13928
    public int compareTo(changeShippingStatus_args other) {
13929
      if (!getClass().equals(other.getClass())) {
13930
        return getClass().getName().compareTo(other.getClass().getName());
13931
      }
13932
 
13933
      int lastComparison = 0;
13934
      changeShippingStatus_args typedOther = (changeShippingStatus_args)other;
13935
 
13936
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
13937
      if (lastComparison != 0) {
13938
        return lastComparison;
13939
      }
13940
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
13941
      if (lastComparison != 0) {
13942
        return lastComparison;
13943
      }
13944
      lastComparison = Boolean.valueOf(isSetShippingId()).compareTo(isSetShippingId());
13945
      if (lastComparison != 0) {
13946
        return lastComparison;
13947
      }
13948
      lastComparison = TBaseHelper.compareTo(shippingId, typedOther.shippingId);
13949
      if (lastComparison != 0) {
13950
        return lastComparison;
13951
      }
13952
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
13953
      if (lastComparison != 0) {
13954
        return lastComparison;
13955
      }
13956
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
13957
      if (lastComparison != 0) {
13958
        return lastComparison;
13959
      }
13960
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
13961
      if (lastComparison != 0) {
13962
        return lastComparison;
13963
      }
13964
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
13965
      if (lastComparison != 0) {
13966
        return lastComparison;
13967
      }
13968
      return 0;
13969
    }
13970
 
13971
    public void read(TProtocol iprot) throws TException {
13972
      TField field;
13973
      iprot.readStructBegin();
13974
      while (true)
13975
      {
13976
        field = iprot.readFieldBegin();
13977
        if (field.type == TType.STOP) { 
13978
          break;
13979
        }
13980
        _Fields fieldId = _Fields.findByThriftId(field.id);
13981
        if (fieldId == null) {
13982
          TProtocolUtil.skip(iprot, field.type);
13983
        } else {
13984
          switch (fieldId) {
13985
            case TRANSACTION_ID:
13986
              if (field.type == TType.I64) {
13987
                this.transactionId = iprot.readI64();
13988
                setTransactionIdIsSet(true);
13989
              } else { 
13990
                TProtocolUtil.skip(iprot, field.type);
13991
              }
13992
              break;
13993
            case SHIPPING_ID:
13994
              if (field.type == TType.I64) {
13995
                this.shippingId = iprot.readI64();
13996
                setShippingIdIsSet(true);
13997
              } else { 
13998
                TProtocolUtil.skip(iprot, field.type);
13999
              }
14000
              break;
14001
            case STATUS:
14002
              if (field.type == TType.I32) {
14003
                this.status = ShipmentStatus.findByValue(iprot.readI32());
14004
              } else { 
14005
                TProtocolUtil.skip(iprot, field.type);
14006
              }
14007
              break;
14008
            case DESCRIPTION:
14009
              if (field.type == TType.STRING) {
14010
                this.description = iprot.readString();
14011
              } else { 
14012
                TProtocolUtil.skip(iprot, field.type);
14013
              }
14014
              break;
14015
          }
14016
          iprot.readFieldEnd();
14017
        }
14018
      }
14019
      iprot.readStructEnd();
14020
      validate();
14021
    }
14022
 
14023
    public void write(TProtocol oprot) throws TException {
14024
      validate();
14025
 
14026
      oprot.writeStructBegin(STRUCT_DESC);
14027
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
14028
      oprot.writeI64(this.transactionId);
14029
      oprot.writeFieldEnd();
14030
      oprot.writeFieldBegin(SHIPPING_ID_FIELD_DESC);
14031
      oprot.writeI64(this.shippingId);
14032
      oprot.writeFieldEnd();
14033
      if (this.status != null) {
14034
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
14035
        oprot.writeI32(this.status.getValue());
14036
        oprot.writeFieldEnd();
14037
      }
14038
      if (this.description != null) {
14039
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
14040
        oprot.writeString(this.description);
14041
        oprot.writeFieldEnd();
14042
      }
14043
      oprot.writeFieldStop();
14044
      oprot.writeStructEnd();
14045
    }
14046
 
14047
    @Override
14048
    public String toString() {
14049
      StringBuilder sb = new StringBuilder("changeShippingStatus_args(");
14050
      boolean first = true;
14051
 
14052
      sb.append("transactionId:");
14053
      sb.append(this.transactionId);
14054
      first = false;
14055
      if (!first) sb.append(", ");
14056
      sb.append("shippingId:");
14057
      sb.append(this.shippingId);
14058
      first = false;
14059
      if (!first) sb.append(", ");
14060
      sb.append("status:");
14061
      if (this.status == null) {
14062
        sb.append("null");
14063
      } else {
14064
        String status_name = status.name();
14065
        if (status_name != null) {
14066
          sb.append(status_name);
14067
          sb.append(" (");
14068
        }
14069
        sb.append(this.status);
14070
        if (status_name != null) {
14071
          sb.append(")");
14072
        }
14073
      }
14074
      first = false;
14075
      if (!first) sb.append(", ");
14076
      sb.append("description:");
14077
      if (this.description == null) {
14078
        sb.append("null");
14079
      } else {
14080
        sb.append(this.description);
14081
      }
14082
      first = false;
14083
      sb.append(")");
14084
      return sb.toString();
14085
    }
14086
 
14087
    public void validate() throws TException {
14088
      // check for required fields
14089
    }
14090
 
14091
  }
14092
 
14093
  public static class changeShippingStatus_result implements TBase<changeShippingStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeShippingStatus_result>   {
14094
    private static final TStruct STRUCT_DESC = new TStruct("changeShippingStatus_result");
14095
 
14096
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14097
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14098
 
14099
    private boolean success;
14100
    private TransactionServiceException ex;
14101
 
14102
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14103
    public enum _Fields implements TFieldIdEnum {
14104
      SUCCESS((short)0, "success"),
14105
      EX((short)1, "ex");
14106
 
14107
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14108
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14109
 
14110
      static {
14111
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14112
          byId.put((int)field._thriftId, field);
14113
          byName.put(field.getFieldName(), field);
14114
        }
14115
      }
14116
 
14117
      /**
14118
       * Find the _Fields constant that matches fieldId, or null if its not found.
14119
       */
14120
      public static _Fields findByThriftId(int fieldId) {
14121
        return byId.get(fieldId);
14122
      }
14123
 
14124
      /**
14125
       * Find the _Fields constant that matches fieldId, throwing an exception
14126
       * if it is not found.
14127
       */
14128
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14129
        _Fields fields = findByThriftId(fieldId);
14130
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14131
        return fields;
14132
      }
14133
 
14134
      /**
14135
       * Find the _Fields constant that matches name, or null if its not found.
14136
       */
14137
      public static _Fields findByName(String name) {
14138
        return byName.get(name);
14139
      }
14140
 
14141
      private final short _thriftId;
14142
      private final String _fieldName;
14143
 
14144
      _Fields(short thriftId, String fieldName) {
14145
        _thriftId = thriftId;
14146
        _fieldName = fieldName;
14147
      }
14148
 
14149
      public short getThriftFieldId() {
14150
        return _thriftId;
14151
      }
14152
 
14153
      public String getFieldName() {
14154
        return _fieldName;
14155
      }
14156
    }
14157
 
14158
    // isset id assignments
14159
    private static final int __SUCCESS_ISSET_ID = 0;
14160
    private BitSet __isset_bit_vector = new BitSet(1);
14161
 
14162
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14163
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14164
          new FieldValueMetaData(TType.BOOL)));
14165
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14166
          new FieldValueMetaData(TType.STRUCT)));
14167
    }});
14168
 
14169
    static {
14170
      FieldMetaData.addStructMetaDataMap(changeShippingStatus_result.class, metaDataMap);
14171
    }
14172
 
14173
    public changeShippingStatus_result() {
14174
    }
14175
 
14176
    public changeShippingStatus_result(
14177
      boolean success,
14178
      TransactionServiceException ex)
14179
    {
14180
      this();
14181
      this.success = success;
14182
      setSuccessIsSet(true);
14183
      this.ex = ex;
14184
    }
14185
 
14186
    /**
14187
     * Performs a deep copy on <i>other</i>.
14188
     */
14189
    public changeShippingStatus_result(changeShippingStatus_result other) {
14190
      __isset_bit_vector.clear();
14191
      __isset_bit_vector.or(other.__isset_bit_vector);
14192
      this.success = other.success;
14193
      if (other.isSetEx()) {
14194
        this.ex = new TransactionServiceException(other.ex);
14195
      }
14196
    }
14197
 
14198
    public changeShippingStatus_result deepCopy() {
14199
      return new changeShippingStatus_result(this);
14200
    }
14201
 
14202
    @Deprecated
14203
    public changeShippingStatus_result clone() {
14204
      return new changeShippingStatus_result(this);
14205
    }
14206
 
14207
    public boolean isSuccess() {
14208
      return this.success;
14209
    }
14210
 
14211
    public changeShippingStatus_result setSuccess(boolean success) {
14212
      this.success = success;
14213
      setSuccessIsSet(true);
14214
      return this;
14215
    }
14216
 
14217
    public void unsetSuccess() {
14218
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14219
    }
14220
 
14221
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14222
    public boolean isSetSuccess() {
14223
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14224
    }
14225
 
14226
    public void setSuccessIsSet(boolean value) {
14227
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14228
    }
14229
 
14230
    public TransactionServiceException getEx() {
14231
      return this.ex;
14232
    }
14233
 
14234
    public changeShippingStatus_result setEx(TransactionServiceException ex) {
14235
      this.ex = ex;
14236
      return this;
14237
    }
14238
 
14239
    public void unsetEx() {
14240
      this.ex = null;
14241
    }
14242
 
14243
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14244
    public boolean isSetEx() {
14245
      return this.ex != null;
14246
    }
14247
 
14248
    public void setExIsSet(boolean value) {
14249
      if (!value) {
14250
        this.ex = null;
14251
      }
14252
    }
14253
 
14254
    public void setFieldValue(_Fields field, Object value) {
14255
      switch (field) {
14256
      case SUCCESS:
14257
        if (value == null) {
14258
          unsetSuccess();
14259
        } else {
14260
          setSuccess((Boolean)value);
14261
        }
14262
        break;
14263
 
14264
      case EX:
14265
        if (value == null) {
14266
          unsetEx();
14267
        } else {
14268
          setEx((TransactionServiceException)value);
14269
        }
14270
        break;
14271
 
14272
      }
14273
    }
14274
 
14275
    public void setFieldValue(int fieldID, Object value) {
14276
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14277
    }
14278
 
14279
    public Object getFieldValue(_Fields field) {
14280
      switch (field) {
14281
      case SUCCESS:
14282
        return new Boolean(isSuccess());
14283
 
14284
      case EX:
14285
        return getEx();
14286
 
14287
      }
14288
      throw new IllegalStateException();
14289
    }
14290
 
14291
    public Object getFieldValue(int fieldId) {
14292
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14293
    }
14294
 
14295
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14296
    public boolean isSet(_Fields field) {
14297
      switch (field) {
14298
      case SUCCESS:
14299
        return isSetSuccess();
14300
      case EX:
14301
        return isSetEx();
14302
      }
14303
      throw new IllegalStateException();
14304
    }
14305
 
14306
    public boolean isSet(int fieldID) {
14307
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14308
    }
14309
 
14310
    @Override
14311
    public boolean equals(Object that) {
14312
      if (that == null)
14313
        return false;
14314
      if (that instanceof changeShippingStatus_result)
14315
        return this.equals((changeShippingStatus_result)that);
14316
      return false;
14317
    }
14318
 
14319
    public boolean equals(changeShippingStatus_result that) {
14320
      if (that == null)
14321
        return false;
14322
 
14323
      boolean this_present_success = true;
14324
      boolean that_present_success = true;
14325
      if (this_present_success || that_present_success) {
14326
        if (!(this_present_success && that_present_success))
14327
          return false;
14328
        if (this.success != that.success)
14329
          return false;
14330
      }
14331
 
14332
      boolean this_present_ex = true && this.isSetEx();
14333
      boolean that_present_ex = true && that.isSetEx();
14334
      if (this_present_ex || that_present_ex) {
14335
        if (!(this_present_ex && that_present_ex))
14336
          return false;
14337
        if (!this.ex.equals(that.ex))
14338
          return false;
14339
      }
14340
 
14341
      return true;
14342
    }
14343
 
14344
    @Override
14345
    public int hashCode() {
14346
      return 0;
14347
    }
14348
 
14349
    public int compareTo(changeShippingStatus_result other) {
14350
      if (!getClass().equals(other.getClass())) {
14351
        return getClass().getName().compareTo(other.getClass().getName());
14352
      }
14353
 
14354
      int lastComparison = 0;
14355
      changeShippingStatus_result typedOther = (changeShippingStatus_result)other;
14356
 
14357
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14358
      if (lastComparison != 0) {
14359
        return lastComparison;
14360
      }
14361
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14362
      if (lastComparison != 0) {
14363
        return lastComparison;
14364
      }
14365
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14366
      if (lastComparison != 0) {
14367
        return lastComparison;
14368
      }
14369
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14370
      if (lastComparison != 0) {
14371
        return lastComparison;
14372
      }
14373
      return 0;
14374
    }
14375
 
14376
    public void read(TProtocol iprot) throws TException {
14377
      TField field;
14378
      iprot.readStructBegin();
14379
      while (true)
14380
      {
14381
        field = iprot.readFieldBegin();
14382
        if (field.type == TType.STOP) { 
14383
          break;
14384
        }
14385
        _Fields fieldId = _Fields.findByThriftId(field.id);
14386
        if (fieldId == null) {
14387
          TProtocolUtil.skip(iprot, field.type);
14388
        } else {
14389
          switch (fieldId) {
14390
            case SUCCESS:
14391
              if (field.type == TType.BOOL) {
14392
                this.success = iprot.readBool();
14393
                setSuccessIsSet(true);
14394
              } else { 
14395
                TProtocolUtil.skip(iprot, field.type);
14396
              }
14397
              break;
14398
            case EX:
14399
              if (field.type == TType.STRUCT) {
14400
                this.ex = new TransactionServiceException();
14401
                this.ex.read(iprot);
14402
              } else { 
14403
                TProtocolUtil.skip(iprot, field.type);
14404
              }
14405
              break;
14406
          }
14407
          iprot.readFieldEnd();
14408
        }
14409
      }
14410
      iprot.readStructEnd();
14411
      validate();
14412
    }
14413
 
14414
    public void write(TProtocol oprot) throws TException {
14415
      oprot.writeStructBegin(STRUCT_DESC);
14416
 
14417
      if (this.isSetSuccess()) {
14418
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14419
        oprot.writeBool(this.success);
14420
        oprot.writeFieldEnd();
14421
      } else if (this.isSetEx()) {
14422
        oprot.writeFieldBegin(EX_FIELD_DESC);
14423
        this.ex.write(oprot);
14424
        oprot.writeFieldEnd();
14425
      }
14426
      oprot.writeFieldStop();
14427
      oprot.writeStructEnd();
14428
    }
14429
 
14430
    @Override
14431
    public String toString() {
14432
      StringBuilder sb = new StringBuilder("changeShippingStatus_result(");
14433
      boolean first = true;
14434
 
14435
      sb.append("success:");
14436
      sb.append(this.success);
14437
      first = false;
14438
      if (!first) sb.append(", ");
14439
      sb.append("ex:");
14440
      if (this.ex == null) {
14441
        sb.append("null");
14442
      } else {
14443
        sb.append(this.ex);
14444
      }
14445
      first = false;
14446
      sb.append(")");
14447
      return sb.toString();
14448
    }
14449
 
14450
    public void validate() throws TException {
14451
      // check for required fields
14452
    }
14453
 
14454
  }
14455
 
14456
  public static class addTrail_args implements TBase<addTrail_args._Fields>, java.io.Serializable, Cloneable, Comparable<addTrail_args>   {
14457
    private static final TStruct STRUCT_DESC = new TStruct("addTrail_args");
14458
 
14459
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
14460
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)2);
14461
 
14462
    private long transactionId;
14463
    private String description;
14464
 
14465
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14466
    public enum _Fields implements TFieldIdEnum {
14467
      TRANSACTION_ID((short)1, "transactionId"),
14468
      DESCRIPTION((short)2, "description");
14469
 
14470
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14471
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14472
 
14473
      static {
14474
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14475
          byId.put((int)field._thriftId, field);
14476
          byName.put(field.getFieldName(), field);
14477
        }
14478
      }
14479
 
14480
      /**
14481
       * Find the _Fields constant that matches fieldId, or null if its not found.
14482
       */
14483
      public static _Fields findByThriftId(int fieldId) {
14484
        return byId.get(fieldId);
14485
      }
14486
 
14487
      /**
14488
       * Find the _Fields constant that matches fieldId, throwing an exception
14489
       * if it is not found.
14490
       */
14491
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14492
        _Fields fields = findByThriftId(fieldId);
14493
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14494
        return fields;
14495
      }
14496
 
14497
      /**
14498
       * Find the _Fields constant that matches name, or null if its not found.
14499
       */
14500
      public static _Fields findByName(String name) {
14501
        return byName.get(name);
14502
      }
14503
 
14504
      private final short _thriftId;
14505
      private final String _fieldName;
14506
 
14507
      _Fields(short thriftId, String fieldName) {
14508
        _thriftId = thriftId;
14509
        _fieldName = fieldName;
14510
      }
14511
 
14512
      public short getThriftFieldId() {
14513
        return _thriftId;
14514
      }
14515
 
14516
      public String getFieldName() {
14517
        return _fieldName;
14518
      }
14519
    }
14520
 
14521
    // isset id assignments
14522
    private static final int __TRANSACTIONID_ISSET_ID = 0;
14523
    private BitSet __isset_bit_vector = new BitSet(1);
14524
 
14525
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14526
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
14527
          new FieldValueMetaData(TType.I64)));
14528
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
14529
          new FieldValueMetaData(TType.STRING)));
14530
    }});
14531
 
14532
    static {
14533
      FieldMetaData.addStructMetaDataMap(addTrail_args.class, metaDataMap);
14534
    }
14535
 
14536
    public addTrail_args() {
14537
    }
14538
 
14539
    public addTrail_args(
14540
      long transactionId,
14541
      String description)
14542
    {
14543
      this();
14544
      this.transactionId = transactionId;
14545
      setTransactionIdIsSet(true);
14546
      this.description = description;
14547
    }
14548
 
14549
    /**
14550
     * Performs a deep copy on <i>other</i>.
14551
     */
14552
    public addTrail_args(addTrail_args other) {
14553
      __isset_bit_vector.clear();
14554
      __isset_bit_vector.or(other.__isset_bit_vector);
14555
      this.transactionId = other.transactionId;
14556
      if (other.isSetDescription()) {
14557
        this.description = other.description;
14558
      }
14559
    }
14560
 
14561
    public addTrail_args deepCopy() {
14562
      return new addTrail_args(this);
14563
    }
14564
 
14565
    @Deprecated
14566
    public addTrail_args clone() {
14567
      return new addTrail_args(this);
14568
    }
14569
 
14570
    public long getTransactionId() {
14571
      return this.transactionId;
14572
    }
14573
 
14574
    public addTrail_args setTransactionId(long transactionId) {
14575
      this.transactionId = transactionId;
14576
      setTransactionIdIsSet(true);
14577
      return this;
14578
    }
14579
 
14580
    public void unsetTransactionId() {
14581
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
14582
    }
14583
 
14584
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
14585
    public boolean isSetTransactionId() {
14586
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
14587
    }
14588
 
14589
    public void setTransactionIdIsSet(boolean value) {
14590
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
14591
    }
14592
 
14593
    public String getDescription() {
14594
      return this.description;
14595
    }
14596
 
14597
    public addTrail_args setDescription(String description) {
14598
      this.description = description;
14599
      return this;
14600
    }
14601
 
14602
    public void unsetDescription() {
14603
      this.description = null;
14604
    }
14605
 
14606
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
14607
    public boolean isSetDescription() {
14608
      return this.description != null;
14609
    }
14610
 
14611
    public void setDescriptionIsSet(boolean value) {
14612
      if (!value) {
14613
        this.description = null;
14614
      }
14615
    }
14616
 
14617
    public void setFieldValue(_Fields field, Object value) {
14618
      switch (field) {
14619
      case TRANSACTION_ID:
14620
        if (value == null) {
14621
          unsetTransactionId();
14622
        } else {
14623
          setTransactionId((Long)value);
14624
        }
14625
        break;
14626
 
14627
      case DESCRIPTION:
14628
        if (value == null) {
14629
          unsetDescription();
14630
        } else {
14631
          setDescription((String)value);
14632
        }
14633
        break;
14634
 
14635
      }
14636
    }
14637
 
14638
    public void setFieldValue(int fieldID, Object value) {
14639
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14640
    }
14641
 
14642
    public Object getFieldValue(_Fields field) {
14643
      switch (field) {
14644
      case TRANSACTION_ID:
14645
        return new Long(getTransactionId());
14646
 
14647
      case DESCRIPTION:
14648
        return getDescription();
14649
 
14650
      }
14651
      throw new IllegalStateException();
14652
    }
14653
 
14654
    public Object getFieldValue(int fieldId) {
14655
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14656
    }
14657
 
14658
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14659
    public boolean isSet(_Fields field) {
14660
      switch (field) {
14661
      case TRANSACTION_ID:
14662
        return isSetTransactionId();
14663
      case DESCRIPTION:
14664
        return isSetDescription();
14665
      }
14666
      throw new IllegalStateException();
14667
    }
14668
 
14669
    public boolean isSet(int fieldID) {
14670
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14671
    }
14672
 
14673
    @Override
14674
    public boolean equals(Object that) {
14675
      if (that == null)
14676
        return false;
14677
      if (that instanceof addTrail_args)
14678
        return this.equals((addTrail_args)that);
14679
      return false;
14680
    }
14681
 
14682
    public boolean equals(addTrail_args that) {
14683
      if (that == null)
14684
        return false;
14685
 
14686
      boolean this_present_transactionId = true;
14687
      boolean that_present_transactionId = true;
14688
      if (this_present_transactionId || that_present_transactionId) {
14689
        if (!(this_present_transactionId && that_present_transactionId))
14690
          return false;
14691
        if (this.transactionId != that.transactionId)
14692
          return false;
14693
      }
14694
 
14695
      boolean this_present_description = true && this.isSetDescription();
14696
      boolean that_present_description = true && that.isSetDescription();
14697
      if (this_present_description || that_present_description) {
14698
        if (!(this_present_description && that_present_description))
14699
          return false;
14700
        if (!this.description.equals(that.description))
14701
          return false;
14702
      }
14703
 
14704
      return true;
14705
    }
14706
 
14707
    @Override
14708
    public int hashCode() {
14709
      return 0;
14710
    }
14711
 
14712
    public int compareTo(addTrail_args other) {
14713
      if (!getClass().equals(other.getClass())) {
14714
        return getClass().getName().compareTo(other.getClass().getName());
14715
      }
14716
 
14717
      int lastComparison = 0;
14718
      addTrail_args typedOther = (addTrail_args)other;
14719
 
14720
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
14721
      if (lastComparison != 0) {
14722
        return lastComparison;
14723
      }
14724
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
14725
      if (lastComparison != 0) {
14726
        return lastComparison;
14727
      }
14728
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
14729
      if (lastComparison != 0) {
14730
        return lastComparison;
14731
      }
14732
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
14733
      if (lastComparison != 0) {
14734
        return lastComparison;
14735
      }
14736
      return 0;
14737
    }
14738
 
14739
    public void read(TProtocol iprot) throws TException {
14740
      TField field;
14741
      iprot.readStructBegin();
14742
      while (true)
14743
      {
14744
        field = iprot.readFieldBegin();
14745
        if (field.type == TType.STOP) { 
14746
          break;
14747
        }
14748
        _Fields fieldId = _Fields.findByThriftId(field.id);
14749
        if (fieldId == null) {
14750
          TProtocolUtil.skip(iprot, field.type);
14751
        } else {
14752
          switch (fieldId) {
14753
            case TRANSACTION_ID:
14754
              if (field.type == TType.I64) {
14755
                this.transactionId = iprot.readI64();
14756
                setTransactionIdIsSet(true);
14757
              } else { 
14758
                TProtocolUtil.skip(iprot, field.type);
14759
              }
14760
              break;
14761
            case DESCRIPTION:
14762
              if (field.type == TType.STRING) {
14763
                this.description = iprot.readString();
14764
              } else { 
14765
                TProtocolUtil.skip(iprot, field.type);
14766
              }
14767
              break;
14768
          }
14769
          iprot.readFieldEnd();
14770
        }
14771
      }
14772
      iprot.readStructEnd();
14773
      validate();
14774
    }
14775
 
14776
    public void write(TProtocol oprot) throws TException {
14777
      validate();
14778
 
14779
      oprot.writeStructBegin(STRUCT_DESC);
14780
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
14781
      oprot.writeI64(this.transactionId);
14782
      oprot.writeFieldEnd();
14783
      if (this.description != null) {
14784
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
14785
        oprot.writeString(this.description);
14786
        oprot.writeFieldEnd();
14787
      }
14788
      oprot.writeFieldStop();
14789
      oprot.writeStructEnd();
14790
    }
14791
 
14792
    @Override
14793
    public String toString() {
14794
      StringBuilder sb = new StringBuilder("addTrail_args(");
14795
      boolean first = true;
14796
 
14797
      sb.append("transactionId:");
14798
      sb.append(this.transactionId);
14799
      first = false;
14800
      if (!first) sb.append(", ");
14801
      sb.append("description:");
14802
      if (this.description == null) {
14803
        sb.append("null");
14804
      } else {
14805
        sb.append(this.description);
14806
      }
14807
      first = false;
14808
      sb.append(")");
14809
      return sb.toString();
14810
    }
14811
 
14812
    public void validate() throws TException {
14813
      // check for required fields
14814
    }
14815
 
14816
  }
14817
 
14818
  public static class addTrail_result implements TBase<addTrail_result._Fields>, java.io.Serializable, Cloneable, Comparable<addTrail_result>   {
14819
    private static final TStruct STRUCT_DESC = new TStruct("addTrail_result");
14820
 
14821
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14822
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14823
 
14824
    private boolean success;
14825
    private TransactionServiceException ex;
14826
 
14827
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14828
    public enum _Fields implements TFieldIdEnum {
14829
      SUCCESS((short)0, "success"),
14830
      EX((short)1, "ex");
14831
 
14832
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14833
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14834
 
14835
      static {
14836
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14837
          byId.put((int)field._thriftId, field);
14838
          byName.put(field.getFieldName(), field);
14839
        }
14840
      }
14841
 
14842
      /**
14843
       * Find the _Fields constant that matches fieldId, or null if its not found.
14844
       */
14845
      public static _Fields findByThriftId(int fieldId) {
14846
        return byId.get(fieldId);
14847
      }
14848
 
14849
      /**
14850
       * Find the _Fields constant that matches fieldId, throwing an exception
14851
       * if it is not found.
14852
       */
14853
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14854
        _Fields fields = findByThriftId(fieldId);
14855
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14856
        return fields;
14857
      }
14858
 
14859
      /**
14860
       * Find the _Fields constant that matches name, or null if its not found.
14861
       */
14862
      public static _Fields findByName(String name) {
14863
        return byName.get(name);
14864
      }
14865
 
14866
      private final short _thriftId;
14867
      private final String _fieldName;
14868
 
14869
      _Fields(short thriftId, String fieldName) {
14870
        _thriftId = thriftId;
14871
        _fieldName = fieldName;
14872
      }
14873
 
14874
      public short getThriftFieldId() {
14875
        return _thriftId;
14876
      }
14877
 
14878
      public String getFieldName() {
14879
        return _fieldName;
14880
      }
14881
    }
14882
 
14883
    // isset id assignments
14884
    private static final int __SUCCESS_ISSET_ID = 0;
14885
    private BitSet __isset_bit_vector = new BitSet(1);
14886
 
14887
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14888
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14889
          new FieldValueMetaData(TType.BOOL)));
14890
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14891
          new FieldValueMetaData(TType.STRUCT)));
14892
    }});
14893
 
14894
    static {
14895
      FieldMetaData.addStructMetaDataMap(addTrail_result.class, metaDataMap);
14896
    }
14897
 
14898
    public addTrail_result() {
14899
    }
14900
 
14901
    public addTrail_result(
14902
      boolean success,
14903
      TransactionServiceException ex)
14904
    {
14905
      this();
14906
      this.success = success;
14907
      setSuccessIsSet(true);
14908
      this.ex = ex;
14909
    }
14910
 
14911
    /**
14912
     * Performs a deep copy on <i>other</i>.
14913
     */
14914
    public addTrail_result(addTrail_result other) {
14915
      __isset_bit_vector.clear();
14916
      __isset_bit_vector.or(other.__isset_bit_vector);
14917
      this.success = other.success;
14918
      if (other.isSetEx()) {
14919
        this.ex = new TransactionServiceException(other.ex);
14920
      }
14921
    }
14922
 
14923
    public addTrail_result deepCopy() {
14924
      return new addTrail_result(this);
14925
    }
14926
 
14927
    @Deprecated
14928
    public addTrail_result clone() {
14929
      return new addTrail_result(this);
14930
    }
14931
 
14932
    public boolean isSuccess() {
14933
      return this.success;
14934
    }
14935
 
14936
    public addTrail_result setSuccess(boolean success) {
14937
      this.success = success;
14938
      setSuccessIsSet(true);
14939
      return this;
14940
    }
14941
 
14942
    public void unsetSuccess() {
14943
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14944
    }
14945
 
14946
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14947
    public boolean isSetSuccess() {
14948
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14949
    }
14950
 
14951
    public void setSuccessIsSet(boolean value) {
14952
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14953
    }
14954
 
14955
    public TransactionServiceException getEx() {
14956
      return this.ex;
14957
    }
14958
 
14959
    public addTrail_result setEx(TransactionServiceException ex) {
14960
      this.ex = ex;
14961
      return this;
14962
    }
14963
 
14964
    public void unsetEx() {
14965
      this.ex = null;
14966
    }
14967
 
14968
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14969
    public boolean isSetEx() {
14970
      return this.ex != null;
14971
    }
14972
 
14973
    public void setExIsSet(boolean value) {
14974
      if (!value) {
14975
        this.ex = null;
14976
      }
14977
    }
14978
 
14979
    public void setFieldValue(_Fields field, Object value) {
14980
      switch (field) {
14981
      case SUCCESS:
14982
        if (value == null) {
14983
          unsetSuccess();
14984
        } else {
14985
          setSuccess((Boolean)value);
14986
        }
14987
        break;
14988
 
14989
      case EX:
14990
        if (value == null) {
14991
          unsetEx();
14992
        } else {
14993
          setEx((TransactionServiceException)value);
14994
        }
14995
        break;
14996
 
14997
      }
14998
    }
14999
 
15000
    public void setFieldValue(int fieldID, Object value) {
15001
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15002
    }
15003
 
15004
    public Object getFieldValue(_Fields field) {
15005
      switch (field) {
15006
      case SUCCESS:
15007
        return new Boolean(isSuccess());
15008
 
15009
      case EX:
15010
        return getEx();
15011
 
15012
      }
15013
      throw new IllegalStateException();
15014
    }
15015
 
15016
    public Object getFieldValue(int fieldId) {
15017
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15018
    }
15019
 
15020
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15021
    public boolean isSet(_Fields field) {
15022
      switch (field) {
15023
      case SUCCESS:
15024
        return isSetSuccess();
15025
      case EX:
15026
        return isSetEx();
15027
      }
15028
      throw new IllegalStateException();
15029
    }
15030
 
15031
    public boolean isSet(int fieldID) {
15032
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15033
    }
15034
 
15035
    @Override
15036
    public boolean equals(Object that) {
15037
      if (that == null)
15038
        return false;
15039
      if (that instanceof addTrail_result)
15040
        return this.equals((addTrail_result)that);
15041
      return false;
15042
    }
15043
 
15044
    public boolean equals(addTrail_result that) {
15045
      if (that == null)
15046
        return false;
15047
 
15048
      boolean this_present_success = true;
15049
      boolean that_present_success = true;
15050
      if (this_present_success || that_present_success) {
15051
        if (!(this_present_success && that_present_success))
15052
          return false;
15053
        if (this.success != that.success)
15054
          return false;
15055
      }
15056
 
15057
      boolean this_present_ex = true && this.isSetEx();
15058
      boolean that_present_ex = true && that.isSetEx();
15059
      if (this_present_ex || that_present_ex) {
15060
        if (!(this_present_ex && that_present_ex))
15061
          return false;
15062
        if (!this.ex.equals(that.ex))
15063
          return false;
15064
      }
15065
 
15066
      return true;
15067
    }
15068
 
15069
    @Override
15070
    public int hashCode() {
15071
      return 0;
15072
    }
15073
 
15074
    public int compareTo(addTrail_result other) {
15075
      if (!getClass().equals(other.getClass())) {
15076
        return getClass().getName().compareTo(other.getClass().getName());
15077
      }
15078
 
15079
      int lastComparison = 0;
15080
      addTrail_result typedOther = (addTrail_result)other;
15081
 
15082
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15083
      if (lastComparison != 0) {
15084
        return lastComparison;
15085
      }
15086
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15087
      if (lastComparison != 0) {
15088
        return lastComparison;
15089
      }
15090
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15091
      if (lastComparison != 0) {
15092
        return lastComparison;
15093
      }
15094
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15095
      if (lastComparison != 0) {
15096
        return lastComparison;
15097
      }
15098
      return 0;
15099
    }
15100
 
15101
    public void read(TProtocol iprot) throws TException {
15102
      TField field;
15103
      iprot.readStructBegin();
15104
      while (true)
15105
      {
15106
        field = iprot.readFieldBegin();
15107
        if (field.type == TType.STOP) { 
15108
          break;
15109
        }
15110
        _Fields fieldId = _Fields.findByThriftId(field.id);
15111
        if (fieldId == null) {
15112
          TProtocolUtil.skip(iprot, field.type);
15113
        } else {
15114
          switch (fieldId) {
15115
            case SUCCESS:
15116
              if (field.type == TType.BOOL) {
15117
                this.success = iprot.readBool();
15118
                setSuccessIsSet(true);
15119
              } else { 
15120
                TProtocolUtil.skip(iprot, field.type);
15121
              }
15122
              break;
15123
            case EX:
15124
              if (field.type == TType.STRUCT) {
15125
                this.ex = new TransactionServiceException();
15126
                this.ex.read(iprot);
15127
              } else { 
15128
                TProtocolUtil.skip(iprot, field.type);
15129
              }
15130
              break;
15131
          }
15132
          iprot.readFieldEnd();
15133
        }
15134
      }
15135
      iprot.readStructEnd();
15136
      validate();
15137
    }
15138
 
15139
    public void write(TProtocol oprot) throws TException {
15140
      oprot.writeStructBegin(STRUCT_DESC);
15141
 
15142
      if (this.isSetSuccess()) {
15143
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15144
        oprot.writeBool(this.success);
15145
        oprot.writeFieldEnd();
15146
      } else if (this.isSetEx()) {
15147
        oprot.writeFieldBegin(EX_FIELD_DESC);
15148
        this.ex.write(oprot);
15149
        oprot.writeFieldEnd();
15150
      }
15151
      oprot.writeFieldStop();
15152
      oprot.writeStructEnd();
15153
    }
15154
 
15155
    @Override
15156
    public String toString() {
15157
      StringBuilder sb = new StringBuilder("addTrail_result(");
15158
      boolean first = true;
15159
 
15160
      sb.append("success:");
15161
      sb.append(this.success);
15162
      first = false;
15163
      if (!first) sb.append(", ");
15164
      sb.append("ex:");
15165
      if (this.ex == null) {
15166
        sb.append("null");
15167
      } else {
15168
        sb.append(this.ex);
15169
      }
15170
      first = false;
15171
      sb.append(")");
15172
      return sb.toString();
15173
    }
15174
 
15175
    public void validate() throws TException {
15176
      // check for required fields
15177
    }
15178
 
15179
  }
15180
 
305 ashish 15181
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
15182
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
15183
 
15184
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
15185
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
15186
 
15187
    private long transactionId;
15188
    private boolean valid;
15189
 
15190
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15191
    public enum _Fields implements TFieldIdEnum {
15192
      TRANSACTION_ID((short)1, "transactionId"),
15193
      VALID((short)2, "valid");
15194
 
15195
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15196
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15197
 
15198
      static {
15199
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15200
          byId.put((int)field._thriftId, field);
15201
          byName.put(field.getFieldName(), field);
15202
        }
15203
      }
15204
 
15205
      /**
15206
       * Find the _Fields constant that matches fieldId, or null if its not found.
15207
       */
15208
      public static _Fields findByThriftId(int fieldId) {
15209
        return byId.get(fieldId);
15210
      }
15211
 
15212
      /**
15213
       * Find the _Fields constant that matches fieldId, throwing an exception
15214
       * if it is not found.
15215
       */
15216
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15217
        _Fields fields = findByThriftId(fieldId);
15218
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15219
        return fields;
15220
      }
15221
 
15222
      /**
15223
       * Find the _Fields constant that matches name, or null if its not found.
15224
       */
15225
      public static _Fields findByName(String name) {
15226
        return byName.get(name);
15227
      }
15228
 
15229
      private final short _thriftId;
15230
      private final String _fieldName;
15231
 
15232
      _Fields(short thriftId, String fieldName) {
15233
        _thriftId = thriftId;
15234
        _fieldName = fieldName;
15235
      }
15236
 
15237
      public short getThriftFieldId() {
15238
        return _thriftId;
15239
      }
15240
 
15241
      public String getFieldName() {
15242
        return _fieldName;
15243
      }
15244
    }
15245
 
15246
    // isset id assignments
15247
    private static final int __TRANSACTIONID_ISSET_ID = 0;
15248
    private static final int __VALID_ISSET_ID = 1;
15249
    private BitSet __isset_bit_vector = new BitSet(2);
15250
 
15251
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15252
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
15253
          new FieldValueMetaData(TType.I64)));
15254
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
15255
          new FieldValueMetaData(TType.BOOL)));
15256
    }});
15257
 
15258
    static {
15259
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
15260
    }
15261
 
15262
    public getAlerts_args() {
15263
    }
15264
 
15265
    public getAlerts_args(
15266
      long transactionId,
15267
      boolean valid)
15268
    {
15269
      this();
15270
      this.transactionId = transactionId;
15271
      setTransactionIdIsSet(true);
15272
      this.valid = valid;
15273
      setValidIsSet(true);
15274
    }
15275
 
15276
    /**
15277
     * Performs a deep copy on <i>other</i>.
15278
     */
15279
    public getAlerts_args(getAlerts_args other) {
15280
      __isset_bit_vector.clear();
15281
      __isset_bit_vector.or(other.__isset_bit_vector);
15282
      this.transactionId = other.transactionId;
15283
      this.valid = other.valid;
15284
    }
15285
 
15286
    public getAlerts_args deepCopy() {
15287
      return new getAlerts_args(this);
15288
    }
15289
 
15290
    @Deprecated
15291
    public getAlerts_args clone() {
15292
      return new getAlerts_args(this);
15293
    }
15294
 
15295
    public long getTransactionId() {
15296
      return this.transactionId;
15297
    }
15298
 
15299
    public getAlerts_args setTransactionId(long transactionId) {
15300
      this.transactionId = transactionId;
15301
      setTransactionIdIsSet(true);
15302
      return this;
15303
    }
15304
 
15305
    public void unsetTransactionId() {
15306
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
15307
    }
15308
 
15309
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
15310
    public boolean isSetTransactionId() {
15311
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
15312
    }
15313
 
15314
    public void setTransactionIdIsSet(boolean value) {
15315
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
15316
    }
15317
 
15318
    public boolean isValid() {
15319
      return this.valid;
15320
    }
15321
 
15322
    public getAlerts_args setValid(boolean valid) {
15323
      this.valid = valid;
15324
      setValidIsSet(true);
15325
      return this;
15326
    }
15327
 
15328
    public void unsetValid() {
15329
      __isset_bit_vector.clear(__VALID_ISSET_ID);
15330
    }
15331
 
15332
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
15333
    public boolean isSetValid() {
15334
      return __isset_bit_vector.get(__VALID_ISSET_ID);
15335
    }
15336
 
15337
    public void setValidIsSet(boolean value) {
15338
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
15339
    }
15340
 
15341
    public void setFieldValue(_Fields field, Object value) {
15342
      switch (field) {
15343
      case TRANSACTION_ID:
15344
        if (value == null) {
15345
          unsetTransactionId();
15346
        } else {
15347
          setTransactionId((Long)value);
15348
        }
15349
        break;
15350
 
15351
      case VALID:
15352
        if (value == null) {
15353
          unsetValid();
15354
        } else {
15355
          setValid((Boolean)value);
15356
        }
15357
        break;
15358
 
15359
      }
15360
    }
15361
 
15362
    public void setFieldValue(int fieldID, Object value) {
15363
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15364
    }
15365
 
15366
    public Object getFieldValue(_Fields field) {
15367
      switch (field) {
15368
      case TRANSACTION_ID:
15369
        return new Long(getTransactionId());
15370
 
15371
      case VALID:
15372
        return new Boolean(isValid());
15373
 
15374
      }
15375
      throw new IllegalStateException();
15376
    }
15377
 
15378
    public Object getFieldValue(int fieldId) {
15379
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15380
    }
15381
 
15382
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15383
    public boolean isSet(_Fields field) {
15384
      switch (field) {
15385
      case TRANSACTION_ID:
15386
        return isSetTransactionId();
15387
      case VALID:
15388
        return isSetValid();
15389
      }
15390
      throw new IllegalStateException();
15391
    }
15392
 
15393
    public boolean isSet(int fieldID) {
15394
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15395
    }
15396
 
15397
    @Override
15398
    public boolean equals(Object that) {
15399
      if (that == null)
15400
        return false;
15401
      if (that instanceof getAlerts_args)
15402
        return this.equals((getAlerts_args)that);
15403
      return false;
15404
    }
15405
 
15406
    public boolean equals(getAlerts_args that) {
15407
      if (that == null)
15408
        return false;
15409
 
15410
      boolean this_present_transactionId = true;
15411
      boolean that_present_transactionId = true;
15412
      if (this_present_transactionId || that_present_transactionId) {
15413
        if (!(this_present_transactionId && that_present_transactionId))
15414
          return false;
15415
        if (this.transactionId != that.transactionId)
15416
          return false;
15417
      }
15418
 
15419
      boolean this_present_valid = true;
15420
      boolean that_present_valid = true;
15421
      if (this_present_valid || that_present_valid) {
15422
        if (!(this_present_valid && that_present_valid))
15423
          return false;
15424
        if (this.valid != that.valid)
15425
          return false;
15426
      }
15427
 
15428
      return true;
15429
    }
15430
 
15431
    @Override
15432
    public int hashCode() {
15433
      return 0;
15434
    }
15435
 
15436
    public int compareTo(getAlerts_args other) {
15437
      if (!getClass().equals(other.getClass())) {
15438
        return getClass().getName().compareTo(other.getClass().getName());
15439
      }
15440
 
15441
      int lastComparison = 0;
15442
      getAlerts_args typedOther = (getAlerts_args)other;
15443
 
15444
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
15445
      if (lastComparison != 0) {
15446
        return lastComparison;
15447
      }
15448
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
15449
      if (lastComparison != 0) {
15450
        return lastComparison;
15451
      }
15452
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
15453
      if (lastComparison != 0) {
15454
        return lastComparison;
15455
      }
15456
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
15457
      if (lastComparison != 0) {
15458
        return lastComparison;
15459
      }
15460
      return 0;
15461
    }
15462
 
15463
    public void read(TProtocol iprot) throws TException {
15464
      TField field;
15465
      iprot.readStructBegin();
15466
      while (true)
15467
      {
15468
        field = iprot.readFieldBegin();
15469
        if (field.type == TType.STOP) { 
15470
          break;
15471
        }
15472
        _Fields fieldId = _Fields.findByThriftId(field.id);
15473
        if (fieldId == null) {
15474
          TProtocolUtil.skip(iprot, field.type);
15475
        } else {
15476
          switch (fieldId) {
15477
            case TRANSACTION_ID:
15478
              if (field.type == TType.I64) {
15479
                this.transactionId = iprot.readI64();
15480
                setTransactionIdIsSet(true);
15481
              } else { 
15482
                TProtocolUtil.skip(iprot, field.type);
15483
              }
15484
              break;
15485
            case VALID:
15486
              if (field.type == TType.BOOL) {
15487
                this.valid = iprot.readBool();
15488
                setValidIsSet(true);
15489
              } else { 
15490
                TProtocolUtil.skip(iprot, field.type);
15491
              }
15492
              break;
15493
          }
15494
          iprot.readFieldEnd();
15495
        }
15496
      }
15497
      iprot.readStructEnd();
15498
      validate();
15499
    }
15500
 
15501
    public void write(TProtocol oprot) throws TException {
15502
      validate();
15503
 
15504
      oprot.writeStructBegin(STRUCT_DESC);
15505
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
15506
      oprot.writeI64(this.transactionId);
15507
      oprot.writeFieldEnd();
15508
      oprot.writeFieldBegin(VALID_FIELD_DESC);
15509
      oprot.writeBool(this.valid);
15510
      oprot.writeFieldEnd();
15511
      oprot.writeFieldStop();
15512
      oprot.writeStructEnd();
15513
    }
15514
 
15515
    @Override
15516
    public String toString() {
15517
      StringBuilder sb = new StringBuilder("getAlerts_args(");
15518
      boolean first = true;
15519
 
15520
      sb.append("transactionId:");
15521
      sb.append(this.transactionId);
15522
      first = false;
15523
      if (!first) sb.append(", ");
15524
      sb.append("valid:");
15525
      sb.append(this.valid);
15526
      first = false;
15527
      sb.append(")");
15528
      return sb.toString();
15529
    }
15530
 
15531
    public void validate() throws TException {
15532
      // check for required fields
15533
    }
15534
 
15535
  }
15536
 
15537
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
15538
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
15539
 
15540
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
15541
 
15542
    private List<Alert> success;
15543
 
15544
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15545
    public enum _Fields implements TFieldIdEnum {
15546
      SUCCESS((short)0, "success");
15547
 
15548
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15549
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15550
 
15551
      static {
15552
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15553
          byId.put((int)field._thriftId, field);
15554
          byName.put(field.getFieldName(), field);
15555
        }
15556
      }
15557
 
15558
      /**
15559
       * Find the _Fields constant that matches fieldId, or null if its not found.
15560
       */
15561
      public static _Fields findByThriftId(int fieldId) {
15562
        return byId.get(fieldId);
15563
      }
15564
 
15565
      /**
15566
       * Find the _Fields constant that matches fieldId, throwing an exception
15567
       * if it is not found.
15568
       */
15569
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15570
        _Fields fields = findByThriftId(fieldId);
15571
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15572
        return fields;
15573
      }
15574
 
15575
      /**
15576
       * Find the _Fields constant that matches name, or null if its not found.
15577
       */
15578
      public static _Fields findByName(String name) {
15579
        return byName.get(name);
15580
      }
15581
 
15582
      private final short _thriftId;
15583
      private final String _fieldName;
15584
 
15585
      _Fields(short thriftId, String fieldName) {
15586
        _thriftId = thriftId;
15587
        _fieldName = fieldName;
15588
      }
15589
 
15590
      public short getThriftFieldId() {
15591
        return _thriftId;
15592
      }
15593
 
15594
      public String getFieldName() {
15595
        return _fieldName;
15596
      }
15597
    }
15598
 
15599
    // isset id assignments
15600
 
15601
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15602
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15603
          new ListMetaData(TType.LIST, 
15604
              new StructMetaData(TType.STRUCT, Alert.class))));
15605
    }});
15606
 
15607
    static {
15608
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
15609
    }
15610
 
15611
    public getAlerts_result() {
15612
    }
15613
 
15614
    public getAlerts_result(
15615
      List<Alert> success)
15616
    {
15617
      this();
15618
      this.success = success;
15619
    }
15620
 
15621
    /**
15622
     * Performs a deep copy on <i>other</i>.
15623
     */
15624
    public getAlerts_result(getAlerts_result other) {
15625
      if (other.isSetSuccess()) {
15626
        List<Alert> __this__success = new ArrayList<Alert>();
15627
        for (Alert other_element : other.success) {
15628
          __this__success.add(new Alert(other_element));
15629
        }
15630
        this.success = __this__success;
15631
      }
15632
    }
15633
 
15634
    public getAlerts_result deepCopy() {
15635
      return new getAlerts_result(this);
15636
    }
15637
 
15638
    @Deprecated
15639
    public getAlerts_result clone() {
15640
      return new getAlerts_result(this);
15641
    }
15642
 
15643
    public int getSuccessSize() {
15644
      return (this.success == null) ? 0 : this.success.size();
15645
    }
15646
 
15647
    public java.util.Iterator<Alert> getSuccessIterator() {
15648
      return (this.success == null) ? null : this.success.iterator();
15649
    }
15650
 
15651
    public void addToSuccess(Alert elem) {
15652
      if (this.success == null) {
15653
        this.success = new ArrayList<Alert>();
15654
      }
15655
      this.success.add(elem);
15656
    }
15657
 
15658
    public List<Alert> getSuccess() {
15659
      return this.success;
15660
    }
15661
 
15662
    public getAlerts_result setSuccess(List<Alert> success) {
15663
      this.success = success;
15664
      return this;
15665
    }
15666
 
15667
    public void unsetSuccess() {
15668
      this.success = null;
15669
    }
15670
 
15671
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15672
    public boolean isSetSuccess() {
15673
      return this.success != null;
15674
    }
15675
 
15676
    public void setSuccessIsSet(boolean value) {
15677
      if (!value) {
15678
        this.success = null;
15679
      }
15680
    }
15681
 
15682
    public void setFieldValue(_Fields field, Object value) {
15683
      switch (field) {
15684
      case SUCCESS:
15685
        if (value == null) {
15686
          unsetSuccess();
15687
        } else {
15688
          setSuccess((List<Alert>)value);
15689
        }
15690
        break;
15691
 
15692
      }
15693
    }
15694
 
15695
    public void setFieldValue(int fieldID, Object value) {
15696
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15697
    }
15698
 
15699
    public Object getFieldValue(_Fields field) {
15700
      switch (field) {
15701
      case SUCCESS:
15702
        return getSuccess();
15703
 
15704
      }
15705
      throw new IllegalStateException();
15706
    }
15707
 
15708
    public Object getFieldValue(int fieldId) {
15709
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15710
    }
15711
 
15712
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15713
    public boolean isSet(_Fields field) {
15714
      switch (field) {
15715
      case SUCCESS:
15716
        return isSetSuccess();
15717
      }
15718
      throw new IllegalStateException();
15719
    }
15720
 
15721
    public boolean isSet(int fieldID) {
15722
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15723
    }
15724
 
15725
    @Override
15726
    public boolean equals(Object that) {
15727
      if (that == null)
15728
        return false;
15729
      if (that instanceof getAlerts_result)
15730
        return this.equals((getAlerts_result)that);
15731
      return false;
15732
    }
15733
 
15734
    public boolean equals(getAlerts_result that) {
15735
      if (that == null)
15736
        return false;
15737
 
15738
      boolean this_present_success = true && this.isSetSuccess();
15739
      boolean that_present_success = true && that.isSetSuccess();
15740
      if (this_present_success || that_present_success) {
15741
        if (!(this_present_success && that_present_success))
15742
          return false;
15743
        if (!this.success.equals(that.success))
15744
          return false;
15745
      }
15746
 
15747
      return true;
15748
    }
15749
 
15750
    @Override
15751
    public int hashCode() {
15752
      return 0;
15753
    }
15754
 
15755
    public int compareTo(getAlerts_result other) {
15756
      if (!getClass().equals(other.getClass())) {
15757
        return getClass().getName().compareTo(other.getClass().getName());
15758
      }
15759
 
15760
      int lastComparison = 0;
15761
      getAlerts_result typedOther = (getAlerts_result)other;
15762
 
15763
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15764
      if (lastComparison != 0) {
15765
        return lastComparison;
15766
      }
15767
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15768
      if (lastComparison != 0) {
15769
        return lastComparison;
15770
      }
15771
      return 0;
15772
    }
15773
 
15774
    public void read(TProtocol iprot) throws TException {
15775
      TField field;
15776
      iprot.readStructBegin();
15777
      while (true)
15778
      {
15779
        field = iprot.readFieldBegin();
15780
        if (field.type == TType.STOP) { 
15781
          break;
15782
        }
15783
        _Fields fieldId = _Fields.findByThriftId(field.id);
15784
        if (fieldId == null) {
15785
          TProtocolUtil.skip(iprot, field.type);
15786
        } else {
15787
          switch (fieldId) {
15788
            case SUCCESS:
15789
              if (field.type == TType.LIST) {
15790
                {
15791
                  TList _list50 = iprot.readListBegin();
15792
                  this.success = new ArrayList<Alert>(_list50.size);
15793
                  for (int _i51 = 0; _i51 < _list50.size; ++_i51)
15794
                  {
15795
                    Alert _elem52;
15796
                    _elem52 = new Alert();
15797
                    _elem52.read(iprot);
15798
                    this.success.add(_elem52);
15799
                  }
15800
                  iprot.readListEnd();
15801
                }
15802
              } else { 
15803
                TProtocolUtil.skip(iprot, field.type);
15804
              }
15805
              break;
15806
          }
15807
          iprot.readFieldEnd();
15808
        }
15809
      }
15810
      iprot.readStructEnd();
15811
      validate();
15812
    }
15813
 
15814
    public void write(TProtocol oprot) throws TException {
15815
      oprot.writeStructBegin(STRUCT_DESC);
15816
 
15817
      if (this.isSetSuccess()) {
15818
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15819
        {
15820
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
15821
          for (Alert _iter53 : this.success)
15822
          {
15823
            _iter53.write(oprot);
15824
          }
15825
          oprot.writeListEnd();
15826
        }
15827
        oprot.writeFieldEnd();
15828
      }
15829
      oprot.writeFieldStop();
15830
      oprot.writeStructEnd();
15831
    }
15832
 
15833
    @Override
15834
    public String toString() {
15835
      StringBuilder sb = new StringBuilder("getAlerts_result(");
15836
      boolean first = true;
15837
 
15838
      sb.append("success:");
15839
      if (this.success == null) {
15840
        sb.append("null");
15841
      } else {
15842
        sb.append(this.success);
15843
      }
15844
      first = false;
15845
      sb.append(")");
15846
      return sb.toString();
15847
    }
15848
 
15849
    public void validate() throws TException {
15850
      // check for required fields
15851
    }
15852
 
15853
  }
15854
 
15855
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
15856
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
15857
 
15858
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
15859
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
15860
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
15861
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
15862
 
15863
    private long transactionId;
15864
    private boolean unset;
15865
    private long type;
15866
    private String comment;
15867
 
15868
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15869
    public enum _Fields implements TFieldIdEnum {
15870
      TRANSACTION_ID((short)1, "transactionId"),
15871
      UNSET((short)2, "unset"),
15872
      TYPE((short)3, "type"),
15873
      COMMENT((short)4, "comment");
15874
 
15875
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15876
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15877
 
15878
      static {
15879
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15880
          byId.put((int)field._thriftId, field);
15881
          byName.put(field.getFieldName(), field);
15882
        }
15883
      }
15884
 
15885
      /**
15886
       * Find the _Fields constant that matches fieldId, or null if its not found.
15887
       */
15888
      public static _Fields findByThriftId(int fieldId) {
15889
        return byId.get(fieldId);
15890
      }
15891
 
15892
      /**
15893
       * Find the _Fields constant that matches fieldId, throwing an exception
15894
       * if it is not found.
15895
       */
15896
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15897
        _Fields fields = findByThriftId(fieldId);
15898
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15899
        return fields;
15900
      }
15901
 
15902
      /**
15903
       * Find the _Fields constant that matches name, or null if its not found.
15904
       */
15905
      public static _Fields findByName(String name) {
15906
        return byName.get(name);
15907
      }
15908
 
15909
      private final short _thriftId;
15910
      private final String _fieldName;
15911
 
15912
      _Fields(short thriftId, String fieldName) {
15913
        _thriftId = thriftId;
15914
        _fieldName = fieldName;
15915
      }
15916
 
15917
      public short getThriftFieldId() {
15918
        return _thriftId;
15919
      }
15920
 
15921
      public String getFieldName() {
15922
        return _fieldName;
15923
      }
15924
    }
15925
 
15926
    // isset id assignments
15927
    private static final int __TRANSACTIONID_ISSET_ID = 0;
15928
    private static final int __UNSET_ISSET_ID = 1;
15929
    private static final int __TYPE_ISSET_ID = 2;
15930
    private BitSet __isset_bit_vector = new BitSet(3);
15931
 
15932
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15933
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
15934
          new FieldValueMetaData(TType.I64)));
15935
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
15936
          new FieldValueMetaData(TType.BOOL)));
15937
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
15938
          new FieldValueMetaData(TType.I64)));
15939
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
15940
          new FieldValueMetaData(TType.STRING)));
15941
    }});
15942
 
15943
    static {
15944
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
15945
    }
15946
 
15947
    public setAlert_args() {
15948
    }
15949
 
15950
    public setAlert_args(
15951
      long transactionId,
15952
      boolean unset,
15953
      long type,
15954
      String comment)
15955
    {
15956
      this();
15957
      this.transactionId = transactionId;
15958
      setTransactionIdIsSet(true);
15959
      this.unset = unset;
15960
      setUnsetIsSet(true);
15961
      this.type = type;
15962
      setTypeIsSet(true);
15963
      this.comment = comment;
15964
    }
15965
 
15966
    /**
15967
     * Performs a deep copy on <i>other</i>.
15968
     */
15969
    public setAlert_args(setAlert_args other) {
15970
      __isset_bit_vector.clear();
15971
      __isset_bit_vector.or(other.__isset_bit_vector);
15972
      this.transactionId = other.transactionId;
15973
      this.unset = other.unset;
15974
      this.type = other.type;
15975
      if (other.isSetComment()) {
15976
        this.comment = other.comment;
15977
      }
15978
    }
15979
 
15980
    public setAlert_args deepCopy() {
15981
      return new setAlert_args(this);
15982
    }
15983
 
15984
    @Deprecated
15985
    public setAlert_args clone() {
15986
      return new setAlert_args(this);
15987
    }
15988
 
15989
    public long getTransactionId() {
15990
      return this.transactionId;
15991
    }
15992
 
15993
    public setAlert_args setTransactionId(long transactionId) {
15994
      this.transactionId = transactionId;
15995
      setTransactionIdIsSet(true);
15996
      return this;
15997
    }
15998
 
15999
    public void unsetTransactionId() {
16000
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
16001
    }
16002
 
16003
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
16004
    public boolean isSetTransactionId() {
16005
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
16006
    }
16007
 
16008
    public void setTransactionIdIsSet(boolean value) {
16009
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
16010
    }
16011
 
16012
    public boolean isUnset() {
16013
      return this.unset;
16014
    }
16015
 
16016
    public setAlert_args setUnset(boolean unset) {
16017
      this.unset = unset;
16018
      setUnsetIsSet(true);
16019
      return this;
16020
    }
16021
 
16022
    public void unsetUnset() {
16023
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
16024
    }
16025
 
16026
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
16027
    public boolean isSetUnset() {
16028
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
16029
    }
16030
 
16031
    public void setUnsetIsSet(boolean value) {
16032
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
16033
    }
16034
 
16035
    public long getType() {
16036
      return this.type;
16037
    }
16038
 
16039
    public setAlert_args setType(long type) {
16040
      this.type = type;
16041
      setTypeIsSet(true);
16042
      return this;
16043
    }
16044
 
16045
    public void unsetType() {
16046
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
16047
    }
16048
 
16049
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
16050
    public boolean isSetType() {
16051
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
16052
    }
16053
 
16054
    public void setTypeIsSet(boolean value) {
16055
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
16056
    }
16057
 
16058
    public String getComment() {
16059
      return this.comment;
16060
    }
16061
 
16062
    public setAlert_args setComment(String comment) {
16063
      this.comment = comment;
16064
      return this;
16065
    }
16066
 
16067
    public void unsetComment() {
16068
      this.comment = null;
16069
    }
16070
 
16071
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
16072
    public boolean isSetComment() {
16073
      return this.comment != null;
16074
    }
16075
 
16076
    public void setCommentIsSet(boolean value) {
16077
      if (!value) {
16078
        this.comment = null;
16079
      }
16080
    }
16081
 
16082
    public void setFieldValue(_Fields field, Object value) {
16083
      switch (field) {
16084
      case TRANSACTION_ID:
16085
        if (value == null) {
16086
          unsetTransactionId();
16087
        } else {
16088
          setTransactionId((Long)value);
16089
        }
16090
        break;
16091
 
16092
      case UNSET:
16093
        if (value == null) {
16094
          unsetUnset();
16095
        } else {
16096
          setUnset((Boolean)value);
16097
        }
16098
        break;
16099
 
16100
      case TYPE:
16101
        if (value == null) {
16102
          unsetType();
16103
        } else {
16104
          setType((Long)value);
16105
        }
16106
        break;
16107
 
16108
      case COMMENT:
16109
        if (value == null) {
16110
          unsetComment();
16111
        } else {
16112
          setComment((String)value);
16113
        }
16114
        break;
16115
 
16116
      }
16117
    }
16118
 
16119
    public void setFieldValue(int fieldID, Object value) {
16120
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16121
    }
16122
 
16123
    public Object getFieldValue(_Fields field) {
16124
      switch (field) {
16125
      case TRANSACTION_ID:
16126
        return new Long(getTransactionId());
16127
 
16128
      case UNSET:
16129
        return new Boolean(isUnset());
16130
 
16131
      case TYPE:
16132
        return new Long(getType());
16133
 
16134
      case COMMENT:
16135
        return getComment();
16136
 
16137
      }
16138
      throw new IllegalStateException();
16139
    }
16140
 
16141
    public Object getFieldValue(int fieldId) {
16142
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16143
    }
16144
 
16145
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16146
    public boolean isSet(_Fields field) {
16147
      switch (field) {
16148
      case TRANSACTION_ID:
16149
        return isSetTransactionId();
16150
      case UNSET:
16151
        return isSetUnset();
16152
      case TYPE:
16153
        return isSetType();
16154
      case COMMENT:
16155
        return isSetComment();
16156
      }
16157
      throw new IllegalStateException();
16158
    }
16159
 
16160
    public boolean isSet(int fieldID) {
16161
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16162
    }
16163
 
16164
    @Override
16165
    public boolean equals(Object that) {
16166
      if (that == null)
16167
        return false;
16168
      if (that instanceof setAlert_args)
16169
        return this.equals((setAlert_args)that);
16170
      return false;
16171
    }
16172
 
16173
    public boolean equals(setAlert_args that) {
16174
      if (that == null)
16175
        return false;
16176
 
16177
      boolean this_present_transactionId = true;
16178
      boolean that_present_transactionId = true;
16179
      if (this_present_transactionId || that_present_transactionId) {
16180
        if (!(this_present_transactionId && that_present_transactionId))
16181
          return false;
16182
        if (this.transactionId != that.transactionId)
16183
          return false;
16184
      }
16185
 
16186
      boolean this_present_unset = true;
16187
      boolean that_present_unset = true;
16188
      if (this_present_unset || that_present_unset) {
16189
        if (!(this_present_unset && that_present_unset))
16190
          return false;
16191
        if (this.unset != that.unset)
16192
          return false;
16193
      }
16194
 
16195
      boolean this_present_type = true;
16196
      boolean that_present_type = true;
16197
      if (this_present_type || that_present_type) {
16198
        if (!(this_present_type && that_present_type))
16199
          return false;
16200
        if (this.type != that.type)
16201
          return false;
16202
      }
16203
 
16204
      boolean this_present_comment = true && this.isSetComment();
16205
      boolean that_present_comment = true && that.isSetComment();
16206
      if (this_present_comment || that_present_comment) {
16207
        if (!(this_present_comment && that_present_comment))
16208
          return false;
16209
        if (!this.comment.equals(that.comment))
16210
          return false;
16211
      }
16212
 
16213
      return true;
16214
    }
16215
 
16216
    @Override
16217
    public int hashCode() {
16218
      return 0;
16219
    }
16220
 
16221
    public int compareTo(setAlert_args other) {
16222
      if (!getClass().equals(other.getClass())) {
16223
        return getClass().getName().compareTo(other.getClass().getName());
16224
      }
16225
 
16226
      int lastComparison = 0;
16227
      setAlert_args typedOther = (setAlert_args)other;
16228
 
16229
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
16230
      if (lastComparison != 0) {
16231
        return lastComparison;
16232
      }
16233
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
16234
      if (lastComparison != 0) {
16235
        return lastComparison;
16236
      }
16237
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
16238
      if (lastComparison != 0) {
16239
        return lastComparison;
16240
      }
16241
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
16242
      if (lastComparison != 0) {
16243
        return lastComparison;
16244
      }
16245
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
16246
      if (lastComparison != 0) {
16247
        return lastComparison;
16248
      }
16249
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
16250
      if (lastComparison != 0) {
16251
        return lastComparison;
16252
      }
16253
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
16254
      if (lastComparison != 0) {
16255
        return lastComparison;
16256
      }
16257
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
16258
      if (lastComparison != 0) {
16259
        return lastComparison;
16260
      }
16261
      return 0;
16262
    }
16263
 
16264
    public void read(TProtocol iprot) throws TException {
16265
      TField field;
16266
      iprot.readStructBegin();
16267
      while (true)
16268
      {
16269
        field = iprot.readFieldBegin();
16270
        if (field.type == TType.STOP) { 
16271
          break;
16272
        }
16273
        _Fields fieldId = _Fields.findByThriftId(field.id);
16274
        if (fieldId == null) {
16275
          TProtocolUtil.skip(iprot, field.type);
16276
        } else {
16277
          switch (fieldId) {
16278
            case TRANSACTION_ID:
16279
              if (field.type == TType.I64) {
16280
                this.transactionId = iprot.readI64();
16281
                setTransactionIdIsSet(true);
16282
              } else { 
16283
                TProtocolUtil.skip(iprot, field.type);
16284
              }
16285
              break;
16286
            case UNSET:
16287
              if (field.type == TType.BOOL) {
16288
                this.unset = iprot.readBool();
16289
                setUnsetIsSet(true);
16290
              } else { 
16291
                TProtocolUtil.skip(iprot, field.type);
16292
              }
16293
              break;
16294
            case TYPE:
16295
              if (field.type == TType.I64) {
16296
                this.type = iprot.readI64();
16297
                setTypeIsSet(true);
16298
              } else { 
16299
                TProtocolUtil.skip(iprot, field.type);
16300
              }
16301
              break;
16302
            case COMMENT:
16303
              if (field.type == TType.STRING) {
16304
                this.comment = iprot.readString();
16305
              } else { 
16306
                TProtocolUtil.skip(iprot, field.type);
16307
              }
16308
              break;
16309
          }
16310
          iprot.readFieldEnd();
16311
        }
16312
      }
16313
      iprot.readStructEnd();
16314
      validate();
16315
    }
16316
 
16317
    public void write(TProtocol oprot) throws TException {
16318
      validate();
16319
 
16320
      oprot.writeStructBegin(STRUCT_DESC);
16321
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
16322
      oprot.writeI64(this.transactionId);
16323
      oprot.writeFieldEnd();
16324
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
16325
      oprot.writeBool(this.unset);
16326
      oprot.writeFieldEnd();
16327
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
16328
      oprot.writeI64(this.type);
16329
      oprot.writeFieldEnd();
16330
      if (this.comment != null) {
16331
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
16332
        oprot.writeString(this.comment);
16333
        oprot.writeFieldEnd();
16334
      }
16335
      oprot.writeFieldStop();
16336
      oprot.writeStructEnd();
16337
    }
16338
 
16339
    @Override
16340
    public String toString() {
16341
      StringBuilder sb = new StringBuilder("setAlert_args(");
16342
      boolean first = true;
16343
 
16344
      sb.append("transactionId:");
16345
      sb.append(this.transactionId);
16346
      first = false;
16347
      if (!first) sb.append(", ");
16348
      sb.append("unset:");
16349
      sb.append(this.unset);
16350
      first = false;
16351
      if (!first) sb.append(", ");
16352
      sb.append("type:");
16353
      sb.append(this.type);
16354
      first = false;
16355
      if (!first) sb.append(", ");
16356
      sb.append("comment:");
16357
      if (this.comment == null) {
16358
        sb.append("null");
16359
      } else {
16360
        sb.append(this.comment);
16361
      }
16362
      first = false;
16363
      sb.append(")");
16364
      return sb.toString();
16365
    }
16366
 
16367
    public void validate() throws TException {
16368
      // check for required fields
16369
    }
16370
 
16371
  }
16372
 
16373
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
16374
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
16375
 
16376
 
16377
 
16378
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16379
    public enum _Fields implements TFieldIdEnum {
16380
;
16381
 
16382
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16383
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16384
 
16385
      static {
16386
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16387
          byId.put((int)field._thriftId, field);
16388
          byName.put(field.getFieldName(), field);
16389
        }
16390
      }
16391
 
16392
      /**
16393
       * Find the _Fields constant that matches fieldId, or null if its not found.
16394
       */
16395
      public static _Fields findByThriftId(int fieldId) {
16396
        return byId.get(fieldId);
16397
      }
16398
 
16399
      /**
16400
       * Find the _Fields constant that matches fieldId, throwing an exception
16401
       * if it is not found.
16402
       */
16403
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16404
        _Fields fields = findByThriftId(fieldId);
16405
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16406
        return fields;
16407
      }
16408
 
16409
      /**
16410
       * Find the _Fields constant that matches name, or null if its not found.
16411
       */
16412
      public static _Fields findByName(String name) {
16413
        return byName.get(name);
16414
      }
16415
 
16416
      private final short _thriftId;
16417
      private final String _fieldName;
16418
 
16419
      _Fields(short thriftId, String fieldName) {
16420
        _thriftId = thriftId;
16421
        _fieldName = fieldName;
16422
      }
16423
 
16424
      public short getThriftFieldId() {
16425
        return _thriftId;
16426
      }
16427
 
16428
      public String getFieldName() {
16429
        return _fieldName;
16430
      }
16431
    }
16432
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16433
    }});
16434
 
16435
    static {
16436
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
16437
    }
16438
 
16439
    public setAlert_result() {
16440
    }
16441
 
16442
    /**
16443
     * Performs a deep copy on <i>other</i>.
16444
     */
16445
    public setAlert_result(setAlert_result other) {
16446
    }
16447
 
16448
    public setAlert_result deepCopy() {
16449
      return new setAlert_result(this);
16450
    }
16451
 
16452
    @Deprecated
16453
    public setAlert_result clone() {
16454
      return new setAlert_result(this);
16455
    }
16456
 
16457
    public void setFieldValue(_Fields field, Object value) {
16458
      switch (field) {
16459
      }
16460
    }
16461
 
16462
    public void setFieldValue(int fieldID, Object value) {
16463
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16464
    }
16465
 
16466
    public Object getFieldValue(_Fields field) {
16467
      switch (field) {
16468
      }
16469
      throw new IllegalStateException();
16470
    }
16471
 
16472
    public Object getFieldValue(int fieldId) {
16473
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16474
    }
16475
 
16476
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16477
    public boolean isSet(_Fields field) {
16478
      switch (field) {
16479
      }
16480
      throw new IllegalStateException();
16481
    }
16482
 
16483
    public boolean isSet(int fieldID) {
16484
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16485
    }
16486
 
16487
    @Override
16488
    public boolean equals(Object that) {
16489
      if (that == null)
16490
        return false;
16491
      if (that instanceof setAlert_result)
16492
        return this.equals((setAlert_result)that);
16493
      return false;
16494
    }
16495
 
16496
    public boolean equals(setAlert_result that) {
16497
      if (that == null)
16498
        return false;
16499
 
16500
      return true;
16501
    }
16502
 
16503
    @Override
16504
    public int hashCode() {
16505
      return 0;
16506
    }
16507
 
16508
    public int compareTo(setAlert_result other) {
16509
      if (!getClass().equals(other.getClass())) {
16510
        return getClass().getName().compareTo(other.getClass().getName());
16511
      }
16512
 
16513
      int lastComparison = 0;
16514
      setAlert_result typedOther = (setAlert_result)other;
16515
 
16516
      return 0;
16517
    }
16518
 
16519
    public void read(TProtocol iprot) throws TException {
16520
      TField field;
16521
      iprot.readStructBegin();
16522
      while (true)
16523
      {
16524
        field = iprot.readFieldBegin();
16525
        if (field.type == TType.STOP) { 
16526
          break;
16527
        }
16528
        _Fields fieldId = _Fields.findByThriftId(field.id);
16529
        if (fieldId == null) {
16530
          TProtocolUtil.skip(iprot, field.type);
16531
        } else {
16532
          switch (fieldId) {
16533
          }
16534
          iprot.readFieldEnd();
16535
        }
16536
      }
16537
      iprot.readStructEnd();
16538
      validate();
16539
    }
16540
 
16541
    public void write(TProtocol oprot) throws TException {
16542
      oprot.writeStructBegin(STRUCT_DESC);
16543
 
16544
      oprot.writeFieldStop();
16545
      oprot.writeStructEnd();
16546
    }
16547
 
16548
    @Override
16549
    public String toString() {
16550
      StringBuilder sb = new StringBuilder("setAlert_result(");
16551
      boolean first = true;
16552
 
16553
      sb.append(")");
16554
      return sb.toString();
16555
    }
16556
 
16557
    public void validate() throws TException {
16558
      // check for required fields
16559
    }
16560
 
16561
  }
16562
 
16563
  public static class getExtraInfo_args implements TBase<getExtraInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getExtraInfo_args>   {
16564
    private static final TStruct STRUCT_DESC = new TStruct("getExtraInfo_args");
16565
 
16566
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transaction_id", TType.I64, (short)1);
16567
 
16568
    private long transaction_id;
16569
 
16570
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16571
    public enum _Fields implements TFieldIdEnum {
16572
      TRANSACTION_ID((short)1, "transaction_id");
16573
 
16574
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16575
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16576
 
16577
      static {
16578
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16579
          byId.put((int)field._thriftId, field);
16580
          byName.put(field.getFieldName(), field);
16581
        }
16582
      }
16583
 
16584
      /**
16585
       * Find the _Fields constant that matches fieldId, or null if its not found.
16586
       */
16587
      public static _Fields findByThriftId(int fieldId) {
16588
        return byId.get(fieldId);
16589
      }
16590
 
16591
      /**
16592
       * Find the _Fields constant that matches fieldId, throwing an exception
16593
       * if it is not found.
16594
       */
16595
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16596
        _Fields fields = findByThriftId(fieldId);
16597
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16598
        return fields;
16599
      }
16600
 
16601
      /**
16602
       * Find the _Fields constant that matches name, or null if its not found.
16603
       */
16604
      public static _Fields findByName(String name) {
16605
        return byName.get(name);
16606
      }
16607
 
16608
      private final short _thriftId;
16609
      private final String _fieldName;
16610
 
16611
      _Fields(short thriftId, String fieldName) {
16612
        _thriftId = thriftId;
16613
        _fieldName = fieldName;
16614
      }
16615
 
16616
      public short getThriftFieldId() {
16617
        return _thriftId;
16618
      }
16619
 
16620
      public String getFieldName() {
16621
        return _fieldName;
16622
      }
16623
    }
16624
 
16625
    // isset id assignments
16626
    private static final int __TRANSACTION_ID_ISSET_ID = 0;
16627
    private BitSet __isset_bit_vector = new BitSet(1);
16628
 
16629
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16630
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transaction_id", TFieldRequirementType.DEFAULT, 
16631
          new FieldValueMetaData(TType.I64)));
16632
    }});
16633
 
16634
    static {
16635
      FieldMetaData.addStructMetaDataMap(getExtraInfo_args.class, metaDataMap);
16636
    }
16637
 
16638
    public getExtraInfo_args() {
16639
    }
16640
 
16641
    public getExtraInfo_args(
16642
      long transaction_id)
16643
    {
16644
      this();
16645
      this.transaction_id = transaction_id;
16646
      setTransaction_idIsSet(true);
16647
    }
16648
 
16649
    /**
16650
     * Performs a deep copy on <i>other</i>.
16651
     */
16652
    public getExtraInfo_args(getExtraInfo_args other) {
16653
      __isset_bit_vector.clear();
16654
      __isset_bit_vector.or(other.__isset_bit_vector);
16655
      this.transaction_id = other.transaction_id;
16656
    }
16657
 
16658
    public getExtraInfo_args deepCopy() {
16659
      return new getExtraInfo_args(this);
16660
    }
16661
 
16662
    @Deprecated
16663
    public getExtraInfo_args clone() {
16664
      return new getExtraInfo_args(this);
16665
    }
16666
 
16667
    public long getTransaction_id() {
16668
      return this.transaction_id;
16669
    }
16670
 
16671
    public getExtraInfo_args setTransaction_id(long transaction_id) {
16672
      this.transaction_id = transaction_id;
16673
      setTransaction_idIsSet(true);
16674
      return this;
16675
    }
16676
 
16677
    public void unsetTransaction_id() {
16678
      __isset_bit_vector.clear(__TRANSACTION_ID_ISSET_ID);
16679
    }
16680
 
16681
    /** Returns true if field transaction_id is set (has been asigned a value) and false otherwise */
16682
    public boolean isSetTransaction_id() {
16683
      return __isset_bit_vector.get(__TRANSACTION_ID_ISSET_ID);
16684
    }
16685
 
16686
    public void setTransaction_idIsSet(boolean value) {
16687
      __isset_bit_vector.set(__TRANSACTION_ID_ISSET_ID, value);
16688
    }
16689
 
16690
    public void setFieldValue(_Fields field, Object value) {
16691
      switch (field) {
16692
      case TRANSACTION_ID:
16693
        if (value == null) {
16694
          unsetTransaction_id();
16695
        } else {
16696
          setTransaction_id((Long)value);
16697
        }
16698
        break;
16699
 
16700
      }
16701
    }
16702
 
16703
    public void setFieldValue(int fieldID, Object value) {
16704
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16705
    }
16706
 
16707
    public Object getFieldValue(_Fields field) {
16708
      switch (field) {
16709
      case TRANSACTION_ID:
16710
        return new Long(getTransaction_id());
16711
 
16712
      }
16713
      throw new IllegalStateException();
16714
    }
16715
 
16716
    public Object getFieldValue(int fieldId) {
16717
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16718
    }
16719
 
16720
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16721
    public boolean isSet(_Fields field) {
16722
      switch (field) {
16723
      case TRANSACTION_ID:
16724
        return isSetTransaction_id();
16725
      }
16726
      throw new IllegalStateException();
16727
    }
16728
 
16729
    public boolean isSet(int fieldID) {
16730
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16731
    }
16732
 
16733
    @Override
16734
    public boolean equals(Object that) {
16735
      if (that == null)
16736
        return false;
16737
      if (that instanceof getExtraInfo_args)
16738
        return this.equals((getExtraInfo_args)that);
16739
      return false;
16740
    }
16741
 
16742
    public boolean equals(getExtraInfo_args that) {
16743
      if (that == null)
16744
        return false;
16745
 
16746
      boolean this_present_transaction_id = true;
16747
      boolean that_present_transaction_id = true;
16748
      if (this_present_transaction_id || that_present_transaction_id) {
16749
        if (!(this_present_transaction_id && that_present_transaction_id))
16750
          return false;
16751
        if (this.transaction_id != that.transaction_id)
16752
          return false;
16753
      }
16754
 
16755
      return true;
16756
    }
16757
 
16758
    @Override
16759
    public int hashCode() {
16760
      return 0;
16761
    }
16762
 
16763
    public int compareTo(getExtraInfo_args other) {
16764
      if (!getClass().equals(other.getClass())) {
16765
        return getClass().getName().compareTo(other.getClass().getName());
16766
      }
16767
 
16768
      int lastComparison = 0;
16769
      getExtraInfo_args typedOther = (getExtraInfo_args)other;
16770
 
16771
      lastComparison = Boolean.valueOf(isSetTransaction_id()).compareTo(isSetTransaction_id());
16772
      if (lastComparison != 0) {
16773
        return lastComparison;
16774
      }
16775
      lastComparison = TBaseHelper.compareTo(transaction_id, typedOther.transaction_id);
16776
      if (lastComparison != 0) {
16777
        return lastComparison;
16778
      }
16779
      return 0;
16780
    }
16781
 
16782
    public void read(TProtocol iprot) throws TException {
16783
      TField field;
16784
      iprot.readStructBegin();
16785
      while (true)
16786
      {
16787
        field = iprot.readFieldBegin();
16788
        if (field.type == TType.STOP) { 
16789
          break;
16790
        }
16791
        _Fields fieldId = _Fields.findByThriftId(field.id);
16792
        if (fieldId == null) {
16793
          TProtocolUtil.skip(iprot, field.type);
16794
        } else {
16795
          switch (fieldId) {
16796
            case TRANSACTION_ID:
16797
              if (field.type == TType.I64) {
16798
                this.transaction_id = iprot.readI64();
16799
                setTransaction_idIsSet(true);
16800
              } else { 
16801
                TProtocolUtil.skip(iprot, field.type);
16802
              }
16803
              break;
16804
          }
16805
          iprot.readFieldEnd();
16806
        }
16807
      }
16808
      iprot.readStructEnd();
16809
      validate();
16810
    }
16811
 
16812
    public void write(TProtocol oprot) throws TException {
16813
      validate();
16814
 
16815
      oprot.writeStructBegin(STRUCT_DESC);
16816
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
16817
      oprot.writeI64(this.transaction_id);
16818
      oprot.writeFieldEnd();
16819
      oprot.writeFieldStop();
16820
      oprot.writeStructEnd();
16821
    }
16822
 
16823
    @Override
16824
    public String toString() {
16825
      StringBuilder sb = new StringBuilder("getExtraInfo_args(");
16826
      boolean first = true;
16827
 
16828
      sb.append("transaction_id:");
16829
      sb.append(this.transaction_id);
16830
      first = false;
16831
      sb.append(")");
16832
      return sb.toString();
16833
    }
16834
 
16835
    public void validate() throws TException {
16836
      // check for required fields
16837
    }
16838
 
16839
  }
16840
 
16841
  public static class getExtraInfo_result implements TBase<getExtraInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<getExtraInfo_result>   {
16842
    private static final TStruct STRUCT_DESC = new TStruct("getExtraInfo_result");
16843
 
16844
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
16845
 
16846
    private ExtraOrderInfo success;
16847
 
16848
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16849
    public enum _Fields implements TFieldIdEnum {
16850
      SUCCESS((short)0, "success");
16851
 
16852
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16853
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16854
 
16855
      static {
16856
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16857
          byId.put((int)field._thriftId, field);
16858
          byName.put(field.getFieldName(), field);
16859
        }
16860
      }
16861
 
16862
      /**
16863
       * Find the _Fields constant that matches fieldId, or null if its not found.
16864
       */
16865
      public static _Fields findByThriftId(int fieldId) {
16866
        return byId.get(fieldId);
16867
      }
16868
 
16869
      /**
16870
       * Find the _Fields constant that matches fieldId, throwing an exception
16871
       * if it is not found.
16872
       */
16873
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16874
        _Fields fields = findByThriftId(fieldId);
16875
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16876
        return fields;
16877
      }
16878
 
16879
      /**
16880
       * Find the _Fields constant that matches name, or null if its not found.
16881
       */
16882
      public static _Fields findByName(String name) {
16883
        return byName.get(name);
16884
      }
16885
 
16886
      private final short _thriftId;
16887
      private final String _fieldName;
16888
 
16889
      _Fields(short thriftId, String fieldName) {
16890
        _thriftId = thriftId;
16891
        _fieldName = fieldName;
16892
      }
16893
 
16894
      public short getThriftFieldId() {
16895
        return _thriftId;
16896
      }
16897
 
16898
      public String getFieldName() {
16899
        return _fieldName;
16900
      }
16901
    }
16902
 
16903
    // isset id assignments
16904
 
16905
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16906
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16907
          new StructMetaData(TType.STRUCT, ExtraOrderInfo.class)));
16908
    }});
16909
 
16910
    static {
16911
      FieldMetaData.addStructMetaDataMap(getExtraInfo_result.class, metaDataMap);
16912
    }
16913
 
16914
    public getExtraInfo_result() {
16915
    }
16916
 
16917
    public getExtraInfo_result(
16918
      ExtraOrderInfo success)
16919
    {
16920
      this();
16921
      this.success = success;
16922
    }
16923
 
16924
    /**
16925
     * Performs a deep copy on <i>other</i>.
16926
     */
16927
    public getExtraInfo_result(getExtraInfo_result other) {
16928
      if (other.isSetSuccess()) {
16929
        this.success = new ExtraOrderInfo(other.success);
16930
      }
16931
    }
16932
 
16933
    public getExtraInfo_result deepCopy() {
16934
      return new getExtraInfo_result(this);
16935
    }
16936
 
16937
    @Deprecated
16938
    public getExtraInfo_result clone() {
16939
      return new getExtraInfo_result(this);
16940
    }
16941
 
16942
    public ExtraOrderInfo getSuccess() {
16943
      return this.success;
16944
    }
16945
 
16946
    public getExtraInfo_result setSuccess(ExtraOrderInfo success) {
16947
      this.success = success;
16948
      return this;
16949
    }
16950
 
16951
    public void unsetSuccess() {
16952
      this.success = null;
16953
    }
16954
 
16955
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16956
    public boolean isSetSuccess() {
16957
      return this.success != null;
16958
    }
16959
 
16960
    public void setSuccessIsSet(boolean value) {
16961
      if (!value) {
16962
        this.success = null;
16963
      }
16964
    }
16965
 
16966
    public void setFieldValue(_Fields field, Object value) {
16967
      switch (field) {
16968
      case SUCCESS:
16969
        if (value == null) {
16970
          unsetSuccess();
16971
        } else {
16972
          setSuccess((ExtraOrderInfo)value);
16973
        }
16974
        break;
16975
 
16976
      }
16977
    }
16978
 
16979
    public void setFieldValue(int fieldID, Object value) {
16980
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16981
    }
16982
 
16983
    public Object getFieldValue(_Fields field) {
16984
      switch (field) {
16985
      case SUCCESS:
16986
        return getSuccess();
16987
 
16988
      }
16989
      throw new IllegalStateException();
16990
    }
16991
 
16992
    public Object getFieldValue(int fieldId) {
16993
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16994
    }
16995
 
16996
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16997
    public boolean isSet(_Fields field) {
16998
      switch (field) {
16999
      case SUCCESS:
17000
        return isSetSuccess();
17001
      }
17002
      throw new IllegalStateException();
17003
    }
17004
 
17005
    public boolean isSet(int fieldID) {
17006
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17007
    }
17008
 
17009
    @Override
17010
    public boolean equals(Object that) {
17011
      if (that == null)
17012
        return false;
17013
      if (that instanceof getExtraInfo_result)
17014
        return this.equals((getExtraInfo_result)that);
17015
      return false;
17016
    }
17017
 
17018
    public boolean equals(getExtraInfo_result that) {
17019
      if (that == null)
17020
        return false;
17021
 
17022
      boolean this_present_success = true && this.isSetSuccess();
17023
      boolean that_present_success = true && that.isSetSuccess();
17024
      if (this_present_success || that_present_success) {
17025
        if (!(this_present_success && that_present_success))
17026
          return false;
17027
        if (!this.success.equals(that.success))
17028
          return false;
17029
      }
17030
 
17031
      return true;
17032
    }
17033
 
17034
    @Override
17035
    public int hashCode() {
17036
      return 0;
17037
    }
17038
 
17039
    public int compareTo(getExtraInfo_result other) {
17040
      if (!getClass().equals(other.getClass())) {
17041
        return getClass().getName().compareTo(other.getClass().getName());
17042
      }
17043
 
17044
      int lastComparison = 0;
17045
      getExtraInfo_result typedOther = (getExtraInfo_result)other;
17046
 
17047
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17048
      if (lastComparison != 0) {
17049
        return lastComparison;
17050
      }
17051
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17052
      if (lastComparison != 0) {
17053
        return lastComparison;
17054
      }
17055
      return 0;
17056
    }
17057
 
17058
    public void read(TProtocol iprot) throws TException {
17059
      TField field;
17060
      iprot.readStructBegin();
17061
      while (true)
17062
      {
17063
        field = iprot.readFieldBegin();
17064
        if (field.type == TType.STOP) { 
17065
          break;
17066
        }
17067
        _Fields fieldId = _Fields.findByThriftId(field.id);
17068
        if (fieldId == null) {
17069
          TProtocolUtil.skip(iprot, field.type);
17070
        } else {
17071
          switch (fieldId) {
17072
            case SUCCESS:
17073
              if (field.type == TType.STRUCT) {
17074
                this.success = new ExtraOrderInfo();
17075
                this.success.read(iprot);
17076
              } else { 
17077
                TProtocolUtil.skip(iprot, field.type);
17078
              }
17079
              break;
17080
          }
17081
          iprot.readFieldEnd();
17082
        }
17083
      }
17084
      iprot.readStructEnd();
17085
      validate();
17086
    }
17087
 
17088
    public void write(TProtocol oprot) throws TException {
17089
      oprot.writeStructBegin(STRUCT_DESC);
17090
 
17091
      if (this.isSetSuccess()) {
17092
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17093
        this.success.write(oprot);
17094
        oprot.writeFieldEnd();
17095
      }
17096
      oprot.writeFieldStop();
17097
      oprot.writeStructEnd();
17098
    }
17099
 
17100
    @Override
17101
    public String toString() {
17102
      StringBuilder sb = new StringBuilder("getExtraInfo_result(");
17103
      boolean first = true;
17104
 
17105
      sb.append("success:");
17106
      if (this.success == null) {
17107
        sb.append("null");
17108
      } else {
17109
        sb.append(this.success);
17110
      }
17111
      first = false;
17112
      sb.append(")");
17113
      return sb.toString();
17114
    }
17115
 
17116
    public void validate() throws TException {
17117
      // check for required fields
17118
    }
17119
 
17120
  }
17121
 
17122
  public static class setExtraInfo_args implements TBase<setExtraInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<setExtraInfo_args>   {
17123
    private static final TStruct STRUCT_DESC = new TStruct("setExtraInfo_args");
17124
 
17125
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transaction_id", TType.I64, (short)1);
17126
    private static final TField SKU_ID_FIELD_DESC = new TField("sku_id", TType.I64, (short)2);
17127
    private static final TField MODEL_FIELD_DESC = new TField("model", TType.STRING, (short)3);
17128
    private static final TField COLOUR_FIELD_DESC = new TField("colour", TType.STRING, (short)4);
17129
    private static final TField VENDOR_FIELD_DESC = new TField("vendor", TType.STRING, (short)5);
17130
 
17131
    private long transaction_id;
17132
    private long sku_id;
17133
    private String model;
17134
    private String colour;
17135
    private String vendor;
17136
 
17137
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17138
    public enum _Fields implements TFieldIdEnum {
17139
      TRANSACTION_ID((short)1, "transaction_id"),
17140
      SKU_ID((short)2, "sku_id"),
17141
      MODEL((short)3, "model"),
17142
      COLOUR((short)4, "colour"),
17143
      VENDOR((short)5, "vendor");
17144
 
17145
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17146
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17147
 
17148
      static {
17149
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17150
          byId.put((int)field._thriftId, field);
17151
          byName.put(field.getFieldName(), field);
17152
        }
17153
      }
17154
 
17155
      /**
17156
       * Find the _Fields constant that matches fieldId, or null if its not found.
17157
       */
17158
      public static _Fields findByThriftId(int fieldId) {
17159
        return byId.get(fieldId);
17160
      }
17161
 
17162
      /**
17163
       * Find the _Fields constant that matches fieldId, throwing an exception
17164
       * if it is not found.
17165
       */
17166
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17167
        _Fields fields = findByThriftId(fieldId);
17168
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17169
        return fields;
17170
      }
17171
 
17172
      /**
17173
       * Find the _Fields constant that matches name, or null if its not found.
17174
       */
17175
      public static _Fields findByName(String name) {
17176
        return byName.get(name);
17177
      }
17178
 
17179
      private final short _thriftId;
17180
      private final String _fieldName;
17181
 
17182
      _Fields(short thriftId, String fieldName) {
17183
        _thriftId = thriftId;
17184
        _fieldName = fieldName;
17185
      }
17186
 
17187
      public short getThriftFieldId() {
17188
        return _thriftId;
17189
      }
17190
 
17191
      public String getFieldName() {
17192
        return _fieldName;
17193
      }
17194
    }
17195
 
17196
    // isset id assignments
17197
    private static final int __TRANSACTION_ID_ISSET_ID = 0;
17198
    private static final int __SKU_ID_ISSET_ID = 1;
17199
    private BitSet __isset_bit_vector = new BitSet(2);
17200
 
17201
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17202
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transaction_id", TFieldRequirementType.DEFAULT, 
17203
          new FieldValueMetaData(TType.I64)));
17204
      put(_Fields.SKU_ID, new FieldMetaData("sku_id", TFieldRequirementType.DEFAULT, 
17205
          new FieldValueMetaData(TType.I64)));
17206
      put(_Fields.MODEL, new FieldMetaData("model", TFieldRequirementType.DEFAULT, 
17207
          new FieldValueMetaData(TType.STRING)));
17208
      put(_Fields.COLOUR, new FieldMetaData("colour", TFieldRequirementType.DEFAULT, 
17209
          new FieldValueMetaData(TType.STRING)));
17210
      put(_Fields.VENDOR, new FieldMetaData("vendor", TFieldRequirementType.DEFAULT, 
17211
          new FieldValueMetaData(TType.STRING)));
17212
    }});
17213
 
17214
    static {
17215
      FieldMetaData.addStructMetaDataMap(setExtraInfo_args.class, metaDataMap);
17216
    }
17217
 
17218
    public setExtraInfo_args() {
17219
    }
17220
 
17221
    public setExtraInfo_args(
17222
      long transaction_id,
17223
      long sku_id,
17224
      String model,
17225
      String colour,
17226
      String vendor)
17227
    {
17228
      this();
17229
      this.transaction_id = transaction_id;
17230
      setTransaction_idIsSet(true);
17231
      this.sku_id = sku_id;
17232
      setSku_idIsSet(true);
17233
      this.model = model;
17234
      this.colour = colour;
17235
      this.vendor = vendor;
17236
    }
17237
 
17238
    /**
17239
     * Performs a deep copy on <i>other</i>.
17240
     */
17241
    public setExtraInfo_args(setExtraInfo_args other) {
17242
      __isset_bit_vector.clear();
17243
      __isset_bit_vector.or(other.__isset_bit_vector);
17244
      this.transaction_id = other.transaction_id;
17245
      this.sku_id = other.sku_id;
17246
      if (other.isSetModel()) {
17247
        this.model = other.model;
17248
      }
17249
      if (other.isSetColour()) {
17250
        this.colour = other.colour;
17251
      }
17252
      if (other.isSetVendor()) {
17253
        this.vendor = other.vendor;
17254
      }
17255
    }
17256
 
17257
    public setExtraInfo_args deepCopy() {
17258
      return new setExtraInfo_args(this);
17259
    }
17260
 
17261
    @Deprecated
17262
    public setExtraInfo_args clone() {
17263
      return new setExtraInfo_args(this);
17264
    }
17265
 
17266
    public long getTransaction_id() {
17267
      return this.transaction_id;
17268
    }
17269
 
17270
    public setExtraInfo_args setTransaction_id(long transaction_id) {
17271
      this.transaction_id = transaction_id;
17272
      setTransaction_idIsSet(true);
17273
      return this;
17274
    }
17275
 
17276
    public void unsetTransaction_id() {
17277
      __isset_bit_vector.clear(__TRANSACTION_ID_ISSET_ID);
17278
    }
17279
 
17280
    /** Returns true if field transaction_id is set (has been asigned a value) and false otherwise */
17281
    public boolean isSetTransaction_id() {
17282
      return __isset_bit_vector.get(__TRANSACTION_ID_ISSET_ID);
17283
    }
17284
 
17285
    public void setTransaction_idIsSet(boolean value) {
17286
      __isset_bit_vector.set(__TRANSACTION_ID_ISSET_ID, value);
17287
    }
17288
 
17289
    public long getSku_id() {
17290
      return this.sku_id;
17291
    }
17292
 
17293
    public setExtraInfo_args setSku_id(long sku_id) {
17294
      this.sku_id = sku_id;
17295
      setSku_idIsSet(true);
17296
      return this;
17297
    }
17298
 
17299
    public void unsetSku_id() {
17300
      __isset_bit_vector.clear(__SKU_ID_ISSET_ID);
17301
    }
17302
 
17303
    /** Returns true if field sku_id is set (has been asigned a value) and false otherwise */
17304
    public boolean isSetSku_id() {
17305
      return __isset_bit_vector.get(__SKU_ID_ISSET_ID);
17306
    }
17307
 
17308
    public void setSku_idIsSet(boolean value) {
17309
      __isset_bit_vector.set(__SKU_ID_ISSET_ID, value);
17310
    }
17311
 
17312
    public String getModel() {
17313
      return this.model;
17314
    }
17315
 
17316
    public setExtraInfo_args setModel(String model) {
17317
      this.model = model;
17318
      return this;
17319
    }
17320
 
17321
    public void unsetModel() {
17322
      this.model = null;
17323
    }
17324
 
17325
    /** Returns true if field model is set (has been asigned a value) and false otherwise */
17326
    public boolean isSetModel() {
17327
      return this.model != null;
17328
    }
17329
 
17330
    public void setModelIsSet(boolean value) {
17331
      if (!value) {
17332
        this.model = null;
17333
      }
17334
    }
17335
 
17336
    public String getColour() {
17337
      return this.colour;
17338
    }
17339
 
17340
    public setExtraInfo_args setColour(String colour) {
17341
      this.colour = colour;
17342
      return this;
17343
    }
17344
 
17345
    public void unsetColour() {
17346
      this.colour = null;
17347
    }
17348
 
17349
    /** Returns true if field colour is set (has been asigned a value) and false otherwise */
17350
    public boolean isSetColour() {
17351
      return this.colour != null;
17352
    }
17353
 
17354
    public void setColourIsSet(boolean value) {
17355
      if (!value) {
17356
        this.colour = null;
17357
      }
17358
    }
17359
 
17360
    public String getVendor() {
17361
      return this.vendor;
17362
    }
17363
 
17364
    public setExtraInfo_args setVendor(String vendor) {
17365
      this.vendor = vendor;
17366
      return this;
17367
    }
17368
 
17369
    public void unsetVendor() {
17370
      this.vendor = null;
17371
    }
17372
 
17373
    /** Returns true if field vendor is set (has been asigned a value) and false otherwise */
17374
    public boolean isSetVendor() {
17375
      return this.vendor != null;
17376
    }
17377
 
17378
    public void setVendorIsSet(boolean value) {
17379
      if (!value) {
17380
        this.vendor = null;
17381
      }
17382
    }
17383
 
17384
    public void setFieldValue(_Fields field, Object value) {
17385
      switch (field) {
17386
      case TRANSACTION_ID:
17387
        if (value == null) {
17388
          unsetTransaction_id();
17389
        } else {
17390
          setTransaction_id((Long)value);
17391
        }
17392
        break;
17393
 
17394
      case SKU_ID:
17395
        if (value == null) {
17396
          unsetSku_id();
17397
        } else {
17398
          setSku_id((Long)value);
17399
        }
17400
        break;
17401
 
17402
      case MODEL:
17403
        if (value == null) {
17404
          unsetModel();
17405
        } else {
17406
          setModel((String)value);
17407
        }
17408
        break;
17409
 
17410
      case COLOUR:
17411
        if (value == null) {
17412
          unsetColour();
17413
        } else {
17414
          setColour((String)value);
17415
        }
17416
        break;
17417
 
17418
      case VENDOR:
17419
        if (value == null) {
17420
          unsetVendor();
17421
        } else {
17422
          setVendor((String)value);
17423
        }
17424
        break;
17425
 
17426
      }
17427
    }
17428
 
17429
    public void setFieldValue(int fieldID, Object value) {
17430
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17431
    }
17432
 
17433
    public Object getFieldValue(_Fields field) {
17434
      switch (field) {
17435
      case TRANSACTION_ID:
17436
        return new Long(getTransaction_id());
17437
 
17438
      case SKU_ID:
17439
        return new Long(getSku_id());
17440
 
17441
      case MODEL:
17442
        return getModel();
17443
 
17444
      case COLOUR:
17445
        return getColour();
17446
 
17447
      case VENDOR:
17448
        return getVendor();
17449
 
17450
      }
17451
      throw new IllegalStateException();
17452
    }
17453
 
17454
    public Object getFieldValue(int fieldId) {
17455
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17456
    }
17457
 
17458
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17459
    public boolean isSet(_Fields field) {
17460
      switch (field) {
17461
      case TRANSACTION_ID:
17462
        return isSetTransaction_id();
17463
      case SKU_ID:
17464
        return isSetSku_id();
17465
      case MODEL:
17466
        return isSetModel();
17467
      case COLOUR:
17468
        return isSetColour();
17469
      case VENDOR:
17470
        return isSetVendor();
17471
      }
17472
      throw new IllegalStateException();
17473
    }
17474
 
17475
    public boolean isSet(int fieldID) {
17476
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17477
    }
17478
 
17479
    @Override
17480
    public boolean equals(Object that) {
17481
      if (that == null)
17482
        return false;
17483
      if (that instanceof setExtraInfo_args)
17484
        return this.equals((setExtraInfo_args)that);
17485
      return false;
17486
    }
17487
 
17488
    public boolean equals(setExtraInfo_args that) {
17489
      if (that == null)
17490
        return false;
17491
 
17492
      boolean this_present_transaction_id = true;
17493
      boolean that_present_transaction_id = true;
17494
      if (this_present_transaction_id || that_present_transaction_id) {
17495
        if (!(this_present_transaction_id && that_present_transaction_id))
17496
          return false;
17497
        if (this.transaction_id != that.transaction_id)
17498
          return false;
17499
      }
17500
 
17501
      boolean this_present_sku_id = true;
17502
      boolean that_present_sku_id = true;
17503
      if (this_present_sku_id || that_present_sku_id) {
17504
        if (!(this_present_sku_id && that_present_sku_id))
17505
          return false;
17506
        if (this.sku_id != that.sku_id)
17507
          return false;
17508
      }
17509
 
17510
      boolean this_present_model = true && this.isSetModel();
17511
      boolean that_present_model = true && that.isSetModel();
17512
      if (this_present_model || that_present_model) {
17513
        if (!(this_present_model && that_present_model))
17514
          return false;
17515
        if (!this.model.equals(that.model))
17516
          return false;
17517
      }
17518
 
17519
      boolean this_present_colour = true && this.isSetColour();
17520
      boolean that_present_colour = true && that.isSetColour();
17521
      if (this_present_colour || that_present_colour) {
17522
        if (!(this_present_colour && that_present_colour))
17523
          return false;
17524
        if (!this.colour.equals(that.colour))
17525
          return false;
17526
      }
17527
 
17528
      boolean this_present_vendor = true && this.isSetVendor();
17529
      boolean that_present_vendor = true && that.isSetVendor();
17530
      if (this_present_vendor || that_present_vendor) {
17531
        if (!(this_present_vendor && that_present_vendor))
17532
          return false;
17533
        if (!this.vendor.equals(that.vendor))
17534
          return false;
17535
      }
17536
 
17537
      return true;
17538
    }
17539
 
17540
    @Override
17541
    public int hashCode() {
17542
      return 0;
17543
    }
17544
 
17545
    public int compareTo(setExtraInfo_args other) {
17546
      if (!getClass().equals(other.getClass())) {
17547
        return getClass().getName().compareTo(other.getClass().getName());
17548
      }
17549
 
17550
      int lastComparison = 0;
17551
      setExtraInfo_args typedOther = (setExtraInfo_args)other;
17552
 
17553
      lastComparison = Boolean.valueOf(isSetTransaction_id()).compareTo(isSetTransaction_id());
17554
      if (lastComparison != 0) {
17555
        return lastComparison;
17556
      }
17557
      lastComparison = TBaseHelper.compareTo(transaction_id, typedOther.transaction_id);
17558
      if (lastComparison != 0) {
17559
        return lastComparison;
17560
      }
17561
      lastComparison = Boolean.valueOf(isSetSku_id()).compareTo(isSetSku_id());
17562
      if (lastComparison != 0) {
17563
        return lastComparison;
17564
      }
17565
      lastComparison = TBaseHelper.compareTo(sku_id, typedOther.sku_id);
17566
      if (lastComparison != 0) {
17567
        return lastComparison;
17568
      }
17569
      lastComparison = Boolean.valueOf(isSetModel()).compareTo(isSetModel());
17570
      if (lastComparison != 0) {
17571
        return lastComparison;
17572
      }
17573
      lastComparison = TBaseHelper.compareTo(model, typedOther.model);
17574
      if (lastComparison != 0) {
17575
        return lastComparison;
17576
      }
17577
      lastComparison = Boolean.valueOf(isSetColour()).compareTo(isSetColour());
17578
      if (lastComparison != 0) {
17579
        return lastComparison;
17580
      }
17581
      lastComparison = TBaseHelper.compareTo(colour, typedOther.colour);
17582
      if (lastComparison != 0) {
17583
        return lastComparison;
17584
      }
17585
      lastComparison = Boolean.valueOf(isSetVendor()).compareTo(isSetVendor());
17586
      if (lastComparison != 0) {
17587
        return lastComparison;
17588
      }
17589
      lastComparison = TBaseHelper.compareTo(vendor, typedOther.vendor);
17590
      if (lastComparison != 0) {
17591
        return lastComparison;
17592
      }
17593
      return 0;
17594
    }
17595
 
17596
    public void read(TProtocol iprot) throws TException {
17597
      TField field;
17598
      iprot.readStructBegin();
17599
      while (true)
17600
      {
17601
        field = iprot.readFieldBegin();
17602
        if (field.type == TType.STOP) { 
17603
          break;
17604
        }
17605
        _Fields fieldId = _Fields.findByThriftId(field.id);
17606
        if (fieldId == null) {
17607
          TProtocolUtil.skip(iprot, field.type);
17608
        } else {
17609
          switch (fieldId) {
17610
            case TRANSACTION_ID:
17611
              if (field.type == TType.I64) {
17612
                this.transaction_id = iprot.readI64();
17613
                setTransaction_idIsSet(true);
17614
              } else { 
17615
                TProtocolUtil.skip(iprot, field.type);
17616
              }
17617
              break;
17618
            case SKU_ID:
17619
              if (field.type == TType.I64) {
17620
                this.sku_id = iprot.readI64();
17621
                setSku_idIsSet(true);
17622
              } else { 
17623
                TProtocolUtil.skip(iprot, field.type);
17624
              }
17625
              break;
17626
            case MODEL:
17627
              if (field.type == TType.STRING) {
17628
                this.model = iprot.readString();
17629
              } else { 
17630
                TProtocolUtil.skip(iprot, field.type);
17631
              }
17632
              break;
17633
            case COLOUR:
17634
              if (field.type == TType.STRING) {
17635
                this.colour = iprot.readString();
17636
              } else { 
17637
                TProtocolUtil.skip(iprot, field.type);
17638
              }
17639
              break;
17640
            case VENDOR:
17641
              if (field.type == TType.STRING) {
17642
                this.vendor = iprot.readString();
17643
              } else { 
17644
                TProtocolUtil.skip(iprot, field.type);
17645
              }
17646
              break;
17647
          }
17648
          iprot.readFieldEnd();
17649
        }
17650
      }
17651
      iprot.readStructEnd();
17652
      validate();
17653
    }
17654
 
17655
    public void write(TProtocol oprot) throws TException {
17656
      validate();
17657
 
17658
      oprot.writeStructBegin(STRUCT_DESC);
17659
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
17660
      oprot.writeI64(this.transaction_id);
17661
      oprot.writeFieldEnd();
17662
      oprot.writeFieldBegin(SKU_ID_FIELD_DESC);
17663
      oprot.writeI64(this.sku_id);
17664
      oprot.writeFieldEnd();
17665
      if (this.model != null) {
17666
        oprot.writeFieldBegin(MODEL_FIELD_DESC);
17667
        oprot.writeString(this.model);
17668
        oprot.writeFieldEnd();
17669
      }
17670
      if (this.colour != null) {
17671
        oprot.writeFieldBegin(COLOUR_FIELD_DESC);
17672
        oprot.writeString(this.colour);
17673
        oprot.writeFieldEnd();
17674
      }
17675
      if (this.vendor != null) {
17676
        oprot.writeFieldBegin(VENDOR_FIELD_DESC);
17677
        oprot.writeString(this.vendor);
17678
        oprot.writeFieldEnd();
17679
      }
17680
      oprot.writeFieldStop();
17681
      oprot.writeStructEnd();
17682
    }
17683
 
17684
    @Override
17685
    public String toString() {
17686
      StringBuilder sb = new StringBuilder("setExtraInfo_args(");
17687
      boolean first = true;
17688
 
17689
      sb.append("transaction_id:");
17690
      sb.append(this.transaction_id);
17691
      first = false;
17692
      if (!first) sb.append(", ");
17693
      sb.append("sku_id:");
17694
      sb.append(this.sku_id);
17695
      first = false;
17696
      if (!first) sb.append(", ");
17697
      sb.append("model:");
17698
      if (this.model == null) {
17699
        sb.append("null");
17700
      } else {
17701
        sb.append(this.model);
17702
      }
17703
      first = false;
17704
      if (!first) sb.append(", ");
17705
      sb.append("colour:");
17706
      if (this.colour == null) {
17707
        sb.append("null");
17708
      } else {
17709
        sb.append(this.colour);
17710
      }
17711
      first = false;
17712
      if (!first) sb.append(", ");
17713
      sb.append("vendor:");
17714
      if (this.vendor == null) {
17715
        sb.append("null");
17716
      } else {
17717
        sb.append(this.vendor);
17718
      }
17719
      first = false;
17720
      sb.append(")");
17721
      return sb.toString();
17722
    }
17723
 
17724
    public void validate() throws TException {
17725
      // check for required fields
17726
    }
17727
 
17728
  }
17729
 
17730
  public static class setExtraInfo_result implements TBase<setExtraInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<setExtraInfo_result>   {
17731
    private static final TStruct STRUCT_DESC = new TStruct("setExtraInfo_result");
17732
 
17733
 
17734
 
17735
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17736
    public enum _Fields implements TFieldIdEnum {
17737
;
17738
 
17739
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17740
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17741
 
17742
      static {
17743
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17744
          byId.put((int)field._thriftId, field);
17745
          byName.put(field.getFieldName(), field);
17746
        }
17747
      }
17748
 
17749
      /**
17750
       * Find the _Fields constant that matches fieldId, or null if its not found.
17751
       */
17752
      public static _Fields findByThriftId(int fieldId) {
17753
        return byId.get(fieldId);
17754
      }
17755
 
17756
      /**
17757
       * Find the _Fields constant that matches fieldId, throwing an exception
17758
       * if it is not found.
17759
       */
17760
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17761
        _Fields fields = findByThriftId(fieldId);
17762
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17763
        return fields;
17764
      }
17765
 
17766
      /**
17767
       * Find the _Fields constant that matches name, or null if its not found.
17768
       */
17769
      public static _Fields findByName(String name) {
17770
        return byName.get(name);
17771
      }
17772
 
17773
      private final short _thriftId;
17774
      private final String _fieldName;
17775
 
17776
      _Fields(short thriftId, String fieldName) {
17777
        _thriftId = thriftId;
17778
        _fieldName = fieldName;
17779
      }
17780
 
17781
      public short getThriftFieldId() {
17782
        return _thriftId;
17783
      }
17784
 
17785
      public String getFieldName() {
17786
        return _fieldName;
17787
      }
17788
    }
17789
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17790
    }});
17791
 
17792
    static {
17793
      FieldMetaData.addStructMetaDataMap(setExtraInfo_result.class, metaDataMap);
17794
    }
17795
 
17796
    public setExtraInfo_result() {
17797
    }
17798
 
17799
    /**
17800
     * Performs a deep copy on <i>other</i>.
17801
     */
17802
    public setExtraInfo_result(setExtraInfo_result other) {
17803
    }
17804
 
17805
    public setExtraInfo_result deepCopy() {
17806
      return new setExtraInfo_result(this);
17807
    }
17808
 
17809
    @Deprecated
17810
    public setExtraInfo_result clone() {
17811
      return new setExtraInfo_result(this);
17812
    }
17813
 
17814
    public void setFieldValue(_Fields field, Object value) {
17815
      switch (field) {
17816
      }
17817
    }
17818
 
17819
    public void setFieldValue(int fieldID, Object value) {
17820
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17821
    }
17822
 
17823
    public Object getFieldValue(_Fields field) {
17824
      switch (field) {
17825
      }
17826
      throw new IllegalStateException();
17827
    }
17828
 
17829
    public Object getFieldValue(int fieldId) {
17830
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17831
    }
17832
 
17833
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17834
    public boolean isSet(_Fields field) {
17835
      switch (field) {
17836
      }
17837
      throw new IllegalStateException();
17838
    }
17839
 
17840
    public boolean isSet(int fieldID) {
17841
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17842
    }
17843
 
17844
    @Override
17845
    public boolean equals(Object that) {
17846
      if (that == null)
17847
        return false;
17848
      if (that instanceof setExtraInfo_result)
17849
        return this.equals((setExtraInfo_result)that);
17850
      return false;
17851
    }
17852
 
17853
    public boolean equals(setExtraInfo_result that) {
17854
      if (that == null)
17855
        return false;
17856
 
17857
      return true;
17858
    }
17859
 
17860
    @Override
17861
    public int hashCode() {
17862
      return 0;
17863
    }
17864
 
17865
    public int compareTo(setExtraInfo_result other) {
17866
      if (!getClass().equals(other.getClass())) {
17867
        return getClass().getName().compareTo(other.getClass().getName());
17868
      }
17869
 
17870
      int lastComparison = 0;
17871
      setExtraInfo_result typedOther = (setExtraInfo_result)other;
17872
 
17873
      return 0;
17874
    }
17875
 
17876
    public void read(TProtocol iprot) throws TException {
17877
      TField field;
17878
      iprot.readStructBegin();
17879
      while (true)
17880
      {
17881
        field = iprot.readFieldBegin();
17882
        if (field.type == TType.STOP) { 
17883
          break;
17884
        }
17885
        _Fields fieldId = _Fields.findByThriftId(field.id);
17886
        if (fieldId == null) {
17887
          TProtocolUtil.skip(iprot, field.type);
17888
        } else {
17889
          switch (fieldId) {
17890
          }
17891
          iprot.readFieldEnd();
17892
        }
17893
      }
17894
      iprot.readStructEnd();
17895
      validate();
17896
    }
17897
 
17898
    public void write(TProtocol oprot) throws TException {
17899
      oprot.writeStructBegin(STRUCT_DESC);
17900
 
17901
      oprot.writeFieldStop();
17902
      oprot.writeStructEnd();
17903
    }
17904
 
17905
    @Override
17906
    public String toString() {
17907
      StringBuilder sb = new StringBuilder("setExtraInfo_result(");
17908
      boolean first = true;
17909
 
17910
      sb.append(")");
17911
      return sb.toString();
17912
    }
17913
 
17914
    public void validate() throws TException {
17915
      // check for required fields
17916
    }
17917
 
17918
  }
17919
 
68 ashish 17920
}