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
 
358 ashish 40
    public List<Transaction> getAllTransactions(TransactionStatus status, long from_date, long to_date, long warehouse_id) 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
 
358 ashish 187
    public List<Transaction> getAllTransactions(TransactionStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 188
    {
358 ashish 189
      send_getAllTransactions(status, from_date, to_date, warehouse_id);
68 ashish 190
      return recv_getAllTransactions();
191
    }
192
 
358 ashish 193
    public void send_getAllTransactions(TransactionStatus status, long from_date, long to_date, long warehouse_id) 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;
358 ashish 200
      args.warehouse_id = warehouse_id;
68 ashish 201
      args.write(oprot_);
202
      oprot_.writeMessageEnd();
203
      oprot_.getTransport().flush();
204
    }
205
 
206
    public List<Transaction> recv_getAllTransactions() throws TransactionServiceException, TException
207
    {
208
      TMessage msg = iprot_.readMessageBegin();
209
      if (msg.type == TMessageType.EXCEPTION) {
210
        TApplicationException x = TApplicationException.read(iprot_);
211
        iprot_.readMessageEnd();
212
        throw x;
213
      }
214
      getAllTransactions_result result = new getAllTransactions_result();
215
      result.read(iprot_);
216
      iprot_.readMessageEnd();
217
      if (result.isSetSuccess()) {
218
        return result.success;
219
      }
220
      if (result.ex != null) {
221
        throw result.ex;
222
      }
223
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllTransactions failed: unknown result");
224
    }
225
 
132 ashish 226
    public List<Transaction> getTransactionsForShipmentStatus(ShipmentStatus status, long from_date, long to_date) throws TransactionServiceException, TException
68 ashish 227
    {
132 ashish 228
      send_getTransactionsForShipmentStatus(status, from_date, to_date);
68 ashish 229
      return recv_getTransactionsForShipmentStatus();
230
    }
231
 
132 ashish 232
    public void send_getTransactionsForShipmentStatus(ShipmentStatus status, long from_date, long to_date) throws TException
68 ashish 233
    {
234
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShipmentStatus", TMessageType.CALL, seqid_));
235
      getTransactionsForShipmentStatus_args args = new getTransactionsForShipmentStatus_args();
236
      args.status = status;
132 ashish 237
      args.from_date = from_date;
238
      args.to_date = to_date;
68 ashish 239
      args.write(oprot_);
240
      oprot_.writeMessageEnd();
241
      oprot_.getTransport().flush();
242
    }
243
 
244
    public List<Transaction> recv_getTransactionsForShipmentStatus() throws TransactionServiceException, TException
245
    {
246
      TMessage msg = iprot_.readMessageBegin();
247
      if (msg.type == TMessageType.EXCEPTION) {
248
        TApplicationException x = TApplicationException.read(iprot_);
249
        iprot_.readMessageEnd();
250
        throw x;
251
      }
252
      getTransactionsForShipmentStatus_result result = new getTransactionsForShipmentStatus_result();
253
      result.read(iprot_);
254
      iprot_.readMessageEnd();
255
      if (result.isSetSuccess()) {
256
        return result.success;
257
      }
258
      if (result.ex != null) {
259
        throw result.ex;
260
      }
261
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShipmentStatus failed: unknown result");
262
    }
263
 
132 ashish 264
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 265
    {
132 ashish 266
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 267
      return recv_getTransactionsForCustomer();
268
    }
269
 
132 ashish 270
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 271
    {
272
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
273
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
274
      args.customerId = customerId;
132 ashish 275
      args.from_date = from_date;
276
      args.to_date = to_date;
68 ashish 277
      args.status = status;
278
      args.write(oprot_);
279
      oprot_.writeMessageEnd();
280
      oprot_.getTransport().flush();
281
    }
282
 
283
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
284
    {
285
      TMessage msg = iprot_.readMessageBegin();
286
      if (msg.type == TMessageType.EXCEPTION) {
287
        TApplicationException x = TApplicationException.read(iprot_);
288
        iprot_.readMessageEnd();
289
        throw x;
290
      }
291
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
292
      result.read(iprot_);
293
      iprot_.readMessageEnd();
294
      if (result.isSetSuccess()) {
295
        return result.success;
296
      }
297
      if (result.ex != null) {
298
        throw result.ex;
299
      }
300
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
301
    }
302
 
132 ashish 303
    public List<Transaction> getTransactionsForCustomerAndShipmentStatus(long customerId, long from_date, long to_date, ShipmentStatus status) throws TransactionServiceException, TException
68 ashish 304
    {
132 ashish 305
      send_getTransactionsForCustomerAndShipmentStatus(customerId, from_date, to_date, status);
68 ashish 306
      return recv_getTransactionsForCustomerAndShipmentStatus();
307
    }
308
 
132 ashish 309
    public void send_getTransactionsForCustomerAndShipmentStatus(long customerId, long from_date, long to_date, ShipmentStatus status) throws TException
68 ashish 310
    {
311
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomerAndShipmentStatus", TMessageType.CALL, seqid_));
312
      getTransactionsForCustomerAndShipmentStatus_args args = new getTransactionsForCustomerAndShipmentStatus_args();
313
      args.customerId = customerId;
132 ashish 314
      args.from_date = from_date;
315
      args.to_date = to_date;
68 ashish 316
      args.status = status;
317
      args.write(oprot_);
318
      oprot_.writeMessageEnd();
319
      oprot_.getTransport().flush();
320
    }
321
 
322
    public List<Transaction> recv_getTransactionsForCustomerAndShipmentStatus() throws TransactionServiceException, TException
323
    {
324
      TMessage msg = iprot_.readMessageBegin();
325
      if (msg.type == TMessageType.EXCEPTION) {
326
        TApplicationException x = TApplicationException.read(iprot_);
327
        iprot_.readMessageEnd();
328
        throw x;
329
      }
330
      getTransactionsForCustomerAndShipmentStatus_result result = new getTransactionsForCustomerAndShipmentStatus_result();
331
      result.read(iprot_);
332
      iprot_.readMessageEnd();
333
      if (result.isSetSuccess()) {
334
        return result.success;
335
      }
336
      if (result.ex != null) {
337
        throw result.ex;
338
      }
339
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomerAndShipmentStatus failed: unknown result");
340
    }
341
 
132 ashish 342
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
343
    {
344
      send_getTransactionsForShoppingCartId(shoppingCartId);
345
      return recv_getTransactionsForShoppingCartId();
346
    }
347
 
348
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
349
    {
350
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
351
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
352
      args.shoppingCartId = shoppingCartId;
353
      args.write(oprot_);
354
      oprot_.writeMessageEnd();
355
      oprot_.getTransport().flush();
356
    }
357
 
358
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
359
    {
360
      TMessage msg = iprot_.readMessageBegin();
361
      if (msg.type == TMessageType.EXCEPTION) {
362
        TApplicationException x = TApplicationException.read(iprot_);
363
        iprot_.readMessageEnd();
364
        throw x;
365
      }
366
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
367
      result.read(iprot_);
368
      iprot_.readMessageEnd();
369
      if (result.isSetSuccess()) {
370
        return result.success;
371
      }
372
      if (result.ex != null) {
373
        throw result.ex;
374
      }
375
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
376
    }
377
 
68 ashish 378
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
379
    {
380
      send_getTransactionStatus(transactionId);
381
      return recv_getTransactionStatus();
382
    }
383
 
384
    public void send_getTransactionStatus(long transactionId) throws TException
385
    {
386
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
387
      getTransactionStatus_args args = new getTransactionStatus_args();
388
      args.transactionId = transactionId;
389
      args.write(oprot_);
390
      oprot_.writeMessageEnd();
391
      oprot_.getTransport().flush();
392
    }
393
 
394
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
395
    {
396
      TMessage msg = iprot_.readMessageBegin();
397
      if (msg.type == TMessageType.EXCEPTION) {
398
        TApplicationException x = TApplicationException.read(iprot_);
399
        iprot_.readMessageEnd();
400
        throw x;
401
      }
402
      getTransactionStatus_result result = new getTransactionStatus_result();
403
      result.read(iprot_);
404
      iprot_.readMessageEnd();
405
      if (result.isSetSuccess()) {
406
        return result.success;
407
      }
408
      if (result.ex != null) {
409
        throw result.ex;
410
      }
411
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
412
    }
413
 
414
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
415
    {
416
      send_changeTransactionStatus(transactionId, status, description);
417
      return recv_changeTransactionStatus();
418
    }
419
 
420
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
421
    {
422
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
423
      changeTransactionStatus_args args = new changeTransactionStatus_args();
424
      args.transactionId = transactionId;
425
      args.status = status;
426
      args.description = description;
427
      args.write(oprot_);
428
      oprot_.writeMessageEnd();
429
      oprot_.getTransport().flush();
430
    }
431
 
432
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
433
    {
434
      TMessage msg = iprot_.readMessageBegin();
435
      if (msg.type == TMessageType.EXCEPTION) {
436
        TApplicationException x = TApplicationException.read(iprot_);
437
        iprot_.readMessageEnd();
438
        throw x;
439
      }
440
      changeTransactionStatus_result result = new changeTransactionStatus_result();
441
      result.read(iprot_);
442
      iprot_.readMessageEnd();
443
      if (result.isSetSuccess()) {
444
        return result.success;
445
      }
446
      if (result.ex != null) {
447
        throw result.ex;
448
      }
449
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
450
    }
451
 
452
    public OrderInfo getOrderInfo(long transactionId) throws TransactionServiceException, TException
453
    {
454
      send_getOrderInfo(transactionId);
455
      return recv_getOrderInfo();
456
    }
457
 
458
    public void send_getOrderInfo(long transactionId) throws TException
459
    {
460
      oprot_.writeMessageBegin(new TMessage("getOrderInfo", TMessageType.CALL, seqid_));
461
      getOrderInfo_args args = new getOrderInfo_args();
462
      args.transactionId = transactionId;
463
      args.write(oprot_);
464
      oprot_.writeMessageEnd();
465
      oprot_.getTransport().flush();
466
    }
467
 
468
    public OrderInfo recv_getOrderInfo() throws TransactionServiceException, TException
469
    {
470
      TMessage msg = iprot_.readMessageBegin();
471
      if (msg.type == TMessageType.EXCEPTION) {
472
        TApplicationException x = TApplicationException.read(iprot_);
473
        iprot_.readMessageEnd();
474
        throw x;
475
      }
476
      getOrderInfo_result result = new getOrderInfo_result();
477
      result.read(iprot_);
478
      iprot_.readMessageEnd();
479
      if (result.isSetSuccess()) {
480
        return result.success;
481
      }
482
      if (result.ex != null) {
483
        throw result.ex;
484
      }
485
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrderInfo failed: unknown result");
486
    }
487
 
488
    public ShipmentInfo getShippingInfo(long transactionId) throws TransactionServiceException, TException
489
    {
490
      send_getShippingInfo(transactionId);
491
      return recv_getShippingInfo();
492
    }
493
 
494
    public void send_getShippingInfo(long transactionId) throws TException
495
    {
496
      oprot_.writeMessageBegin(new TMessage("getShippingInfo", TMessageType.CALL, seqid_));
497
      getShippingInfo_args args = new getShippingInfo_args();
498
      args.transactionId = transactionId;
499
      args.write(oprot_);
500
      oprot_.writeMessageEnd();
501
      oprot_.getTransport().flush();
502
    }
503
 
504
    public ShipmentInfo recv_getShippingInfo() throws TransactionServiceException, TException
505
    {
506
      TMessage msg = iprot_.readMessageBegin();
507
      if (msg.type == TMessageType.EXCEPTION) {
508
        TApplicationException x = TApplicationException.read(iprot_);
509
        iprot_.readMessageEnd();
510
        throw x;
511
      }
512
      getShippingInfo_result result = new getShippingInfo_result();
513
      result.read(iprot_);
514
      iprot_.readMessageEnd();
515
      if (result.isSetSuccess()) {
516
        return result.success;
517
      }
518
      if (result.ex != null) {
519
        throw result.ex;
520
      }
521
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getShippingInfo failed: unknown result");
522
    }
523
 
524
    public BillingInfo getBillingInfo(long transactionId) throws TransactionServiceException, TException
525
    {
526
      send_getBillingInfo(transactionId);
527
      return recv_getBillingInfo();
528
    }
529
 
530
    public void send_getBillingInfo(long transactionId) throws TException
531
    {
532
      oprot_.writeMessageBegin(new TMessage("getBillingInfo", TMessageType.CALL, seqid_));
533
      getBillingInfo_args args = new getBillingInfo_args();
534
      args.transactionId = transactionId;
535
      args.write(oprot_);
536
      oprot_.writeMessageEnd();
537
      oprot_.getTransport().flush();
538
    }
539
 
540
    public BillingInfo recv_getBillingInfo() throws TransactionServiceException, TException
541
    {
542
      TMessage msg = iprot_.readMessageBegin();
543
      if (msg.type == TMessageType.EXCEPTION) {
544
        TApplicationException x = TApplicationException.read(iprot_);
545
        iprot_.readMessageEnd();
546
        throw x;
547
      }
548
      getBillingInfo_result result = new getBillingInfo_result();
549
      result.read(iprot_);
550
      iprot_.readMessageEnd();
551
      if (result.isSetSuccess()) {
552
        return result.success;
553
      }
554
      if (result.ex != null) {
555
        throw result.ex;
556
      }
557
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getBillingInfo failed: unknown result");
558
    }
559
 
560
    public boolean addBilling(long tranactionId, Billing billing) throws TransactionServiceException, TException
561
    {
562
      send_addBilling(tranactionId, billing);
563
      return recv_addBilling();
564
    }
565
 
566
    public void send_addBilling(long tranactionId, Billing billing) throws TException
567
    {
568
      oprot_.writeMessageBegin(new TMessage("addBilling", TMessageType.CALL, seqid_));
569
      addBilling_args args = new addBilling_args();
570
      args.tranactionId = tranactionId;
571
      args.billing = billing;
572
      args.write(oprot_);
573
      oprot_.writeMessageEnd();
574
      oprot_.getTransport().flush();
575
    }
576
 
577
    public boolean recv_addBilling() throws TransactionServiceException, TException
578
    {
579
      TMessage msg = iprot_.readMessageBegin();
580
      if (msg.type == TMessageType.EXCEPTION) {
581
        TApplicationException x = TApplicationException.read(iprot_);
582
        iprot_.readMessageEnd();
583
        throw x;
584
      }
585
      addBilling_result result = new addBilling_result();
586
      result.read(iprot_);
587
      iprot_.readMessageEnd();
588
      if (result.isSetSuccess()) {
589
        return result.success;
590
      }
591
      if (result.ex != null) {
592
        throw result.ex;
593
      }
594
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBilling failed: unknown result");
595
    }
596
 
597
    public boolean setShippingTracker(long transactionId, long shippingId, String trackingId, String airwayBillNo, String provider) throws TransactionServiceException, TException
598
    {
599
      send_setShippingTracker(transactionId, shippingId, trackingId, airwayBillNo, provider);
600
      return recv_setShippingTracker();
601
    }
602
 
603
    public void send_setShippingTracker(long transactionId, long shippingId, String trackingId, String airwayBillNo, String provider) throws TException
604
    {
605
      oprot_.writeMessageBegin(new TMessage("setShippingTracker", TMessageType.CALL, seqid_));
606
      setShippingTracker_args args = new setShippingTracker_args();
607
      args.transactionId = transactionId;
608
      args.shippingId = shippingId;
609
      args.trackingId = trackingId;
610
      args.airwayBillNo = airwayBillNo;
611
      args.provider = provider;
612
      args.write(oprot_);
613
      oprot_.writeMessageEnd();
614
      oprot_.getTransport().flush();
615
    }
616
 
617
    public boolean recv_setShippingTracker() throws TransactionServiceException, TException
618
    {
619
      TMessage msg = iprot_.readMessageBegin();
620
      if (msg.type == TMessageType.EXCEPTION) {
621
        TApplicationException x = TApplicationException.read(iprot_);
622
        iprot_.readMessageEnd();
623
        throw x;
624
      }
625
      setShippingTracker_result result = new setShippingTracker_result();
626
      result.read(iprot_);
627
      iprot_.readMessageEnd();
628
      if (result.isSetSuccess()) {
629
        return result.success;
630
      }
631
      if (result.ex != null) {
632
        throw result.ex;
633
      }
634
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setShippingTracker failed: unknown result");
635
    }
636
 
637
    public boolean setShippingDate(long transactionId, long shippingId, long timestamp) throws TransactionServiceException, TException
638
    {
639
      send_setShippingDate(transactionId, shippingId, timestamp);
640
      return recv_setShippingDate();
641
    }
642
 
643
    public void send_setShippingDate(long transactionId, long shippingId, long timestamp) throws TException
644
    {
645
      oprot_.writeMessageBegin(new TMessage("setShippingDate", TMessageType.CALL, seqid_));
646
      setShippingDate_args args = new setShippingDate_args();
647
      args.transactionId = transactionId;
648
      args.shippingId = shippingId;
649
      args.timestamp = timestamp;
650
      args.write(oprot_);
651
      oprot_.writeMessageEnd();
652
      oprot_.getTransport().flush();
653
    }
654
 
655
    public boolean recv_setShippingDate() throws TransactionServiceException, TException
656
    {
657
      TMessage msg = iprot_.readMessageBegin();
658
      if (msg.type == TMessageType.EXCEPTION) {
659
        TApplicationException x = TApplicationException.read(iprot_);
660
        iprot_.readMessageEnd();
661
        throw x;
662
      }
663
      setShippingDate_result result = new setShippingDate_result();
664
      result.read(iprot_);
665
      iprot_.readMessageEnd();
666
      if (result.isSetSuccess()) {
667
        return result.success;
668
      }
669
      if (result.ex != null) {
670
        throw result.ex;
671
      }
672
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setShippingDate failed: unknown result");
673
    }
674
 
675
    public boolean setDeliveryDate(long transactionId, long shippingid, long timestamp) throws TransactionServiceException, TException
676
    {
677
      send_setDeliveryDate(transactionId, shippingid, timestamp);
678
      return recv_setDeliveryDate();
679
    }
680
 
681
    public void send_setDeliveryDate(long transactionId, long shippingid, long timestamp) throws TException
682
    {
683
      oprot_.writeMessageBegin(new TMessage("setDeliveryDate", TMessageType.CALL, seqid_));
684
      setDeliveryDate_args args = new setDeliveryDate_args();
685
      args.transactionId = transactionId;
686
      args.shippingid = shippingid;
687
      args.timestamp = timestamp;
688
      args.write(oprot_);
689
      oprot_.writeMessageEnd();
690
      oprot_.getTransport().flush();
691
    }
692
 
693
    public boolean recv_setDeliveryDate() throws TransactionServiceException, TException
694
    {
695
      TMessage msg = iprot_.readMessageBegin();
696
      if (msg.type == TMessageType.EXCEPTION) {
697
        TApplicationException x = TApplicationException.read(iprot_);
698
        iprot_.readMessageEnd();
699
        throw x;
700
      }
701
      setDeliveryDate_result result = new setDeliveryDate_result();
702
      result.read(iprot_);
703
      iprot_.readMessageEnd();
704
      if (result.isSetSuccess()) {
705
        return result.success;
706
      }
707
      if (result.ex != null) {
708
        throw result.ex;
709
      }
710
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setDeliveryDate failed: unknown result");
711
    }
712
 
713
    public boolean changeShippingStatus(long transactionId, long shippingId, ShipmentStatus status, String description) throws TransactionServiceException, TException
714
    {
715
      send_changeShippingStatus(transactionId, shippingId, status, description);
716
      return recv_changeShippingStatus();
717
    }
718
 
719
    public void send_changeShippingStatus(long transactionId, long shippingId, ShipmentStatus status, String description) throws TException
720
    {
721
      oprot_.writeMessageBegin(new TMessage("changeShippingStatus", TMessageType.CALL, seqid_));
722
      changeShippingStatus_args args = new changeShippingStatus_args();
723
      args.transactionId = transactionId;
724
      args.shippingId = shippingId;
725
      args.status = status;
726
      args.description = description;
727
      args.write(oprot_);
728
      oprot_.writeMessageEnd();
729
      oprot_.getTransport().flush();
730
    }
731
 
732
    public boolean recv_changeShippingStatus() throws TransactionServiceException, TException
733
    {
734
      TMessage msg = iprot_.readMessageBegin();
735
      if (msg.type == TMessageType.EXCEPTION) {
736
        TApplicationException x = TApplicationException.read(iprot_);
737
        iprot_.readMessageEnd();
738
        throw x;
739
      }
740
      changeShippingStatus_result result = new changeShippingStatus_result();
741
      result.read(iprot_);
742
      iprot_.readMessageEnd();
743
      if (result.isSetSuccess()) {
744
        return result.success;
745
      }
746
      if (result.ex != null) {
747
        throw result.ex;
748
      }
749
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeShippingStatus failed: unknown result");
750
    }
751
 
752
    public boolean addTrail(long transactionId, String description) throws TransactionServiceException, TException
753
    {
754
      send_addTrail(transactionId, description);
755
      return recv_addTrail();
756
    }
757
 
758
    public void send_addTrail(long transactionId, String description) throws TException
759
    {
760
      oprot_.writeMessageBegin(new TMessage("addTrail", TMessageType.CALL, seqid_));
761
      addTrail_args args = new addTrail_args();
762
      args.transactionId = transactionId;
763
      args.description = description;
764
      args.write(oprot_);
765
      oprot_.writeMessageEnd();
766
      oprot_.getTransport().flush();
767
    }
768
 
769
    public boolean recv_addTrail() throws TransactionServiceException, TException
770
    {
771
      TMessage msg = iprot_.readMessageBegin();
772
      if (msg.type == TMessageType.EXCEPTION) {
773
        TApplicationException x = TApplicationException.read(iprot_);
774
        iprot_.readMessageEnd();
775
        throw x;
776
      }
777
      addTrail_result result = new addTrail_result();
778
      result.read(iprot_);
779
      iprot_.readMessageEnd();
780
      if (result.isSetSuccess()) {
781
        return result.success;
782
      }
783
      if (result.ex != null) {
784
        throw result.ex;
785
      }
786
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addTrail failed: unknown result");
787
    }
788
 
305 ashish 789
    public List<Alert> getAlerts(long transactionId, boolean valid) throws TException
790
    {
791
      send_getAlerts(transactionId, valid);
792
      return recv_getAlerts();
793
    }
794
 
795
    public void send_getAlerts(long transactionId, boolean valid) throws TException
796
    {
797
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
798
      getAlerts_args args = new getAlerts_args();
799
      args.transactionId = transactionId;
800
      args.valid = valid;
801
      args.write(oprot_);
802
      oprot_.writeMessageEnd();
803
      oprot_.getTransport().flush();
804
    }
805
 
806
    public List<Alert> recv_getAlerts() throws TException
807
    {
808
      TMessage msg = iprot_.readMessageBegin();
809
      if (msg.type == TMessageType.EXCEPTION) {
810
        TApplicationException x = TApplicationException.read(iprot_);
811
        iprot_.readMessageEnd();
812
        throw x;
813
      }
814
      getAlerts_result result = new getAlerts_result();
815
      result.read(iprot_);
816
      iprot_.readMessageEnd();
817
      if (result.isSetSuccess()) {
818
        return result.success;
819
      }
820
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
821
    }
822
 
823
    public void setAlert(long transactionId, boolean unset, long type, String comment) throws TException
824
    {
825
      send_setAlert(transactionId, unset, type, comment);
826
      recv_setAlert();
827
    }
828
 
829
    public void send_setAlert(long transactionId, boolean unset, long type, String comment) throws TException
830
    {
831
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
832
      setAlert_args args = new setAlert_args();
833
      args.transactionId = transactionId;
834
      args.unset = unset;
835
      args.type = type;
836
      args.comment = comment;
837
      args.write(oprot_);
838
      oprot_.writeMessageEnd();
839
      oprot_.getTransport().flush();
840
    }
841
 
842
    public void recv_setAlert() throws TException
843
    {
844
      TMessage msg = iprot_.readMessageBegin();
845
      if (msg.type == TMessageType.EXCEPTION) {
846
        TApplicationException x = TApplicationException.read(iprot_);
847
        iprot_.readMessageEnd();
848
        throw x;
849
      }
850
      setAlert_result result = new setAlert_result();
851
      result.read(iprot_);
852
      iprot_.readMessageEnd();
853
      return;
854
    }
855
 
856
    public ExtraOrderInfo getExtraInfo(long transaction_id) throws TException
857
    {
858
      send_getExtraInfo(transaction_id);
859
      return recv_getExtraInfo();
860
    }
861
 
862
    public void send_getExtraInfo(long transaction_id) throws TException
863
    {
864
      oprot_.writeMessageBegin(new TMessage("getExtraInfo", TMessageType.CALL, seqid_));
865
      getExtraInfo_args args = new getExtraInfo_args();
866
      args.transaction_id = transaction_id;
867
      args.write(oprot_);
868
      oprot_.writeMessageEnd();
869
      oprot_.getTransport().flush();
870
    }
871
 
872
    public ExtraOrderInfo recv_getExtraInfo() throws TException
873
    {
874
      TMessage msg = iprot_.readMessageBegin();
875
      if (msg.type == TMessageType.EXCEPTION) {
876
        TApplicationException x = TApplicationException.read(iprot_);
877
        iprot_.readMessageEnd();
878
        throw x;
879
      }
880
      getExtraInfo_result result = new getExtraInfo_result();
881
      result.read(iprot_);
882
      iprot_.readMessageEnd();
883
      if (result.isSetSuccess()) {
884
        return result.success;
885
      }
886
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getExtraInfo failed: unknown result");
887
    }
888
 
889
    public void setExtraInfo(long transaction_id, long sku_id, String model, String colour, String vendor) throws TException
890
    {
891
      send_setExtraInfo(transaction_id, sku_id, model, colour, vendor);
892
      recv_setExtraInfo();
893
    }
894
 
895
    public void send_setExtraInfo(long transaction_id, long sku_id, String model, String colour, String vendor) throws TException
896
    {
897
      oprot_.writeMessageBegin(new TMessage("setExtraInfo", TMessageType.CALL, seqid_));
898
      setExtraInfo_args args = new setExtraInfo_args();
899
      args.transaction_id = transaction_id;
900
      args.sku_id = sku_id;
901
      args.model = model;
902
      args.colour = colour;
903
      args.vendor = vendor;
904
      args.write(oprot_);
905
      oprot_.writeMessageEnd();
906
      oprot_.getTransport().flush();
907
    }
908
 
909
    public void recv_setExtraInfo() throws TException
910
    {
911
      TMessage msg = iprot_.readMessageBegin();
912
      if (msg.type == TMessageType.EXCEPTION) {
913
        TApplicationException x = TApplicationException.read(iprot_);
914
        iprot_.readMessageEnd();
915
        throw x;
916
      }
917
      setExtraInfo_result result = new setExtraInfo_result();
918
      result.read(iprot_);
919
      iprot_.readMessageEnd();
920
      return;
921
    }
922
 
68 ashish 923
  }
924
  public static class Processor implements TProcessor {
925
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
926
    public Processor(Iface iface)
927
    {
928
      iface_ = iface;
929
      processMap_.put("createTransaction", new createTransaction());
930
      processMap_.put("getTransaction", new getTransaction());
931
      processMap_.put("getAllTransactions", new getAllTransactions());
932
      processMap_.put("getTransactionsForShipmentStatus", new getTransactionsForShipmentStatus());
933
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
934
      processMap_.put("getTransactionsForCustomerAndShipmentStatus", new getTransactionsForCustomerAndShipmentStatus());
132 ashish 935
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 936
      processMap_.put("getTransactionStatus", new getTransactionStatus());
937
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
938
      processMap_.put("getOrderInfo", new getOrderInfo());
939
      processMap_.put("getShippingInfo", new getShippingInfo());
940
      processMap_.put("getBillingInfo", new getBillingInfo());
941
      processMap_.put("addBilling", new addBilling());
942
      processMap_.put("setShippingTracker", new setShippingTracker());
943
      processMap_.put("setShippingDate", new setShippingDate());
944
      processMap_.put("setDeliveryDate", new setDeliveryDate());
945
      processMap_.put("changeShippingStatus", new changeShippingStatus());
946
      processMap_.put("addTrail", new addTrail());
305 ashish 947
      processMap_.put("getAlerts", new getAlerts());
948
      processMap_.put("setAlert", new setAlert());
949
      processMap_.put("getExtraInfo", new getExtraInfo());
950
      processMap_.put("setExtraInfo", new setExtraInfo());
68 ashish 951
    }
952
 
953
    protected static interface ProcessFunction {
954
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
955
    }
956
 
957
    private Iface iface_;
958
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
959
 
960
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
961
    {
962
      TMessage msg = iprot.readMessageBegin();
963
      ProcessFunction fn = processMap_.get(msg.name);
964
      if (fn == null) {
965
        TProtocolUtil.skip(iprot, TType.STRUCT);
966
        iprot.readMessageEnd();
967
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
968
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
969
        x.write(oprot);
970
        oprot.writeMessageEnd();
971
        oprot.getTransport().flush();
972
        return true;
973
      }
974
      fn.process(msg.seqid, iprot, oprot);
975
      return true;
976
    }
977
 
978
    private class createTransaction implements ProcessFunction {
979
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
980
      {
981
        createTransaction_args args = new createTransaction_args();
982
        args.read(iprot);
983
        iprot.readMessageEnd();
984
        createTransaction_result result = new createTransaction_result();
985
        try {
132 ashish 986
          result.success = iface_.createTransaction(args.transaction);
987
          result.setSuccessIsSet(true);
68 ashish 988
        } catch (TransactionServiceException ex) {
989
          result.ex = ex;
990
        } catch (Throwable th) {
991
          LOGGER.error("Internal error processing createTransaction", th);
992
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
993
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
994
          x.write(oprot);
995
          oprot.writeMessageEnd();
996
          oprot.getTransport().flush();
997
          return;
998
        }
999
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
1000
        result.write(oprot);
1001
        oprot.writeMessageEnd();
1002
        oprot.getTransport().flush();
1003
      }
1004
 
1005
    }
1006
 
1007
    private class getTransaction implements ProcessFunction {
1008
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1009
      {
1010
        getTransaction_args args = new getTransaction_args();
1011
        args.read(iprot);
1012
        iprot.readMessageEnd();
1013
        getTransaction_result result = new getTransaction_result();
1014
        try {
1015
          result.success = iface_.getTransaction(args.id);
1016
        } catch (TransactionServiceException ex) {
1017
          result.ex = ex;
1018
        } catch (Throwable th) {
1019
          LOGGER.error("Internal error processing getTransaction", th);
1020
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
1021
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
1022
          x.write(oprot);
1023
          oprot.writeMessageEnd();
1024
          oprot.getTransport().flush();
1025
          return;
1026
        }
1027
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
1028
        result.write(oprot);
1029
        oprot.writeMessageEnd();
1030
        oprot.getTransport().flush();
1031
      }
1032
 
1033
    }
1034
 
1035
    private class getAllTransactions implements ProcessFunction {
1036
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1037
      {
1038
        getAllTransactions_args args = new getAllTransactions_args();
1039
        args.read(iprot);
1040
        iprot.readMessageEnd();
1041
        getAllTransactions_result result = new getAllTransactions_result();
1042
        try {
358 ashish 1043
          result.success = iface_.getAllTransactions(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 1044
        } catch (TransactionServiceException ex) {
1045
          result.ex = ex;
1046
        } catch (Throwable th) {
1047
          LOGGER.error("Internal error processing getAllTransactions", th);
1048
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllTransactions");
1049
          oprot.writeMessageBegin(new TMessage("getAllTransactions", TMessageType.EXCEPTION, seqid));
1050
          x.write(oprot);
1051
          oprot.writeMessageEnd();
1052
          oprot.getTransport().flush();
1053
          return;
1054
        }
1055
        oprot.writeMessageBegin(new TMessage("getAllTransactions", TMessageType.REPLY, seqid));
1056
        result.write(oprot);
1057
        oprot.writeMessageEnd();
1058
        oprot.getTransport().flush();
1059
      }
1060
 
1061
    }
1062
 
1063
    private class getTransactionsForShipmentStatus implements ProcessFunction {
1064
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1065
      {
1066
        getTransactionsForShipmentStatus_args args = new getTransactionsForShipmentStatus_args();
1067
        args.read(iprot);
1068
        iprot.readMessageEnd();
1069
        getTransactionsForShipmentStatus_result result = new getTransactionsForShipmentStatus_result();
1070
        try {
132 ashish 1071
          result.success = iface_.getTransactionsForShipmentStatus(args.status, args.from_date, args.to_date);
68 ashish 1072
        } catch (TransactionServiceException ex) {
1073
          result.ex = ex;
1074
        } catch (Throwable th) {
1075
          LOGGER.error("Internal error processing getTransactionsForShipmentStatus", th);
1076
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShipmentStatus");
1077
          oprot.writeMessageBegin(new TMessage("getTransactionsForShipmentStatus", TMessageType.EXCEPTION, seqid));
1078
          x.write(oprot);
1079
          oprot.writeMessageEnd();
1080
          oprot.getTransport().flush();
1081
          return;
1082
        }
1083
        oprot.writeMessageBegin(new TMessage("getTransactionsForShipmentStatus", TMessageType.REPLY, seqid));
1084
        result.write(oprot);
1085
        oprot.writeMessageEnd();
1086
        oprot.getTransport().flush();
1087
      }
1088
 
1089
    }
1090
 
1091
    private class getTransactionsForCustomer implements ProcessFunction {
1092
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1093
      {
1094
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1095
        args.read(iprot);
1096
        iprot.readMessageEnd();
1097
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1098
        try {
132 ashish 1099
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1100
        } catch (TransactionServiceException ex) {
1101
          result.ex = ex;
1102
        } catch (Throwable th) {
1103
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1104
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1105
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1106
          x.write(oprot);
1107
          oprot.writeMessageEnd();
1108
          oprot.getTransport().flush();
1109
          return;
1110
        }
1111
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1112
        result.write(oprot);
1113
        oprot.writeMessageEnd();
1114
        oprot.getTransport().flush();
1115
      }
1116
 
1117
    }
1118
 
1119
    private class getTransactionsForCustomerAndShipmentStatus implements ProcessFunction {
1120
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1121
      {
1122
        getTransactionsForCustomerAndShipmentStatus_args args = new getTransactionsForCustomerAndShipmentStatus_args();
1123
        args.read(iprot);
1124
        iprot.readMessageEnd();
1125
        getTransactionsForCustomerAndShipmentStatus_result result = new getTransactionsForCustomerAndShipmentStatus_result();
1126
        try {
132 ashish 1127
          result.success = iface_.getTransactionsForCustomerAndShipmentStatus(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1128
        } catch (TransactionServiceException ex) {
1129
          result.ex = ex;
1130
        } catch (Throwable th) {
1131
          LOGGER.error("Internal error processing getTransactionsForCustomerAndShipmentStatus", th);
1132
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomerAndShipmentStatus");
1133
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomerAndShipmentStatus", TMessageType.EXCEPTION, seqid));
1134
          x.write(oprot);
1135
          oprot.writeMessageEnd();
1136
          oprot.getTransport().flush();
1137
          return;
1138
        }
1139
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomerAndShipmentStatus", TMessageType.REPLY, seqid));
1140
        result.write(oprot);
1141
        oprot.writeMessageEnd();
1142
        oprot.getTransport().flush();
1143
      }
1144
 
1145
    }
1146
 
132 ashish 1147
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1148
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1149
      {
1150
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1151
        args.read(iprot);
1152
        iprot.readMessageEnd();
1153
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1154
        try {
1155
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
1156
        } catch (TransactionServiceException ex) {
1157
          result.ex = ex;
1158
        } catch (Throwable th) {
1159
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1160
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1161
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1162
          x.write(oprot);
1163
          oprot.writeMessageEnd();
1164
          oprot.getTransport().flush();
1165
          return;
1166
        }
1167
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1168
        result.write(oprot);
1169
        oprot.writeMessageEnd();
1170
        oprot.getTransport().flush();
1171
      }
1172
 
1173
    }
1174
 
68 ashish 1175
    private class getTransactionStatus implements ProcessFunction {
1176
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1177
      {
1178
        getTransactionStatus_args args = new getTransactionStatus_args();
1179
        args.read(iprot);
1180
        iprot.readMessageEnd();
1181
        getTransactionStatus_result result = new getTransactionStatus_result();
1182
        try {
1183
          result.success = iface_.getTransactionStatus(args.transactionId);
1184
        } catch (TransactionServiceException ex) {
1185
          result.ex = ex;
1186
        } catch (Throwable th) {
1187
          LOGGER.error("Internal error processing getTransactionStatus", th);
1188
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1189
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1190
          x.write(oprot);
1191
          oprot.writeMessageEnd();
1192
          oprot.getTransport().flush();
1193
          return;
1194
        }
1195
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1196
        result.write(oprot);
1197
        oprot.writeMessageEnd();
1198
        oprot.getTransport().flush();
1199
      }
1200
 
1201
    }
1202
 
1203
    private class changeTransactionStatus implements ProcessFunction {
1204
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1205
      {
1206
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1207
        args.read(iprot);
1208
        iprot.readMessageEnd();
1209
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1210
        try {
1211
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1212
          result.setSuccessIsSet(true);
1213
        } catch (TransactionServiceException ex) {
1214
          result.ex = ex;
1215
        } catch (Throwable th) {
1216
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1217
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1218
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1219
          x.write(oprot);
1220
          oprot.writeMessageEnd();
1221
          oprot.getTransport().flush();
1222
          return;
1223
        }
1224
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1225
        result.write(oprot);
1226
        oprot.writeMessageEnd();
1227
        oprot.getTransport().flush();
1228
      }
1229
 
1230
    }
1231
 
1232
    private class getOrderInfo implements ProcessFunction {
1233
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1234
      {
1235
        getOrderInfo_args args = new getOrderInfo_args();
1236
        args.read(iprot);
1237
        iprot.readMessageEnd();
1238
        getOrderInfo_result result = new getOrderInfo_result();
1239
        try {
1240
          result.success = iface_.getOrderInfo(args.transactionId);
1241
        } catch (TransactionServiceException ex) {
1242
          result.ex = ex;
1243
        } catch (Throwable th) {
1244
          LOGGER.error("Internal error processing getOrderInfo", th);
1245
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrderInfo");
1246
          oprot.writeMessageBegin(new TMessage("getOrderInfo", TMessageType.EXCEPTION, seqid));
1247
          x.write(oprot);
1248
          oprot.writeMessageEnd();
1249
          oprot.getTransport().flush();
1250
          return;
1251
        }
1252
        oprot.writeMessageBegin(new TMessage("getOrderInfo", TMessageType.REPLY, seqid));
1253
        result.write(oprot);
1254
        oprot.writeMessageEnd();
1255
        oprot.getTransport().flush();
1256
      }
1257
 
1258
    }
1259
 
1260
    private class getShippingInfo implements ProcessFunction {
1261
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1262
      {
1263
        getShippingInfo_args args = new getShippingInfo_args();
1264
        args.read(iprot);
1265
        iprot.readMessageEnd();
1266
        getShippingInfo_result result = new getShippingInfo_result();
1267
        try {
1268
          result.success = iface_.getShippingInfo(args.transactionId);
1269
        } catch (TransactionServiceException ex) {
1270
          result.ex = ex;
1271
        } catch (Throwable th) {
1272
          LOGGER.error("Internal error processing getShippingInfo", th);
1273
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getShippingInfo");
1274
          oprot.writeMessageBegin(new TMessage("getShippingInfo", TMessageType.EXCEPTION, seqid));
1275
          x.write(oprot);
1276
          oprot.writeMessageEnd();
1277
          oprot.getTransport().flush();
1278
          return;
1279
        }
1280
        oprot.writeMessageBegin(new TMessage("getShippingInfo", TMessageType.REPLY, seqid));
1281
        result.write(oprot);
1282
        oprot.writeMessageEnd();
1283
        oprot.getTransport().flush();
1284
      }
1285
 
1286
    }
1287
 
1288
    private class getBillingInfo implements ProcessFunction {
1289
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1290
      {
1291
        getBillingInfo_args args = new getBillingInfo_args();
1292
        args.read(iprot);
1293
        iprot.readMessageEnd();
1294
        getBillingInfo_result result = new getBillingInfo_result();
1295
        try {
1296
          result.success = iface_.getBillingInfo(args.transactionId);
1297
        } catch (TransactionServiceException ex) {
1298
          result.ex = ex;
1299
        } catch (Throwable th) {
1300
          LOGGER.error("Internal error processing getBillingInfo", th);
1301
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getBillingInfo");
1302
          oprot.writeMessageBegin(new TMessage("getBillingInfo", TMessageType.EXCEPTION, seqid));
1303
          x.write(oprot);
1304
          oprot.writeMessageEnd();
1305
          oprot.getTransport().flush();
1306
          return;
1307
        }
1308
        oprot.writeMessageBegin(new TMessage("getBillingInfo", TMessageType.REPLY, seqid));
1309
        result.write(oprot);
1310
        oprot.writeMessageEnd();
1311
        oprot.getTransport().flush();
1312
      }
1313
 
1314
    }
1315
 
1316
    private class addBilling implements ProcessFunction {
1317
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1318
      {
1319
        addBilling_args args = new addBilling_args();
1320
        args.read(iprot);
1321
        iprot.readMessageEnd();
1322
        addBilling_result result = new addBilling_result();
1323
        try {
1324
          result.success = iface_.addBilling(args.tranactionId, args.billing);
1325
          result.setSuccessIsSet(true);
1326
        } catch (TransactionServiceException ex) {
1327
          result.ex = ex;
1328
        } catch (Throwable th) {
1329
          LOGGER.error("Internal error processing addBilling", th);
1330
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBilling");
1331
          oprot.writeMessageBegin(new TMessage("addBilling", TMessageType.EXCEPTION, seqid));
1332
          x.write(oprot);
1333
          oprot.writeMessageEnd();
1334
          oprot.getTransport().flush();
1335
          return;
1336
        }
1337
        oprot.writeMessageBegin(new TMessage("addBilling", TMessageType.REPLY, seqid));
1338
        result.write(oprot);
1339
        oprot.writeMessageEnd();
1340
        oprot.getTransport().flush();
1341
      }
1342
 
1343
    }
1344
 
1345
    private class setShippingTracker implements ProcessFunction {
1346
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1347
      {
1348
        setShippingTracker_args args = new setShippingTracker_args();
1349
        args.read(iprot);
1350
        iprot.readMessageEnd();
1351
        setShippingTracker_result result = new setShippingTracker_result();
1352
        try {
1353
          result.success = iface_.setShippingTracker(args.transactionId, args.shippingId, args.trackingId, args.airwayBillNo, args.provider);
1354
          result.setSuccessIsSet(true);
1355
        } catch (TransactionServiceException ex) {
1356
          result.ex = ex;
1357
        } catch (Throwable th) {
1358
          LOGGER.error("Internal error processing setShippingTracker", th);
1359
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setShippingTracker");
1360
          oprot.writeMessageBegin(new TMessage("setShippingTracker", TMessageType.EXCEPTION, seqid));
1361
          x.write(oprot);
1362
          oprot.writeMessageEnd();
1363
          oprot.getTransport().flush();
1364
          return;
1365
        }
1366
        oprot.writeMessageBegin(new TMessage("setShippingTracker", TMessageType.REPLY, seqid));
1367
        result.write(oprot);
1368
        oprot.writeMessageEnd();
1369
        oprot.getTransport().flush();
1370
      }
1371
 
1372
    }
1373
 
1374
    private class setShippingDate implements ProcessFunction {
1375
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1376
      {
1377
        setShippingDate_args args = new setShippingDate_args();
1378
        args.read(iprot);
1379
        iprot.readMessageEnd();
1380
        setShippingDate_result result = new setShippingDate_result();
1381
        try {
1382
          result.success = iface_.setShippingDate(args.transactionId, args.shippingId, args.timestamp);
1383
          result.setSuccessIsSet(true);
1384
        } catch (TransactionServiceException ex) {
1385
          result.ex = ex;
1386
        } catch (Throwable th) {
1387
          LOGGER.error("Internal error processing setShippingDate", th);
1388
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setShippingDate");
1389
          oprot.writeMessageBegin(new TMessage("setShippingDate", TMessageType.EXCEPTION, seqid));
1390
          x.write(oprot);
1391
          oprot.writeMessageEnd();
1392
          oprot.getTransport().flush();
1393
          return;
1394
        }
1395
        oprot.writeMessageBegin(new TMessage("setShippingDate", TMessageType.REPLY, seqid));
1396
        result.write(oprot);
1397
        oprot.writeMessageEnd();
1398
        oprot.getTransport().flush();
1399
      }
1400
 
1401
    }
1402
 
1403
    private class setDeliveryDate implements ProcessFunction {
1404
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1405
      {
1406
        setDeliveryDate_args args = new setDeliveryDate_args();
1407
        args.read(iprot);
1408
        iprot.readMessageEnd();
1409
        setDeliveryDate_result result = new setDeliveryDate_result();
1410
        try {
1411
          result.success = iface_.setDeliveryDate(args.transactionId, args.shippingid, args.timestamp);
1412
          result.setSuccessIsSet(true);
1413
        } catch (TransactionServiceException ex) {
1414
          result.ex = ex;
1415
        } catch (Throwable th) {
1416
          LOGGER.error("Internal error processing setDeliveryDate", th);
1417
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setDeliveryDate");
1418
          oprot.writeMessageBegin(new TMessage("setDeliveryDate", TMessageType.EXCEPTION, seqid));
1419
          x.write(oprot);
1420
          oprot.writeMessageEnd();
1421
          oprot.getTransport().flush();
1422
          return;
1423
        }
1424
        oprot.writeMessageBegin(new TMessage("setDeliveryDate", TMessageType.REPLY, seqid));
1425
        result.write(oprot);
1426
        oprot.writeMessageEnd();
1427
        oprot.getTransport().flush();
1428
      }
1429
 
1430
    }
1431
 
1432
    private class changeShippingStatus implements ProcessFunction {
1433
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1434
      {
1435
        changeShippingStatus_args args = new changeShippingStatus_args();
1436
        args.read(iprot);
1437
        iprot.readMessageEnd();
1438
        changeShippingStatus_result result = new changeShippingStatus_result();
1439
        try {
1440
          result.success = iface_.changeShippingStatus(args.transactionId, args.shippingId, args.status, args.description);
1441
          result.setSuccessIsSet(true);
1442
        } catch (TransactionServiceException ex) {
1443
          result.ex = ex;
1444
        } catch (Throwable th) {
1445
          LOGGER.error("Internal error processing changeShippingStatus", th);
1446
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeShippingStatus");
1447
          oprot.writeMessageBegin(new TMessage("changeShippingStatus", TMessageType.EXCEPTION, seqid));
1448
          x.write(oprot);
1449
          oprot.writeMessageEnd();
1450
          oprot.getTransport().flush();
1451
          return;
1452
        }
1453
        oprot.writeMessageBegin(new TMessage("changeShippingStatus", TMessageType.REPLY, seqid));
1454
        result.write(oprot);
1455
        oprot.writeMessageEnd();
1456
        oprot.getTransport().flush();
1457
      }
1458
 
1459
    }
1460
 
1461
    private class addTrail implements ProcessFunction {
1462
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1463
      {
1464
        addTrail_args args = new addTrail_args();
1465
        args.read(iprot);
1466
        iprot.readMessageEnd();
1467
        addTrail_result result = new addTrail_result();
1468
        try {
1469
          result.success = iface_.addTrail(args.transactionId, args.description);
1470
          result.setSuccessIsSet(true);
1471
        } catch (TransactionServiceException ex) {
1472
          result.ex = ex;
1473
        } catch (Throwable th) {
1474
          LOGGER.error("Internal error processing addTrail", th);
1475
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addTrail");
1476
          oprot.writeMessageBegin(new TMessage("addTrail", TMessageType.EXCEPTION, seqid));
1477
          x.write(oprot);
1478
          oprot.writeMessageEnd();
1479
          oprot.getTransport().flush();
1480
          return;
1481
        }
1482
        oprot.writeMessageBegin(new TMessage("addTrail", TMessageType.REPLY, seqid));
1483
        result.write(oprot);
1484
        oprot.writeMessageEnd();
1485
        oprot.getTransport().flush();
1486
      }
1487
 
1488
    }
1489
 
305 ashish 1490
    private class getAlerts implements ProcessFunction {
1491
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1492
      {
1493
        getAlerts_args args = new getAlerts_args();
1494
        args.read(iprot);
1495
        iprot.readMessageEnd();
1496
        getAlerts_result result = new getAlerts_result();
1497
        result.success = iface_.getAlerts(args.transactionId, args.valid);
1498
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
1499
        result.write(oprot);
1500
        oprot.writeMessageEnd();
1501
        oprot.getTransport().flush();
1502
      }
1503
 
1504
    }
1505
 
1506
    private class setAlert implements ProcessFunction {
1507
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1508
      {
1509
        setAlert_args args = new setAlert_args();
1510
        args.read(iprot);
1511
        iprot.readMessageEnd();
1512
        setAlert_result result = new setAlert_result();
1513
        iface_.setAlert(args.transactionId, args.unset, args.type, args.comment);
1514
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
1515
        result.write(oprot);
1516
        oprot.writeMessageEnd();
1517
        oprot.getTransport().flush();
1518
      }
1519
 
1520
    }
1521
 
1522
    private class getExtraInfo implements ProcessFunction {
1523
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1524
      {
1525
        getExtraInfo_args args = new getExtraInfo_args();
1526
        args.read(iprot);
1527
        iprot.readMessageEnd();
1528
        getExtraInfo_result result = new getExtraInfo_result();
1529
        result.success = iface_.getExtraInfo(args.transaction_id);
1530
        oprot.writeMessageBegin(new TMessage("getExtraInfo", TMessageType.REPLY, seqid));
1531
        result.write(oprot);
1532
        oprot.writeMessageEnd();
1533
        oprot.getTransport().flush();
1534
      }
1535
 
1536
    }
1537
 
1538
    private class setExtraInfo implements ProcessFunction {
1539
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1540
      {
1541
        setExtraInfo_args args = new setExtraInfo_args();
1542
        args.read(iprot);
1543
        iprot.readMessageEnd();
1544
        setExtraInfo_result result = new setExtraInfo_result();
1545
        iface_.setExtraInfo(args.transaction_id, args.sku_id, args.model, args.colour, args.vendor);
1546
        oprot.writeMessageBegin(new TMessage("setExtraInfo", TMessageType.REPLY, seqid));
1547
        result.write(oprot);
1548
        oprot.writeMessageEnd();
1549
        oprot.getTransport().flush();
1550
      }
1551
 
1552
    }
1553
 
68 ashish 1554
  }
1555
 
1556
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable   {
1557
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
1558
 
1559
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
1560
 
1561
    private Transaction transaction;
1562
 
1563
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1564
    public enum _Fields implements TFieldIdEnum {
1565
      TRANSACTION((short)1, "transaction");
1566
 
1567
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1568
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1569
 
1570
      static {
1571
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1572
          byId.put((int)field._thriftId, field);
1573
          byName.put(field.getFieldName(), field);
1574
        }
1575
      }
1576
 
1577
      /**
1578
       * Find the _Fields constant that matches fieldId, or null if its not found.
1579
       */
1580
      public static _Fields findByThriftId(int fieldId) {
1581
        return byId.get(fieldId);
1582
      }
1583
 
1584
      /**
1585
       * Find the _Fields constant that matches fieldId, throwing an exception
1586
       * if it is not found.
1587
       */
1588
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1589
        _Fields fields = findByThriftId(fieldId);
1590
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1591
        return fields;
1592
      }
1593
 
1594
      /**
1595
       * Find the _Fields constant that matches name, or null if its not found.
1596
       */
1597
      public static _Fields findByName(String name) {
1598
        return byName.get(name);
1599
      }
1600
 
1601
      private final short _thriftId;
1602
      private final String _fieldName;
1603
 
1604
      _Fields(short thriftId, String fieldName) {
1605
        _thriftId = thriftId;
1606
        _fieldName = fieldName;
1607
      }
1608
 
1609
      public short getThriftFieldId() {
1610
        return _thriftId;
1611
      }
1612
 
1613
      public String getFieldName() {
1614
        return _fieldName;
1615
      }
1616
    }
1617
 
1618
    // isset id assignments
1619
 
1620
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1621
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
1622
          new StructMetaData(TType.STRUCT, Transaction.class)));
1623
    }});
1624
 
1625
    static {
1626
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
1627
    }
1628
 
1629
    public createTransaction_args() {
1630
    }
1631
 
1632
    public createTransaction_args(
1633
      Transaction transaction)
1634
    {
1635
      this();
1636
      this.transaction = transaction;
1637
    }
1638
 
1639
    /**
1640
     * Performs a deep copy on <i>other</i>.
1641
     */
1642
    public createTransaction_args(createTransaction_args other) {
1643
      if (other.isSetTransaction()) {
1644
        this.transaction = new Transaction(other.transaction);
1645
      }
1646
    }
1647
 
1648
    public createTransaction_args deepCopy() {
1649
      return new createTransaction_args(this);
1650
    }
1651
 
1652
    @Deprecated
1653
    public createTransaction_args clone() {
1654
      return new createTransaction_args(this);
1655
    }
1656
 
1657
    public Transaction getTransaction() {
1658
      return this.transaction;
1659
    }
1660
 
1661
    public createTransaction_args setTransaction(Transaction transaction) {
1662
      this.transaction = transaction;
1663
      return this;
1664
    }
1665
 
1666
    public void unsetTransaction() {
1667
      this.transaction = null;
1668
    }
1669
 
1670
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
1671
    public boolean isSetTransaction() {
1672
      return this.transaction != null;
1673
    }
1674
 
1675
    public void setTransactionIsSet(boolean value) {
1676
      if (!value) {
1677
        this.transaction = null;
1678
      }
1679
    }
1680
 
1681
    public void setFieldValue(_Fields field, Object value) {
1682
      switch (field) {
1683
      case TRANSACTION:
1684
        if (value == null) {
1685
          unsetTransaction();
1686
        } else {
1687
          setTransaction((Transaction)value);
1688
        }
1689
        break;
1690
 
1691
      }
1692
    }
1693
 
1694
    public void setFieldValue(int fieldID, Object value) {
1695
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1696
    }
1697
 
1698
    public Object getFieldValue(_Fields field) {
1699
      switch (field) {
1700
      case TRANSACTION:
1701
        return getTransaction();
1702
 
1703
      }
1704
      throw new IllegalStateException();
1705
    }
1706
 
1707
    public Object getFieldValue(int fieldId) {
1708
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1709
    }
1710
 
1711
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1712
    public boolean isSet(_Fields field) {
1713
      switch (field) {
1714
      case TRANSACTION:
1715
        return isSetTransaction();
1716
      }
1717
      throw new IllegalStateException();
1718
    }
1719
 
1720
    public boolean isSet(int fieldID) {
1721
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1722
    }
1723
 
1724
    @Override
1725
    public boolean equals(Object that) {
1726
      if (that == null)
1727
        return false;
1728
      if (that instanceof createTransaction_args)
1729
        return this.equals((createTransaction_args)that);
1730
      return false;
1731
    }
1732
 
1733
    public boolean equals(createTransaction_args that) {
1734
      if (that == null)
1735
        return false;
1736
 
1737
      boolean this_present_transaction = true && this.isSetTransaction();
1738
      boolean that_present_transaction = true && that.isSetTransaction();
1739
      if (this_present_transaction || that_present_transaction) {
1740
        if (!(this_present_transaction && that_present_transaction))
1741
          return false;
1742
        if (!this.transaction.equals(that.transaction))
1743
          return false;
1744
      }
1745
 
1746
      return true;
1747
    }
1748
 
1749
    @Override
1750
    public int hashCode() {
1751
      return 0;
1752
    }
1753
 
1754
    public void read(TProtocol iprot) throws TException {
1755
      TField field;
1756
      iprot.readStructBegin();
1757
      while (true)
1758
      {
1759
        field = iprot.readFieldBegin();
1760
        if (field.type == TType.STOP) { 
1761
          break;
1762
        }
1763
        _Fields fieldId = _Fields.findByThriftId(field.id);
1764
        if (fieldId == null) {
1765
          TProtocolUtil.skip(iprot, field.type);
1766
        } else {
1767
          switch (fieldId) {
1768
            case TRANSACTION:
1769
              if (field.type == TType.STRUCT) {
1770
                this.transaction = new Transaction();
1771
                this.transaction.read(iprot);
1772
              } else { 
1773
                TProtocolUtil.skip(iprot, field.type);
1774
              }
1775
              break;
1776
          }
1777
          iprot.readFieldEnd();
1778
        }
1779
      }
1780
      iprot.readStructEnd();
1781
      validate();
1782
    }
1783
 
1784
    public void write(TProtocol oprot) throws TException {
1785
      validate();
1786
 
1787
      oprot.writeStructBegin(STRUCT_DESC);
1788
      if (this.transaction != null) {
1789
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
1790
        this.transaction.write(oprot);
1791
        oprot.writeFieldEnd();
1792
      }
1793
      oprot.writeFieldStop();
1794
      oprot.writeStructEnd();
1795
    }
1796
 
1797
    @Override
1798
    public String toString() {
1799
      StringBuilder sb = new StringBuilder("createTransaction_args(");
1800
      boolean first = true;
1801
 
1802
      sb.append("transaction:");
1803
      if (this.transaction == null) {
1804
        sb.append("null");
1805
      } else {
1806
        sb.append(this.transaction);
1807
      }
1808
      first = false;
1809
      sb.append(")");
1810
      return sb.toString();
1811
    }
1812
 
1813
    public void validate() throws TException {
1814
      // check for required fields
1815
    }
1816
 
1817
  }
1818
 
1819
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
1820
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
1821
 
132 ashish 1822
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 1823
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
1824
 
132 ashish 1825
    private long success;
68 ashish 1826
    private TransactionServiceException ex;
1827
 
1828
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1829
    public enum _Fields implements TFieldIdEnum {
132 ashish 1830
      SUCCESS((short)0, "success"),
68 ashish 1831
      EX((short)1, "ex");
1832
 
1833
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1834
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1835
 
1836
      static {
1837
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1838
          byId.put((int)field._thriftId, field);
1839
          byName.put(field.getFieldName(), field);
1840
        }
1841
      }
1842
 
1843
      /**
1844
       * Find the _Fields constant that matches fieldId, or null if its not found.
1845
       */
1846
      public static _Fields findByThriftId(int fieldId) {
1847
        return byId.get(fieldId);
1848
      }
1849
 
1850
      /**
1851
       * Find the _Fields constant that matches fieldId, throwing an exception
1852
       * if it is not found.
1853
       */
1854
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1855
        _Fields fields = findByThriftId(fieldId);
1856
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1857
        return fields;
1858
      }
1859
 
1860
      /**
1861
       * Find the _Fields constant that matches name, or null if its not found.
1862
       */
1863
      public static _Fields findByName(String name) {
1864
        return byName.get(name);
1865
      }
1866
 
1867
      private final short _thriftId;
1868
      private final String _fieldName;
1869
 
1870
      _Fields(short thriftId, String fieldName) {
1871
        _thriftId = thriftId;
1872
        _fieldName = fieldName;
1873
      }
1874
 
1875
      public short getThriftFieldId() {
1876
        return _thriftId;
1877
      }
1878
 
1879
      public String getFieldName() {
1880
        return _fieldName;
1881
      }
1882
    }
1883
 
1884
    // isset id assignments
132 ashish 1885
    private static final int __SUCCESS_ISSET_ID = 0;
1886
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 1887
 
1888
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 1889
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1890
          new FieldValueMetaData(TType.I64)));
68 ashish 1891
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
1892
          new FieldValueMetaData(TType.STRUCT)));
1893
    }});
1894
 
1895
    static {
1896
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
1897
    }
1898
 
1899
    public createTransaction_result() {
1900
    }
1901
 
1902
    public createTransaction_result(
132 ashish 1903
      long success,
68 ashish 1904
      TransactionServiceException ex)
1905
    {
1906
      this();
132 ashish 1907
      this.success = success;
1908
      setSuccessIsSet(true);
68 ashish 1909
      this.ex = ex;
1910
    }
1911
 
1912
    /**
1913
     * Performs a deep copy on <i>other</i>.
1914
     */
1915
    public createTransaction_result(createTransaction_result other) {
132 ashish 1916
      __isset_bit_vector.clear();
1917
      __isset_bit_vector.or(other.__isset_bit_vector);
1918
      this.success = other.success;
68 ashish 1919
      if (other.isSetEx()) {
1920
        this.ex = new TransactionServiceException(other.ex);
1921
      }
1922
    }
1923
 
1924
    public createTransaction_result deepCopy() {
1925
      return new createTransaction_result(this);
1926
    }
1927
 
1928
    @Deprecated
1929
    public createTransaction_result clone() {
1930
      return new createTransaction_result(this);
1931
    }
1932
 
132 ashish 1933
    public long getSuccess() {
1934
      return this.success;
1935
    }
1936
 
1937
    public createTransaction_result setSuccess(long success) {
1938
      this.success = success;
1939
      setSuccessIsSet(true);
1940
      return this;
1941
    }
1942
 
1943
    public void unsetSuccess() {
1944
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
1945
    }
1946
 
1947
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
1948
    public boolean isSetSuccess() {
1949
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
1950
    }
1951
 
1952
    public void setSuccessIsSet(boolean value) {
1953
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
1954
    }
1955
 
68 ashish 1956
    public TransactionServiceException getEx() {
1957
      return this.ex;
1958
    }
1959
 
1960
    public createTransaction_result setEx(TransactionServiceException ex) {
1961
      this.ex = ex;
1962
      return this;
1963
    }
1964
 
1965
    public void unsetEx() {
1966
      this.ex = null;
1967
    }
1968
 
1969
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
1970
    public boolean isSetEx() {
1971
      return this.ex != null;
1972
    }
1973
 
1974
    public void setExIsSet(boolean value) {
1975
      if (!value) {
1976
        this.ex = null;
1977
      }
1978
    }
1979
 
1980
    public void setFieldValue(_Fields field, Object value) {
1981
      switch (field) {
132 ashish 1982
      case SUCCESS:
1983
        if (value == null) {
1984
          unsetSuccess();
1985
        } else {
1986
          setSuccess((Long)value);
1987
        }
1988
        break;
1989
 
68 ashish 1990
      case EX:
1991
        if (value == null) {
1992
          unsetEx();
1993
        } else {
1994
          setEx((TransactionServiceException)value);
1995
        }
1996
        break;
1997
 
1998
      }
1999
    }
2000
 
2001
    public void setFieldValue(int fieldID, Object value) {
2002
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2003
    }
2004
 
2005
    public Object getFieldValue(_Fields field) {
2006
      switch (field) {
132 ashish 2007
      case SUCCESS:
2008
        return new Long(getSuccess());
2009
 
68 ashish 2010
      case EX:
2011
        return getEx();
2012
 
2013
      }
2014
      throw new IllegalStateException();
2015
    }
2016
 
2017
    public Object getFieldValue(int fieldId) {
2018
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2019
    }
2020
 
2021
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2022
    public boolean isSet(_Fields field) {
2023
      switch (field) {
132 ashish 2024
      case SUCCESS:
2025
        return isSetSuccess();
68 ashish 2026
      case EX:
2027
        return isSetEx();
2028
      }
2029
      throw new IllegalStateException();
2030
    }
2031
 
2032
    public boolean isSet(int fieldID) {
2033
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2034
    }
2035
 
2036
    @Override
2037
    public boolean equals(Object that) {
2038
      if (that == null)
2039
        return false;
2040
      if (that instanceof createTransaction_result)
2041
        return this.equals((createTransaction_result)that);
2042
      return false;
2043
    }
2044
 
2045
    public boolean equals(createTransaction_result that) {
2046
      if (that == null)
2047
        return false;
2048
 
132 ashish 2049
      boolean this_present_success = true;
2050
      boolean that_present_success = true;
2051
      if (this_present_success || that_present_success) {
2052
        if (!(this_present_success && that_present_success))
2053
          return false;
2054
        if (this.success != that.success)
2055
          return false;
2056
      }
2057
 
68 ashish 2058
      boolean this_present_ex = true && this.isSetEx();
2059
      boolean that_present_ex = true && that.isSetEx();
2060
      if (this_present_ex || that_present_ex) {
2061
        if (!(this_present_ex && that_present_ex))
2062
          return false;
2063
        if (!this.ex.equals(that.ex))
2064
          return false;
2065
      }
2066
 
2067
      return true;
2068
    }
2069
 
2070
    @Override
2071
    public int hashCode() {
2072
      return 0;
2073
    }
2074
 
2075
    public int compareTo(createTransaction_result other) {
2076
      if (!getClass().equals(other.getClass())) {
2077
        return getClass().getName().compareTo(other.getClass().getName());
2078
      }
2079
 
2080
      int lastComparison = 0;
2081
      createTransaction_result typedOther = (createTransaction_result)other;
2082
 
132 ashish 2083
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
2084
      if (lastComparison != 0) {
2085
        return lastComparison;
2086
      }
2087
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
2088
      if (lastComparison != 0) {
2089
        return lastComparison;
2090
      }
68 ashish 2091
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
2092
      if (lastComparison != 0) {
2093
        return lastComparison;
2094
      }
2095
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
2096
      if (lastComparison != 0) {
2097
        return lastComparison;
2098
      }
2099
      return 0;
2100
    }
2101
 
2102
    public void read(TProtocol iprot) throws TException {
2103
      TField field;
2104
      iprot.readStructBegin();
2105
      while (true)
2106
      {
2107
        field = iprot.readFieldBegin();
2108
        if (field.type == TType.STOP) { 
2109
          break;
2110
        }
2111
        _Fields fieldId = _Fields.findByThriftId(field.id);
2112
        if (fieldId == null) {
2113
          TProtocolUtil.skip(iprot, field.type);
2114
        } else {
2115
          switch (fieldId) {
132 ashish 2116
            case SUCCESS:
2117
              if (field.type == TType.I64) {
2118
                this.success = iprot.readI64();
2119
                setSuccessIsSet(true);
2120
              } else { 
2121
                TProtocolUtil.skip(iprot, field.type);
2122
              }
2123
              break;
68 ashish 2124
            case EX:
2125
              if (field.type == TType.STRUCT) {
2126
                this.ex = new TransactionServiceException();
2127
                this.ex.read(iprot);
2128
              } else { 
2129
                TProtocolUtil.skip(iprot, field.type);
2130
              }
2131
              break;
2132
          }
2133
          iprot.readFieldEnd();
2134
        }
2135
      }
2136
      iprot.readStructEnd();
2137
      validate();
2138
    }
2139
 
2140
    public void write(TProtocol oprot) throws TException {
2141
      oprot.writeStructBegin(STRUCT_DESC);
2142
 
132 ashish 2143
      if (this.isSetSuccess()) {
2144
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2145
        oprot.writeI64(this.success);
2146
        oprot.writeFieldEnd();
2147
      } else if (this.isSetEx()) {
68 ashish 2148
        oprot.writeFieldBegin(EX_FIELD_DESC);
2149
        this.ex.write(oprot);
2150
        oprot.writeFieldEnd();
2151
      }
2152
      oprot.writeFieldStop();
2153
      oprot.writeStructEnd();
2154
    }
2155
 
2156
    @Override
2157
    public String toString() {
2158
      StringBuilder sb = new StringBuilder("createTransaction_result(");
2159
      boolean first = true;
2160
 
132 ashish 2161
      sb.append("success:");
2162
      sb.append(this.success);
2163
      first = false;
2164
      if (!first) sb.append(", ");
68 ashish 2165
      sb.append("ex:");
2166
      if (this.ex == null) {
2167
        sb.append("null");
2168
      } else {
2169
        sb.append(this.ex);
2170
      }
2171
      first = false;
2172
      sb.append(")");
2173
      return sb.toString();
2174
    }
2175
 
2176
    public void validate() throws TException {
2177
      // check for required fields
2178
    }
2179
 
2180
  }
2181
 
2182
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
2183
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
2184
 
2185
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
2186
 
2187
    private long id;
2188
 
2189
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2190
    public enum _Fields implements TFieldIdEnum {
2191
      ID((short)1, "id");
2192
 
2193
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2194
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2195
 
2196
      static {
2197
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2198
          byId.put((int)field._thriftId, field);
2199
          byName.put(field.getFieldName(), field);
2200
        }
2201
      }
2202
 
2203
      /**
2204
       * Find the _Fields constant that matches fieldId, or null if its not found.
2205
       */
2206
      public static _Fields findByThriftId(int fieldId) {
2207
        return byId.get(fieldId);
2208
      }
2209
 
2210
      /**
2211
       * Find the _Fields constant that matches fieldId, throwing an exception
2212
       * if it is not found.
2213
       */
2214
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2215
        _Fields fields = findByThriftId(fieldId);
2216
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2217
        return fields;
2218
      }
2219
 
2220
      /**
2221
       * Find the _Fields constant that matches name, or null if its not found.
2222
       */
2223
      public static _Fields findByName(String name) {
2224
        return byName.get(name);
2225
      }
2226
 
2227
      private final short _thriftId;
2228
      private final String _fieldName;
2229
 
2230
      _Fields(short thriftId, String fieldName) {
2231
        _thriftId = thriftId;
2232
        _fieldName = fieldName;
2233
      }
2234
 
2235
      public short getThriftFieldId() {
2236
        return _thriftId;
2237
      }
2238
 
2239
      public String getFieldName() {
2240
        return _fieldName;
2241
      }
2242
    }
2243
 
2244
    // isset id assignments
2245
    private static final int __ID_ISSET_ID = 0;
2246
    private BitSet __isset_bit_vector = new BitSet(1);
2247
 
2248
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2249
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
2250
          new FieldValueMetaData(TType.I64)));
2251
    }});
2252
 
2253
    static {
2254
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
2255
    }
2256
 
2257
    public getTransaction_args() {
2258
    }
2259
 
2260
    public getTransaction_args(
2261
      long id)
2262
    {
2263
      this();
2264
      this.id = id;
2265
      setIdIsSet(true);
2266
    }
2267
 
2268
    /**
2269
     * Performs a deep copy on <i>other</i>.
2270
     */
2271
    public getTransaction_args(getTransaction_args other) {
2272
      __isset_bit_vector.clear();
2273
      __isset_bit_vector.or(other.__isset_bit_vector);
2274
      this.id = other.id;
2275
    }
2276
 
2277
    public getTransaction_args deepCopy() {
2278
      return new getTransaction_args(this);
2279
    }
2280
 
2281
    @Deprecated
2282
    public getTransaction_args clone() {
2283
      return new getTransaction_args(this);
2284
    }
2285
 
2286
    public long getId() {
2287
      return this.id;
2288
    }
2289
 
2290
    public getTransaction_args setId(long id) {
2291
      this.id = id;
2292
      setIdIsSet(true);
2293
      return this;
2294
    }
2295
 
2296
    public void unsetId() {
2297
      __isset_bit_vector.clear(__ID_ISSET_ID);
2298
    }
2299
 
2300
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
2301
    public boolean isSetId() {
2302
      return __isset_bit_vector.get(__ID_ISSET_ID);
2303
    }
2304
 
2305
    public void setIdIsSet(boolean value) {
2306
      __isset_bit_vector.set(__ID_ISSET_ID, value);
2307
    }
2308
 
2309
    public void setFieldValue(_Fields field, Object value) {
2310
      switch (field) {
2311
      case ID:
2312
        if (value == null) {
2313
          unsetId();
2314
        } else {
2315
          setId((Long)value);
2316
        }
2317
        break;
2318
 
2319
      }
2320
    }
2321
 
2322
    public void setFieldValue(int fieldID, Object value) {
2323
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2324
    }
2325
 
2326
    public Object getFieldValue(_Fields field) {
2327
      switch (field) {
2328
      case ID:
2329
        return new Long(getId());
2330
 
2331
      }
2332
      throw new IllegalStateException();
2333
    }
2334
 
2335
    public Object getFieldValue(int fieldId) {
2336
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2337
    }
2338
 
2339
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2340
    public boolean isSet(_Fields field) {
2341
      switch (field) {
2342
      case ID:
2343
        return isSetId();
2344
      }
2345
      throw new IllegalStateException();
2346
    }
2347
 
2348
    public boolean isSet(int fieldID) {
2349
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2350
    }
2351
 
2352
    @Override
2353
    public boolean equals(Object that) {
2354
      if (that == null)
2355
        return false;
2356
      if (that instanceof getTransaction_args)
2357
        return this.equals((getTransaction_args)that);
2358
      return false;
2359
    }
2360
 
2361
    public boolean equals(getTransaction_args that) {
2362
      if (that == null)
2363
        return false;
2364
 
2365
      boolean this_present_id = true;
2366
      boolean that_present_id = true;
2367
      if (this_present_id || that_present_id) {
2368
        if (!(this_present_id && that_present_id))
2369
          return false;
2370
        if (this.id != that.id)
2371
          return false;
2372
      }
2373
 
2374
      return true;
2375
    }
2376
 
2377
    @Override
2378
    public int hashCode() {
2379
      return 0;
2380
    }
2381
 
2382
    public int compareTo(getTransaction_args other) {
2383
      if (!getClass().equals(other.getClass())) {
2384
        return getClass().getName().compareTo(other.getClass().getName());
2385
      }
2386
 
2387
      int lastComparison = 0;
2388
      getTransaction_args typedOther = (getTransaction_args)other;
2389
 
2390
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
2391
      if (lastComparison != 0) {
2392
        return lastComparison;
2393
      }
2394
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
2395
      if (lastComparison != 0) {
2396
        return lastComparison;
2397
      }
2398
      return 0;
2399
    }
2400
 
2401
    public void read(TProtocol iprot) throws TException {
2402
      TField field;
2403
      iprot.readStructBegin();
2404
      while (true)
2405
      {
2406
        field = iprot.readFieldBegin();
2407
        if (field.type == TType.STOP) { 
2408
          break;
2409
        }
2410
        _Fields fieldId = _Fields.findByThriftId(field.id);
2411
        if (fieldId == null) {
2412
          TProtocolUtil.skip(iprot, field.type);
2413
        } else {
2414
          switch (fieldId) {
2415
            case ID:
2416
              if (field.type == TType.I64) {
2417
                this.id = iprot.readI64();
2418
                setIdIsSet(true);
2419
              } else { 
2420
                TProtocolUtil.skip(iprot, field.type);
2421
              }
2422
              break;
2423
          }
2424
          iprot.readFieldEnd();
2425
        }
2426
      }
2427
      iprot.readStructEnd();
2428
      validate();
2429
    }
2430
 
2431
    public void write(TProtocol oprot) throws TException {
2432
      validate();
2433
 
2434
      oprot.writeStructBegin(STRUCT_DESC);
2435
      oprot.writeFieldBegin(ID_FIELD_DESC);
2436
      oprot.writeI64(this.id);
2437
      oprot.writeFieldEnd();
2438
      oprot.writeFieldStop();
2439
      oprot.writeStructEnd();
2440
    }
2441
 
2442
    @Override
2443
    public String toString() {
2444
      StringBuilder sb = new StringBuilder("getTransaction_args(");
2445
      boolean first = true;
2446
 
2447
      sb.append("id:");
2448
      sb.append(this.id);
2449
      first = false;
2450
      sb.append(")");
2451
      return sb.toString();
2452
    }
2453
 
2454
    public void validate() throws TException {
2455
      // check for required fields
2456
    }
2457
 
2458
  }
2459
 
2460
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable   {
2461
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
2462
 
2463
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
2464
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
2465
 
2466
    private Transaction success;
2467
    private TransactionServiceException ex;
2468
 
2469
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2470
    public enum _Fields implements TFieldIdEnum {
2471
      SUCCESS((short)0, "success"),
2472
      EX((short)1, "ex");
2473
 
2474
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2475
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2476
 
2477
      static {
2478
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2479
          byId.put((int)field._thriftId, field);
2480
          byName.put(field.getFieldName(), field);
2481
        }
2482
      }
2483
 
2484
      /**
2485
       * Find the _Fields constant that matches fieldId, or null if its not found.
2486
       */
2487
      public static _Fields findByThriftId(int fieldId) {
2488
        return byId.get(fieldId);
2489
      }
2490
 
2491
      /**
2492
       * Find the _Fields constant that matches fieldId, throwing an exception
2493
       * if it is not found.
2494
       */
2495
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2496
        _Fields fields = findByThriftId(fieldId);
2497
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2498
        return fields;
2499
      }
2500
 
2501
      /**
2502
       * Find the _Fields constant that matches name, or null if its not found.
2503
       */
2504
      public static _Fields findByName(String name) {
2505
        return byName.get(name);
2506
      }
2507
 
2508
      private final short _thriftId;
2509
      private final String _fieldName;
2510
 
2511
      _Fields(short thriftId, String fieldName) {
2512
        _thriftId = thriftId;
2513
        _fieldName = fieldName;
2514
      }
2515
 
2516
      public short getThriftFieldId() {
2517
        return _thriftId;
2518
      }
2519
 
2520
      public String getFieldName() {
2521
        return _fieldName;
2522
      }
2523
    }
2524
 
2525
    // isset id assignments
2526
 
2527
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2528
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2529
          new StructMetaData(TType.STRUCT, Transaction.class)));
2530
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
2531
          new FieldValueMetaData(TType.STRUCT)));
2532
    }});
2533
 
2534
    static {
2535
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
2536
    }
2537
 
2538
    public getTransaction_result() {
2539
    }
2540
 
2541
    public getTransaction_result(
2542
      Transaction success,
2543
      TransactionServiceException ex)
2544
    {
2545
      this();
2546
      this.success = success;
2547
      this.ex = ex;
2548
    }
2549
 
2550
    /**
2551
     * Performs a deep copy on <i>other</i>.
2552
     */
2553
    public getTransaction_result(getTransaction_result other) {
2554
      if (other.isSetSuccess()) {
2555
        this.success = new Transaction(other.success);
2556
      }
2557
      if (other.isSetEx()) {
2558
        this.ex = new TransactionServiceException(other.ex);
2559
      }
2560
    }
2561
 
2562
    public getTransaction_result deepCopy() {
2563
      return new getTransaction_result(this);
2564
    }
2565
 
2566
    @Deprecated
2567
    public getTransaction_result clone() {
2568
      return new getTransaction_result(this);
2569
    }
2570
 
2571
    public Transaction getSuccess() {
2572
      return this.success;
2573
    }
2574
 
2575
    public getTransaction_result setSuccess(Transaction success) {
2576
      this.success = success;
2577
      return this;
2578
    }
2579
 
2580
    public void unsetSuccess() {
2581
      this.success = null;
2582
    }
2583
 
2584
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2585
    public boolean isSetSuccess() {
2586
      return this.success != null;
2587
    }
2588
 
2589
    public void setSuccessIsSet(boolean value) {
2590
      if (!value) {
2591
        this.success = null;
2592
      }
2593
    }
2594
 
2595
    public TransactionServiceException getEx() {
2596
      return this.ex;
2597
    }
2598
 
2599
    public getTransaction_result setEx(TransactionServiceException ex) {
2600
      this.ex = ex;
2601
      return this;
2602
    }
2603
 
2604
    public void unsetEx() {
2605
      this.ex = null;
2606
    }
2607
 
2608
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
2609
    public boolean isSetEx() {
2610
      return this.ex != null;
2611
    }
2612
 
2613
    public void setExIsSet(boolean value) {
2614
      if (!value) {
2615
        this.ex = null;
2616
      }
2617
    }
2618
 
2619
    public void setFieldValue(_Fields field, Object value) {
2620
      switch (field) {
2621
      case SUCCESS:
2622
        if (value == null) {
2623
          unsetSuccess();
2624
        } else {
2625
          setSuccess((Transaction)value);
2626
        }
2627
        break;
2628
 
2629
      case EX:
2630
        if (value == null) {
2631
          unsetEx();
2632
        } else {
2633
          setEx((TransactionServiceException)value);
2634
        }
2635
        break;
2636
 
2637
      }
2638
    }
2639
 
2640
    public void setFieldValue(int fieldID, Object value) {
2641
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2642
    }
2643
 
2644
    public Object getFieldValue(_Fields field) {
2645
      switch (field) {
2646
      case SUCCESS:
2647
        return getSuccess();
2648
 
2649
      case EX:
2650
        return getEx();
2651
 
2652
      }
2653
      throw new IllegalStateException();
2654
    }
2655
 
2656
    public Object getFieldValue(int fieldId) {
2657
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2658
    }
2659
 
2660
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2661
    public boolean isSet(_Fields field) {
2662
      switch (field) {
2663
      case SUCCESS:
2664
        return isSetSuccess();
2665
      case EX:
2666
        return isSetEx();
2667
      }
2668
      throw new IllegalStateException();
2669
    }
2670
 
2671
    public boolean isSet(int fieldID) {
2672
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2673
    }
2674
 
2675
    @Override
2676
    public boolean equals(Object that) {
2677
      if (that == null)
2678
        return false;
2679
      if (that instanceof getTransaction_result)
2680
        return this.equals((getTransaction_result)that);
2681
      return false;
2682
    }
2683
 
2684
    public boolean equals(getTransaction_result that) {
2685
      if (that == null)
2686
        return false;
2687
 
2688
      boolean this_present_success = true && this.isSetSuccess();
2689
      boolean that_present_success = true && that.isSetSuccess();
2690
      if (this_present_success || that_present_success) {
2691
        if (!(this_present_success && that_present_success))
2692
          return false;
2693
        if (!this.success.equals(that.success))
2694
          return false;
2695
      }
2696
 
2697
      boolean this_present_ex = true && this.isSetEx();
2698
      boolean that_present_ex = true && that.isSetEx();
2699
      if (this_present_ex || that_present_ex) {
2700
        if (!(this_present_ex && that_present_ex))
2701
          return false;
2702
        if (!this.ex.equals(that.ex))
2703
          return false;
2704
      }
2705
 
2706
      return true;
2707
    }
2708
 
2709
    @Override
2710
    public int hashCode() {
2711
      return 0;
2712
    }
2713
 
2714
    public void read(TProtocol iprot) throws TException {
2715
      TField field;
2716
      iprot.readStructBegin();
2717
      while (true)
2718
      {
2719
        field = iprot.readFieldBegin();
2720
        if (field.type == TType.STOP) { 
2721
          break;
2722
        }
2723
        _Fields fieldId = _Fields.findByThriftId(field.id);
2724
        if (fieldId == null) {
2725
          TProtocolUtil.skip(iprot, field.type);
2726
        } else {
2727
          switch (fieldId) {
2728
            case SUCCESS:
2729
              if (field.type == TType.STRUCT) {
2730
                this.success = new Transaction();
2731
                this.success.read(iprot);
2732
              } else { 
2733
                TProtocolUtil.skip(iprot, field.type);
2734
              }
2735
              break;
2736
            case EX:
2737
              if (field.type == TType.STRUCT) {
2738
                this.ex = new TransactionServiceException();
2739
                this.ex.read(iprot);
2740
              } else { 
2741
                TProtocolUtil.skip(iprot, field.type);
2742
              }
2743
              break;
2744
          }
2745
          iprot.readFieldEnd();
2746
        }
2747
      }
2748
      iprot.readStructEnd();
2749
      validate();
2750
    }
2751
 
2752
    public void write(TProtocol oprot) throws TException {
2753
      oprot.writeStructBegin(STRUCT_DESC);
2754
 
2755
      if (this.isSetSuccess()) {
2756
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
2757
        this.success.write(oprot);
2758
        oprot.writeFieldEnd();
2759
      } else if (this.isSetEx()) {
2760
        oprot.writeFieldBegin(EX_FIELD_DESC);
2761
        this.ex.write(oprot);
2762
        oprot.writeFieldEnd();
2763
      }
2764
      oprot.writeFieldStop();
2765
      oprot.writeStructEnd();
2766
    }
2767
 
2768
    @Override
2769
    public String toString() {
2770
      StringBuilder sb = new StringBuilder("getTransaction_result(");
2771
      boolean first = true;
2772
 
2773
      sb.append("success:");
2774
      if (this.success == null) {
2775
        sb.append("null");
2776
      } else {
2777
        sb.append(this.success);
2778
      }
2779
      first = false;
2780
      if (!first) sb.append(", ");
2781
      sb.append("ex:");
2782
      if (this.ex == null) {
2783
        sb.append("null");
2784
      } else {
2785
        sb.append(this.ex);
2786
      }
2787
      first = false;
2788
      sb.append(")");
2789
      return sb.toString();
2790
    }
2791
 
2792
    public void validate() throws TException {
2793
      // check for required fields
2794
    }
2795
 
2796
  }
2797
 
2798
  public static class getAllTransactions_args implements TBase<getAllTransactions_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllTransactions_args>   {
2799
    private static final TStruct STRUCT_DESC = new TStruct("getAllTransactions_args");
2800
 
2801
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
132 ashish 2802
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
2803
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
358 ashish 2804
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 2805
 
2806
    private TransactionStatus status;
132 ashish 2807
    private long from_date;
2808
    private long to_date;
358 ashish 2809
    private long warehouse_id;
68 ashish 2810
 
2811
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2812
    public enum _Fields implements TFieldIdEnum {
2813
      /**
2814
       * 
2815
       * @see TransactionStatus
2816
       */
2817
      STATUS((short)1, "status"),
132 ashish 2818
      FROM_DATE((short)2, "from_date"),
358 ashish 2819
      TO_DATE((short)3, "to_date"),
2820
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 2821
 
2822
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2823
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2824
 
2825
      static {
2826
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2827
          byId.put((int)field._thriftId, field);
2828
          byName.put(field.getFieldName(), field);
2829
        }
2830
      }
2831
 
2832
      /**
2833
       * Find the _Fields constant that matches fieldId, or null if its not found.
2834
       */
2835
      public static _Fields findByThriftId(int fieldId) {
2836
        return byId.get(fieldId);
2837
      }
2838
 
2839
      /**
2840
       * Find the _Fields constant that matches fieldId, throwing an exception
2841
       * if it is not found.
2842
       */
2843
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2844
        _Fields fields = findByThriftId(fieldId);
2845
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2846
        return fields;
2847
      }
2848
 
2849
      /**
2850
       * Find the _Fields constant that matches name, or null if its not found.
2851
       */
2852
      public static _Fields findByName(String name) {
2853
        return byName.get(name);
2854
      }
2855
 
2856
      private final short _thriftId;
2857
      private final String _fieldName;
2858
 
2859
      _Fields(short thriftId, String fieldName) {
2860
        _thriftId = thriftId;
2861
        _fieldName = fieldName;
2862
      }
2863
 
2864
      public short getThriftFieldId() {
2865
        return _thriftId;
2866
      }
2867
 
2868
      public String getFieldName() {
2869
        return _fieldName;
2870
      }
2871
    }
2872
 
2873
    // isset id assignments
132 ashish 2874
    private static final int __FROM_DATE_ISSET_ID = 0;
2875
    private static final int __TO_DATE_ISSET_ID = 1;
358 ashish 2876
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
2877
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 2878
 
2879
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2880
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
2881
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
132 ashish 2882
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 2883
          new FieldValueMetaData(TType.I64)));
132 ashish 2884
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 2885
          new FieldValueMetaData(TType.I64)));
358 ashish 2886
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
2887
          new FieldValueMetaData(TType.I64)));
68 ashish 2888
    }});
2889
 
2890
    static {
2891
      FieldMetaData.addStructMetaDataMap(getAllTransactions_args.class, metaDataMap);
2892
    }
2893
 
2894
    public getAllTransactions_args() {
2895
    }
2896
 
2897
    public getAllTransactions_args(
2898
      TransactionStatus status,
132 ashish 2899
      long from_date,
358 ashish 2900
      long to_date,
2901
      long warehouse_id)
68 ashish 2902
    {
2903
      this();
2904
      this.status = status;
132 ashish 2905
      this.from_date = from_date;
2906
      setFrom_dateIsSet(true);
2907
      this.to_date = to_date;
2908
      setTo_dateIsSet(true);
358 ashish 2909
      this.warehouse_id = warehouse_id;
2910
      setWarehouse_idIsSet(true);
68 ashish 2911
    }
2912
 
2913
    /**
2914
     * Performs a deep copy on <i>other</i>.
2915
     */
2916
    public getAllTransactions_args(getAllTransactions_args other) {
2917
      __isset_bit_vector.clear();
2918
      __isset_bit_vector.or(other.__isset_bit_vector);
2919
      if (other.isSetStatus()) {
2920
        this.status = other.status;
2921
      }
132 ashish 2922
      this.from_date = other.from_date;
2923
      this.to_date = other.to_date;
358 ashish 2924
      this.warehouse_id = other.warehouse_id;
68 ashish 2925
    }
2926
 
2927
    public getAllTransactions_args deepCopy() {
2928
      return new getAllTransactions_args(this);
2929
    }
2930
 
2931
    @Deprecated
2932
    public getAllTransactions_args clone() {
2933
      return new getAllTransactions_args(this);
2934
    }
2935
 
2936
    /**
2937
     * 
2938
     * @see TransactionStatus
2939
     */
2940
    public TransactionStatus getStatus() {
2941
      return this.status;
2942
    }
2943
 
2944
    /**
2945
     * 
2946
     * @see TransactionStatus
2947
     */
2948
    public getAllTransactions_args setStatus(TransactionStatus status) {
2949
      this.status = status;
2950
      return this;
2951
    }
2952
 
2953
    public void unsetStatus() {
2954
      this.status = null;
2955
    }
2956
 
2957
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
2958
    public boolean isSetStatus() {
2959
      return this.status != null;
2960
    }
2961
 
2962
    public void setStatusIsSet(boolean value) {
2963
      if (!value) {
2964
        this.status = null;
2965
      }
2966
    }
2967
 
132 ashish 2968
    public long getFrom_date() {
2969
      return this.from_date;
68 ashish 2970
    }
2971
 
132 ashish 2972
    public getAllTransactions_args setFrom_date(long from_date) {
2973
      this.from_date = from_date;
2974
      setFrom_dateIsSet(true);
68 ashish 2975
      return this;
2976
    }
2977
 
132 ashish 2978
    public void unsetFrom_date() {
2979
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 2980
    }
2981
 
132 ashish 2982
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
2983
    public boolean isSetFrom_date() {
2984
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 2985
    }
2986
 
132 ashish 2987
    public void setFrom_dateIsSet(boolean value) {
2988
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 2989
    }
2990
 
132 ashish 2991
    public long getTo_date() {
2992
      return this.to_date;
68 ashish 2993
    }
2994
 
132 ashish 2995
    public getAllTransactions_args setTo_date(long to_date) {
2996
      this.to_date = to_date;
2997
      setTo_dateIsSet(true);
68 ashish 2998
      return this;
2999
    }
3000
 
132 ashish 3001
    public void unsetTo_date() {
3002
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 3003
    }
3004
 
132 ashish 3005
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
3006
    public boolean isSetTo_date() {
3007
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 3008
    }
3009
 
132 ashish 3010
    public void setTo_dateIsSet(boolean value) {
3011
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 3012
    }
3013
 
358 ashish 3014
    public long getWarehouse_id() {
3015
      return this.warehouse_id;
3016
    }
3017
 
3018
    public getAllTransactions_args setWarehouse_id(long warehouse_id) {
3019
      this.warehouse_id = warehouse_id;
3020
      setWarehouse_idIsSet(true);
3021
      return this;
3022
    }
3023
 
3024
    public void unsetWarehouse_id() {
3025
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
3026
    }
3027
 
3028
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
3029
    public boolean isSetWarehouse_id() {
3030
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
3031
    }
3032
 
3033
    public void setWarehouse_idIsSet(boolean value) {
3034
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
3035
    }
3036
 
68 ashish 3037
    public void setFieldValue(_Fields field, Object value) {
3038
      switch (field) {
3039
      case STATUS:
3040
        if (value == null) {
3041
          unsetStatus();
3042
        } else {
3043
          setStatus((TransactionStatus)value);
3044
        }
3045
        break;
3046
 
132 ashish 3047
      case FROM_DATE:
68 ashish 3048
        if (value == null) {
132 ashish 3049
          unsetFrom_date();
68 ashish 3050
        } else {
132 ashish 3051
          setFrom_date((Long)value);
68 ashish 3052
        }
3053
        break;
3054
 
132 ashish 3055
      case TO_DATE:
68 ashish 3056
        if (value == null) {
132 ashish 3057
          unsetTo_date();
68 ashish 3058
        } else {
132 ashish 3059
          setTo_date((Long)value);
68 ashish 3060
        }
3061
        break;
3062
 
358 ashish 3063
      case WAREHOUSE_ID:
3064
        if (value == null) {
3065
          unsetWarehouse_id();
3066
        } else {
3067
          setWarehouse_id((Long)value);
3068
        }
3069
        break;
3070
 
68 ashish 3071
      }
3072
    }
3073
 
3074
    public void setFieldValue(int fieldID, Object value) {
3075
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3076
    }
3077
 
3078
    public Object getFieldValue(_Fields field) {
3079
      switch (field) {
3080
      case STATUS:
3081
        return getStatus();
3082
 
132 ashish 3083
      case FROM_DATE:
3084
        return new Long(getFrom_date());
68 ashish 3085
 
132 ashish 3086
      case TO_DATE:
3087
        return new Long(getTo_date());
68 ashish 3088
 
358 ashish 3089
      case WAREHOUSE_ID:
3090
        return new Long(getWarehouse_id());
3091
 
68 ashish 3092
      }
3093
      throw new IllegalStateException();
3094
    }
3095
 
3096
    public Object getFieldValue(int fieldId) {
3097
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3098
    }
3099
 
3100
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3101
    public boolean isSet(_Fields field) {
3102
      switch (field) {
3103
      case STATUS:
3104
        return isSetStatus();
132 ashish 3105
      case FROM_DATE:
3106
        return isSetFrom_date();
3107
      case TO_DATE:
3108
        return isSetTo_date();
358 ashish 3109
      case WAREHOUSE_ID:
3110
        return isSetWarehouse_id();
68 ashish 3111
      }
3112
      throw new IllegalStateException();
3113
    }
3114
 
3115
    public boolean isSet(int fieldID) {
3116
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3117
    }
3118
 
3119
    @Override
3120
    public boolean equals(Object that) {
3121
      if (that == null)
3122
        return false;
3123
      if (that instanceof getAllTransactions_args)
3124
        return this.equals((getAllTransactions_args)that);
3125
      return false;
3126
    }
3127
 
3128
    public boolean equals(getAllTransactions_args that) {
3129
      if (that == null)
3130
        return false;
3131
 
3132
      boolean this_present_status = true && this.isSetStatus();
3133
      boolean that_present_status = true && that.isSetStatus();
3134
      if (this_present_status || that_present_status) {
3135
        if (!(this_present_status && that_present_status))
3136
          return false;
3137
        if (!this.status.equals(that.status))
3138
          return false;
3139
      }
3140
 
132 ashish 3141
      boolean this_present_from_date = true;
3142
      boolean that_present_from_date = true;
3143
      if (this_present_from_date || that_present_from_date) {
3144
        if (!(this_present_from_date && that_present_from_date))
68 ashish 3145
          return false;
132 ashish 3146
        if (this.from_date != that.from_date)
68 ashish 3147
          return false;
3148
      }
3149
 
132 ashish 3150
      boolean this_present_to_date = true;
3151
      boolean that_present_to_date = true;
3152
      if (this_present_to_date || that_present_to_date) {
3153
        if (!(this_present_to_date && that_present_to_date))
68 ashish 3154
          return false;
132 ashish 3155
        if (this.to_date != that.to_date)
68 ashish 3156
          return false;
3157
      }
3158
 
358 ashish 3159
      boolean this_present_warehouse_id = true;
3160
      boolean that_present_warehouse_id = true;
3161
      if (this_present_warehouse_id || that_present_warehouse_id) {
3162
        if (!(this_present_warehouse_id && that_present_warehouse_id))
3163
          return false;
3164
        if (this.warehouse_id != that.warehouse_id)
3165
          return false;
3166
      }
3167
 
68 ashish 3168
      return true;
3169
    }
3170
 
3171
    @Override
3172
    public int hashCode() {
3173
      return 0;
3174
    }
3175
 
3176
    public int compareTo(getAllTransactions_args other) {
3177
      if (!getClass().equals(other.getClass())) {
3178
        return getClass().getName().compareTo(other.getClass().getName());
3179
      }
3180
 
3181
      int lastComparison = 0;
3182
      getAllTransactions_args typedOther = (getAllTransactions_args)other;
3183
 
3184
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
3185
      if (lastComparison != 0) {
3186
        return lastComparison;
3187
      }
3188
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
3189
      if (lastComparison != 0) {
3190
        return lastComparison;
3191
      }
132 ashish 3192
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 3193
      if (lastComparison != 0) {
3194
        return lastComparison;
3195
      }
132 ashish 3196
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 3197
      if (lastComparison != 0) {
3198
        return lastComparison;
3199
      }
132 ashish 3200
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 3201
      if (lastComparison != 0) {
3202
        return lastComparison;
3203
      }
132 ashish 3204
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 3205
      if (lastComparison != 0) {
3206
        return lastComparison;
3207
      }
358 ashish 3208
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
3209
      if (lastComparison != 0) {
3210
        return lastComparison;
3211
      }
3212
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
3213
      if (lastComparison != 0) {
3214
        return lastComparison;
3215
      }
68 ashish 3216
      return 0;
3217
    }
3218
 
3219
    public void read(TProtocol iprot) throws TException {
3220
      TField field;
3221
      iprot.readStructBegin();
3222
      while (true)
3223
      {
3224
        field = iprot.readFieldBegin();
3225
        if (field.type == TType.STOP) { 
3226
          break;
3227
        }
3228
        _Fields fieldId = _Fields.findByThriftId(field.id);
3229
        if (fieldId == null) {
3230
          TProtocolUtil.skip(iprot, field.type);
3231
        } else {
3232
          switch (fieldId) {
3233
            case STATUS:
3234
              if (field.type == TType.I32) {
3235
                this.status = TransactionStatus.findByValue(iprot.readI32());
3236
              } else { 
3237
                TProtocolUtil.skip(iprot, field.type);
3238
              }
3239
              break;
132 ashish 3240
            case FROM_DATE:
68 ashish 3241
              if (field.type == TType.I64) {
132 ashish 3242
                this.from_date = iprot.readI64();
3243
                setFrom_dateIsSet(true);
68 ashish 3244
              } else { 
3245
                TProtocolUtil.skip(iprot, field.type);
3246
              }
3247
              break;
132 ashish 3248
            case TO_DATE:
68 ashish 3249
              if (field.type == TType.I64) {
132 ashish 3250
                this.to_date = iprot.readI64();
3251
                setTo_dateIsSet(true);
68 ashish 3252
              } else { 
3253
                TProtocolUtil.skip(iprot, field.type);
3254
              }
3255
              break;
358 ashish 3256
            case WAREHOUSE_ID:
3257
              if (field.type == TType.I64) {
3258
                this.warehouse_id = iprot.readI64();
3259
                setWarehouse_idIsSet(true);
3260
              } else { 
3261
                TProtocolUtil.skip(iprot, field.type);
3262
              }
3263
              break;
68 ashish 3264
          }
3265
          iprot.readFieldEnd();
3266
        }
3267
      }
3268
      iprot.readStructEnd();
3269
      validate();
3270
    }
3271
 
3272
    public void write(TProtocol oprot) throws TException {
3273
      validate();
3274
 
3275
      oprot.writeStructBegin(STRUCT_DESC);
3276
      if (this.status != null) {
3277
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
3278
        oprot.writeI32(this.status.getValue());
3279
        oprot.writeFieldEnd();
3280
      }
132 ashish 3281
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
3282
      oprot.writeI64(this.from_date);
68 ashish 3283
      oprot.writeFieldEnd();
132 ashish 3284
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
3285
      oprot.writeI64(this.to_date);
68 ashish 3286
      oprot.writeFieldEnd();
358 ashish 3287
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
3288
      oprot.writeI64(this.warehouse_id);
3289
      oprot.writeFieldEnd();
68 ashish 3290
      oprot.writeFieldStop();
3291
      oprot.writeStructEnd();
3292
    }
3293
 
3294
    @Override
3295
    public String toString() {
3296
      StringBuilder sb = new StringBuilder("getAllTransactions_args(");
3297
      boolean first = true;
3298
 
3299
      sb.append("status:");
3300
      if (this.status == null) {
3301
        sb.append("null");
3302
      } else {
3303
        String status_name = status.name();
3304
        if (status_name != null) {
3305
          sb.append(status_name);
3306
          sb.append(" (");
3307
        }
3308
        sb.append(this.status);
3309
        if (status_name != null) {
3310
          sb.append(")");
3311
        }
3312
      }
3313
      first = false;
3314
      if (!first) sb.append(", ");
132 ashish 3315
      sb.append("from_date:");
3316
      sb.append(this.from_date);
68 ashish 3317
      first = false;
3318
      if (!first) sb.append(", ");
132 ashish 3319
      sb.append("to_date:");
3320
      sb.append(this.to_date);
68 ashish 3321
      first = false;
358 ashish 3322
      if (!first) sb.append(", ");
3323
      sb.append("warehouse_id:");
3324
      sb.append(this.warehouse_id);
3325
      first = false;
68 ashish 3326
      sb.append(")");
3327
      return sb.toString();
3328
    }
3329
 
3330
    public void validate() throws TException {
3331
      // check for required fields
3332
    }
3333
 
3334
  }
3335
 
3336
  public static class getAllTransactions_result implements TBase<getAllTransactions_result._Fields>, java.io.Serializable, Cloneable   {
3337
    private static final TStruct STRUCT_DESC = new TStruct("getAllTransactions_result");
3338
 
3339
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
3340
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3341
 
3342
    private List<Transaction> success;
3343
    private TransactionServiceException ex;
3344
 
3345
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3346
    public enum _Fields implements TFieldIdEnum {
3347
      SUCCESS((short)0, "success"),
3348
      EX((short)1, "ex");
3349
 
3350
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3351
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3352
 
3353
      static {
3354
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3355
          byId.put((int)field._thriftId, field);
3356
          byName.put(field.getFieldName(), field);
3357
        }
3358
      }
3359
 
3360
      /**
3361
       * Find the _Fields constant that matches fieldId, or null if its not found.
3362
       */
3363
      public static _Fields findByThriftId(int fieldId) {
3364
        return byId.get(fieldId);
3365
      }
3366
 
3367
      /**
3368
       * Find the _Fields constant that matches fieldId, throwing an exception
3369
       * if it is not found.
3370
       */
3371
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3372
        _Fields fields = findByThriftId(fieldId);
3373
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3374
        return fields;
3375
      }
3376
 
3377
      /**
3378
       * Find the _Fields constant that matches name, or null if its not found.
3379
       */
3380
      public static _Fields findByName(String name) {
3381
        return byName.get(name);
3382
      }
3383
 
3384
      private final short _thriftId;
3385
      private final String _fieldName;
3386
 
3387
      _Fields(short thriftId, String fieldName) {
3388
        _thriftId = thriftId;
3389
        _fieldName = fieldName;
3390
      }
3391
 
3392
      public short getThriftFieldId() {
3393
        return _thriftId;
3394
      }
3395
 
3396
      public String getFieldName() {
3397
        return _fieldName;
3398
      }
3399
    }
3400
 
3401
    // isset id assignments
3402
 
3403
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3404
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3405
          new ListMetaData(TType.LIST, 
3406
              new StructMetaData(TType.STRUCT, Transaction.class))));
3407
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3408
          new FieldValueMetaData(TType.STRUCT)));
3409
    }});
3410
 
3411
    static {
3412
      FieldMetaData.addStructMetaDataMap(getAllTransactions_result.class, metaDataMap);
3413
    }
3414
 
3415
    public getAllTransactions_result() {
3416
    }
3417
 
3418
    public getAllTransactions_result(
3419
      List<Transaction> success,
3420
      TransactionServiceException ex)
3421
    {
3422
      this();
3423
      this.success = success;
3424
      this.ex = ex;
3425
    }
3426
 
3427
    /**
3428
     * Performs a deep copy on <i>other</i>.
3429
     */
3430
    public getAllTransactions_result(getAllTransactions_result other) {
3431
      if (other.isSetSuccess()) {
3432
        List<Transaction> __this__success = new ArrayList<Transaction>();
3433
        for (Transaction other_element : other.success) {
3434
          __this__success.add(new Transaction(other_element));
3435
        }
3436
        this.success = __this__success;
3437
      }
3438
      if (other.isSetEx()) {
3439
        this.ex = new TransactionServiceException(other.ex);
3440
      }
3441
    }
3442
 
3443
    public getAllTransactions_result deepCopy() {
3444
      return new getAllTransactions_result(this);
3445
    }
3446
 
3447
    @Deprecated
3448
    public getAllTransactions_result clone() {
3449
      return new getAllTransactions_result(this);
3450
    }
3451
 
3452
    public int getSuccessSize() {
3453
      return (this.success == null) ? 0 : this.success.size();
3454
    }
3455
 
3456
    public java.util.Iterator<Transaction> getSuccessIterator() {
3457
      return (this.success == null) ? null : this.success.iterator();
3458
    }
3459
 
3460
    public void addToSuccess(Transaction elem) {
3461
      if (this.success == null) {
3462
        this.success = new ArrayList<Transaction>();
3463
      }
3464
      this.success.add(elem);
3465
    }
3466
 
3467
    public List<Transaction> getSuccess() {
3468
      return this.success;
3469
    }
3470
 
3471
    public getAllTransactions_result setSuccess(List<Transaction> success) {
3472
      this.success = success;
3473
      return this;
3474
    }
3475
 
3476
    public void unsetSuccess() {
3477
      this.success = null;
3478
    }
3479
 
3480
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3481
    public boolean isSetSuccess() {
3482
      return this.success != null;
3483
    }
3484
 
3485
    public void setSuccessIsSet(boolean value) {
3486
      if (!value) {
3487
        this.success = null;
3488
      }
3489
    }
3490
 
3491
    public TransactionServiceException getEx() {
3492
      return this.ex;
3493
    }
3494
 
3495
    public getAllTransactions_result setEx(TransactionServiceException ex) {
3496
      this.ex = ex;
3497
      return this;
3498
    }
3499
 
3500
    public void unsetEx() {
3501
      this.ex = null;
3502
    }
3503
 
3504
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3505
    public boolean isSetEx() {
3506
      return this.ex != null;
3507
    }
3508
 
3509
    public void setExIsSet(boolean value) {
3510
      if (!value) {
3511
        this.ex = null;
3512
      }
3513
    }
3514
 
3515
    public void setFieldValue(_Fields field, Object value) {
3516
      switch (field) {
3517
      case SUCCESS:
3518
        if (value == null) {
3519
          unsetSuccess();
3520
        } else {
3521
          setSuccess((List<Transaction>)value);
3522
        }
3523
        break;
3524
 
3525
      case EX:
3526
        if (value == null) {
3527
          unsetEx();
3528
        } else {
3529
          setEx((TransactionServiceException)value);
3530
        }
3531
        break;
3532
 
3533
      }
3534
    }
3535
 
3536
    public void setFieldValue(int fieldID, Object value) {
3537
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3538
    }
3539
 
3540
    public Object getFieldValue(_Fields field) {
3541
      switch (field) {
3542
      case SUCCESS:
3543
        return getSuccess();
3544
 
3545
      case EX:
3546
        return getEx();
3547
 
3548
      }
3549
      throw new IllegalStateException();
3550
    }
3551
 
3552
    public Object getFieldValue(int fieldId) {
3553
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3554
    }
3555
 
3556
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3557
    public boolean isSet(_Fields field) {
3558
      switch (field) {
3559
      case SUCCESS:
3560
        return isSetSuccess();
3561
      case EX:
3562
        return isSetEx();
3563
      }
3564
      throw new IllegalStateException();
3565
    }
3566
 
3567
    public boolean isSet(int fieldID) {
3568
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3569
    }
3570
 
3571
    @Override
3572
    public boolean equals(Object that) {
3573
      if (that == null)
3574
        return false;
3575
      if (that instanceof getAllTransactions_result)
3576
        return this.equals((getAllTransactions_result)that);
3577
      return false;
3578
    }
3579
 
3580
    public boolean equals(getAllTransactions_result that) {
3581
      if (that == null)
3582
        return false;
3583
 
3584
      boolean this_present_success = true && this.isSetSuccess();
3585
      boolean that_present_success = true && that.isSetSuccess();
3586
      if (this_present_success || that_present_success) {
3587
        if (!(this_present_success && that_present_success))
3588
          return false;
3589
        if (!this.success.equals(that.success))
3590
          return false;
3591
      }
3592
 
3593
      boolean this_present_ex = true && this.isSetEx();
3594
      boolean that_present_ex = true && that.isSetEx();
3595
      if (this_present_ex || that_present_ex) {
3596
        if (!(this_present_ex && that_present_ex))
3597
          return false;
3598
        if (!this.ex.equals(that.ex))
3599
          return false;
3600
      }
3601
 
3602
      return true;
3603
    }
3604
 
3605
    @Override
3606
    public int hashCode() {
3607
      return 0;
3608
    }
3609
 
3610
    public void read(TProtocol iprot) throws TException {
3611
      TField field;
3612
      iprot.readStructBegin();
3613
      while (true)
3614
      {
3615
        field = iprot.readFieldBegin();
3616
        if (field.type == TType.STOP) { 
3617
          break;
3618
        }
3619
        _Fields fieldId = _Fields.findByThriftId(field.id);
3620
        if (fieldId == null) {
3621
          TProtocolUtil.skip(iprot, field.type);
3622
        } else {
3623
          switch (fieldId) {
3624
            case SUCCESS:
3625
              if (field.type == TType.LIST) {
3626
                {
132 ashish 3627
                  TList _list30 = iprot.readListBegin();
3628
                  this.success = new ArrayList<Transaction>(_list30.size);
3629
                  for (int _i31 = 0; _i31 < _list30.size; ++_i31)
68 ashish 3630
                  {
132 ashish 3631
                    Transaction _elem32;
3632
                    _elem32 = new Transaction();
3633
                    _elem32.read(iprot);
3634
                    this.success.add(_elem32);
68 ashish 3635
                  }
3636
                  iprot.readListEnd();
3637
                }
3638
              } else { 
3639
                TProtocolUtil.skip(iprot, field.type);
3640
              }
3641
              break;
3642
            case EX:
3643
              if (field.type == TType.STRUCT) {
3644
                this.ex = new TransactionServiceException();
3645
                this.ex.read(iprot);
3646
              } else { 
3647
                TProtocolUtil.skip(iprot, field.type);
3648
              }
3649
              break;
3650
          }
3651
          iprot.readFieldEnd();
3652
        }
3653
      }
3654
      iprot.readStructEnd();
3655
      validate();
3656
    }
3657
 
3658
    public void write(TProtocol oprot) throws TException {
3659
      oprot.writeStructBegin(STRUCT_DESC);
3660
 
3661
      if (this.isSetSuccess()) {
3662
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3663
        {
3664
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
132 ashish 3665
          for (Transaction _iter33 : this.success)
68 ashish 3666
          {
132 ashish 3667
            _iter33.write(oprot);
68 ashish 3668
          }
3669
          oprot.writeListEnd();
3670
        }
3671
        oprot.writeFieldEnd();
3672
      } else if (this.isSetEx()) {
3673
        oprot.writeFieldBegin(EX_FIELD_DESC);
3674
        this.ex.write(oprot);
3675
        oprot.writeFieldEnd();
3676
      }
3677
      oprot.writeFieldStop();
3678
      oprot.writeStructEnd();
3679
    }
3680
 
3681
    @Override
3682
    public String toString() {
3683
      StringBuilder sb = new StringBuilder("getAllTransactions_result(");
3684
      boolean first = true;
3685
 
3686
      sb.append("success:");
3687
      if (this.success == null) {
3688
        sb.append("null");
3689
      } else {
3690
        sb.append(this.success);
3691
      }
3692
      first = false;
3693
      if (!first) sb.append(", ");
3694
      sb.append("ex:");
3695
      if (this.ex == null) {
3696
        sb.append("null");
3697
      } else {
3698
        sb.append(this.ex);
3699
      }
3700
      first = false;
3701
      sb.append(")");
3702
      return sb.toString();
3703
    }
3704
 
3705
    public void validate() throws TException {
3706
      // check for required fields
3707
    }
3708
 
3709
  }
3710
 
3711
  public static class getTransactionsForShipmentStatus_args implements TBase<getTransactionsForShipmentStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShipmentStatus_args>   {
3712
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShipmentStatus_args");
3713
 
3714
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
132 ashish 3715
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
3716
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 3717
 
3718
    private ShipmentStatus status;
132 ashish 3719
    private long from_date;
3720
    private long to_date;
68 ashish 3721
 
3722
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3723
    public enum _Fields implements TFieldIdEnum {
3724
      /**
3725
       * 
3726
       * @see ShipmentStatus
3727
       */
3728
      STATUS((short)1, "status"),
132 ashish 3729
      FROM_DATE((short)2, "from_date"),
3730
      TO_DATE((short)3, "to_date");
68 ashish 3731
 
3732
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3733
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3734
 
3735
      static {
3736
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3737
          byId.put((int)field._thriftId, field);
3738
          byName.put(field.getFieldName(), field);
3739
        }
3740
      }
3741
 
3742
      /**
3743
       * Find the _Fields constant that matches fieldId, or null if its not found.
3744
       */
3745
      public static _Fields findByThriftId(int fieldId) {
3746
        return byId.get(fieldId);
3747
      }
3748
 
3749
      /**
3750
       * Find the _Fields constant that matches fieldId, throwing an exception
3751
       * if it is not found.
3752
       */
3753
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3754
        _Fields fields = findByThriftId(fieldId);
3755
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3756
        return fields;
3757
      }
3758
 
3759
      /**
3760
       * Find the _Fields constant that matches name, or null if its not found.
3761
       */
3762
      public static _Fields findByName(String name) {
3763
        return byName.get(name);
3764
      }
3765
 
3766
      private final short _thriftId;
3767
      private final String _fieldName;
3768
 
3769
      _Fields(short thriftId, String fieldName) {
3770
        _thriftId = thriftId;
3771
        _fieldName = fieldName;
3772
      }
3773
 
3774
      public short getThriftFieldId() {
3775
        return _thriftId;
3776
      }
3777
 
3778
      public String getFieldName() {
3779
        return _fieldName;
3780
      }
3781
    }
3782
 
3783
    // isset id assignments
132 ashish 3784
    private static final int __FROM_DATE_ISSET_ID = 0;
3785
    private static final int __TO_DATE_ISSET_ID = 1;
68 ashish 3786
    private BitSet __isset_bit_vector = new BitSet(2);
3787
 
3788
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3789
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
3790
          new EnumMetaData(TType.ENUM, ShipmentStatus.class)));
132 ashish 3791
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 3792
          new FieldValueMetaData(TType.I64)));
132 ashish 3793
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 3794
          new FieldValueMetaData(TType.I64)));
3795
    }});
3796
 
3797
    static {
3798
      FieldMetaData.addStructMetaDataMap(getTransactionsForShipmentStatus_args.class, metaDataMap);
3799
    }
3800
 
3801
    public getTransactionsForShipmentStatus_args() {
3802
    }
3803
 
3804
    public getTransactionsForShipmentStatus_args(
3805
      ShipmentStatus status,
132 ashish 3806
      long from_date,
3807
      long to_date)
68 ashish 3808
    {
3809
      this();
3810
      this.status = status;
132 ashish 3811
      this.from_date = from_date;
3812
      setFrom_dateIsSet(true);
3813
      this.to_date = to_date;
3814
      setTo_dateIsSet(true);
68 ashish 3815
    }
3816
 
3817
    /**
3818
     * Performs a deep copy on <i>other</i>.
3819
     */
3820
    public getTransactionsForShipmentStatus_args(getTransactionsForShipmentStatus_args other) {
3821
      __isset_bit_vector.clear();
3822
      __isset_bit_vector.or(other.__isset_bit_vector);
3823
      if (other.isSetStatus()) {
3824
        this.status = other.status;
3825
      }
132 ashish 3826
      this.from_date = other.from_date;
3827
      this.to_date = other.to_date;
68 ashish 3828
    }
3829
 
3830
    public getTransactionsForShipmentStatus_args deepCopy() {
3831
      return new getTransactionsForShipmentStatus_args(this);
3832
    }
3833
 
3834
    @Deprecated
3835
    public getTransactionsForShipmentStatus_args clone() {
3836
      return new getTransactionsForShipmentStatus_args(this);
3837
    }
3838
 
3839
    /**
3840
     * 
3841
     * @see ShipmentStatus
3842
     */
3843
    public ShipmentStatus getStatus() {
3844
      return this.status;
3845
    }
3846
 
3847
    /**
3848
     * 
3849
     * @see ShipmentStatus
3850
     */
3851
    public getTransactionsForShipmentStatus_args setStatus(ShipmentStatus status) {
3852
      this.status = status;
3853
      return this;
3854
    }
3855
 
3856
    public void unsetStatus() {
3857
      this.status = null;
3858
    }
3859
 
3860
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
3861
    public boolean isSetStatus() {
3862
      return this.status != null;
3863
    }
3864
 
3865
    public void setStatusIsSet(boolean value) {
3866
      if (!value) {
3867
        this.status = null;
3868
      }
3869
    }
3870
 
132 ashish 3871
    public long getFrom_date() {
3872
      return this.from_date;
68 ashish 3873
    }
3874
 
132 ashish 3875
    public getTransactionsForShipmentStatus_args setFrom_date(long from_date) {
3876
      this.from_date = from_date;
3877
      setFrom_dateIsSet(true);
68 ashish 3878
      return this;
3879
    }
3880
 
132 ashish 3881
    public void unsetFrom_date() {
3882
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 3883
    }
3884
 
132 ashish 3885
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
3886
    public boolean isSetFrom_date() {
3887
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 3888
    }
3889
 
132 ashish 3890
    public void setFrom_dateIsSet(boolean value) {
3891
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 3892
    }
3893
 
132 ashish 3894
    public long getTo_date() {
3895
      return this.to_date;
68 ashish 3896
    }
3897
 
132 ashish 3898
    public getTransactionsForShipmentStatus_args setTo_date(long to_date) {
3899
      this.to_date = to_date;
3900
      setTo_dateIsSet(true);
68 ashish 3901
      return this;
3902
    }
3903
 
132 ashish 3904
    public void unsetTo_date() {
3905
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 3906
    }
3907
 
132 ashish 3908
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
3909
    public boolean isSetTo_date() {
3910
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 3911
    }
3912
 
132 ashish 3913
    public void setTo_dateIsSet(boolean value) {
3914
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 3915
    }
3916
 
3917
    public void setFieldValue(_Fields field, Object value) {
3918
      switch (field) {
3919
      case STATUS:
3920
        if (value == null) {
3921
          unsetStatus();
3922
        } else {
3923
          setStatus((ShipmentStatus)value);
3924
        }
3925
        break;
3926
 
132 ashish 3927
      case FROM_DATE:
68 ashish 3928
        if (value == null) {
132 ashish 3929
          unsetFrom_date();
68 ashish 3930
        } else {
132 ashish 3931
          setFrom_date((Long)value);
68 ashish 3932
        }
3933
        break;
3934
 
132 ashish 3935
      case TO_DATE:
68 ashish 3936
        if (value == null) {
132 ashish 3937
          unsetTo_date();
68 ashish 3938
        } else {
132 ashish 3939
          setTo_date((Long)value);
68 ashish 3940
        }
3941
        break;
3942
 
3943
      }
3944
    }
3945
 
3946
    public void setFieldValue(int fieldID, Object value) {
3947
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3948
    }
3949
 
3950
    public Object getFieldValue(_Fields field) {
3951
      switch (field) {
3952
      case STATUS:
3953
        return getStatus();
3954
 
132 ashish 3955
      case FROM_DATE:
3956
        return new Long(getFrom_date());
68 ashish 3957
 
132 ashish 3958
      case TO_DATE:
3959
        return new Long(getTo_date());
68 ashish 3960
 
3961
      }
3962
      throw new IllegalStateException();
3963
    }
3964
 
3965
    public Object getFieldValue(int fieldId) {
3966
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3967
    }
3968
 
3969
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3970
    public boolean isSet(_Fields field) {
3971
      switch (field) {
3972
      case STATUS:
3973
        return isSetStatus();
132 ashish 3974
      case FROM_DATE:
3975
        return isSetFrom_date();
3976
      case TO_DATE:
3977
        return isSetTo_date();
68 ashish 3978
      }
3979
      throw new IllegalStateException();
3980
    }
3981
 
3982
    public boolean isSet(int fieldID) {
3983
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3984
    }
3985
 
3986
    @Override
3987
    public boolean equals(Object that) {
3988
      if (that == null)
3989
        return false;
3990
      if (that instanceof getTransactionsForShipmentStatus_args)
3991
        return this.equals((getTransactionsForShipmentStatus_args)that);
3992
      return false;
3993
    }
3994
 
3995
    public boolean equals(getTransactionsForShipmentStatus_args that) {
3996
      if (that == null)
3997
        return false;
3998
 
3999
      boolean this_present_status = true && this.isSetStatus();
4000
      boolean that_present_status = true && that.isSetStatus();
4001
      if (this_present_status || that_present_status) {
4002
        if (!(this_present_status && that_present_status))
4003
          return false;
4004
        if (!this.status.equals(that.status))
4005
          return false;
4006
      }
4007
 
132 ashish 4008
      boolean this_present_from_date = true;
4009
      boolean that_present_from_date = true;
4010
      if (this_present_from_date || that_present_from_date) {
4011
        if (!(this_present_from_date && that_present_from_date))
68 ashish 4012
          return false;
132 ashish 4013
        if (this.from_date != that.from_date)
68 ashish 4014
          return false;
4015
      }
4016
 
132 ashish 4017
      boolean this_present_to_date = true;
4018
      boolean that_present_to_date = true;
4019
      if (this_present_to_date || that_present_to_date) {
4020
        if (!(this_present_to_date && that_present_to_date))
68 ashish 4021
          return false;
132 ashish 4022
        if (this.to_date != that.to_date)
68 ashish 4023
          return false;
4024
      }
4025
 
4026
      return true;
4027
    }
4028
 
4029
    @Override
4030
    public int hashCode() {
4031
      return 0;
4032
    }
4033
 
4034
    public int compareTo(getTransactionsForShipmentStatus_args other) {
4035
      if (!getClass().equals(other.getClass())) {
4036
        return getClass().getName().compareTo(other.getClass().getName());
4037
      }
4038
 
4039
      int lastComparison = 0;
4040
      getTransactionsForShipmentStatus_args typedOther = (getTransactionsForShipmentStatus_args)other;
4041
 
4042
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
4043
      if (lastComparison != 0) {
4044
        return lastComparison;
4045
      }
4046
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
4047
      if (lastComparison != 0) {
4048
        return lastComparison;
4049
      }
132 ashish 4050
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 4051
      if (lastComparison != 0) {
4052
        return lastComparison;
4053
      }
132 ashish 4054
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 4055
      if (lastComparison != 0) {
4056
        return lastComparison;
4057
      }
132 ashish 4058
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 4059
      if (lastComparison != 0) {
4060
        return lastComparison;
4061
      }
132 ashish 4062
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 4063
      if (lastComparison != 0) {
4064
        return lastComparison;
4065
      }
4066
      return 0;
4067
    }
4068
 
4069
    public void read(TProtocol iprot) throws TException {
4070
      TField field;
4071
      iprot.readStructBegin();
4072
      while (true)
4073
      {
4074
        field = iprot.readFieldBegin();
4075
        if (field.type == TType.STOP) { 
4076
          break;
4077
        }
4078
        _Fields fieldId = _Fields.findByThriftId(field.id);
4079
        if (fieldId == null) {
4080
          TProtocolUtil.skip(iprot, field.type);
4081
        } else {
4082
          switch (fieldId) {
4083
            case STATUS:
4084
              if (field.type == TType.I32) {
4085
                this.status = ShipmentStatus.findByValue(iprot.readI32());
4086
              } else { 
4087
                TProtocolUtil.skip(iprot, field.type);
4088
              }
4089
              break;
132 ashish 4090
            case FROM_DATE:
68 ashish 4091
              if (field.type == TType.I64) {
132 ashish 4092
                this.from_date = iprot.readI64();
4093
                setFrom_dateIsSet(true);
68 ashish 4094
              } else { 
4095
                TProtocolUtil.skip(iprot, field.type);
4096
              }
4097
              break;
132 ashish 4098
            case TO_DATE:
68 ashish 4099
              if (field.type == TType.I64) {
132 ashish 4100
                this.to_date = iprot.readI64();
4101
                setTo_dateIsSet(true);
68 ashish 4102
              } else { 
4103
                TProtocolUtil.skip(iprot, field.type);
4104
              }
4105
              break;
4106
          }
4107
          iprot.readFieldEnd();
4108
        }
4109
      }
4110
      iprot.readStructEnd();
4111
      validate();
4112
    }
4113
 
4114
    public void write(TProtocol oprot) throws TException {
4115
      validate();
4116
 
4117
      oprot.writeStructBegin(STRUCT_DESC);
4118
      if (this.status != null) {
4119
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4120
        oprot.writeI32(this.status.getValue());
4121
        oprot.writeFieldEnd();
4122
      }
132 ashish 4123
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
4124
      oprot.writeI64(this.from_date);
68 ashish 4125
      oprot.writeFieldEnd();
132 ashish 4126
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
4127
      oprot.writeI64(this.to_date);
68 ashish 4128
      oprot.writeFieldEnd();
4129
      oprot.writeFieldStop();
4130
      oprot.writeStructEnd();
4131
    }
4132
 
4133
    @Override
4134
    public String toString() {
4135
      StringBuilder sb = new StringBuilder("getTransactionsForShipmentStatus_args(");
4136
      boolean first = true;
4137
 
4138
      sb.append("status:");
4139
      if (this.status == null) {
4140
        sb.append("null");
4141
      } else {
4142
        String status_name = status.name();
4143
        if (status_name != null) {
4144
          sb.append(status_name);
4145
          sb.append(" (");
4146
        }
4147
        sb.append(this.status);
4148
        if (status_name != null) {
4149
          sb.append(")");
4150
        }
4151
      }
4152
      first = false;
4153
      if (!first) sb.append(", ");
132 ashish 4154
      sb.append("from_date:");
4155
      sb.append(this.from_date);
68 ashish 4156
      first = false;
4157
      if (!first) sb.append(", ");
132 ashish 4158
      sb.append("to_date:");
4159
      sb.append(this.to_date);
68 ashish 4160
      first = false;
4161
      sb.append(")");
4162
      return sb.toString();
4163
    }
4164
 
4165
    public void validate() throws TException {
4166
      // check for required fields
4167
    }
4168
 
4169
  }
4170
 
4171
  public static class getTransactionsForShipmentStatus_result implements TBase<getTransactionsForShipmentStatus_result._Fields>, java.io.Serializable, Cloneable   {
4172
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShipmentStatus_result");
4173
 
4174
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4175
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4176
 
4177
    private List<Transaction> success;
4178
    private TransactionServiceException ex;
4179
 
4180
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4181
    public enum _Fields implements TFieldIdEnum {
4182
      SUCCESS((short)0, "success"),
4183
      EX((short)1, "ex");
4184
 
4185
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4186
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4187
 
4188
      static {
4189
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4190
          byId.put((int)field._thriftId, field);
4191
          byName.put(field.getFieldName(), field);
4192
        }
4193
      }
4194
 
4195
      /**
4196
       * Find the _Fields constant that matches fieldId, or null if its not found.
4197
       */
4198
      public static _Fields findByThriftId(int fieldId) {
4199
        return byId.get(fieldId);
4200
      }
4201
 
4202
      /**
4203
       * Find the _Fields constant that matches fieldId, throwing an exception
4204
       * if it is not found.
4205
       */
4206
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4207
        _Fields fields = findByThriftId(fieldId);
4208
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4209
        return fields;
4210
      }
4211
 
4212
      /**
4213
       * Find the _Fields constant that matches name, or null if its not found.
4214
       */
4215
      public static _Fields findByName(String name) {
4216
        return byName.get(name);
4217
      }
4218
 
4219
      private final short _thriftId;
4220
      private final String _fieldName;
4221
 
4222
      _Fields(short thriftId, String fieldName) {
4223
        _thriftId = thriftId;
4224
        _fieldName = fieldName;
4225
      }
4226
 
4227
      public short getThriftFieldId() {
4228
        return _thriftId;
4229
      }
4230
 
4231
      public String getFieldName() {
4232
        return _fieldName;
4233
      }
4234
    }
4235
 
4236
    // isset id assignments
4237
 
4238
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4239
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4240
          new ListMetaData(TType.LIST, 
4241
              new StructMetaData(TType.STRUCT, Transaction.class))));
4242
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4243
          new FieldValueMetaData(TType.STRUCT)));
4244
    }});
4245
 
4246
    static {
4247
      FieldMetaData.addStructMetaDataMap(getTransactionsForShipmentStatus_result.class, metaDataMap);
4248
    }
4249
 
4250
    public getTransactionsForShipmentStatus_result() {
4251
    }
4252
 
4253
    public getTransactionsForShipmentStatus_result(
4254
      List<Transaction> success,
4255
      TransactionServiceException ex)
4256
    {
4257
      this();
4258
      this.success = success;
4259
      this.ex = ex;
4260
    }
4261
 
4262
    /**
4263
     * Performs a deep copy on <i>other</i>.
4264
     */
4265
    public getTransactionsForShipmentStatus_result(getTransactionsForShipmentStatus_result other) {
4266
      if (other.isSetSuccess()) {
4267
        List<Transaction> __this__success = new ArrayList<Transaction>();
4268
        for (Transaction other_element : other.success) {
4269
          __this__success.add(new Transaction(other_element));
4270
        }
4271
        this.success = __this__success;
4272
      }
4273
      if (other.isSetEx()) {
4274
        this.ex = new TransactionServiceException(other.ex);
4275
      }
4276
    }
4277
 
4278
    public getTransactionsForShipmentStatus_result deepCopy() {
4279
      return new getTransactionsForShipmentStatus_result(this);
4280
    }
4281
 
4282
    @Deprecated
4283
    public getTransactionsForShipmentStatus_result clone() {
4284
      return new getTransactionsForShipmentStatus_result(this);
4285
    }
4286
 
4287
    public int getSuccessSize() {
4288
      return (this.success == null) ? 0 : this.success.size();
4289
    }
4290
 
4291
    public java.util.Iterator<Transaction> getSuccessIterator() {
4292
      return (this.success == null) ? null : this.success.iterator();
4293
    }
4294
 
4295
    public void addToSuccess(Transaction elem) {
4296
      if (this.success == null) {
4297
        this.success = new ArrayList<Transaction>();
4298
      }
4299
      this.success.add(elem);
4300
    }
4301
 
4302
    public List<Transaction> getSuccess() {
4303
      return this.success;
4304
    }
4305
 
4306
    public getTransactionsForShipmentStatus_result setSuccess(List<Transaction> success) {
4307
      this.success = success;
4308
      return this;
4309
    }
4310
 
4311
    public void unsetSuccess() {
4312
      this.success = null;
4313
    }
4314
 
4315
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4316
    public boolean isSetSuccess() {
4317
      return this.success != null;
4318
    }
4319
 
4320
    public void setSuccessIsSet(boolean value) {
4321
      if (!value) {
4322
        this.success = null;
4323
      }
4324
    }
4325
 
4326
    public TransactionServiceException getEx() {
4327
      return this.ex;
4328
    }
4329
 
4330
    public getTransactionsForShipmentStatus_result setEx(TransactionServiceException ex) {
4331
      this.ex = ex;
4332
      return this;
4333
    }
4334
 
4335
    public void unsetEx() {
4336
      this.ex = null;
4337
    }
4338
 
4339
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4340
    public boolean isSetEx() {
4341
      return this.ex != null;
4342
    }
4343
 
4344
    public void setExIsSet(boolean value) {
4345
      if (!value) {
4346
        this.ex = null;
4347
      }
4348
    }
4349
 
4350
    public void setFieldValue(_Fields field, Object value) {
4351
      switch (field) {
4352
      case SUCCESS:
4353
        if (value == null) {
4354
          unsetSuccess();
4355
        } else {
4356
          setSuccess((List<Transaction>)value);
4357
        }
4358
        break;
4359
 
4360
      case EX:
4361
        if (value == null) {
4362
          unsetEx();
4363
        } else {
4364
          setEx((TransactionServiceException)value);
4365
        }
4366
        break;
4367
 
4368
      }
4369
    }
4370
 
4371
    public void setFieldValue(int fieldID, Object value) {
4372
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4373
    }
4374
 
4375
    public Object getFieldValue(_Fields field) {
4376
      switch (field) {
4377
      case SUCCESS:
4378
        return getSuccess();
4379
 
4380
      case EX:
4381
        return getEx();
4382
 
4383
      }
4384
      throw new IllegalStateException();
4385
    }
4386
 
4387
    public Object getFieldValue(int fieldId) {
4388
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4389
    }
4390
 
4391
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4392
    public boolean isSet(_Fields field) {
4393
      switch (field) {
4394
      case SUCCESS:
4395
        return isSetSuccess();
4396
      case EX:
4397
        return isSetEx();
4398
      }
4399
      throw new IllegalStateException();
4400
    }
4401
 
4402
    public boolean isSet(int fieldID) {
4403
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4404
    }
4405
 
4406
    @Override
4407
    public boolean equals(Object that) {
4408
      if (that == null)
4409
        return false;
4410
      if (that instanceof getTransactionsForShipmentStatus_result)
4411
        return this.equals((getTransactionsForShipmentStatus_result)that);
4412
      return false;
4413
    }
4414
 
4415
    public boolean equals(getTransactionsForShipmentStatus_result that) {
4416
      if (that == null)
4417
        return false;
4418
 
4419
      boolean this_present_success = true && this.isSetSuccess();
4420
      boolean that_present_success = true && that.isSetSuccess();
4421
      if (this_present_success || that_present_success) {
4422
        if (!(this_present_success && that_present_success))
4423
          return false;
4424
        if (!this.success.equals(that.success))
4425
          return false;
4426
      }
4427
 
4428
      boolean this_present_ex = true && this.isSetEx();
4429
      boolean that_present_ex = true && that.isSetEx();
4430
      if (this_present_ex || that_present_ex) {
4431
        if (!(this_present_ex && that_present_ex))
4432
          return false;
4433
        if (!this.ex.equals(that.ex))
4434
          return false;
4435
      }
4436
 
4437
      return true;
4438
    }
4439
 
4440
    @Override
4441
    public int hashCode() {
4442
      return 0;
4443
    }
4444
 
4445
    public void read(TProtocol iprot) throws TException {
4446
      TField field;
4447
      iprot.readStructBegin();
4448
      while (true)
4449
      {
4450
        field = iprot.readFieldBegin();
4451
        if (field.type == TType.STOP) { 
4452
          break;
4453
        }
4454
        _Fields fieldId = _Fields.findByThriftId(field.id);
4455
        if (fieldId == null) {
4456
          TProtocolUtil.skip(iprot, field.type);
4457
        } else {
4458
          switch (fieldId) {
4459
            case SUCCESS:
4460
              if (field.type == TType.LIST) {
4461
                {
132 ashish 4462
                  TList _list34 = iprot.readListBegin();
4463
                  this.success = new ArrayList<Transaction>(_list34.size);
4464
                  for (int _i35 = 0; _i35 < _list34.size; ++_i35)
68 ashish 4465
                  {
132 ashish 4466
                    Transaction _elem36;
4467
                    _elem36 = new Transaction();
4468
                    _elem36.read(iprot);
4469
                    this.success.add(_elem36);
68 ashish 4470
                  }
4471
                  iprot.readListEnd();
4472
                }
4473
              } else { 
4474
                TProtocolUtil.skip(iprot, field.type);
4475
              }
4476
              break;
4477
            case EX:
4478
              if (field.type == TType.STRUCT) {
4479
                this.ex = new TransactionServiceException();
4480
                this.ex.read(iprot);
4481
              } else { 
4482
                TProtocolUtil.skip(iprot, field.type);
4483
              }
4484
              break;
4485
          }
4486
          iprot.readFieldEnd();
4487
        }
4488
      }
4489
      iprot.readStructEnd();
4490
      validate();
4491
    }
4492
 
4493
    public void write(TProtocol oprot) throws TException {
4494
      oprot.writeStructBegin(STRUCT_DESC);
4495
 
4496
      if (this.isSetSuccess()) {
4497
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4498
        {
4499
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
132 ashish 4500
          for (Transaction _iter37 : this.success)
68 ashish 4501
          {
132 ashish 4502
            _iter37.write(oprot);
68 ashish 4503
          }
4504
          oprot.writeListEnd();
4505
        }
4506
        oprot.writeFieldEnd();
4507
      } else if (this.isSetEx()) {
4508
        oprot.writeFieldBegin(EX_FIELD_DESC);
4509
        this.ex.write(oprot);
4510
        oprot.writeFieldEnd();
4511
      }
4512
      oprot.writeFieldStop();
4513
      oprot.writeStructEnd();
4514
    }
4515
 
4516
    @Override
4517
    public String toString() {
4518
      StringBuilder sb = new StringBuilder("getTransactionsForShipmentStatus_result(");
4519
      boolean first = true;
4520
 
4521
      sb.append("success:");
4522
      if (this.success == null) {
4523
        sb.append("null");
4524
      } else {
4525
        sb.append(this.success);
4526
      }
4527
      first = false;
4528
      if (!first) sb.append(", ");
4529
      sb.append("ex:");
4530
      if (this.ex == null) {
4531
        sb.append("null");
4532
      } else {
4533
        sb.append(this.ex);
4534
      }
4535
      first = false;
4536
      sb.append(")");
4537
      return sb.toString();
4538
    }
4539
 
4540
    public void validate() throws TException {
4541
      // check for required fields
4542
    }
4543
 
4544
  }
4545
 
4546
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
4547
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
4548
 
4549
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 4550
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
4551
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 4552
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
4553
 
4554
    private long customerId;
132 ashish 4555
    private long from_date;
4556
    private long to_date;
68 ashish 4557
    private TransactionStatus status;
4558
 
4559
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4560
    public enum _Fields implements TFieldIdEnum {
4561
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 4562
      FROM_DATE((short)2, "from_date"),
4563
      TO_DATE((short)3, "to_date"),
68 ashish 4564
      /**
4565
       * 
4566
       * @see TransactionStatus
4567
       */
4568
      STATUS((short)4, "status");
4569
 
4570
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4571
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4572
 
4573
      static {
4574
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4575
          byId.put((int)field._thriftId, field);
4576
          byName.put(field.getFieldName(), field);
4577
        }
4578
      }
4579
 
4580
      /**
4581
       * Find the _Fields constant that matches fieldId, or null if its not found.
4582
       */
4583
      public static _Fields findByThriftId(int fieldId) {
4584
        return byId.get(fieldId);
4585
      }
4586
 
4587
      /**
4588
       * Find the _Fields constant that matches fieldId, throwing an exception
4589
       * if it is not found.
4590
       */
4591
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4592
        _Fields fields = findByThriftId(fieldId);
4593
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4594
        return fields;
4595
      }
4596
 
4597
      /**
4598
       * Find the _Fields constant that matches name, or null if its not found.
4599
       */
4600
      public static _Fields findByName(String name) {
4601
        return byName.get(name);
4602
      }
4603
 
4604
      private final short _thriftId;
4605
      private final String _fieldName;
4606
 
4607
      _Fields(short thriftId, String fieldName) {
4608
        _thriftId = thriftId;
4609
        _fieldName = fieldName;
4610
      }
4611
 
4612
      public short getThriftFieldId() {
4613
        return _thriftId;
4614
      }
4615
 
4616
      public String getFieldName() {
4617
        return _fieldName;
4618
      }
4619
    }
4620
 
4621
    // isset id assignments
4622
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 4623
    private static final int __FROM_DATE_ISSET_ID = 1;
4624
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 4625
    private BitSet __isset_bit_vector = new BitSet(3);
4626
 
4627
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4628
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
4629
          new FieldValueMetaData(TType.I64)));
132 ashish 4630
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 4631
          new FieldValueMetaData(TType.I64)));
132 ashish 4632
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 4633
          new FieldValueMetaData(TType.I64)));
4634
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
4635
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
4636
    }});
4637
 
4638
    static {
4639
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
4640
    }
4641
 
4642
    public getTransactionsForCustomer_args() {
4643
    }
4644
 
4645
    public getTransactionsForCustomer_args(
4646
      long customerId,
132 ashish 4647
      long from_date,
4648
      long to_date,
68 ashish 4649
      TransactionStatus status)
4650
    {
4651
      this();
4652
      this.customerId = customerId;
4653
      setCustomerIdIsSet(true);
132 ashish 4654
      this.from_date = from_date;
4655
      setFrom_dateIsSet(true);
4656
      this.to_date = to_date;
4657
      setTo_dateIsSet(true);
68 ashish 4658
      this.status = status;
4659
    }
4660
 
4661
    /**
4662
     * Performs a deep copy on <i>other</i>.
4663
     */
4664
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
4665
      __isset_bit_vector.clear();
4666
      __isset_bit_vector.or(other.__isset_bit_vector);
4667
      this.customerId = other.customerId;
132 ashish 4668
      this.from_date = other.from_date;
4669
      this.to_date = other.to_date;
68 ashish 4670
      if (other.isSetStatus()) {
4671
        this.status = other.status;
4672
      }
4673
    }
4674
 
4675
    public getTransactionsForCustomer_args deepCopy() {
4676
      return new getTransactionsForCustomer_args(this);
4677
    }
4678
 
4679
    @Deprecated
4680
    public getTransactionsForCustomer_args clone() {
4681
      return new getTransactionsForCustomer_args(this);
4682
    }
4683
 
4684
    public long getCustomerId() {
4685
      return this.customerId;
4686
    }
4687
 
4688
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
4689
      this.customerId = customerId;
4690
      setCustomerIdIsSet(true);
4691
      return this;
4692
    }
4693
 
4694
    public void unsetCustomerId() {
4695
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
4696
    }
4697
 
4698
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
4699
    public boolean isSetCustomerId() {
4700
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
4701
    }
4702
 
4703
    public void setCustomerIdIsSet(boolean value) {
4704
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
4705
    }
4706
 
132 ashish 4707
    public long getFrom_date() {
4708
      return this.from_date;
68 ashish 4709
    }
4710
 
132 ashish 4711
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
4712
      this.from_date = from_date;
4713
      setFrom_dateIsSet(true);
68 ashish 4714
      return this;
4715
    }
4716
 
132 ashish 4717
    public void unsetFrom_date() {
4718
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 4719
    }
4720
 
132 ashish 4721
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
4722
    public boolean isSetFrom_date() {
4723
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 4724
    }
4725
 
132 ashish 4726
    public void setFrom_dateIsSet(boolean value) {
4727
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 4728
    }
4729
 
132 ashish 4730
    public long getTo_date() {
4731
      return this.to_date;
68 ashish 4732
    }
4733
 
132 ashish 4734
    public getTransactionsForCustomer_args setTo_date(long to_date) {
4735
      this.to_date = to_date;
4736
      setTo_dateIsSet(true);
68 ashish 4737
      return this;
4738
    }
4739
 
132 ashish 4740
    public void unsetTo_date() {
4741
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 4742
    }
4743
 
132 ashish 4744
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
4745
    public boolean isSetTo_date() {
4746
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 4747
    }
4748
 
132 ashish 4749
    public void setTo_dateIsSet(boolean value) {
4750
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 4751
    }
4752
 
4753
    /**
4754
     * 
4755
     * @see TransactionStatus
4756
     */
4757
    public TransactionStatus getStatus() {
4758
      return this.status;
4759
    }
4760
 
4761
    /**
4762
     * 
4763
     * @see TransactionStatus
4764
     */
4765
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
4766
      this.status = status;
4767
      return this;
4768
    }
4769
 
4770
    public void unsetStatus() {
4771
      this.status = null;
4772
    }
4773
 
4774
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
4775
    public boolean isSetStatus() {
4776
      return this.status != null;
4777
    }
4778
 
4779
    public void setStatusIsSet(boolean value) {
4780
      if (!value) {
4781
        this.status = null;
4782
      }
4783
    }
4784
 
4785
    public void setFieldValue(_Fields field, Object value) {
4786
      switch (field) {
4787
      case CUSTOMER_ID:
4788
        if (value == null) {
4789
          unsetCustomerId();
4790
        } else {
4791
          setCustomerId((Long)value);
4792
        }
4793
        break;
4794
 
132 ashish 4795
      case FROM_DATE:
68 ashish 4796
        if (value == null) {
132 ashish 4797
          unsetFrom_date();
68 ashish 4798
        } else {
132 ashish 4799
          setFrom_date((Long)value);
68 ashish 4800
        }
4801
        break;
4802
 
132 ashish 4803
      case TO_DATE:
68 ashish 4804
        if (value == null) {
132 ashish 4805
          unsetTo_date();
68 ashish 4806
        } else {
132 ashish 4807
          setTo_date((Long)value);
68 ashish 4808
        }
4809
        break;
4810
 
4811
      case STATUS:
4812
        if (value == null) {
4813
          unsetStatus();
4814
        } else {
4815
          setStatus((TransactionStatus)value);
4816
        }
4817
        break;
4818
 
4819
      }
4820
    }
4821
 
4822
    public void setFieldValue(int fieldID, Object value) {
4823
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4824
    }
4825
 
4826
    public Object getFieldValue(_Fields field) {
4827
      switch (field) {
4828
      case CUSTOMER_ID:
4829
        return new Long(getCustomerId());
4830
 
132 ashish 4831
      case FROM_DATE:
4832
        return new Long(getFrom_date());
68 ashish 4833
 
132 ashish 4834
      case TO_DATE:
4835
        return new Long(getTo_date());
68 ashish 4836
 
4837
      case STATUS:
4838
        return getStatus();
4839
 
4840
      }
4841
      throw new IllegalStateException();
4842
    }
4843
 
4844
    public Object getFieldValue(int fieldId) {
4845
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4846
    }
4847
 
4848
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4849
    public boolean isSet(_Fields field) {
4850
      switch (field) {
4851
      case CUSTOMER_ID:
4852
        return isSetCustomerId();
132 ashish 4853
      case FROM_DATE:
4854
        return isSetFrom_date();
4855
      case TO_DATE:
4856
        return isSetTo_date();
68 ashish 4857
      case STATUS:
4858
        return isSetStatus();
4859
      }
4860
      throw new IllegalStateException();
4861
    }
4862
 
4863
    public boolean isSet(int fieldID) {
4864
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4865
    }
4866
 
4867
    @Override
4868
    public boolean equals(Object that) {
4869
      if (that == null)
4870
        return false;
4871
      if (that instanceof getTransactionsForCustomer_args)
4872
        return this.equals((getTransactionsForCustomer_args)that);
4873
      return false;
4874
    }
4875
 
4876
    public boolean equals(getTransactionsForCustomer_args that) {
4877
      if (that == null)
4878
        return false;
4879
 
4880
      boolean this_present_customerId = true;
4881
      boolean that_present_customerId = true;
4882
      if (this_present_customerId || that_present_customerId) {
4883
        if (!(this_present_customerId && that_present_customerId))
4884
          return false;
4885
        if (this.customerId != that.customerId)
4886
          return false;
4887
      }
4888
 
132 ashish 4889
      boolean this_present_from_date = true;
4890
      boolean that_present_from_date = true;
4891
      if (this_present_from_date || that_present_from_date) {
4892
        if (!(this_present_from_date && that_present_from_date))
68 ashish 4893
          return false;
132 ashish 4894
        if (this.from_date != that.from_date)
68 ashish 4895
          return false;
4896
      }
4897
 
132 ashish 4898
      boolean this_present_to_date = true;
4899
      boolean that_present_to_date = true;
4900
      if (this_present_to_date || that_present_to_date) {
4901
        if (!(this_present_to_date && that_present_to_date))
68 ashish 4902
          return false;
132 ashish 4903
        if (this.to_date != that.to_date)
68 ashish 4904
          return false;
4905
      }
4906
 
4907
      boolean this_present_status = true && this.isSetStatus();
4908
      boolean that_present_status = true && that.isSetStatus();
4909
      if (this_present_status || that_present_status) {
4910
        if (!(this_present_status && that_present_status))
4911
          return false;
4912
        if (!this.status.equals(that.status))
4913
          return false;
4914
      }
4915
 
4916
      return true;
4917
    }
4918
 
4919
    @Override
4920
    public int hashCode() {
4921
      return 0;
4922
    }
4923
 
4924
    public int compareTo(getTransactionsForCustomer_args other) {
4925
      if (!getClass().equals(other.getClass())) {
4926
        return getClass().getName().compareTo(other.getClass().getName());
4927
      }
4928
 
4929
      int lastComparison = 0;
4930
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
4931
 
4932
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
4933
      if (lastComparison != 0) {
4934
        return lastComparison;
4935
      }
4936
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
4937
      if (lastComparison != 0) {
4938
        return lastComparison;
4939
      }
132 ashish 4940
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 4941
      if (lastComparison != 0) {
4942
        return lastComparison;
4943
      }
132 ashish 4944
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 4945
      if (lastComparison != 0) {
4946
        return lastComparison;
4947
      }
132 ashish 4948
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 4949
      if (lastComparison != 0) {
4950
        return lastComparison;
4951
      }
132 ashish 4952
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 4953
      if (lastComparison != 0) {
4954
        return lastComparison;
4955
      }
4956
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
4957
      if (lastComparison != 0) {
4958
        return lastComparison;
4959
      }
4960
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
4961
      if (lastComparison != 0) {
4962
        return lastComparison;
4963
      }
4964
      return 0;
4965
    }
4966
 
4967
    public void read(TProtocol iprot) throws TException {
4968
      TField field;
4969
      iprot.readStructBegin();
4970
      while (true)
4971
      {
4972
        field = iprot.readFieldBegin();
4973
        if (field.type == TType.STOP) { 
4974
          break;
4975
        }
4976
        _Fields fieldId = _Fields.findByThriftId(field.id);
4977
        if (fieldId == null) {
4978
          TProtocolUtil.skip(iprot, field.type);
4979
        } else {
4980
          switch (fieldId) {
4981
            case CUSTOMER_ID:
4982
              if (field.type == TType.I64) {
4983
                this.customerId = iprot.readI64();
4984
                setCustomerIdIsSet(true);
4985
              } else { 
4986
                TProtocolUtil.skip(iprot, field.type);
4987
              }
4988
              break;
132 ashish 4989
            case FROM_DATE:
68 ashish 4990
              if (field.type == TType.I64) {
132 ashish 4991
                this.from_date = iprot.readI64();
4992
                setFrom_dateIsSet(true);
68 ashish 4993
              } else { 
4994
                TProtocolUtil.skip(iprot, field.type);
4995
              }
4996
              break;
132 ashish 4997
            case TO_DATE:
68 ashish 4998
              if (field.type == TType.I64) {
132 ashish 4999
                this.to_date = iprot.readI64();
5000
                setTo_dateIsSet(true);
68 ashish 5001
              } else { 
5002
                TProtocolUtil.skip(iprot, field.type);
5003
              }
5004
              break;
5005
            case STATUS:
5006
              if (field.type == TType.I32) {
5007
                this.status = TransactionStatus.findByValue(iprot.readI32());
5008
              } else { 
5009
                TProtocolUtil.skip(iprot, field.type);
5010
              }
5011
              break;
5012
          }
5013
          iprot.readFieldEnd();
5014
        }
5015
      }
5016
      iprot.readStructEnd();
5017
      validate();
5018
    }
5019
 
5020
    public void write(TProtocol oprot) throws TException {
5021
      validate();
5022
 
5023
      oprot.writeStructBegin(STRUCT_DESC);
5024
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
5025
      oprot.writeI64(this.customerId);
5026
      oprot.writeFieldEnd();
132 ashish 5027
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
5028
      oprot.writeI64(this.from_date);
68 ashish 5029
      oprot.writeFieldEnd();
132 ashish 5030
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
5031
      oprot.writeI64(this.to_date);
68 ashish 5032
      oprot.writeFieldEnd();
5033
      if (this.status != null) {
5034
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
5035
        oprot.writeI32(this.status.getValue());
5036
        oprot.writeFieldEnd();
5037
      }
5038
      oprot.writeFieldStop();
5039
      oprot.writeStructEnd();
5040
    }
5041
 
5042
    @Override
5043
    public String toString() {
5044
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
5045
      boolean first = true;
5046
 
5047
      sb.append("customerId:");
5048
      sb.append(this.customerId);
5049
      first = false;
5050
      if (!first) sb.append(", ");
132 ashish 5051
      sb.append("from_date:");
5052
      sb.append(this.from_date);
68 ashish 5053
      first = false;
5054
      if (!first) sb.append(", ");
132 ashish 5055
      sb.append("to_date:");
5056
      sb.append(this.to_date);
68 ashish 5057
      first = false;
5058
      if (!first) sb.append(", ");
5059
      sb.append("status:");
5060
      if (this.status == null) {
5061
        sb.append("null");
5062
      } else {
5063
        String status_name = status.name();
5064
        if (status_name != null) {
5065
          sb.append(status_name);
5066
          sb.append(" (");
5067
        }
5068
        sb.append(this.status);
5069
        if (status_name != null) {
5070
          sb.append(")");
5071
        }
5072
      }
5073
      first = false;
5074
      sb.append(")");
5075
      return sb.toString();
5076
    }
5077
 
5078
    public void validate() throws TException {
5079
      // check for required fields
5080
    }
5081
 
5082
  }
5083
 
5084
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable   {
5085
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
5086
 
5087
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
5088
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5089
 
5090
    private List<Transaction> success;
5091
    private TransactionServiceException ex;
5092
 
5093
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5094
    public enum _Fields implements TFieldIdEnum {
5095
      SUCCESS((short)0, "success"),
5096
      EX((short)1, "ex");
5097
 
5098
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5099
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5100
 
5101
      static {
5102
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5103
          byId.put((int)field._thriftId, field);
5104
          byName.put(field.getFieldName(), field);
5105
        }
5106
      }
5107
 
5108
      /**
5109
       * Find the _Fields constant that matches fieldId, or null if its not found.
5110
       */
5111
      public static _Fields findByThriftId(int fieldId) {
5112
        return byId.get(fieldId);
5113
      }
5114
 
5115
      /**
5116
       * Find the _Fields constant that matches fieldId, throwing an exception
5117
       * if it is not found.
5118
       */
5119
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5120
        _Fields fields = findByThriftId(fieldId);
5121
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5122
        return fields;
5123
      }
5124
 
5125
      /**
5126
       * Find the _Fields constant that matches name, or null if its not found.
5127
       */
5128
      public static _Fields findByName(String name) {
5129
        return byName.get(name);
5130
      }
5131
 
5132
      private final short _thriftId;
5133
      private final String _fieldName;
5134
 
5135
      _Fields(short thriftId, String fieldName) {
5136
        _thriftId = thriftId;
5137
        _fieldName = fieldName;
5138
      }
5139
 
5140
      public short getThriftFieldId() {
5141
        return _thriftId;
5142
      }
5143
 
5144
      public String getFieldName() {
5145
        return _fieldName;
5146
      }
5147
    }
5148
 
5149
    // isset id assignments
5150
 
5151
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5152
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5153
          new ListMetaData(TType.LIST, 
5154
              new StructMetaData(TType.STRUCT, Transaction.class))));
5155
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5156
          new FieldValueMetaData(TType.STRUCT)));
5157
    }});
5158
 
5159
    static {
5160
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
5161
    }
5162
 
5163
    public getTransactionsForCustomer_result() {
5164
    }
5165
 
5166
    public getTransactionsForCustomer_result(
5167
      List<Transaction> success,
5168
      TransactionServiceException ex)
5169
    {
5170
      this();
5171
      this.success = success;
5172
      this.ex = ex;
5173
    }
5174
 
5175
    /**
5176
     * Performs a deep copy on <i>other</i>.
5177
     */
5178
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
5179
      if (other.isSetSuccess()) {
5180
        List<Transaction> __this__success = new ArrayList<Transaction>();
5181
        for (Transaction other_element : other.success) {
5182
          __this__success.add(new Transaction(other_element));
5183
        }
5184
        this.success = __this__success;
5185
      }
5186
      if (other.isSetEx()) {
5187
        this.ex = new TransactionServiceException(other.ex);
5188
      }
5189
    }
5190
 
5191
    public getTransactionsForCustomer_result deepCopy() {
5192
      return new getTransactionsForCustomer_result(this);
5193
    }
5194
 
5195
    @Deprecated
5196
    public getTransactionsForCustomer_result clone() {
5197
      return new getTransactionsForCustomer_result(this);
5198
    }
5199
 
5200
    public int getSuccessSize() {
5201
      return (this.success == null) ? 0 : this.success.size();
5202
    }
5203
 
5204
    public java.util.Iterator<Transaction> getSuccessIterator() {
5205
      return (this.success == null) ? null : this.success.iterator();
5206
    }
5207
 
5208
    public void addToSuccess(Transaction elem) {
5209
      if (this.success == null) {
5210
        this.success = new ArrayList<Transaction>();
5211
      }
5212
      this.success.add(elem);
5213
    }
5214
 
5215
    public List<Transaction> getSuccess() {
5216
      return this.success;
5217
    }
5218
 
5219
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
5220
      this.success = success;
5221
      return this;
5222
    }
5223
 
5224
    public void unsetSuccess() {
5225
      this.success = null;
5226
    }
5227
 
5228
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5229
    public boolean isSetSuccess() {
5230
      return this.success != null;
5231
    }
5232
 
5233
    public void setSuccessIsSet(boolean value) {
5234
      if (!value) {
5235
        this.success = null;
5236
      }
5237
    }
5238
 
5239
    public TransactionServiceException getEx() {
5240
      return this.ex;
5241
    }
5242
 
5243
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
5244
      this.ex = ex;
5245
      return this;
5246
    }
5247
 
5248
    public void unsetEx() {
5249
      this.ex = null;
5250
    }
5251
 
5252
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5253
    public boolean isSetEx() {
5254
      return this.ex != null;
5255
    }
5256
 
5257
    public void setExIsSet(boolean value) {
5258
      if (!value) {
5259
        this.ex = null;
5260
      }
5261
    }
5262
 
5263
    public void setFieldValue(_Fields field, Object value) {
5264
      switch (field) {
5265
      case SUCCESS:
5266
        if (value == null) {
5267
          unsetSuccess();
5268
        } else {
5269
          setSuccess((List<Transaction>)value);
5270
        }
5271
        break;
5272
 
5273
      case EX:
5274
        if (value == null) {
5275
          unsetEx();
5276
        } else {
5277
          setEx((TransactionServiceException)value);
5278
        }
5279
        break;
5280
 
5281
      }
5282
    }
5283
 
5284
    public void setFieldValue(int fieldID, Object value) {
5285
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5286
    }
5287
 
5288
    public Object getFieldValue(_Fields field) {
5289
      switch (field) {
5290
      case SUCCESS:
5291
        return getSuccess();
5292
 
5293
      case EX:
5294
        return getEx();
5295
 
5296
      }
5297
      throw new IllegalStateException();
5298
    }
5299
 
5300
    public Object getFieldValue(int fieldId) {
5301
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5302
    }
5303
 
5304
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5305
    public boolean isSet(_Fields field) {
5306
      switch (field) {
5307
      case SUCCESS:
5308
        return isSetSuccess();
5309
      case EX:
5310
        return isSetEx();
5311
      }
5312
      throw new IllegalStateException();
5313
    }
5314
 
5315
    public boolean isSet(int fieldID) {
5316
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5317
    }
5318
 
5319
    @Override
5320
    public boolean equals(Object that) {
5321
      if (that == null)
5322
        return false;
5323
      if (that instanceof getTransactionsForCustomer_result)
5324
        return this.equals((getTransactionsForCustomer_result)that);
5325
      return false;
5326
    }
5327
 
5328
    public boolean equals(getTransactionsForCustomer_result that) {
5329
      if (that == null)
5330
        return false;
5331
 
5332
      boolean this_present_success = true && this.isSetSuccess();
5333
      boolean that_present_success = true && that.isSetSuccess();
5334
      if (this_present_success || that_present_success) {
5335
        if (!(this_present_success && that_present_success))
5336
          return false;
5337
        if (!this.success.equals(that.success))
5338
          return false;
5339
      }
5340
 
5341
      boolean this_present_ex = true && this.isSetEx();
5342
      boolean that_present_ex = true && that.isSetEx();
5343
      if (this_present_ex || that_present_ex) {
5344
        if (!(this_present_ex && that_present_ex))
5345
          return false;
5346
        if (!this.ex.equals(that.ex))
5347
          return false;
5348
      }
5349
 
5350
      return true;
5351
    }
5352
 
5353
    @Override
5354
    public int hashCode() {
5355
      return 0;
5356
    }
5357
 
5358
    public void read(TProtocol iprot) throws TException {
5359
      TField field;
5360
      iprot.readStructBegin();
5361
      while (true)
5362
      {
5363
        field = iprot.readFieldBegin();
5364
        if (field.type == TType.STOP) { 
5365
          break;
5366
        }
5367
        _Fields fieldId = _Fields.findByThriftId(field.id);
5368
        if (fieldId == null) {
5369
          TProtocolUtil.skip(iprot, field.type);
5370
        } else {
5371
          switch (fieldId) {
5372
            case SUCCESS:
5373
              if (field.type == TType.LIST) {
5374
                {
132 ashish 5375
                  TList _list38 = iprot.readListBegin();
5376
                  this.success = new ArrayList<Transaction>(_list38.size);
5377
                  for (int _i39 = 0; _i39 < _list38.size; ++_i39)
68 ashish 5378
                  {
132 ashish 5379
                    Transaction _elem40;
5380
                    _elem40 = new Transaction();
5381
                    _elem40.read(iprot);
5382
                    this.success.add(_elem40);
68 ashish 5383
                  }
5384
                  iprot.readListEnd();
5385
                }
5386
              } else { 
5387
                TProtocolUtil.skip(iprot, field.type);
5388
              }
5389
              break;
5390
            case EX:
5391
              if (field.type == TType.STRUCT) {
5392
                this.ex = new TransactionServiceException();
5393
                this.ex.read(iprot);
5394
              } else { 
5395
                TProtocolUtil.skip(iprot, field.type);
5396
              }
5397
              break;
5398
          }
5399
          iprot.readFieldEnd();
5400
        }
5401
      }
5402
      iprot.readStructEnd();
5403
      validate();
5404
    }
5405
 
5406
    public void write(TProtocol oprot) throws TException {
5407
      oprot.writeStructBegin(STRUCT_DESC);
5408
 
5409
      if (this.isSetSuccess()) {
5410
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5411
        {
5412
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
132 ashish 5413
          for (Transaction _iter41 : this.success)
68 ashish 5414
          {
132 ashish 5415
            _iter41.write(oprot);
68 ashish 5416
          }
5417
          oprot.writeListEnd();
5418
        }
5419
        oprot.writeFieldEnd();
5420
      } else if (this.isSetEx()) {
5421
        oprot.writeFieldBegin(EX_FIELD_DESC);
5422
        this.ex.write(oprot);
5423
        oprot.writeFieldEnd();
5424
      }
5425
      oprot.writeFieldStop();
5426
      oprot.writeStructEnd();
5427
    }
5428
 
5429
    @Override
5430
    public String toString() {
5431
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
5432
      boolean first = true;
5433
 
5434
      sb.append("success:");
5435
      if (this.success == null) {
5436
        sb.append("null");
5437
      } else {
5438
        sb.append(this.success);
5439
      }
5440
      first = false;
5441
      if (!first) sb.append(", ");
5442
      sb.append("ex:");
5443
      if (this.ex == null) {
5444
        sb.append("null");
5445
      } else {
5446
        sb.append(this.ex);
5447
      }
5448
      first = false;
5449
      sb.append(")");
5450
      return sb.toString();
5451
    }
5452
 
5453
    public void validate() throws TException {
5454
      // check for required fields
5455
    }
5456
 
5457
  }
5458
 
5459
  public static class getTransactionsForCustomerAndShipmentStatus_args implements TBase<getTransactionsForCustomerAndShipmentStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomerAndShipmentStatus_args>   {
5460
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomerAndShipmentStatus_args");
5461
 
5462
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 5463
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
5464
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 5465
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
5466
 
5467
    private long customerId;
132 ashish 5468
    private long from_date;
5469
    private long to_date;
68 ashish 5470
    private ShipmentStatus status;
5471
 
5472
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5473
    public enum _Fields implements TFieldIdEnum {
5474
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 5475
      FROM_DATE((short)2, "from_date"),
5476
      TO_DATE((short)3, "to_date"),
68 ashish 5477
      /**
5478
       * 
5479
       * @see ShipmentStatus
5480
       */
5481
      STATUS((short)4, "status");
5482
 
5483
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5484
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5485
 
5486
      static {
5487
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5488
          byId.put((int)field._thriftId, field);
5489
          byName.put(field.getFieldName(), field);
5490
        }
5491
      }
5492
 
5493
      /**
5494
       * Find the _Fields constant that matches fieldId, or null if its not found.
5495
       */
5496
      public static _Fields findByThriftId(int fieldId) {
5497
        return byId.get(fieldId);
5498
      }
5499
 
5500
      /**
5501
       * Find the _Fields constant that matches fieldId, throwing an exception
5502
       * if it is not found.
5503
       */
5504
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5505
        _Fields fields = findByThriftId(fieldId);
5506
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5507
        return fields;
5508
      }
5509
 
5510
      /**
5511
       * Find the _Fields constant that matches name, or null if its not found.
5512
       */
5513
      public static _Fields findByName(String name) {
5514
        return byName.get(name);
5515
      }
5516
 
5517
      private final short _thriftId;
5518
      private final String _fieldName;
5519
 
5520
      _Fields(short thriftId, String fieldName) {
5521
        _thriftId = thriftId;
5522
        _fieldName = fieldName;
5523
      }
5524
 
5525
      public short getThriftFieldId() {
5526
        return _thriftId;
5527
      }
5528
 
5529
      public String getFieldName() {
5530
        return _fieldName;
5531
      }
5532
    }
5533
 
5534
    // isset id assignments
5535
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 5536
    private static final int __FROM_DATE_ISSET_ID = 1;
5537
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 5538
    private BitSet __isset_bit_vector = new BitSet(3);
5539
 
5540
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5541
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
5542
          new FieldValueMetaData(TType.I64)));
132 ashish 5543
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 5544
          new FieldValueMetaData(TType.I64)));
132 ashish 5545
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 5546
          new FieldValueMetaData(TType.I64)));
5547
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
5548
          new EnumMetaData(TType.ENUM, ShipmentStatus.class)));
5549
    }});
5550
 
5551
    static {
5552
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomerAndShipmentStatus_args.class, metaDataMap);
5553
    }
5554
 
5555
    public getTransactionsForCustomerAndShipmentStatus_args() {
5556
    }
5557
 
5558
    public getTransactionsForCustomerAndShipmentStatus_args(
5559
      long customerId,
132 ashish 5560
      long from_date,
5561
      long to_date,
68 ashish 5562
      ShipmentStatus status)
5563
    {
5564
      this();
5565
      this.customerId = customerId;
5566
      setCustomerIdIsSet(true);
132 ashish 5567
      this.from_date = from_date;
5568
      setFrom_dateIsSet(true);
5569
      this.to_date = to_date;
5570
      setTo_dateIsSet(true);
68 ashish 5571
      this.status = status;
5572
    }
5573
 
5574
    /**
5575
     * Performs a deep copy on <i>other</i>.
5576
     */
5577
    public getTransactionsForCustomerAndShipmentStatus_args(getTransactionsForCustomerAndShipmentStatus_args other) {
5578
      __isset_bit_vector.clear();
5579
      __isset_bit_vector.or(other.__isset_bit_vector);
5580
      this.customerId = other.customerId;
132 ashish 5581
      this.from_date = other.from_date;
5582
      this.to_date = other.to_date;
68 ashish 5583
      if (other.isSetStatus()) {
5584
        this.status = other.status;
5585
      }
5586
    }
5587
 
5588
    public getTransactionsForCustomerAndShipmentStatus_args deepCopy() {
5589
      return new getTransactionsForCustomerAndShipmentStatus_args(this);
5590
    }
5591
 
5592
    @Deprecated
5593
    public getTransactionsForCustomerAndShipmentStatus_args clone() {
5594
      return new getTransactionsForCustomerAndShipmentStatus_args(this);
5595
    }
5596
 
5597
    public long getCustomerId() {
5598
      return this.customerId;
5599
    }
5600
 
5601
    public getTransactionsForCustomerAndShipmentStatus_args setCustomerId(long customerId) {
5602
      this.customerId = customerId;
5603
      setCustomerIdIsSet(true);
5604
      return this;
5605
    }
5606
 
5607
    public void unsetCustomerId() {
5608
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
5609
    }
5610
 
5611
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
5612
    public boolean isSetCustomerId() {
5613
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
5614
    }
5615
 
5616
    public void setCustomerIdIsSet(boolean value) {
5617
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
5618
    }
5619
 
132 ashish 5620
    public long getFrom_date() {
5621
      return this.from_date;
68 ashish 5622
    }
5623
 
132 ashish 5624
    public getTransactionsForCustomerAndShipmentStatus_args setFrom_date(long from_date) {
5625
      this.from_date = from_date;
5626
      setFrom_dateIsSet(true);
68 ashish 5627
      return this;
5628
    }
5629
 
132 ashish 5630
    public void unsetFrom_date() {
5631
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 5632
    }
5633
 
132 ashish 5634
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
5635
    public boolean isSetFrom_date() {
5636
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 5637
    }
5638
 
132 ashish 5639
    public void setFrom_dateIsSet(boolean value) {
5640
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 5641
    }
5642
 
132 ashish 5643
    public long getTo_date() {
5644
      return this.to_date;
68 ashish 5645
    }
5646
 
132 ashish 5647
    public getTransactionsForCustomerAndShipmentStatus_args setTo_date(long to_date) {
5648
      this.to_date = to_date;
5649
      setTo_dateIsSet(true);
68 ashish 5650
      return this;
5651
    }
5652
 
132 ashish 5653
    public void unsetTo_date() {
5654
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 5655
    }
5656
 
132 ashish 5657
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
5658
    public boolean isSetTo_date() {
5659
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 5660
    }
5661
 
132 ashish 5662
    public void setTo_dateIsSet(boolean value) {
5663
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 5664
    }
5665
 
5666
    /**
5667
     * 
5668
     * @see ShipmentStatus
5669
     */
5670
    public ShipmentStatus getStatus() {
5671
      return this.status;
5672
    }
5673
 
5674
    /**
5675
     * 
5676
     * @see ShipmentStatus
5677
     */
5678
    public getTransactionsForCustomerAndShipmentStatus_args setStatus(ShipmentStatus status) {
5679
      this.status = status;
5680
      return this;
5681
    }
5682
 
5683
    public void unsetStatus() {
5684
      this.status = null;
5685
    }
5686
 
5687
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
5688
    public boolean isSetStatus() {
5689
      return this.status != null;
5690
    }
5691
 
5692
    public void setStatusIsSet(boolean value) {
5693
      if (!value) {
5694
        this.status = null;
5695
      }
5696
    }
5697
 
5698
    public void setFieldValue(_Fields field, Object value) {
5699
      switch (field) {
5700
      case CUSTOMER_ID:
5701
        if (value == null) {
5702
          unsetCustomerId();
5703
        } else {
5704
          setCustomerId((Long)value);
5705
        }
5706
        break;
5707
 
132 ashish 5708
      case FROM_DATE:
68 ashish 5709
        if (value == null) {
132 ashish 5710
          unsetFrom_date();
68 ashish 5711
        } else {
132 ashish 5712
          setFrom_date((Long)value);
68 ashish 5713
        }
5714
        break;
5715
 
132 ashish 5716
      case TO_DATE:
68 ashish 5717
        if (value == null) {
132 ashish 5718
          unsetTo_date();
68 ashish 5719
        } else {
132 ashish 5720
          setTo_date((Long)value);
68 ashish 5721
        }
5722
        break;
5723
 
5724
      case STATUS:
5725
        if (value == null) {
5726
          unsetStatus();
5727
        } else {
5728
          setStatus((ShipmentStatus)value);
5729
        }
5730
        break;
5731
 
5732
      }
5733
    }
5734
 
5735
    public void setFieldValue(int fieldID, Object value) {
5736
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5737
    }
5738
 
5739
    public Object getFieldValue(_Fields field) {
5740
      switch (field) {
5741
      case CUSTOMER_ID:
5742
        return new Long(getCustomerId());
5743
 
132 ashish 5744
      case FROM_DATE:
5745
        return new Long(getFrom_date());
68 ashish 5746
 
132 ashish 5747
      case TO_DATE:
5748
        return new Long(getTo_date());
68 ashish 5749
 
5750
      case STATUS:
5751
        return getStatus();
5752
 
5753
      }
5754
      throw new IllegalStateException();
5755
    }
5756
 
5757
    public Object getFieldValue(int fieldId) {
5758
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5759
    }
5760
 
5761
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5762
    public boolean isSet(_Fields field) {
5763
      switch (field) {
5764
      case CUSTOMER_ID:
5765
        return isSetCustomerId();
132 ashish 5766
      case FROM_DATE:
5767
        return isSetFrom_date();
5768
      case TO_DATE:
5769
        return isSetTo_date();
68 ashish 5770
      case STATUS:
5771
        return isSetStatus();
5772
      }
5773
      throw new IllegalStateException();
5774
    }
5775
 
5776
    public boolean isSet(int fieldID) {
5777
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5778
    }
5779
 
5780
    @Override
5781
    public boolean equals(Object that) {
5782
      if (that == null)
5783
        return false;
5784
      if (that instanceof getTransactionsForCustomerAndShipmentStatus_args)
5785
        return this.equals((getTransactionsForCustomerAndShipmentStatus_args)that);
5786
      return false;
5787
    }
5788
 
5789
    public boolean equals(getTransactionsForCustomerAndShipmentStatus_args that) {
5790
      if (that == null)
5791
        return false;
5792
 
5793
      boolean this_present_customerId = true;
5794
      boolean that_present_customerId = true;
5795
      if (this_present_customerId || that_present_customerId) {
5796
        if (!(this_present_customerId && that_present_customerId))
5797
          return false;
5798
        if (this.customerId != that.customerId)
5799
          return false;
5800
      }
5801
 
132 ashish 5802
      boolean this_present_from_date = true;
5803
      boolean that_present_from_date = true;
5804
      if (this_present_from_date || that_present_from_date) {
5805
        if (!(this_present_from_date && that_present_from_date))
68 ashish 5806
          return false;
132 ashish 5807
        if (this.from_date != that.from_date)
68 ashish 5808
          return false;
5809
      }
5810
 
132 ashish 5811
      boolean this_present_to_date = true;
5812
      boolean that_present_to_date = true;
5813
      if (this_present_to_date || that_present_to_date) {
5814
        if (!(this_present_to_date && that_present_to_date))
68 ashish 5815
          return false;
132 ashish 5816
        if (this.to_date != that.to_date)
68 ashish 5817
          return false;
5818
      }
5819
 
5820
      boolean this_present_status = true && this.isSetStatus();
5821
      boolean that_present_status = true && that.isSetStatus();
5822
      if (this_present_status || that_present_status) {
5823
        if (!(this_present_status && that_present_status))
5824
          return false;
5825
        if (!this.status.equals(that.status))
5826
          return false;
5827
      }
5828
 
5829
      return true;
5830
    }
5831
 
5832
    @Override
5833
    public int hashCode() {
5834
      return 0;
5835
    }
5836
 
5837
    public int compareTo(getTransactionsForCustomerAndShipmentStatus_args other) {
5838
      if (!getClass().equals(other.getClass())) {
5839
        return getClass().getName().compareTo(other.getClass().getName());
5840
      }
5841
 
5842
      int lastComparison = 0;
5843
      getTransactionsForCustomerAndShipmentStatus_args typedOther = (getTransactionsForCustomerAndShipmentStatus_args)other;
5844
 
5845
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
5846
      if (lastComparison != 0) {
5847
        return lastComparison;
5848
      }
5849
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
5850
      if (lastComparison != 0) {
5851
        return lastComparison;
5852
      }
132 ashish 5853
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 5854
      if (lastComparison != 0) {
5855
        return lastComparison;
5856
      }
132 ashish 5857
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 5858
      if (lastComparison != 0) {
5859
        return lastComparison;
5860
      }
132 ashish 5861
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 5862
      if (lastComparison != 0) {
5863
        return lastComparison;
5864
      }
132 ashish 5865
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 5866
      if (lastComparison != 0) {
5867
        return lastComparison;
5868
      }
5869
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
5870
      if (lastComparison != 0) {
5871
        return lastComparison;
5872
      }
5873
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
5874
      if (lastComparison != 0) {
5875
        return lastComparison;
5876
      }
5877
      return 0;
5878
    }
5879
 
5880
    public void read(TProtocol iprot) throws TException {
5881
      TField field;
5882
      iprot.readStructBegin();
5883
      while (true)
5884
      {
5885
        field = iprot.readFieldBegin();
5886
        if (field.type == TType.STOP) { 
5887
          break;
5888
        }
5889
        _Fields fieldId = _Fields.findByThriftId(field.id);
5890
        if (fieldId == null) {
5891
          TProtocolUtil.skip(iprot, field.type);
5892
        } else {
5893
          switch (fieldId) {
5894
            case CUSTOMER_ID:
5895
              if (field.type == TType.I64) {
5896
                this.customerId = iprot.readI64();
5897
                setCustomerIdIsSet(true);
5898
              } else { 
5899
                TProtocolUtil.skip(iprot, field.type);
5900
              }
5901
              break;
132 ashish 5902
            case FROM_DATE:
68 ashish 5903
              if (field.type == TType.I64) {
132 ashish 5904
                this.from_date = iprot.readI64();
5905
                setFrom_dateIsSet(true);
68 ashish 5906
              } else { 
5907
                TProtocolUtil.skip(iprot, field.type);
5908
              }
5909
              break;
132 ashish 5910
            case TO_DATE:
68 ashish 5911
              if (field.type == TType.I64) {
132 ashish 5912
                this.to_date = iprot.readI64();
5913
                setTo_dateIsSet(true);
68 ashish 5914
              } else { 
5915
                TProtocolUtil.skip(iprot, field.type);
5916
              }
5917
              break;
5918
            case STATUS:
5919
              if (field.type == TType.I32) {
5920
                this.status = ShipmentStatus.findByValue(iprot.readI32());
5921
              } else { 
5922
                TProtocolUtil.skip(iprot, field.type);
5923
              }
5924
              break;
5925
          }
5926
          iprot.readFieldEnd();
5927
        }
5928
      }
5929
      iprot.readStructEnd();
5930
      validate();
5931
    }
5932
 
5933
    public void write(TProtocol oprot) throws TException {
5934
      validate();
5935
 
5936
      oprot.writeStructBegin(STRUCT_DESC);
5937
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
5938
      oprot.writeI64(this.customerId);
5939
      oprot.writeFieldEnd();
132 ashish 5940
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
5941
      oprot.writeI64(this.from_date);
68 ashish 5942
      oprot.writeFieldEnd();
132 ashish 5943
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
5944
      oprot.writeI64(this.to_date);
68 ashish 5945
      oprot.writeFieldEnd();
5946
      if (this.status != null) {
5947
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
5948
        oprot.writeI32(this.status.getValue());
5949
        oprot.writeFieldEnd();
5950
      }
5951
      oprot.writeFieldStop();
5952
      oprot.writeStructEnd();
5953
    }
5954
 
5955
    @Override
5956
    public String toString() {
5957
      StringBuilder sb = new StringBuilder("getTransactionsForCustomerAndShipmentStatus_args(");
5958
      boolean first = true;
5959
 
5960
      sb.append("customerId:");
5961
      sb.append(this.customerId);
5962
      first = false;
5963
      if (!first) sb.append(", ");
132 ashish 5964
      sb.append("from_date:");
5965
      sb.append(this.from_date);
68 ashish 5966
      first = false;
5967
      if (!first) sb.append(", ");
132 ashish 5968
      sb.append("to_date:");
5969
      sb.append(this.to_date);
68 ashish 5970
      first = false;
5971
      if (!first) sb.append(", ");
5972
      sb.append("status:");
5973
      if (this.status == null) {
5974
        sb.append("null");
5975
      } else {
5976
        String status_name = status.name();
5977
        if (status_name != null) {
5978
          sb.append(status_name);
5979
          sb.append(" (");
5980
        }
5981
        sb.append(this.status);
5982
        if (status_name != null) {
5983
          sb.append(")");
5984
        }
5985
      }
5986
      first = false;
5987
      sb.append(")");
5988
      return sb.toString();
5989
    }
5990
 
5991
    public void validate() throws TException {
5992
      // check for required fields
5993
    }
5994
 
5995
  }
5996
 
5997
  public static class getTransactionsForCustomerAndShipmentStatus_result implements TBase<getTransactionsForCustomerAndShipmentStatus_result._Fields>, java.io.Serializable, Cloneable   {
5998
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomerAndShipmentStatus_result");
5999
 
6000
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
6001
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6002
 
6003
    private List<Transaction> success;
6004
    private TransactionServiceException ex;
6005
 
6006
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6007
    public enum _Fields implements TFieldIdEnum {
6008
      SUCCESS((short)0, "success"),
6009
      EX((short)1, "ex");
6010
 
6011
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6012
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6013
 
6014
      static {
6015
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6016
          byId.put((int)field._thriftId, field);
6017
          byName.put(field.getFieldName(), field);
6018
        }
6019
      }
6020
 
6021
      /**
6022
       * Find the _Fields constant that matches fieldId, or null if its not found.
6023
       */
6024
      public static _Fields findByThriftId(int fieldId) {
6025
        return byId.get(fieldId);
6026
      }
6027
 
6028
      /**
6029
       * Find the _Fields constant that matches fieldId, throwing an exception
6030
       * if it is not found.
6031
       */
6032
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6033
        _Fields fields = findByThriftId(fieldId);
6034
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6035
        return fields;
6036
      }
6037
 
6038
      /**
6039
       * Find the _Fields constant that matches name, or null if its not found.
6040
       */
6041
      public static _Fields findByName(String name) {
6042
        return byName.get(name);
6043
      }
6044
 
6045
      private final short _thriftId;
6046
      private final String _fieldName;
6047
 
6048
      _Fields(short thriftId, String fieldName) {
6049
        _thriftId = thriftId;
6050
        _fieldName = fieldName;
6051
      }
6052
 
6053
      public short getThriftFieldId() {
6054
        return _thriftId;
6055
      }
6056
 
6057
      public String getFieldName() {
6058
        return _fieldName;
6059
      }
6060
    }
6061
 
6062
    // isset id assignments
6063
 
6064
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6065
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6066
          new ListMetaData(TType.LIST, 
6067
              new StructMetaData(TType.STRUCT, Transaction.class))));
6068
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6069
          new FieldValueMetaData(TType.STRUCT)));
6070
    }});
6071
 
6072
    static {
6073
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomerAndShipmentStatus_result.class, metaDataMap);
6074
    }
6075
 
6076
    public getTransactionsForCustomerAndShipmentStatus_result() {
6077
    }
6078
 
6079
    public getTransactionsForCustomerAndShipmentStatus_result(
6080
      List<Transaction> success,
6081
      TransactionServiceException ex)
6082
    {
6083
      this();
6084
      this.success = success;
6085
      this.ex = ex;
6086
    }
6087
 
6088
    /**
6089
     * Performs a deep copy on <i>other</i>.
6090
     */
6091
    public getTransactionsForCustomerAndShipmentStatus_result(getTransactionsForCustomerAndShipmentStatus_result other) {
6092
      if (other.isSetSuccess()) {
6093
        List<Transaction> __this__success = new ArrayList<Transaction>();
6094
        for (Transaction other_element : other.success) {
6095
          __this__success.add(new Transaction(other_element));
6096
        }
6097
        this.success = __this__success;
6098
      }
6099
      if (other.isSetEx()) {
6100
        this.ex = new TransactionServiceException(other.ex);
6101
      }
6102
    }
6103
 
6104
    public getTransactionsForCustomerAndShipmentStatus_result deepCopy() {
6105
      return new getTransactionsForCustomerAndShipmentStatus_result(this);
6106
    }
6107
 
6108
    @Deprecated
6109
    public getTransactionsForCustomerAndShipmentStatus_result clone() {
6110
      return new getTransactionsForCustomerAndShipmentStatus_result(this);
6111
    }
6112
 
6113
    public int getSuccessSize() {
6114
      return (this.success == null) ? 0 : this.success.size();
6115
    }
6116
 
6117
    public java.util.Iterator<Transaction> getSuccessIterator() {
6118
      return (this.success == null) ? null : this.success.iterator();
6119
    }
6120
 
6121
    public void addToSuccess(Transaction elem) {
6122
      if (this.success == null) {
6123
        this.success = new ArrayList<Transaction>();
6124
      }
6125
      this.success.add(elem);
6126
    }
6127
 
6128
    public List<Transaction> getSuccess() {
6129
      return this.success;
6130
    }
6131
 
6132
    public getTransactionsForCustomerAndShipmentStatus_result setSuccess(List<Transaction> success) {
6133
      this.success = success;
6134
      return this;
6135
    }
6136
 
6137
    public void unsetSuccess() {
6138
      this.success = null;
6139
    }
6140
 
6141
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6142
    public boolean isSetSuccess() {
6143
      return this.success != null;
6144
    }
6145
 
6146
    public void setSuccessIsSet(boolean value) {
6147
      if (!value) {
6148
        this.success = null;
6149
      }
6150
    }
6151
 
6152
    public TransactionServiceException getEx() {
6153
      return this.ex;
6154
    }
6155
 
6156
    public getTransactionsForCustomerAndShipmentStatus_result setEx(TransactionServiceException ex) {
6157
      this.ex = ex;
6158
      return this;
6159
    }
6160
 
6161
    public void unsetEx() {
6162
      this.ex = null;
6163
    }
6164
 
6165
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6166
    public boolean isSetEx() {
6167
      return this.ex != null;
6168
    }
6169
 
6170
    public void setExIsSet(boolean value) {
6171
      if (!value) {
6172
        this.ex = null;
6173
      }
6174
    }
6175
 
6176
    public void setFieldValue(_Fields field, Object value) {
6177
      switch (field) {
6178
      case SUCCESS:
6179
        if (value == null) {
6180
          unsetSuccess();
6181
        } else {
6182
          setSuccess((List<Transaction>)value);
6183
        }
6184
        break;
6185
 
6186
      case EX:
6187
        if (value == null) {
6188
          unsetEx();
6189
        } else {
6190
          setEx((TransactionServiceException)value);
6191
        }
6192
        break;
6193
 
6194
      }
6195
    }
6196
 
6197
    public void setFieldValue(int fieldID, Object value) {
6198
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6199
    }
6200
 
6201
    public Object getFieldValue(_Fields field) {
6202
      switch (field) {
6203
      case SUCCESS:
6204
        return getSuccess();
6205
 
6206
      case EX:
6207
        return getEx();
6208
 
6209
      }
6210
      throw new IllegalStateException();
6211
    }
6212
 
6213
    public Object getFieldValue(int fieldId) {
6214
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6215
    }
6216
 
6217
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6218
    public boolean isSet(_Fields field) {
6219
      switch (field) {
6220
      case SUCCESS:
6221
        return isSetSuccess();
6222
      case EX:
6223
        return isSetEx();
6224
      }
6225
      throw new IllegalStateException();
6226
    }
6227
 
6228
    public boolean isSet(int fieldID) {
6229
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6230
    }
6231
 
6232
    @Override
6233
    public boolean equals(Object that) {
6234
      if (that == null)
6235
        return false;
6236
      if (that instanceof getTransactionsForCustomerAndShipmentStatus_result)
6237
        return this.equals((getTransactionsForCustomerAndShipmentStatus_result)that);
6238
      return false;
6239
    }
6240
 
6241
    public boolean equals(getTransactionsForCustomerAndShipmentStatus_result that) {
6242
      if (that == null)
6243
        return false;
6244
 
6245
      boolean this_present_success = true && this.isSetSuccess();
6246
      boolean that_present_success = true && that.isSetSuccess();
6247
      if (this_present_success || that_present_success) {
6248
        if (!(this_present_success && that_present_success))
6249
          return false;
6250
        if (!this.success.equals(that.success))
6251
          return false;
6252
      }
6253
 
6254
      boolean this_present_ex = true && this.isSetEx();
6255
      boolean that_present_ex = true && that.isSetEx();
6256
      if (this_present_ex || that_present_ex) {
6257
        if (!(this_present_ex && that_present_ex))
6258
          return false;
6259
        if (!this.ex.equals(that.ex))
6260
          return false;
6261
      }
6262
 
6263
      return true;
6264
    }
6265
 
6266
    @Override
6267
    public int hashCode() {
6268
      return 0;
6269
    }
6270
 
6271
    public void read(TProtocol iprot) throws TException {
6272
      TField field;
6273
      iprot.readStructBegin();
6274
      while (true)
6275
      {
6276
        field = iprot.readFieldBegin();
6277
        if (field.type == TType.STOP) { 
6278
          break;
6279
        }
6280
        _Fields fieldId = _Fields.findByThriftId(field.id);
6281
        if (fieldId == null) {
6282
          TProtocolUtil.skip(iprot, field.type);
6283
        } else {
6284
          switch (fieldId) {
6285
            case SUCCESS:
6286
              if (field.type == TType.LIST) {
6287
                {
132 ashish 6288
                  TList _list42 = iprot.readListBegin();
6289
                  this.success = new ArrayList<Transaction>(_list42.size);
6290
                  for (int _i43 = 0; _i43 < _list42.size; ++_i43)
68 ashish 6291
                  {
132 ashish 6292
                    Transaction _elem44;
6293
                    _elem44 = new Transaction();
6294
                    _elem44.read(iprot);
6295
                    this.success.add(_elem44);
68 ashish 6296
                  }
6297
                  iprot.readListEnd();
6298
                }
6299
              } else { 
6300
                TProtocolUtil.skip(iprot, field.type);
6301
              }
6302
              break;
6303
            case EX:
6304
              if (field.type == TType.STRUCT) {
6305
                this.ex = new TransactionServiceException();
6306
                this.ex.read(iprot);
6307
              } else { 
6308
                TProtocolUtil.skip(iprot, field.type);
6309
              }
6310
              break;
6311
          }
6312
          iprot.readFieldEnd();
6313
        }
6314
      }
6315
      iprot.readStructEnd();
6316
      validate();
6317
    }
6318
 
6319
    public void write(TProtocol oprot) throws TException {
6320
      oprot.writeStructBegin(STRUCT_DESC);
6321
 
6322
      if (this.isSetSuccess()) {
6323
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6324
        {
6325
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
132 ashish 6326
          for (Transaction _iter45 : this.success)
68 ashish 6327
          {
132 ashish 6328
            _iter45.write(oprot);
68 ashish 6329
          }
6330
          oprot.writeListEnd();
6331
        }
6332
        oprot.writeFieldEnd();
6333
      } else if (this.isSetEx()) {
6334
        oprot.writeFieldBegin(EX_FIELD_DESC);
6335
        this.ex.write(oprot);
6336
        oprot.writeFieldEnd();
6337
      }
6338
      oprot.writeFieldStop();
6339
      oprot.writeStructEnd();
6340
    }
6341
 
6342
    @Override
6343
    public String toString() {
6344
      StringBuilder sb = new StringBuilder("getTransactionsForCustomerAndShipmentStatus_result(");
6345
      boolean first = true;
6346
 
6347
      sb.append("success:");
6348
      if (this.success == null) {
6349
        sb.append("null");
6350
      } else {
6351
        sb.append(this.success);
6352
      }
6353
      first = false;
6354
      if (!first) sb.append(", ");
6355
      sb.append("ex:");
6356
      if (this.ex == null) {
6357
        sb.append("null");
6358
      } else {
6359
        sb.append(this.ex);
6360
      }
6361
      first = false;
6362
      sb.append(")");
6363
      return sb.toString();
6364
    }
6365
 
6366
    public void validate() throws TException {
6367
      // check for required fields
6368
    }
6369
 
6370
  }
6371
 
132 ashish 6372
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
6373
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
6374
 
6375
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
6376
 
6377
    private long shoppingCartId;
6378
 
6379
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6380
    public enum _Fields implements TFieldIdEnum {
6381
      SHOPPING_CART_ID((short)1, "shoppingCartId");
6382
 
6383
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6384
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6385
 
6386
      static {
6387
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6388
          byId.put((int)field._thriftId, field);
6389
          byName.put(field.getFieldName(), field);
6390
        }
6391
      }
6392
 
6393
      /**
6394
       * Find the _Fields constant that matches fieldId, or null if its not found.
6395
       */
6396
      public static _Fields findByThriftId(int fieldId) {
6397
        return byId.get(fieldId);
6398
      }
6399
 
6400
      /**
6401
       * Find the _Fields constant that matches fieldId, throwing an exception
6402
       * if it is not found.
6403
       */
6404
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6405
        _Fields fields = findByThriftId(fieldId);
6406
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6407
        return fields;
6408
      }
6409
 
6410
      /**
6411
       * Find the _Fields constant that matches name, or null if its not found.
6412
       */
6413
      public static _Fields findByName(String name) {
6414
        return byName.get(name);
6415
      }
6416
 
6417
      private final short _thriftId;
6418
      private final String _fieldName;
6419
 
6420
      _Fields(short thriftId, String fieldName) {
6421
        _thriftId = thriftId;
6422
        _fieldName = fieldName;
6423
      }
6424
 
6425
      public short getThriftFieldId() {
6426
        return _thriftId;
6427
      }
6428
 
6429
      public String getFieldName() {
6430
        return _fieldName;
6431
      }
6432
    }
6433
 
6434
    // isset id assignments
6435
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
6436
    private BitSet __isset_bit_vector = new BitSet(1);
6437
 
6438
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6439
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
6440
          new FieldValueMetaData(TType.I64)));
6441
    }});
6442
 
6443
    static {
6444
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
6445
    }
6446
 
6447
    public getTransactionsForShoppingCartId_args() {
6448
    }
6449
 
6450
    public getTransactionsForShoppingCartId_args(
6451
      long shoppingCartId)
6452
    {
6453
      this();
6454
      this.shoppingCartId = shoppingCartId;
6455
      setShoppingCartIdIsSet(true);
6456
    }
6457
 
6458
    /**
6459
     * Performs a deep copy on <i>other</i>.
6460
     */
6461
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
6462
      __isset_bit_vector.clear();
6463
      __isset_bit_vector.or(other.__isset_bit_vector);
6464
      this.shoppingCartId = other.shoppingCartId;
6465
    }
6466
 
6467
    public getTransactionsForShoppingCartId_args deepCopy() {
6468
      return new getTransactionsForShoppingCartId_args(this);
6469
    }
6470
 
6471
    @Deprecated
6472
    public getTransactionsForShoppingCartId_args clone() {
6473
      return new getTransactionsForShoppingCartId_args(this);
6474
    }
6475
 
6476
    public long getShoppingCartId() {
6477
      return this.shoppingCartId;
6478
    }
6479
 
6480
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
6481
      this.shoppingCartId = shoppingCartId;
6482
      setShoppingCartIdIsSet(true);
6483
      return this;
6484
    }
6485
 
6486
    public void unsetShoppingCartId() {
6487
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
6488
    }
6489
 
6490
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
6491
    public boolean isSetShoppingCartId() {
6492
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
6493
    }
6494
 
6495
    public void setShoppingCartIdIsSet(boolean value) {
6496
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
6497
    }
6498
 
6499
    public void setFieldValue(_Fields field, Object value) {
6500
      switch (field) {
6501
      case SHOPPING_CART_ID:
6502
        if (value == null) {
6503
          unsetShoppingCartId();
6504
        } else {
6505
          setShoppingCartId((Long)value);
6506
        }
6507
        break;
6508
 
6509
      }
6510
    }
6511
 
6512
    public void setFieldValue(int fieldID, Object value) {
6513
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6514
    }
6515
 
6516
    public Object getFieldValue(_Fields field) {
6517
      switch (field) {
6518
      case SHOPPING_CART_ID:
6519
        return new Long(getShoppingCartId());
6520
 
6521
      }
6522
      throw new IllegalStateException();
6523
    }
6524
 
6525
    public Object getFieldValue(int fieldId) {
6526
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6527
    }
6528
 
6529
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6530
    public boolean isSet(_Fields field) {
6531
      switch (field) {
6532
      case SHOPPING_CART_ID:
6533
        return isSetShoppingCartId();
6534
      }
6535
      throw new IllegalStateException();
6536
    }
6537
 
6538
    public boolean isSet(int fieldID) {
6539
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6540
    }
6541
 
6542
    @Override
6543
    public boolean equals(Object that) {
6544
      if (that == null)
6545
        return false;
6546
      if (that instanceof getTransactionsForShoppingCartId_args)
6547
        return this.equals((getTransactionsForShoppingCartId_args)that);
6548
      return false;
6549
    }
6550
 
6551
    public boolean equals(getTransactionsForShoppingCartId_args that) {
6552
      if (that == null)
6553
        return false;
6554
 
6555
      boolean this_present_shoppingCartId = true;
6556
      boolean that_present_shoppingCartId = true;
6557
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
6558
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
6559
          return false;
6560
        if (this.shoppingCartId != that.shoppingCartId)
6561
          return false;
6562
      }
6563
 
6564
      return true;
6565
    }
6566
 
6567
    @Override
6568
    public int hashCode() {
6569
      return 0;
6570
    }
6571
 
6572
    public int compareTo(getTransactionsForShoppingCartId_args other) {
6573
      if (!getClass().equals(other.getClass())) {
6574
        return getClass().getName().compareTo(other.getClass().getName());
6575
      }
6576
 
6577
      int lastComparison = 0;
6578
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
6579
 
6580
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
6581
      if (lastComparison != 0) {
6582
        return lastComparison;
6583
      }
6584
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
6585
      if (lastComparison != 0) {
6586
        return lastComparison;
6587
      }
6588
      return 0;
6589
    }
6590
 
6591
    public void read(TProtocol iprot) throws TException {
6592
      TField field;
6593
      iprot.readStructBegin();
6594
      while (true)
6595
      {
6596
        field = iprot.readFieldBegin();
6597
        if (field.type == TType.STOP) { 
6598
          break;
6599
        }
6600
        _Fields fieldId = _Fields.findByThriftId(field.id);
6601
        if (fieldId == null) {
6602
          TProtocolUtil.skip(iprot, field.type);
6603
        } else {
6604
          switch (fieldId) {
6605
            case SHOPPING_CART_ID:
6606
              if (field.type == TType.I64) {
6607
                this.shoppingCartId = iprot.readI64();
6608
                setShoppingCartIdIsSet(true);
6609
              } else { 
6610
                TProtocolUtil.skip(iprot, field.type);
6611
              }
6612
              break;
6613
          }
6614
          iprot.readFieldEnd();
6615
        }
6616
      }
6617
      iprot.readStructEnd();
6618
      validate();
6619
    }
6620
 
6621
    public void write(TProtocol oprot) throws TException {
6622
      validate();
6623
 
6624
      oprot.writeStructBegin(STRUCT_DESC);
6625
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
6626
      oprot.writeI64(this.shoppingCartId);
6627
      oprot.writeFieldEnd();
6628
      oprot.writeFieldStop();
6629
      oprot.writeStructEnd();
6630
    }
6631
 
6632
    @Override
6633
    public String toString() {
6634
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
6635
      boolean first = true;
6636
 
6637
      sb.append("shoppingCartId:");
6638
      sb.append(this.shoppingCartId);
6639
      first = false;
6640
      sb.append(")");
6641
      return sb.toString();
6642
    }
6643
 
6644
    public void validate() throws TException {
6645
      // check for required fields
6646
    }
6647
 
6648
  }
6649
 
6650
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable   {
6651
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
6652
 
6653
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
6654
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6655
 
6656
    private List<Transaction> success;
6657
    private TransactionServiceException ex;
6658
 
6659
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6660
    public enum _Fields implements TFieldIdEnum {
6661
      SUCCESS((short)0, "success"),
6662
      EX((short)1, "ex");
6663
 
6664
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6665
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6666
 
6667
      static {
6668
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6669
          byId.put((int)field._thriftId, field);
6670
          byName.put(field.getFieldName(), field);
6671
        }
6672
      }
6673
 
6674
      /**
6675
       * Find the _Fields constant that matches fieldId, or null if its not found.
6676
       */
6677
      public static _Fields findByThriftId(int fieldId) {
6678
        return byId.get(fieldId);
6679
      }
6680
 
6681
      /**
6682
       * Find the _Fields constant that matches fieldId, throwing an exception
6683
       * if it is not found.
6684
       */
6685
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6686
        _Fields fields = findByThriftId(fieldId);
6687
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6688
        return fields;
6689
      }
6690
 
6691
      /**
6692
       * Find the _Fields constant that matches name, or null if its not found.
6693
       */
6694
      public static _Fields findByName(String name) {
6695
        return byName.get(name);
6696
      }
6697
 
6698
      private final short _thriftId;
6699
      private final String _fieldName;
6700
 
6701
      _Fields(short thriftId, String fieldName) {
6702
        _thriftId = thriftId;
6703
        _fieldName = fieldName;
6704
      }
6705
 
6706
      public short getThriftFieldId() {
6707
        return _thriftId;
6708
      }
6709
 
6710
      public String getFieldName() {
6711
        return _fieldName;
6712
      }
6713
    }
6714
 
6715
    // isset id assignments
6716
 
6717
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6718
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6719
          new ListMetaData(TType.LIST, 
6720
              new StructMetaData(TType.STRUCT, Transaction.class))));
6721
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6722
          new FieldValueMetaData(TType.STRUCT)));
6723
    }});
6724
 
6725
    static {
6726
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
6727
    }
6728
 
6729
    public getTransactionsForShoppingCartId_result() {
6730
    }
6731
 
6732
    public getTransactionsForShoppingCartId_result(
6733
      List<Transaction> success,
6734
      TransactionServiceException ex)
6735
    {
6736
      this();
6737
      this.success = success;
6738
      this.ex = ex;
6739
    }
6740
 
6741
    /**
6742
     * Performs a deep copy on <i>other</i>.
6743
     */
6744
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
6745
      if (other.isSetSuccess()) {
6746
        List<Transaction> __this__success = new ArrayList<Transaction>();
6747
        for (Transaction other_element : other.success) {
6748
          __this__success.add(new Transaction(other_element));
6749
        }
6750
        this.success = __this__success;
6751
      }
6752
      if (other.isSetEx()) {
6753
        this.ex = new TransactionServiceException(other.ex);
6754
      }
6755
    }
6756
 
6757
    public getTransactionsForShoppingCartId_result deepCopy() {
6758
      return new getTransactionsForShoppingCartId_result(this);
6759
    }
6760
 
6761
    @Deprecated
6762
    public getTransactionsForShoppingCartId_result clone() {
6763
      return new getTransactionsForShoppingCartId_result(this);
6764
    }
6765
 
6766
    public int getSuccessSize() {
6767
      return (this.success == null) ? 0 : this.success.size();
6768
    }
6769
 
6770
    public java.util.Iterator<Transaction> getSuccessIterator() {
6771
      return (this.success == null) ? null : this.success.iterator();
6772
    }
6773
 
6774
    public void addToSuccess(Transaction elem) {
6775
      if (this.success == null) {
6776
        this.success = new ArrayList<Transaction>();
6777
      }
6778
      this.success.add(elem);
6779
    }
6780
 
6781
    public List<Transaction> getSuccess() {
6782
      return this.success;
6783
    }
6784
 
6785
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
6786
      this.success = success;
6787
      return this;
6788
    }
6789
 
6790
    public void unsetSuccess() {
6791
      this.success = null;
6792
    }
6793
 
6794
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6795
    public boolean isSetSuccess() {
6796
      return this.success != null;
6797
    }
6798
 
6799
    public void setSuccessIsSet(boolean value) {
6800
      if (!value) {
6801
        this.success = null;
6802
      }
6803
    }
6804
 
6805
    public TransactionServiceException getEx() {
6806
      return this.ex;
6807
    }
6808
 
6809
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
6810
      this.ex = ex;
6811
      return this;
6812
    }
6813
 
6814
    public void unsetEx() {
6815
      this.ex = null;
6816
    }
6817
 
6818
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6819
    public boolean isSetEx() {
6820
      return this.ex != null;
6821
    }
6822
 
6823
    public void setExIsSet(boolean value) {
6824
      if (!value) {
6825
        this.ex = null;
6826
      }
6827
    }
6828
 
6829
    public void setFieldValue(_Fields field, Object value) {
6830
      switch (field) {
6831
      case SUCCESS:
6832
        if (value == null) {
6833
          unsetSuccess();
6834
        } else {
6835
          setSuccess((List<Transaction>)value);
6836
        }
6837
        break;
6838
 
6839
      case EX:
6840
        if (value == null) {
6841
          unsetEx();
6842
        } else {
6843
          setEx((TransactionServiceException)value);
6844
        }
6845
        break;
6846
 
6847
      }
6848
    }
6849
 
6850
    public void setFieldValue(int fieldID, Object value) {
6851
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6852
    }
6853
 
6854
    public Object getFieldValue(_Fields field) {
6855
      switch (field) {
6856
      case SUCCESS:
6857
        return getSuccess();
6858
 
6859
      case EX:
6860
        return getEx();
6861
 
6862
      }
6863
      throw new IllegalStateException();
6864
    }
6865
 
6866
    public Object getFieldValue(int fieldId) {
6867
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6868
    }
6869
 
6870
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6871
    public boolean isSet(_Fields field) {
6872
      switch (field) {
6873
      case SUCCESS:
6874
        return isSetSuccess();
6875
      case EX:
6876
        return isSetEx();
6877
      }
6878
      throw new IllegalStateException();
6879
    }
6880
 
6881
    public boolean isSet(int fieldID) {
6882
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6883
    }
6884
 
6885
    @Override
6886
    public boolean equals(Object that) {
6887
      if (that == null)
6888
        return false;
6889
      if (that instanceof getTransactionsForShoppingCartId_result)
6890
        return this.equals((getTransactionsForShoppingCartId_result)that);
6891
      return false;
6892
    }
6893
 
6894
    public boolean equals(getTransactionsForShoppingCartId_result that) {
6895
      if (that == null)
6896
        return false;
6897
 
6898
      boolean this_present_success = true && this.isSetSuccess();
6899
      boolean that_present_success = true && that.isSetSuccess();
6900
      if (this_present_success || that_present_success) {
6901
        if (!(this_present_success && that_present_success))
6902
          return false;
6903
        if (!this.success.equals(that.success))
6904
          return false;
6905
      }
6906
 
6907
      boolean this_present_ex = true && this.isSetEx();
6908
      boolean that_present_ex = true && that.isSetEx();
6909
      if (this_present_ex || that_present_ex) {
6910
        if (!(this_present_ex && that_present_ex))
6911
          return false;
6912
        if (!this.ex.equals(that.ex))
6913
          return false;
6914
      }
6915
 
6916
      return true;
6917
    }
6918
 
6919
    @Override
6920
    public int hashCode() {
6921
      return 0;
6922
    }
6923
 
6924
    public void read(TProtocol iprot) throws TException {
6925
      TField field;
6926
      iprot.readStructBegin();
6927
      while (true)
6928
      {
6929
        field = iprot.readFieldBegin();
6930
        if (field.type == TType.STOP) { 
6931
          break;
6932
        }
6933
        _Fields fieldId = _Fields.findByThriftId(field.id);
6934
        if (fieldId == null) {
6935
          TProtocolUtil.skip(iprot, field.type);
6936
        } else {
6937
          switch (fieldId) {
6938
            case SUCCESS:
6939
              if (field.type == TType.LIST) {
6940
                {
6941
                  TList _list46 = iprot.readListBegin();
6942
                  this.success = new ArrayList<Transaction>(_list46.size);
6943
                  for (int _i47 = 0; _i47 < _list46.size; ++_i47)
6944
                  {
6945
                    Transaction _elem48;
6946
                    _elem48 = new Transaction();
6947
                    _elem48.read(iprot);
6948
                    this.success.add(_elem48);
6949
                  }
6950
                  iprot.readListEnd();
6951
                }
6952
              } else { 
6953
                TProtocolUtil.skip(iprot, field.type);
6954
              }
6955
              break;
6956
            case EX:
6957
              if (field.type == TType.STRUCT) {
6958
                this.ex = new TransactionServiceException();
6959
                this.ex.read(iprot);
6960
              } else { 
6961
                TProtocolUtil.skip(iprot, field.type);
6962
              }
6963
              break;
6964
          }
6965
          iprot.readFieldEnd();
6966
        }
6967
      }
6968
      iprot.readStructEnd();
6969
      validate();
6970
    }
6971
 
6972
    public void write(TProtocol oprot) throws TException {
6973
      oprot.writeStructBegin(STRUCT_DESC);
6974
 
6975
      if (this.isSetSuccess()) {
6976
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6977
        {
6978
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
6979
          for (Transaction _iter49 : this.success)
6980
          {
6981
            _iter49.write(oprot);
6982
          }
6983
          oprot.writeListEnd();
6984
        }
6985
        oprot.writeFieldEnd();
6986
      } else if (this.isSetEx()) {
6987
        oprot.writeFieldBegin(EX_FIELD_DESC);
6988
        this.ex.write(oprot);
6989
        oprot.writeFieldEnd();
6990
      }
6991
      oprot.writeFieldStop();
6992
      oprot.writeStructEnd();
6993
    }
6994
 
6995
    @Override
6996
    public String toString() {
6997
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
6998
      boolean first = true;
6999
 
7000
      sb.append("success:");
7001
      if (this.success == null) {
7002
        sb.append("null");
7003
      } else {
7004
        sb.append(this.success);
7005
      }
7006
      first = false;
7007
      if (!first) sb.append(", ");
7008
      sb.append("ex:");
7009
      if (this.ex == null) {
7010
        sb.append("null");
7011
      } else {
7012
        sb.append(this.ex);
7013
      }
7014
      first = false;
7015
      sb.append(")");
7016
      return sb.toString();
7017
    }
7018
 
7019
    public void validate() throws TException {
7020
      // check for required fields
7021
    }
7022
 
7023
  }
7024
 
68 ashish 7025
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
7026
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
7027
 
7028
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
7029
 
7030
    private long transactionId;
7031
 
7032
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7033
    public enum _Fields implements TFieldIdEnum {
7034
      TRANSACTION_ID((short)1, "transactionId");
7035
 
7036
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7037
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7038
 
7039
      static {
7040
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7041
          byId.put((int)field._thriftId, field);
7042
          byName.put(field.getFieldName(), field);
7043
        }
7044
      }
7045
 
7046
      /**
7047
       * Find the _Fields constant that matches fieldId, or null if its not found.
7048
       */
7049
      public static _Fields findByThriftId(int fieldId) {
7050
        return byId.get(fieldId);
7051
      }
7052
 
7053
      /**
7054
       * Find the _Fields constant that matches fieldId, throwing an exception
7055
       * if it is not found.
7056
       */
7057
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7058
        _Fields fields = findByThriftId(fieldId);
7059
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7060
        return fields;
7061
      }
7062
 
7063
      /**
7064
       * Find the _Fields constant that matches name, or null if its not found.
7065
       */
7066
      public static _Fields findByName(String name) {
7067
        return byName.get(name);
7068
      }
7069
 
7070
      private final short _thriftId;
7071
      private final String _fieldName;
7072
 
7073
      _Fields(short thriftId, String fieldName) {
7074
        _thriftId = thriftId;
7075
        _fieldName = fieldName;
7076
      }
7077
 
7078
      public short getThriftFieldId() {
7079
        return _thriftId;
7080
      }
7081
 
7082
      public String getFieldName() {
7083
        return _fieldName;
7084
      }
7085
    }
7086
 
7087
    // isset id assignments
7088
    private static final int __TRANSACTIONID_ISSET_ID = 0;
7089
    private BitSet __isset_bit_vector = new BitSet(1);
7090
 
7091
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7092
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
7093
          new FieldValueMetaData(TType.I64)));
7094
    }});
7095
 
7096
    static {
7097
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
7098
    }
7099
 
7100
    public getTransactionStatus_args() {
7101
    }
7102
 
7103
    public getTransactionStatus_args(
7104
      long transactionId)
7105
    {
7106
      this();
7107
      this.transactionId = transactionId;
7108
      setTransactionIdIsSet(true);
7109
    }
7110
 
7111
    /**
7112
     * Performs a deep copy on <i>other</i>.
7113
     */
7114
    public getTransactionStatus_args(getTransactionStatus_args other) {
7115
      __isset_bit_vector.clear();
7116
      __isset_bit_vector.or(other.__isset_bit_vector);
7117
      this.transactionId = other.transactionId;
7118
    }
7119
 
7120
    public getTransactionStatus_args deepCopy() {
7121
      return new getTransactionStatus_args(this);
7122
    }
7123
 
7124
    @Deprecated
7125
    public getTransactionStatus_args clone() {
7126
      return new getTransactionStatus_args(this);
7127
    }
7128
 
7129
    public long getTransactionId() {
7130
      return this.transactionId;
7131
    }
7132
 
7133
    public getTransactionStatus_args setTransactionId(long transactionId) {
7134
      this.transactionId = transactionId;
7135
      setTransactionIdIsSet(true);
7136
      return this;
7137
    }
7138
 
7139
    public void unsetTransactionId() {
7140
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
7141
    }
7142
 
7143
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
7144
    public boolean isSetTransactionId() {
7145
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
7146
    }
7147
 
7148
    public void setTransactionIdIsSet(boolean value) {
7149
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
7150
    }
7151
 
7152
    public void setFieldValue(_Fields field, Object value) {
7153
      switch (field) {
7154
      case TRANSACTION_ID:
7155
        if (value == null) {
7156
          unsetTransactionId();
7157
        } else {
7158
          setTransactionId((Long)value);
7159
        }
7160
        break;
7161
 
7162
      }
7163
    }
7164
 
7165
    public void setFieldValue(int fieldID, Object value) {
7166
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7167
    }
7168
 
7169
    public Object getFieldValue(_Fields field) {
7170
      switch (field) {
7171
      case TRANSACTION_ID:
7172
        return new Long(getTransactionId());
7173
 
7174
      }
7175
      throw new IllegalStateException();
7176
    }
7177
 
7178
    public Object getFieldValue(int fieldId) {
7179
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7180
    }
7181
 
7182
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7183
    public boolean isSet(_Fields field) {
7184
      switch (field) {
7185
      case TRANSACTION_ID:
7186
        return isSetTransactionId();
7187
      }
7188
      throw new IllegalStateException();
7189
    }
7190
 
7191
    public boolean isSet(int fieldID) {
7192
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7193
    }
7194
 
7195
    @Override
7196
    public boolean equals(Object that) {
7197
      if (that == null)
7198
        return false;
7199
      if (that instanceof getTransactionStatus_args)
7200
        return this.equals((getTransactionStatus_args)that);
7201
      return false;
7202
    }
7203
 
7204
    public boolean equals(getTransactionStatus_args that) {
7205
      if (that == null)
7206
        return false;
7207
 
7208
      boolean this_present_transactionId = true;
7209
      boolean that_present_transactionId = true;
7210
      if (this_present_transactionId || that_present_transactionId) {
7211
        if (!(this_present_transactionId && that_present_transactionId))
7212
          return false;
7213
        if (this.transactionId != that.transactionId)
7214
          return false;
7215
      }
7216
 
7217
      return true;
7218
    }
7219
 
7220
    @Override
7221
    public int hashCode() {
7222
      return 0;
7223
    }
7224
 
7225
    public int compareTo(getTransactionStatus_args other) {
7226
      if (!getClass().equals(other.getClass())) {
7227
        return getClass().getName().compareTo(other.getClass().getName());
7228
      }
7229
 
7230
      int lastComparison = 0;
7231
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
7232
 
7233
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7234
      if (lastComparison != 0) {
7235
        return lastComparison;
7236
      }
7237
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7238
      if (lastComparison != 0) {
7239
        return lastComparison;
7240
      }
7241
      return 0;
7242
    }
7243
 
7244
    public void read(TProtocol iprot) throws TException {
7245
      TField field;
7246
      iprot.readStructBegin();
7247
      while (true)
7248
      {
7249
        field = iprot.readFieldBegin();
7250
        if (field.type == TType.STOP) { 
7251
          break;
7252
        }
7253
        _Fields fieldId = _Fields.findByThriftId(field.id);
7254
        if (fieldId == null) {
7255
          TProtocolUtil.skip(iprot, field.type);
7256
        } else {
7257
          switch (fieldId) {
7258
            case TRANSACTION_ID:
7259
              if (field.type == TType.I64) {
7260
                this.transactionId = iprot.readI64();
7261
                setTransactionIdIsSet(true);
7262
              } else { 
7263
                TProtocolUtil.skip(iprot, field.type);
7264
              }
7265
              break;
7266
          }
7267
          iprot.readFieldEnd();
7268
        }
7269
      }
7270
      iprot.readStructEnd();
7271
      validate();
7272
    }
7273
 
7274
    public void write(TProtocol oprot) throws TException {
7275
      validate();
7276
 
7277
      oprot.writeStructBegin(STRUCT_DESC);
7278
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
7279
      oprot.writeI64(this.transactionId);
7280
      oprot.writeFieldEnd();
7281
      oprot.writeFieldStop();
7282
      oprot.writeStructEnd();
7283
    }
7284
 
7285
    @Override
7286
    public String toString() {
7287
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
7288
      boolean first = true;
7289
 
7290
      sb.append("transactionId:");
7291
      sb.append(this.transactionId);
7292
      first = false;
7293
      sb.append(")");
7294
      return sb.toString();
7295
    }
7296
 
7297
    public void validate() throws TException {
7298
      // check for required fields
7299
    }
7300
 
7301
  }
7302
 
7303
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
7304
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
7305
 
7306
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
7307
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7308
 
7309
    private TransactionStatus success;
7310
    private TransactionServiceException ex;
7311
 
7312
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7313
    public enum _Fields implements TFieldIdEnum {
7314
      /**
7315
       * 
7316
       * @see TransactionStatus
7317
       */
7318
      SUCCESS((short)0, "success"),
7319
      EX((short)1, "ex");
7320
 
7321
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7322
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7323
 
7324
      static {
7325
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7326
          byId.put((int)field._thriftId, field);
7327
          byName.put(field.getFieldName(), field);
7328
        }
7329
      }
7330
 
7331
      /**
7332
       * Find the _Fields constant that matches fieldId, or null if its not found.
7333
       */
7334
      public static _Fields findByThriftId(int fieldId) {
7335
        return byId.get(fieldId);
7336
      }
7337
 
7338
      /**
7339
       * Find the _Fields constant that matches fieldId, throwing an exception
7340
       * if it is not found.
7341
       */
7342
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7343
        _Fields fields = findByThriftId(fieldId);
7344
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7345
        return fields;
7346
      }
7347
 
7348
      /**
7349
       * Find the _Fields constant that matches name, or null if its not found.
7350
       */
7351
      public static _Fields findByName(String name) {
7352
        return byName.get(name);
7353
      }
7354
 
7355
      private final short _thriftId;
7356
      private final String _fieldName;
7357
 
7358
      _Fields(short thriftId, String fieldName) {
7359
        _thriftId = thriftId;
7360
        _fieldName = fieldName;
7361
      }
7362
 
7363
      public short getThriftFieldId() {
7364
        return _thriftId;
7365
      }
7366
 
7367
      public String getFieldName() {
7368
        return _fieldName;
7369
      }
7370
    }
7371
 
7372
    // isset id assignments
7373
 
7374
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7375
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7376
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
7377
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7378
          new FieldValueMetaData(TType.STRUCT)));
7379
    }});
7380
 
7381
    static {
7382
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
7383
    }
7384
 
7385
    public getTransactionStatus_result() {
7386
    }
7387
 
7388
    public getTransactionStatus_result(
7389
      TransactionStatus success,
7390
      TransactionServiceException ex)
7391
    {
7392
      this();
7393
      this.success = success;
7394
      this.ex = ex;
7395
    }
7396
 
7397
    /**
7398
     * Performs a deep copy on <i>other</i>.
7399
     */
7400
    public getTransactionStatus_result(getTransactionStatus_result other) {
7401
      if (other.isSetSuccess()) {
7402
        this.success = other.success;
7403
      }
7404
      if (other.isSetEx()) {
7405
        this.ex = new TransactionServiceException(other.ex);
7406
      }
7407
    }
7408
 
7409
    public getTransactionStatus_result deepCopy() {
7410
      return new getTransactionStatus_result(this);
7411
    }
7412
 
7413
    @Deprecated
7414
    public getTransactionStatus_result clone() {
7415
      return new getTransactionStatus_result(this);
7416
    }
7417
 
7418
    /**
7419
     * 
7420
     * @see TransactionStatus
7421
     */
7422
    public TransactionStatus getSuccess() {
7423
      return this.success;
7424
    }
7425
 
7426
    /**
7427
     * 
7428
     * @see TransactionStatus
7429
     */
7430
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
7431
      this.success = success;
7432
      return this;
7433
    }
7434
 
7435
    public void unsetSuccess() {
7436
      this.success = null;
7437
    }
7438
 
7439
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7440
    public boolean isSetSuccess() {
7441
      return this.success != null;
7442
    }
7443
 
7444
    public void setSuccessIsSet(boolean value) {
7445
      if (!value) {
7446
        this.success = null;
7447
      }
7448
    }
7449
 
7450
    public TransactionServiceException getEx() {
7451
      return this.ex;
7452
    }
7453
 
7454
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
7455
      this.ex = ex;
7456
      return this;
7457
    }
7458
 
7459
    public void unsetEx() {
7460
      this.ex = null;
7461
    }
7462
 
7463
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7464
    public boolean isSetEx() {
7465
      return this.ex != null;
7466
    }
7467
 
7468
    public void setExIsSet(boolean value) {
7469
      if (!value) {
7470
        this.ex = null;
7471
      }
7472
    }
7473
 
7474
    public void setFieldValue(_Fields field, Object value) {
7475
      switch (field) {
7476
      case SUCCESS:
7477
        if (value == null) {
7478
          unsetSuccess();
7479
        } else {
7480
          setSuccess((TransactionStatus)value);
7481
        }
7482
        break;
7483
 
7484
      case EX:
7485
        if (value == null) {
7486
          unsetEx();
7487
        } else {
7488
          setEx((TransactionServiceException)value);
7489
        }
7490
        break;
7491
 
7492
      }
7493
    }
7494
 
7495
    public void setFieldValue(int fieldID, Object value) {
7496
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7497
    }
7498
 
7499
    public Object getFieldValue(_Fields field) {
7500
      switch (field) {
7501
      case SUCCESS:
7502
        return getSuccess();
7503
 
7504
      case EX:
7505
        return getEx();
7506
 
7507
      }
7508
      throw new IllegalStateException();
7509
    }
7510
 
7511
    public Object getFieldValue(int fieldId) {
7512
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7513
    }
7514
 
7515
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7516
    public boolean isSet(_Fields field) {
7517
      switch (field) {
7518
      case SUCCESS:
7519
        return isSetSuccess();
7520
      case EX:
7521
        return isSetEx();
7522
      }
7523
      throw new IllegalStateException();
7524
    }
7525
 
7526
    public boolean isSet(int fieldID) {
7527
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7528
    }
7529
 
7530
    @Override
7531
    public boolean equals(Object that) {
7532
      if (that == null)
7533
        return false;
7534
      if (that instanceof getTransactionStatus_result)
7535
        return this.equals((getTransactionStatus_result)that);
7536
      return false;
7537
    }
7538
 
7539
    public boolean equals(getTransactionStatus_result that) {
7540
      if (that == null)
7541
        return false;
7542
 
7543
      boolean this_present_success = true && this.isSetSuccess();
7544
      boolean that_present_success = true && that.isSetSuccess();
7545
      if (this_present_success || that_present_success) {
7546
        if (!(this_present_success && that_present_success))
7547
          return false;
7548
        if (!this.success.equals(that.success))
7549
          return false;
7550
      }
7551
 
7552
      boolean this_present_ex = true && this.isSetEx();
7553
      boolean that_present_ex = true && that.isSetEx();
7554
      if (this_present_ex || that_present_ex) {
7555
        if (!(this_present_ex && that_present_ex))
7556
          return false;
7557
        if (!this.ex.equals(that.ex))
7558
          return false;
7559
      }
7560
 
7561
      return true;
7562
    }
7563
 
7564
    @Override
7565
    public int hashCode() {
7566
      return 0;
7567
    }
7568
 
7569
    public int compareTo(getTransactionStatus_result other) {
7570
      if (!getClass().equals(other.getClass())) {
7571
        return getClass().getName().compareTo(other.getClass().getName());
7572
      }
7573
 
7574
      int lastComparison = 0;
7575
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
7576
 
7577
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7578
      if (lastComparison != 0) {
7579
        return lastComparison;
7580
      }
7581
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7582
      if (lastComparison != 0) {
7583
        return lastComparison;
7584
      }
7585
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7586
      if (lastComparison != 0) {
7587
        return lastComparison;
7588
      }
7589
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7590
      if (lastComparison != 0) {
7591
        return lastComparison;
7592
      }
7593
      return 0;
7594
    }
7595
 
7596
    public void read(TProtocol iprot) throws TException {
7597
      TField field;
7598
      iprot.readStructBegin();
7599
      while (true)
7600
      {
7601
        field = iprot.readFieldBegin();
7602
        if (field.type == TType.STOP) { 
7603
          break;
7604
        }
7605
        _Fields fieldId = _Fields.findByThriftId(field.id);
7606
        if (fieldId == null) {
7607
          TProtocolUtil.skip(iprot, field.type);
7608
        } else {
7609
          switch (fieldId) {
7610
            case SUCCESS:
7611
              if (field.type == TType.I32) {
7612
                this.success = TransactionStatus.findByValue(iprot.readI32());
7613
              } else { 
7614
                TProtocolUtil.skip(iprot, field.type);
7615
              }
7616
              break;
7617
            case EX:
7618
              if (field.type == TType.STRUCT) {
7619
                this.ex = new TransactionServiceException();
7620
                this.ex.read(iprot);
7621
              } else { 
7622
                TProtocolUtil.skip(iprot, field.type);
7623
              }
7624
              break;
7625
          }
7626
          iprot.readFieldEnd();
7627
        }
7628
      }
7629
      iprot.readStructEnd();
7630
      validate();
7631
    }
7632
 
7633
    public void write(TProtocol oprot) throws TException {
7634
      oprot.writeStructBegin(STRUCT_DESC);
7635
 
7636
      if (this.isSetSuccess()) {
7637
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7638
        oprot.writeI32(this.success.getValue());
7639
        oprot.writeFieldEnd();
7640
      } else if (this.isSetEx()) {
7641
        oprot.writeFieldBegin(EX_FIELD_DESC);
7642
        this.ex.write(oprot);
7643
        oprot.writeFieldEnd();
7644
      }
7645
      oprot.writeFieldStop();
7646
      oprot.writeStructEnd();
7647
    }
7648
 
7649
    @Override
7650
    public String toString() {
7651
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
7652
      boolean first = true;
7653
 
7654
      sb.append("success:");
7655
      if (this.success == null) {
7656
        sb.append("null");
7657
      } else {
7658
        String success_name = success.name();
7659
        if (success_name != null) {
7660
          sb.append(success_name);
7661
          sb.append(" (");
7662
        }
7663
        sb.append(this.success);
7664
        if (success_name != null) {
7665
          sb.append(")");
7666
        }
7667
      }
7668
      first = false;
7669
      if (!first) sb.append(", ");
7670
      sb.append("ex:");
7671
      if (this.ex == null) {
7672
        sb.append("null");
7673
      } else {
7674
        sb.append(this.ex);
7675
      }
7676
      first = false;
7677
      sb.append(")");
7678
      return sb.toString();
7679
    }
7680
 
7681
    public void validate() throws TException {
7682
      // check for required fields
7683
    }
7684
 
7685
  }
7686
 
7687
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
7688
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
7689
 
7690
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
7691
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
7692
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
7693
 
7694
    private long transactionId;
7695
    private TransactionStatus status;
7696
    private String description;
7697
 
7698
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7699
    public enum _Fields implements TFieldIdEnum {
7700
      TRANSACTION_ID((short)1, "transactionId"),
7701
      /**
7702
       * 
7703
       * @see TransactionStatus
7704
       */
7705
      STATUS((short)2, "status"),
7706
      DESCRIPTION((short)3, "description");
7707
 
7708
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7709
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7710
 
7711
      static {
7712
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7713
          byId.put((int)field._thriftId, field);
7714
          byName.put(field.getFieldName(), field);
7715
        }
7716
      }
7717
 
7718
      /**
7719
       * Find the _Fields constant that matches fieldId, or null if its not found.
7720
       */
7721
      public static _Fields findByThriftId(int fieldId) {
7722
        return byId.get(fieldId);
7723
      }
7724
 
7725
      /**
7726
       * Find the _Fields constant that matches fieldId, throwing an exception
7727
       * if it is not found.
7728
       */
7729
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7730
        _Fields fields = findByThriftId(fieldId);
7731
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7732
        return fields;
7733
      }
7734
 
7735
      /**
7736
       * Find the _Fields constant that matches name, or null if its not found.
7737
       */
7738
      public static _Fields findByName(String name) {
7739
        return byName.get(name);
7740
      }
7741
 
7742
      private final short _thriftId;
7743
      private final String _fieldName;
7744
 
7745
      _Fields(short thriftId, String fieldName) {
7746
        _thriftId = thriftId;
7747
        _fieldName = fieldName;
7748
      }
7749
 
7750
      public short getThriftFieldId() {
7751
        return _thriftId;
7752
      }
7753
 
7754
      public String getFieldName() {
7755
        return _fieldName;
7756
      }
7757
    }
7758
 
7759
    // isset id assignments
7760
    private static final int __TRANSACTIONID_ISSET_ID = 0;
7761
    private BitSet __isset_bit_vector = new BitSet(1);
7762
 
7763
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7764
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
7765
          new FieldValueMetaData(TType.I64)));
7766
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
7767
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
7768
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
7769
          new FieldValueMetaData(TType.STRING)));
7770
    }});
7771
 
7772
    static {
7773
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
7774
    }
7775
 
7776
    public changeTransactionStatus_args() {
7777
    }
7778
 
7779
    public changeTransactionStatus_args(
7780
      long transactionId,
7781
      TransactionStatus status,
7782
      String description)
7783
    {
7784
      this();
7785
      this.transactionId = transactionId;
7786
      setTransactionIdIsSet(true);
7787
      this.status = status;
7788
      this.description = description;
7789
    }
7790
 
7791
    /**
7792
     * Performs a deep copy on <i>other</i>.
7793
     */
7794
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
7795
      __isset_bit_vector.clear();
7796
      __isset_bit_vector.or(other.__isset_bit_vector);
7797
      this.transactionId = other.transactionId;
7798
      if (other.isSetStatus()) {
7799
        this.status = other.status;
7800
      }
7801
      if (other.isSetDescription()) {
7802
        this.description = other.description;
7803
      }
7804
    }
7805
 
7806
    public changeTransactionStatus_args deepCopy() {
7807
      return new changeTransactionStatus_args(this);
7808
    }
7809
 
7810
    @Deprecated
7811
    public changeTransactionStatus_args clone() {
7812
      return new changeTransactionStatus_args(this);
7813
    }
7814
 
7815
    public long getTransactionId() {
7816
      return this.transactionId;
7817
    }
7818
 
7819
    public changeTransactionStatus_args setTransactionId(long transactionId) {
7820
      this.transactionId = transactionId;
7821
      setTransactionIdIsSet(true);
7822
      return this;
7823
    }
7824
 
7825
    public void unsetTransactionId() {
7826
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
7827
    }
7828
 
7829
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
7830
    public boolean isSetTransactionId() {
7831
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
7832
    }
7833
 
7834
    public void setTransactionIdIsSet(boolean value) {
7835
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
7836
    }
7837
 
7838
    /**
7839
     * 
7840
     * @see TransactionStatus
7841
     */
7842
    public TransactionStatus getStatus() {
7843
      return this.status;
7844
    }
7845
 
7846
    /**
7847
     * 
7848
     * @see TransactionStatus
7849
     */
7850
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
7851
      this.status = status;
7852
      return this;
7853
    }
7854
 
7855
    public void unsetStatus() {
7856
      this.status = null;
7857
    }
7858
 
7859
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
7860
    public boolean isSetStatus() {
7861
      return this.status != null;
7862
    }
7863
 
7864
    public void setStatusIsSet(boolean value) {
7865
      if (!value) {
7866
        this.status = null;
7867
      }
7868
    }
7869
 
7870
    public String getDescription() {
7871
      return this.description;
7872
    }
7873
 
7874
    public changeTransactionStatus_args setDescription(String description) {
7875
      this.description = description;
7876
      return this;
7877
    }
7878
 
7879
    public void unsetDescription() {
7880
      this.description = null;
7881
    }
7882
 
7883
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
7884
    public boolean isSetDescription() {
7885
      return this.description != null;
7886
    }
7887
 
7888
    public void setDescriptionIsSet(boolean value) {
7889
      if (!value) {
7890
        this.description = null;
7891
      }
7892
    }
7893
 
7894
    public void setFieldValue(_Fields field, Object value) {
7895
      switch (field) {
7896
      case TRANSACTION_ID:
7897
        if (value == null) {
7898
          unsetTransactionId();
7899
        } else {
7900
          setTransactionId((Long)value);
7901
        }
7902
        break;
7903
 
7904
      case STATUS:
7905
        if (value == null) {
7906
          unsetStatus();
7907
        } else {
7908
          setStatus((TransactionStatus)value);
7909
        }
7910
        break;
7911
 
7912
      case DESCRIPTION:
7913
        if (value == null) {
7914
          unsetDescription();
7915
        } else {
7916
          setDescription((String)value);
7917
        }
7918
        break;
7919
 
7920
      }
7921
    }
7922
 
7923
    public void setFieldValue(int fieldID, Object value) {
7924
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7925
    }
7926
 
7927
    public Object getFieldValue(_Fields field) {
7928
      switch (field) {
7929
      case TRANSACTION_ID:
7930
        return new Long(getTransactionId());
7931
 
7932
      case STATUS:
7933
        return getStatus();
7934
 
7935
      case DESCRIPTION:
7936
        return getDescription();
7937
 
7938
      }
7939
      throw new IllegalStateException();
7940
    }
7941
 
7942
    public Object getFieldValue(int fieldId) {
7943
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7944
    }
7945
 
7946
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7947
    public boolean isSet(_Fields field) {
7948
      switch (field) {
7949
      case TRANSACTION_ID:
7950
        return isSetTransactionId();
7951
      case STATUS:
7952
        return isSetStatus();
7953
      case DESCRIPTION:
7954
        return isSetDescription();
7955
      }
7956
      throw new IllegalStateException();
7957
    }
7958
 
7959
    public boolean isSet(int fieldID) {
7960
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7961
    }
7962
 
7963
    @Override
7964
    public boolean equals(Object that) {
7965
      if (that == null)
7966
        return false;
7967
      if (that instanceof changeTransactionStatus_args)
7968
        return this.equals((changeTransactionStatus_args)that);
7969
      return false;
7970
    }
7971
 
7972
    public boolean equals(changeTransactionStatus_args that) {
7973
      if (that == null)
7974
        return false;
7975
 
7976
      boolean this_present_transactionId = true;
7977
      boolean that_present_transactionId = true;
7978
      if (this_present_transactionId || that_present_transactionId) {
7979
        if (!(this_present_transactionId && that_present_transactionId))
7980
          return false;
7981
        if (this.transactionId != that.transactionId)
7982
          return false;
7983
      }
7984
 
7985
      boolean this_present_status = true && this.isSetStatus();
7986
      boolean that_present_status = true && that.isSetStatus();
7987
      if (this_present_status || that_present_status) {
7988
        if (!(this_present_status && that_present_status))
7989
          return false;
7990
        if (!this.status.equals(that.status))
7991
          return false;
7992
      }
7993
 
7994
      boolean this_present_description = true && this.isSetDescription();
7995
      boolean that_present_description = true && that.isSetDescription();
7996
      if (this_present_description || that_present_description) {
7997
        if (!(this_present_description && that_present_description))
7998
          return false;
7999
        if (!this.description.equals(that.description))
8000
          return false;
8001
      }
8002
 
8003
      return true;
8004
    }
8005
 
8006
    @Override
8007
    public int hashCode() {
8008
      return 0;
8009
    }
8010
 
8011
    public int compareTo(changeTransactionStatus_args other) {
8012
      if (!getClass().equals(other.getClass())) {
8013
        return getClass().getName().compareTo(other.getClass().getName());
8014
      }
8015
 
8016
      int lastComparison = 0;
8017
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
8018
 
8019
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
8020
      if (lastComparison != 0) {
8021
        return lastComparison;
8022
      }
8023
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
8024
      if (lastComparison != 0) {
8025
        return lastComparison;
8026
      }
8027
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
8028
      if (lastComparison != 0) {
8029
        return lastComparison;
8030
      }
8031
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
8032
      if (lastComparison != 0) {
8033
        return lastComparison;
8034
      }
8035
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
8036
      if (lastComparison != 0) {
8037
        return lastComparison;
8038
      }
8039
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
8040
      if (lastComparison != 0) {
8041
        return lastComparison;
8042
      }
8043
      return 0;
8044
    }
8045
 
8046
    public void read(TProtocol iprot) throws TException {
8047
      TField field;
8048
      iprot.readStructBegin();
8049
      while (true)
8050
      {
8051
        field = iprot.readFieldBegin();
8052
        if (field.type == TType.STOP) { 
8053
          break;
8054
        }
8055
        _Fields fieldId = _Fields.findByThriftId(field.id);
8056
        if (fieldId == null) {
8057
          TProtocolUtil.skip(iprot, field.type);
8058
        } else {
8059
          switch (fieldId) {
8060
            case TRANSACTION_ID:
8061
              if (field.type == TType.I64) {
8062
                this.transactionId = iprot.readI64();
8063
                setTransactionIdIsSet(true);
8064
              } else { 
8065
                TProtocolUtil.skip(iprot, field.type);
8066
              }
8067
              break;
8068
            case STATUS:
8069
              if (field.type == TType.I32) {
8070
                this.status = TransactionStatus.findByValue(iprot.readI32());
8071
              } else { 
8072
                TProtocolUtil.skip(iprot, field.type);
8073
              }
8074
              break;
8075
            case DESCRIPTION:
8076
              if (field.type == TType.STRING) {
8077
                this.description = iprot.readString();
8078
              } else { 
8079
                TProtocolUtil.skip(iprot, field.type);
8080
              }
8081
              break;
8082
          }
8083
          iprot.readFieldEnd();
8084
        }
8085
      }
8086
      iprot.readStructEnd();
8087
      validate();
8088
    }
8089
 
8090
    public void write(TProtocol oprot) throws TException {
8091
      validate();
8092
 
8093
      oprot.writeStructBegin(STRUCT_DESC);
8094
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
8095
      oprot.writeI64(this.transactionId);
8096
      oprot.writeFieldEnd();
8097
      if (this.status != null) {
8098
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8099
        oprot.writeI32(this.status.getValue());
8100
        oprot.writeFieldEnd();
8101
      }
8102
      if (this.description != null) {
8103
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
8104
        oprot.writeString(this.description);
8105
        oprot.writeFieldEnd();
8106
      }
8107
      oprot.writeFieldStop();
8108
      oprot.writeStructEnd();
8109
    }
8110
 
8111
    @Override
8112
    public String toString() {
8113
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
8114
      boolean first = true;
8115
 
8116
      sb.append("transactionId:");
8117
      sb.append(this.transactionId);
8118
      first = false;
8119
      if (!first) sb.append(", ");
8120
      sb.append("status:");
8121
      if (this.status == null) {
8122
        sb.append("null");
8123
      } else {
8124
        String status_name = status.name();
8125
        if (status_name != null) {
8126
          sb.append(status_name);
8127
          sb.append(" (");
8128
        }
8129
        sb.append(this.status);
8130
        if (status_name != null) {
8131
          sb.append(")");
8132
        }
8133
      }
8134
      first = false;
8135
      if (!first) sb.append(", ");
8136
      sb.append("description:");
8137
      if (this.description == null) {
8138
        sb.append("null");
8139
      } else {
8140
        sb.append(this.description);
8141
      }
8142
      first = false;
8143
      sb.append(")");
8144
      return sb.toString();
8145
    }
8146
 
8147
    public void validate() throws TException {
8148
      // check for required fields
8149
    }
8150
 
8151
  }
8152
 
8153
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
8154
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
8155
 
8156
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8157
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8158
 
8159
    private boolean success;
8160
    private TransactionServiceException ex;
8161
 
8162
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8163
    public enum _Fields implements TFieldIdEnum {
8164
      SUCCESS((short)0, "success"),
8165
      EX((short)1, "ex");
8166
 
8167
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8168
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8169
 
8170
      static {
8171
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8172
          byId.put((int)field._thriftId, field);
8173
          byName.put(field.getFieldName(), field);
8174
        }
8175
      }
8176
 
8177
      /**
8178
       * Find the _Fields constant that matches fieldId, or null if its not found.
8179
       */
8180
      public static _Fields findByThriftId(int fieldId) {
8181
        return byId.get(fieldId);
8182
      }
8183
 
8184
      /**
8185
       * Find the _Fields constant that matches fieldId, throwing an exception
8186
       * if it is not found.
8187
       */
8188
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8189
        _Fields fields = findByThriftId(fieldId);
8190
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8191
        return fields;
8192
      }
8193
 
8194
      /**
8195
       * Find the _Fields constant that matches name, or null if its not found.
8196
       */
8197
      public static _Fields findByName(String name) {
8198
        return byName.get(name);
8199
      }
8200
 
8201
      private final short _thriftId;
8202
      private final String _fieldName;
8203
 
8204
      _Fields(short thriftId, String fieldName) {
8205
        _thriftId = thriftId;
8206
        _fieldName = fieldName;
8207
      }
8208
 
8209
      public short getThriftFieldId() {
8210
        return _thriftId;
8211
      }
8212
 
8213
      public String getFieldName() {
8214
        return _fieldName;
8215
      }
8216
    }
8217
 
8218
    // isset id assignments
8219
    private static final int __SUCCESS_ISSET_ID = 0;
8220
    private BitSet __isset_bit_vector = new BitSet(1);
8221
 
8222
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8223
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8224
          new FieldValueMetaData(TType.BOOL)));
8225
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8226
          new FieldValueMetaData(TType.STRUCT)));
8227
    }});
8228
 
8229
    static {
8230
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
8231
    }
8232
 
8233
    public changeTransactionStatus_result() {
8234
    }
8235
 
8236
    public changeTransactionStatus_result(
8237
      boolean success,
8238
      TransactionServiceException ex)
8239
    {
8240
      this();
8241
      this.success = success;
8242
      setSuccessIsSet(true);
8243
      this.ex = ex;
8244
    }
8245
 
8246
    /**
8247
     * Performs a deep copy on <i>other</i>.
8248
     */
8249
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
8250
      __isset_bit_vector.clear();
8251
      __isset_bit_vector.or(other.__isset_bit_vector);
8252
      this.success = other.success;
8253
      if (other.isSetEx()) {
8254
        this.ex = new TransactionServiceException(other.ex);
8255
      }
8256
    }
8257
 
8258
    public changeTransactionStatus_result deepCopy() {
8259
      return new changeTransactionStatus_result(this);
8260
    }
8261
 
8262
    @Deprecated
8263
    public changeTransactionStatus_result clone() {
8264
      return new changeTransactionStatus_result(this);
8265
    }
8266
 
8267
    public boolean isSuccess() {
8268
      return this.success;
8269
    }
8270
 
8271
    public changeTransactionStatus_result setSuccess(boolean success) {
8272
      this.success = success;
8273
      setSuccessIsSet(true);
8274
      return this;
8275
    }
8276
 
8277
    public void unsetSuccess() {
8278
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8279
    }
8280
 
8281
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8282
    public boolean isSetSuccess() {
8283
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8284
    }
8285
 
8286
    public void setSuccessIsSet(boolean value) {
8287
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8288
    }
8289
 
8290
    public TransactionServiceException getEx() {
8291
      return this.ex;
8292
    }
8293
 
8294
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
8295
      this.ex = ex;
8296
      return this;
8297
    }
8298
 
8299
    public void unsetEx() {
8300
      this.ex = null;
8301
    }
8302
 
8303
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8304
    public boolean isSetEx() {
8305
      return this.ex != null;
8306
    }
8307
 
8308
    public void setExIsSet(boolean value) {
8309
      if (!value) {
8310
        this.ex = null;
8311
      }
8312
    }
8313
 
8314
    public void setFieldValue(_Fields field, Object value) {
8315
      switch (field) {
8316
      case SUCCESS:
8317
        if (value == null) {
8318
          unsetSuccess();
8319
        } else {
8320
          setSuccess((Boolean)value);
8321
        }
8322
        break;
8323
 
8324
      case EX:
8325
        if (value == null) {
8326
          unsetEx();
8327
        } else {
8328
          setEx((TransactionServiceException)value);
8329
        }
8330
        break;
8331
 
8332
      }
8333
    }
8334
 
8335
    public void setFieldValue(int fieldID, Object value) {
8336
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8337
    }
8338
 
8339
    public Object getFieldValue(_Fields field) {
8340
      switch (field) {
8341
      case SUCCESS:
8342
        return new Boolean(isSuccess());
8343
 
8344
      case EX:
8345
        return getEx();
8346
 
8347
      }
8348
      throw new IllegalStateException();
8349
    }
8350
 
8351
    public Object getFieldValue(int fieldId) {
8352
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8353
    }
8354
 
8355
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8356
    public boolean isSet(_Fields field) {
8357
      switch (field) {
8358
      case SUCCESS:
8359
        return isSetSuccess();
8360
      case EX:
8361
        return isSetEx();
8362
      }
8363
      throw new IllegalStateException();
8364
    }
8365
 
8366
    public boolean isSet(int fieldID) {
8367
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8368
    }
8369
 
8370
    @Override
8371
    public boolean equals(Object that) {
8372
      if (that == null)
8373
        return false;
8374
      if (that instanceof changeTransactionStatus_result)
8375
        return this.equals((changeTransactionStatus_result)that);
8376
      return false;
8377
    }
8378
 
8379
    public boolean equals(changeTransactionStatus_result that) {
8380
      if (that == null)
8381
        return false;
8382
 
8383
      boolean this_present_success = true;
8384
      boolean that_present_success = true;
8385
      if (this_present_success || that_present_success) {
8386
        if (!(this_present_success && that_present_success))
8387
          return false;
8388
        if (this.success != that.success)
8389
          return false;
8390
      }
8391
 
8392
      boolean this_present_ex = true && this.isSetEx();
8393
      boolean that_present_ex = true && that.isSetEx();
8394
      if (this_present_ex || that_present_ex) {
8395
        if (!(this_present_ex && that_present_ex))
8396
          return false;
8397
        if (!this.ex.equals(that.ex))
8398
          return false;
8399
      }
8400
 
8401
      return true;
8402
    }
8403
 
8404
    @Override
8405
    public int hashCode() {
8406
      return 0;
8407
    }
8408
 
8409
    public int compareTo(changeTransactionStatus_result other) {
8410
      if (!getClass().equals(other.getClass())) {
8411
        return getClass().getName().compareTo(other.getClass().getName());
8412
      }
8413
 
8414
      int lastComparison = 0;
8415
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
8416
 
8417
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8418
      if (lastComparison != 0) {
8419
        return lastComparison;
8420
      }
8421
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8422
      if (lastComparison != 0) {
8423
        return lastComparison;
8424
      }
8425
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8426
      if (lastComparison != 0) {
8427
        return lastComparison;
8428
      }
8429
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8430
      if (lastComparison != 0) {
8431
        return lastComparison;
8432
      }
8433
      return 0;
8434
    }
8435
 
8436
    public void read(TProtocol iprot) throws TException {
8437
      TField field;
8438
      iprot.readStructBegin();
8439
      while (true)
8440
      {
8441
        field = iprot.readFieldBegin();
8442
        if (field.type == TType.STOP) { 
8443
          break;
8444
        }
8445
        _Fields fieldId = _Fields.findByThriftId(field.id);
8446
        if (fieldId == null) {
8447
          TProtocolUtil.skip(iprot, field.type);
8448
        } else {
8449
          switch (fieldId) {
8450
            case SUCCESS:
8451
              if (field.type == TType.BOOL) {
8452
                this.success = iprot.readBool();
8453
                setSuccessIsSet(true);
8454
              } else { 
8455
                TProtocolUtil.skip(iprot, field.type);
8456
              }
8457
              break;
8458
            case EX:
8459
              if (field.type == TType.STRUCT) {
8460
                this.ex = new TransactionServiceException();
8461
                this.ex.read(iprot);
8462
              } else { 
8463
                TProtocolUtil.skip(iprot, field.type);
8464
              }
8465
              break;
8466
          }
8467
          iprot.readFieldEnd();
8468
        }
8469
      }
8470
      iprot.readStructEnd();
8471
      validate();
8472
    }
8473
 
8474
    public void write(TProtocol oprot) throws TException {
8475
      oprot.writeStructBegin(STRUCT_DESC);
8476
 
8477
      if (this.isSetSuccess()) {
8478
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8479
        oprot.writeBool(this.success);
8480
        oprot.writeFieldEnd();
8481
      } else if (this.isSetEx()) {
8482
        oprot.writeFieldBegin(EX_FIELD_DESC);
8483
        this.ex.write(oprot);
8484
        oprot.writeFieldEnd();
8485
      }
8486
      oprot.writeFieldStop();
8487
      oprot.writeStructEnd();
8488
    }
8489
 
8490
    @Override
8491
    public String toString() {
8492
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
8493
      boolean first = true;
8494
 
8495
      sb.append("success:");
8496
      sb.append(this.success);
8497
      first = false;
8498
      if (!first) sb.append(", ");
8499
      sb.append("ex:");
8500
      if (this.ex == null) {
8501
        sb.append("null");
8502
      } else {
8503
        sb.append(this.ex);
8504
      }
8505
      first = false;
8506
      sb.append(")");
8507
      return sb.toString();
8508
    }
8509
 
8510
    public void validate() throws TException {
8511
      // check for required fields
8512
    }
8513
 
8514
  }
8515
 
8516
  public static class getOrderInfo_args implements TBase<getOrderInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderInfo_args>   {
8517
    private static final TStruct STRUCT_DESC = new TStruct("getOrderInfo_args");
8518
 
8519
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
8520
 
8521
    private long transactionId;
8522
 
8523
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8524
    public enum _Fields implements TFieldIdEnum {
8525
      TRANSACTION_ID((short)1, "transactionId");
8526
 
8527
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8528
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8529
 
8530
      static {
8531
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8532
          byId.put((int)field._thriftId, field);
8533
          byName.put(field.getFieldName(), field);
8534
        }
8535
      }
8536
 
8537
      /**
8538
       * Find the _Fields constant that matches fieldId, or null if its not found.
8539
       */
8540
      public static _Fields findByThriftId(int fieldId) {
8541
        return byId.get(fieldId);
8542
      }
8543
 
8544
      /**
8545
       * Find the _Fields constant that matches fieldId, throwing an exception
8546
       * if it is not found.
8547
       */
8548
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8549
        _Fields fields = findByThriftId(fieldId);
8550
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8551
        return fields;
8552
      }
8553
 
8554
      /**
8555
       * Find the _Fields constant that matches name, or null if its not found.
8556
       */
8557
      public static _Fields findByName(String name) {
8558
        return byName.get(name);
8559
      }
8560
 
8561
      private final short _thriftId;
8562
      private final String _fieldName;
8563
 
8564
      _Fields(short thriftId, String fieldName) {
8565
        _thriftId = thriftId;
8566
        _fieldName = fieldName;
8567
      }
8568
 
8569
      public short getThriftFieldId() {
8570
        return _thriftId;
8571
      }
8572
 
8573
      public String getFieldName() {
8574
        return _fieldName;
8575
      }
8576
    }
8577
 
8578
    // isset id assignments
8579
    private static final int __TRANSACTIONID_ISSET_ID = 0;
8580
    private BitSet __isset_bit_vector = new BitSet(1);
8581
 
8582
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8583
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
8584
          new FieldValueMetaData(TType.I64)));
8585
    }});
8586
 
8587
    static {
8588
      FieldMetaData.addStructMetaDataMap(getOrderInfo_args.class, metaDataMap);
8589
    }
8590
 
8591
    public getOrderInfo_args() {
8592
    }
8593
 
8594
    public getOrderInfo_args(
8595
      long transactionId)
8596
    {
8597
      this();
8598
      this.transactionId = transactionId;
8599
      setTransactionIdIsSet(true);
8600
    }
8601
 
8602
    /**
8603
     * Performs a deep copy on <i>other</i>.
8604
     */
8605
    public getOrderInfo_args(getOrderInfo_args other) {
8606
      __isset_bit_vector.clear();
8607
      __isset_bit_vector.or(other.__isset_bit_vector);
8608
      this.transactionId = other.transactionId;
8609
    }
8610
 
8611
    public getOrderInfo_args deepCopy() {
8612
      return new getOrderInfo_args(this);
8613
    }
8614
 
8615
    @Deprecated
8616
    public getOrderInfo_args clone() {
8617
      return new getOrderInfo_args(this);
8618
    }
8619
 
8620
    public long getTransactionId() {
8621
      return this.transactionId;
8622
    }
8623
 
8624
    public getOrderInfo_args setTransactionId(long transactionId) {
8625
      this.transactionId = transactionId;
8626
      setTransactionIdIsSet(true);
8627
      return this;
8628
    }
8629
 
8630
    public void unsetTransactionId() {
8631
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
8632
    }
8633
 
8634
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
8635
    public boolean isSetTransactionId() {
8636
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
8637
    }
8638
 
8639
    public void setTransactionIdIsSet(boolean value) {
8640
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
8641
    }
8642
 
8643
    public void setFieldValue(_Fields field, Object value) {
8644
      switch (field) {
8645
      case TRANSACTION_ID:
8646
        if (value == null) {
8647
          unsetTransactionId();
8648
        } else {
8649
          setTransactionId((Long)value);
8650
        }
8651
        break;
8652
 
8653
      }
8654
    }
8655
 
8656
    public void setFieldValue(int fieldID, Object value) {
8657
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8658
    }
8659
 
8660
    public Object getFieldValue(_Fields field) {
8661
      switch (field) {
8662
      case TRANSACTION_ID:
8663
        return new Long(getTransactionId());
8664
 
8665
      }
8666
      throw new IllegalStateException();
8667
    }
8668
 
8669
    public Object getFieldValue(int fieldId) {
8670
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8671
    }
8672
 
8673
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8674
    public boolean isSet(_Fields field) {
8675
      switch (field) {
8676
      case TRANSACTION_ID:
8677
        return isSetTransactionId();
8678
      }
8679
      throw new IllegalStateException();
8680
    }
8681
 
8682
    public boolean isSet(int fieldID) {
8683
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8684
    }
8685
 
8686
    @Override
8687
    public boolean equals(Object that) {
8688
      if (that == null)
8689
        return false;
8690
      if (that instanceof getOrderInfo_args)
8691
        return this.equals((getOrderInfo_args)that);
8692
      return false;
8693
    }
8694
 
8695
    public boolean equals(getOrderInfo_args that) {
8696
      if (that == null)
8697
        return false;
8698
 
8699
      boolean this_present_transactionId = true;
8700
      boolean that_present_transactionId = true;
8701
      if (this_present_transactionId || that_present_transactionId) {
8702
        if (!(this_present_transactionId && that_present_transactionId))
8703
          return false;
8704
        if (this.transactionId != that.transactionId)
8705
          return false;
8706
      }
8707
 
8708
      return true;
8709
    }
8710
 
8711
    @Override
8712
    public int hashCode() {
8713
      return 0;
8714
    }
8715
 
8716
    public int compareTo(getOrderInfo_args other) {
8717
      if (!getClass().equals(other.getClass())) {
8718
        return getClass().getName().compareTo(other.getClass().getName());
8719
      }
8720
 
8721
      int lastComparison = 0;
8722
      getOrderInfo_args typedOther = (getOrderInfo_args)other;
8723
 
8724
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
8725
      if (lastComparison != 0) {
8726
        return lastComparison;
8727
      }
8728
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
8729
      if (lastComparison != 0) {
8730
        return lastComparison;
8731
      }
8732
      return 0;
8733
    }
8734
 
8735
    public void read(TProtocol iprot) throws TException {
8736
      TField field;
8737
      iprot.readStructBegin();
8738
      while (true)
8739
      {
8740
        field = iprot.readFieldBegin();
8741
        if (field.type == TType.STOP) { 
8742
          break;
8743
        }
8744
        _Fields fieldId = _Fields.findByThriftId(field.id);
8745
        if (fieldId == null) {
8746
          TProtocolUtil.skip(iprot, field.type);
8747
        } else {
8748
          switch (fieldId) {
8749
            case TRANSACTION_ID:
8750
              if (field.type == TType.I64) {
8751
                this.transactionId = iprot.readI64();
8752
                setTransactionIdIsSet(true);
8753
              } else { 
8754
                TProtocolUtil.skip(iprot, field.type);
8755
              }
8756
              break;
8757
          }
8758
          iprot.readFieldEnd();
8759
        }
8760
      }
8761
      iprot.readStructEnd();
8762
      validate();
8763
    }
8764
 
8765
    public void write(TProtocol oprot) throws TException {
8766
      validate();
8767
 
8768
      oprot.writeStructBegin(STRUCT_DESC);
8769
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
8770
      oprot.writeI64(this.transactionId);
8771
      oprot.writeFieldEnd();
8772
      oprot.writeFieldStop();
8773
      oprot.writeStructEnd();
8774
    }
8775
 
8776
    @Override
8777
    public String toString() {
8778
      StringBuilder sb = new StringBuilder("getOrderInfo_args(");
8779
      boolean first = true;
8780
 
8781
      sb.append("transactionId:");
8782
      sb.append(this.transactionId);
8783
      first = false;
8784
      sb.append(")");
8785
      return sb.toString();
8786
    }
8787
 
8788
    public void validate() throws TException {
8789
      // check for required fields
8790
    }
8791
 
8792
  }
8793
 
8794
  public static class getOrderInfo_result implements TBase<getOrderInfo_result._Fields>, java.io.Serializable, Cloneable   {
8795
    private static final TStruct STRUCT_DESC = new TStruct("getOrderInfo_result");
8796
 
8797
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
8798
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8799
 
8800
    private OrderInfo success;
8801
    private TransactionServiceException ex;
8802
 
8803
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8804
    public enum _Fields implements TFieldIdEnum {
8805
      SUCCESS((short)0, "success"),
8806
      EX((short)1, "ex");
8807
 
8808
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8809
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8810
 
8811
      static {
8812
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8813
          byId.put((int)field._thriftId, field);
8814
          byName.put(field.getFieldName(), field);
8815
        }
8816
      }
8817
 
8818
      /**
8819
       * Find the _Fields constant that matches fieldId, or null if its not found.
8820
       */
8821
      public static _Fields findByThriftId(int fieldId) {
8822
        return byId.get(fieldId);
8823
      }
8824
 
8825
      /**
8826
       * Find the _Fields constant that matches fieldId, throwing an exception
8827
       * if it is not found.
8828
       */
8829
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8830
        _Fields fields = findByThriftId(fieldId);
8831
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8832
        return fields;
8833
      }
8834
 
8835
      /**
8836
       * Find the _Fields constant that matches name, or null if its not found.
8837
       */
8838
      public static _Fields findByName(String name) {
8839
        return byName.get(name);
8840
      }
8841
 
8842
      private final short _thriftId;
8843
      private final String _fieldName;
8844
 
8845
      _Fields(short thriftId, String fieldName) {
8846
        _thriftId = thriftId;
8847
        _fieldName = fieldName;
8848
      }
8849
 
8850
      public short getThriftFieldId() {
8851
        return _thriftId;
8852
      }
8853
 
8854
      public String getFieldName() {
8855
        return _fieldName;
8856
      }
8857
    }
8858
 
8859
    // isset id assignments
8860
 
8861
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8862
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8863
          new StructMetaData(TType.STRUCT, OrderInfo.class)));
8864
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8865
          new FieldValueMetaData(TType.STRUCT)));
8866
    }});
8867
 
8868
    static {
8869
      FieldMetaData.addStructMetaDataMap(getOrderInfo_result.class, metaDataMap);
8870
    }
8871
 
8872
    public getOrderInfo_result() {
8873
    }
8874
 
8875
    public getOrderInfo_result(
8876
      OrderInfo success,
8877
      TransactionServiceException ex)
8878
    {
8879
      this();
8880
      this.success = success;
8881
      this.ex = ex;
8882
    }
8883
 
8884
    /**
8885
     * Performs a deep copy on <i>other</i>.
8886
     */
8887
    public getOrderInfo_result(getOrderInfo_result other) {
8888
      if (other.isSetSuccess()) {
8889
        this.success = new OrderInfo(other.success);
8890
      }
8891
      if (other.isSetEx()) {
8892
        this.ex = new TransactionServiceException(other.ex);
8893
      }
8894
    }
8895
 
8896
    public getOrderInfo_result deepCopy() {
8897
      return new getOrderInfo_result(this);
8898
    }
8899
 
8900
    @Deprecated
8901
    public getOrderInfo_result clone() {
8902
      return new getOrderInfo_result(this);
8903
    }
8904
 
8905
    public OrderInfo getSuccess() {
8906
      return this.success;
8907
    }
8908
 
8909
    public getOrderInfo_result setSuccess(OrderInfo success) {
8910
      this.success = success;
8911
      return this;
8912
    }
8913
 
8914
    public void unsetSuccess() {
8915
      this.success = null;
8916
    }
8917
 
8918
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8919
    public boolean isSetSuccess() {
8920
      return this.success != null;
8921
    }
8922
 
8923
    public void setSuccessIsSet(boolean value) {
8924
      if (!value) {
8925
        this.success = null;
8926
      }
8927
    }
8928
 
8929
    public TransactionServiceException getEx() {
8930
      return this.ex;
8931
    }
8932
 
8933
    public getOrderInfo_result setEx(TransactionServiceException ex) {
8934
      this.ex = ex;
8935
      return this;
8936
    }
8937
 
8938
    public void unsetEx() {
8939
      this.ex = null;
8940
    }
8941
 
8942
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8943
    public boolean isSetEx() {
8944
      return this.ex != null;
8945
    }
8946
 
8947
    public void setExIsSet(boolean value) {
8948
      if (!value) {
8949
        this.ex = null;
8950
      }
8951
    }
8952
 
8953
    public void setFieldValue(_Fields field, Object value) {
8954
      switch (field) {
8955
      case SUCCESS:
8956
        if (value == null) {
8957
          unsetSuccess();
8958
        } else {
8959
          setSuccess((OrderInfo)value);
8960
        }
8961
        break;
8962
 
8963
      case EX:
8964
        if (value == null) {
8965
          unsetEx();
8966
        } else {
8967
          setEx((TransactionServiceException)value);
8968
        }
8969
        break;
8970
 
8971
      }
8972
    }
8973
 
8974
    public void setFieldValue(int fieldID, Object value) {
8975
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8976
    }
8977
 
8978
    public Object getFieldValue(_Fields field) {
8979
      switch (field) {
8980
      case SUCCESS:
8981
        return getSuccess();
8982
 
8983
      case EX:
8984
        return getEx();
8985
 
8986
      }
8987
      throw new IllegalStateException();
8988
    }
8989
 
8990
    public Object getFieldValue(int fieldId) {
8991
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8992
    }
8993
 
8994
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8995
    public boolean isSet(_Fields field) {
8996
      switch (field) {
8997
      case SUCCESS:
8998
        return isSetSuccess();
8999
      case EX:
9000
        return isSetEx();
9001
      }
9002
      throw new IllegalStateException();
9003
    }
9004
 
9005
    public boolean isSet(int fieldID) {
9006
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9007
    }
9008
 
9009
    @Override
9010
    public boolean equals(Object that) {
9011
      if (that == null)
9012
        return false;
9013
      if (that instanceof getOrderInfo_result)
9014
        return this.equals((getOrderInfo_result)that);
9015
      return false;
9016
    }
9017
 
9018
    public boolean equals(getOrderInfo_result that) {
9019
      if (that == null)
9020
        return false;
9021
 
9022
      boolean this_present_success = true && this.isSetSuccess();
9023
      boolean that_present_success = true && that.isSetSuccess();
9024
      if (this_present_success || that_present_success) {
9025
        if (!(this_present_success && that_present_success))
9026
          return false;
9027
        if (!this.success.equals(that.success))
9028
          return false;
9029
      }
9030
 
9031
      boolean this_present_ex = true && this.isSetEx();
9032
      boolean that_present_ex = true && that.isSetEx();
9033
      if (this_present_ex || that_present_ex) {
9034
        if (!(this_present_ex && that_present_ex))
9035
          return false;
9036
        if (!this.ex.equals(that.ex))
9037
          return false;
9038
      }
9039
 
9040
      return true;
9041
    }
9042
 
9043
    @Override
9044
    public int hashCode() {
9045
      return 0;
9046
    }
9047
 
9048
    public void read(TProtocol iprot) throws TException {
9049
      TField field;
9050
      iprot.readStructBegin();
9051
      while (true)
9052
      {
9053
        field = iprot.readFieldBegin();
9054
        if (field.type == TType.STOP) { 
9055
          break;
9056
        }
9057
        _Fields fieldId = _Fields.findByThriftId(field.id);
9058
        if (fieldId == null) {
9059
          TProtocolUtil.skip(iprot, field.type);
9060
        } else {
9061
          switch (fieldId) {
9062
            case SUCCESS:
9063
              if (field.type == TType.STRUCT) {
9064
                this.success = new OrderInfo();
9065
                this.success.read(iprot);
9066
              } else { 
9067
                TProtocolUtil.skip(iprot, field.type);
9068
              }
9069
              break;
9070
            case EX:
9071
              if (field.type == TType.STRUCT) {
9072
                this.ex = new TransactionServiceException();
9073
                this.ex.read(iprot);
9074
              } else { 
9075
                TProtocolUtil.skip(iprot, field.type);
9076
              }
9077
              break;
9078
          }
9079
          iprot.readFieldEnd();
9080
        }
9081
      }
9082
      iprot.readStructEnd();
9083
      validate();
9084
    }
9085
 
9086
    public void write(TProtocol oprot) throws TException {
9087
      oprot.writeStructBegin(STRUCT_DESC);
9088
 
9089
      if (this.isSetSuccess()) {
9090
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9091
        this.success.write(oprot);
9092
        oprot.writeFieldEnd();
9093
      } else if (this.isSetEx()) {
9094
        oprot.writeFieldBegin(EX_FIELD_DESC);
9095
        this.ex.write(oprot);
9096
        oprot.writeFieldEnd();
9097
      }
9098
      oprot.writeFieldStop();
9099
      oprot.writeStructEnd();
9100
    }
9101
 
9102
    @Override
9103
    public String toString() {
9104
      StringBuilder sb = new StringBuilder("getOrderInfo_result(");
9105
      boolean first = true;
9106
 
9107
      sb.append("success:");
9108
      if (this.success == null) {
9109
        sb.append("null");
9110
      } else {
9111
        sb.append(this.success);
9112
      }
9113
      first = false;
9114
      if (!first) sb.append(", ");
9115
      sb.append("ex:");
9116
      if (this.ex == null) {
9117
        sb.append("null");
9118
      } else {
9119
        sb.append(this.ex);
9120
      }
9121
      first = false;
9122
      sb.append(")");
9123
      return sb.toString();
9124
    }
9125
 
9126
    public void validate() throws TException {
9127
      // check for required fields
9128
    }
9129
 
9130
  }
9131
 
9132
  public static class getShippingInfo_args implements TBase<getShippingInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getShippingInfo_args>   {
9133
    private static final TStruct STRUCT_DESC = new TStruct("getShippingInfo_args");
9134
 
9135
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
9136
 
9137
    private long transactionId;
9138
 
9139
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9140
    public enum _Fields implements TFieldIdEnum {
9141
      TRANSACTION_ID((short)1, "transactionId");
9142
 
9143
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9144
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9145
 
9146
      static {
9147
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9148
          byId.put((int)field._thriftId, field);
9149
          byName.put(field.getFieldName(), field);
9150
        }
9151
      }
9152
 
9153
      /**
9154
       * Find the _Fields constant that matches fieldId, or null if its not found.
9155
       */
9156
      public static _Fields findByThriftId(int fieldId) {
9157
        return byId.get(fieldId);
9158
      }
9159
 
9160
      /**
9161
       * Find the _Fields constant that matches fieldId, throwing an exception
9162
       * if it is not found.
9163
       */
9164
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9165
        _Fields fields = findByThriftId(fieldId);
9166
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9167
        return fields;
9168
      }
9169
 
9170
      /**
9171
       * Find the _Fields constant that matches name, or null if its not found.
9172
       */
9173
      public static _Fields findByName(String name) {
9174
        return byName.get(name);
9175
      }
9176
 
9177
      private final short _thriftId;
9178
      private final String _fieldName;
9179
 
9180
      _Fields(short thriftId, String fieldName) {
9181
        _thriftId = thriftId;
9182
        _fieldName = fieldName;
9183
      }
9184
 
9185
      public short getThriftFieldId() {
9186
        return _thriftId;
9187
      }
9188
 
9189
      public String getFieldName() {
9190
        return _fieldName;
9191
      }
9192
    }
9193
 
9194
    // isset id assignments
9195
    private static final int __TRANSACTIONID_ISSET_ID = 0;
9196
    private BitSet __isset_bit_vector = new BitSet(1);
9197
 
9198
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9199
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
9200
          new FieldValueMetaData(TType.I64)));
9201
    }});
9202
 
9203
    static {
9204
      FieldMetaData.addStructMetaDataMap(getShippingInfo_args.class, metaDataMap);
9205
    }
9206
 
9207
    public getShippingInfo_args() {
9208
    }
9209
 
9210
    public getShippingInfo_args(
9211
      long transactionId)
9212
    {
9213
      this();
9214
      this.transactionId = transactionId;
9215
      setTransactionIdIsSet(true);
9216
    }
9217
 
9218
    /**
9219
     * Performs a deep copy on <i>other</i>.
9220
     */
9221
    public getShippingInfo_args(getShippingInfo_args other) {
9222
      __isset_bit_vector.clear();
9223
      __isset_bit_vector.or(other.__isset_bit_vector);
9224
      this.transactionId = other.transactionId;
9225
    }
9226
 
9227
    public getShippingInfo_args deepCopy() {
9228
      return new getShippingInfo_args(this);
9229
    }
9230
 
9231
    @Deprecated
9232
    public getShippingInfo_args clone() {
9233
      return new getShippingInfo_args(this);
9234
    }
9235
 
9236
    public long getTransactionId() {
9237
      return this.transactionId;
9238
    }
9239
 
9240
    public getShippingInfo_args setTransactionId(long transactionId) {
9241
      this.transactionId = transactionId;
9242
      setTransactionIdIsSet(true);
9243
      return this;
9244
    }
9245
 
9246
    public void unsetTransactionId() {
9247
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
9248
    }
9249
 
9250
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
9251
    public boolean isSetTransactionId() {
9252
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
9253
    }
9254
 
9255
    public void setTransactionIdIsSet(boolean value) {
9256
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
9257
    }
9258
 
9259
    public void setFieldValue(_Fields field, Object value) {
9260
      switch (field) {
9261
      case TRANSACTION_ID:
9262
        if (value == null) {
9263
          unsetTransactionId();
9264
        } else {
9265
          setTransactionId((Long)value);
9266
        }
9267
        break;
9268
 
9269
      }
9270
    }
9271
 
9272
    public void setFieldValue(int fieldID, Object value) {
9273
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9274
    }
9275
 
9276
    public Object getFieldValue(_Fields field) {
9277
      switch (field) {
9278
      case TRANSACTION_ID:
9279
        return new Long(getTransactionId());
9280
 
9281
      }
9282
      throw new IllegalStateException();
9283
    }
9284
 
9285
    public Object getFieldValue(int fieldId) {
9286
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9287
    }
9288
 
9289
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9290
    public boolean isSet(_Fields field) {
9291
      switch (field) {
9292
      case TRANSACTION_ID:
9293
        return isSetTransactionId();
9294
      }
9295
      throw new IllegalStateException();
9296
    }
9297
 
9298
    public boolean isSet(int fieldID) {
9299
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9300
    }
9301
 
9302
    @Override
9303
    public boolean equals(Object that) {
9304
      if (that == null)
9305
        return false;
9306
      if (that instanceof getShippingInfo_args)
9307
        return this.equals((getShippingInfo_args)that);
9308
      return false;
9309
    }
9310
 
9311
    public boolean equals(getShippingInfo_args that) {
9312
      if (that == null)
9313
        return false;
9314
 
9315
      boolean this_present_transactionId = true;
9316
      boolean that_present_transactionId = true;
9317
      if (this_present_transactionId || that_present_transactionId) {
9318
        if (!(this_present_transactionId && that_present_transactionId))
9319
          return false;
9320
        if (this.transactionId != that.transactionId)
9321
          return false;
9322
      }
9323
 
9324
      return true;
9325
    }
9326
 
9327
    @Override
9328
    public int hashCode() {
9329
      return 0;
9330
    }
9331
 
9332
    public int compareTo(getShippingInfo_args other) {
9333
      if (!getClass().equals(other.getClass())) {
9334
        return getClass().getName().compareTo(other.getClass().getName());
9335
      }
9336
 
9337
      int lastComparison = 0;
9338
      getShippingInfo_args typedOther = (getShippingInfo_args)other;
9339
 
9340
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
9341
      if (lastComparison != 0) {
9342
        return lastComparison;
9343
      }
9344
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
9345
      if (lastComparison != 0) {
9346
        return lastComparison;
9347
      }
9348
      return 0;
9349
    }
9350
 
9351
    public void read(TProtocol iprot) throws TException {
9352
      TField field;
9353
      iprot.readStructBegin();
9354
      while (true)
9355
      {
9356
        field = iprot.readFieldBegin();
9357
        if (field.type == TType.STOP) { 
9358
          break;
9359
        }
9360
        _Fields fieldId = _Fields.findByThriftId(field.id);
9361
        if (fieldId == null) {
9362
          TProtocolUtil.skip(iprot, field.type);
9363
        } else {
9364
          switch (fieldId) {
9365
            case TRANSACTION_ID:
9366
              if (field.type == TType.I64) {
9367
                this.transactionId = iprot.readI64();
9368
                setTransactionIdIsSet(true);
9369
              } else { 
9370
                TProtocolUtil.skip(iprot, field.type);
9371
              }
9372
              break;
9373
          }
9374
          iprot.readFieldEnd();
9375
        }
9376
      }
9377
      iprot.readStructEnd();
9378
      validate();
9379
    }
9380
 
9381
    public void write(TProtocol oprot) throws TException {
9382
      validate();
9383
 
9384
      oprot.writeStructBegin(STRUCT_DESC);
9385
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
9386
      oprot.writeI64(this.transactionId);
9387
      oprot.writeFieldEnd();
9388
      oprot.writeFieldStop();
9389
      oprot.writeStructEnd();
9390
    }
9391
 
9392
    @Override
9393
    public String toString() {
9394
      StringBuilder sb = new StringBuilder("getShippingInfo_args(");
9395
      boolean first = true;
9396
 
9397
      sb.append("transactionId:");
9398
      sb.append(this.transactionId);
9399
      first = false;
9400
      sb.append(")");
9401
      return sb.toString();
9402
    }
9403
 
9404
    public void validate() throws TException {
9405
      // check for required fields
9406
    }
9407
 
9408
  }
9409
 
9410
  public static class getShippingInfo_result implements TBase<getShippingInfo_result._Fields>, java.io.Serializable, Cloneable   {
9411
    private static final TStruct STRUCT_DESC = new TStruct("getShippingInfo_result");
9412
 
9413
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
9414
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9415
 
9416
    private ShipmentInfo success;
9417
    private TransactionServiceException ex;
9418
 
9419
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9420
    public enum _Fields implements TFieldIdEnum {
9421
      SUCCESS((short)0, "success"),
9422
      EX((short)1, "ex");
9423
 
9424
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9425
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9426
 
9427
      static {
9428
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9429
          byId.put((int)field._thriftId, field);
9430
          byName.put(field.getFieldName(), field);
9431
        }
9432
      }
9433
 
9434
      /**
9435
       * Find the _Fields constant that matches fieldId, or null if its not found.
9436
       */
9437
      public static _Fields findByThriftId(int fieldId) {
9438
        return byId.get(fieldId);
9439
      }
9440
 
9441
      /**
9442
       * Find the _Fields constant that matches fieldId, throwing an exception
9443
       * if it is not found.
9444
       */
9445
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9446
        _Fields fields = findByThriftId(fieldId);
9447
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9448
        return fields;
9449
      }
9450
 
9451
      /**
9452
       * Find the _Fields constant that matches name, or null if its not found.
9453
       */
9454
      public static _Fields findByName(String name) {
9455
        return byName.get(name);
9456
      }
9457
 
9458
      private final short _thriftId;
9459
      private final String _fieldName;
9460
 
9461
      _Fields(short thriftId, String fieldName) {
9462
        _thriftId = thriftId;
9463
        _fieldName = fieldName;
9464
      }
9465
 
9466
      public short getThriftFieldId() {
9467
        return _thriftId;
9468
      }
9469
 
9470
      public String getFieldName() {
9471
        return _fieldName;
9472
      }
9473
    }
9474
 
9475
    // isset id assignments
9476
 
9477
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9478
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9479
          new StructMetaData(TType.STRUCT, ShipmentInfo.class)));
9480
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9481
          new FieldValueMetaData(TType.STRUCT)));
9482
    }});
9483
 
9484
    static {
9485
      FieldMetaData.addStructMetaDataMap(getShippingInfo_result.class, metaDataMap);
9486
    }
9487
 
9488
    public getShippingInfo_result() {
9489
    }
9490
 
9491
    public getShippingInfo_result(
9492
      ShipmentInfo success,
9493
      TransactionServiceException ex)
9494
    {
9495
      this();
9496
      this.success = success;
9497
      this.ex = ex;
9498
    }
9499
 
9500
    /**
9501
     * Performs a deep copy on <i>other</i>.
9502
     */
9503
    public getShippingInfo_result(getShippingInfo_result other) {
9504
      if (other.isSetSuccess()) {
9505
        this.success = new ShipmentInfo(other.success);
9506
      }
9507
      if (other.isSetEx()) {
9508
        this.ex = new TransactionServiceException(other.ex);
9509
      }
9510
    }
9511
 
9512
    public getShippingInfo_result deepCopy() {
9513
      return new getShippingInfo_result(this);
9514
    }
9515
 
9516
    @Deprecated
9517
    public getShippingInfo_result clone() {
9518
      return new getShippingInfo_result(this);
9519
    }
9520
 
9521
    public ShipmentInfo getSuccess() {
9522
      return this.success;
9523
    }
9524
 
9525
    public getShippingInfo_result setSuccess(ShipmentInfo success) {
9526
      this.success = success;
9527
      return this;
9528
    }
9529
 
9530
    public void unsetSuccess() {
9531
      this.success = null;
9532
    }
9533
 
9534
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9535
    public boolean isSetSuccess() {
9536
      return this.success != null;
9537
    }
9538
 
9539
    public void setSuccessIsSet(boolean value) {
9540
      if (!value) {
9541
        this.success = null;
9542
      }
9543
    }
9544
 
9545
    public TransactionServiceException getEx() {
9546
      return this.ex;
9547
    }
9548
 
9549
    public getShippingInfo_result setEx(TransactionServiceException ex) {
9550
      this.ex = ex;
9551
      return this;
9552
    }
9553
 
9554
    public void unsetEx() {
9555
      this.ex = null;
9556
    }
9557
 
9558
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9559
    public boolean isSetEx() {
9560
      return this.ex != null;
9561
    }
9562
 
9563
    public void setExIsSet(boolean value) {
9564
      if (!value) {
9565
        this.ex = null;
9566
      }
9567
    }
9568
 
9569
    public void setFieldValue(_Fields field, Object value) {
9570
      switch (field) {
9571
      case SUCCESS:
9572
        if (value == null) {
9573
          unsetSuccess();
9574
        } else {
9575
          setSuccess((ShipmentInfo)value);
9576
        }
9577
        break;
9578
 
9579
      case EX:
9580
        if (value == null) {
9581
          unsetEx();
9582
        } else {
9583
          setEx((TransactionServiceException)value);
9584
        }
9585
        break;
9586
 
9587
      }
9588
    }
9589
 
9590
    public void setFieldValue(int fieldID, Object value) {
9591
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9592
    }
9593
 
9594
    public Object getFieldValue(_Fields field) {
9595
      switch (field) {
9596
      case SUCCESS:
9597
        return getSuccess();
9598
 
9599
      case EX:
9600
        return getEx();
9601
 
9602
      }
9603
      throw new IllegalStateException();
9604
    }
9605
 
9606
    public Object getFieldValue(int fieldId) {
9607
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9608
    }
9609
 
9610
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9611
    public boolean isSet(_Fields field) {
9612
      switch (field) {
9613
      case SUCCESS:
9614
        return isSetSuccess();
9615
      case EX:
9616
        return isSetEx();
9617
      }
9618
      throw new IllegalStateException();
9619
    }
9620
 
9621
    public boolean isSet(int fieldID) {
9622
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9623
    }
9624
 
9625
    @Override
9626
    public boolean equals(Object that) {
9627
      if (that == null)
9628
        return false;
9629
      if (that instanceof getShippingInfo_result)
9630
        return this.equals((getShippingInfo_result)that);
9631
      return false;
9632
    }
9633
 
9634
    public boolean equals(getShippingInfo_result that) {
9635
      if (that == null)
9636
        return false;
9637
 
9638
      boolean this_present_success = true && this.isSetSuccess();
9639
      boolean that_present_success = true && that.isSetSuccess();
9640
      if (this_present_success || that_present_success) {
9641
        if (!(this_present_success && that_present_success))
9642
          return false;
9643
        if (!this.success.equals(that.success))
9644
          return false;
9645
      }
9646
 
9647
      boolean this_present_ex = true && this.isSetEx();
9648
      boolean that_present_ex = true && that.isSetEx();
9649
      if (this_present_ex || that_present_ex) {
9650
        if (!(this_present_ex && that_present_ex))
9651
          return false;
9652
        if (!this.ex.equals(that.ex))
9653
          return false;
9654
      }
9655
 
9656
      return true;
9657
    }
9658
 
9659
    @Override
9660
    public int hashCode() {
9661
      return 0;
9662
    }
9663
 
9664
    public void read(TProtocol iprot) throws TException {
9665
      TField field;
9666
      iprot.readStructBegin();
9667
      while (true)
9668
      {
9669
        field = iprot.readFieldBegin();
9670
        if (field.type == TType.STOP) { 
9671
          break;
9672
        }
9673
        _Fields fieldId = _Fields.findByThriftId(field.id);
9674
        if (fieldId == null) {
9675
          TProtocolUtil.skip(iprot, field.type);
9676
        } else {
9677
          switch (fieldId) {
9678
            case SUCCESS:
9679
              if (field.type == TType.STRUCT) {
9680
                this.success = new ShipmentInfo();
9681
                this.success.read(iprot);
9682
              } else { 
9683
                TProtocolUtil.skip(iprot, field.type);
9684
              }
9685
              break;
9686
            case EX:
9687
              if (field.type == TType.STRUCT) {
9688
                this.ex = new TransactionServiceException();
9689
                this.ex.read(iprot);
9690
              } else { 
9691
                TProtocolUtil.skip(iprot, field.type);
9692
              }
9693
              break;
9694
          }
9695
          iprot.readFieldEnd();
9696
        }
9697
      }
9698
      iprot.readStructEnd();
9699
      validate();
9700
    }
9701
 
9702
    public void write(TProtocol oprot) throws TException {
9703
      oprot.writeStructBegin(STRUCT_DESC);
9704
 
9705
      if (this.isSetSuccess()) {
9706
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9707
        this.success.write(oprot);
9708
        oprot.writeFieldEnd();
9709
      } else if (this.isSetEx()) {
9710
        oprot.writeFieldBegin(EX_FIELD_DESC);
9711
        this.ex.write(oprot);
9712
        oprot.writeFieldEnd();
9713
      }
9714
      oprot.writeFieldStop();
9715
      oprot.writeStructEnd();
9716
    }
9717
 
9718
    @Override
9719
    public String toString() {
9720
      StringBuilder sb = new StringBuilder("getShippingInfo_result(");
9721
      boolean first = true;
9722
 
9723
      sb.append("success:");
9724
      if (this.success == null) {
9725
        sb.append("null");
9726
      } else {
9727
        sb.append(this.success);
9728
      }
9729
      first = false;
9730
      if (!first) sb.append(", ");
9731
      sb.append("ex:");
9732
      if (this.ex == null) {
9733
        sb.append("null");
9734
      } else {
9735
        sb.append(this.ex);
9736
      }
9737
      first = false;
9738
      sb.append(")");
9739
      return sb.toString();
9740
    }
9741
 
9742
    public void validate() throws TException {
9743
      // check for required fields
9744
    }
9745
 
9746
  }
9747
 
9748
  public static class getBillingInfo_args implements TBase<getBillingInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getBillingInfo_args>   {
9749
    private static final TStruct STRUCT_DESC = new TStruct("getBillingInfo_args");
9750
 
9751
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
9752
 
9753
    private long transactionId;
9754
 
9755
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9756
    public enum _Fields implements TFieldIdEnum {
9757
      TRANSACTION_ID((short)1, "transactionId");
9758
 
9759
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9760
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9761
 
9762
      static {
9763
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9764
          byId.put((int)field._thriftId, field);
9765
          byName.put(field.getFieldName(), field);
9766
        }
9767
      }
9768
 
9769
      /**
9770
       * Find the _Fields constant that matches fieldId, or null if its not found.
9771
       */
9772
      public static _Fields findByThriftId(int fieldId) {
9773
        return byId.get(fieldId);
9774
      }
9775
 
9776
      /**
9777
       * Find the _Fields constant that matches fieldId, throwing an exception
9778
       * if it is not found.
9779
       */
9780
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9781
        _Fields fields = findByThriftId(fieldId);
9782
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9783
        return fields;
9784
      }
9785
 
9786
      /**
9787
       * Find the _Fields constant that matches name, or null if its not found.
9788
       */
9789
      public static _Fields findByName(String name) {
9790
        return byName.get(name);
9791
      }
9792
 
9793
      private final short _thriftId;
9794
      private final String _fieldName;
9795
 
9796
      _Fields(short thriftId, String fieldName) {
9797
        _thriftId = thriftId;
9798
        _fieldName = fieldName;
9799
      }
9800
 
9801
      public short getThriftFieldId() {
9802
        return _thriftId;
9803
      }
9804
 
9805
      public String getFieldName() {
9806
        return _fieldName;
9807
      }
9808
    }
9809
 
9810
    // isset id assignments
9811
    private static final int __TRANSACTIONID_ISSET_ID = 0;
9812
    private BitSet __isset_bit_vector = new BitSet(1);
9813
 
9814
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9815
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
9816
          new FieldValueMetaData(TType.I64)));
9817
    }});
9818
 
9819
    static {
9820
      FieldMetaData.addStructMetaDataMap(getBillingInfo_args.class, metaDataMap);
9821
    }
9822
 
9823
    public getBillingInfo_args() {
9824
    }
9825
 
9826
    public getBillingInfo_args(
9827
      long transactionId)
9828
    {
9829
      this();
9830
      this.transactionId = transactionId;
9831
      setTransactionIdIsSet(true);
9832
    }
9833
 
9834
    /**
9835
     * Performs a deep copy on <i>other</i>.
9836
     */
9837
    public getBillingInfo_args(getBillingInfo_args other) {
9838
      __isset_bit_vector.clear();
9839
      __isset_bit_vector.or(other.__isset_bit_vector);
9840
      this.transactionId = other.transactionId;
9841
    }
9842
 
9843
    public getBillingInfo_args deepCopy() {
9844
      return new getBillingInfo_args(this);
9845
    }
9846
 
9847
    @Deprecated
9848
    public getBillingInfo_args clone() {
9849
      return new getBillingInfo_args(this);
9850
    }
9851
 
9852
    public long getTransactionId() {
9853
      return this.transactionId;
9854
    }
9855
 
9856
    public getBillingInfo_args setTransactionId(long transactionId) {
9857
      this.transactionId = transactionId;
9858
      setTransactionIdIsSet(true);
9859
      return this;
9860
    }
9861
 
9862
    public void unsetTransactionId() {
9863
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
9864
    }
9865
 
9866
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
9867
    public boolean isSetTransactionId() {
9868
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
9869
    }
9870
 
9871
    public void setTransactionIdIsSet(boolean value) {
9872
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
9873
    }
9874
 
9875
    public void setFieldValue(_Fields field, Object value) {
9876
      switch (field) {
9877
      case TRANSACTION_ID:
9878
        if (value == null) {
9879
          unsetTransactionId();
9880
        } else {
9881
          setTransactionId((Long)value);
9882
        }
9883
        break;
9884
 
9885
      }
9886
    }
9887
 
9888
    public void setFieldValue(int fieldID, Object value) {
9889
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9890
    }
9891
 
9892
    public Object getFieldValue(_Fields field) {
9893
      switch (field) {
9894
      case TRANSACTION_ID:
9895
        return new Long(getTransactionId());
9896
 
9897
      }
9898
      throw new IllegalStateException();
9899
    }
9900
 
9901
    public Object getFieldValue(int fieldId) {
9902
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9903
    }
9904
 
9905
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9906
    public boolean isSet(_Fields field) {
9907
      switch (field) {
9908
      case TRANSACTION_ID:
9909
        return isSetTransactionId();
9910
      }
9911
      throw new IllegalStateException();
9912
    }
9913
 
9914
    public boolean isSet(int fieldID) {
9915
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9916
    }
9917
 
9918
    @Override
9919
    public boolean equals(Object that) {
9920
      if (that == null)
9921
        return false;
9922
      if (that instanceof getBillingInfo_args)
9923
        return this.equals((getBillingInfo_args)that);
9924
      return false;
9925
    }
9926
 
9927
    public boolean equals(getBillingInfo_args that) {
9928
      if (that == null)
9929
        return false;
9930
 
9931
      boolean this_present_transactionId = true;
9932
      boolean that_present_transactionId = true;
9933
      if (this_present_transactionId || that_present_transactionId) {
9934
        if (!(this_present_transactionId && that_present_transactionId))
9935
          return false;
9936
        if (this.transactionId != that.transactionId)
9937
          return false;
9938
      }
9939
 
9940
      return true;
9941
    }
9942
 
9943
    @Override
9944
    public int hashCode() {
9945
      return 0;
9946
    }
9947
 
9948
    public int compareTo(getBillingInfo_args other) {
9949
      if (!getClass().equals(other.getClass())) {
9950
        return getClass().getName().compareTo(other.getClass().getName());
9951
      }
9952
 
9953
      int lastComparison = 0;
9954
      getBillingInfo_args typedOther = (getBillingInfo_args)other;
9955
 
9956
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
9957
      if (lastComparison != 0) {
9958
        return lastComparison;
9959
      }
9960
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
9961
      if (lastComparison != 0) {
9962
        return lastComparison;
9963
      }
9964
      return 0;
9965
    }
9966
 
9967
    public void read(TProtocol iprot) throws TException {
9968
      TField field;
9969
      iprot.readStructBegin();
9970
      while (true)
9971
      {
9972
        field = iprot.readFieldBegin();
9973
        if (field.type == TType.STOP) { 
9974
          break;
9975
        }
9976
        _Fields fieldId = _Fields.findByThriftId(field.id);
9977
        if (fieldId == null) {
9978
          TProtocolUtil.skip(iprot, field.type);
9979
        } else {
9980
          switch (fieldId) {
9981
            case TRANSACTION_ID:
9982
              if (field.type == TType.I64) {
9983
                this.transactionId = iprot.readI64();
9984
                setTransactionIdIsSet(true);
9985
              } else { 
9986
                TProtocolUtil.skip(iprot, field.type);
9987
              }
9988
              break;
9989
          }
9990
          iprot.readFieldEnd();
9991
        }
9992
      }
9993
      iprot.readStructEnd();
9994
      validate();
9995
    }
9996
 
9997
    public void write(TProtocol oprot) throws TException {
9998
      validate();
9999
 
10000
      oprot.writeStructBegin(STRUCT_DESC);
10001
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
10002
      oprot.writeI64(this.transactionId);
10003
      oprot.writeFieldEnd();
10004
      oprot.writeFieldStop();
10005
      oprot.writeStructEnd();
10006
    }
10007
 
10008
    @Override
10009
    public String toString() {
10010
      StringBuilder sb = new StringBuilder("getBillingInfo_args(");
10011
      boolean first = true;
10012
 
10013
      sb.append("transactionId:");
10014
      sb.append(this.transactionId);
10015
      first = false;
10016
      sb.append(")");
10017
      return sb.toString();
10018
    }
10019
 
10020
    public void validate() throws TException {
10021
      // check for required fields
10022
    }
10023
 
10024
  }
10025
 
10026
  public static class getBillingInfo_result implements TBase<getBillingInfo_result._Fields>, java.io.Serializable, Cloneable   {
10027
    private static final TStruct STRUCT_DESC = new TStruct("getBillingInfo_result");
10028
 
10029
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
10030
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10031
 
10032
    private BillingInfo success;
10033
    private TransactionServiceException ex;
10034
 
10035
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10036
    public enum _Fields implements TFieldIdEnum {
10037
      SUCCESS((short)0, "success"),
10038
      EX((short)1, "ex");
10039
 
10040
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10041
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10042
 
10043
      static {
10044
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10045
          byId.put((int)field._thriftId, field);
10046
          byName.put(field.getFieldName(), field);
10047
        }
10048
      }
10049
 
10050
      /**
10051
       * Find the _Fields constant that matches fieldId, or null if its not found.
10052
       */
10053
      public static _Fields findByThriftId(int fieldId) {
10054
        return byId.get(fieldId);
10055
      }
10056
 
10057
      /**
10058
       * Find the _Fields constant that matches fieldId, throwing an exception
10059
       * if it is not found.
10060
       */
10061
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10062
        _Fields fields = findByThriftId(fieldId);
10063
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10064
        return fields;
10065
      }
10066
 
10067
      /**
10068
       * Find the _Fields constant that matches name, or null if its not found.
10069
       */
10070
      public static _Fields findByName(String name) {
10071
        return byName.get(name);
10072
      }
10073
 
10074
      private final short _thriftId;
10075
      private final String _fieldName;
10076
 
10077
      _Fields(short thriftId, String fieldName) {
10078
        _thriftId = thriftId;
10079
        _fieldName = fieldName;
10080
      }
10081
 
10082
      public short getThriftFieldId() {
10083
        return _thriftId;
10084
      }
10085
 
10086
      public String getFieldName() {
10087
        return _fieldName;
10088
      }
10089
    }
10090
 
10091
    // isset id assignments
10092
 
10093
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10094
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10095
          new StructMetaData(TType.STRUCT, BillingInfo.class)));
10096
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10097
          new FieldValueMetaData(TType.STRUCT)));
10098
    }});
10099
 
10100
    static {
10101
      FieldMetaData.addStructMetaDataMap(getBillingInfo_result.class, metaDataMap);
10102
    }
10103
 
10104
    public getBillingInfo_result() {
10105
    }
10106
 
10107
    public getBillingInfo_result(
10108
      BillingInfo success,
10109
      TransactionServiceException ex)
10110
    {
10111
      this();
10112
      this.success = success;
10113
      this.ex = ex;
10114
    }
10115
 
10116
    /**
10117
     * Performs a deep copy on <i>other</i>.
10118
     */
10119
    public getBillingInfo_result(getBillingInfo_result other) {
10120
      if (other.isSetSuccess()) {
10121
        this.success = new BillingInfo(other.success);
10122
      }
10123
      if (other.isSetEx()) {
10124
        this.ex = new TransactionServiceException(other.ex);
10125
      }
10126
    }
10127
 
10128
    public getBillingInfo_result deepCopy() {
10129
      return new getBillingInfo_result(this);
10130
    }
10131
 
10132
    @Deprecated
10133
    public getBillingInfo_result clone() {
10134
      return new getBillingInfo_result(this);
10135
    }
10136
 
10137
    public BillingInfo getSuccess() {
10138
      return this.success;
10139
    }
10140
 
10141
    public getBillingInfo_result setSuccess(BillingInfo success) {
10142
      this.success = success;
10143
      return this;
10144
    }
10145
 
10146
    public void unsetSuccess() {
10147
      this.success = null;
10148
    }
10149
 
10150
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10151
    public boolean isSetSuccess() {
10152
      return this.success != null;
10153
    }
10154
 
10155
    public void setSuccessIsSet(boolean value) {
10156
      if (!value) {
10157
        this.success = null;
10158
      }
10159
    }
10160
 
10161
    public TransactionServiceException getEx() {
10162
      return this.ex;
10163
    }
10164
 
10165
    public getBillingInfo_result setEx(TransactionServiceException ex) {
10166
      this.ex = ex;
10167
      return this;
10168
    }
10169
 
10170
    public void unsetEx() {
10171
      this.ex = null;
10172
    }
10173
 
10174
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10175
    public boolean isSetEx() {
10176
      return this.ex != null;
10177
    }
10178
 
10179
    public void setExIsSet(boolean value) {
10180
      if (!value) {
10181
        this.ex = null;
10182
      }
10183
    }
10184
 
10185
    public void setFieldValue(_Fields field, Object value) {
10186
      switch (field) {
10187
      case SUCCESS:
10188
        if (value == null) {
10189
          unsetSuccess();
10190
        } else {
10191
          setSuccess((BillingInfo)value);
10192
        }
10193
        break;
10194
 
10195
      case EX:
10196
        if (value == null) {
10197
          unsetEx();
10198
        } else {
10199
          setEx((TransactionServiceException)value);
10200
        }
10201
        break;
10202
 
10203
      }
10204
    }
10205
 
10206
    public void setFieldValue(int fieldID, Object value) {
10207
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10208
    }
10209
 
10210
    public Object getFieldValue(_Fields field) {
10211
      switch (field) {
10212
      case SUCCESS:
10213
        return getSuccess();
10214
 
10215
      case EX:
10216
        return getEx();
10217
 
10218
      }
10219
      throw new IllegalStateException();
10220
    }
10221
 
10222
    public Object getFieldValue(int fieldId) {
10223
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10224
    }
10225
 
10226
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10227
    public boolean isSet(_Fields field) {
10228
      switch (field) {
10229
      case SUCCESS:
10230
        return isSetSuccess();
10231
      case EX:
10232
        return isSetEx();
10233
      }
10234
      throw new IllegalStateException();
10235
    }
10236
 
10237
    public boolean isSet(int fieldID) {
10238
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10239
    }
10240
 
10241
    @Override
10242
    public boolean equals(Object that) {
10243
      if (that == null)
10244
        return false;
10245
      if (that instanceof getBillingInfo_result)
10246
        return this.equals((getBillingInfo_result)that);
10247
      return false;
10248
    }
10249
 
10250
    public boolean equals(getBillingInfo_result that) {
10251
      if (that == null)
10252
        return false;
10253
 
10254
      boolean this_present_success = true && this.isSetSuccess();
10255
      boolean that_present_success = true && that.isSetSuccess();
10256
      if (this_present_success || that_present_success) {
10257
        if (!(this_present_success && that_present_success))
10258
          return false;
10259
        if (!this.success.equals(that.success))
10260
          return false;
10261
      }
10262
 
10263
      boolean this_present_ex = true && this.isSetEx();
10264
      boolean that_present_ex = true && that.isSetEx();
10265
      if (this_present_ex || that_present_ex) {
10266
        if (!(this_present_ex && that_present_ex))
10267
          return false;
10268
        if (!this.ex.equals(that.ex))
10269
          return false;
10270
      }
10271
 
10272
      return true;
10273
    }
10274
 
10275
    @Override
10276
    public int hashCode() {
10277
      return 0;
10278
    }
10279
 
10280
    public void read(TProtocol iprot) throws TException {
10281
      TField field;
10282
      iprot.readStructBegin();
10283
      while (true)
10284
      {
10285
        field = iprot.readFieldBegin();
10286
        if (field.type == TType.STOP) { 
10287
          break;
10288
        }
10289
        _Fields fieldId = _Fields.findByThriftId(field.id);
10290
        if (fieldId == null) {
10291
          TProtocolUtil.skip(iprot, field.type);
10292
        } else {
10293
          switch (fieldId) {
10294
            case SUCCESS:
10295
              if (field.type == TType.STRUCT) {
10296
                this.success = new BillingInfo();
10297
                this.success.read(iprot);
10298
              } else { 
10299
                TProtocolUtil.skip(iprot, field.type);
10300
              }
10301
              break;
10302
            case EX:
10303
              if (field.type == TType.STRUCT) {
10304
                this.ex = new TransactionServiceException();
10305
                this.ex.read(iprot);
10306
              } else { 
10307
                TProtocolUtil.skip(iprot, field.type);
10308
              }
10309
              break;
10310
          }
10311
          iprot.readFieldEnd();
10312
        }
10313
      }
10314
      iprot.readStructEnd();
10315
      validate();
10316
    }
10317
 
10318
    public void write(TProtocol oprot) throws TException {
10319
      oprot.writeStructBegin(STRUCT_DESC);
10320
 
10321
      if (this.isSetSuccess()) {
10322
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10323
        this.success.write(oprot);
10324
        oprot.writeFieldEnd();
10325
      } else if (this.isSetEx()) {
10326
        oprot.writeFieldBegin(EX_FIELD_DESC);
10327
        this.ex.write(oprot);
10328
        oprot.writeFieldEnd();
10329
      }
10330
      oprot.writeFieldStop();
10331
      oprot.writeStructEnd();
10332
    }
10333
 
10334
    @Override
10335
    public String toString() {
10336
      StringBuilder sb = new StringBuilder("getBillingInfo_result(");
10337
      boolean first = true;
10338
 
10339
      sb.append("success:");
10340
      if (this.success == null) {
10341
        sb.append("null");
10342
      } else {
10343
        sb.append(this.success);
10344
      }
10345
      first = false;
10346
      if (!first) sb.append(", ");
10347
      sb.append("ex:");
10348
      if (this.ex == null) {
10349
        sb.append("null");
10350
      } else {
10351
        sb.append(this.ex);
10352
      }
10353
      first = false;
10354
      sb.append(")");
10355
      return sb.toString();
10356
    }
10357
 
10358
    public void validate() throws TException {
10359
      // check for required fields
10360
    }
10361
 
10362
  }
10363
 
10364
  public static class addBilling_args implements TBase<addBilling_args._Fields>, java.io.Serializable, Cloneable   {
10365
    private static final TStruct STRUCT_DESC = new TStruct("addBilling_args");
10366
 
10367
    private static final TField TRANACTION_ID_FIELD_DESC = new TField("tranactionId", TType.I64, (short)1);
10368
    private static final TField BILLING_FIELD_DESC = new TField("billing", TType.STRUCT, (short)2);
10369
 
10370
    private long tranactionId;
10371
    private Billing billing;
10372
 
10373
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10374
    public enum _Fields implements TFieldIdEnum {
10375
      TRANACTION_ID((short)1, "tranactionId"),
10376
      BILLING((short)2, "billing");
10377
 
10378
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10379
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10380
 
10381
      static {
10382
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10383
          byId.put((int)field._thriftId, field);
10384
          byName.put(field.getFieldName(), field);
10385
        }
10386
      }
10387
 
10388
      /**
10389
       * Find the _Fields constant that matches fieldId, or null if its not found.
10390
       */
10391
      public static _Fields findByThriftId(int fieldId) {
10392
        return byId.get(fieldId);
10393
      }
10394
 
10395
      /**
10396
       * Find the _Fields constant that matches fieldId, throwing an exception
10397
       * if it is not found.
10398
       */
10399
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10400
        _Fields fields = findByThriftId(fieldId);
10401
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10402
        return fields;
10403
      }
10404
 
10405
      /**
10406
       * Find the _Fields constant that matches name, or null if its not found.
10407
       */
10408
      public static _Fields findByName(String name) {
10409
        return byName.get(name);
10410
      }
10411
 
10412
      private final short _thriftId;
10413
      private final String _fieldName;
10414
 
10415
      _Fields(short thriftId, String fieldName) {
10416
        _thriftId = thriftId;
10417
        _fieldName = fieldName;
10418
      }
10419
 
10420
      public short getThriftFieldId() {
10421
        return _thriftId;
10422
      }
10423
 
10424
      public String getFieldName() {
10425
        return _fieldName;
10426
      }
10427
    }
10428
 
10429
    // isset id assignments
10430
    private static final int __TRANACTIONID_ISSET_ID = 0;
10431
    private BitSet __isset_bit_vector = new BitSet(1);
10432
 
10433
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10434
      put(_Fields.TRANACTION_ID, new FieldMetaData("tranactionId", TFieldRequirementType.DEFAULT, 
10435
          new FieldValueMetaData(TType.I64)));
10436
      put(_Fields.BILLING, new FieldMetaData("billing", TFieldRequirementType.DEFAULT, 
10437
          new StructMetaData(TType.STRUCT, Billing.class)));
10438
    }});
10439
 
10440
    static {
10441
      FieldMetaData.addStructMetaDataMap(addBilling_args.class, metaDataMap);
10442
    }
10443
 
10444
    public addBilling_args() {
10445
    }
10446
 
10447
    public addBilling_args(
10448
      long tranactionId,
10449
      Billing billing)
10450
    {
10451
      this();
10452
      this.tranactionId = tranactionId;
10453
      setTranactionIdIsSet(true);
10454
      this.billing = billing;
10455
    }
10456
 
10457
    /**
10458
     * Performs a deep copy on <i>other</i>.
10459
     */
10460
    public addBilling_args(addBilling_args other) {
10461
      __isset_bit_vector.clear();
10462
      __isset_bit_vector.or(other.__isset_bit_vector);
10463
      this.tranactionId = other.tranactionId;
10464
      if (other.isSetBilling()) {
10465
        this.billing = new Billing(other.billing);
10466
      }
10467
    }
10468
 
10469
    public addBilling_args deepCopy() {
10470
      return new addBilling_args(this);
10471
    }
10472
 
10473
    @Deprecated
10474
    public addBilling_args clone() {
10475
      return new addBilling_args(this);
10476
    }
10477
 
10478
    public long getTranactionId() {
10479
      return this.tranactionId;
10480
    }
10481
 
10482
    public addBilling_args setTranactionId(long tranactionId) {
10483
      this.tranactionId = tranactionId;
10484
      setTranactionIdIsSet(true);
10485
      return this;
10486
    }
10487
 
10488
    public void unsetTranactionId() {
10489
      __isset_bit_vector.clear(__TRANACTIONID_ISSET_ID);
10490
    }
10491
 
10492
    /** Returns true if field tranactionId is set (has been asigned a value) and false otherwise */
10493
    public boolean isSetTranactionId() {
10494
      return __isset_bit_vector.get(__TRANACTIONID_ISSET_ID);
10495
    }
10496
 
10497
    public void setTranactionIdIsSet(boolean value) {
10498
      __isset_bit_vector.set(__TRANACTIONID_ISSET_ID, value);
10499
    }
10500
 
10501
    public Billing getBilling() {
10502
      return this.billing;
10503
    }
10504
 
10505
    public addBilling_args setBilling(Billing billing) {
10506
      this.billing = billing;
10507
      return this;
10508
    }
10509
 
10510
    public void unsetBilling() {
10511
      this.billing = null;
10512
    }
10513
 
10514
    /** Returns true if field billing is set (has been asigned a value) and false otherwise */
10515
    public boolean isSetBilling() {
10516
      return this.billing != null;
10517
    }
10518
 
10519
    public void setBillingIsSet(boolean value) {
10520
      if (!value) {
10521
        this.billing = null;
10522
      }
10523
    }
10524
 
10525
    public void setFieldValue(_Fields field, Object value) {
10526
      switch (field) {
10527
      case TRANACTION_ID:
10528
        if (value == null) {
10529
          unsetTranactionId();
10530
        } else {
10531
          setTranactionId((Long)value);
10532
        }
10533
        break;
10534
 
10535
      case BILLING:
10536
        if (value == null) {
10537
          unsetBilling();
10538
        } else {
10539
          setBilling((Billing)value);
10540
        }
10541
        break;
10542
 
10543
      }
10544
    }
10545
 
10546
    public void setFieldValue(int fieldID, Object value) {
10547
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10548
    }
10549
 
10550
    public Object getFieldValue(_Fields field) {
10551
      switch (field) {
10552
      case TRANACTION_ID:
10553
        return new Long(getTranactionId());
10554
 
10555
      case BILLING:
10556
        return getBilling();
10557
 
10558
      }
10559
      throw new IllegalStateException();
10560
    }
10561
 
10562
    public Object getFieldValue(int fieldId) {
10563
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10564
    }
10565
 
10566
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10567
    public boolean isSet(_Fields field) {
10568
      switch (field) {
10569
      case TRANACTION_ID:
10570
        return isSetTranactionId();
10571
      case BILLING:
10572
        return isSetBilling();
10573
      }
10574
      throw new IllegalStateException();
10575
    }
10576
 
10577
    public boolean isSet(int fieldID) {
10578
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10579
    }
10580
 
10581
    @Override
10582
    public boolean equals(Object that) {
10583
      if (that == null)
10584
        return false;
10585
      if (that instanceof addBilling_args)
10586
        return this.equals((addBilling_args)that);
10587
      return false;
10588
    }
10589
 
10590
    public boolean equals(addBilling_args that) {
10591
      if (that == null)
10592
        return false;
10593
 
10594
      boolean this_present_tranactionId = true;
10595
      boolean that_present_tranactionId = true;
10596
      if (this_present_tranactionId || that_present_tranactionId) {
10597
        if (!(this_present_tranactionId && that_present_tranactionId))
10598
          return false;
10599
        if (this.tranactionId != that.tranactionId)
10600
          return false;
10601
      }
10602
 
10603
      boolean this_present_billing = true && this.isSetBilling();
10604
      boolean that_present_billing = true && that.isSetBilling();
10605
      if (this_present_billing || that_present_billing) {
10606
        if (!(this_present_billing && that_present_billing))
10607
          return false;
10608
        if (!this.billing.equals(that.billing))
10609
          return false;
10610
      }
10611
 
10612
      return true;
10613
    }
10614
 
10615
    @Override
10616
    public int hashCode() {
10617
      return 0;
10618
    }
10619
 
10620
    public void read(TProtocol iprot) throws TException {
10621
      TField field;
10622
      iprot.readStructBegin();
10623
      while (true)
10624
      {
10625
        field = iprot.readFieldBegin();
10626
        if (field.type == TType.STOP) { 
10627
          break;
10628
        }
10629
        _Fields fieldId = _Fields.findByThriftId(field.id);
10630
        if (fieldId == null) {
10631
          TProtocolUtil.skip(iprot, field.type);
10632
        } else {
10633
          switch (fieldId) {
10634
            case TRANACTION_ID:
10635
              if (field.type == TType.I64) {
10636
                this.tranactionId = iprot.readI64();
10637
                setTranactionIdIsSet(true);
10638
              } else { 
10639
                TProtocolUtil.skip(iprot, field.type);
10640
              }
10641
              break;
10642
            case BILLING:
10643
              if (field.type == TType.STRUCT) {
10644
                this.billing = new Billing();
10645
                this.billing.read(iprot);
10646
              } else { 
10647
                TProtocolUtil.skip(iprot, field.type);
10648
              }
10649
              break;
10650
          }
10651
          iprot.readFieldEnd();
10652
        }
10653
      }
10654
      iprot.readStructEnd();
10655
      validate();
10656
    }
10657
 
10658
    public void write(TProtocol oprot) throws TException {
10659
      validate();
10660
 
10661
      oprot.writeStructBegin(STRUCT_DESC);
10662
      oprot.writeFieldBegin(TRANACTION_ID_FIELD_DESC);
10663
      oprot.writeI64(this.tranactionId);
10664
      oprot.writeFieldEnd();
10665
      if (this.billing != null) {
10666
        oprot.writeFieldBegin(BILLING_FIELD_DESC);
10667
        this.billing.write(oprot);
10668
        oprot.writeFieldEnd();
10669
      }
10670
      oprot.writeFieldStop();
10671
      oprot.writeStructEnd();
10672
    }
10673
 
10674
    @Override
10675
    public String toString() {
10676
      StringBuilder sb = new StringBuilder("addBilling_args(");
10677
      boolean first = true;
10678
 
10679
      sb.append("tranactionId:");
10680
      sb.append(this.tranactionId);
10681
      first = false;
10682
      if (!first) sb.append(", ");
10683
      sb.append("billing:");
10684
      if (this.billing == null) {
10685
        sb.append("null");
10686
      } else {
10687
        sb.append(this.billing);
10688
      }
10689
      first = false;
10690
      sb.append(")");
10691
      return sb.toString();
10692
    }
10693
 
10694
    public void validate() throws TException {
10695
      // check for required fields
10696
    }
10697
 
10698
  }
10699
 
10700
  public static class addBilling_result implements TBase<addBilling_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBilling_result>   {
10701
    private static final TStruct STRUCT_DESC = new TStruct("addBilling_result");
10702
 
10703
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10704
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10705
 
10706
    private boolean success;
10707
    private TransactionServiceException ex;
10708
 
10709
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10710
    public enum _Fields implements TFieldIdEnum {
10711
      SUCCESS((short)0, "success"),
10712
      EX((short)1, "ex");
10713
 
10714
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10715
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10716
 
10717
      static {
10718
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10719
          byId.put((int)field._thriftId, field);
10720
          byName.put(field.getFieldName(), field);
10721
        }
10722
      }
10723
 
10724
      /**
10725
       * Find the _Fields constant that matches fieldId, or null if its not found.
10726
       */
10727
      public static _Fields findByThriftId(int fieldId) {
10728
        return byId.get(fieldId);
10729
      }
10730
 
10731
      /**
10732
       * Find the _Fields constant that matches fieldId, throwing an exception
10733
       * if it is not found.
10734
       */
10735
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10736
        _Fields fields = findByThriftId(fieldId);
10737
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10738
        return fields;
10739
      }
10740
 
10741
      /**
10742
       * Find the _Fields constant that matches name, or null if its not found.
10743
       */
10744
      public static _Fields findByName(String name) {
10745
        return byName.get(name);
10746
      }
10747
 
10748
      private final short _thriftId;
10749
      private final String _fieldName;
10750
 
10751
      _Fields(short thriftId, String fieldName) {
10752
        _thriftId = thriftId;
10753
        _fieldName = fieldName;
10754
      }
10755
 
10756
      public short getThriftFieldId() {
10757
        return _thriftId;
10758
      }
10759
 
10760
      public String getFieldName() {
10761
        return _fieldName;
10762
      }
10763
    }
10764
 
10765
    // isset id assignments
10766
    private static final int __SUCCESS_ISSET_ID = 0;
10767
    private BitSet __isset_bit_vector = new BitSet(1);
10768
 
10769
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10770
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10771
          new FieldValueMetaData(TType.BOOL)));
10772
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10773
          new FieldValueMetaData(TType.STRUCT)));
10774
    }});
10775
 
10776
    static {
10777
      FieldMetaData.addStructMetaDataMap(addBilling_result.class, metaDataMap);
10778
    }
10779
 
10780
    public addBilling_result() {
10781
    }
10782
 
10783
    public addBilling_result(
10784
      boolean success,
10785
      TransactionServiceException ex)
10786
    {
10787
      this();
10788
      this.success = success;
10789
      setSuccessIsSet(true);
10790
      this.ex = ex;
10791
    }
10792
 
10793
    /**
10794
     * Performs a deep copy on <i>other</i>.
10795
     */
10796
    public addBilling_result(addBilling_result other) {
10797
      __isset_bit_vector.clear();
10798
      __isset_bit_vector.or(other.__isset_bit_vector);
10799
      this.success = other.success;
10800
      if (other.isSetEx()) {
10801
        this.ex = new TransactionServiceException(other.ex);
10802
      }
10803
    }
10804
 
10805
    public addBilling_result deepCopy() {
10806
      return new addBilling_result(this);
10807
    }
10808
 
10809
    @Deprecated
10810
    public addBilling_result clone() {
10811
      return new addBilling_result(this);
10812
    }
10813
 
10814
    public boolean isSuccess() {
10815
      return this.success;
10816
    }
10817
 
10818
    public addBilling_result setSuccess(boolean success) {
10819
      this.success = success;
10820
      setSuccessIsSet(true);
10821
      return this;
10822
    }
10823
 
10824
    public void unsetSuccess() {
10825
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10826
    }
10827
 
10828
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10829
    public boolean isSetSuccess() {
10830
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10831
    }
10832
 
10833
    public void setSuccessIsSet(boolean value) {
10834
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10835
    }
10836
 
10837
    public TransactionServiceException getEx() {
10838
      return this.ex;
10839
    }
10840
 
10841
    public addBilling_result setEx(TransactionServiceException ex) {
10842
      this.ex = ex;
10843
      return this;
10844
    }
10845
 
10846
    public void unsetEx() {
10847
      this.ex = null;
10848
    }
10849
 
10850
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10851
    public boolean isSetEx() {
10852
      return this.ex != null;
10853
    }
10854
 
10855
    public void setExIsSet(boolean value) {
10856
      if (!value) {
10857
        this.ex = null;
10858
      }
10859
    }
10860
 
10861
    public void setFieldValue(_Fields field, Object value) {
10862
      switch (field) {
10863
      case SUCCESS:
10864
        if (value == null) {
10865
          unsetSuccess();
10866
        } else {
10867
          setSuccess((Boolean)value);
10868
        }
10869
        break;
10870
 
10871
      case EX:
10872
        if (value == null) {
10873
          unsetEx();
10874
        } else {
10875
          setEx((TransactionServiceException)value);
10876
        }
10877
        break;
10878
 
10879
      }
10880
    }
10881
 
10882
    public void setFieldValue(int fieldID, Object value) {
10883
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10884
    }
10885
 
10886
    public Object getFieldValue(_Fields field) {
10887
      switch (field) {
10888
      case SUCCESS:
10889
        return new Boolean(isSuccess());
10890
 
10891
      case EX:
10892
        return getEx();
10893
 
10894
      }
10895
      throw new IllegalStateException();
10896
    }
10897
 
10898
    public Object getFieldValue(int fieldId) {
10899
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10900
    }
10901
 
10902
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10903
    public boolean isSet(_Fields field) {
10904
      switch (field) {
10905
      case SUCCESS:
10906
        return isSetSuccess();
10907
      case EX:
10908
        return isSetEx();
10909
      }
10910
      throw new IllegalStateException();
10911
    }
10912
 
10913
    public boolean isSet(int fieldID) {
10914
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10915
    }
10916
 
10917
    @Override
10918
    public boolean equals(Object that) {
10919
      if (that == null)
10920
        return false;
10921
      if (that instanceof addBilling_result)
10922
        return this.equals((addBilling_result)that);
10923
      return false;
10924
    }
10925
 
10926
    public boolean equals(addBilling_result that) {
10927
      if (that == null)
10928
        return false;
10929
 
10930
      boolean this_present_success = true;
10931
      boolean that_present_success = true;
10932
      if (this_present_success || that_present_success) {
10933
        if (!(this_present_success && that_present_success))
10934
          return false;
10935
        if (this.success != that.success)
10936
          return false;
10937
      }
10938
 
10939
      boolean this_present_ex = true && this.isSetEx();
10940
      boolean that_present_ex = true && that.isSetEx();
10941
      if (this_present_ex || that_present_ex) {
10942
        if (!(this_present_ex && that_present_ex))
10943
          return false;
10944
        if (!this.ex.equals(that.ex))
10945
          return false;
10946
      }
10947
 
10948
      return true;
10949
    }
10950
 
10951
    @Override
10952
    public int hashCode() {
10953
      return 0;
10954
    }
10955
 
10956
    public int compareTo(addBilling_result other) {
10957
      if (!getClass().equals(other.getClass())) {
10958
        return getClass().getName().compareTo(other.getClass().getName());
10959
      }
10960
 
10961
      int lastComparison = 0;
10962
      addBilling_result typedOther = (addBilling_result)other;
10963
 
10964
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10965
      if (lastComparison != 0) {
10966
        return lastComparison;
10967
      }
10968
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10969
      if (lastComparison != 0) {
10970
        return lastComparison;
10971
      }
10972
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10973
      if (lastComparison != 0) {
10974
        return lastComparison;
10975
      }
10976
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10977
      if (lastComparison != 0) {
10978
        return lastComparison;
10979
      }
10980
      return 0;
10981
    }
10982
 
10983
    public void read(TProtocol iprot) throws TException {
10984
      TField field;
10985
      iprot.readStructBegin();
10986
      while (true)
10987
      {
10988
        field = iprot.readFieldBegin();
10989
        if (field.type == TType.STOP) { 
10990
          break;
10991
        }
10992
        _Fields fieldId = _Fields.findByThriftId(field.id);
10993
        if (fieldId == null) {
10994
          TProtocolUtil.skip(iprot, field.type);
10995
        } else {
10996
          switch (fieldId) {
10997
            case SUCCESS:
10998
              if (field.type == TType.BOOL) {
10999
                this.success = iprot.readBool();
11000
                setSuccessIsSet(true);
11001
              } else { 
11002
                TProtocolUtil.skip(iprot, field.type);
11003
              }
11004
              break;
11005
            case EX:
11006
              if (field.type == TType.STRUCT) {
11007
                this.ex = new TransactionServiceException();
11008
                this.ex.read(iprot);
11009
              } else { 
11010
                TProtocolUtil.skip(iprot, field.type);
11011
              }
11012
              break;
11013
          }
11014
          iprot.readFieldEnd();
11015
        }
11016
      }
11017
      iprot.readStructEnd();
11018
      validate();
11019
    }
11020
 
11021
    public void write(TProtocol oprot) throws TException {
11022
      oprot.writeStructBegin(STRUCT_DESC);
11023
 
11024
      if (this.isSetSuccess()) {
11025
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11026
        oprot.writeBool(this.success);
11027
        oprot.writeFieldEnd();
11028
      } else if (this.isSetEx()) {
11029
        oprot.writeFieldBegin(EX_FIELD_DESC);
11030
        this.ex.write(oprot);
11031
        oprot.writeFieldEnd();
11032
      }
11033
      oprot.writeFieldStop();
11034
      oprot.writeStructEnd();
11035
    }
11036
 
11037
    @Override
11038
    public String toString() {
11039
      StringBuilder sb = new StringBuilder("addBilling_result(");
11040
      boolean first = true;
11041
 
11042
      sb.append("success:");
11043
      sb.append(this.success);
11044
      first = false;
11045
      if (!first) sb.append(", ");
11046
      sb.append("ex:");
11047
      if (this.ex == null) {
11048
        sb.append("null");
11049
      } else {
11050
        sb.append(this.ex);
11051
      }
11052
      first = false;
11053
      sb.append(")");
11054
      return sb.toString();
11055
    }
11056
 
11057
    public void validate() throws TException {
11058
      // check for required fields
11059
    }
11060
 
11061
  }
11062
 
11063
  public static class setShippingTracker_args implements TBase<setShippingTracker_args._Fields>, java.io.Serializable, Cloneable, Comparable<setShippingTracker_args>   {
11064
    private static final TStruct STRUCT_DESC = new TStruct("setShippingTracker_args");
11065
 
11066
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
11067
    private static final TField SHIPPING_ID_FIELD_DESC = new TField("shippingId", TType.I64, (short)2);
11068
    private static final TField TRACKING_ID_FIELD_DESC = new TField("trackingId", TType.STRING, (short)3);
11069
    private static final TField AIRWAY_BILL_NO_FIELD_DESC = new TField("airwayBillNo", TType.STRING, (short)4);
11070
    private static final TField PROVIDER_FIELD_DESC = new TField("provider", TType.STRING, (short)5);
11071
 
11072
    private long transactionId;
11073
    private long shippingId;
11074
    private String trackingId;
11075
    private String airwayBillNo;
11076
    private String provider;
11077
 
11078
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11079
    public enum _Fields implements TFieldIdEnum {
11080
      TRANSACTION_ID((short)1, "transactionId"),
11081
      SHIPPING_ID((short)2, "shippingId"),
11082
      TRACKING_ID((short)3, "trackingId"),
11083
      AIRWAY_BILL_NO((short)4, "airwayBillNo"),
11084
      PROVIDER((short)5, "provider");
11085
 
11086
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11087
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11088
 
11089
      static {
11090
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11091
          byId.put((int)field._thriftId, field);
11092
          byName.put(field.getFieldName(), field);
11093
        }
11094
      }
11095
 
11096
      /**
11097
       * Find the _Fields constant that matches fieldId, or null if its not found.
11098
       */
11099
      public static _Fields findByThriftId(int fieldId) {
11100
        return byId.get(fieldId);
11101
      }
11102
 
11103
      /**
11104
       * Find the _Fields constant that matches fieldId, throwing an exception
11105
       * if it is not found.
11106
       */
11107
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11108
        _Fields fields = findByThriftId(fieldId);
11109
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11110
        return fields;
11111
      }
11112
 
11113
      /**
11114
       * Find the _Fields constant that matches name, or null if its not found.
11115
       */
11116
      public static _Fields findByName(String name) {
11117
        return byName.get(name);
11118
      }
11119
 
11120
      private final short _thriftId;
11121
      private final String _fieldName;
11122
 
11123
      _Fields(short thriftId, String fieldName) {
11124
        _thriftId = thriftId;
11125
        _fieldName = fieldName;
11126
      }
11127
 
11128
      public short getThriftFieldId() {
11129
        return _thriftId;
11130
      }
11131
 
11132
      public String getFieldName() {
11133
        return _fieldName;
11134
      }
11135
    }
11136
 
11137
    // isset id assignments
11138
    private static final int __TRANSACTIONID_ISSET_ID = 0;
11139
    private static final int __SHIPPINGID_ISSET_ID = 1;
11140
    private BitSet __isset_bit_vector = new BitSet(2);
11141
 
11142
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11143
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
11144
          new FieldValueMetaData(TType.I64)));
11145
      put(_Fields.SHIPPING_ID, new FieldMetaData("shippingId", TFieldRequirementType.DEFAULT, 
11146
          new FieldValueMetaData(TType.I64)));
11147
      put(_Fields.TRACKING_ID, new FieldMetaData("trackingId", TFieldRequirementType.DEFAULT, 
11148
          new FieldValueMetaData(TType.STRING)));
11149
      put(_Fields.AIRWAY_BILL_NO, new FieldMetaData("airwayBillNo", TFieldRequirementType.DEFAULT, 
11150
          new FieldValueMetaData(TType.STRING)));
11151
      put(_Fields.PROVIDER, new FieldMetaData("provider", TFieldRequirementType.DEFAULT, 
11152
          new FieldValueMetaData(TType.STRING)));
11153
    }});
11154
 
11155
    static {
11156
      FieldMetaData.addStructMetaDataMap(setShippingTracker_args.class, metaDataMap);
11157
    }
11158
 
11159
    public setShippingTracker_args() {
11160
    }
11161
 
11162
    public setShippingTracker_args(
11163
      long transactionId,
11164
      long shippingId,
11165
      String trackingId,
11166
      String airwayBillNo,
11167
      String provider)
11168
    {
11169
      this();
11170
      this.transactionId = transactionId;
11171
      setTransactionIdIsSet(true);
11172
      this.shippingId = shippingId;
11173
      setShippingIdIsSet(true);
11174
      this.trackingId = trackingId;
11175
      this.airwayBillNo = airwayBillNo;
11176
      this.provider = provider;
11177
    }
11178
 
11179
    /**
11180
     * Performs a deep copy on <i>other</i>.
11181
     */
11182
    public setShippingTracker_args(setShippingTracker_args other) {
11183
      __isset_bit_vector.clear();
11184
      __isset_bit_vector.or(other.__isset_bit_vector);
11185
      this.transactionId = other.transactionId;
11186
      this.shippingId = other.shippingId;
11187
      if (other.isSetTrackingId()) {
11188
        this.trackingId = other.trackingId;
11189
      }
11190
      if (other.isSetAirwayBillNo()) {
11191
        this.airwayBillNo = other.airwayBillNo;
11192
      }
11193
      if (other.isSetProvider()) {
11194
        this.provider = other.provider;
11195
      }
11196
    }
11197
 
11198
    public setShippingTracker_args deepCopy() {
11199
      return new setShippingTracker_args(this);
11200
    }
11201
 
11202
    @Deprecated
11203
    public setShippingTracker_args clone() {
11204
      return new setShippingTracker_args(this);
11205
    }
11206
 
11207
    public long getTransactionId() {
11208
      return this.transactionId;
11209
    }
11210
 
11211
    public setShippingTracker_args setTransactionId(long transactionId) {
11212
      this.transactionId = transactionId;
11213
      setTransactionIdIsSet(true);
11214
      return this;
11215
    }
11216
 
11217
    public void unsetTransactionId() {
11218
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
11219
    }
11220
 
11221
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
11222
    public boolean isSetTransactionId() {
11223
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
11224
    }
11225
 
11226
    public void setTransactionIdIsSet(boolean value) {
11227
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
11228
    }
11229
 
11230
    public long getShippingId() {
11231
      return this.shippingId;
11232
    }
11233
 
11234
    public setShippingTracker_args setShippingId(long shippingId) {
11235
      this.shippingId = shippingId;
11236
      setShippingIdIsSet(true);
11237
      return this;
11238
    }
11239
 
11240
    public void unsetShippingId() {
11241
      __isset_bit_vector.clear(__SHIPPINGID_ISSET_ID);
11242
    }
11243
 
11244
    /** Returns true if field shippingId is set (has been asigned a value) and false otherwise */
11245
    public boolean isSetShippingId() {
11246
      return __isset_bit_vector.get(__SHIPPINGID_ISSET_ID);
11247
    }
11248
 
11249
    public void setShippingIdIsSet(boolean value) {
11250
      __isset_bit_vector.set(__SHIPPINGID_ISSET_ID, value);
11251
    }
11252
 
11253
    public String getTrackingId() {
11254
      return this.trackingId;
11255
    }
11256
 
11257
    public setShippingTracker_args setTrackingId(String trackingId) {
11258
      this.trackingId = trackingId;
11259
      return this;
11260
    }
11261
 
11262
    public void unsetTrackingId() {
11263
      this.trackingId = null;
11264
    }
11265
 
11266
    /** Returns true if field trackingId is set (has been asigned a value) and false otherwise */
11267
    public boolean isSetTrackingId() {
11268
      return this.trackingId != null;
11269
    }
11270
 
11271
    public void setTrackingIdIsSet(boolean value) {
11272
      if (!value) {
11273
        this.trackingId = null;
11274
      }
11275
    }
11276
 
11277
    public String getAirwayBillNo() {
11278
      return this.airwayBillNo;
11279
    }
11280
 
11281
    public setShippingTracker_args setAirwayBillNo(String airwayBillNo) {
11282
      this.airwayBillNo = airwayBillNo;
11283
      return this;
11284
    }
11285
 
11286
    public void unsetAirwayBillNo() {
11287
      this.airwayBillNo = null;
11288
    }
11289
 
11290
    /** Returns true if field airwayBillNo is set (has been asigned a value) and false otherwise */
11291
    public boolean isSetAirwayBillNo() {
11292
      return this.airwayBillNo != null;
11293
    }
11294
 
11295
    public void setAirwayBillNoIsSet(boolean value) {
11296
      if (!value) {
11297
        this.airwayBillNo = null;
11298
      }
11299
    }
11300
 
11301
    public String getProvider() {
11302
      return this.provider;
11303
    }
11304
 
11305
    public setShippingTracker_args setProvider(String provider) {
11306
      this.provider = provider;
11307
      return this;
11308
    }
11309
 
11310
    public void unsetProvider() {
11311
      this.provider = null;
11312
    }
11313
 
11314
    /** Returns true if field provider is set (has been asigned a value) and false otherwise */
11315
    public boolean isSetProvider() {
11316
      return this.provider != null;
11317
    }
11318
 
11319
    public void setProviderIsSet(boolean value) {
11320
      if (!value) {
11321
        this.provider = null;
11322
      }
11323
    }
11324
 
11325
    public void setFieldValue(_Fields field, Object value) {
11326
      switch (field) {
11327
      case TRANSACTION_ID:
11328
        if (value == null) {
11329
          unsetTransactionId();
11330
        } else {
11331
          setTransactionId((Long)value);
11332
        }
11333
        break;
11334
 
11335
      case SHIPPING_ID:
11336
        if (value == null) {
11337
          unsetShippingId();
11338
        } else {
11339
          setShippingId((Long)value);
11340
        }
11341
        break;
11342
 
11343
      case TRACKING_ID:
11344
        if (value == null) {
11345
          unsetTrackingId();
11346
        } else {
11347
          setTrackingId((String)value);
11348
        }
11349
        break;
11350
 
11351
      case AIRWAY_BILL_NO:
11352
        if (value == null) {
11353
          unsetAirwayBillNo();
11354
        } else {
11355
          setAirwayBillNo((String)value);
11356
        }
11357
        break;
11358
 
11359
      case PROVIDER:
11360
        if (value == null) {
11361
          unsetProvider();
11362
        } else {
11363
          setProvider((String)value);
11364
        }
11365
        break;
11366
 
11367
      }
11368
    }
11369
 
11370
    public void setFieldValue(int fieldID, Object value) {
11371
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11372
    }
11373
 
11374
    public Object getFieldValue(_Fields field) {
11375
      switch (field) {
11376
      case TRANSACTION_ID:
11377
        return new Long(getTransactionId());
11378
 
11379
      case SHIPPING_ID:
11380
        return new Long(getShippingId());
11381
 
11382
      case TRACKING_ID:
11383
        return getTrackingId();
11384
 
11385
      case AIRWAY_BILL_NO:
11386
        return getAirwayBillNo();
11387
 
11388
      case PROVIDER:
11389
        return getProvider();
11390
 
11391
      }
11392
      throw new IllegalStateException();
11393
    }
11394
 
11395
    public Object getFieldValue(int fieldId) {
11396
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11397
    }
11398
 
11399
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11400
    public boolean isSet(_Fields field) {
11401
      switch (field) {
11402
      case TRANSACTION_ID:
11403
        return isSetTransactionId();
11404
      case SHIPPING_ID:
11405
        return isSetShippingId();
11406
      case TRACKING_ID:
11407
        return isSetTrackingId();
11408
      case AIRWAY_BILL_NO:
11409
        return isSetAirwayBillNo();
11410
      case PROVIDER:
11411
        return isSetProvider();
11412
      }
11413
      throw new IllegalStateException();
11414
    }
11415
 
11416
    public boolean isSet(int fieldID) {
11417
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11418
    }
11419
 
11420
    @Override
11421
    public boolean equals(Object that) {
11422
      if (that == null)
11423
        return false;
11424
      if (that instanceof setShippingTracker_args)
11425
        return this.equals((setShippingTracker_args)that);
11426
      return false;
11427
    }
11428
 
11429
    public boolean equals(setShippingTracker_args that) {
11430
      if (that == null)
11431
        return false;
11432
 
11433
      boolean this_present_transactionId = true;
11434
      boolean that_present_transactionId = true;
11435
      if (this_present_transactionId || that_present_transactionId) {
11436
        if (!(this_present_transactionId && that_present_transactionId))
11437
          return false;
11438
        if (this.transactionId != that.transactionId)
11439
          return false;
11440
      }
11441
 
11442
      boolean this_present_shippingId = true;
11443
      boolean that_present_shippingId = true;
11444
      if (this_present_shippingId || that_present_shippingId) {
11445
        if (!(this_present_shippingId && that_present_shippingId))
11446
          return false;
11447
        if (this.shippingId != that.shippingId)
11448
          return false;
11449
      }
11450
 
11451
      boolean this_present_trackingId = true && this.isSetTrackingId();
11452
      boolean that_present_trackingId = true && that.isSetTrackingId();
11453
      if (this_present_trackingId || that_present_trackingId) {
11454
        if (!(this_present_trackingId && that_present_trackingId))
11455
          return false;
11456
        if (!this.trackingId.equals(that.trackingId))
11457
          return false;
11458
      }
11459
 
11460
      boolean this_present_airwayBillNo = true && this.isSetAirwayBillNo();
11461
      boolean that_present_airwayBillNo = true && that.isSetAirwayBillNo();
11462
      if (this_present_airwayBillNo || that_present_airwayBillNo) {
11463
        if (!(this_present_airwayBillNo && that_present_airwayBillNo))
11464
          return false;
11465
        if (!this.airwayBillNo.equals(that.airwayBillNo))
11466
          return false;
11467
      }
11468
 
11469
      boolean this_present_provider = true && this.isSetProvider();
11470
      boolean that_present_provider = true && that.isSetProvider();
11471
      if (this_present_provider || that_present_provider) {
11472
        if (!(this_present_provider && that_present_provider))
11473
          return false;
11474
        if (!this.provider.equals(that.provider))
11475
          return false;
11476
      }
11477
 
11478
      return true;
11479
    }
11480
 
11481
    @Override
11482
    public int hashCode() {
11483
      return 0;
11484
    }
11485
 
11486
    public int compareTo(setShippingTracker_args other) {
11487
      if (!getClass().equals(other.getClass())) {
11488
        return getClass().getName().compareTo(other.getClass().getName());
11489
      }
11490
 
11491
      int lastComparison = 0;
11492
      setShippingTracker_args typedOther = (setShippingTracker_args)other;
11493
 
11494
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
11495
      if (lastComparison != 0) {
11496
        return lastComparison;
11497
      }
11498
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
11499
      if (lastComparison != 0) {
11500
        return lastComparison;
11501
      }
11502
      lastComparison = Boolean.valueOf(isSetShippingId()).compareTo(isSetShippingId());
11503
      if (lastComparison != 0) {
11504
        return lastComparison;
11505
      }
11506
      lastComparison = TBaseHelper.compareTo(shippingId, typedOther.shippingId);
11507
      if (lastComparison != 0) {
11508
        return lastComparison;
11509
      }
11510
      lastComparison = Boolean.valueOf(isSetTrackingId()).compareTo(isSetTrackingId());
11511
      if (lastComparison != 0) {
11512
        return lastComparison;
11513
      }
11514
      lastComparison = TBaseHelper.compareTo(trackingId, typedOther.trackingId);
11515
      if (lastComparison != 0) {
11516
        return lastComparison;
11517
      }
11518
      lastComparison = Boolean.valueOf(isSetAirwayBillNo()).compareTo(isSetAirwayBillNo());
11519
      if (lastComparison != 0) {
11520
        return lastComparison;
11521
      }
11522
      lastComparison = TBaseHelper.compareTo(airwayBillNo, typedOther.airwayBillNo);
11523
      if (lastComparison != 0) {
11524
        return lastComparison;
11525
      }
11526
      lastComparison = Boolean.valueOf(isSetProvider()).compareTo(isSetProvider());
11527
      if (lastComparison != 0) {
11528
        return lastComparison;
11529
      }
11530
      lastComparison = TBaseHelper.compareTo(provider, typedOther.provider);
11531
      if (lastComparison != 0) {
11532
        return lastComparison;
11533
      }
11534
      return 0;
11535
    }
11536
 
11537
    public void read(TProtocol iprot) throws TException {
11538
      TField field;
11539
      iprot.readStructBegin();
11540
      while (true)
11541
      {
11542
        field = iprot.readFieldBegin();
11543
        if (field.type == TType.STOP) { 
11544
          break;
11545
        }
11546
        _Fields fieldId = _Fields.findByThriftId(field.id);
11547
        if (fieldId == null) {
11548
          TProtocolUtil.skip(iprot, field.type);
11549
        } else {
11550
          switch (fieldId) {
11551
            case TRANSACTION_ID:
11552
              if (field.type == TType.I64) {
11553
                this.transactionId = iprot.readI64();
11554
                setTransactionIdIsSet(true);
11555
              } else { 
11556
                TProtocolUtil.skip(iprot, field.type);
11557
              }
11558
              break;
11559
            case SHIPPING_ID:
11560
              if (field.type == TType.I64) {
11561
                this.shippingId = iprot.readI64();
11562
                setShippingIdIsSet(true);
11563
              } else { 
11564
                TProtocolUtil.skip(iprot, field.type);
11565
              }
11566
              break;
11567
            case TRACKING_ID:
11568
              if (field.type == TType.STRING) {
11569
                this.trackingId = iprot.readString();
11570
              } else { 
11571
                TProtocolUtil.skip(iprot, field.type);
11572
              }
11573
              break;
11574
            case AIRWAY_BILL_NO:
11575
              if (field.type == TType.STRING) {
11576
                this.airwayBillNo = iprot.readString();
11577
              } else { 
11578
                TProtocolUtil.skip(iprot, field.type);
11579
              }
11580
              break;
11581
            case PROVIDER:
11582
              if (field.type == TType.STRING) {
11583
                this.provider = iprot.readString();
11584
              } else { 
11585
                TProtocolUtil.skip(iprot, field.type);
11586
              }
11587
              break;
11588
          }
11589
          iprot.readFieldEnd();
11590
        }
11591
      }
11592
      iprot.readStructEnd();
11593
      validate();
11594
    }
11595
 
11596
    public void write(TProtocol oprot) throws TException {
11597
      validate();
11598
 
11599
      oprot.writeStructBegin(STRUCT_DESC);
11600
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
11601
      oprot.writeI64(this.transactionId);
11602
      oprot.writeFieldEnd();
11603
      oprot.writeFieldBegin(SHIPPING_ID_FIELD_DESC);
11604
      oprot.writeI64(this.shippingId);
11605
      oprot.writeFieldEnd();
11606
      if (this.trackingId != null) {
11607
        oprot.writeFieldBegin(TRACKING_ID_FIELD_DESC);
11608
        oprot.writeString(this.trackingId);
11609
        oprot.writeFieldEnd();
11610
      }
11611
      if (this.airwayBillNo != null) {
11612
        oprot.writeFieldBegin(AIRWAY_BILL_NO_FIELD_DESC);
11613
        oprot.writeString(this.airwayBillNo);
11614
        oprot.writeFieldEnd();
11615
      }
11616
      if (this.provider != null) {
11617
        oprot.writeFieldBegin(PROVIDER_FIELD_DESC);
11618
        oprot.writeString(this.provider);
11619
        oprot.writeFieldEnd();
11620
      }
11621
      oprot.writeFieldStop();
11622
      oprot.writeStructEnd();
11623
    }
11624
 
11625
    @Override
11626
    public String toString() {
11627
      StringBuilder sb = new StringBuilder("setShippingTracker_args(");
11628
      boolean first = true;
11629
 
11630
      sb.append("transactionId:");
11631
      sb.append(this.transactionId);
11632
      first = false;
11633
      if (!first) sb.append(", ");
11634
      sb.append("shippingId:");
11635
      sb.append(this.shippingId);
11636
      first = false;
11637
      if (!first) sb.append(", ");
11638
      sb.append("trackingId:");
11639
      if (this.trackingId == null) {
11640
        sb.append("null");
11641
      } else {
11642
        sb.append(this.trackingId);
11643
      }
11644
      first = false;
11645
      if (!first) sb.append(", ");
11646
      sb.append("airwayBillNo:");
11647
      if (this.airwayBillNo == null) {
11648
        sb.append("null");
11649
      } else {
11650
        sb.append(this.airwayBillNo);
11651
      }
11652
      first = false;
11653
      if (!first) sb.append(", ");
11654
      sb.append("provider:");
11655
      if (this.provider == null) {
11656
        sb.append("null");
11657
      } else {
11658
        sb.append(this.provider);
11659
      }
11660
      first = false;
11661
      sb.append(")");
11662
      return sb.toString();
11663
    }
11664
 
11665
    public void validate() throws TException {
11666
      // check for required fields
11667
    }
11668
 
11669
  }
11670
 
11671
  public static class setShippingTracker_result implements TBase<setShippingTracker_result._Fields>, java.io.Serializable, Cloneable, Comparable<setShippingTracker_result>   {
11672
    private static final TStruct STRUCT_DESC = new TStruct("setShippingTracker_result");
11673
 
11674
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11675
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11676
 
11677
    private boolean success;
11678
    private TransactionServiceException ex;
11679
 
11680
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11681
    public enum _Fields implements TFieldIdEnum {
11682
      SUCCESS((short)0, "success"),
11683
      EX((short)1, "ex");
11684
 
11685
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11686
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11687
 
11688
      static {
11689
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11690
          byId.put((int)field._thriftId, field);
11691
          byName.put(field.getFieldName(), field);
11692
        }
11693
      }
11694
 
11695
      /**
11696
       * Find the _Fields constant that matches fieldId, or null if its not found.
11697
       */
11698
      public static _Fields findByThriftId(int fieldId) {
11699
        return byId.get(fieldId);
11700
      }
11701
 
11702
      /**
11703
       * Find the _Fields constant that matches fieldId, throwing an exception
11704
       * if it is not found.
11705
       */
11706
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11707
        _Fields fields = findByThriftId(fieldId);
11708
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11709
        return fields;
11710
      }
11711
 
11712
      /**
11713
       * Find the _Fields constant that matches name, or null if its not found.
11714
       */
11715
      public static _Fields findByName(String name) {
11716
        return byName.get(name);
11717
      }
11718
 
11719
      private final short _thriftId;
11720
      private final String _fieldName;
11721
 
11722
      _Fields(short thriftId, String fieldName) {
11723
        _thriftId = thriftId;
11724
        _fieldName = fieldName;
11725
      }
11726
 
11727
      public short getThriftFieldId() {
11728
        return _thriftId;
11729
      }
11730
 
11731
      public String getFieldName() {
11732
        return _fieldName;
11733
      }
11734
    }
11735
 
11736
    // isset id assignments
11737
    private static final int __SUCCESS_ISSET_ID = 0;
11738
    private BitSet __isset_bit_vector = new BitSet(1);
11739
 
11740
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11741
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11742
          new FieldValueMetaData(TType.BOOL)));
11743
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11744
          new FieldValueMetaData(TType.STRUCT)));
11745
    }});
11746
 
11747
    static {
11748
      FieldMetaData.addStructMetaDataMap(setShippingTracker_result.class, metaDataMap);
11749
    }
11750
 
11751
    public setShippingTracker_result() {
11752
    }
11753
 
11754
    public setShippingTracker_result(
11755
      boolean success,
11756
      TransactionServiceException ex)
11757
    {
11758
      this();
11759
      this.success = success;
11760
      setSuccessIsSet(true);
11761
      this.ex = ex;
11762
    }
11763
 
11764
    /**
11765
     * Performs a deep copy on <i>other</i>.
11766
     */
11767
    public setShippingTracker_result(setShippingTracker_result other) {
11768
      __isset_bit_vector.clear();
11769
      __isset_bit_vector.or(other.__isset_bit_vector);
11770
      this.success = other.success;
11771
      if (other.isSetEx()) {
11772
        this.ex = new TransactionServiceException(other.ex);
11773
      }
11774
    }
11775
 
11776
    public setShippingTracker_result deepCopy() {
11777
      return new setShippingTracker_result(this);
11778
    }
11779
 
11780
    @Deprecated
11781
    public setShippingTracker_result clone() {
11782
      return new setShippingTracker_result(this);
11783
    }
11784
 
11785
    public boolean isSuccess() {
11786
      return this.success;
11787
    }
11788
 
11789
    public setShippingTracker_result setSuccess(boolean success) {
11790
      this.success = success;
11791
      setSuccessIsSet(true);
11792
      return this;
11793
    }
11794
 
11795
    public void unsetSuccess() {
11796
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11797
    }
11798
 
11799
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11800
    public boolean isSetSuccess() {
11801
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11802
    }
11803
 
11804
    public void setSuccessIsSet(boolean value) {
11805
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11806
    }
11807
 
11808
    public TransactionServiceException getEx() {
11809
      return this.ex;
11810
    }
11811
 
11812
    public setShippingTracker_result setEx(TransactionServiceException ex) {
11813
      this.ex = ex;
11814
      return this;
11815
    }
11816
 
11817
    public void unsetEx() {
11818
      this.ex = null;
11819
    }
11820
 
11821
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11822
    public boolean isSetEx() {
11823
      return this.ex != null;
11824
    }
11825
 
11826
    public void setExIsSet(boolean value) {
11827
      if (!value) {
11828
        this.ex = null;
11829
      }
11830
    }
11831
 
11832
    public void setFieldValue(_Fields field, Object value) {
11833
      switch (field) {
11834
      case SUCCESS:
11835
        if (value == null) {
11836
          unsetSuccess();
11837
        } else {
11838
          setSuccess((Boolean)value);
11839
        }
11840
        break;
11841
 
11842
      case EX:
11843
        if (value == null) {
11844
          unsetEx();
11845
        } else {
11846
          setEx((TransactionServiceException)value);
11847
        }
11848
        break;
11849
 
11850
      }
11851
    }
11852
 
11853
    public void setFieldValue(int fieldID, Object value) {
11854
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11855
    }
11856
 
11857
    public Object getFieldValue(_Fields field) {
11858
      switch (field) {
11859
      case SUCCESS:
11860
        return new Boolean(isSuccess());
11861
 
11862
      case EX:
11863
        return getEx();
11864
 
11865
      }
11866
      throw new IllegalStateException();
11867
    }
11868
 
11869
    public Object getFieldValue(int fieldId) {
11870
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11871
    }
11872
 
11873
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11874
    public boolean isSet(_Fields field) {
11875
      switch (field) {
11876
      case SUCCESS:
11877
        return isSetSuccess();
11878
      case EX:
11879
        return isSetEx();
11880
      }
11881
      throw new IllegalStateException();
11882
    }
11883
 
11884
    public boolean isSet(int fieldID) {
11885
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11886
    }
11887
 
11888
    @Override
11889
    public boolean equals(Object that) {
11890
      if (that == null)
11891
        return false;
11892
      if (that instanceof setShippingTracker_result)
11893
        return this.equals((setShippingTracker_result)that);
11894
      return false;
11895
    }
11896
 
11897
    public boolean equals(setShippingTracker_result that) {
11898
      if (that == null)
11899
        return false;
11900
 
11901
      boolean this_present_success = true;
11902
      boolean that_present_success = true;
11903
      if (this_present_success || that_present_success) {
11904
        if (!(this_present_success && that_present_success))
11905
          return false;
11906
        if (this.success != that.success)
11907
          return false;
11908
      }
11909
 
11910
      boolean this_present_ex = true && this.isSetEx();
11911
      boolean that_present_ex = true && that.isSetEx();
11912
      if (this_present_ex || that_present_ex) {
11913
        if (!(this_present_ex && that_present_ex))
11914
          return false;
11915
        if (!this.ex.equals(that.ex))
11916
          return false;
11917
      }
11918
 
11919
      return true;
11920
    }
11921
 
11922
    @Override
11923
    public int hashCode() {
11924
      return 0;
11925
    }
11926
 
11927
    public int compareTo(setShippingTracker_result other) {
11928
      if (!getClass().equals(other.getClass())) {
11929
        return getClass().getName().compareTo(other.getClass().getName());
11930
      }
11931
 
11932
      int lastComparison = 0;
11933
      setShippingTracker_result typedOther = (setShippingTracker_result)other;
11934
 
11935
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11936
      if (lastComparison != 0) {
11937
        return lastComparison;
11938
      }
11939
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11940
      if (lastComparison != 0) {
11941
        return lastComparison;
11942
      }
11943
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11944
      if (lastComparison != 0) {
11945
        return lastComparison;
11946
      }
11947
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11948
      if (lastComparison != 0) {
11949
        return lastComparison;
11950
      }
11951
      return 0;
11952
    }
11953
 
11954
    public void read(TProtocol iprot) throws TException {
11955
      TField field;
11956
      iprot.readStructBegin();
11957
      while (true)
11958
      {
11959
        field = iprot.readFieldBegin();
11960
        if (field.type == TType.STOP) { 
11961
          break;
11962
        }
11963
        _Fields fieldId = _Fields.findByThriftId(field.id);
11964
        if (fieldId == null) {
11965
          TProtocolUtil.skip(iprot, field.type);
11966
        } else {
11967
          switch (fieldId) {
11968
            case SUCCESS:
11969
              if (field.type == TType.BOOL) {
11970
                this.success = iprot.readBool();
11971
                setSuccessIsSet(true);
11972
              } else { 
11973
                TProtocolUtil.skip(iprot, field.type);
11974
              }
11975
              break;
11976
            case EX:
11977
              if (field.type == TType.STRUCT) {
11978
                this.ex = new TransactionServiceException();
11979
                this.ex.read(iprot);
11980
              } else { 
11981
                TProtocolUtil.skip(iprot, field.type);
11982
              }
11983
              break;
11984
          }
11985
          iprot.readFieldEnd();
11986
        }
11987
      }
11988
      iprot.readStructEnd();
11989
      validate();
11990
    }
11991
 
11992
    public void write(TProtocol oprot) throws TException {
11993
      oprot.writeStructBegin(STRUCT_DESC);
11994
 
11995
      if (this.isSetSuccess()) {
11996
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11997
        oprot.writeBool(this.success);
11998
        oprot.writeFieldEnd();
11999
      } else if (this.isSetEx()) {
12000
        oprot.writeFieldBegin(EX_FIELD_DESC);
12001
        this.ex.write(oprot);
12002
        oprot.writeFieldEnd();
12003
      }
12004
      oprot.writeFieldStop();
12005
      oprot.writeStructEnd();
12006
    }
12007
 
12008
    @Override
12009
    public String toString() {
12010
      StringBuilder sb = new StringBuilder("setShippingTracker_result(");
12011
      boolean first = true;
12012
 
12013
      sb.append("success:");
12014
      sb.append(this.success);
12015
      first = false;
12016
      if (!first) sb.append(", ");
12017
      sb.append("ex:");
12018
      if (this.ex == null) {
12019
        sb.append("null");
12020
      } else {
12021
        sb.append(this.ex);
12022
      }
12023
      first = false;
12024
      sb.append(")");
12025
      return sb.toString();
12026
    }
12027
 
12028
    public void validate() throws TException {
12029
      // check for required fields
12030
    }
12031
 
12032
  }
12033
 
12034
  public static class setShippingDate_args implements TBase<setShippingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<setShippingDate_args>   {
12035
    private static final TStruct STRUCT_DESC = new TStruct("setShippingDate_args");
12036
 
12037
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
12038
    private static final TField SHIPPING_ID_FIELD_DESC = new TField("shippingId", TType.I64, (short)2);
12039
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)3);
12040
 
12041
    private long transactionId;
12042
    private long shippingId;
12043
    private long timestamp;
12044
 
12045
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12046
    public enum _Fields implements TFieldIdEnum {
12047
      TRANSACTION_ID((short)1, "transactionId"),
12048
      SHIPPING_ID((short)2, "shippingId"),
12049
      TIMESTAMP((short)3, "timestamp");
12050
 
12051
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12052
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12053
 
12054
      static {
12055
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12056
          byId.put((int)field._thriftId, field);
12057
          byName.put(field.getFieldName(), field);
12058
        }
12059
      }
12060
 
12061
      /**
12062
       * Find the _Fields constant that matches fieldId, or null if its not found.
12063
       */
12064
      public static _Fields findByThriftId(int fieldId) {
12065
        return byId.get(fieldId);
12066
      }
12067
 
12068
      /**
12069
       * Find the _Fields constant that matches fieldId, throwing an exception
12070
       * if it is not found.
12071
       */
12072
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12073
        _Fields fields = findByThriftId(fieldId);
12074
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12075
        return fields;
12076
      }
12077
 
12078
      /**
12079
       * Find the _Fields constant that matches name, or null if its not found.
12080
       */
12081
      public static _Fields findByName(String name) {
12082
        return byName.get(name);
12083
      }
12084
 
12085
      private final short _thriftId;
12086
      private final String _fieldName;
12087
 
12088
      _Fields(short thriftId, String fieldName) {
12089
        _thriftId = thriftId;
12090
        _fieldName = fieldName;
12091
      }
12092
 
12093
      public short getThriftFieldId() {
12094
        return _thriftId;
12095
      }
12096
 
12097
      public String getFieldName() {
12098
        return _fieldName;
12099
      }
12100
    }
12101
 
12102
    // isset id assignments
12103
    private static final int __TRANSACTIONID_ISSET_ID = 0;
12104
    private static final int __SHIPPINGID_ISSET_ID = 1;
12105
    private static final int __TIMESTAMP_ISSET_ID = 2;
12106
    private BitSet __isset_bit_vector = new BitSet(3);
12107
 
12108
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12109
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
12110
          new FieldValueMetaData(TType.I64)));
12111
      put(_Fields.SHIPPING_ID, new FieldMetaData("shippingId", TFieldRequirementType.DEFAULT, 
12112
          new FieldValueMetaData(TType.I64)));
12113
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
12114
          new FieldValueMetaData(TType.I64)));
12115
    }});
12116
 
12117
    static {
12118
      FieldMetaData.addStructMetaDataMap(setShippingDate_args.class, metaDataMap);
12119
    }
12120
 
12121
    public setShippingDate_args() {
12122
    }
12123
 
12124
    public setShippingDate_args(
12125
      long transactionId,
12126
      long shippingId,
12127
      long timestamp)
12128
    {
12129
      this();
12130
      this.transactionId = transactionId;
12131
      setTransactionIdIsSet(true);
12132
      this.shippingId = shippingId;
12133
      setShippingIdIsSet(true);
12134
      this.timestamp = timestamp;
12135
      setTimestampIsSet(true);
12136
    }
12137
 
12138
    /**
12139
     * Performs a deep copy on <i>other</i>.
12140
     */
12141
    public setShippingDate_args(setShippingDate_args other) {
12142
      __isset_bit_vector.clear();
12143
      __isset_bit_vector.or(other.__isset_bit_vector);
12144
      this.transactionId = other.transactionId;
12145
      this.shippingId = other.shippingId;
12146
      this.timestamp = other.timestamp;
12147
    }
12148
 
12149
    public setShippingDate_args deepCopy() {
12150
      return new setShippingDate_args(this);
12151
    }
12152
 
12153
    @Deprecated
12154
    public setShippingDate_args clone() {
12155
      return new setShippingDate_args(this);
12156
    }
12157
 
12158
    public long getTransactionId() {
12159
      return this.transactionId;
12160
    }
12161
 
12162
    public setShippingDate_args setTransactionId(long transactionId) {
12163
      this.transactionId = transactionId;
12164
      setTransactionIdIsSet(true);
12165
      return this;
12166
    }
12167
 
12168
    public void unsetTransactionId() {
12169
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
12170
    }
12171
 
12172
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
12173
    public boolean isSetTransactionId() {
12174
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
12175
    }
12176
 
12177
    public void setTransactionIdIsSet(boolean value) {
12178
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
12179
    }
12180
 
12181
    public long getShippingId() {
12182
      return this.shippingId;
12183
    }
12184
 
12185
    public setShippingDate_args setShippingId(long shippingId) {
12186
      this.shippingId = shippingId;
12187
      setShippingIdIsSet(true);
12188
      return this;
12189
    }
12190
 
12191
    public void unsetShippingId() {
12192
      __isset_bit_vector.clear(__SHIPPINGID_ISSET_ID);
12193
    }
12194
 
12195
    /** Returns true if field shippingId is set (has been asigned a value) and false otherwise */
12196
    public boolean isSetShippingId() {
12197
      return __isset_bit_vector.get(__SHIPPINGID_ISSET_ID);
12198
    }
12199
 
12200
    public void setShippingIdIsSet(boolean value) {
12201
      __isset_bit_vector.set(__SHIPPINGID_ISSET_ID, value);
12202
    }
12203
 
12204
    public long getTimestamp() {
12205
      return this.timestamp;
12206
    }
12207
 
12208
    public setShippingDate_args setTimestamp(long timestamp) {
12209
      this.timestamp = timestamp;
12210
      setTimestampIsSet(true);
12211
      return this;
12212
    }
12213
 
12214
    public void unsetTimestamp() {
12215
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
12216
    }
12217
 
12218
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
12219
    public boolean isSetTimestamp() {
12220
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
12221
    }
12222
 
12223
    public void setTimestampIsSet(boolean value) {
12224
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
12225
    }
12226
 
12227
    public void setFieldValue(_Fields field, Object value) {
12228
      switch (field) {
12229
      case TRANSACTION_ID:
12230
        if (value == null) {
12231
          unsetTransactionId();
12232
        } else {
12233
          setTransactionId((Long)value);
12234
        }
12235
        break;
12236
 
12237
      case SHIPPING_ID:
12238
        if (value == null) {
12239
          unsetShippingId();
12240
        } else {
12241
          setShippingId((Long)value);
12242
        }
12243
        break;
12244
 
12245
      case TIMESTAMP:
12246
        if (value == null) {
12247
          unsetTimestamp();
12248
        } else {
12249
          setTimestamp((Long)value);
12250
        }
12251
        break;
12252
 
12253
      }
12254
    }
12255
 
12256
    public void setFieldValue(int fieldID, Object value) {
12257
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12258
    }
12259
 
12260
    public Object getFieldValue(_Fields field) {
12261
      switch (field) {
12262
      case TRANSACTION_ID:
12263
        return new Long(getTransactionId());
12264
 
12265
      case SHIPPING_ID:
12266
        return new Long(getShippingId());
12267
 
12268
      case TIMESTAMP:
12269
        return new Long(getTimestamp());
12270
 
12271
      }
12272
      throw new IllegalStateException();
12273
    }
12274
 
12275
    public Object getFieldValue(int fieldId) {
12276
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12277
    }
12278
 
12279
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12280
    public boolean isSet(_Fields field) {
12281
      switch (field) {
12282
      case TRANSACTION_ID:
12283
        return isSetTransactionId();
12284
      case SHIPPING_ID:
12285
        return isSetShippingId();
12286
      case TIMESTAMP:
12287
        return isSetTimestamp();
12288
      }
12289
      throw new IllegalStateException();
12290
    }
12291
 
12292
    public boolean isSet(int fieldID) {
12293
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12294
    }
12295
 
12296
    @Override
12297
    public boolean equals(Object that) {
12298
      if (that == null)
12299
        return false;
12300
      if (that instanceof setShippingDate_args)
12301
        return this.equals((setShippingDate_args)that);
12302
      return false;
12303
    }
12304
 
12305
    public boolean equals(setShippingDate_args that) {
12306
      if (that == null)
12307
        return false;
12308
 
12309
      boolean this_present_transactionId = true;
12310
      boolean that_present_transactionId = true;
12311
      if (this_present_transactionId || that_present_transactionId) {
12312
        if (!(this_present_transactionId && that_present_transactionId))
12313
          return false;
12314
        if (this.transactionId != that.transactionId)
12315
          return false;
12316
      }
12317
 
12318
      boolean this_present_shippingId = true;
12319
      boolean that_present_shippingId = true;
12320
      if (this_present_shippingId || that_present_shippingId) {
12321
        if (!(this_present_shippingId && that_present_shippingId))
12322
          return false;
12323
        if (this.shippingId != that.shippingId)
12324
          return false;
12325
      }
12326
 
12327
      boolean this_present_timestamp = true;
12328
      boolean that_present_timestamp = true;
12329
      if (this_present_timestamp || that_present_timestamp) {
12330
        if (!(this_present_timestamp && that_present_timestamp))
12331
          return false;
12332
        if (this.timestamp != that.timestamp)
12333
          return false;
12334
      }
12335
 
12336
      return true;
12337
    }
12338
 
12339
    @Override
12340
    public int hashCode() {
12341
      return 0;
12342
    }
12343
 
12344
    public int compareTo(setShippingDate_args other) {
12345
      if (!getClass().equals(other.getClass())) {
12346
        return getClass().getName().compareTo(other.getClass().getName());
12347
      }
12348
 
12349
      int lastComparison = 0;
12350
      setShippingDate_args typedOther = (setShippingDate_args)other;
12351
 
12352
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
12353
      if (lastComparison != 0) {
12354
        return lastComparison;
12355
      }
12356
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
12357
      if (lastComparison != 0) {
12358
        return lastComparison;
12359
      }
12360
      lastComparison = Boolean.valueOf(isSetShippingId()).compareTo(isSetShippingId());
12361
      if (lastComparison != 0) {
12362
        return lastComparison;
12363
      }
12364
      lastComparison = TBaseHelper.compareTo(shippingId, typedOther.shippingId);
12365
      if (lastComparison != 0) {
12366
        return lastComparison;
12367
      }
12368
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
12369
      if (lastComparison != 0) {
12370
        return lastComparison;
12371
      }
12372
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
12373
      if (lastComparison != 0) {
12374
        return lastComparison;
12375
      }
12376
      return 0;
12377
    }
12378
 
12379
    public void read(TProtocol iprot) throws TException {
12380
      TField field;
12381
      iprot.readStructBegin();
12382
      while (true)
12383
      {
12384
        field = iprot.readFieldBegin();
12385
        if (field.type == TType.STOP) { 
12386
          break;
12387
        }
12388
        _Fields fieldId = _Fields.findByThriftId(field.id);
12389
        if (fieldId == null) {
12390
          TProtocolUtil.skip(iprot, field.type);
12391
        } else {
12392
          switch (fieldId) {
12393
            case TRANSACTION_ID:
12394
              if (field.type == TType.I64) {
12395
                this.transactionId = iprot.readI64();
12396
                setTransactionIdIsSet(true);
12397
              } else { 
12398
                TProtocolUtil.skip(iprot, field.type);
12399
              }
12400
              break;
12401
            case SHIPPING_ID:
12402
              if (field.type == TType.I64) {
12403
                this.shippingId = iprot.readI64();
12404
                setShippingIdIsSet(true);
12405
              } else { 
12406
                TProtocolUtil.skip(iprot, field.type);
12407
              }
12408
              break;
12409
            case TIMESTAMP:
12410
              if (field.type == TType.I64) {
12411
                this.timestamp = iprot.readI64();
12412
                setTimestampIsSet(true);
12413
              } else { 
12414
                TProtocolUtil.skip(iprot, field.type);
12415
              }
12416
              break;
12417
          }
12418
          iprot.readFieldEnd();
12419
        }
12420
      }
12421
      iprot.readStructEnd();
12422
      validate();
12423
    }
12424
 
12425
    public void write(TProtocol oprot) throws TException {
12426
      validate();
12427
 
12428
      oprot.writeStructBegin(STRUCT_DESC);
12429
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
12430
      oprot.writeI64(this.transactionId);
12431
      oprot.writeFieldEnd();
12432
      oprot.writeFieldBegin(SHIPPING_ID_FIELD_DESC);
12433
      oprot.writeI64(this.shippingId);
12434
      oprot.writeFieldEnd();
12435
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
12436
      oprot.writeI64(this.timestamp);
12437
      oprot.writeFieldEnd();
12438
      oprot.writeFieldStop();
12439
      oprot.writeStructEnd();
12440
    }
12441
 
12442
    @Override
12443
    public String toString() {
12444
      StringBuilder sb = new StringBuilder("setShippingDate_args(");
12445
      boolean first = true;
12446
 
12447
      sb.append("transactionId:");
12448
      sb.append(this.transactionId);
12449
      first = false;
12450
      if (!first) sb.append(", ");
12451
      sb.append("shippingId:");
12452
      sb.append(this.shippingId);
12453
      first = false;
12454
      if (!first) sb.append(", ");
12455
      sb.append("timestamp:");
12456
      sb.append(this.timestamp);
12457
      first = false;
12458
      sb.append(")");
12459
      return sb.toString();
12460
    }
12461
 
12462
    public void validate() throws TException {
12463
      // check for required fields
12464
    }
12465
 
12466
  }
12467
 
12468
  public static class setShippingDate_result implements TBase<setShippingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<setShippingDate_result>   {
12469
    private static final TStruct STRUCT_DESC = new TStruct("setShippingDate_result");
12470
 
12471
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12472
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12473
 
12474
    private boolean success;
12475
    private TransactionServiceException ex;
12476
 
12477
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12478
    public enum _Fields implements TFieldIdEnum {
12479
      SUCCESS((short)0, "success"),
12480
      EX((short)1, "ex");
12481
 
12482
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12483
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12484
 
12485
      static {
12486
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12487
          byId.put((int)field._thriftId, field);
12488
          byName.put(field.getFieldName(), field);
12489
        }
12490
      }
12491
 
12492
      /**
12493
       * Find the _Fields constant that matches fieldId, or null if its not found.
12494
       */
12495
      public static _Fields findByThriftId(int fieldId) {
12496
        return byId.get(fieldId);
12497
      }
12498
 
12499
      /**
12500
       * Find the _Fields constant that matches fieldId, throwing an exception
12501
       * if it is not found.
12502
       */
12503
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12504
        _Fields fields = findByThriftId(fieldId);
12505
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12506
        return fields;
12507
      }
12508
 
12509
      /**
12510
       * Find the _Fields constant that matches name, or null if its not found.
12511
       */
12512
      public static _Fields findByName(String name) {
12513
        return byName.get(name);
12514
      }
12515
 
12516
      private final short _thriftId;
12517
      private final String _fieldName;
12518
 
12519
      _Fields(short thriftId, String fieldName) {
12520
        _thriftId = thriftId;
12521
        _fieldName = fieldName;
12522
      }
12523
 
12524
      public short getThriftFieldId() {
12525
        return _thriftId;
12526
      }
12527
 
12528
      public String getFieldName() {
12529
        return _fieldName;
12530
      }
12531
    }
12532
 
12533
    // isset id assignments
12534
    private static final int __SUCCESS_ISSET_ID = 0;
12535
    private BitSet __isset_bit_vector = new BitSet(1);
12536
 
12537
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12538
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12539
          new FieldValueMetaData(TType.BOOL)));
12540
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12541
          new FieldValueMetaData(TType.STRUCT)));
12542
    }});
12543
 
12544
    static {
12545
      FieldMetaData.addStructMetaDataMap(setShippingDate_result.class, metaDataMap);
12546
    }
12547
 
12548
    public setShippingDate_result() {
12549
    }
12550
 
12551
    public setShippingDate_result(
12552
      boolean success,
12553
      TransactionServiceException ex)
12554
    {
12555
      this();
12556
      this.success = success;
12557
      setSuccessIsSet(true);
12558
      this.ex = ex;
12559
    }
12560
 
12561
    /**
12562
     * Performs a deep copy on <i>other</i>.
12563
     */
12564
    public setShippingDate_result(setShippingDate_result other) {
12565
      __isset_bit_vector.clear();
12566
      __isset_bit_vector.or(other.__isset_bit_vector);
12567
      this.success = other.success;
12568
      if (other.isSetEx()) {
12569
        this.ex = new TransactionServiceException(other.ex);
12570
      }
12571
    }
12572
 
12573
    public setShippingDate_result deepCopy() {
12574
      return new setShippingDate_result(this);
12575
    }
12576
 
12577
    @Deprecated
12578
    public setShippingDate_result clone() {
12579
      return new setShippingDate_result(this);
12580
    }
12581
 
12582
    public boolean isSuccess() {
12583
      return this.success;
12584
    }
12585
 
12586
    public setShippingDate_result setSuccess(boolean success) {
12587
      this.success = success;
12588
      setSuccessIsSet(true);
12589
      return this;
12590
    }
12591
 
12592
    public void unsetSuccess() {
12593
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12594
    }
12595
 
12596
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12597
    public boolean isSetSuccess() {
12598
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12599
    }
12600
 
12601
    public void setSuccessIsSet(boolean value) {
12602
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12603
    }
12604
 
12605
    public TransactionServiceException getEx() {
12606
      return this.ex;
12607
    }
12608
 
12609
    public setShippingDate_result setEx(TransactionServiceException ex) {
12610
      this.ex = ex;
12611
      return this;
12612
    }
12613
 
12614
    public void unsetEx() {
12615
      this.ex = null;
12616
    }
12617
 
12618
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12619
    public boolean isSetEx() {
12620
      return this.ex != null;
12621
    }
12622
 
12623
    public void setExIsSet(boolean value) {
12624
      if (!value) {
12625
        this.ex = null;
12626
      }
12627
    }
12628
 
12629
    public void setFieldValue(_Fields field, Object value) {
12630
      switch (field) {
12631
      case SUCCESS:
12632
        if (value == null) {
12633
          unsetSuccess();
12634
        } else {
12635
          setSuccess((Boolean)value);
12636
        }
12637
        break;
12638
 
12639
      case EX:
12640
        if (value == null) {
12641
          unsetEx();
12642
        } else {
12643
          setEx((TransactionServiceException)value);
12644
        }
12645
        break;
12646
 
12647
      }
12648
    }
12649
 
12650
    public void setFieldValue(int fieldID, Object value) {
12651
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12652
    }
12653
 
12654
    public Object getFieldValue(_Fields field) {
12655
      switch (field) {
12656
      case SUCCESS:
12657
        return new Boolean(isSuccess());
12658
 
12659
      case EX:
12660
        return getEx();
12661
 
12662
      }
12663
      throw new IllegalStateException();
12664
    }
12665
 
12666
    public Object getFieldValue(int fieldId) {
12667
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12668
    }
12669
 
12670
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12671
    public boolean isSet(_Fields field) {
12672
      switch (field) {
12673
      case SUCCESS:
12674
        return isSetSuccess();
12675
      case EX:
12676
        return isSetEx();
12677
      }
12678
      throw new IllegalStateException();
12679
    }
12680
 
12681
    public boolean isSet(int fieldID) {
12682
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12683
    }
12684
 
12685
    @Override
12686
    public boolean equals(Object that) {
12687
      if (that == null)
12688
        return false;
12689
      if (that instanceof setShippingDate_result)
12690
        return this.equals((setShippingDate_result)that);
12691
      return false;
12692
    }
12693
 
12694
    public boolean equals(setShippingDate_result that) {
12695
      if (that == null)
12696
        return false;
12697
 
12698
      boolean this_present_success = true;
12699
      boolean that_present_success = true;
12700
      if (this_present_success || that_present_success) {
12701
        if (!(this_present_success && that_present_success))
12702
          return false;
12703
        if (this.success != that.success)
12704
          return false;
12705
      }
12706
 
12707
      boolean this_present_ex = true && this.isSetEx();
12708
      boolean that_present_ex = true && that.isSetEx();
12709
      if (this_present_ex || that_present_ex) {
12710
        if (!(this_present_ex && that_present_ex))
12711
          return false;
12712
        if (!this.ex.equals(that.ex))
12713
          return false;
12714
      }
12715
 
12716
      return true;
12717
    }
12718
 
12719
    @Override
12720
    public int hashCode() {
12721
      return 0;
12722
    }
12723
 
12724
    public int compareTo(setShippingDate_result other) {
12725
      if (!getClass().equals(other.getClass())) {
12726
        return getClass().getName().compareTo(other.getClass().getName());
12727
      }
12728
 
12729
      int lastComparison = 0;
12730
      setShippingDate_result typedOther = (setShippingDate_result)other;
12731
 
12732
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12733
      if (lastComparison != 0) {
12734
        return lastComparison;
12735
      }
12736
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12737
      if (lastComparison != 0) {
12738
        return lastComparison;
12739
      }
12740
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12741
      if (lastComparison != 0) {
12742
        return lastComparison;
12743
      }
12744
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12745
      if (lastComparison != 0) {
12746
        return lastComparison;
12747
      }
12748
      return 0;
12749
    }
12750
 
12751
    public void read(TProtocol iprot) throws TException {
12752
      TField field;
12753
      iprot.readStructBegin();
12754
      while (true)
12755
      {
12756
        field = iprot.readFieldBegin();
12757
        if (field.type == TType.STOP) { 
12758
          break;
12759
        }
12760
        _Fields fieldId = _Fields.findByThriftId(field.id);
12761
        if (fieldId == null) {
12762
          TProtocolUtil.skip(iprot, field.type);
12763
        } else {
12764
          switch (fieldId) {
12765
            case SUCCESS:
12766
              if (field.type == TType.BOOL) {
12767
                this.success = iprot.readBool();
12768
                setSuccessIsSet(true);
12769
              } else { 
12770
                TProtocolUtil.skip(iprot, field.type);
12771
              }
12772
              break;
12773
            case EX:
12774
              if (field.type == TType.STRUCT) {
12775
                this.ex = new TransactionServiceException();
12776
                this.ex.read(iprot);
12777
              } else { 
12778
                TProtocolUtil.skip(iprot, field.type);
12779
              }
12780
              break;
12781
          }
12782
          iprot.readFieldEnd();
12783
        }
12784
      }
12785
      iprot.readStructEnd();
12786
      validate();
12787
    }
12788
 
12789
    public void write(TProtocol oprot) throws TException {
12790
      oprot.writeStructBegin(STRUCT_DESC);
12791
 
12792
      if (this.isSetSuccess()) {
12793
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12794
        oprot.writeBool(this.success);
12795
        oprot.writeFieldEnd();
12796
      } else if (this.isSetEx()) {
12797
        oprot.writeFieldBegin(EX_FIELD_DESC);
12798
        this.ex.write(oprot);
12799
        oprot.writeFieldEnd();
12800
      }
12801
      oprot.writeFieldStop();
12802
      oprot.writeStructEnd();
12803
    }
12804
 
12805
    @Override
12806
    public String toString() {
12807
      StringBuilder sb = new StringBuilder("setShippingDate_result(");
12808
      boolean first = true;
12809
 
12810
      sb.append("success:");
12811
      sb.append(this.success);
12812
      first = false;
12813
      if (!first) sb.append(", ");
12814
      sb.append("ex:");
12815
      if (this.ex == null) {
12816
        sb.append("null");
12817
      } else {
12818
        sb.append(this.ex);
12819
      }
12820
      first = false;
12821
      sb.append(")");
12822
      return sb.toString();
12823
    }
12824
 
12825
    public void validate() throws TException {
12826
      // check for required fields
12827
    }
12828
 
12829
  }
12830
 
12831
  public static class setDeliveryDate_args implements TBase<setDeliveryDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<setDeliveryDate_args>   {
12832
    private static final TStruct STRUCT_DESC = new TStruct("setDeliveryDate_args");
12833
 
12834
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
12835
    private static final TField SHIPPINGID_FIELD_DESC = new TField("shippingid", TType.I64, (short)2);
12836
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)3);
12837
 
12838
    private long transactionId;
12839
    private long shippingid;
12840
    private long timestamp;
12841
 
12842
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12843
    public enum _Fields implements TFieldIdEnum {
12844
      TRANSACTION_ID((short)1, "transactionId"),
12845
      SHIPPINGID((short)2, "shippingid"),
12846
      TIMESTAMP((short)3, "timestamp");
12847
 
12848
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12849
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12850
 
12851
      static {
12852
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12853
          byId.put((int)field._thriftId, field);
12854
          byName.put(field.getFieldName(), field);
12855
        }
12856
      }
12857
 
12858
      /**
12859
       * Find the _Fields constant that matches fieldId, or null if its not found.
12860
       */
12861
      public static _Fields findByThriftId(int fieldId) {
12862
        return byId.get(fieldId);
12863
      }
12864
 
12865
      /**
12866
       * Find the _Fields constant that matches fieldId, throwing an exception
12867
       * if it is not found.
12868
       */
12869
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12870
        _Fields fields = findByThriftId(fieldId);
12871
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12872
        return fields;
12873
      }
12874
 
12875
      /**
12876
       * Find the _Fields constant that matches name, or null if its not found.
12877
       */
12878
      public static _Fields findByName(String name) {
12879
        return byName.get(name);
12880
      }
12881
 
12882
      private final short _thriftId;
12883
      private final String _fieldName;
12884
 
12885
      _Fields(short thriftId, String fieldName) {
12886
        _thriftId = thriftId;
12887
        _fieldName = fieldName;
12888
      }
12889
 
12890
      public short getThriftFieldId() {
12891
        return _thriftId;
12892
      }
12893
 
12894
      public String getFieldName() {
12895
        return _fieldName;
12896
      }
12897
    }
12898
 
12899
    // isset id assignments
12900
    private static final int __TRANSACTIONID_ISSET_ID = 0;
12901
    private static final int __SHIPPINGID_ISSET_ID = 1;
12902
    private static final int __TIMESTAMP_ISSET_ID = 2;
12903
    private BitSet __isset_bit_vector = new BitSet(3);
12904
 
12905
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12906
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
12907
          new FieldValueMetaData(TType.I64)));
12908
      put(_Fields.SHIPPINGID, new FieldMetaData("shippingid", TFieldRequirementType.DEFAULT, 
12909
          new FieldValueMetaData(TType.I64)));
12910
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
12911
          new FieldValueMetaData(TType.I64)));
12912
    }});
12913
 
12914
    static {
12915
      FieldMetaData.addStructMetaDataMap(setDeliveryDate_args.class, metaDataMap);
12916
    }
12917
 
12918
    public setDeliveryDate_args() {
12919
    }
12920
 
12921
    public setDeliveryDate_args(
12922
      long transactionId,
12923
      long shippingid,
12924
      long timestamp)
12925
    {
12926
      this();
12927
      this.transactionId = transactionId;
12928
      setTransactionIdIsSet(true);
12929
      this.shippingid = shippingid;
12930
      setShippingidIsSet(true);
12931
      this.timestamp = timestamp;
12932
      setTimestampIsSet(true);
12933
    }
12934
 
12935
    /**
12936
     * Performs a deep copy on <i>other</i>.
12937
     */
12938
    public setDeliveryDate_args(setDeliveryDate_args other) {
12939
      __isset_bit_vector.clear();
12940
      __isset_bit_vector.or(other.__isset_bit_vector);
12941
      this.transactionId = other.transactionId;
12942
      this.shippingid = other.shippingid;
12943
      this.timestamp = other.timestamp;
12944
    }
12945
 
12946
    public setDeliveryDate_args deepCopy() {
12947
      return new setDeliveryDate_args(this);
12948
    }
12949
 
12950
    @Deprecated
12951
    public setDeliveryDate_args clone() {
12952
      return new setDeliveryDate_args(this);
12953
    }
12954
 
12955
    public long getTransactionId() {
12956
      return this.transactionId;
12957
    }
12958
 
12959
    public setDeliveryDate_args setTransactionId(long transactionId) {
12960
      this.transactionId = transactionId;
12961
      setTransactionIdIsSet(true);
12962
      return this;
12963
    }
12964
 
12965
    public void unsetTransactionId() {
12966
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
12967
    }
12968
 
12969
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
12970
    public boolean isSetTransactionId() {
12971
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
12972
    }
12973
 
12974
    public void setTransactionIdIsSet(boolean value) {
12975
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
12976
    }
12977
 
12978
    public long getShippingid() {
12979
      return this.shippingid;
12980
    }
12981
 
12982
    public setDeliveryDate_args setShippingid(long shippingid) {
12983
      this.shippingid = shippingid;
12984
      setShippingidIsSet(true);
12985
      return this;
12986
    }
12987
 
12988
    public void unsetShippingid() {
12989
      __isset_bit_vector.clear(__SHIPPINGID_ISSET_ID);
12990
    }
12991
 
12992
    /** Returns true if field shippingid is set (has been asigned a value) and false otherwise */
12993
    public boolean isSetShippingid() {
12994
      return __isset_bit_vector.get(__SHIPPINGID_ISSET_ID);
12995
    }
12996
 
12997
    public void setShippingidIsSet(boolean value) {
12998
      __isset_bit_vector.set(__SHIPPINGID_ISSET_ID, value);
12999
    }
13000
 
13001
    public long getTimestamp() {
13002
      return this.timestamp;
13003
    }
13004
 
13005
    public setDeliveryDate_args setTimestamp(long timestamp) {
13006
      this.timestamp = timestamp;
13007
      setTimestampIsSet(true);
13008
      return this;
13009
    }
13010
 
13011
    public void unsetTimestamp() {
13012
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
13013
    }
13014
 
13015
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
13016
    public boolean isSetTimestamp() {
13017
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
13018
    }
13019
 
13020
    public void setTimestampIsSet(boolean value) {
13021
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
13022
    }
13023
 
13024
    public void setFieldValue(_Fields field, Object value) {
13025
      switch (field) {
13026
      case TRANSACTION_ID:
13027
        if (value == null) {
13028
          unsetTransactionId();
13029
        } else {
13030
          setTransactionId((Long)value);
13031
        }
13032
        break;
13033
 
13034
      case SHIPPINGID:
13035
        if (value == null) {
13036
          unsetShippingid();
13037
        } else {
13038
          setShippingid((Long)value);
13039
        }
13040
        break;
13041
 
13042
      case TIMESTAMP:
13043
        if (value == null) {
13044
          unsetTimestamp();
13045
        } else {
13046
          setTimestamp((Long)value);
13047
        }
13048
        break;
13049
 
13050
      }
13051
    }
13052
 
13053
    public void setFieldValue(int fieldID, Object value) {
13054
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13055
    }
13056
 
13057
    public Object getFieldValue(_Fields field) {
13058
      switch (field) {
13059
      case TRANSACTION_ID:
13060
        return new Long(getTransactionId());
13061
 
13062
      case SHIPPINGID:
13063
        return new Long(getShippingid());
13064
 
13065
      case TIMESTAMP:
13066
        return new Long(getTimestamp());
13067
 
13068
      }
13069
      throw new IllegalStateException();
13070
    }
13071
 
13072
    public Object getFieldValue(int fieldId) {
13073
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13074
    }
13075
 
13076
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13077
    public boolean isSet(_Fields field) {
13078
      switch (field) {
13079
      case TRANSACTION_ID:
13080
        return isSetTransactionId();
13081
      case SHIPPINGID:
13082
        return isSetShippingid();
13083
      case TIMESTAMP:
13084
        return isSetTimestamp();
13085
      }
13086
      throw new IllegalStateException();
13087
    }
13088
 
13089
    public boolean isSet(int fieldID) {
13090
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13091
    }
13092
 
13093
    @Override
13094
    public boolean equals(Object that) {
13095
      if (that == null)
13096
        return false;
13097
      if (that instanceof setDeliveryDate_args)
13098
        return this.equals((setDeliveryDate_args)that);
13099
      return false;
13100
    }
13101
 
13102
    public boolean equals(setDeliveryDate_args that) {
13103
      if (that == null)
13104
        return false;
13105
 
13106
      boolean this_present_transactionId = true;
13107
      boolean that_present_transactionId = true;
13108
      if (this_present_transactionId || that_present_transactionId) {
13109
        if (!(this_present_transactionId && that_present_transactionId))
13110
          return false;
13111
        if (this.transactionId != that.transactionId)
13112
          return false;
13113
      }
13114
 
13115
      boolean this_present_shippingid = true;
13116
      boolean that_present_shippingid = true;
13117
      if (this_present_shippingid || that_present_shippingid) {
13118
        if (!(this_present_shippingid && that_present_shippingid))
13119
          return false;
13120
        if (this.shippingid != that.shippingid)
13121
          return false;
13122
      }
13123
 
13124
      boolean this_present_timestamp = true;
13125
      boolean that_present_timestamp = true;
13126
      if (this_present_timestamp || that_present_timestamp) {
13127
        if (!(this_present_timestamp && that_present_timestamp))
13128
          return false;
13129
        if (this.timestamp != that.timestamp)
13130
          return false;
13131
      }
13132
 
13133
      return true;
13134
    }
13135
 
13136
    @Override
13137
    public int hashCode() {
13138
      return 0;
13139
    }
13140
 
13141
    public int compareTo(setDeliveryDate_args other) {
13142
      if (!getClass().equals(other.getClass())) {
13143
        return getClass().getName().compareTo(other.getClass().getName());
13144
      }
13145
 
13146
      int lastComparison = 0;
13147
      setDeliveryDate_args typedOther = (setDeliveryDate_args)other;
13148
 
13149
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
13150
      if (lastComparison != 0) {
13151
        return lastComparison;
13152
      }
13153
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
13154
      if (lastComparison != 0) {
13155
        return lastComparison;
13156
      }
13157
      lastComparison = Boolean.valueOf(isSetShippingid()).compareTo(isSetShippingid());
13158
      if (lastComparison != 0) {
13159
        return lastComparison;
13160
      }
13161
      lastComparison = TBaseHelper.compareTo(shippingid, typedOther.shippingid);
13162
      if (lastComparison != 0) {
13163
        return lastComparison;
13164
      }
13165
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
13166
      if (lastComparison != 0) {
13167
        return lastComparison;
13168
      }
13169
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
13170
      if (lastComparison != 0) {
13171
        return lastComparison;
13172
      }
13173
      return 0;
13174
    }
13175
 
13176
    public void read(TProtocol iprot) throws TException {
13177
      TField field;
13178
      iprot.readStructBegin();
13179
      while (true)
13180
      {
13181
        field = iprot.readFieldBegin();
13182
        if (field.type == TType.STOP) { 
13183
          break;
13184
        }
13185
        _Fields fieldId = _Fields.findByThriftId(field.id);
13186
        if (fieldId == null) {
13187
          TProtocolUtil.skip(iprot, field.type);
13188
        } else {
13189
          switch (fieldId) {
13190
            case TRANSACTION_ID:
13191
              if (field.type == TType.I64) {
13192
                this.transactionId = iprot.readI64();
13193
                setTransactionIdIsSet(true);
13194
              } else { 
13195
                TProtocolUtil.skip(iprot, field.type);
13196
              }
13197
              break;
13198
            case SHIPPINGID:
13199
              if (field.type == TType.I64) {
13200
                this.shippingid = iprot.readI64();
13201
                setShippingidIsSet(true);
13202
              } else { 
13203
                TProtocolUtil.skip(iprot, field.type);
13204
              }
13205
              break;
13206
            case TIMESTAMP:
13207
              if (field.type == TType.I64) {
13208
                this.timestamp = iprot.readI64();
13209
                setTimestampIsSet(true);
13210
              } else { 
13211
                TProtocolUtil.skip(iprot, field.type);
13212
              }
13213
              break;
13214
          }
13215
          iprot.readFieldEnd();
13216
        }
13217
      }
13218
      iprot.readStructEnd();
13219
      validate();
13220
    }
13221
 
13222
    public void write(TProtocol oprot) throws TException {
13223
      validate();
13224
 
13225
      oprot.writeStructBegin(STRUCT_DESC);
13226
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
13227
      oprot.writeI64(this.transactionId);
13228
      oprot.writeFieldEnd();
13229
      oprot.writeFieldBegin(SHIPPINGID_FIELD_DESC);
13230
      oprot.writeI64(this.shippingid);
13231
      oprot.writeFieldEnd();
13232
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
13233
      oprot.writeI64(this.timestamp);
13234
      oprot.writeFieldEnd();
13235
      oprot.writeFieldStop();
13236
      oprot.writeStructEnd();
13237
    }
13238
 
13239
    @Override
13240
    public String toString() {
13241
      StringBuilder sb = new StringBuilder("setDeliveryDate_args(");
13242
      boolean first = true;
13243
 
13244
      sb.append("transactionId:");
13245
      sb.append(this.transactionId);
13246
      first = false;
13247
      if (!first) sb.append(", ");
13248
      sb.append("shippingid:");
13249
      sb.append(this.shippingid);
13250
      first = false;
13251
      if (!first) sb.append(", ");
13252
      sb.append("timestamp:");
13253
      sb.append(this.timestamp);
13254
      first = false;
13255
      sb.append(")");
13256
      return sb.toString();
13257
    }
13258
 
13259
    public void validate() throws TException {
13260
      // check for required fields
13261
    }
13262
 
13263
  }
13264
 
13265
  public static class setDeliveryDate_result implements TBase<setDeliveryDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<setDeliveryDate_result>   {
13266
    private static final TStruct STRUCT_DESC = new TStruct("setDeliveryDate_result");
13267
 
13268
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13269
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13270
 
13271
    private boolean success;
13272
    private TransactionServiceException ex;
13273
 
13274
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13275
    public enum _Fields implements TFieldIdEnum {
13276
      SUCCESS((short)0, "success"),
13277
      EX((short)1, "ex");
13278
 
13279
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13280
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13281
 
13282
      static {
13283
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13284
          byId.put((int)field._thriftId, field);
13285
          byName.put(field.getFieldName(), field);
13286
        }
13287
      }
13288
 
13289
      /**
13290
       * Find the _Fields constant that matches fieldId, or null if its not found.
13291
       */
13292
      public static _Fields findByThriftId(int fieldId) {
13293
        return byId.get(fieldId);
13294
      }
13295
 
13296
      /**
13297
       * Find the _Fields constant that matches fieldId, throwing an exception
13298
       * if it is not found.
13299
       */
13300
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13301
        _Fields fields = findByThriftId(fieldId);
13302
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13303
        return fields;
13304
      }
13305
 
13306
      /**
13307
       * Find the _Fields constant that matches name, or null if its not found.
13308
       */
13309
      public static _Fields findByName(String name) {
13310
        return byName.get(name);
13311
      }
13312
 
13313
      private final short _thriftId;
13314
      private final String _fieldName;
13315
 
13316
      _Fields(short thriftId, String fieldName) {
13317
        _thriftId = thriftId;
13318
        _fieldName = fieldName;
13319
      }
13320
 
13321
      public short getThriftFieldId() {
13322
        return _thriftId;
13323
      }
13324
 
13325
      public String getFieldName() {
13326
        return _fieldName;
13327
      }
13328
    }
13329
 
13330
    // isset id assignments
13331
    private static final int __SUCCESS_ISSET_ID = 0;
13332
    private BitSet __isset_bit_vector = new BitSet(1);
13333
 
13334
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13335
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13336
          new FieldValueMetaData(TType.BOOL)));
13337
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13338
          new FieldValueMetaData(TType.STRUCT)));
13339
    }});
13340
 
13341
    static {
13342
      FieldMetaData.addStructMetaDataMap(setDeliveryDate_result.class, metaDataMap);
13343
    }
13344
 
13345
    public setDeliveryDate_result() {
13346
    }
13347
 
13348
    public setDeliveryDate_result(
13349
      boolean success,
13350
      TransactionServiceException ex)
13351
    {
13352
      this();
13353
      this.success = success;
13354
      setSuccessIsSet(true);
13355
      this.ex = ex;
13356
    }
13357
 
13358
    /**
13359
     * Performs a deep copy on <i>other</i>.
13360
     */
13361
    public setDeliveryDate_result(setDeliveryDate_result other) {
13362
      __isset_bit_vector.clear();
13363
      __isset_bit_vector.or(other.__isset_bit_vector);
13364
      this.success = other.success;
13365
      if (other.isSetEx()) {
13366
        this.ex = new TransactionServiceException(other.ex);
13367
      }
13368
    }
13369
 
13370
    public setDeliveryDate_result deepCopy() {
13371
      return new setDeliveryDate_result(this);
13372
    }
13373
 
13374
    @Deprecated
13375
    public setDeliveryDate_result clone() {
13376
      return new setDeliveryDate_result(this);
13377
    }
13378
 
13379
    public boolean isSuccess() {
13380
      return this.success;
13381
    }
13382
 
13383
    public setDeliveryDate_result setSuccess(boolean success) {
13384
      this.success = success;
13385
      setSuccessIsSet(true);
13386
      return this;
13387
    }
13388
 
13389
    public void unsetSuccess() {
13390
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13391
    }
13392
 
13393
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13394
    public boolean isSetSuccess() {
13395
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13396
    }
13397
 
13398
    public void setSuccessIsSet(boolean value) {
13399
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13400
    }
13401
 
13402
    public TransactionServiceException getEx() {
13403
      return this.ex;
13404
    }
13405
 
13406
    public setDeliveryDate_result setEx(TransactionServiceException ex) {
13407
      this.ex = ex;
13408
      return this;
13409
    }
13410
 
13411
    public void unsetEx() {
13412
      this.ex = null;
13413
    }
13414
 
13415
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13416
    public boolean isSetEx() {
13417
      return this.ex != null;
13418
    }
13419
 
13420
    public void setExIsSet(boolean value) {
13421
      if (!value) {
13422
        this.ex = null;
13423
      }
13424
    }
13425
 
13426
    public void setFieldValue(_Fields field, Object value) {
13427
      switch (field) {
13428
      case SUCCESS:
13429
        if (value == null) {
13430
          unsetSuccess();
13431
        } else {
13432
          setSuccess((Boolean)value);
13433
        }
13434
        break;
13435
 
13436
      case EX:
13437
        if (value == null) {
13438
          unsetEx();
13439
        } else {
13440
          setEx((TransactionServiceException)value);
13441
        }
13442
        break;
13443
 
13444
      }
13445
    }
13446
 
13447
    public void setFieldValue(int fieldID, Object value) {
13448
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13449
    }
13450
 
13451
    public Object getFieldValue(_Fields field) {
13452
      switch (field) {
13453
      case SUCCESS:
13454
        return new Boolean(isSuccess());
13455
 
13456
      case EX:
13457
        return getEx();
13458
 
13459
      }
13460
      throw new IllegalStateException();
13461
    }
13462
 
13463
    public Object getFieldValue(int fieldId) {
13464
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13465
    }
13466
 
13467
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13468
    public boolean isSet(_Fields field) {
13469
      switch (field) {
13470
      case SUCCESS:
13471
        return isSetSuccess();
13472
      case EX:
13473
        return isSetEx();
13474
      }
13475
      throw new IllegalStateException();
13476
    }
13477
 
13478
    public boolean isSet(int fieldID) {
13479
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13480
    }
13481
 
13482
    @Override
13483
    public boolean equals(Object that) {
13484
      if (that == null)
13485
        return false;
13486
      if (that instanceof setDeliveryDate_result)
13487
        return this.equals((setDeliveryDate_result)that);
13488
      return false;
13489
    }
13490
 
13491
    public boolean equals(setDeliveryDate_result that) {
13492
      if (that == null)
13493
        return false;
13494
 
13495
      boolean this_present_success = true;
13496
      boolean that_present_success = true;
13497
      if (this_present_success || that_present_success) {
13498
        if (!(this_present_success && that_present_success))
13499
          return false;
13500
        if (this.success != that.success)
13501
          return false;
13502
      }
13503
 
13504
      boolean this_present_ex = true && this.isSetEx();
13505
      boolean that_present_ex = true && that.isSetEx();
13506
      if (this_present_ex || that_present_ex) {
13507
        if (!(this_present_ex && that_present_ex))
13508
          return false;
13509
        if (!this.ex.equals(that.ex))
13510
          return false;
13511
      }
13512
 
13513
      return true;
13514
    }
13515
 
13516
    @Override
13517
    public int hashCode() {
13518
      return 0;
13519
    }
13520
 
13521
    public int compareTo(setDeliveryDate_result other) {
13522
      if (!getClass().equals(other.getClass())) {
13523
        return getClass().getName().compareTo(other.getClass().getName());
13524
      }
13525
 
13526
      int lastComparison = 0;
13527
      setDeliveryDate_result typedOther = (setDeliveryDate_result)other;
13528
 
13529
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13530
      if (lastComparison != 0) {
13531
        return lastComparison;
13532
      }
13533
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13534
      if (lastComparison != 0) {
13535
        return lastComparison;
13536
      }
13537
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13538
      if (lastComparison != 0) {
13539
        return lastComparison;
13540
      }
13541
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13542
      if (lastComparison != 0) {
13543
        return lastComparison;
13544
      }
13545
      return 0;
13546
    }
13547
 
13548
    public void read(TProtocol iprot) throws TException {
13549
      TField field;
13550
      iprot.readStructBegin();
13551
      while (true)
13552
      {
13553
        field = iprot.readFieldBegin();
13554
        if (field.type == TType.STOP) { 
13555
          break;
13556
        }
13557
        _Fields fieldId = _Fields.findByThriftId(field.id);
13558
        if (fieldId == null) {
13559
          TProtocolUtil.skip(iprot, field.type);
13560
        } else {
13561
          switch (fieldId) {
13562
            case SUCCESS:
13563
              if (field.type == TType.BOOL) {
13564
                this.success = iprot.readBool();
13565
                setSuccessIsSet(true);
13566
              } else { 
13567
                TProtocolUtil.skip(iprot, field.type);
13568
              }
13569
              break;
13570
            case EX:
13571
              if (field.type == TType.STRUCT) {
13572
                this.ex = new TransactionServiceException();
13573
                this.ex.read(iprot);
13574
              } else { 
13575
                TProtocolUtil.skip(iprot, field.type);
13576
              }
13577
              break;
13578
          }
13579
          iprot.readFieldEnd();
13580
        }
13581
      }
13582
      iprot.readStructEnd();
13583
      validate();
13584
    }
13585
 
13586
    public void write(TProtocol oprot) throws TException {
13587
      oprot.writeStructBegin(STRUCT_DESC);
13588
 
13589
      if (this.isSetSuccess()) {
13590
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13591
        oprot.writeBool(this.success);
13592
        oprot.writeFieldEnd();
13593
      } else if (this.isSetEx()) {
13594
        oprot.writeFieldBegin(EX_FIELD_DESC);
13595
        this.ex.write(oprot);
13596
        oprot.writeFieldEnd();
13597
      }
13598
      oprot.writeFieldStop();
13599
      oprot.writeStructEnd();
13600
    }
13601
 
13602
    @Override
13603
    public String toString() {
13604
      StringBuilder sb = new StringBuilder("setDeliveryDate_result(");
13605
      boolean first = true;
13606
 
13607
      sb.append("success:");
13608
      sb.append(this.success);
13609
      first = false;
13610
      if (!first) sb.append(", ");
13611
      sb.append("ex:");
13612
      if (this.ex == null) {
13613
        sb.append("null");
13614
      } else {
13615
        sb.append(this.ex);
13616
      }
13617
      first = false;
13618
      sb.append(")");
13619
      return sb.toString();
13620
    }
13621
 
13622
    public void validate() throws TException {
13623
      // check for required fields
13624
    }
13625
 
13626
  }
13627
 
13628
  public static class changeShippingStatus_args implements TBase<changeShippingStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeShippingStatus_args>   {
13629
    private static final TStruct STRUCT_DESC = new TStruct("changeShippingStatus_args");
13630
 
13631
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
13632
    private static final TField SHIPPING_ID_FIELD_DESC = new TField("shippingId", TType.I64, (short)2);
13633
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
13634
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)4);
13635
 
13636
    private long transactionId;
13637
    private long shippingId;
13638
    private ShipmentStatus status;
13639
    private String description;
13640
 
13641
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13642
    public enum _Fields implements TFieldIdEnum {
13643
      TRANSACTION_ID((short)1, "transactionId"),
13644
      SHIPPING_ID((short)2, "shippingId"),
13645
      /**
13646
       * 
13647
       * @see ShipmentStatus
13648
       */
13649
      STATUS((short)3, "status"),
13650
      DESCRIPTION((short)4, "description");
13651
 
13652
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13653
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13654
 
13655
      static {
13656
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13657
          byId.put((int)field._thriftId, field);
13658
          byName.put(field.getFieldName(), field);
13659
        }
13660
      }
13661
 
13662
      /**
13663
       * Find the _Fields constant that matches fieldId, or null if its not found.
13664
       */
13665
      public static _Fields findByThriftId(int fieldId) {
13666
        return byId.get(fieldId);
13667
      }
13668
 
13669
      /**
13670
       * Find the _Fields constant that matches fieldId, throwing an exception
13671
       * if it is not found.
13672
       */
13673
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13674
        _Fields fields = findByThriftId(fieldId);
13675
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13676
        return fields;
13677
      }
13678
 
13679
      /**
13680
       * Find the _Fields constant that matches name, or null if its not found.
13681
       */
13682
      public static _Fields findByName(String name) {
13683
        return byName.get(name);
13684
      }
13685
 
13686
      private final short _thriftId;
13687
      private final String _fieldName;
13688
 
13689
      _Fields(short thriftId, String fieldName) {
13690
        _thriftId = thriftId;
13691
        _fieldName = fieldName;
13692
      }
13693
 
13694
      public short getThriftFieldId() {
13695
        return _thriftId;
13696
      }
13697
 
13698
      public String getFieldName() {
13699
        return _fieldName;
13700
      }
13701
    }
13702
 
13703
    // isset id assignments
13704
    private static final int __TRANSACTIONID_ISSET_ID = 0;
13705
    private static final int __SHIPPINGID_ISSET_ID = 1;
13706
    private BitSet __isset_bit_vector = new BitSet(2);
13707
 
13708
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13709
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
13710
          new FieldValueMetaData(TType.I64)));
13711
      put(_Fields.SHIPPING_ID, new FieldMetaData("shippingId", TFieldRequirementType.DEFAULT, 
13712
          new FieldValueMetaData(TType.I64)));
13713
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
13714
          new EnumMetaData(TType.ENUM, ShipmentStatus.class)));
13715
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
13716
          new FieldValueMetaData(TType.STRING)));
13717
    }});
13718
 
13719
    static {
13720
      FieldMetaData.addStructMetaDataMap(changeShippingStatus_args.class, metaDataMap);
13721
    }
13722
 
13723
    public changeShippingStatus_args() {
13724
    }
13725
 
13726
    public changeShippingStatus_args(
13727
      long transactionId,
13728
      long shippingId,
13729
      ShipmentStatus status,
13730
      String description)
13731
    {
13732
      this();
13733
      this.transactionId = transactionId;
13734
      setTransactionIdIsSet(true);
13735
      this.shippingId = shippingId;
13736
      setShippingIdIsSet(true);
13737
      this.status = status;
13738
      this.description = description;
13739
    }
13740
 
13741
    /**
13742
     * Performs a deep copy on <i>other</i>.
13743
     */
13744
    public changeShippingStatus_args(changeShippingStatus_args other) {
13745
      __isset_bit_vector.clear();
13746
      __isset_bit_vector.or(other.__isset_bit_vector);
13747
      this.transactionId = other.transactionId;
13748
      this.shippingId = other.shippingId;
13749
      if (other.isSetStatus()) {
13750
        this.status = other.status;
13751
      }
13752
      if (other.isSetDescription()) {
13753
        this.description = other.description;
13754
      }
13755
    }
13756
 
13757
    public changeShippingStatus_args deepCopy() {
13758
      return new changeShippingStatus_args(this);
13759
    }
13760
 
13761
    @Deprecated
13762
    public changeShippingStatus_args clone() {
13763
      return new changeShippingStatus_args(this);
13764
    }
13765
 
13766
    public long getTransactionId() {
13767
      return this.transactionId;
13768
    }
13769
 
13770
    public changeShippingStatus_args setTransactionId(long transactionId) {
13771
      this.transactionId = transactionId;
13772
      setTransactionIdIsSet(true);
13773
      return this;
13774
    }
13775
 
13776
    public void unsetTransactionId() {
13777
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
13778
    }
13779
 
13780
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
13781
    public boolean isSetTransactionId() {
13782
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
13783
    }
13784
 
13785
    public void setTransactionIdIsSet(boolean value) {
13786
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
13787
    }
13788
 
13789
    public long getShippingId() {
13790
      return this.shippingId;
13791
    }
13792
 
13793
    public changeShippingStatus_args setShippingId(long shippingId) {
13794
      this.shippingId = shippingId;
13795
      setShippingIdIsSet(true);
13796
      return this;
13797
    }
13798
 
13799
    public void unsetShippingId() {
13800
      __isset_bit_vector.clear(__SHIPPINGID_ISSET_ID);
13801
    }
13802
 
13803
    /** Returns true if field shippingId is set (has been asigned a value) and false otherwise */
13804
    public boolean isSetShippingId() {
13805
      return __isset_bit_vector.get(__SHIPPINGID_ISSET_ID);
13806
    }
13807
 
13808
    public void setShippingIdIsSet(boolean value) {
13809
      __isset_bit_vector.set(__SHIPPINGID_ISSET_ID, value);
13810
    }
13811
 
13812
    /**
13813
     * 
13814
     * @see ShipmentStatus
13815
     */
13816
    public ShipmentStatus getStatus() {
13817
      return this.status;
13818
    }
13819
 
13820
    /**
13821
     * 
13822
     * @see ShipmentStatus
13823
     */
13824
    public changeShippingStatus_args setStatus(ShipmentStatus status) {
13825
      this.status = status;
13826
      return this;
13827
    }
13828
 
13829
    public void unsetStatus() {
13830
      this.status = null;
13831
    }
13832
 
13833
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
13834
    public boolean isSetStatus() {
13835
      return this.status != null;
13836
    }
13837
 
13838
    public void setStatusIsSet(boolean value) {
13839
      if (!value) {
13840
        this.status = null;
13841
      }
13842
    }
13843
 
13844
    public String getDescription() {
13845
      return this.description;
13846
    }
13847
 
13848
    public changeShippingStatus_args setDescription(String description) {
13849
      this.description = description;
13850
      return this;
13851
    }
13852
 
13853
    public void unsetDescription() {
13854
      this.description = null;
13855
    }
13856
 
13857
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
13858
    public boolean isSetDescription() {
13859
      return this.description != null;
13860
    }
13861
 
13862
    public void setDescriptionIsSet(boolean value) {
13863
      if (!value) {
13864
        this.description = null;
13865
      }
13866
    }
13867
 
13868
    public void setFieldValue(_Fields field, Object value) {
13869
      switch (field) {
13870
      case TRANSACTION_ID:
13871
        if (value == null) {
13872
          unsetTransactionId();
13873
        } else {
13874
          setTransactionId((Long)value);
13875
        }
13876
        break;
13877
 
13878
      case SHIPPING_ID:
13879
        if (value == null) {
13880
          unsetShippingId();
13881
        } else {
13882
          setShippingId((Long)value);
13883
        }
13884
        break;
13885
 
13886
      case STATUS:
13887
        if (value == null) {
13888
          unsetStatus();
13889
        } else {
13890
          setStatus((ShipmentStatus)value);
13891
        }
13892
        break;
13893
 
13894
      case DESCRIPTION:
13895
        if (value == null) {
13896
          unsetDescription();
13897
        } else {
13898
          setDescription((String)value);
13899
        }
13900
        break;
13901
 
13902
      }
13903
    }
13904
 
13905
    public void setFieldValue(int fieldID, Object value) {
13906
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13907
    }
13908
 
13909
    public Object getFieldValue(_Fields field) {
13910
      switch (field) {
13911
      case TRANSACTION_ID:
13912
        return new Long(getTransactionId());
13913
 
13914
      case SHIPPING_ID:
13915
        return new Long(getShippingId());
13916
 
13917
      case STATUS:
13918
        return getStatus();
13919
 
13920
      case DESCRIPTION:
13921
        return getDescription();
13922
 
13923
      }
13924
      throw new IllegalStateException();
13925
    }
13926
 
13927
    public Object getFieldValue(int fieldId) {
13928
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13929
    }
13930
 
13931
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13932
    public boolean isSet(_Fields field) {
13933
      switch (field) {
13934
      case TRANSACTION_ID:
13935
        return isSetTransactionId();
13936
      case SHIPPING_ID:
13937
        return isSetShippingId();
13938
      case STATUS:
13939
        return isSetStatus();
13940
      case DESCRIPTION:
13941
        return isSetDescription();
13942
      }
13943
      throw new IllegalStateException();
13944
    }
13945
 
13946
    public boolean isSet(int fieldID) {
13947
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13948
    }
13949
 
13950
    @Override
13951
    public boolean equals(Object that) {
13952
      if (that == null)
13953
        return false;
13954
      if (that instanceof changeShippingStatus_args)
13955
        return this.equals((changeShippingStatus_args)that);
13956
      return false;
13957
    }
13958
 
13959
    public boolean equals(changeShippingStatus_args that) {
13960
      if (that == null)
13961
        return false;
13962
 
13963
      boolean this_present_transactionId = true;
13964
      boolean that_present_transactionId = true;
13965
      if (this_present_transactionId || that_present_transactionId) {
13966
        if (!(this_present_transactionId && that_present_transactionId))
13967
          return false;
13968
        if (this.transactionId != that.transactionId)
13969
          return false;
13970
      }
13971
 
13972
      boolean this_present_shippingId = true;
13973
      boolean that_present_shippingId = true;
13974
      if (this_present_shippingId || that_present_shippingId) {
13975
        if (!(this_present_shippingId && that_present_shippingId))
13976
          return false;
13977
        if (this.shippingId != that.shippingId)
13978
          return false;
13979
      }
13980
 
13981
      boolean this_present_status = true && this.isSetStatus();
13982
      boolean that_present_status = true && that.isSetStatus();
13983
      if (this_present_status || that_present_status) {
13984
        if (!(this_present_status && that_present_status))
13985
          return false;
13986
        if (!this.status.equals(that.status))
13987
          return false;
13988
      }
13989
 
13990
      boolean this_present_description = true && this.isSetDescription();
13991
      boolean that_present_description = true && that.isSetDescription();
13992
      if (this_present_description || that_present_description) {
13993
        if (!(this_present_description && that_present_description))
13994
          return false;
13995
        if (!this.description.equals(that.description))
13996
          return false;
13997
      }
13998
 
13999
      return true;
14000
    }
14001
 
14002
    @Override
14003
    public int hashCode() {
14004
      return 0;
14005
    }
14006
 
14007
    public int compareTo(changeShippingStatus_args other) {
14008
      if (!getClass().equals(other.getClass())) {
14009
        return getClass().getName().compareTo(other.getClass().getName());
14010
      }
14011
 
14012
      int lastComparison = 0;
14013
      changeShippingStatus_args typedOther = (changeShippingStatus_args)other;
14014
 
14015
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
14016
      if (lastComparison != 0) {
14017
        return lastComparison;
14018
      }
14019
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
14020
      if (lastComparison != 0) {
14021
        return lastComparison;
14022
      }
14023
      lastComparison = Boolean.valueOf(isSetShippingId()).compareTo(isSetShippingId());
14024
      if (lastComparison != 0) {
14025
        return lastComparison;
14026
      }
14027
      lastComparison = TBaseHelper.compareTo(shippingId, typedOther.shippingId);
14028
      if (lastComparison != 0) {
14029
        return lastComparison;
14030
      }
14031
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
14032
      if (lastComparison != 0) {
14033
        return lastComparison;
14034
      }
14035
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
14036
      if (lastComparison != 0) {
14037
        return lastComparison;
14038
      }
14039
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
14040
      if (lastComparison != 0) {
14041
        return lastComparison;
14042
      }
14043
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
14044
      if (lastComparison != 0) {
14045
        return lastComparison;
14046
      }
14047
      return 0;
14048
    }
14049
 
14050
    public void read(TProtocol iprot) throws TException {
14051
      TField field;
14052
      iprot.readStructBegin();
14053
      while (true)
14054
      {
14055
        field = iprot.readFieldBegin();
14056
        if (field.type == TType.STOP) { 
14057
          break;
14058
        }
14059
        _Fields fieldId = _Fields.findByThriftId(field.id);
14060
        if (fieldId == null) {
14061
          TProtocolUtil.skip(iprot, field.type);
14062
        } else {
14063
          switch (fieldId) {
14064
            case TRANSACTION_ID:
14065
              if (field.type == TType.I64) {
14066
                this.transactionId = iprot.readI64();
14067
                setTransactionIdIsSet(true);
14068
              } else { 
14069
                TProtocolUtil.skip(iprot, field.type);
14070
              }
14071
              break;
14072
            case SHIPPING_ID:
14073
              if (field.type == TType.I64) {
14074
                this.shippingId = iprot.readI64();
14075
                setShippingIdIsSet(true);
14076
              } else { 
14077
                TProtocolUtil.skip(iprot, field.type);
14078
              }
14079
              break;
14080
            case STATUS:
14081
              if (field.type == TType.I32) {
14082
                this.status = ShipmentStatus.findByValue(iprot.readI32());
14083
              } else { 
14084
                TProtocolUtil.skip(iprot, field.type);
14085
              }
14086
              break;
14087
            case DESCRIPTION:
14088
              if (field.type == TType.STRING) {
14089
                this.description = iprot.readString();
14090
              } else { 
14091
                TProtocolUtil.skip(iprot, field.type);
14092
              }
14093
              break;
14094
          }
14095
          iprot.readFieldEnd();
14096
        }
14097
      }
14098
      iprot.readStructEnd();
14099
      validate();
14100
    }
14101
 
14102
    public void write(TProtocol oprot) throws TException {
14103
      validate();
14104
 
14105
      oprot.writeStructBegin(STRUCT_DESC);
14106
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
14107
      oprot.writeI64(this.transactionId);
14108
      oprot.writeFieldEnd();
14109
      oprot.writeFieldBegin(SHIPPING_ID_FIELD_DESC);
14110
      oprot.writeI64(this.shippingId);
14111
      oprot.writeFieldEnd();
14112
      if (this.status != null) {
14113
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
14114
        oprot.writeI32(this.status.getValue());
14115
        oprot.writeFieldEnd();
14116
      }
14117
      if (this.description != null) {
14118
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
14119
        oprot.writeString(this.description);
14120
        oprot.writeFieldEnd();
14121
      }
14122
      oprot.writeFieldStop();
14123
      oprot.writeStructEnd();
14124
    }
14125
 
14126
    @Override
14127
    public String toString() {
14128
      StringBuilder sb = new StringBuilder("changeShippingStatus_args(");
14129
      boolean first = true;
14130
 
14131
      sb.append("transactionId:");
14132
      sb.append(this.transactionId);
14133
      first = false;
14134
      if (!first) sb.append(", ");
14135
      sb.append("shippingId:");
14136
      sb.append(this.shippingId);
14137
      first = false;
14138
      if (!first) sb.append(", ");
14139
      sb.append("status:");
14140
      if (this.status == null) {
14141
        sb.append("null");
14142
      } else {
14143
        String status_name = status.name();
14144
        if (status_name != null) {
14145
          sb.append(status_name);
14146
          sb.append(" (");
14147
        }
14148
        sb.append(this.status);
14149
        if (status_name != null) {
14150
          sb.append(")");
14151
        }
14152
      }
14153
      first = false;
14154
      if (!first) sb.append(", ");
14155
      sb.append("description:");
14156
      if (this.description == null) {
14157
        sb.append("null");
14158
      } else {
14159
        sb.append(this.description);
14160
      }
14161
      first = false;
14162
      sb.append(")");
14163
      return sb.toString();
14164
    }
14165
 
14166
    public void validate() throws TException {
14167
      // check for required fields
14168
    }
14169
 
14170
  }
14171
 
14172
  public static class changeShippingStatus_result implements TBase<changeShippingStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeShippingStatus_result>   {
14173
    private static final TStruct STRUCT_DESC = new TStruct("changeShippingStatus_result");
14174
 
14175
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14176
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14177
 
14178
    private boolean success;
14179
    private TransactionServiceException ex;
14180
 
14181
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14182
    public enum _Fields implements TFieldIdEnum {
14183
      SUCCESS((short)0, "success"),
14184
      EX((short)1, "ex");
14185
 
14186
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14187
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14188
 
14189
      static {
14190
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14191
          byId.put((int)field._thriftId, field);
14192
          byName.put(field.getFieldName(), field);
14193
        }
14194
      }
14195
 
14196
      /**
14197
       * Find the _Fields constant that matches fieldId, or null if its not found.
14198
       */
14199
      public static _Fields findByThriftId(int fieldId) {
14200
        return byId.get(fieldId);
14201
      }
14202
 
14203
      /**
14204
       * Find the _Fields constant that matches fieldId, throwing an exception
14205
       * if it is not found.
14206
       */
14207
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14208
        _Fields fields = findByThriftId(fieldId);
14209
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14210
        return fields;
14211
      }
14212
 
14213
      /**
14214
       * Find the _Fields constant that matches name, or null if its not found.
14215
       */
14216
      public static _Fields findByName(String name) {
14217
        return byName.get(name);
14218
      }
14219
 
14220
      private final short _thriftId;
14221
      private final String _fieldName;
14222
 
14223
      _Fields(short thriftId, String fieldName) {
14224
        _thriftId = thriftId;
14225
        _fieldName = fieldName;
14226
      }
14227
 
14228
      public short getThriftFieldId() {
14229
        return _thriftId;
14230
      }
14231
 
14232
      public String getFieldName() {
14233
        return _fieldName;
14234
      }
14235
    }
14236
 
14237
    // isset id assignments
14238
    private static final int __SUCCESS_ISSET_ID = 0;
14239
    private BitSet __isset_bit_vector = new BitSet(1);
14240
 
14241
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14242
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14243
          new FieldValueMetaData(TType.BOOL)));
14244
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14245
          new FieldValueMetaData(TType.STRUCT)));
14246
    }});
14247
 
14248
    static {
14249
      FieldMetaData.addStructMetaDataMap(changeShippingStatus_result.class, metaDataMap);
14250
    }
14251
 
14252
    public changeShippingStatus_result() {
14253
    }
14254
 
14255
    public changeShippingStatus_result(
14256
      boolean success,
14257
      TransactionServiceException ex)
14258
    {
14259
      this();
14260
      this.success = success;
14261
      setSuccessIsSet(true);
14262
      this.ex = ex;
14263
    }
14264
 
14265
    /**
14266
     * Performs a deep copy on <i>other</i>.
14267
     */
14268
    public changeShippingStatus_result(changeShippingStatus_result other) {
14269
      __isset_bit_vector.clear();
14270
      __isset_bit_vector.or(other.__isset_bit_vector);
14271
      this.success = other.success;
14272
      if (other.isSetEx()) {
14273
        this.ex = new TransactionServiceException(other.ex);
14274
      }
14275
    }
14276
 
14277
    public changeShippingStatus_result deepCopy() {
14278
      return new changeShippingStatus_result(this);
14279
    }
14280
 
14281
    @Deprecated
14282
    public changeShippingStatus_result clone() {
14283
      return new changeShippingStatus_result(this);
14284
    }
14285
 
14286
    public boolean isSuccess() {
14287
      return this.success;
14288
    }
14289
 
14290
    public changeShippingStatus_result setSuccess(boolean success) {
14291
      this.success = success;
14292
      setSuccessIsSet(true);
14293
      return this;
14294
    }
14295
 
14296
    public void unsetSuccess() {
14297
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14298
    }
14299
 
14300
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14301
    public boolean isSetSuccess() {
14302
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14303
    }
14304
 
14305
    public void setSuccessIsSet(boolean value) {
14306
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14307
    }
14308
 
14309
    public TransactionServiceException getEx() {
14310
      return this.ex;
14311
    }
14312
 
14313
    public changeShippingStatus_result setEx(TransactionServiceException ex) {
14314
      this.ex = ex;
14315
      return this;
14316
    }
14317
 
14318
    public void unsetEx() {
14319
      this.ex = null;
14320
    }
14321
 
14322
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14323
    public boolean isSetEx() {
14324
      return this.ex != null;
14325
    }
14326
 
14327
    public void setExIsSet(boolean value) {
14328
      if (!value) {
14329
        this.ex = null;
14330
      }
14331
    }
14332
 
14333
    public void setFieldValue(_Fields field, Object value) {
14334
      switch (field) {
14335
      case SUCCESS:
14336
        if (value == null) {
14337
          unsetSuccess();
14338
        } else {
14339
          setSuccess((Boolean)value);
14340
        }
14341
        break;
14342
 
14343
      case EX:
14344
        if (value == null) {
14345
          unsetEx();
14346
        } else {
14347
          setEx((TransactionServiceException)value);
14348
        }
14349
        break;
14350
 
14351
      }
14352
    }
14353
 
14354
    public void setFieldValue(int fieldID, Object value) {
14355
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14356
    }
14357
 
14358
    public Object getFieldValue(_Fields field) {
14359
      switch (field) {
14360
      case SUCCESS:
14361
        return new Boolean(isSuccess());
14362
 
14363
      case EX:
14364
        return getEx();
14365
 
14366
      }
14367
      throw new IllegalStateException();
14368
    }
14369
 
14370
    public Object getFieldValue(int fieldId) {
14371
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14372
    }
14373
 
14374
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14375
    public boolean isSet(_Fields field) {
14376
      switch (field) {
14377
      case SUCCESS:
14378
        return isSetSuccess();
14379
      case EX:
14380
        return isSetEx();
14381
      }
14382
      throw new IllegalStateException();
14383
    }
14384
 
14385
    public boolean isSet(int fieldID) {
14386
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14387
    }
14388
 
14389
    @Override
14390
    public boolean equals(Object that) {
14391
      if (that == null)
14392
        return false;
14393
      if (that instanceof changeShippingStatus_result)
14394
        return this.equals((changeShippingStatus_result)that);
14395
      return false;
14396
    }
14397
 
14398
    public boolean equals(changeShippingStatus_result that) {
14399
      if (that == null)
14400
        return false;
14401
 
14402
      boolean this_present_success = true;
14403
      boolean that_present_success = true;
14404
      if (this_present_success || that_present_success) {
14405
        if (!(this_present_success && that_present_success))
14406
          return false;
14407
        if (this.success != that.success)
14408
          return false;
14409
      }
14410
 
14411
      boolean this_present_ex = true && this.isSetEx();
14412
      boolean that_present_ex = true && that.isSetEx();
14413
      if (this_present_ex || that_present_ex) {
14414
        if (!(this_present_ex && that_present_ex))
14415
          return false;
14416
        if (!this.ex.equals(that.ex))
14417
          return false;
14418
      }
14419
 
14420
      return true;
14421
    }
14422
 
14423
    @Override
14424
    public int hashCode() {
14425
      return 0;
14426
    }
14427
 
14428
    public int compareTo(changeShippingStatus_result other) {
14429
      if (!getClass().equals(other.getClass())) {
14430
        return getClass().getName().compareTo(other.getClass().getName());
14431
      }
14432
 
14433
      int lastComparison = 0;
14434
      changeShippingStatus_result typedOther = (changeShippingStatus_result)other;
14435
 
14436
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14437
      if (lastComparison != 0) {
14438
        return lastComparison;
14439
      }
14440
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14441
      if (lastComparison != 0) {
14442
        return lastComparison;
14443
      }
14444
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14445
      if (lastComparison != 0) {
14446
        return lastComparison;
14447
      }
14448
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14449
      if (lastComparison != 0) {
14450
        return lastComparison;
14451
      }
14452
      return 0;
14453
    }
14454
 
14455
    public void read(TProtocol iprot) throws TException {
14456
      TField field;
14457
      iprot.readStructBegin();
14458
      while (true)
14459
      {
14460
        field = iprot.readFieldBegin();
14461
        if (field.type == TType.STOP) { 
14462
          break;
14463
        }
14464
        _Fields fieldId = _Fields.findByThriftId(field.id);
14465
        if (fieldId == null) {
14466
          TProtocolUtil.skip(iprot, field.type);
14467
        } else {
14468
          switch (fieldId) {
14469
            case SUCCESS:
14470
              if (field.type == TType.BOOL) {
14471
                this.success = iprot.readBool();
14472
                setSuccessIsSet(true);
14473
              } else { 
14474
                TProtocolUtil.skip(iprot, field.type);
14475
              }
14476
              break;
14477
            case EX:
14478
              if (field.type == TType.STRUCT) {
14479
                this.ex = new TransactionServiceException();
14480
                this.ex.read(iprot);
14481
              } else { 
14482
                TProtocolUtil.skip(iprot, field.type);
14483
              }
14484
              break;
14485
          }
14486
          iprot.readFieldEnd();
14487
        }
14488
      }
14489
      iprot.readStructEnd();
14490
      validate();
14491
    }
14492
 
14493
    public void write(TProtocol oprot) throws TException {
14494
      oprot.writeStructBegin(STRUCT_DESC);
14495
 
14496
      if (this.isSetSuccess()) {
14497
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14498
        oprot.writeBool(this.success);
14499
        oprot.writeFieldEnd();
14500
      } else if (this.isSetEx()) {
14501
        oprot.writeFieldBegin(EX_FIELD_DESC);
14502
        this.ex.write(oprot);
14503
        oprot.writeFieldEnd();
14504
      }
14505
      oprot.writeFieldStop();
14506
      oprot.writeStructEnd();
14507
    }
14508
 
14509
    @Override
14510
    public String toString() {
14511
      StringBuilder sb = new StringBuilder("changeShippingStatus_result(");
14512
      boolean first = true;
14513
 
14514
      sb.append("success:");
14515
      sb.append(this.success);
14516
      first = false;
14517
      if (!first) sb.append(", ");
14518
      sb.append("ex:");
14519
      if (this.ex == null) {
14520
        sb.append("null");
14521
      } else {
14522
        sb.append(this.ex);
14523
      }
14524
      first = false;
14525
      sb.append(")");
14526
      return sb.toString();
14527
    }
14528
 
14529
    public void validate() throws TException {
14530
      // check for required fields
14531
    }
14532
 
14533
  }
14534
 
14535
  public static class addTrail_args implements TBase<addTrail_args._Fields>, java.io.Serializable, Cloneable, Comparable<addTrail_args>   {
14536
    private static final TStruct STRUCT_DESC = new TStruct("addTrail_args");
14537
 
14538
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
14539
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)2);
14540
 
14541
    private long transactionId;
14542
    private String description;
14543
 
14544
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14545
    public enum _Fields implements TFieldIdEnum {
14546
      TRANSACTION_ID((short)1, "transactionId"),
14547
      DESCRIPTION((short)2, "description");
14548
 
14549
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14550
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14551
 
14552
      static {
14553
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14554
          byId.put((int)field._thriftId, field);
14555
          byName.put(field.getFieldName(), field);
14556
        }
14557
      }
14558
 
14559
      /**
14560
       * Find the _Fields constant that matches fieldId, or null if its not found.
14561
       */
14562
      public static _Fields findByThriftId(int fieldId) {
14563
        return byId.get(fieldId);
14564
      }
14565
 
14566
      /**
14567
       * Find the _Fields constant that matches fieldId, throwing an exception
14568
       * if it is not found.
14569
       */
14570
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14571
        _Fields fields = findByThriftId(fieldId);
14572
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14573
        return fields;
14574
      }
14575
 
14576
      /**
14577
       * Find the _Fields constant that matches name, or null if its not found.
14578
       */
14579
      public static _Fields findByName(String name) {
14580
        return byName.get(name);
14581
      }
14582
 
14583
      private final short _thriftId;
14584
      private final String _fieldName;
14585
 
14586
      _Fields(short thriftId, String fieldName) {
14587
        _thriftId = thriftId;
14588
        _fieldName = fieldName;
14589
      }
14590
 
14591
      public short getThriftFieldId() {
14592
        return _thriftId;
14593
      }
14594
 
14595
      public String getFieldName() {
14596
        return _fieldName;
14597
      }
14598
    }
14599
 
14600
    // isset id assignments
14601
    private static final int __TRANSACTIONID_ISSET_ID = 0;
14602
    private BitSet __isset_bit_vector = new BitSet(1);
14603
 
14604
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14605
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
14606
          new FieldValueMetaData(TType.I64)));
14607
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
14608
          new FieldValueMetaData(TType.STRING)));
14609
    }});
14610
 
14611
    static {
14612
      FieldMetaData.addStructMetaDataMap(addTrail_args.class, metaDataMap);
14613
    }
14614
 
14615
    public addTrail_args() {
14616
    }
14617
 
14618
    public addTrail_args(
14619
      long transactionId,
14620
      String description)
14621
    {
14622
      this();
14623
      this.transactionId = transactionId;
14624
      setTransactionIdIsSet(true);
14625
      this.description = description;
14626
    }
14627
 
14628
    /**
14629
     * Performs a deep copy on <i>other</i>.
14630
     */
14631
    public addTrail_args(addTrail_args other) {
14632
      __isset_bit_vector.clear();
14633
      __isset_bit_vector.or(other.__isset_bit_vector);
14634
      this.transactionId = other.transactionId;
14635
      if (other.isSetDescription()) {
14636
        this.description = other.description;
14637
      }
14638
    }
14639
 
14640
    public addTrail_args deepCopy() {
14641
      return new addTrail_args(this);
14642
    }
14643
 
14644
    @Deprecated
14645
    public addTrail_args clone() {
14646
      return new addTrail_args(this);
14647
    }
14648
 
14649
    public long getTransactionId() {
14650
      return this.transactionId;
14651
    }
14652
 
14653
    public addTrail_args setTransactionId(long transactionId) {
14654
      this.transactionId = transactionId;
14655
      setTransactionIdIsSet(true);
14656
      return this;
14657
    }
14658
 
14659
    public void unsetTransactionId() {
14660
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
14661
    }
14662
 
14663
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
14664
    public boolean isSetTransactionId() {
14665
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
14666
    }
14667
 
14668
    public void setTransactionIdIsSet(boolean value) {
14669
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
14670
    }
14671
 
14672
    public String getDescription() {
14673
      return this.description;
14674
    }
14675
 
14676
    public addTrail_args setDescription(String description) {
14677
      this.description = description;
14678
      return this;
14679
    }
14680
 
14681
    public void unsetDescription() {
14682
      this.description = null;
14683
    }
14684
 
14685
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
14686
    public boolean isSetDescription() {
14687
      return this.description != null;
14688
    }
14689
 
14690
    public void setDescriptionIsSet(boolean value) {
14691
      if (!value) {
14692
        this.description = null;
14693
      }
14694
    }
14695
 
14696
    public void setFieldValue(_Fields field, Object value) {
14697
      switch (field) {
14698
      case TRANSACTION_ID:
14699
        if (value == null) {
14700
          unsetTransactionId();
14701
        } else {
14702
          setTransactionId((Long)value);
14703
        }
14704
        break;
14705
 
14706
      case DESCRIPTION:
14707
        if (value == null) {
14708
          unsetDescription();
14709
        } else {
14710
          setDescription((String)value);
14711
        }
14712
        break;
14713
 
14714
      }
14715
    }
14716
 
14717
    public void setFieldValue(int fieldID, Object value) {
14718
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14719
    }
14720
 
14721
    public Object getFieldValue(_Fields field) {
14722
      switch (field) {
14723
      case TRANSACTION_ID:
14724
        return new Long(getTransactionId());
14725
 
14726
      case DESCRIPTION:
14727
        return getDescription();
14728
 
14729
      }
14730
      throw new IllegalStateException();
14731
    }
14732
 
14733
    public Object getFieldValue(int fieldId) {
14734
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14735
    }
14736
 
14737
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14738
    public boolean isSet(_Fields field) {
14739
      switch (field) {
14740
      case TRANSACTION_ID:
14741
        return isSetTransactionId();
14742
      case DESCRIPTION:
14743
        return isSetDescription();
14744
      }
14745
      throw new IllegalStateException();
14746
    }
14747
 
14748
    public boolean isSet(int fieldID) {
14749
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14750
    }
14751
 
14752
    @Override
14753
    public boolean equals(Object that) {
14754
      if (that == null)
14755
        return false;
14756
      if (that instanceof addTrail_args)
14757
        return this.equals((addTrail_args)that);
14758
      return false;
14759
    }
14760
 
14761
    public boolean equals(addTrail_args that) {
14762
      if (that == null)
14763
        return false;
14764
 
14765
      boolean this_present_transactionId = true;
14766
      boolean that_present_transactionId = true;
14767
      if (this_present_transactionId || that_present_transactionId) {
14768
        if (!(this_present_transactionId && that_present_transactionId))
14769
          return false;
14770
        if (this.transactionId != that.transactionId)
14771
          return false;
14772
      }
14773
 
14774
      boolean this_present_description = true && this.isSetDescription();
14775
      boolean that_present_description = true && that.isSetDescription();
14776
      if (this_present_description || that_present_description) {
14777
        if (!(this_present_description && that_present_description))
14778
          return false;
14779
        if (!this.description.equals(that.description))
14780
          return false;
14781
      }
14782
 
14783
      return true;
14784
    }
14785
 
14786
    @Override
14787
    public int hashCode() {
14788
      return 0;
14789
    }
14790
 
14791
    public int compareTo(addTrail_args other) {
14792
      if (!getClass().equals(other.getClass())) {
14793
        return getClass().getName().compareTo(other.getClass().getName());
14794
      }
14795
 
14796
      int lastComparison = 0;
14797
      addTrail_args typedOther = (addTrail_args)other;
14798
 
14799
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
14800
      if (lastComparison != 0) {
14801
        return lastComparison;
14802
      }
14803
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
14804
      if (lastComparison != 0) {
14805
        return lastComparison;
14806
      }
14807
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
14808
      if (lastComparison != 0) {
14809
        return lastComparison;
14810
      }
14811
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
14812
      if (lastComparison != 0) {
14813
        return lastComparison;
14814
      }
14815
      return 0;
14816
    }
14817
 
14818
    public void read(TProtocol iprot) throws TException {
14819
      TField field;
14820
      iprot.readStructBegin();
14821
      while (true)
14822
      {
14823
        field = iprot.readFieldBegin();
14824
        if (field.type == TType.STOP) { 
14825
          break;
14826
        }
14827
        _Fields fieldId = _Fields.findByThriftId(field.id);
14828
        if (fieldId == null) {
14829
          TProtocolUtil.skip(iprot, field.type);
14830
        } else {
14831
          switch (fieldId) {
14832
            case TRANSACTION_ID:
14833
              if (field.type == TType.I64) {
14834
                this.transactionId = iprot.readI64();
14835
                setTransactionIdIsSet(true);
14836
              } else { 
14837
                TProtocolUtil.skip(iprot, field.type);
14838
              }
14839
              break;
14840
            case DESCRIPTION:
14841
              if (field.type == TType.STRING) {
14842
                this.description = iprot.readString();
14843
              } else { 
14844
                TProtocolUtil.skip(iprot, field.type);
14845
              }
14846
              break;
14847
          }
14848
          iprot.readFieldEnd();
14849
        }
14850
      }
14851
      iprot.readStructEnd();
14852
      validate();
14853
    }
14854
 
14855
    public void write(TProtocol oprot) throws TException {
14856
      validate();
14857
 
14858
      oprot.writeStructBegin(STRUCT_DESC);
14859
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
14860
      oprot.writeI64(this.transactionId);
14861
      oprot.writeFieldEnd();
14862
      if (this.description != null) {
14863
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
14864
        oprot.writeString(this.description);
14865
        oprot.writeFieldEnd();
14866
      }
14867
      oprot.writeFieldStop();
14868
      oprot.writeStructEnd();
14869
    }
14870
 
14871
    @Override
14872
    public String toString() {
14873
      StringBuilder sb = new StringBuilder("addTrail_args(");
14874
      boolean first = true;
14875
 
14876
      sb.append("transactionId:");
14877
      sb.append(this.transactionId);
14878
      first = false;
14879
      if (!first) sb.append(", ");
14880
      sb.append("description:");
14881
      if (this.description == null) {
14882
        sb.append("null");
14883
      } else {
14884
        sb.append(this.description);
14885
      }
14886
      first = false;
14887
      sb.append(")");
14888
      return sb.toString();
14889
    }
14890
 
14891
    public void validate() throws TException {
14892
      // check for required fields
14893
    }
14894
 
14895
  }
14896
 
14897
  public static class addTrail_result implements TBase<addTrail_result._Fields>, java.io.Serializable, Cloneable, Comparable<addTrail_result>   {
14898
    private static final TStruct STRUCT_DESC = new TStruct("addTrail_result");
14899
 
14900
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14901
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14902
 
14903
    private boolean success;
14904
    private TransactionServiceException ex;
14905
 
14906
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14907
    public enum _Fields implements TFieldIdEnum {
14908
      SUCCESS((short)0, "success"),
14909
      EX((short)1, "ex");
14910
 
14911
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14912
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14913
 
14914
      static {
14915
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14916
          byId.put((int)field._thriftId, field);
14917
          byName.put(field.getFieldName(), field);
14918
        }
14919
      }
14920
 
14921
      /**
14922
       * Find the _Fields constant that matches fieldId, or null if its not found.
14923
       */
14924
      public static _Fields findByThriftId(int fieldId) {
14925
        return byId.get(fieldId);
14926
      }
14927
 
14928
      /**
14929
       * Find the _Fields constant that matches fieldId, throwing an exception
14930
       * if it is not found.
14931
       */
14932
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14933
        _Fields fields = findByThriftId(fieldId);
14934
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14935
        return fields;
14936
      }
14937
 
14938
      /**
14939
       * Find the _Fields constant that matches name, or null if its not found.
14940
       */
14941
      public static _Fields findByName(String name) {
14942
        return byName.get(name);
14943
      }
14944
 
14945
      private final short _thriftId;
14946
      private final String _fieldName;
14947
 
14948
      _Fields(short thriftId, String fieldName) {
14949
        _thriftId = thriftId;
14950
        _fieldName = fieldName;
14951
      }
14952
 
14953
      public short getThriftFieldId() {
14954
        return _thriftId;
14955
      }
14956
 
14957
      public String getFieldName() {
14958
        return _fieldName;
14959
      }
14960
    }
14961
 
14962
    // isset id assignments
14963
    private static final int __SUCCESS_ISSET_ID = 0;
14964
    private BitSet __isset_bit_vector = new BitSet(1);
14965
 
14966
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14967
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14968
          new FieldValueMetaData(TType.BOOL)));
14969
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14970
          new FieldValueMetaData(TType.STRUCT)));
14971
    }});
14972
 
14973
    static {
14974
      FieldMetaData.addStructMetaDataMap(addTrail_result.class, metaDataMap);
14975
    }
14976
 
14977
    public addTrail_result() {
14978
    }
14979
 
14980
    public addTrail_result(
14981
      boolean success,
14982
      TransactionServiceException ex)
14983
    {
14984
      this();
14985
      this.success = success;
14986
      setSuccessIsSet(true);
14987
      this.ex = ex;
14988
    }
14989
 
14990
    /**
14991
     * Performs a deep copy on <i>other</i>.
14992
     */
14993
    public addTrail_result(addTrail_result other) {
14994
      __isset_bit_vector.clear();
14995
      __isset_bit_vector.or(other.__isset_bit_vector);
14996
      this.success = other.success;
14997
      if (other.isSetEx()) {
14998
        this.ex = new TransactionServiceException(other.ex);
14999
      }
15000
    }
15001
 
15002
    public addTrail_result deepCopy() {
15003
      return new addTrail_result(this);
15004
    }
15005
 
15006
    @Deprecated
15007
    public addTrail_result clone() {
15008
      return new addTrail_result(this);
15009
    }
15010
 
15011
    public boolean isSuccess() {
15012
      return this.success;
15013
    }
15014
 
15015
    public addTrail_result setSuccess(boolean success) {
15016
      this.success = success;
15017
      setSuccessIsSet(true);
15018
      return this;
15019
    }
15020
 
15021
    public void unsetSuccess() {
15022
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15023
    }
15024
 
15025
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15026
    public boolean isSetSuccess() {
15027
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15028
    }
15029
 
15030
    public void setSuccessIsSet(boolean value) {
15031
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15032
    }
15033
 
15034
    public TransactionServiceException getEx() {
15035
      return this.ex;
15036
    }
15037
 
15038
    public addTrail_result setEx(TransactionServiceException ex) {
15039
      this.ex = ex;
15040
      return this;
15041
    }
15042
 
15043
    public void unsetEx() {
15044
      this.ex = null;
15045
    }
15046
 
15047
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15048
    public boolean isSetEx() {
15049
      return this.ex != null;
15050
    }
15051
 
15052
    public void setExIsSet(boolean value) {
15053
      if (!value) {
15054
        this.ex = null;
15055
      }
15056
    }
15057
 
15058
    public void setFieldValue(_Fields field, Object value) {
15059
      switch (field) {
15060
      case SUCCESS:
15061
        if (value == null) {
15062
          unsetSuccess();
15063
        } else {
15064
          setSuccess((Boolean)value);
15065
        }
15066
        break;
15067
 
15068
      case EX:
15069
        if (value == null) {
15070
          unsetEx();
15071
        } else {
15072
          setEx((TransactionServiceException)value);
15073
        }
15074
        break;
15075
 
15076
      }
15077
    }
15078
 
15079
    public void setFieldValue(int fieldID, Object value) {
15080
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15081
    }
15082
 
15083
    public Object getFieldValue(_Fields field) {
15084
      switch (field) {
15085
      case SUCCESS:
15086
        return new Boolean(isSuccess());
15087
 
15088
      case EX:
15089
        return getEx();
15090
 
15091
      }
15092
      throw new IllegalStateException();
15093
    }
15094
 
15095
    public Object getFieldValue(int fieldId) {
15096
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15097
    }
15098
 
15099
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15100
    public boolean isSet(_Fields field) {
15101
      switch (field) {
15102
      case SUCCESS:
15103
        return isSetSuccess();
15104
      case EX:
15105
        return isSetEx();
15106
      }
15107
      throw new IllegalStateException();
15108
    }
15109
 
15110
    public boolean isSet(int fieldID) {
15111
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15112
    }
15113
 
15114
    @Override
15115
    public boolean equals(Object that) {
15116
      if (that == null)
15117
        return false;
15118
      if (that instanceof addTrail_result)
15119
        return this.equals((addTrail_result)that);
15120
      return false;
15121
    }
15122
 
15123
    public boolean equals(addTrail_result that) {
15124
      if (that == null)
15125
        return false;
15126
 
15127
      boolean this_present_success = true;
15128
      boolean that_present_success = true;
15129
      if (this_present_success || that_present_success) {
15130
        if (!(this_present_success && that_present_success))
15131
          return false;
15132
        if (this.success != that.success)
15133
          return false;
15134
      }
15135
 
15136
      boolean this_present_ex = true && this.isSetEx();
15137
      boolean that_present_ex = true && that.isSetEx();
15138
      if (this_present_ex || that_present_ex) {
15139
        if (!(this_present_ex && that_present_ex))
15140
          return false;
15141
        if (!this.ex.equals(that.ex))
15142
          return false;
15143
      }
15144
 
15145
      return true;
15146
    }
15147
 
15148
    @Override
15149
    public int hashCode() {
15150
      return 0;
15151
    }
15152
 
15153
    public int compareTo(addTrail_result other) {
15154
      if (!getClass().equals(other.getClass())) {
15155
        return getClass().getName().compareTo(other.getClass().getName());
15156
      }
15157
 
15158
      int lastComparison = 0;
15159
      addTrail_result typedOther = (addTrail_result)other;
15160
 
15161
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15162
      if (lastComparison != 0) {
15163
        return lastComparison;
15164
      }
15165
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15166
      if (lastComparison != 0) {
15167
        return lastComparison;
15168
      }
15169
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15170
      if (lastComparison != 0) {
15171
        return lastComparison;
15172
      }
15173
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15174
      if (lastComparison != 0) {
15175
        return lastComparison;
15176
      }
15177
      return 0;
15178
    }
15179
 
15180
    public void read(TProtocol iprot) throws TException {
15181
      TField field;
15182
      iprot.readStructBegin();
15183
      while (true)
15184
      {
15185
        field = iprot.readFieldBegin();
15186
        if (field.type == TType.STOP) { 
15187
          break;
15188
        }
15189
        _Fields fieldId = _Fields.findByThriftId(field.id);
15190
        if (fieldId == null) {
15191
          TProtocolUtil.skip(iprot, field.type);
15192
        } else {
15193
          switch (fieldId) {
15194
            case SUCCESS:
15195
              if (field.type == TType.BOOL) {
15196
                this.success = iprot.readBool();
15197
                setSuccessIsSet(true);
15198
              } else { 
15199
                TProtocolUtil.skip(iprot, field.type);
15200
              }
15201
              break;
15202
            case EX:
15203
              if (field.type == TType.STRUCT) {
15204
                this.ex = new TransactionServiceException();
15205
                this.ex.read(iprot);
15206
              } else { 
15207
                TProtocolUtil.skip(iprot, field.type);
15208
              }
15209
              break;
15210
          }
15211
          iprot.readFieldEnd();
15212
        }
15213
      }
15214
      iprot.readStructEnd();
15215
      validate();
15216
    }
15217
 
15218
    public void write(TProtocol oprot) throws TException {
15219
      oprot.writeStructBegin(STRUCT_DESC);
15220
 
15221
      if (this.isSetSuccess()) {
15222
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15223
        oprot.writeBool(this.success);
15224
        oprot.writeFieldEnd();
15225
      } else if (this.isSetEx()) {
15226
        oprot.writeFieldBegin(EX_FIELD_DESC);
15227
        this.ex.write(oprot);
15228
        oprot.writeFieldEnd();
15229
      }
15230
      oprot.writeFieldStop();
15231
      oprot.writeStructEnd();
15232
    }
15233
 
15234
    @Override
15235
    public String toString() {
15236
      StringBuilder sb = new StringBuilder("addTrail_result(");
15237
      boolean first = true;
15238
 
15239
      sb.append("success:");
15240
      sb.append(this.success);
15241
      first = false;
15242
      if (!first) sb.append(", ");
15243
      sb.append("ex:");
15244
      if (this.ex == null) {
15245
        sb.append("null");
15246
      } else {
15247
        sb.append(this.ex);
15248
      }
15249
      first = false;
15250
      sb.append(")");
15251
      return sb.toString();
15252
    }
15253
 
15254
    public void validate() throws TException {
15255
      // check for required fields
15256
    }
15257
 
15258
  }
15259
 
305 ashish 15260
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
15261
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
15262
 
15263
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
15264
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
15265
 
15266
    private long transactionId;
15267
    private boolean valid;
15268
 
15269
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15270
    public enum _Fields implements TFieldIdEnum {
15271
      TRANSACTION_ID((short)1, "transactionId"),
15272
      VALID((short)2, "valid");
15273
 
15274
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15275
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15276
 
15277
      static {
15278
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15279
          byId.put((int)field._thriftId, field);
15280
          byName.put(field.getFieldName(), field);
15281
        }
15282
      }
15283
 
15284
      /**
15285
       * Find the _Fields constant that matches fieldId, or null if its not found.
15286
       */
15287
      public static _Fields findByThriftId(int fieldId) {
15288
        return byId.get(fieldId);
15289
      }
15290
 
15291
      /**
15292
       * Find the _Fields constant that matches fieldId, throwing an exception
15293
       * if it is not found.
15294
       */
15295
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15296
        _Fields fields = findByThriftId(fieldId);
15297
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15298
        return fields;
15299
      }
15300
 
15301
      /**
15302
       * Find the _Fields constant that matches name, or null if its not found.
15303
       */
15304
      public static _Fields findByName(String name) {
15305
        return byName.get(name);
15306
      }
15307
 
15308
      private final short _thriftId;
15309
      private final String _fieldName;
15310
 
15311
      _Fields(short thriftId, String fieldName) {
15312
        _thriftId = thriftId;
15313
        _fieldName = fieldName;
15314
      }
15315
 
15316
      public short getThriftFieldId() {
15317
        return _thriftId;
15318
      }
15319
 
15320
      public String getFieldName() {
15321
        return _fieldName;
15322
      }
15323
    }
15324
 
15325
    // isset id assignments
15326
    private static final int __TRANSACTIONID_ISSET_ID = 0;
15327
    private static final int __VALID_ISSET_ID = 1;
15328
    private BitSet __isset_bit_vector = new BitSet(2);
15329
 
15330
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15331
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
15332
          new FieldValueMetaData(TType.I64)));
15333
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
15334
          new FieldValueMetaData(TType.BOOL)));
15335
    }});
15336
 
15337
    static {
15338
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
15339
    }
15340
 
15341
    public getAlerts_args() {
15342
    }
15343
 
15344
    public getAlerts_args(
15345
      long transactionId,
15346
      boolean valid)
15347
    {
15348
      this();
15349
      this.transactionId = transactionId;
15350
      setTransactionIdIsSet(true);
15351
      this.valid = valid;
15352
      setValidIsSet(true);
15353
    }
15354
 
15355
    /**
15356
     * Performs a deep copy on <i>other</i>.
15357
     */
15358
    public getAlerts_args(getAlerts_args other) {
15359
      __isset_bit_vector.clear();
15360
      __isset_bit_vector.or(other.__isset_bit_vector);
15361
      this.transactionId = other.transactionId;
15362
      this.valid = other.valid;
15363
    }
15364
 
15365
    public getAlerts_args deepCopy() {
15366
      return new getAlerts_args(this);
15367
    }
15368
 
15369
    @Deprecated
15370
    public getAlerts_args clone() {
15371
      return new getAlerts_args(this);
15372
    }
15373
 
15374
    public long getTransactionId() {
15375
      return this.transactionId;
15376
    }
15377
 
15378
    public getAlerts_args setTransactionId(long transactionId) {
15379
      this.transactionId = transactionId;
15380
      setTransactionIdIsSet(true);
15381
      return this;
15382
    }
15383
 
15384
    public void unsetTransactionId() {
15385
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
15386
    }
15387
 
15388
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
15389
    public boolean isSetTransactionId() {
15390
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
15391
    }
15392
 
15393
    public void setTransactionIdIsSet(boolean value) {
15394
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
15395
    }
15396
 
15397
    public boolean isValid() {
15398
      return this.valid;
15399
    }
15400
 
15401
    public getAlerts_args setValid(boolean valid) {
15402
      this.valid = valid;
15403
      setValidIsSet(true);
15404
      return this;
15405
    }
15406
 
15407
    public void unsetValid() {
15408
      __isset_bit_vector.clear(__VALID_ISSET_ID);
15409
    }
15410
 
15411
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
15412
    public boolean isSetValid() {
15413
      return __isset_bit_vector.get(__VALID_ISSET_ID);
15414
    }
15415
 
15416
    public void setValidIsSet(boolean value) {
15417
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
15418
    }
15419
 
15420
    public void setFieldValue(_Fields field, Object value) {
15421
      switch (field) {
15422
      case TRANSACTION_ID:
15423
        if (value == null) {
15424
          unsetTransactionId();
15425
        } else {
15426
          setTransactionId((Long)value);
15427
        }
15428
        break;
15429
 
15430
      case VALID:
15431
        if (value == null) {
15432
          unsetValid();
15433
        } else {
15434
          setValid((Boolean)value);
15435
        }
15436
        break;
15437
 
15438
      }
15439
    }
15440
 
15441
    public void setFieldValue(int fieldID, Object value) {
15442
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15443
    }
15444
 
15445
    public Object getFieldValue(_Fields field) {
15446
      switch (field) {
15447
      case TRANSACTION_ID:
15448
        return new Long(getTransactionId());
15449
 
15450
      case VALID:
15451
        return new Boolean(isValid());
15452
 
15453
      }
15454
      throw new IllegalStateException();
15455
    }
15456
 
15457
    public Object getFieldValue(int fieldId) {
15458
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15459
    }
15460
 
15461
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15462
    public boolean isSet(_Fields field) {
15463
      switch (field) {
15464
      case TRANSACTION_ID:
15465
        return isSetTransactionId();
15466
      case VALID:
15467
        return isSetValid();
15468
      }
15469
      throw new IllegalStateException();
15470
    }
15471
 
15472
    public boolean isSet(int fieldID) {
15473
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15474
    }
15475
 
15476
    @Override
15477
    public boolean equals(Object that) {
15478
      if (that == null)
15479
        return false;
15480
      if (that instanceof getAlerts_args)
15481
        return this.equals((getAlerts_args)that);
15482
      return false;
15483
    }
15484
 
15485
    public boolean equals(getAlerts_args that) {
15486
      if (that == null)
15487
        return false;
15488
 
15489
      boolean this_present_transactionId = true;
15490
      boolean that_present_transactionId = true;
15491
      if (this_present_transactionId || that_present_transactionId) {
15492
        if (!(this_present_transactionId && that_present_transactionId))
15493
          return false;
15494
        if (this.transactionId != that.transactionId)
15495
          return false;
15496
      }
15497
 
15498
      boolean this_present_valid = true;
15499
      boolean that_present_valid = true;
15500
      if (this_present_valid || that_present_valid) {
15501
        if (!(this_present_valid && that_present_valid))
15502
          return false;
15503
        if (this.valid != that.valid)
15504
          return false;
15505
      }
15506
 
15507
      return true;
15508
    }
15509
 
15510
    @Override
15511
    public int hashCode() {
15512
      return 0;
15513
    }
15514
 
15515
    public int compareTo(getAlerts_args other) {
15516
      if (!getClass().equals(other.getClass())) {
15517
        return getClass().getName().compareTo(other.getClass().getName());
15518
      }
15519
 
15520
      int lastComparison = 0;
15521
      getAlerts_args typedOther = (getAlerts_args)other;
15522
 
15523
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
15524
      if (lastComparison != 0) {
15525
        return lastComparison;
15526
      }
15527
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
15528
      if (lastComparison != 0) {
15529
        return lastComparison;
15530
      }
15531
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
15532
      if (lastComparison != 0) {
15533
        return lastComparison;
15534
      }
15535
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
15536
      if (lastComparison != 0) {
15537
        return lastComparison;
15538
      }
15539
      return 0;
15540
    }
15541
 
15542
    public void read(TProtocol iprot) throws TException {
15543
      TField field;
15544
      iprot.readStructBegin();
15545
      while (true)
15546
      {
15547
        field = iprot.readFieldBegin();
15548
        if (field.type == TType.STOP) { 
15549
          break;
15550
        }
15551
        _Fields fieldId = _Fields.findByThriftId(field.id);
15552
        if (fieldId == null) {
15553
          TProtocolUtil.skip(iprot, field.type);
15554
        } else {
15555
          switch (fieldId) {
15556
            case TRANSACTION_ID:
15557
              if (field.type == TType.I64) {
15558
                this.transactionId = iprot.readI64();
15559
                setTransactionIdIsSet(true);
15560
              } else { 
15561
                TProtocolUtil.skip(iprot, field.type);
15562
              }
15563
              break;
15564
            case VALID:
15565
              if (field.type == TType.BOOL) {
15566
                this.valid = iprot.readBool();
15567
                setValidIsSet(true);
15568
              } else { 
15569
                TProtocolUtil.skip(iprot, field.type);
15570
              }
15571
              break;
15572
          }
15573
          iprot.readFieldEnd();
15574
        }
15575
      }
15576
      iprot.readStructEnd();
15577
      validate();
15578
    }
15579
 
15580
    public void write(TProtocol oprot) throws TException {
15581
      validate();
15582
 
15583
      oprot.writeStructBegin(STRUCT_DESC);
15584
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
15585
      oprot.writeI64(this.transactionId);
15586
      oprot.writeFieldEnd();
15587
      oprot.writeFieldBegin(VALID_FIELD_DESC);
15588
      oprot.writeBool(this.valid);
15589
      oprot.writeFieldEnd();
15590
      oprot.writeFieldStop();
15591
      oprot.writeStructEnd();
15592
    }
15593
 
15594
    @Override
15595
    public String toString() {
15596
      StringBuilder sb = new StringBuilder("getAlerts_args(");
15597
      boolean first = true;
15598
 
15599
      sb.append("transactionId:");
15600
      sb.append(this.transactionId);
15601
      first = false;
15602
      if (!first) sb.append(", ");
15603
      sb.append("valid:");
15604
      sb.append(this.valid);
15605
      first = false;
15606
      sb.append(")");
15607
      return sb.toString();
15608
    }
15609
 
15610
    public void validate() throws TException {
15611
      // check for required fields
15612
    }
15613
 
15614
  }
15615
 
15616
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
15617
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
15618
 
15619
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
15620
 
15621
    private List<Alert> success;
15622
 
15623
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15624
    public enum _Fields implements TFieldIdEnum {
15625
      SUCCESS((short)0, "success");
15626
 
15627
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15628
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15629
 
15630
      static {
15631
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15632
          byId.put((int)field._thriftId, field);
15633
          byName.put(field.getFieldName(), field);
15634
        }
15635
      }
15636
 
15637
      /**
15638
       * Find the _Fields constant that matches fieldId, or null if its not found.
15639
       */
15640
      public static _Fields findByThriftId(int fieldId) {
15641
        return byId.get(fieldId);
15642
      }
15643
 
15644
      /**
15645
       * Find the _Fields constant that matches fieldId, throwing an exception
15646
       * if it is not found.
15647
       */
15648
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15649
        _Fields fields = findByThriftId(fieldId);
15650
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15651
        return fields;
15652
      }
15653
 
15654
      /**
15655
       * Find the _Fields constant that matches name, or null if its not found.
15656
       */
15657
      public static _Fields findByName(String name) {
15658
        return byName.get(name);
15659
      }
15660
 
15661
      private final short _thriftId;
15662
      private final String _fieldName;
15663
 
15664
      _Fields(short thriftId, String fieldName) {
15665
        _thriftId = thriftId;
15666
        _fieldName = fieldName;
15667
      }
15668
 
15669
      public short getThriftFieldId() {
15670
        return _thriftId;
15671
      }
15672
 
15673
      public String getFieldName() {
15674
        return _fieldName;
15675
      }
15676
    }
15677
 
15678
    // isset id assignments
15679
 
15680
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15681
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15682
          new ListMetaData(TType.LIST, 
15683
              new StructMetaData(TType.STRUCT, Alert.class))));
15684
    }});
15685
 
15686
    static {
15687
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
15688
    }
15689
 
15690
    public getAlerts_result() {
15691
    }
15692
 
15693
    public getAlerts_result(
15694
      List<Alert> success)
15695
    {
15696
      this();
15697
      this.success = success;
15698
    }
15699
 
15700
    /**
15701
     * Performs a deep copy on <i>other</i>.
15702
     */
15703
    public getAlerts_result(getAlerts_result other) {
15704
      if (other.isSetSuccess()) {
15705
        List<Alert> __this__success = new ArrayList<Alert>();
15706
        for (Alert other_element : other.success) {
15707
          __this__success.add(new Alert(other_element));
15708
        }
15709
        this.success = __this__success;
15710
      }
15711
    }
15712
 
15713
    public getAlerts_result deepCopy() {
15714
      return new getAlerts_result(this);
15715
    }
15716
 
15717
    @Deprecated
15718
    public getAlerts_result clone() {
15719
      return new getAlerts_result(this);
15720
    }
15721
 
15722
    public int getSuccessSize() {
15723
      return (this.success == null) ? 0 : this.success.size();
15724
    }
15725
 
15726
    public java.util.Iterator<Alert> getSuccessIterator() {
15727
      return (this.success == null) ? null : this.success.iterator();
15728
    }
15729
 
15730
    public void addToSuccess(Alert elem) {
15731
      if (this.success == null) {
15732
        this.success = new ArrayList<Alert>();
15733
      }
15734
      this.success.add(elem);
15735
    }
15736
 
15737
    public List<Alert> getSuccess() {
15738
      return this.success;
15739
    }
15740
 
15741
    public getAlerts_result setSuccess(List<Alert> success) {
15742
      this.success = success;
15743
      return this;
15744
    }
15745
 
15746
    public void unsetSuccess() {
15747
      this.success = null;
15748
    }
15749
 
15750
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15751
    public boolean isSetSuccess() {
15752
      return this.success != null;
15753
    }
15754
 
15755
    public void setSuccessIsSet(boolean value) {
15756
      if (!value) {
15757
        this.success = null;
15758
      }
15759
    }
15760
 
15761
    public void setFieldValue(_Fields field, Object value) {
15762
      switch (field) {
15763
      case SUCCESS:
15764
        if (value == null) {
15765
          unsetSuccess();
15766
        } else {
15767
          setSuccess((List<Alert>)value);
15768
        }
15769
        break;
15770
 
15771
      }
15772
    }
15773
 
15774
    public void setFieldValue(int fieldID, Object value) {
15775
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15776
    }
15777
 
15778
    public Object getFieldValue(_Fields field) {
15779
      switch (field) {
15780
      case SUCCESS:
15781
        return getSuccess();
15782
 
15783
      }
15784
      throw new IllegalStateException();
15785
    }
15786
 
15787
    public Object getFieldValue(int fieldId) {
15788
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15789
    }
15790
 
15791
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15792
    public boolean isSet(_Fields field) {
15793
      switch (field) {
15794
      case SUCCESS:
15795
        return isSetSuccess();
15796
      }
15797
      throw new IllegalStateException();
15798
    }
15799
 
15800
    public boolean isSet(int fieldID) {
15801
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15802
    }
15803
 
15804
    @Override
15805
    public boolean equals(Object that) {
15806
      if (that == null)
15807
        return false;
15808
      if (that instanceof getAlerts_result)
15809
        return this.equals((getAlerts_result)that);
15810
      return false;
15811
    }
15812
 
15813
    public boolean equals(getAlerts_result that) {
15814
      if (that == null)
15815
        return false;
15816
 
15817
      boolean this_present_success = true && this.isSetSuccess();
15818
      boolean that_present_success = true && that.isSetSuccess();
15819
      if (this_present_success || that_present_success) {
15820
        if (!(this_present_success && that_present_success))
15821
          return false;
15822
        if (!this.success.equals(that.success))
15823
          return false;
15824
      }
15825
 
15826
      return true;
15827
    }
15828
 
15829
    @Override
15830
    public int hashCode() {
15831
      return 0;
15832
    }
15833
 
15834
    public int compareTo(getAlerts_result other) {
15835
      if (!getClass().equals(other.getClass())) {
15836
        return getClass().getName().compareTo(other.getClass().getName());
15837
      }
15838
 
15839
      int lastComparison = 0;
15840
      getAlerts_result typedOther = (getAlerts_result)other;
15841
 
15842
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15843
      if (lastComparison != 0) {
15844
        return lastComparison;
15845
      }
15846
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15847
      if (lastComparison != 0) {
15848
        return lastComparison;
15849
      }
15850
      return 0;
15851
    }
15852
 
15853
    public void read(TProtocol iprot) throws TException {
15854
      TField field;
15855
      iprot.readStructBegin();
15856
      while (true)
15857
      {
15858
        field = iprot.readFieldBegin();
15859
        if (field.type == TType.STOP) { 
15860
          break;
15861
        }
15862
        _Fields fieldId = _Fields.findByThriftId(field.id);
15863
        if (fieldId == null) {
15864
          TProtocolUtil.skip(iprot, field.type);
15865
        } else {
15866
          switch (fieldId) {
15867
            case SUCCESS:
15868
              if (field.type == TType.LIST) {
15869
                {
15870
                  TList _list50 = iprot.readListBegin();
15871
                  this.success = new ArrayList<Alert>(_list50.size);
15872
                  for (int _i51 = 0; _i51 < _list50.size; ++_i51)
15873
                  {
15874
                    Alert _elem52;
15875
                    _elem52 = new Alert();
15876
                    _elem52.read(iprot);
15877
                    this.success.add(_elem52);
15878
                  }
15879
                  iprot.readListEnd();
15880
                }
15881
              } else { 
15882
                TProtocolUtil.skip(iprot, field.type);
15883
              }
15884
              break;
15885
          }
15886
          iprot.readFieldEnd();
15887
        }
15888
      }
15889
      iprot.readStructEnd();
15890
      validate();
15891
    }
15892
 
15893
    public void write(TProtocol oprot) throws TException {
15894
      oprot.writeStructBegin(STRUCT_DESC);
15895
 
15896
      if (this.isSetSuccess()) {
15897
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15898
        {
15899
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
15900
          for (Alert _iter53 : this.success)
15901
          {
15902
            _iter53.write(oprot);
15903
          }
15904
          oprot.writeListEnd();
15905
        }
15906
        oprot.writeFieldEnd();
15907
      }
15908
      oprot.writeFieldStop();
15909
      oprot.writeStructEnd();
15910
    }
15911
 
15912
    @Override
15913
    public String toString() {
15914
      StringBuilder sb = new StringBuilder("getAlerts_result(");
15915
      boolean first = true;
15916
 
15917
      sb.append("success:");
15918
      if (this.success == null) {
15919
        sb.append("null");
15920
      } else {
15921
        sb.append(this.success);
15922
      }
15923
      first = false;
15924
      sb.append(")");
15925
      return sb.toString();
15926
    }
15927
 
15928
    public void validate() throws TException {
15929
      // check for required fields
15930
    }
15931
 
15932
  }
15933
 
15934
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
15935
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
15936
 
15937
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
15938
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
15939
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
15940
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
15941
 
15942
    private long transactionId;
15943
    private boolean unset;
15944
    private long type;
15945
    private String comment;
15946
 
15947
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15948
    public enum _Fields implements TFieldIdEnum {
15949
      TRANSACTION_ID((short)1, "transactionId"),
15950
      UNSET((short)2, "unset"),
15951
      TYPE((short)3, "type"),
15952
      COMMENT((short)4, "comment");
15953
 
15954
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15955
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15956
 
15957
      static {
15958
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15959
          byId.put((int)field._thriftId, field);
15960
          byName.put(field.getFieldName(), field);
15961
        }
15962
      }
15963
 
15964
      /**
15965
       * Find the _Fields constant that matches fieldId, or null if its not found.
15966
       */
15967
      public static _Fields findByThriftId(int fieldId) {
15968
        return byId.get(fieldId);
15969
      }
15970
 
15971
      /**
15972
       * Find the _Fields constant that matches fieldId, throwing an exception
15973
       * if it is not found.
15974
       */
15975
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15976
        _Fields fields = findByThriftId(fieldId);
15977
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15978
        return fields;
15979
      }
15980
 
15981
      /**
15982
       * Find the _Fields constant that matches name, or null if its not found.
15983
       */
15984
      public static _Fields findByName(String name) {
15985
        return byName.get(name);
15986
      }
15987
 
15988
      private final short _thriftId;
15989
      private final String _fieldName;
15990
 
15991
      _Fields(short thriftId, String fieldName) {
15992
        _thriftId = thriftId;
15993
        _fieldName = fieldName;
15994
      }
15995
 
15996
      public short getThriftFieldId() {
15997
        return _thriftId;
15998
      }
15999
 
16000
      public String getFieldName() {
16001
        return _fieldName;
16002
      }
16003
    }
16004
 
16005
    // isset id assignments
16006
    private static final int __TRANSACTIONID_ISSET_ID = 0;
16007
    private static final int __UNSET_ISSET_ID = 1;
16008
    private static final int __TYPE_ISSET_ID = 2;
16009
    private BitSet __isset_bit_vector = new BitSet(3);
16010
 
16011
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16012
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
16013
          new FieldValueMetaData(TType.I64)));
16014
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
16015
          new FieldValueMetaData(TType.BOOL)));
16016
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
16017
          new FieldValueMetaData(TType.I64)));
16018
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
16019
          new FieldValueMetaData(TType.STRING)));
16020
    }});
16021
 
16022
    static {
16023
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
16024
    }
16025
 
16026
    public setAlert_args() {
16027
    }
16028
 
16029
    public setAlert_args(
16030
      long transactionId,
16031
      boolean unset,
16032
      long type,
16033
      String comment)
16034
    {
16035
      this();
16036
      this.transactionId = transactionId;
16037
      setTransactionIdIsSet(true);
16038
      this.unset = unset;
16039
      setUnsetIsSet(true);
16040
      this.type = type;
16041
      setTypeIsSet(true);
16042
      this.comment = comment;
16043
    }
16044
 
16045
    /**
16046
     * Performs a deep copy on <i>other</i>.
16047
     */
16048
    public setAlert_args(setAlert_args other) {
16049
      __isset_bit_vector.clear();
16050
      __isset_bit_vector.or(other.__isset_bit_vector);
16051
      this.transactionId = other.transactionId;
16052
      this.unset = other.unset;
16053
      this.type = other.type;
16054
      if (other.isSetComment()) {
16055
        this.comment = other.comment;
16056
      }
16057
    }
16058
 
16059
    public setAlert_args deepCopy() {
16060
      return new setAlert_args(this);
16061
    }
16062
 
16063
    @Deprecated
16064
    public setAlert_args clone() {
16065
      return new setAlert_args(this);
16066
    }
16067
 
16068
    public long getTransactionId() {
16069
      return this.transactionId;
16070
    }
16071
 
16072
    public setAlert_args setTransactionId(long transactionId) {
16073
      this.transactionId = transactionId;
16074
      setTransactionIdIsSet(true);
16075
      return this;
16076
    }
16077
 
16078
    public void unsetTransactionId() {
16079
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
16080
    }
16081
 
16082
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
16083
    public boolean isSetTransactionId() {
16084
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
16085
    }
16086
 
16087
    public void setTransactionIdIsSet(boolean value) {
16088
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
16089
    }
16090
 
16091
    public boolean isUnset() {
16092
      return this.unset;
16093
    }
16094
 
16095
    public setAlert_args setUnset(boolean unset) {
16096
      this.unset = unset;
16097
      setUnsetIsSet(true);
16098
      return this;
16099
    }
16100
 
16101
    public void unsetUnset() {
16102
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
16103
    }
16104
 
16105
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
16106
    public boolean isSetUnset() {
16107
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
16108
    }
16109
 
16110
    public void setUnsetIsSet(boolean value) {
16111
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
16112
    }
16113
 
16114
    public long getType() {
16115
      return this.type;
16116
    }
16117
 
16118
    public setAlert_args setType(long type) {
16119
      this.type = type;
16120
      setTypeIsSet(true);
16121
      return this;
16122
    }
16123
 
16124
    public void unsetType() {
16125
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
16126
    }
16127
 
16128
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
16129
    public boolean isSetType() {
16130
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
16131
    }
16132
 
16133
    public void setTypeIsSet(boolean value) {
16134
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
16135
    }
16136
 
16137
    public String getComment() {
16138
      return this.comment;
16139
    }
16140
 
16141
    public setAlert_args setComment(String comment) {
16142
      this.comment = comment;
16143
      return this;
16144
    }
16145
 
16146
    public void unsetComment() {
16147
      this.comment = null;
16148
    }
16149
 
16150
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
16151
    public boolean isSetComment() {
16152
      return this.comment != null;
16153
    }
16154
 
16155
    public void setCommentIsSet(boolean value) {
16156
      if (!value) {
16157
        this.comment = null;
16158
      }
16159
    }
16160
 
16161
    public void setFieldValue(_Fields field, Object value) {
16162
      switch (field) {
16163
      case TRANSACTION_ID:
16164
        if (value == null) {
16165
          unsetTransactionId();
16166
        } else {
16167
          setTransactionId((Long)value);
16168
        }
16169
        break;
16170
 
16171
      case UNSET:
16172
        if (value == null) {
16173
          unsetUnset();
16174
        } else {
16175
          setUnset((Boolean)value);
16176
        }
16177
        break;
16178
 
16179
      case TYPE:
16180
        if (value == null) {
16181
          unsetType();
16182
        } else {
16183
          setType((Long)value);
16184
        }
16185
        break;
16186
 
16187
      case COMMENT:
16188
        if (value == null) {
16189
          unsetComment();
16190
        } else {
16191
          setComment((String)value);
16192
        }
16193
        break;
16194
 
16195
      }
16196
    }
16197
 
16198
    public void setFieldValue(int fieldID, Object value) {
16199
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16200
    }
16201
 
16202
    public Object getFieldValue(_Fields field) {
16203
      switch (field) {
16204
      case TRANSACTION_ID:
16205
        return new Long(getTransactionId());
16206
 
16207
      case UNSET:
16208
        return new Boolean(isUnset());
16209
 
16210
      case TYPE:
16211
        return new Long(getType());
16212
 
16213
      case COMMENT:
16214
        return getComment();
16215
 
16216
      }
16217
      throw new IllegalStateException();
16218
    }
16219
 
16220
    public Object getFieldValue(int fieldId) {
16221
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16222
    }
16223
 
16224
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16225
    public boolean isSet(_Fields field) {
16226
      switch (field) {
16227
      case TRANSACTION_ID:
16228
        return isSetTransactionId();
16229
      case UNSET:
16230
        return isSetUnset();
16231
      case TYPE:
16232
        return isSetType();
16233
      case COMMENT:
16234
        return isSetComment();
16235
      }
16236
      throw new IllegalStateException();
16237
    }
16238
 
16239
    public boolean isSet(int fieldID) {
16240
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16241
    }
16242
 
16243
    @Override
16244
    public boolean equals(Object that) {
16245
      if (that == null)
16246
        return false;
16247
      if (that instanceof setAlert_args)
16248
        return this.equals((setAlert_args)that);
16249
      return false;
16250
    }
16251
 
16252
    public boolean equals(setAlert_args that) {
16253
      if (that == null)
16254
        return false;
16255
 
16256
      boolean this_present_transactionId = true;
16257
      boolean that_present_transactionId = true;
16258
      if (this_present_transactionId || that_present_transactionId) {
16259
        if (!(this_present_transactionId && that_present_transactionId))
16260
          return false;
16261
        if (this.transactionId != that.transactionId)
16262
          return false;
16263
      }
16264
 
16265
      boolean this_present_unset = true;
16266
      boolean that_present_unset = true;
16267
      if (this_present_unset || that_present_unset) {
16268
        if (!(this_present_unset && that_present_unset))
16269
          return false;
16270
        if (this.unset != that.unset)
16271
          return false;
16272
      }
16273
 
16274
      boolean this_present_type = true;
16275
      boolean that_present_type = true;
16276
      if (this_present_type || that_present_type) {
16277
        if (!(this_present_type && that_present_type))
16278
          return false;
16279
        if (this.type != that.type)
16280
          return false;
16281
      }
16282
 
16283
      boolean this_present_comment = true && this.isSetComment();
16284
      boolean that_present_comment = true && that.isSetComment();
16285
      if (this_present_comment || that_present_comment) {
16286
        if (!(this_present_comment && that_present_comment))
16287
          return false;
16288
        if (!this.comment.equals(that.comment))
16289
          return false;
16290
      }
16291
 
16292
      return true;
16293
    }
16294
 
16295
    @Override
16296
    public int hashCode() {
16297
      return 0;
16298
    }
16299
 
16300
    public int compareTo(setAlert_args other) {
16301
      if (!getClass().equals(other.getClass())) {
16302
        return getClass().getName().compareTo(other.getClass().getName());
16303
      }
16304
 
16305
      int lastComparison = 0;
16306
      setAlert_args typedOther = (setAlert_args)other;
16307
 
16308
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
16309
      if (lastComparison != 0) {
16310
        return lastComparison;
16311
      }
16312
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
16313
      if (lastComparison != 0) {
16314
        return lastComparison;
16315
      }
16316
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
16317
      if (lastComparison != 0) {
16318
        return lastComparison;
16319
      }
16320
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
16321
      if (lastComparison != 0) {
16322
        return lastComparison;
16323
      }
16324
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
16325
      if (lastComparison != 0) {
16326
        return lastComparison;
16327
      }
16328
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
16329
      if (lastComparison != 0) {
16330
        return lastComparison;
16331
      }
16332
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
16333
      if (lastComparison != 0) {
16334
        return lastComparison;
16335
      }
16336
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
16337
      if (lastComparison != 0) {
16338
        return lastComparison;
16339
      }
16340
      return 0;
16341
    }
16342
 
16343
    public void read(TProtocol iprot) throws TException {
16344
      TField field;
16345
      iprot.readStructBegin();
16346
      while (true)
16347
      {
16348
        field = iprot.readFieldBegin();
16349
        if (field.type == TType.STOP) { 
16350
          break;
16351
        }
16352
        _Fields fieldId = _Fields.findByThriftId(field.id);
16353
        if (fieldId == null) {
16354
          TProtocolUtil.skip(iprot, field.type);
16355
        } else {
16356
          switch (fieldId) {
16357
            case TRANSACTION_ID:
16358
              if (field.type == TType.I64) {
16359
                this.transactionId = iprot.readI64();
16360
                setTransactionIdIsSet(true);
16361
              } else { 
16362
                TProtocolUtil.skip(iprot, field.type);
16363
              }
16364
              break;
16365
            case UNSET:
16366
              if (field.type == TType.BOOL) {
16367
                this.unset = iprot.readBool();
16368
                setUnsetIsSet(true);
16369
              } else { 
16370
                TProtocolUtil.skip(iprot, field.type);
16371
              }
16372
              break;
16373
            case TYPE:
16374
              if (field.type == TType.I64) {
16375
                this.type = iprot.readI64();
16376
                setTypeIsSet(true);
16377
              } else { 
16378
                TProtocolUtil.skip(iprot, field.type);
16379
              }
16380
              break;
16381
            case COMMENT:
16382
              if (field.type == TType.STRING) {
16383
                this.comment = iprot.readString();
16384
              } else { 
16385
                TProtocolUtil.skip(iprot, field.type);
16386
              }
16387
              break;
16388
          }
16389
          iprot.readFieldEnd();
16390
        }
16391
      }
16392
      iprot.readStructEnd();
16393
      validate();
16394
    }
16395
 
16396
    public void write(TProtocol oprot) throws TException {
16397
      validate();
16398
 
16399
      oprot.writeStructBegin(STRUCT_DESC);
16400
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
16401
      oprot.writeI64(this.transactionId);
16402
      oprot.writeFieldEnd();
16403
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
16404
      oprot.writeBool(this.unset);
16405
      oprot.writeFieldEnd();
16406
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
16407
      oprot.writeI64(this.type);
16408
      oprot.writeFieldEnd();
16409
      if (this.comment != null) {
16410
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
16411
        oprot.writeString(this.comment);
16412
        oprot.writeFieldEnd();
16413
      }
16414
      oprot.writeFieldStop();
16415
      oprot.writeStructEnd();
16416
    }
16417
 
16418
    @Override
16419
    public String toString() {
16420
      StringBuilder sb = new StringBuilder("setAlert_args(");
16421
      boolean first = true;
16422
 
16423
      sb.append("transactionId:");
16424
      sb.append(this.transactionId);
16425
      first = false;
16426
      if (!first) sb.append(", ");
16427
      sb.append("unset:");
16428
      sb.append(this.unset);
16429
      first = false;
16430
      if (!first) sb.append(", ");
16431
      sb.append("type:");
16432
      sb.append(this.type);
16433
      first = false;
16434
      if (!first) sb.append(", ");
16435
      sb.append("comment:");
16436
      if (this.comment == null) {
16437
        sb.append("null");
16438
      } else {
16439
        sb.append(this.comment);
16440
      }
16441
      first = false;
16442
      sb.append(")");
16443
      return sb.toString();
16444
    }
16445
 
16446
    public void validate() throws TException {
16447
      // check for required fields
16448
    }
16449
 
16450
  }
16451
 
16452
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
16453
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
16454
 
16455
 
16456
 
16457
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16458
    public enum _Fields implements TFieldIdEnum {
16459
;
16460
 
16461
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16462
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16463
 
16464
      static {
16465
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16466
          byId.put((int)field._thriftId, field);
16467
          byName.put(field.getFieldName(), field);
16468
        }
16469
      }
16470
 
16471
      /**
16472
       * Find the _Fields constant that matches fieldId, or null if its not found.
16473
       */
16474
      public static _Fields findByThriftId(int fieldId) {
16475
        return byId.get(fieldId);
16476
      }
16477
 
16478
      /**
16479
       * Find the _Fields constant that matches fieldId, throwing an exception
16480
       * if it is not found.
16481
       */
16482
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16483
        _Fields fields = findByThriftId(fieldId);
16484
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16485
        return fields;
16486
      }
16487
 
16488
      /**
16489
       * Find the _Fields constant that matches name, or null if its not found.
16490
       */
16491
      public static _Fields findByName(String name) {
16492
        return byName.get(name);
16493
      }
16494
 
16495
      private final short _thriftId;
16496
      private final String _fieldName;
16497
 
16498
      _Fields(short thriftId, String fieldName) {
16499
        _thriftId = thriftId;
16500
        _fieldName = fieldName;
16501
      }
16502
 
16503
      public short getThriftFieldId() {
16504
        return _thriftId;
16505
      }
16506
 
16507
      public String getFieldName() {
16508
        return _fieldName;
16509
      }
16510
    }
16511
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16512
    }});
16513
 
16514
    static {
16515
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
16516
    }
16517
 
16518
    public setAlert_result() {
16519
    }
16520
 
16521
    /**
16522
     * Performs a deep copy on <i>other</i>.
16523
     */
16524
    public setAlert_result(setAlert_result other) {
16525
    }
16526
 
16527
    public setAlert_result deepCopy() {
16528
      return new setAlert_result(this);
16529
    }
16530
 
16531
    @Deprecated
16532
    public setAlert_result clone() {
16533
      return new setAlert_result(this);
16534
    }
16535
 
16536
    public void setFieldValue(_Fields field, Object value) {
16537
      switch (field) {
16538
      }
16539
    }
16540
 
16541
    public void setFieldValue(int fieldID, Object value) {
16542
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16543
    }
16544
 
16545
    public Object getFieldValue(_Fields field) {
16546
      switch (field) {
16547
      }
16548
      throw new IllegalStateException();
16549
    }
16550
 
16551
    public Object getFieldValue(int fieldId) {
16552
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16553
    }
16554
 
16555
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16556
    public boolean isSet(_Fields field) {
16557
      switch (field) {
16558
      }
16559
      throw new IllegalStateException();
16560
    }
16561
 
16562
    public boolean isSet(int fieldID) {
16563
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16564
    }
16565
 
16566
    @Override
16567
    public boolean equals(Object that) {
16568
      if (that == null)
16569
        return false;
16570
      if (that instanceof setAlert_result)
16571
        return this.equals((setAlert_result)that);
16572
      return false;
16573
    }
16574
 
16575
    public boolean equals(setAlert_result that) {
16576
      if (that == null)
16577
        return false;
16578
 
16579
      return true;
16580
    }
16581
 
16582
    @Override
16583
    public int hashCode() {
16584
      return 0;
16585
    }
16586
 
16587
    public int compareTo(setAlert_result other) {
16588
      if (!getClass().equals(other.getClass())) {
16589
        return getClass().getName().compareTo(other.getClass().getName());
16590
      }
16591
 
16592
      int lastComparison = 0;
16593
      setAlert_result typedOther = (setAlert_result)other;
16594
 
16595
      return 0;
16596
    }
16597
 
16598
    public void read(TProtocol iprot) throws TException {
16599
      TField field;
16600
      iprot.readStructBegin();
16601
      while (true)
16602
      {
16603
        field = iprot.readFieldBegin();
16604
        if (field.type == TType.STOP) { 
16605
          break;
16606
        }
16607
        _Fields fieldId = _Fields.findByThriftId(field.id);
16608
        if (fieldId == null) {
16609
          TProtocolUtil.skip(iprot, field.type);
16610
        } else {
16611
          switch (fieldId) {
16612
          }
16613
          iprot.readFieldEnd();
16614
        }
16615
      }
16616
      iprot.readStructEnd();
16617
      validate();
16618
    }
16619
 
16620
    public void write(TProtocol oprot) throws TException {
16621
      oprot.writeStructBegin(STRUCT_DESC);
16622
 
16623
      oprot.writeFieldStop();
16624
      oprot.writeStructEnd();
16625
    }
16626
 
16627
    @Override
16628
    public String toString() {
16629
      StringBuilder sb = new StringBuilder("setAlert_result(");
16630
      boolean first = true;
16631
 
16632
      sb.append(")");
16633
      return sb.toString();
16634
    }
16635
 
16636
    public void validate() throws TException {
16637
      // check for required fields
16638
    }
16639
 
16640
  }
16641
 
16642
  public static class getExtraInfo_args implements TBase<getExtraInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<getExtraInfo_args>   {
16643
    private static final TStruct STRUCT_DESC = new TStruct("getExtraInfo_args");
16644
 
16645
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transaction_id", TType.I64, (short)1);
16646
 
16647
    private long transaction_id;
16648
 
16649
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16650
    public enum _Fields implements TFieldIdEnum {
16651
      TRANSACTION_ID((short)1, "transaction_id");
16652
 
16653
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16654
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16655
 
16656
      static {
16657
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16658
          byId.put((int)field._thriftId, field);
16659
          byName.put(field.getFieldName(), field);
16660
        }
16661
      }
16662
 
16663
      /**
16664
       * Find the _Fields constant that matches fieldId, or null if its not found.
16665
       */
16666
      public static _Fields findByThriftId(int fieldId) {
16667
        return byId.get(fieldId);
16668
      }
16669
 
16670
      /**
16671
       * Find the _Fields constant that matches fieldId, throwing an exception
16672
       * if it is not found.
16673
       */
16674
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16675
        _Fields fields = findByThriftId(fieldId);
16676
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16677
        return fields;
16678
      }
16679
 
16680
      /**
16681
       * Find the _Fields constant that matches name, or null if its not found.
16682
       */
16683
      public static _Fields findByName(String name) {
16684
        return byName.get(name);
16685
      }
16686
 
16687
      private final short _thriftId;
16688
      private final String _fieldName;
16689
 
16690
      _Fields(short thriftId, String fieldName) {
16691
        _thriftId = thriftId;
16692
        _fieldName = fieldName;
16693
      }
16694
 
16695
      public short getThriftFieldId() {
16696
        return _thriftId;
16697
      }
16698
 
16699
      public String getFieldName() {
16700
        return _fieldName;
16701
      }
16702
    }
16703
 
16704
    // isset id assignments
16705
    private static final int __TRANSACTION_ID_ISSET_ID = 0;
16706
    private BitSet __isset_bit_vector = new BitSet(1);
16707
 
16708
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16709
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transaction_id", TFieldRequirementType.DEFAULT, 
16710
          new FieldValueMetaData(TType.I64)));
16711
    }});
16712
 
16713
    static {
16714
      FieldMetaData.addStructMetaDataMap(getExtraInfo_args.class, metaDataMap);
16715
    }
16716
 
16717
    public getExtraInfo_args() {
16718
    }
16719
 
16720
    public getExtraInfo_args(
16721
      long transaction_id)
16722
    {
16723
      this();
16724
      this.transaction_id = transaction_id;
16725
      setTransaction_idIsSet(true);
16726
    }
16727
 
16728
    /**
16729
     * Performs a deep copy on <i>other</i>.
16730
     */
16731
    public getExtraInfo_args(getExtraInfo_args other) {
16732
      __isset_bit_vector.clear();
16733
      __isset_bit_vector.or(other.__isset_bit_vector);
16734
      this.transaction_id = other.transaction_id;
16735
    }
16736
 
16737
    public getExtraInfo_args deepCopy() {
16738
      return new getExtraInfo_args(this);
16739
    }
16740
 
16741
    @Deprecated
16742
    public getExtraInfo_args clone() {
16743
      return new getExtraInfo_args(this);
16744
    }
16745
 
16746
    public long getTransaction_id() {
16747
      return this.transaction_id;
16748
    }
16749
 
16750
    public getExtraInfo_args setTransaction_id(long transaction_id) {
16751
      this.transaction_id = transaction_id;
16752
      setTransaction_idIsSet(true);
16753
      return this;
16754
    }
16755
 
16756
    public void unsetTransaction_id() {
16757
      __isset_bit_vector.clear(__TRANSACTION_ID_ISSET_ID);
16758
    }
16759
 
16760
    /** Returns true if field transaction_id is set (has been asigned a value) and false otherwise */
16761
    public boolean isSetTransaction_id() {
16762
      return __isset_bit_vector.get(__TRANSACTION_ID_ISSET_ID);
16763
    }
16764
 
16765
    public void setTransaction_idIsSet(boolean value) {
16766
      __isset_bit_vector.set(__TRANSACTION_ID_ISSET_ID, value);
16767
    }
16768
 
16769
    public void setFieldValue(_Fields field, Object value) {
16770
      switch (field) {
16771
      case TRANSACTION_ID:
16772
        if (value == null) {
16773
          unsetTransaction_id();
16774
        } else {
16775
          setTransaction_id((Long)value);
16776
        }
16777
        break;
16778
 
16779
      }
16780
    }
16781
 
16782
    public void setFieldValue(int fieldID, Object value) {
16783
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16784
    }
16785
 
16786
    public Object getFieldValue(_Fields field) {
16787
      switch (field) {
16788
      case TRANSACTION_ID:
16789
        return new Long(getTransaction_id());
16790
 
16791
      }
16792
      throw new IllegalStateException();
16793
    }
16794
 
16795
    public Object getFieldValue(int fieldId) {
16796
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16797
    }
16798
 
16799
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16800
    public boolean isSet(_Fields field) {
16801
      switch (field) {
16802
      case TRANSACTION_ID:
16803
        return isSetTransaction_id();
16804
      }
16805
      throw new IllegalStateException();
16806
    }
16807
 
16808
    public boolean isSet(int fieldID) {
16809
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16810
    }
16811
 
16812
    @Override
16813
    public boolean equals(Object that) {
16814
      if (that == null)
16815
        return false;
16816
      if (that instanceof getExtraInfo_args)
16817
        return this.equals((getExtraInfo_args)that);
16818
      return false;
16819
    }
16820
 
16821
    public boolean equals(getExtraInfo_args that) {
16822
      if (that == null)
16823
        return false;
16824
 
16825
      boolean this_present_transaction_id = true;
16826
      boolean that_present_transaction_id = true;
16827
      if (this_present_transaction_id || that_present_transaction_id) {
16828
        if (!(this_present_transaction_id && that_present_transaction_id))
16829
          return false;
16830
        if (this.transaction_id != that.transaction_id)
16831
          return false;
16832
      }
16833
 
16834
      return true;
16835
    }
16836
 
16837
    @Override
16838
    public int hashCode() {
16839
      return 0;
16840
    }
16841
 
16842
    public int compareTo(getExtraInfo_args other) {
16843
      if (!getClass().equals(other.getClass())) {
16844
        return getClass().getName().compareTo(other.getClass().getName());
16845
      }
16846
 
16847
      int lastComparison = 0;
16848
      getExtraInfo_args typedOther = (getExtraInfo_args)other;
16849
 
16850
      lastComparison = Boolean.valueOf(isSetTransaction_id()).compareTo(isSetTransaction_id());
16851
      if (lastComparison != 0) {
16852
        return lastComparison;
16853
      }
16854
      lastComparison = TBaseHelper.compareTo(transaction_id, typedOther.transaction_id);
16855
      if (lastComparison != 0) {
16856
        return lastComparison;
16857
      }
16858
      return 0;
16859
    }
16860
 
16861
    public void read(TProtocol iprot) throws TException {
16862
      TField field;
16863
      iprot.readStructBegin();
16864
      while (true)
16865
      {
16866
        field = iprot.readFieldBegin();
16867
        if (field.type == TType.STOP) { 
16868
          break;
16869
        }
16870
        _Fields fieldId = _Fields.findByThriftId(field.id);
16871
        if (fieldId == null) {
16872
          TProtocolUtil.skip(iprot, field.type);
16873
        } else {
16874
          switch (fieldId) {
16875
            case TRANSACTION_ID:
16876
              if (field.type == TType.I64) {
16877
                this.transaction_id = iprot.readI64();
16878
                setTransaction_idIsSet(true);
16879
              } else { 
16880
                TProtocolUtil.skip(iprot, field.type);
16881
              }
16882
              break;
16883
          }
16884
          iprot.readFieldEnd();
16885
        }
16886
      }
16887
      iprot.readStructEnd();
16888
      validate();
16889
    }
16890
 
16891
    public void write(TProtocol oprot) throws TException {
16892
      validate();
16893
 
16894
      oprot.writeStructBegin(STRUCT_DESC);
16895
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
16896
      oprot.writeI64(this.transaction_id);
16897
      oprot.writeFieldEnd();
16898
      oprot.writeFieldStop();
16899
      oprot.writeStructEnd();
16900
    }
16901
 
16902
    @Override
16903
    public String toString() {
16904
      StringBuilder sb = new StringBuilder("getExtraInfo_args(");
16905
      boolean first = true;
16906
 
16907
      sb.append("transaction_id:");
16908
      sb.append(this.transaction_id);
16909
      first = false;
16910
      sb.append(")");
16911
      return sb.toString();
16912
    }
16913
 
16914
    public void validate() throws TException {
16915
      // check for required fields
16916
    }
16917
 
16918
  }
16919
 
16920
  public static class getExtraInfo_result implements TBase<getExtraInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<getExtraInfo_result>   {
16921
    private static final TStruct STRUCT_DESC = new TStruct("getExtraInfo_result");
16922
 
16923
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
16924
 
16925
    private ExtraOrderInfo success;
16926
 
16927
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16928
    public enum _Fields implements TFieldIdEnum {
16929
      SUCCESS((short)0, "success");
16930
 
16931
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16932
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16933
 
16934
      static {
16935
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16936
          byId.put((int)field._thriftId, field);
16937
          byName.put(field.getFieldName(), field);
16938
        }
16939
      }
16940
 
16941
      /**
16942
       * Find the _Fields constant that matches fieldId, or null if its not found.
16943
       */
16944
      public static _Fields findByThriftId(int fieldId) {
16945
        return byId.get(fieldId);
16946
      }
16947
 
16948
      /**
16949
       * Find the _Fields constant that matches fieldId, throwing an exception
16950
       * if it is not found.
16951
       */
16952
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16953
        _Fields fields = findByThriftId(fieldId);
16954
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16955
        return fields;
16956
      }
16957
 
16958
      /**
16959
       * Find the _Fields constant that matches name, or null if its not found.
16960
       */
16961
      public static _Fields findByName(String name) {
16962
        return byName.get(name);
16963
      }
16964
 
16965
      private final short _thriftId;
16966
      private final String _fieldName;
16967
 
16968
      _Fields(short thriftId, String fieldName) {
16969
        _thriftId = thriftId;
16970
        _fieldName = fieldName;
16971
      }
16972
 
16973
      public short getThriftFieldId() {
16974
        return _thriftId;
16975
      }
16976
 
16977
      public String getFieldName() {
16978
        return _fieldName;
16979
      }
16980
    }
16981
 
16982
    // isset id assignments
16983
 
16984
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16985
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16986
          new StructMetaData(TType.STRUCT, ExtraOrderInfo.class)));
16987
    }});
16988
 
16989
    static {
16990
      FieldMetaData.addStructMetaDataMap(getExtraInfo_result.class, metaDataMap);
16991
    }
16992
 
16993
    public getExtraInfo_result() {
16994
    }
16995
 
16996
    public getExtraInfo_result(
16997
      ExtraOrderInfo success)
16998
    {
16999
      this();
17000
      this.success = success;
17001
    }
17002
 
17003
    /**
17004
     * Performs a deep copy on <i>other</i>.
17005
     */
17006
    public getExtraInfo_result(getExtraInfo_result other) {
17007
      if (other.isSetSuccess()) {
17008
        this.success = new ExtraOrderInfo(other.success);
17009
      }
17010
    }
17011
 
17012
    public getExtraInfo_result deepCopy() {
17013
      return new getExtraInfo_result(this);
17014
    }
17015
 
17016
    @Deprecated
17017
    public getExtraInfo_result clone() {
17018
      return new getExtraInfo_result(this);
17019
    }
17020
 
17021
    public ExtraOrderInfo getSuccess() {
17022
      return this.success;
17023
    }
17024
 
17025
    public getExtraInfo_result setSuccess(ExtraOrderInfo success) {
17026
      this.success = success;
17027
      return this;
17028
    }
17029
 
17030
    public void unsetSuccess() {
17031
      this.success = null;
17032
    }
17033
 
17034
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17035
    public boolean isSetSuccess() {
17036
      return this.success != null;
17037
    }
17038
 
17039
    public void setSuccessIsSet(boolean value) {
17040
      if (!value) {
17041
        this.success = null;
17042
      }
17043
    }
17044
 
17045
    public void setFieldValue(_Fields field, Object value) {
17046
      switch (field) {
17047
      case SUCCESS:
17048
        if (value == null) {
17049
          unsetSuccess();
17050
        } else {
17051
          setSuccess((ExtraOrderInfo)value);
17052
        }
17053
        break;
17054
 
17055
      }
17056
    }
17057
 
17058
    public void setFieldValue(int fieldID, Object value) {
17059
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17060
    }
17061
 
17062
    public Object getFieldValue(_Fields field) {
17063
      switch (field) {
17064
      case SUCCESS:
17065
        return getSuccess();
17066
 
17067
      }
17068
      throw new IllegalStateException();
17069
    }
17070
 
17071
    public Object getFieldValue(int fieldId) {
17072
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17073
    }
17074
 
17075
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17076
    public boolean isSet(_Fields field) {
17077
      switch (field) {
17078
      case SUCCESS:
17079
        return isSetSuccess();
17080
      }
17081
      throw new IllegalStateException();
17082
    }
17083
 
17084
    public boolean isSet(int fieldID) {
17085
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17086
    }
17087
 
17088
    @Override
17089
    public boolean equals(Object that) {
17090
      if (that == null)
17091
        return false;
17092
      if (that instanceof getExtraInfo_result)
17093
        return this.equals((getExtraInfo_result)that);
17094
      return false;
17095
    }
17096
 
17097
    public boolean equals(getExtraInfo_result that) {
17098
      if (that == null)
17099
        return false;
17100
 
17101
      boolean this_present_success = true && this.isSetSuccess();
17102
      boolean that_present_success = true && that.isSetSuccess();
17103
      if (this_present_success || that_present_success) {
17104
        if (!(this_present_success && that_present_success))
17105
          return false;
17106
        if (!this.success.equals(that.success))
17107
          return false;
17108
      }
17109
 
17110
      return true;
17111
    }
17112
 
17113
    @Override
17114
    public int hashCode() {
17115
      return 0;
17116
    }
17117
 
17118
    public int compareTo(getExtraInfo_result other) {
17119
      if (!getClass().equals(other.getClass())) {
17120
        return getClass().getName().compareTo(other.getClass().getName());
17121
      }
17122
 
17123
      int lastComparison = 0;
17124
      getExtraInfo_result typedOther = (getExtraInfo_result)other;
17125
 
17126
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17127
      if (lastComparison != 0) {
17128
        return lastComparison;
17129
      }
17130
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17131
      if (lastComparison != 0) {
17132
        return lastComparison;
17133
      }
17134
      return 0;
17135
    }
17136
 
17137
    public void read(TProtocol iprot) throws TException {
17138
      TField field;
17139
      iprot.readStructBegin();
17140
      while (true)
17141
      {
17142
        field = iprot.readFieldBegin();
17143
        if (field.type == TType.STOP) { 
17144
          break;
17145
        }
17146
        _Fields fieldId = _Fields.findByThriftId(field.id);
17147
        if (fieldId == null) {
17148
          TProtocolUtil.skip(iprot, field.type);
17149
        } else {
17150
          switch (fieldId) {
17151
            case SUCCESS:
17152
              if (field.type == TType.STRUCT) {
17153
                this.success = new ExtraOrderInfo();
17154
                this.success.read(iprot);
17155
              } else { 
17156
                TProtocolUtil.skip(iprot, field.type);
17157
              }
17158
              break;
17159
          }
17160
          iprot.readFieldEnd();
17161
        }
17162
      }
17163
      iprot.readStructEnd();
17164
      validate();
17165
    }
17166
 
17167
    public void write(TProtocol oprot) throws TException {
17168
      oprot.writeStructBegin(STRUCT_DESC);
17169
 
17170
      if (this.isSetSuccess()) {
17171
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17172
        this.success.write(oprot);
17173
        oprot.writeFieldEnd();
17174
      }
17175
      oprot.writeFieldStop();
17176
      oprot.writeStructEnd();
17177
    }
17178
 
17179
    @Override
17180
    public String toString() {
17181
      StringBuilder sb = new StringBuilder("getExtraInfo_result(");
17182
      boolean first = true;
17183
 
17184
      sb.append("success:");
17185
      if (this.success == null) {
17186
        sb.append("null");
17187
      } else {
17188
        sb.append(this.success);
17189
      }
17190
      first = false;
17191
      sb.append(")");
17192
      return sb.toString();
17193
    }
17194
 
17195
    public void validate() throws TException {
17196
      // check for required fields
17197
    }
17198
 
17199
  }
17200
 
17201
  public static class setExtraInfo_args implements TBase<setExtraInfo_args._Fields>, java.io.Serializable, Cloneable, Comparable<setExtraInfo_args>   {
17202
    private static final TStruct STRUCT_DESC = new TStruct("setExtraInfo_args");
17203
 
17204
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transaction_id", TType.I64, (short)1);
17205
    private static final TField SKU_ID_FIELD_DESC = new TField("sku_id", TType.I64, (short)2);
17206
    private static final TField MODEL_FIELD_DESC = new TField("model", TType.STRING, (short)3);
17207
    private static final TField COLOUR_FIELD_DESC = new TField("colour", TType.STRING, (short)4);
17208
    private static final TField VENDOR_FIELD_DESC = new TField("vendor", TType.STRING, (short)5);
17209
 
17210
    private long transaction_id;
17211
    private long sku_id;
17212
    private String model;
17213
    private String colour;
17214
    private String vendor;
17215
 
17216
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17217
    public enum _Fields implements TFieldIdEnum {
17218
      TRANSACTION_ID((short)1, "transaction_id"),
17219
      SKU_ID((short)2, "sku_id"),
17220
      MODEL((short)3, "model"),
17221
      COLOUR((short)4, "colour"),
17222
      VENDOR((short)5, "vendor");
17223
 
17224
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17225
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17226
 
17227
      static {
17228
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17229
          byId.put((int)field._thriftId, field);
17230
          byName.put(field.getFieldName(), field);
17231
        }
17232
      }
17233
 
17234
      /**
17235
       * Find the _Fields constant that matches fieldId, or null if its not found.
17236
       */
17237
      public static _Fields findByThriftId(int fieldId) {
17238
        return byId.get(fieldId);
17239
      }
17240
 
17241
      /**
17242
       * Find the _Fields constant that matches fieldId, throwing an exception
17243
       * if it is not found.
17244
       */
17245
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17246
        _Fields fields = findByThriftId(fieldId);
17247
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17248
        return fields;
17249
      }
17250
 
17251
      /**
17252
       * Find the _Fields constant that matches name, or null if its not found.
17253
       */
17254
      public static _Fields findByName(String name) {
17255
        return byName.get(name);
17256
      }
17257
 
17258
      private final short _thriftId;
17259
      private final String _fieldName;
17260
 
17261
      _Fields(short thriftId, String fieldName) {
17262
        _thriftId = thriftId;
17263
        _fieldName = fieldName;
17264
      }
17265
 
17266
      public short getThriftFieldId() {
17267
        return _thriftId;
17268
      }
17269
 
17270
      public String getFieldName() {
17271
        return _fieldName;
17272
      }
17273
    }
17274
 
17275
    // isset id assignments
17276
    private static final int __TRANSACTION_ID_ISSET_ID = 0;
17277
    private static final int __SKU_ID_ISSET_ID = 1;
17278
    private BitSet __isset_bit_vector = new BitSet(2);
17279
 
17280
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17281
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transaction_id", TFieldRequirementType.DEFAULT, 
17282
          new FieldValueMetaData(TType.I64)));
17283
      put(_Fields.SKU_ID, new FieldMetaData("sku_id", TFieldRequirementType.DEFAULT, 
17284
          new FieldValueMetaData(TType.I64)));
17285
      put(_Fields.MODEL, new FieldMetaData("model", TFieldRequirementType.DEFAULT, 
17286
          new FieldValueMetaData(TType.STRING)));
17287
      put(_Fields.COLOUR, new FieldMetaData("colour", TFieldRequirementType.DEFAULT, 
17288
          new FieldValueMetaData(TType.STRING)));
17289
      put(_Fields.VENDOR, new FieldMetaData("vendor", TFieldRequirementType.DEFAULT, 
17290
          new FieldValueMetaData(TType.STRING)));
17291
    }});
17292
 
17293
    static {
17294
      FieldMetaData.addStructMetaDataMap(setExtraInfo_args.class, metaDataMap);
17295
    }
17296
 
17297
    public setExtraInfo_args() {
17298
    }
17299
 
17300
    public setExtraInfo_args(
17301
      long transaction_id,
17302
      long sku_id,
17303
      String model,
17304
      String colour,
17305
      String vendor)
17306
    {
17307
      this();
17308
      this.transaction_id = transaction_id;
17309
      setTransaction_idIsSet(true);
17310
      this.sku_id = sku_id;
17311
      setSku_idIsSet(true);
17312
      this.model = model;
17313
      this.colour = colour;
17314
      this.vendor = vendor;
17315
    }
17316
 
17317
    /**
17318
     * Performs a deep copy on <i>other</i>.
17319
     */
17320
    public setExtraInfo_args(setExtraInfo_args other) {
17321
      __isset_bit_vector.clear();
17322
      __isset_bit_vector.or(other.__isset_bit_vector);
17323
      this.transaction_id = other.transaction_id;
17324
      this.sku_id = other.sku_id;
17325
      if (other.isSetModel()) {
17326
        this.model = other.model;
17327
      }
17328
      if (other.isSetColour()) {
17329
        this.colour = other.colour;
17330
      }
17331
      if (other.isSetVendor()) {
17332
        this.vendor = other.vendor;
17333
      }
17334
    }
17335
 
17336
    public setExtraInfo_args deepCopy() {
17337
      return new setExtraInfo_args(this);
17338
    }
17339
 
17340
    @Deprecated
17341
    public setExtraInfo_args clone() {
17342
      return new setExtraInfo_args(this);
17343
    }
17344
 
17345
    public long getTransaction_id() {
17346
      return this.transaction_id;
17347
    }
17348
 
17349
    public setExtraInfo_args setTransaction_id(long transaction_id) {
17350
      this.transaction_id = transaction_id;
17351
      setTransaction_idIsSet(true);
17352
      return this;
17353
    }
17354
 
17355
    public void unsetTransaction_id() {
17356
      __isset_bit_vector.clear(__TRANSACTION_ID_ISSET_ID);
17357
    }
17358
 
17359
    /** Returns true if field transaction_id is set (has been asigned a value) and false otherwise */
17360
    public boolean isSetTransaction_id() {
17361
      return __isset_bit_vector.get(__TRANSACTION_ID_ISSET_ID);
17362
    }
17363
 
17364
    public void setTransaction_idIsSet(boolean value) {
17365
      __isset_bit_vector.set(__TRANSACTION_ID_ISSET_ID, value);
17366
    }
17367
 
17368
    public long getSku_id() {
17369
      return this.sku_id;
17370
    }
17371
 
17372
    public setExtraInfo_args setSku_id(long sku_id) {
17373
      this.sku_id = sku_id;
17374
      setSku_idIsSet(true);
17375
      return this;
17376
    }
17377
 
17378
    public void unsetSku_id() {
17379
      __isset_bit_vector.clear(__SKU_ID_ISSET_ID);
17380
    }
17381
 
17382
    /** Returns true if field sku_id is set (has been asigned a value) and false otherwise */
17383
    public boolean isSetSku_id() {
17384
      return __isset_bit_vector.get(__SKU_ID_ISSET_ID);
17385
    }
17386
 
17387
    public void setSku_idIsSet(boolean value) {
17388
      __isset_bit_vector.set(__SKU_ID_ISSET_ID, value);
17389
    }
17390
 
17391
    public String getModel() {
17392
      return this.model;
17393
    }
17394
 
17395
    public setExtraInfo_args setModel(String model) {
17396
      this.model = model;
17397
      return this;
17398
    }
17399
 
17400
    public void unsetModel() {
17401
      this.model = null;
17402
    }
17403
 
17404
    /** Returns true if field model is set (has been asigned a value) and false otherwise */
17405
    public boolean isSetModel() {
17406
      return this.model != null;
17407
    }
17408
 
17409
    public void setModelIsSet(boolean value) {
17410
      if (!value) {
17411
        this.model = null;
17412
      }
17413
    }
17414
 
17415
    public String getColour() {
17416
      return this.colour;
17417
    }
17418
 
17419
    public setExtraInfo_args setColour(String colour) {
17420
      this.colour = colour;
17421
      return this;
17422
    }
17423
 
17424
    public void unsetColour() {
17425
      this.colour = null;
17426
    }
17427
 
17428
    /** Returns true if field colour is set (has been asigned a value) and false otherwise */
17429
    public boolean isSetColour() {
17430
      return this.colour != null;
17431
    }
17432
 
17433
    public void setColourIsSet(boolean value) {
17434
      if (!value) {
17435
        this.colour = null;
17436
      }
17437
    }
17438
 
17439
    public String getVendor() {
17440
      return this.vendor;
17441
    }
17442
 
17443
    public setExtraInfo_args setVendor(String vendor) {
17444
      this.vendor = vendor;
17445
      return this;
17446
    }
17447
 
17448
    public void unsetVendor() {
17449
      this.vendor = null;
17450
    }
17451
 
17452
    /** Returns true if field vendor is set (has been asigned a value) and false otherwise */
17453
    public boolean isSetVendor() {
17454
      return this.vendor != null;
17455
    }
17456
 
17457
    public void setVendorIsSet(boolean value) {
17458
      if (!value) {
17459
        this.vendor = null;
17460
      }
17461
    }
17462
 
17463
    public void setFieldValue(_Fields field, Object value) {
17464
      switch (field) {
17465
      case TRANSACTION_ID:
17466
        if (value == null) {
17467
          unsetTransaction_id();
17468
        } else {
17469
          setTransaction_id((Long)value);
17470
        }
17471
        break;
17472
 
17473
      case SKU_ID:
17474
        if (value == null) {
17475
          unsetSku_id();
17476
        } else {
17477
          setSku_id((Long)value);
17478
        }
17479
        break;
17480
 
17481
      case MODEL:
17482
        if (value == null) {
17483
          unsetModel();
17484
        } else {
17485
          setModel((String)value);
17486
        }
17487
        break;
17488
 
17489
      case COLOUR:
17490
        if (value == null) {
17491
          unsetColour();
17492
        } else {
17493
          setColour((String)value);
17494
        }
17495
        break;
17496
 
17497
      case VENDOR:
17498
        if (value == null) {
17499
          unsetVendor();
17500
        } else {
17501
          setVendor((String)value);
17502
        }
17503
        break;
17504
 
17505
      }
17506
    }
17507
 
17508
    public void setFieldValue(int fieldID, Object value) {
17509
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17510
    }
17511
 
17512
    public Object getFieldValue(_Fields field) {
17513
      switch (field) {
17514
      case TRANSACTION_ID:
17515
        return new Long(getTransaction_id());
17516
 
17517
      case SKU_ID:
17518
        return new Long(getSku_id());
17519
 
17520
      case MODEL:
17521
        return getModel();
17522
 
17523
      case COLOUR:
17524
        return getColour();
17525
 
17526
      case VENDOR:
17527
        return getVendor();
17528
 
17529
      }
17530
      throw new IllegalStateException();
17531
    }
17532
 
17533
    public Object getFieldValue(int fieldId) {
17534
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17535
    }
17536
 
17537
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17538
    public boolean isSet(_Fields field) {
17539
      switch (field) {
17540
      case TRANSACTION_ID:
17541
        return isSetTransaction_id();
17542
      case SKU_ID:
17543
        return isSetSku_id();
17544
      case MODEL:
17545
        return isSetModel();
17546
      case COLOUR:
17547
        return isSetColour();
17548
      case VENDOR:
17549
        return isSetVendor();
17550
      }
17551
      throw new IllegalStateException();
17552
    }
17553
 
17554
    public boolean isSet(int fieldID) {
17555
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17556
    }
17557
 
17558
    @Override
17559
    public boolean equals(Object that) {
17560
      if (that == null)
17561
        return false;
17562
      if (that instanceof setExtraInfo_args)
17563
        return this.equals((setExtraInfo_args)that);
17564
      return false;
17565
    }
17566
 
17567
    public boolean equals(setExtraInfo_args that) {
17568
      if (that == null)
17569
        return false;
17570
 
17571
      boolean this_present_transaction_id = true;
17572
      boolean that_present_transaction_id = true;
17573
      if (this_present_transaction_id || that_present_transaction_id) {
17574
        if (!(this_present_transaction_id && that_present_transaction_id))
17575
          return false;
17576
        if (this.transaction_id != that.transaction_id)
17577
          return false;
17578
      }
17579
 
17580
      boolean this_present_sku_id = true;
17581
      boolean that_present_sku_id = true;
17582
      if (this_present_sku_id || that_present_sku_id) {
17583
        if (!(this_present_sku_id && that_present_sku_id))
17584
          return false;
17585
        if (this.sku_id != that.sku_id)
17586
          return false;
17587
      }
17588
 
17589
      boolean this_present_model = true && this.isSetModel();
17590
      boolean that_present_model = true && that.isSetModel();
17591
      if (this_present_model || that_present_model) {
17592
        if (!(this_present_model && that_present_model))
17593
          return false;
17594
        if (!this.model.equals(that.model))
17595
          return false;
17596
      }
17597
 
17598
      boolean this_present_colour = true && this.isSetColour();
17599
      boolean that_present_colour = true && that.isSetColour();
17600
      if (this_present_colour || that_present_colour) {
17601
        if (!(this_present_colour && that_present_colour))
17602
          return false;
17603
        if (!this.colour.equals(that.colour))
17604
          return false;
17605
      }
17606
 
17607
      boolean this_present_vendor = true && this.isSetVendor();
17608
      boolean that_present_vendor = true && that.isSetVendor();
17609
      if (this_present_vendor || that_present_vendor) {
17610
        if (!(this_present_vendor && that_present_vendor))
17611
          return false;
17612
        if (!this.vendor.equals(that.vendor))
17613
          return false;
17614
      }
17615
 
17616
      return true;
17617
    }
17618
 
17619
    @Override
17620
    public int hashCode() {
17621
      return 0;
17622
    }
17623
 
17624
    public int compareTo(setExtraInfo_args other) {
17625
      if (!getClass().equals(other.getClass())) {
17626
        return getClass().getName().compareTo(other.getClass().getName());
17627
      }
17628
 
17629
      int lastComparison = 0;
17630
      setExtraInfo_args typedOther = (setExtraInfo_args)other;
17631
 
17632
      lastComparison = Boolean.valueOf(isSetTransaction_id()).compareTo(isSetTransaction_id());
17633
      if (lastComparison != 0) {
17634
        return lastComparison;
17635
      }
17636
      lastComparison = TBaseHelper.compareTo(transaction_id, typedOther.transaction_id);
17637
      if (lastComparison != 0) {
17638
        return lastComparison;
17639
      }
17640
      lastComparison = Boolean.valueOf(isSetSku_id()).compareTo(isSetSku_id());
17641
      if (lastComparison != 0) {
17642
        return lastComparison;
17643
      }
17644
      lastComparison = TBaseHelper.compareTo(sku_id, typedOther.sku_id);
17645
      if (lastComparison != 0) {
17646
        return lastComparison;
17647
      }
17648
      lastComparison = Boolean.valueOf(isSetModel()).compareTo(isSetModel());
17649
      if (lastComparison != 0) {
17650
        return lastComparison;
17651
      }
17652
      lastComparison = TBaseHelper.compareTo(model, typedOther.model);
17653
      if (lastComparison != 0) {
17654
        return lastComparison;
17655
      }
17656
      lastComparison = Boolean.valueOf(isSetColour()).compareTo(isSetColour());
17657
      if (lastComparison != 0) {
17658
        return lastComparison;
17659
      }
17660
      lastComparison = TBaseHelper.compareTo(colour, typedOther.colour);
17661
      if (lastComparison != 0) {
17662
        return lastComparison;
17663
      }
17664
      lastComparison = Boolean.valueOf(isSetVendor()).compareTo(isSetVendor());
17665
      if (lastComparison != 0) {
17666
        return lastComparison;
17667
      }
17668
      lastComparison = TBaseHelper.compareTo(vendor, typedOther.vendor);
17669
      if (lastComparison != 0) {
17670
        return lastComparison;
17671
      }
17672
      return 0;
17673
    }
17674
 
17675
    public void read(TProtocol iprot) throws TException {
17676
      TField field;
17677
      iprot.readStructBegin();
17678
      while (true)
17679
      {
17680
        field = iprot.readFieldBegin();
17681
        if (field.type == TType.STOP) { 
17682
          break;
17683
        }
17684
        _Fields fieldId = _Fields.findByThriftId(field.id);
17685
        if (fieldId == null) {
17686
          TProtocolUtil.skip(iprot, field.type);
17687
        } else {
17688
          switch (fieldId) {
17689
            case TRANSACTION_ID:
17690
              if (field.type == TType.I64) {
17691
                this.transaction_id = iprot.readI64();
17692
                setTransaction_idIsSet(true);
17693
              } else { 
17694
                TProtocolUtil.skip(iprot, field.type);
17695
              }
17696
              break;
17697
            case SKU_ID:
17698
              if (field.type == TType.I64) {
17699
                this.sku_id = iprot.readI64();
17700
                setSku_idIsSet(true);
17701
              } else { 
17702
                TProtocolUtil.skip(iprot, field.type);
17703
              }
17704
              break;
17705
            case MODEL:
17706
              if (field.type == TType.STRING) {
17707
                this.model = iprot.readString();
17708
              } else { 
17709
                TProtocolUtil.skip(iprot, field.type);
17710
              }
17711
              break;
17712
            case COLOUR:
17713
              if (field.type == TType.STRING) {
17714
                this.colour = iprot.readString();
17715
              } else { 
17716
                TProtocolUtil.skip(iprot, field.type);
17717
              }
17718
              break;
17719
            case VENDOR:
17720
              if (field.type == TType.STRING) {
17721
                this.vendor = iprot.readString();
17722
              } else { 
17723
                TProtocolUtil.skip(iprot, field.type);
17724
              }
17725
              break;
17726
          }
17727
          iprot.readFieldEnd();
17728
        }
17729
      }
17730
      iprot.readStructEnd();
17731
      validate();
17732
    }
17733
 
17734
    public void write(TProtocol oprot) throws TException {
17735
      validate();
17736
 
17737
      oprot.writeStructBegin(STRUCT_DESC);
17738
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
17739
      oprot.writeI64(this.transaction_id);
17740
      oprot.writeFieldEnd();
17741
      oprot.writeFieldBegin(SKU_ID_FIELD_DESC);
17742
      oprot.writeI64(this.sku_id);
17743
      oprot.writeFieldEnd();
17744
      if (this.model != null) {
17745
        oprot.writeFieldBegin(MODEL_FIELD_DESC);
17746
        oprot.writeString(this.model);
17747
        oprot.writeFieldEnd();
17748
      }
17749
      if (this.colour != null) {
17750
        oprot.writeFieldBegin(COLOUR_FIELD_DESC);
17751
        oprot.writeString(this.colour);
17752
        oprot.writeFieldEnd();
17753
      }
17754
      if (this.vendor != null) {
17755
        oprot.writeFieldBegin(VENDOR_FIELD_DESC);
17756
        oprot.writeString(this.vendor);
17757
        oprot.writeFieldEnd();
17758
      }
17759
      oprot.writeFieldStop();
17760
      oprot.writeStructEnd();
17761
    }
17762
 
17763
    @Override
17764
    public String toString() {
17765
      StringBuilder sb = new StringBuilder("setExtraInfo_args(");
17766
      boolean first = true;
17767
 
17768
      sb.append("transaction_id:");
17769
      sb.append(this.transaction_id);
17770
      first = false;
17771
      if (!first) sb.append(", ");
17772
      sb.append("sku_id:");
17773
      sb.append(this.sku_id);
17774
      first = false;
17775
      if (!first) sb.append(", ");
17776
      sb.append("model:");
17777
      if (this.model == null) {
17778
        sb.append("null");
17779
      } else {
17780
        sb.append(this.model);
17781
      }
17782
      first = false;
17783
      if (!first) sb.append(", ");
17784
      sb.append("colour:");
17785
      if (this.colour == null) {
17786
        sb.append("null");
17787
      } else {
17788
        sb.append(this.colour);
17789
      }
17790
      first = false;
17791
      if (!first) sb.append(", ");
17792
      sb.append("vendor:");
17793
      if (this.vendor == null) {
17794
        sb.append("null");
17795
      } else {
17796
        sb.append(this.vendor);
17797
      }
17798
      first = false;
17799
      sb.append(")");
17800
      return sb.toString();
17801
    }
17802
 
17803
    public void validate() throws TException {
17804
      // check for required fields
17805
    }
17806
 
17807
  }
17808
 
17809
  public static class setExtraInfo_result implements TBase<setExtraInfo_result._Fields>, java.io.Serializable, Cloneable, Comparable<setExtraInfo_result>   {
17810
    private static final TStruct STRUCT_DESC = new TStruct("setExtraInfo_result");
17811
 
17812
 
17813
 
17814
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17815
    public enum _Fields implements TFieldIdEnum {
17816
;
17817
 
17818
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17819
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17820
 
17821
      static {
17822
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17823
          byId.put((int)field._thriftId, field);
17824
          byName.put(field.getFieldName(), field);
17825
        }
17826
      }
17827
 
17828
      /**
17829
       * Find the _Fields constant that matches fieldId, or null if its not found.
17830
       */
17831
      public static _Fields findByThriftId(int fieldId) {
17832
        return byId.get(fieldId);
17833
      }
17834
 
17835
      /**
17836
       * Find the _Fields constant that matches fieldId, throwing an exception
17837
       * if it is not found.
17838
       */
17839
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17840
        _Fields fields = findByThriftId(fieldId);
17841
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17842
        return fields;
17843
      }
17844
 
17845
      /**
17846
       * Find the _Fields constant that matches name, or null if its not found.
17847
       */
17848
      public static _Fields findByName(String name) {
17849
        return byName.get(name);
17850
      }
17851
 
17852
      private final short _thriftId;
17853
      private final String _fieldName;
17854
 
17855
      _Fields(short thriftId, String fieldName) {
17856
        _thriftId = thriftId;
17857
        _fieldName = fieldName;
17858
      }
17859
 
17860
      public short getThriftFieldId() {
17861
        return _thriftId;
17862
      }
17863
 
17864
      public String getFieldName() {
17865
        return _fieldName;
17866
      }
17867
    }
17868
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17869
    }});
17870
 
17871
    static {
17872
      FieldMetaData.addStructMetaDataMap(setExtraInfo_result.class, metaDataMap);
17873
    }
17874
 
17875
    public setExtraInfo_result() {
17876
    }
17877
 
17878
    /**
17879
     * Performs a deep copy on <i>other</i>.
17880
     */
17881
    public setExtraInfo_result(setExtraInfo_result other) {
17882
    }
17883
 
17884
    public setExtraInfo_result deepCopy() {
17885
      return new setExtraInfo_result(this);
17886
    }
17887
 
17888
    @Deprecated
17889
    public setExtraInfo_result clone() {
17890
      return new setExtraInfo_result(this);
17891
    }
17892
 
17893
    public void setFieldValue(_Fields field, Object value) {
17894
      switch (field) {
17895
      }
17896
    }
17897
 
17898
    public void setFieldValue(int fieldID, Object value) {
17899
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17900
    }
17901
 
17902
    public Object getFieldValue(_Fields field) {
17903
      switch (field) {
17904
      }
17905
      throw new IllegalStateException();
17906
    }
17907
 
17908
    public Object getFieldValue(int fieldId) {
17909
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17910
    }
17911
 
17912
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17913
    public boolean isSet(_Fields field) {
17914
      switch (field) {
17915
      }
17916
      throw new IllegalStateException();
17917
    }
17918
 
17919
    public boolean isSet(int fieldID) {
17920
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17921
    }
17922
 
17923
    @Override
17924
    public boolean equals(Object that) {
17925
      if (that == null)
17926
        return false;
17927
      if (that instanceof setExtraInfo_result)
17928
        return this.equals((setExtraInfo_result)that);
17929
      return false;
17930
    }
17931
 
17932
    public boolean equals(setExtraInfo_result that) {
17933
      if (that == null)
17934
        return false;
17935
 
17936
      return true;
17937
    }
17938
 
17939
    @Override
17940
    public int hashCode() {
17941
      return 0;
17942
    }
17943
 
17944
    public int compareTo(setExtraInfo_result other) {
17945
      if (!getClass().equals(other.getClass())) {
17946
        return getClass().getName().compareTo(other.getClass().getName());
17947
      }
17948
 
17949
      int lastComparison = 0;
17950
      setExtraInfo_result typedOther = (setExtraInfo_result)other;
17951
 
17952
      return 0;
17953
    }
17954
 
17955
    public void read(TProtocol iprot) throws TException {
17956
      TField field;
17957
      iprot.readStructBegin();
17958
      while (true)
17959
      {
17960
        field = iprot.readFieldBegin();
17961
        if (field.type == TType.STOP) { 
17962
          break;
17963
        }
17964
        _Fields fieldId = _Fields.findByThriftId(field.id);
17965
        if (fieldId == null) {
17966
          TProtocolUtil.skip(iprot, field.type);
17967
        } else {
17968
          switch (fieldId) {
17969
          }
17970
          iprot.readFieldEnd();
17971
        }
17972
      }
17973
      iprot.readStructEnd();
17974
      validate();
17975
    }
17976
 
17977
    public void write(TProtocol oprot) throws TException {
17978
      oprot.writeStructBegin(STRUCT_DESC);
17979
 
17980
      oprot.writeFieldStop();
17981
      oprot.writeStructEnd();
17982
    }
17983
 
17984
    @Override
17985
    public String toString() {
17986
      StringBuilder sb = new StringBuilder("setExtraInfo_result(");
17987
      boolean first = true;
17988
 
17989
      sb.append(")");
17990
      return sb.toString();
17991
    }
17992
 
17993
    public void validate() throws TException {
17994
      // check for required fields
17995
    }
17996
 
17997
  }
17998
 
68 ashish 17999
}