Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
123 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.payments;
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 PaymentService {
27
 
28
  public interface Iface {
29
 
695 rajveer 30
    /**
764 rajveer 31
     * For closing the open session in sqlalchemy
32
     */
33
    public void closeSession() throws TException;
34
 
35
    /**
695 rajveer 36
     * create a new payment and return payment id, throws an exception if gateway is not active
37
     * 
38
     * 
39
     * @param userId
40
     * @param amount
41
     * @param gatewayId
42
     * @param txnId
43
     */
44
    public long createPayment(long userId, double amount, long gatewayId, long txnId) throws PaymentException, TException;
123 ashish 45
 
695 rajveer 46
    /**
47
     * get payment for user. If status and gateway are null, it is ignored. Same for times as well.
48
     * 
49
     * 
50
     * @param userId
51
     * @param fromTime
52
     * @param toTime
53
     * @param status
54
     * @param gatewayId
55
     */
56
    public List<Payment> getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, TException;
123 ashish 57
 
695 rajveer 58
    /**
59
     * get all payments for user. Gateway is mandatory.
60
     * 
61
     * 
62
     * @param fromTime
63
     * @param toTime
64
     * @param status
65
     * @param gatewayId
66
     */
67
    public List<Payment> getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, TException;
123 ashish 68
 
695 rajveer 69
    /**
70
     * Get a particular gateway
71
     * 
72
     * 
73
     * @param id
74
     */
420 ashish 75
    public PaymentGateway getPaymentGateway(long id) throws PaymentException, TException;
76
 
695 rajveer 77
    /**
78
     * Get a particular payment info
79
     * 
80
     * 
81
     * @param id
82
     */
420 ashish 83
    public Payment getPayment(long id) throws PaymentException, TException;
84
 
695 rajveer 85
    /**
86
     * Get a particular payment for a transaction. Will raise exception.
87
     * 
88
     * 
89
     * @param txnId
90
     */
91
    public List<Payment> getPaymentForTxnId(long txnId) throws PaymentException, TException;
420 ashish 92
 
695 rajveer 93
    /**
94
     * mark payment successful and store parameters
95
     * 
96
     * 
97
     * @param id
98
     * @param gatewayPaymentId
99
     * @param sessionId
100
     * @param gatewayTxnStatus
101
     * @param description
102
     * @param gatewayTxnId
103
     * @param authCode
104
     * @param referenceCode
105
     * @param errorCode
106
     * @param status
1119 rajveer 107
     * @param gatewayTxnDate
695 rajveer 108
     * @param attributes
109
     */
1119 rajveer 110
    public boolean updatePaymentDetails(long id, String gatewayPaymentId, String sessionId, String gatewayTxnStatus, String description, String gatewayTxnId, String authCode, String referenceCode, String errorCode, PaymentStatus status, String gatewayTxnDate, List<Attribute> attributes) throws PaymentException, TException;
695 rajveer 111
 
1629 ankur.sing 112
    /**
113
     * Returns the maximum amount of a single payment.
114
     */
115
    public double getMaxPaymentAmount() throws TException;
116
 
117
    /**
118
     * Returns the minimum amount of a single payment.
119
     */
120
    public double getMinPaymentAmount() throws TException;
121
 
123 ashish 122
  }
123
 
124
  public static class Client implements Iface {
125
    public Client(TProtocol prot)
126
    {
127
      this(prot, prot);
128
    }
129
 
130
    public Client(TProtocol iprot, TProtocol oprot)
131
    {
132
      iprot_ = iprot;
133
      oprot_ = oprot;
134
    }
135
 
136
    protected TProtocol iprot_;
137
    protected TProtocol oprot_;
138
 
139
    protected int seqid_;
140
 
141
    public TProtocol getInputProtocol()
142
    {
143
      return this.iprot_;
144
    }
145
 
146
    public TProtocol getOutputProtocol()
147
    {
148
      return this.oprot_;
149
    }
150
 
764 rajveer 151
    public void closeSession() throws TException
152
    {
153
      send_closeSession();
154
      recv_closeSession();
155
    }
156
 
157
    public void send_closeSession() throws TException
158
    {
159
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
160
      closeSession_args args = new closeSession_args();
161
      args.write(oprot_);
162
      oprot_.writeMessageEnd();
163
      oprot_.getTransport().flush();
164
    }
165
 
166
    public void recv_closeSession() throws TException
167
    {
168
      TMessage msg = iprot_.readMessageBegin();
169
      if (msg.type == TMessageType.EXCEPTION) {
170
        TApplicationException x = TApplicationException.read(iprot_);
171
        iprot_.readMessageEnd();
172
        throw x;
173
      }
174
      closeSession_result result = new closeSession_result();
175
      result.read(iprot_);
176
      iprot_.readMessageEnd();
177
      return;
178
    }
179
 
695 rajveer 180
    public long createPayment(long userId, double amount, long gatewayId, long txnId) throws PaymentException, TException
123 ashish 181
    {
695 rajveer 182
      send_createPayment(userId, amount, gatewayId, txnId);
123 ashish 183
      return recv_createPayment();
184
    }
185
 
695 rajveer 186
    public void send_createPayment(long userId, double amount, long gatewayId, long txnId) throws TException
123 ashish 187
    {
188
      oprot_.writeMessageBegin(new TMessage("createPayment", TMessageType.CALL, seqid_));
189
      createPayment_args args = new createPayment_args();
695 rajveer 190
      args.userId = userId;
123 ashish 191
      args.amount = amount;
695 rajveer 192
      args.gatewayId = gatewayId;
193
      args.txnId = txnId;
123 ashish 194
      args.write(oprot_);
195
      oprot_.writeMessageEnd();
196
      oprot_.getTransport().flush();
197
    }
198
 
420 ashish 199
    public long recv_createPayment() throws PaymentException, TException
123 ashish 200
    {
201
      TMessage msg = iprot_.readMessageBegin();
202
      if (msg.type == TMessageType.EXCEPTION) {
203
        TApplicationException x = TApplicationException.read(iprot_);
204
        iprot_.readMessageEnd();
205
        throw x;
206
      }
207
      createPayment_result result = new createPayment_result();
208
      result.read(iprot_);
209
      iprot_.readMessageEnd();
210
      if (result.isSetSuccess()) {
211
        return result.success;
212
      }
213
      if (result.pe != null) {
214
        throw result.pe;
215
      }
216
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createPayment failed: unknown result");
217
    }
218
 
695 rajveer 219
    public List<Payment> getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, TException
123 ashish 220
    {
695 rajveer 221
      send_getPaymentsForUser(userId, fromTime, toTime, status, gatewayId);
123 ashish 222
      return recv_getPaymentsForUser();
223
    }
224
 
695 rajveer 225
    public void send_getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws TException
123 ashish 226
    {
227
      oprot_.writeMessageBegin(new TMessage("getPaymentsForUser", TMessageType.CALL, seqid_));
228
      getPaymentsForUser_args args = new getPaymentsForUser_args();
229
      args.userId = userId;
695 rajveer 230
      args.fromTime = fromTime;
231
      args.toTime = toTime;
123 ashish 232
      args.status = status;
695 rajveer 233
      args.gatewayId = gatewayId;
123 ashish 234
      args.write(oprot_);
235
      oprot_.writeMessageEnd();
236
      oprot_.getTransport().flush();
237
    }
238
 
239
    public List<Payment> recv_getPaymentsForUser() throws PaymentException, TException
240
    {
241
      TMessage msg = iprot_.readMessageBegin();
242
      if (msg.type == TMessageType.EXCEPTION) {
243
        TApplicationException x = TApplicationException.read(iprot_);
244
        iprot_.readMessageEnd();
245
        throw x;
246
      }
247
      getPaymentsForUser_result result = new getPaymentsForUser_result();
248
      result.read(iprot_);
249
      iprot_.readMessageEnd();
250
      if (result.isSetSuccess()) {
251
        return result.success;
252
      }
253
      if (result.pe != null) {
254
        throw result.pe;
255
      }
256
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentsForUser failed: unknown result");
257
    }
258
 
695 rajveer 259
    public List<Payment> getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, TException
123 ashish 260
    {
695 rajveer 261
      send_getPayments(fromTime, toTime, status, gatewayId);
123 ashish 262
      return recv_getPayments();
263
    }
264
 
695 rajveer 265
    public void send_getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws TException
123 ashish 266
    {
267
      oprot_.writeMessageBegin(new TMessage("getPayments", TMessageType.CALL, seqid_));
268
      getPayments_args args = new getPayments_args();
695 rajveer 269
      args.fromTime = fromTime;
270
      args.toTime = toTime;
123 ashish 271
      args.status = status;
695 rajveer 272
      args.gatewayId = gatewayId;
123 ashish 273
      args.write(oprot_);
274
      oprot_.writeMessageEnd();
275
      oprot_.getTransport().flush();
276
    }
277
 
278
    public List<Payment> recv_getPayments() throws PaymentException, TException
279
    {
280
      TMessage msg = iprot_.readMessageBegin();
281
      if (msg.type == TMessageType.EXCEPTION) {
282
        TApplicationException x = TApplicationException.read(iprot_);
283
        iprot_.readMessageEnd();
284
        throw x;
285
      }
286
      getPayments_result result = new getPayments_result();
287
      result.read(iprot_);
288
      iprot_.readMessageEnd();
289
      if (result.isSetSuccess()) {
290
        return result.success;
291
      }
292
      if (result.pe != null) {
293
        throw result.pe;
294
      }
295
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPayments failed: unknown result");
296
    }
297
 
420 ashish 298
    public PaymentGateway getPaymentGateway(long id) throws PaymentException, TException
299
    {
300
      send_getPaymentGateway(id);
301
      return recv_getPaymentGateway();
302
    }
303
 
304
    public void send_getPaymentGateway(long id) throws TException
305
    {
306
      oprot_.writeMessageBegin(new TMessage("getPaymentGateway", TMessageType.CALL, seqid_));
307
      getPaymentGateway_args args = new getPaymentGateway_args();
308
      args.id = id;
309
      args.write(oprot_);
310
      oprot_.writeMessageEnd();
311
      oprot_.getTransport().flush();
312
    }
313
 
314
    public PaymentGateway recv_getPaymentGateway() throws PaymentException, TException
315
    {
316
      TMessage msg = iprot_.readMessageBegin();
317
      if (msg.type == TMessageType.EXCEPTION) {
318
        TApplicationException x = TApplicationException.read(iprot_);
319
        iprot_.readMessageEnd();
320
        throw x;
321
      }
322
      getPaymentGateway_result result = new getPaymentGateway_result();
323
      result.read(iprot_);
324
      iprot_.readMessageEnd();
325
      if (result.isSetSuccess()) {
326
        return result.success;
327
      }
328
      if (result.pe != null) {
329
        throw result.pe;
330
      }
331
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentGateway failed: unknown result");
332
    }
333
 
695 rajveer 334
    public Payment getPayment(long id) throws PaymentException, TException
420 ashish 335
    {
695 rajveer 336
      send_getPayment(id);
337
      return recv_getPayment();
420 ashish 338
    }
339
 
695 rajveer 340
    public void send_getPayment(long id) throws TException
420 ashish 341
    {
695 rajveer 342
      oprot_.writeMessageBegin(new TMessage("getPayment", TMessageType.CALL, seqid_));
343
      getPayment_args args = new getPayment_args();
420 ashish 344
      args.id = id;
345
      args.write(oprot_);
346
      oprot_.writeMessageEnd();
347
      oprot_.getTransport().flush();
348
    }
349
 
695 rajveer 350
    public Payment recv_getPayment() throws PaymentException, TException
420 ashish 351
    {
352
      TMessage msg = iprot_.readMessageBegin();
353
      if (msg.type == TMessageType.EXCEPTION) {
354
        TApplicationException x = TApplicationException.read(iprot_);
355
        iprot_.readMessageEnd();
356
        throw x;
357
      }
695 rajveer 358
      getPayment_result result = new getPayment_result();
420 ashish 359
      result.read(iprot_);
360
      iprot_.readMessageEnd();
695 rajveer 361
      if (result.isSetSuccess()) {
362
        return result.success;
363
      }
420 ashish 364
      if (result.pe != null) {
365
        throw result.pe;
366
      }
695 rajveer 367
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPayment failed: unknown result");
420 ashish 368
    }
369
 
695 rajveer 370
    public List<Payment> getPaymentForTxnId(long txnId) throws PaymentException, TException
420 ashish 371
    {
695 rajveer 372
      send_getPaymentForTxnId(txnId);
373
      return recv_getPaymentForTxnId();
420 ashish 374
    }
375
 
695 rajveer 376
    public void send_getPaymentForTxnId(long txnId) throws TException
420 ashish 377
    {
695 rajveer 378
      oprot_.writeMessageBegin(new TMessage("getPaymentForTxnId", TMessageType.CALL, seqid_));
379
      getPaymentForTxnId_args args = new getPaymentForTxnId_args();
380
      args.txnId = txnId;
420 ashish 381
      args.write(oprot_);
382
      oprot_.writeMessageEnd();
383
      oprot_.getTransport().flush();
384
    }
385
 
695 rajveer 386
    public List<Payment> recv_getPaymentForTxnId() throws PaymentException, TException
420 ashish 387
    {
388
      TMessage msg = iprot_.readMessageBegin();
389
      if (msg.type == TMessageType.EXCEPTION) {
390
        TApplicationException x = TApplicationException.read(iprot_);
391
        iprot_.readMessageEnd();
392
        throw x;
393
      }
695 rajveer 394
      getPaymentForTxnId_result result = new getPaymentForTxnId_result();
420 ashish 395
      result.read(iprot_);
396
      iprot_.readMessageEnd();
397
      if (result.isSetSuccess()) {
398
        return result.success;
399
      }
400
      if (result.pe != null) {
401
        throw result.pe;
402
      }
695 rajveer 403
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentForTxnId failed: unknown result");
420 ashish 404
    }
405
 
1119 rajveer 406
    public boolean updatePaymentDetails(long id, String gatewayPaymentId, String sessionId, String gatewayTxnStatus, String description, String gatewayTxnId, String authCode, String referenceCode, String errorCode, PaymentStatus status, String gatewayTxnDate, List<Attribute> attributes) throws PaymentException, TException
420 ashish 407
    {
1119 rajveer 408
      send_updatePaymentDetails(id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes);
695 rajveer 409
      return recv_updatePaymentDetails();
420 ashish 410
    }
411
 
1119 rajveer 412
    public void send_updatePaymentDetails(long id, String gatewayPaymentId, String sessionId, String gatewayTxnStatus, String description, String gatewayTxnId, String authCode, String referenceCode, String errorCode, PaymentStatus status, String gatewayTxnDate, List<Attribute> attributes) throws TException
420 ashish 413
    {
695 rajveer 414
      oprot_.writeMessageBegin(new TMessage("updatePaymentDetails", TMessageType.CALL, seqid_));
415
      updatePaymentDetails_args args = new updatePaymentDetails_args();
420 ashish 416
      args.id = id;
695 rajveer 417
      args.gatewayPaymentId = gatewayPaymentId;
418
      args.sessionId = sessionId;
419
      args.gatewayTxnStatus = gatewayTxnStatus;
420
      args.description = description;
421
      args.gatewayTxnId = gatewayTxnId;
422
      args.authCode = authCode;
423
      args.referenceCode = referenceCode;
424
      args.errorCode = errorCode;
425
      args.status = status;
1119 rajveer 426
      args.gatewayTxnDate = gatewayTxnDate;
695 rajveer 427
      args.attributes = attributes;
420 ashish 428
      args.write(oprot_);
429
      oprot_.writeMessageEnd();
430
      oprot_.getTransport().flush();
431
    }
432
 
695 rajveer 433
    public boolean recv_updatePaymentDetails() throws PaymentException, TException
420 ashish 434
    {
435
      TMessage msg = iprot_.readMessageBegin();
436
      if (msg.type == TMessageType.EXCEPTION) {
437
        TApplicationException x = TApplicationException.read(iprot_);
438
        iprot_.readMessageEnd();
439
        throw x;
440
      }
695 rajveer 441
      updatePaymentDetails_result result = new updatePaymentDetails_result();
420 ashish 442
      result.read(iprot_);
443
      iprot_.readMessageEnd();
695 rajveer 444
      if (result.isSetSuccess()) {
445
        return result.success;
446
      }
420 ashish 447
      if (result.pe != null) {
448
        throw result.pe;
449
      }
695 rajveer 450
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePaymentDetails failed: unknown result");
420 ashish 451
    }
452
 
1629 ankur.sing 453
    public double getMaxPaymentAmount() throws TException
454
    {
455
      send_getMaxPaymentAmount();
456
      return recv_getMaxPaymentAmount();
457
    }
458
 
459
    public void send_getMaxPaymentAmount() throws TException
460
    {
461
      oprot_.writeMessageBegin(new TMessage("getMaxPaymentAmount", TMessageType.CALL, seqid_));
462
      getMaxPaymentAmount_args args = new getMaxPaymentAmount_args();
463
      args.write(oprot_);
464
      oprot_.writeMessageEnd();
465
      oprot_.getTransport().flush();
466
    }
467
 
468
    public double recv_getMaxPaymentAmount() throws 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
      getMaxPaymentAmount_result result = new getMaxPaymentAmount_result();
477
      result.read(iprot_);
478
      iprot_.readMessageEnd();
479
      if (result.isSetSuccess()) {
480
        return result.success;
481
      }
482
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMaxPaymentAmount failed: unknown result");
483
    }
484
 
485
    public double getMinPaymentAmount() throws TException
486
    {
487
      send_getMinPaymentAmount();
488
      return recv_getMinPaymentAmount();
489
    }
490
 
491
    public void send_getMinPaymentAmount() throws TException
492
    {
493
      oprot_.writeMessageBegin(new TMessage("getMinPaymentAmount", TMessageType.CALL, seqid_));
494
      getMinPaymentAmount_args args = new getMinPaymentAmount_args();
495
      args.write(oprot_);
496
      oprot_.writeMessageEnd();
497
      oprot_.getTransport().flush();
498
    }
499
 
500
    public double recv_getMinPaymentAmount() throws TException
501
    {
502
      TMessage msg = iprot_.readMessageBegin();
503
      if (msg.type == TMessageType.EXCEPTION) {
504
        TApplicationException x = TApplicationException.read(iprot_);
505
        iprot_.readMessageEnd();
506
        throw x;
507
      }
508
      getMinPaymentAmount_result result = new getMinPaymentAmount_result();
509
      result.read(iprot_);
510
      iprot_.readMessageEnd();
511
      if (result.isSetSuccess()) {
512
        return result.success;
513
      }
514
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMinPaymentAmount failed: unknown result");
515
    }
516
 
123 ashish 517
  }
518
  public static class Processor implements TProcessor {
519
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
520
    public Processor(Iface iface)
521
    {
522
      iface_ = iface;
764 rajveer 523
      processMap_.put("closeSession", new closeSession());
123 ashish 524
      processMap_.put("createPayment", new createPayment());
525
      processMap_.put("getPaymentsForUser", new getPaymentsForUser());
526
      processMap_.put("getPayments", new getPayments());
420 ashish 527
      processMap_.put("getPaymentGateway", new getPaymentGateway());
528
      processMap_.put("getPayment", new getPayment());
695 rajveer 529
      processMap_.put("getPaymentForTxnId", new getPaymentForTxnId());
530
      processMap_.put("updatePaymentDetails", new updatePaymentDetails());
1629 ankur.sing 531
      processMap_.put("getMaxPaymentAmount", new getMaxPaymentAmount());
532
      processMap_.put("getMinPaymentAmount", new getMinPaymentAmount());
123 ashish 533
    }
534
 
535
    protected static interface ProcessFunction {
536
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
537
    }
538
 
539
    private Iface iface_;
540
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
541
 
542
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
543
    {
544
      TMessage msg = iprot.readMessageBegin();
545
      ProcessFunction fn = processMap_.get(msg.name);
546
      if (fn == null) {
547
        TProtocolUtil.skip(iprot, TType.STRUCT);
548
        iprot.readMessageEnd();
549
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
550
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
551
        x.write(oprot);
552
        oprot.writeMessageEnd();
553
        oprot.getTransport().flush();
554
        return true;
555
      }
556
      fn.process(msg.seqid, iprot, oprot);
557
      return true;
558
    }
559
 
764 rajveer 560
    private class closeSession implements ProcessFunction {
561
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
562
      {
563
        closeSession_args args = new closeSession_args();
564
        args.read(iprot);
565
        iprot.readMessageEnd();
566
        closeSession_result result = new closeSession_result();
567
        iface_.closeSession();
568
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
569
        result.write(oprot);
570
        oprot.writeMessageEnd();
571
        oprot.getTransport().flush();
572
      }
573
 
574
    }
575
 
123 ashish 576
    private class createPayment implements ProcessFunction {
577
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
578
      {
579
        createPayment_args args = new createPayment_args();
580
        args.read(iprot);
581
        iprot.readMessageEnd();
582
        createPayment_result result = new createPayment_result();
583
        try {
695 rajveer 584
          result.success = iface_.createPayment(args.userId, args.amount, args.gatewayId, args.txnId);
420 ashish 585
          result.setSuccessIsSet(true);
123 ashish 586
        } catch (PaymentException pe) {
587
          result.pe = pe;
588
        } catch (Throwable th) {
589
          LOGGER.error("Internal error processing createPayment", th);
590
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createPayment");
591
          oprot.writeMessageBegin(new TMessage("createPayment", TMessageType.EXCEPTION, seqid));
592
          x.write(oprot);
593
          oprot.writeMessageEnd();
594
          oprot.getTransport().flush();
595
          return;
596
        }
597
        oprot.writeMessageBegin(new TMessage("createPayment", TMessageType.REPLY, seqid));
598
        result.write(oprot);
599
        oprot.writeMessageEnd();
600
        oprot.getTransport().flush();
601
      }
602
 
603
    }
604
 
605
    private class getPaymentsForUser implements ProcessFunction {
606
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
607
      {
608
        getPaymentsForUser_args args = new getPaymentsForUser_args();
609
        args.read(iprot);
610
        iprot.readMessageEnd();
611
        getPaymentsForUser_result result = new getPaymentsForUser_result();
612
        try {
695 rajveer 613
          result.success = iface_.getPaymentsForUser(args.userId, args.fromTime, args.toTime, args.status, args.gatewayId);
123 ashish 614
        } catch (PaymentException pe) {
615
          result.pe = pe;
616
        } catch (Throwable th) {
617
          LOGGER.error("Internal error processing getPaymentsForUser", th);
618
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPaymentsForUser");
619
          oprot.writeMessageBegin(new TMessage("getPaymentsForUser", TMessageType.EXCEPTION, seqid));
620
          x.write(oprot);
621
          oprot.writeMessageEnd();
622
          oprot.getTransport().flush();
623
          return;
624
        }
625
        oprot.writeMessageBegin(new TMessage("getPaymentsForUser", TMessageType.REPLY, seqid));
626
        result.write(oprot);
627
        oprot.writeMessageEnd();
628
        oprot.getTransport().flush();
629
      }
630
 
631
    }
632
 
633
    private class getPayments implements ProcessFunction {
634
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
635
      {
636
        getPayments_args args = new getPayments_args();
637
        args.read(iprot);
638
        iprot.readMessageEnd();
639
        getPayments_result result = new getPayments_result();
640
        try {
695 rajveer 641
          result.success = iface_.getPayments(args.fromTime, args.toTime, args.status, args.gatewayId);
123 ashish 642
        } catch (PaymentException pe) {
643
          result.pe = pe;
644
        } catch (Throwable th) {
645
          LOGGER.error("Internal error processing getPayments", th);
646
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPayments");
647
          oprot.writeMessageBegin(new TMessage("getPayments", TMessageType.EXCEPTION, seqid));
648
          x.write(oprot);
649
          oprot.writeMessageEnd();
650
          oprot.getTransport().flush();
651
          return;
652
        }
653
        oprot.writeMessageBegin(new TMessage("getPayments", TMessageType.REPLY, seqid));
654
        result.write(oprot);
655
        oprot.writeMessageEnd();
656
        oprot.getTransport().flush();
657
      }
658
 
659
    }
660
 
420 ashish 661
    private class getPaymentGateway implements ProcessFunction {
662
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
663
      {
664
        getPaymentGateway_args args = new getPaymentGateway_args();
665
        args.read(iprot);
666
        iprot.readMessageEnd();
667
        getPaymentGateway_result result = new getPaymentGateway_result();
668
        try {
669
          result.success = iface_.getPaymentGateway(args.id);
670
        } catch (PaymentException pe) {
671
          result.pe = pe;
672
        } catch (Throwable th) {
673
          LOGGER.error("Internal error processing getPaymentGateway", th);
674
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPaymentGateway");
675
          oprot.writeMessageBegin(new TMessage("getPaymentGateway", TMessageType.EXCEPTION, seqid));
676
          x.write(oprot);
677
          oprot.writeMessageEnd();
678
          oprot.getTransport().flush();
679
          return;
680
        }
681
        oprot.writeMessageBegin(new TMessage("getPaymentGateway", TMessageType.REPLY, seqid));
682
        result.write(oprot);
683
        oprot.writeMessageEnd();
684
        oprot.getTransport().flush();
685
      }
686
 
687
    }
688
 
695 rajveer 689
    private class getPayment implements ProcessFunction {
420 ashish 690
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
691
      {
695 rajveer 692
        getPayment_args args = new getPayment_args();
420 ashish 693
        args.read(iprot);
694
        iprot.readMessageEnd();
695 rajveer 695
        getPayment_result result = new getPayment_result();
420 ashish 696
        try {
695 rajveer 697
          result.success = iface_.getPayment(args.id);
420 ashish 698
        } catch (PaymentException pe) {
699
          result.pe = pe;
700
        } catch (Throwable th) {
695 rajveer 701
          LOGGER.error("Internal error processing getPayment", th);
702
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPayment");
703
          oprot.writeMessageBegin(new TMessage("getPayment", TMessageType.EXCEPTION, seqid));
420 ashish 704
          x.write(oprot);
705
          oprot.writeMessageEnd();
706
          oprot.getTransport().flush();
707
          return;
708
        }
695 rajveer 709
        oprot.writeMessageBegin(new TMessage("getPayment", TMessageType.REPLY, seqid));
420 ashish 710
        result.write(oprot);
711
        oprot.writeMessageEnd();
712
        oprot.getTransport().flush();
713
      }
714
 
715
    }
716
 
695 rajveer 717
    private class getPaymentForTxnId implements ProcessFunction {
420 ashish 718
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
719
      {
695 rajveer 720
        getPaymentForTxnId_args args = new getPaymentForTxnId_args();
420 ashish 721
        args.read(iprot);
722
        iprot.readMessageEnd();
695 rajveer 723
        getPaymentForTxnId_result result = new getPaymentForTxnId_result();
420 ashish 724
        try {
695 rajveer 725
          result.success = iface_.getPaymentForTxnId(args.txnId);
420 ashish 726
        } catch (PaymentException pe) {
727
          result.pe = pe;
728
        } catch (Throwable th) {
695 rajveer 729
          LOGGER.error("Internal error processing getPaymentForTxnId", th);
730
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPaymentForTxnId");
731
          oprot.writeMessageBegin(new TMessage("getPaymentForTxnId", TMessageType.EXCEPTION, seqid));
420 ashish 732
          x.write(oprot);
733
          oprot.writeMessageEnd();
734
          oprot.getTransport().flush();
735
          return;
736
        }
695 rajveer 737
        oprot.writeMessageBegin(new TMessage("getPaymentForTxnId", TMessageType.REPLY, seqid));
420 ashish 738
        result.write(oprot);
739
        oprot.writeMessageEnd();
740
        oprot.getTransport().flush();
741
      }
742
 
743
    }
744
 
695 rajveer 745
    private class updatePaymentDetails implements ProcessFunction {
420 ashish 746
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
747
      {
695 rajveer 748
        updatePaymentDetails_args args = new updatePaymentDetails_args();
420 ashish 749
        args.read(iprot);
750
        iprot.readMessageEnd();
695 rajveer 751
        updatePaymentDetails_result result = new updatePaymentDetails_result();
420 ashish 752
        try {
1119 rajveer 753
          result.success = iface_.updatePaymentDetails(args.id, args.gatewayPaymentId, args.sessionId, args.gatewayTxnStatus, args.description, args.gatewayTxnId, args.authCode, args.referenceCode, args.errorCode, args.status, args.gatewayTxnDate, args.attributes);
695 rajveer 754
          result.setSuccessIsSet(true);
420 ashish 755
        } catch (PaymentException pe) {
756
          result.pe = pe;
757
        } catch (Throwable th) {
695 rajveer 758
          LOGGER.error("Internal error processing updatePaymentDetails", th);
759
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePaymentDetails");
760
          oprot.writeMessageBegin(new TMessage("updatePaymentDetails", TMessageType.EXCEPTION, seqid));
420 ashish 761
          x.write(oprot);
762
          oprot.writeMessageEnd();
763
          oprot.getTransport().flush();
764
          return;
765
        }
695 rajveer 766
        oprot.writeMessageBegin(new TMessage("updatePaymentDetails", TMessageType.REPLY, seqid));
420 ashish 767
        result.write(oprot);
768
        oprot.writeMessageEnd();
769
        oprot.getTransport().flush();
770
      }
771
 
772
    }
773
 
1629 ankur.sing 774
    private class getMaxPaymentAmount implements ProcessFunction {
775
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
776
      {
777
        getMaxPaymentAmount_args args = new getMaxPaymentAmount_args();
778
        args.read(iprot);
779
        iprot.readMessageEnd();
780
        getMaxPaymentAmount_result result = new getMaxPaymentAmount_result();
781
        result.success = iface_.getMaxPaymentAmount();
782
        result.setSuccessIsSet(true);
783
        oprot.writeMessageBegin(new TMessage("getMaxPaymentAmount", TMessageType.REPLY, seqid));
784
        result.write(oprot);
785
        oprot.writeMessageEnd();
786
        oprot.getTransport().flush();
787
      }
788
 
789
    }
790
 
791
    private class getMinPaymentAmount implements ProcessFunction {
792
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
793
      {
794
        getMinPaymentAmount_args args = new getMinPaymentAmount_args();
795
        args.read(iprot);
796
        iprot.readMessageEnd();
797
        getMinPaymentAmount_result result = new getMinPaymentAmount_result();
798
        result.success = iface_.getMinPaymentAmount();
799
        result.setSuccessIsSet(true);
800
        oprot.writeMessageBegin(new TMessage("getMinPaymentAmount", TMessageType.REPLY, seqid));
801
        result.write(oprot);
802
        oprot.writeMessageEnd();
803
        oprot.getTransport().flush();
804
      }
805
 
806
    }
807
 
123 ashish 808
  }
809
 
764 rajveer 810
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
811
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
812
 
813
 
814
 
815
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
816
    public enum _Fields implements TFieldIdEnum {
817
;
818
 
819
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
820
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
821
 
822
      static {
823
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
824
          byId.put((int)field._thriftId, field);
825
          byName.put(field.getFieldName(), field);
826
        }
827
      }
828
 
829
      /**
830
       * Find the _Fields constant that matches fieldId, or null if its not found.
831
       */
832
      public static _Fields findByThriftId(int fieldId) {
833
        return byId.get(fieldId);
834
      }
835
 
836
      /**
837
       * Find the _Fields constant that matches fieldId, throwing an exception
838
       * if it is not found.
839
       */
840
      public static _Fields findByThriftIdOrThrow(int fieldId) {
841
        _Fields fields = findByThriftId(fieldId);
842
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
843
        return fields;
844
      }
845
 
846
      /**
847
       * Find the _Fields constant that matches name, or null if its not found.
848
       */
849
      public static _Fields findByName(String name) {
850
        return byName.get(name);
851
      }
852
 
853
      private final short _thriftId;
854
      private final String _fieldName;
855
 
856
      _Fields(short thriftId, String fieldName) {
857
        _thriftId = thriftId;
858
        _fieldName = fieldName;
859
      }
860
 
861
      public short getThriftFieldId() {
862
        return _thriftId;
863
      }
864
 
865
      public String getFieldName() {
866
        return _fieldName;
867
      }
868
    }
869
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
870
    }});
871
 
872
    static {
873
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
874
    }
875
 
876
    public closeSession_args() {
877
    }
878
 
879
    /**
880
     * Performs a deep copy on <i>other</i>.
881
     */
882
    public closeSession_args(closeSession_args other) {
883
    }
884
 
885
    public closeSession_args deepCopy() {
886
      return new closeSession_args(this);
887
    }
888
 
889
    @Deprecated
890
    public closeSession_args clone() {
891
      return new closeSession_args(this);
892
    }
893
 
894
    public void setFieldValue(_Fields field, Object value) {
895
      switch (field) {
896
      }
897
    }
898
 
899
    public void setFieldValue(int fieldID, Object value) {
900
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
901
    }
902
 
903
    public Object getFieldValue(_Fields field) {
904
      switch (field) {
905
      }
906
      throw new IllegalStateException();
907
    }
908
 
909
    public Object getFieldValue(int fieldId) {
910
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
911
    }
912
 
913
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
914
    public boolean isSet(_Fields field) {
915
      switch (field) {
916
      }
917
      throw new IllegalStateException();
918
    }
919
 
920
    public boolean isSet(int fieldID) {
921
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
922
    }
923
 
924
    @Override
925
    public boolean equals(Object that) {
926
      if (that == null)
927
        return false;
928
      if (that instanceof closeSession_args)
929
        return this.equals((closeSession_args)that);
930
      return false;
931
    }
932
 
933
    public boolean equals(closeSession_args that) {
934
      if (that == null)
935
        return false;
936
 
937
      return true;
938
    }
939
 
940
    @Override
941
    public int hashCode() {
942
      return 0;
943
    }
944
 
945
    public int compareTo(closeSession_args other) {
946
      if (!getClass().equals(other.getClass())) {
947
        return getClass().getName().compareTo(other.getClass().getName());
948
      }
949
 
950
      int lastComparison = 0;
951
      closeSession_args typedOther = (closeSession_args)other;
952
 
953
      return 0;
954
    }
955
 
956
    public void read(TProtocol iprot) throws TException {
957
      TField field;
958
      iprot.readStructBegin();
959
      while (true)
960
      {
961
        field = iprot.readFieldBegin();
962
        if (field.type == TType.STOP) { 
963
          break;
964
        }
965
        _Fields fieldId = _Fields.findByThriftId(field.id);
966
        if (fieldId == null) {
967
          TProtocolUtil.skip(iprot, field.type);
968
        } else {
969
          switch (fieldId) {
970
          }
971
          iprot.readFieldEnd();
972
        }
973
      }
974
      iprot.readStructEnd();
975
      validate();
976
    }
977
 
978
    public void write(TProtocol oprot) throws TException {
979
      validate();
980
 
981
      oprot.writeStructBegin(STRUCT_DESC);
982
      oprot.writeFieldStop();
983
      oprot.writeStructEnd();
984
    }
985
 
986
    @Override
987
    public String toString() {
988
      StringBuilder sb = new StringBuilder("closeSession_args(");
989
      boolean first = true;
990
 
991
      sb.append(")");
992
      return sb.toString();
993
    }
994
 
995
    public void validate() throws TException {
996
      // check for required fields
997
    }
998
 
999
  }
1000
 
1001
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
1002
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
1003
 
1004
 
1005
 
1006
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1007
    public enum _Fields implements TFieldIdEnum {
1008
;
1009
 
1010
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1011
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1012
 
1013
      static {
1014
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1015
          byId.put((int)field._thriftId, field);
1016
          byName.put(field.getFieldName(), field);
1017
        }
1018
      }
1019
 
1020
      /**
1021
       * Find the _Fields constant that matches fieldId, or null if its not found.
1022
       */
1023
      public static _Fields findByThriftId(int fieldId) {
1024
        return byId.get(fieldId);
1025
      }
1026
 
1027
      /**
1028
       * Find the _Fields constant that matches fieldId, throwing an exception
1029
       * if it is not found.
1030
       */
1031
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1032
        _Fields fields = findByThriftId(fieldId);
1033
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1034
        return fields;
1035
      }
1036
 
1037
      /**
1038
       * Find the _Fields constant that matches name, or null if its not found.
1039
       */
1040
      public static _Fields findByName(String name) {
1041
        return byName.get(name);
1042
      }
1043
 
1044
      private final short _thriftId;
1045
      private final String _fieldName;
1046
 
1047
      _Fields(short thriftId, String fieldName) {
1048
        _thriftId = thriftId;
1049
        _fieldName = fieldName;
1050
      }
1051
 
1052
      public short getThriftFieldId() {
1053
        return _thriftId;
1054
      }
1055
 
1056
      public String getFieldName() {
1057
        return _fieldName;
1058
      }
1059
    }
1060
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1061
    }});
1062
 
1063
    static {
1064
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
1065
    }
1066
 
1067
    public closeSession_result() {
1068
    }
1069
 
1070
    /**
1071
     * Performs a deep copy on <i>other</i>.
1072
     */
1073
    public closeSession_result(closeSession_result other) {
1074
    }
1075
 
1076
    public closeSession_result deepCopy() {
1077
      return new closeSession_result(this);
1078
    }
1079
 
1080
    @Deprecated
1081
    public closeSession_result clone() {
1082
      return new closeSession_result(this);
1083
    }
1084
 
1085
    public void setFieldValue(_Fields field, Object value) {
1086
      switch (field) {
1087
      }
1088
    }
1089
 
1090
    public void setFieldValue(int fieldID, Object value) {
1091
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1092
    }
1093
 
1094
    public Object getFieldValue(_Fields field) {
1095
      switch (field) {
1096
      }
1097
      throw new IllegalStateException();
1098
    }
1099
 
1100
    public Object getFieldValue(int fieldId) {
1101
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1102
    }
1103
 
1104
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1105
    public boolean isSet(_Fields field) {
1106
      switch (field) {
1107
      }
1108
      throw new IllegalStateException();
1109
    }
1110
 
1111
    public boolean isSet(int fieldID) {
1112
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1113
    }
1114
 
1115
    @Override
1116
    public boolean equals(Object that) {
1117
      if (that == null)
1118
        return false;
1119
      if (that instanceof closeSession_result)
1120
        return this.equals((closeSession_result)that);
1121
      return false;
1122
    }
1123
 
1124
    public boolean equals(closeSession_result that) {
1125
      if (that == null)
1126
        return false;
1127
 
1128
      return true;
1129
    }
1130
 
1131
    @Override
1132
    public int hashCode() {
1133
      return 0;
1134
    }
1135
 
1136
    public int compareTo(closeSession_result other) {
1137
      if (!getClass().equals(other.getClass())) {
1138
        return getClass().getName().compareTo(other.getClass().getName());
1139
      }
1140
 
1141
      int lastComparison = 0;
1142
      closeSession_result typedOther = (closeSession_result)other;
1143
 
1144
      return 0;
1145
    }
1146
 
1147
    public void read(TProtocol iprot) throws TException {
1148
      TField field;
1149
      iprot.readStructBegin();
1150
      while (true)
1151
      {
1152
        field = iprot.readFieldBegin();
1153
        if (field.type == TType.STOP) { 
1154
          break;
1155
        }
1156
        _Fields fieldId = _Fields.findByThriftId(field.id);
1157
        if (fieldId == null) {
1158
          TProtocolUtil.skip(iprot, field.type);
1159
        } else {
1160
          switch (fieldId) {
1161
          }
1162
          iprot.readFieldEnd();
1163
        }
1164
      }
1165
      iprot.readStructEnd();
1166
      validate();
1167
    }
1168
 
1169
    public void write(TProtocol oprot) throws TException {
1170
      oprot.writeStructBegin(STRUCT_DESC);
1171
 
1172
      oprot.writeFieldStop();
1173
      oprot.writeStructEnd();
1174
    }
1175
 
1176
    @Override
1177
    public String toString() {
1178
      StringBuilder sb = new StringBuilder("closeSession_result(");
1179
      boolean first = true;
1180
 
1181
      sb.append(")");
1182
      return sb.toString();
1183
    }
1184
 
1185
    public void validate() throws TException {
1186
      // check for required fields
1187
    }
1188
 
1189
  }
1190
 
123 ashish 1191
  public static class createPayment_args implements TBase<createPayment_args._Fields>, java.io.Serializable, Cloneable, Comparable<createPayment_args>   {
1192
    private static final TStruct STRUCT_DESC = new TStruct("createPayment_args");
1193
 
695 rajveer 1194
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
1195
    private static final TField AMOUNT_FIELD_DESC = new TField("amount", TType.DOUBLE, (short)2);
1196
    private static final TField GATEWAY_ID_FIELD_DESC = new TField("gatewayId", TType.I64, (short)3);
1197
    private static final TField TXN_ID_FIELD_DESC = new TField("txnId", TType.I64, (short)4);
123 ashish 1198
 
695 rajveer 1199
    private long userId;
123 ashish 1200
    private double amount;
695 rajveer 1201
    private long gatewayId;
1202
    private long txnId;
123 ashish 1203
 
1204
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1205
    public enum _Fields implements TFieldIdEnum {
695 rajveer 1206
      USER_ID((short)1, "userId"),
1207
      AMOUNT((short)2, "amount"),
1208
      GATEWAY_ID((short)3, "gatewayId"),
1209
      TXN_ID((short)4, "txnId");
123 ashish 1210
 
1211
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1212
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1213
 
1214
      static {
1215
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1216
          byId.put((int)field._thriftId, field);
1217
          byName.put(field.getFieldName(), field);
1218
        }
1219
      }
1220
 
1221
      /**
1222
       * Find the _Fields constant that matches fieldId, or null if its not found.
1223
       */
1224
      public static _Fields findByThriftId(int fieldId) {
1225
        return byId.get(fieldId);
1226
      }
1227
 
1228
      /**
1229
       * Find the _Fields constant that matches fieldId, throwing an exception
1230
       * if it is not found.
1231
       */
1232
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1233
        _Fields fields = findByThriftId(fieldId);
1234
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1235
        return fields;
1236
      }
1237
 
1238
      /**
1239
       * Find the _Fields constant that matches name, or null if its not found.
1240
       */
1241
      public static _Fields findByName(String name) {
1242
        return byName.get(name);
1243
      }
1244
 
1245
      private final short _thriftId;
1246
      private final String _fieldName;
1247
 
1248
      _Fields(short thriftId, String fieldName) {
1249
        _thriftId = thriftId;
1250
        _fieldName = fieldName;
1251
      }
1252
 
1253
      public short getThriftFieldId() {
1254
        return _thriftId;
1255
      }
1256
 
1257
      public String getFieldName() {
1258
        return _fieldName;
1259
      }
1260
    }
1261
 
1262
    // isset id assignments
695 rajveer 1263
    private static final int __USERID_ISSET_ID = 0;
1264
    private static final int __AMOUNT_ISSET_ID = 1;
1265
    private static final int __GATEWAYID_ISSET_ID = 2;
1266
    private static final int __TXNID_ISSET_ID = 3;
420 ashish 1267
    private BitSet __isset_bit_vector = new BitSet(4);
123 ashish 1268
 
1269
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
695 rajveer 1270
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
123 ashish 1271
          new FieldValueMetaData(TType.I64)));
1272
      put(_Fields.AMOUNT, new FieldMetaData("amount", TFieldRequirementType.DEFAULT, 
1273
          new FieldValueMetaData(TType.DOUBLE)));
695 rajveer 1274
      put(_Fields.GATEWAY_ID, new FieldMetaData("gatewayId", TFieldRequirementType.DEFAULT, 
420 ashish 1275
          new FieldValueMetaData(TType.I64)));
695 rajveer 1276
      put(_Fields.TXN_ID, new FieldMetaData("txnId", TFieldRequirementType.DEFAULT, 
1277
          new FieldValueMetaData(TType.I64)));
123 ashish 1278
    }});
1279
 
1280
    static {
1281
      FieldMetaData.addStructMetaDataMap(createPayment_args.class, metaDataMap);
1282
    }
1283
 
1284
    public createPayment_args() {
1285
    }
1286
 
1287
    public createPayment_args(
695 rajveer 1288
      long userId,
123 ashish 1289
      double amount,
695 rajveer 1290
      long gatewayId,
1291
      long txnId)
123 ashish 1292
    {
1293
      this();
695 rajveer 1294
      this.userId = userId;
1295
      setUserIdIsSet(true);
123 ashish 1296
      this.amount = amount;
1297
      setAmountIsSet(true);
695 rajveer 1298
      this.gatewayId = gatewayId;
1299
      setGatewayIdIsSet(true);
1300
      this.txnId = txnId;
1301
      setTxnIdIsSet(true);
123 ashish 1302
    }
1303
 
1304
    /**
1305
     * Performs a deep copy on <i>other</i>.
1306
     */
1307
    public createPayment_args(createPayment_args other) {
1308
      __isset_bit_vector.clear();
1309
      __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 1310
      this.userId = other.userId;
123 ashish 1311
      this.amount = other.amount;
695 rajveer 1312
      this.gatewayId = other.gatewayId;
1313
      this.txnId = other.txnId;
123 ashish 1314
    }
1315
 
1316
    public createPayment_args deepCopy() {
1317
      return new createPayment_args(this);
1318
    }
1319
 
1320
    @Deprecated
1321
    public createPayment_args clone() {
1322
      return new createPayment_args(this);
1323
    }
1324
 
695 rajveer 1325
    public long getUserId() {
1326
      return this.userId;
123 ashish 1327
    }
1328
 
695 rajveer 1329
    public createPayment_args setUserId(long userId) {
1330
      this.userId = userId;
1331
      setUserIdIsSet(true);
123 ashish 1332
      return this;
1333
    }
1334
 
695 rajveer 1335
    public void unsetUserId() {
1336
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 1337
    }
1338
 
695 rajveer 1339
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
1340
    public boolean isSetUserId() {
1341
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 1342
    }
1343
 
695 rajveer 1344
    public void setUserIdIsSet(boolean value) {
1345
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
123 ashish 1346
    }
1347
 
1348
    public double getAmount() {
1349
      return this.amount;
1350
    }
1351
 
1352
    public createPayment_args setAmount(double amount) {
1353
      this.amount = amount;
1354
      setAmountIsSet(true);
1355
      return this;
1356
    }
1357
 
1358
    public void unsetAmount() {
1359
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
1360
    }
1361
 
1362
    /** Returns true if field amount is set (has been asigned a value) and false otherwise */
1363
    public boolean isSetAmount() {
1364
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
1365
    }
1366
 
1367
    public void setAmountIsSet(boolean value) {
1368
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
1369
    }
1370
 
695 rajveer 1371
    public long getGatewayId() {
1372
      return this.gatewayId;
123 ashish 1373
    }
1374
 
695 rajveer 1375
    public createPayment_args setGatewayId(long gatewayId) {
1376
      this.gatewayId = gatewayId;
1377
      setGatewayIdIsSet(true);
123 ashish 1378
      return this;
1379
    }
1380
 
695 rajveer 1381
    public void unsetGatewayId() {
1382
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 1383
    }
1384
 
695 rajveer 1385
    /** Returns true if field gatewayId is set (has been asigned a value) and false otherwise */
1386
    public boolean isSetGatewayId() {
1387
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 1388
    }
1389
 
695 rajveer 1390
    public void setGatewayIdIsSet(boolean value) {
1391
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
123 ashish 1392
    }
1393
 
695 rajveer 1394
    public long getTxnId() {
1395
      return this.txnId;
1396
    }
1397
 
1398
    public createPayment_args setTxnId(long txnId) {
1399
      this.txnId = txnId;
1400
      setTxnIdIsSet(true);
1401
      return this;
1402
    }
1403
 
1404
    public void unsetTxnId() {
1405
      __isset_bit_vector.clear(__TXNID_ISSET_ID);
1406
    }
1407
 
1408
    /** Returns true if field txnId is set (has been asigned a value) and false otherwise */
1409
    public boolean isSetTxnId() {
1410
      return __isset_bit_vector.get(__TXNID_ISSET_ID);
1411
    }
1412
 
1413
    public void setTxnIdIsSet(boolean value) {
1414
      __isset_bit_vector.set(__TXNID_ISSET_ID, value);
1415
    }
1416
 
123 ashish 1417
    public void setFieldValue(_Fields field, Object value) {
1418
      switch (field) {
1419
      case USER_ID:
1420
        if (value == null) {
695 rajveer 1421
          unsetUserId();
123 ashish 1422
        } else {
695 rajveer 1423
          setUserId((Long)value);
123 ashish 1424
        }
1425
        break;
1426
 
695 rajveer 1427
      case AMOUNT:
123 ashish 1428
        if (value == null) {
695 rajveer 1429
          unsetAmount();
123 ashish 1430
        } else {
695 rajveer 1431
          setAmount((Double)value);
123 ashish 1432
        }
1433
        break;
1434
 
695 rajveer 1435
      case GATEWAY_ID:
123 ashish 1436
        if (value == null) {
695 rajveer 1437
          unsetGatewayId();
123 ashish 1438
        } else {
695 rajveer 1439
          setGatewayId((Long)value);
123 ashish 1440
        }
1441
        break;
1442
 
695 rajveer 1443
      case TXN_ID:
123 ashish 1444
        if (value == null) {
695 rajveer 1445
          unsetTxnId();
123 ashish 1446
        } else {
695 rajveer 1447
          setTxnId((Long)value);
123 ashish 1448
        }
1449
        break;
1450
 
1451
      }
1452
    }
1453
 
1454
    public void setFieldValue(int fieldID, Object value) {
1455
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1456
    }
1457
 
1458
    public Object getFieldValue(_Fields field) {
1459
      switch (field) {
1460
      case USER_ID:
695 rajveer 1461
        return new Long(getUserId());
123 ashish 1462
 
1463
      case AMOUNT:
1464
        return new Double(getAmount());
1465
 
420 ashish 1466
      case GATEWAY_ID:
695 rajveer 1467
        return new Long(getGatewayId());
123 ashish 1468
 
695 rajveer 1469
      case TXN_ID:
1470
        return new Long(getTxnId());
1471
 
123 ashish 1472
      }
1473
      throw new IllegalStateException();
1474
    }
1475
 
1476
    public Object getFieldValue(int fieldId) {
1477
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1478
    }
1479
 
1480
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1481
    public boolean isSet(_Fields field) {
1482
      switch (field) {
1483
      case USER_ID:
695 rajveer 1484
        return isSetUserId();
123 ashish 1485
      case AMOUNT:
1486
        return isSetAmount();
420 ashish 1487
      case GATEWAY_ID:
695 rajveer 1488
        return isSetGatewayId();
1489
      case TXN_ID:
1490
        return isSetTxnId();
123 ashish 1491
      }
1492
      throw new IllegalStateException();
1493
    }
1494
 
1495
    public boolean isSet(int fieldID) {
1496
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1497
    }
1498
 
1499
    @Override
1500
    public boolean equals(Object that) {
1501
      if (that == null)
1502
        return false;
1503
      if (that instanceof createPayment_args)
1504
        return this.equals((createPayment_args)that);
1505
      return false;
1506
    }
1507
 
1508
    public boolean equals(createPayment_args that) {
1509
      if (that == null)
1510
        return false;
1511
 
695 rajveer 1512
      boolean this_present_userId = true;
1513
      boolean that_present_userId = true;
1514
      if (this_present_userId || that_present_userId) {
1515
        if (!(this_present_userId && that_present_userId))
123 ashish 1516
          return false;
695 rajveer 1517
        if (this.userId != that.userId)
123 ashish 1518
          return false;
1519
      }
1520
 
1521
      boolean this_present_amount = true;
1522
      boolean that_present_amount = true;
1523
      if (this_present_amount || that_present_amount) {
1524
        if (!(this_present_amount && that_present_amount))
1525
          return false;
1526
        if (this.amount != that.amount)
1527
          return false;
1528
      }
1529
 
695 rajveer 1530
      boolean this_present_gatewayId = true;
1531
      boolean that_present_gatewayId = true;
1532
      if (this_present_gatewayId || that_present_gatewayId) {
1533
        if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 1534
          return false;
695 rajveer 1535
        if (this.gatewayId != that.gatewayId)
123 ashish 1536
          return false;
1537
      }
1538
 
695 rajveer 1539
      boolean this_present_txnId = true;
1540
      boolean that_present_txnId = true;
1541
      if (this_present_txnId || that_present_txnId) {
1542
        if (!(this_present_txnId && that_present_txnId))
1543
          return false;
1544
        if (this.txnId != that.txnId)
1545
          return false;
1546
      }
1547
 
123 ashish 1548
      return true;
1549
    }
1550
 
1551
    @Override
1552
    public int hashCode() {
1553
      return 0;
1554
    }
1555
 
1556
    public int compareTo(createPayment_args other) {
1557
      if (!getClass().equals(other.getClass())) {
1558
        return getClass().getName().compareTo(other.getClass().getName());
1559
      }
1560
 
1561
      int lastComparison = 0;
1562
      createPayment_args typedOther = (createPayment_args)other;
1563
 
695 rajveer 1564
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
123 ashish 1565
      if (lastComparison != 0) {
1566
        return lastComparison;
1567
      }
695 rajveer 1568
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
123 ashish 1569
      if (lastComparison != 0) {
1570
        return lastComparison;
1571
      }
695 rajveer 1572
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(isSetAmount());
123 ashish 1573
      if (lastComparison != 0) {
1574
        return lastComparison;
1575
      }
695 rajveer 1576
      lastComparison = TBaseHelper.compareTo(amount, typedOther.amount);
123 ashish 1577
      if (lastComparison != 0) {
1578
        return lastComparison;
1579
      }
695 rajveer 1580
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(isSetGatewayId());
123 ashish 1581
      if (lastComparison != 0) {
1582
        return lastComparison;
1583
      }
695 rajveer 1584
      lastComparison = TBaseHelper.compareTo(gatewayId, typedOther.gatewayId);
123 ashish 1585
      if (lastComparison != 0) {
1586
        return lastComparison;
1587
      }
695 rajveer 1588
      lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(isSetTxnId());
123 ashish 1589
      if (lastComparison != 0) {
1590
        return lastComparison;
1591
      }
695 rajveer 1592
      lastComparison = TBaseHelper.compareTo(txnId, typedOther.txnId);
123 ashish 1593
      if (lastComparison != 0) {
1594
        return lastComparison;
1595
      }
1596
      return 0;
1597
    }
1598
 
1599
    public void read(TProtocol iprot) throws TException {
1600
      TField field;
1601
      iprot.readStructBegin();
1602
      while (true)
1603
      {
1604
        field = iprot.readFieldBegin();
1605
        if (field.type == TType.STOP) { 
1606
          break;
1607
        }
1608
        _Fields fieldId = _Fields.findByThriftId(field.id);
1609
        if (fieldId == null) {
1610
          TProtocolUtil.skip(iprot, field.type);
1611
        } else {
1612
          switch (fieldId) {
1613
            case USER_ID:
1614
              if (field.type == TType.I64) {
695 rajveer 1615
                this.userId = iprot.readI64();
1616
                setUserIdIsSet(true);
123 ashish 1617
              } else { 
1618
                TProtocolUtil.skip(iprot, field.type);
1619
              }
1620
              break;
1621
            case AMOUNT:
1622
              if (field.type == TType.DOUBLE) {
1623
                this.amount = iprot.readDouble();
1624
                setAmountIsSet(true);
1625
              } else { 
1626
                TProtocolUtil.skip(iprot, field.type);
1627
              }
1628
              break;
420 ashish 1629
            case GATEWAY_ID:
1630
              if (field.type == TType.I64) {
695 rajveer 1631
                this.gatewayId = iprot.readI64();
1632
                setGatewayIdIsSet(true);
123 ashish 1633
              } else { 
1634
                TProtocolUtil.skip(iprot, field.type);
1635
              }
1636
              break;
695 rajveer 1637
            case TXN_ID:
1638
              if (field.type == TType.I64) {
1639
                this.txnId = iprot.readI64();
1640
                setTxnIdIsSet(true);
1641
              } else { 
1642
                TProtocolUtil.skip(iprot, field.type);
1643
              }
1644
              break;
123 ashish 1645
          }
1646
          iprot.readFieldEnd();
1647
        }
1648
      }
1649
      iprot.readStructEnd();
1650
      validate();
1651
    }
1652
 
1653
    public void write(TProtocol oprot) throws TException {
1654
      validate();
1655
 
1656
      oprot.writeStructBegin(STRUCT_DESC);
1657
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
695 rajveer 1658
      oprot.writeI64(this.userId);
123 ashish 1659
      oprot.writeFieldEnd();
1660
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
1661
      oprot.writeDouble(this.amount);
1662
      oprot.writeFieldEnd();
420 ashish 1663
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
695 rajveer 1664
      oprot.writeI64(this.gatewayId);
420 ashish 1665
      oprot.writeFieldEnd();
695 rajveer 1666
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
1667
      oprot.writeI64(this.txnId);
1668
      oprot.writeFieldEnd();
123 ashish 1669
      oprot.writeFieldStop();
1670
      oprot.writeStructEnd();
1671
    }
1672
 
1673
    @Override
1674
    public String toString() {
1675
      StringBuilder sb = new StringBuilder("createPayment_args(");
1676
      boolean first = true;
1677
 
695 rajveer 1678
      sb.append("userId:");
1679
      sb.append(this.userId);
123 ashish 1680
      first = false;
1681
      if (!first) sb.append(", ");
1682
      sb.append("amount:");
1683
      sb.append(this.amount);
1684
      first = false;
1685
      if (!first) sb.append(", ");
695 rajveer 1686
      sb.append("gatewayId:");
1687
      sb.append(this.gatewayId);
123 ashish 1688
      first = false;
695 rajveer 1689
      if (!first) sb.append(", ");
1690
      sb.append("txnId:");
1691
      sb.append(this.txnId);
1692
      first = false;
123 ashish 1693
      sb.append(")");
1694
      return sb.toString();
1695
    }
1696
 
1697
    public void validate() throws TException {
1698
      // check for required fields
1699
    }
1700
 
1701
  }
1702
 
420 ashish 1703
  public static class createPayment_result implements TBase<createPayment_result._Fields>, java.io.Serializable, Cloneable, Comparable<createPayment_result>   {
123 ashish 1704
    private static final TStruct STRUCT_DESC = new TStruct("createPayment_result");
1705
 
420 ashish 1706
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
123 ashish 1707
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
1708
 
420 ashish 1709
    private long success;
123 ashish 1710
    private PaymentException pe;
1711
 
1712
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1713
    public enum _Fields implements TFieldIdEnum {
1714
      SUCCESS((short)0, "success"),
1715
      PE((short)1, "pe");
1716
 
1717
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1718
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1719
 
1720
      static {
1721
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1722
          byId.put((int)field._thriftId, field);
1723
          byName.put(field.getFieldName(), field);
1724
        }
1725
      }
1726
 
1727
      /**
1728
       * Find the _Fields constant that matches fieldId, or null if its not found.
1729
       */
1730
      public static _Fields findByThriftId(int fieldId) {
1731
        return byId.get(fieldId);
1732
      }
1733
 
1734
      /**
1735
       * Find the _Fields constant that matches fieldId, throwing an exception
1736
       * if it is not found.
1737
       */
1738
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1739
        _Fields fields = findByThriftId(fieldId);
1740
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1741
        return fields;
1742
      }
1743
 
1744
      /**
1745
       * Find the _Fields constant that matches name, or null if its not found.
1746
       */
1747
      public static _Fields findByName(String name) {
1748
        return byName.get(name);
1749
      }
1750
 
1751
      private final short _thriftId;
1752
      private final String _fieldName;
1753
 
1754
      _Fields(short thriftId, String fieldName) {
1755
        _thriftId = thriftId;
1756
        _fieldName = fieldName;
1757
      }
1758
 
1759
      public short getThriftFieldId() {
1760
        return _thriftId;
1761
      }
1762
 
1763
      public String getFieldName() {
1764
        return _fieldName;
1765
      }
1766
    }
1767
 
1768
    // isset id assignments
420 ashish 1769
    private static final int __SUCCESS_ISSET_ID = 0;
1770
    private BitSet __isset_bit_vector = new BitSet(1);
123 ashish 1771
 
1772
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1773
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
420 ashish 1774
          new FieldValueMetaData(TType.I64)));
123 ashish 1775
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
1776
          new FieldValueMetaData(TType.STRUCT)));
1777
    }});
1778
 
1779
    static {
1780
      FieldMetaData.addStructMetaDataMap(createPayment_result.class, metaDataMap);
1781
    }
1782
 
1783
    public createPayment_result() {
1784
    }
1785
 
1786
    public createPayment_result(
420 ashish 1787
      long success,
123 ashish 1788
      PaymentException pe)
1789
    {
1790
      this();
1791
      this.success = success;
420 ashish 1792
      setSuccessIsSet(true);
123 ashish 1793
      this.pe = pe;
1794
    }
1795
 
1796
    /**
1797
     * Performs a deep copy on <i>other</i>.
1798
     */
1799
    public createPayment_result(createPayment_result other) {
420 ashish 1800
      __isset_bit_vector.clear();
1801
      __isset_bit_vector.or(other.__isset_bit_vector);
1802
      this.success = other.success;
123 ashish 1803
      if (other.isSetPe()) {
1804
        this.pe = new PaymentException(other.pe);
1805
      }
1806
    }
1807
 
1808
    public createPayment_result deepCopy() {
1809
      return new createPayment_result(this);
1810
    }
1811
 
1812
    @Deprecated
1813
    public createPayment_result clone() {
1814
      return new createPayment_result(this);
1815
    }
1816
 
420 ashish 1817
    public long getSuccess() {
123 ashish 1818
      return this.success;
1819
    }
1820
 
420 ashish 1821
    public createPayment_result setSuccess(long success) {
123 ashish 1822
      this.success = success;
420 ashish 1823
      setSuccessIsSet(true);
123 ashish 1824
      return this;
1825
    }
1826
 
1827
    public void unsetSuccess() {
420 ashish 1828
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 1829
    }
1830
 
1831
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
1832
    public boolean isSetSuccess() {
420 ashish 1833
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 1834
    }
1835
 
1836
    public void setSuccessIsSet(boolean value) {
420 ashish 1837
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
123 ashish 1838
    }
1839
 
1840
    public PaymentException getPe() {
1841
      return this.pe;
1842
    }
1843
 
1844
    public createPayment_result setPe(PaymentException pe) {
1845
      this.pe = pe;
1846
      return this;
1847
    }
1848
 
1849
    public void unsetPe() {
1850
      this.pe = null;
1851
    }
1852
 
1853
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
1854
    public boolean isSetPe() {
1855
      return this.pe != null;
1856
    }
1857
 
1858
    public void setPeIsSet(boolean value) {
1859
      if (!value) {
1860
        this.pe = null;
1861
      }
1862
    }
1863
 
1864
    public void setFieldValue(_Fields field, Object value) {
1865
      switch (field) {
1866
      case SUCCESS:
1867
        if (value == null) {
1868
          unsetSuccess();
1869
        } else {
420 ashish 1870
          setSuccess((Long)value);
123 ashish 1871
        }
1872
        break;
1873
 
1874
      case PE:
1875
        if (value == null) {
1876
          unsetPe();
1877
        } else {
1878
          setPe((PaymentException)value);
1879
        }
1880
        break;
1881
 
1882
      }
1883
    }
1884
 
1885
    public void setFieldValue(int fieldID, Object value) {
1886
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1887
    }
1888
 
1889
    public Object getFieldValue(_Fields field) {
1890
      switch (field) {
1891
      case SUCCESS:
420 ashish 1892
        return new Long(getSuccess());
123 ashish 1893
 
1894
      case PE:
1895
        return getPe();
1896
 
1897
      }
1898
      throw new IllegalStateException();
1899
    }
1900
 
1901
    public Object getFieldValue(int fieldId) {
1902
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1903
    }
1904
 
1905
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1906
    public boolean isSet(_Fields field) {
1907
      switch (field) {
1908
      case SUCCESS:
1909
        return isSetSuccess();
1910
      case PE:
1911
        return isSetPe();
1912
      }
1913
      throw new IllegalStateException();
1914
    }
1915
 
1916
    public boolean isSet(int fieldID) {
1917
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1918
    }
1919
 
1920
    @Override
1921
    public boolean equals(Object that) {
1922
      if (that == null)
1923
        return false;
1924
      if (that instanceof createPayment_result)
1925
        return this.equals((createPayment_result)that);
1926
      return false;
1927
    }
1928
 
1929
    public boolean equals(createPayment_result that) {
1930
      if (that == null)
1931
        return false;
1932
 
420 ashish 1933
      boolean this_present_success = true;
1934
      boolean that_present_success = true;
123 ashish 1935
      if (this_present_success || that_present_success) {
1936
        if (!(this_present_success && that_present_success))
1937
          return false;
420 ashish 1938
        if (this.success != that.success)
123 ashish 1939
          return false;
1940
      }
1941
 
1942
      boolean this_present_pe = true && this.isSetPe();
1943
      boolean that_present_pe = true && that.isSetPe();
1944
      if (this_present_pe || that_present_pe) {
1945
        if (!(this_present_pe && that_present_pe))
1946
          return false;
1947
        if (!this.pe.equals(that.pe))
1948
          return false;
1949
      }
1950
 
1951
      return true;
1952
    }
1953
 
1954
    @Override
1955
    public int hashCode() {
1956
      return 0;
1957
    }
1958
 
420 ashish 1959
    public int compareTo(createPayment_result other) {
1960
      if (!getClass().equals(other.getClass())) {
1961
        return getClass().getName().compareTo(other.getClass().getName());
1962
      }
1963
 
1964
      int lastComparison = 0;
1965
      createPayment_result typedOther = (createPayment_result)other;
1966
 
1967
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
1968
      if (lastComparison != 0) {
1969
        return lastComparison;
1970
      }
1971
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
1972
      if (lastComparison != 0) {
1973
        return lastComparison;
1974
      }
1975
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());
1976
      if (lastComparison != 0) {
1977
        return lastComparison;
1978
      }
1979
      lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);
1980
      if (lastComparison != 0) {
1981
        return lastComparison;
1982
      }
1983
      return 0;
1984
    }
1985
 
123 ashish 1986
    public void read(TProtocol iprot) throws TException {
1987
      TField field;
1988
      iprot.readStructBegin();
1989
      while (true)
1990
      {
1991
        field = iprot.readFieldBegin();
1992
        if (field.type == TType.STOP) { 
1993
          break;
1994
        }
1995
        _Fields fieldId = _Fields.findByThriftId(field.id);
1996
        if (fieldId == null) {
1997
          TProtocolUtil.skip(iprot, field.type);
1998
        } else {
1999
          switch (fieldId) {
2000
            case SUCCESS:
420 ashish 2001
              if (field.type == TType.I64) {
2002
                this.success = iprot.readI64();
2003
                setSuccessIsSet(true);
123 ashish 2004
              } else { 
2005
                TProtocolUtil.skip(iprot, field.type);
2006
              }
2007
              break;
2008
            case PE:
2009
              if (field.type == TType.STRUCT) {
2010
                this.pe = new PaymentException();
2011
                this.pe.read(iprot);
2012
              } else { 
2013
                TProtocolUtil.skip(iprot, field.type);
2014
              }
2015
              break;
2016
          }
2017
          iprot.readFieldEnd();
2018
        }
2019
      }
2020
      iprot.readStructEnd();
2021
      validate();
2022
    }
2023
 
2024
    public void write(TProtocol oprot) throws TException {
2025
      oprot.writeStructBegin(STRUCT_DESC);
2026
 
2027
      if (this.isSetSuccess()) {
2028
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
420 ashish 2029
        oprot.writeI64(this.success);
123 ashish 2030
        oprot.writeFieldEnd();
2031
      } else if (this.isSetPe()) {
2032
        oprot.writeFieldBegin(PE_FIELD_DESC);
2033
        this.pe.write(oprot);
2034
        oprot.writeFieldEnd();
2035
      }
2036
      oprot.writeFieldStop();
2037
      oprot.writeStructEnd();
2038
    }
2039
 
2040
    @Override
2041
    public String toString() {
2042
      StringBuilder sb = new StringBuilder("createPayment_result(");
2043
      boolean first = true;
2044
 
2045
      sb.append("success:");
420 ashish 2046
      sb.append(this.success);
123 ashish 2047
      first = false;
2048
      if (!first) sb.append(", ");
2049
      sb.append("pe:");
2050
      if (this.pe == null) {
2051
        sb.append("null");
2052
      } else {
2053
        sb.append(this.pe);
2054
      }
2055
      first = false;
2056
      sb.append(")");
2057
      return sb.toString();
2058
    }
2059
 
2060
    public void validate() throws TException {
2061
      // check for required fields
2062
    }
2063
 
2064
  }
2065
 
2066
  public static class getPaymentsForUser_args implements TBase<getPaymentsForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPaymentsForUser_args>   {
2067
    private static final TStruct STRUCT_DESC = new TStruct("getPaymentsForUser_args");
2068
 
2069
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
695 rajveer 2070
    private static final TField FROM_TIME_FIELD_DESC = new TField("fromTime", TType.I64, (short)2);
2071
    private static final TField TO_TIME_FIELD_DESC = new TField("toTime", TType.I64, (short)3);
123 ashish 2072
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
695 rajveer 2073
    private static final TField GATEWAY_ID_FIELD_DESC = new TField("gatewayId", TType.I64, (short)5);
123 ashish 2074
 
2075
    private long userId;
695 rajveer 2076
    private long fromTime;
2077
    private long toTime;
123 ashish 2078
    private PaymentStatus status;
695 rajveer 2079
    private long gatewayId;
123 ashish 2080
 
2081
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2082
    public enum _Fields implements TFieldIdEnum {
2083
      USER_ID((short)1, "userId"),
695 rajveer 2084
      FROM_TIME((short)2, "fromTime"),
2085
      TO_TIME((short)3, "toTime"),
123 ashish 2086
      /**
2087
       * 
2088
       * @see PaymentStatus
2089
       */
2090
      STATUS((short)4, "status"),
695 rajveer 2091
      GATEWAY_ID((short)5, "gatewayId");
123 ashish 2092
 
2093
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2094
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2095
 
2096
      static {
2097
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2098
          byId.put((int)field._thriftId, field);
2099
          byName.put(field.getFieldName(), field);
2100
        }
2101
      }
2102
 
2103
      /**
2104
       * Find the _Fields constant that matches fieldId, or null if its not found.
2105
       */
2106
      public static _Fields findByThriftId(int fieldId) {
2107
        return byId.get(fieldId);
2108
      }
2109
 
2110
      /**
2111
       * Find the _Fields constant that matches fieldId, throwing an exception
2112
       * if it is not found.
2113
       */
2114
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2115
        _Fields fields = findByThriftId(fieldId);
2116
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2117
        return fields;
2118
      }
2119
 
2120
      /**
2121
       * Find the _Fields constant that matches name, or null if its not found.
2122
       */
2123
      public static _Fields findByName(String name) {
2124
        return byName.get(name);
2125
      }
2126
 
2127
      private final short _thriftId;
2128
      private final String _fieldName;
2129
 
2130
      _Fields(short thriftId, String fieldName) {
2131
        _thriftId = thriftId;
2132
        _fieldName = fieldName;
2133
      }
2134
 
2135
      public short getThriftFieldId() {
2136
        return _thriftId;
2137
      }
2138
 
2139
      public String getFieldName() {
2140
        return _fieldName;
2141
      }
2142
    }
2143
 
2144
    // isset id assignments
2145
    private static final int __USERID_ISSET_ID = 0;
695 rajveer 2146
    private static final int __FROMTIME_ISSET_ID = 1;
2147
    private static final int __TOTIME_ISSET_ID = 2;
2148
    private static final int __GATEWAYID_ISSET_ID = 3;
420 ashish 2149
    private BitSet __isset_bit_vector = new BitSet(4);
123 ashish 2150
 
2151
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2152
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
2153
          new FieldValueMetaData(TType.I64)));
695 rajveer 2154
      put(_Fields.FROM_TIME, new FieldMetaData("fromTime", TFieldRequirementType.DEFAULT, 
123 ashish 2155
          new FieldValueMetaData(TType.I64)));
695 rajveer 2156
      put(_Fields.TO_TIME, new FieldMetaData("toTime", TFieldRequirementType.DEFAULT, 
123 ashish 2157
          new FieldValueMetaData(TType.I64)));
2158
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
2159
          new EnumMetaData(TType.ENUM, PaymentStatus.class)));
695 rajveer 2160
      put(_Fields.GATEWAY_ID, new FieldMetaData("gatewayId", TFieldRequirementType.DEFAULT, 
420 ashish 2161
          new FieldValueMetaData(TType.I64)));
123 ashish 2162
    }});
2163
 
2164
    static {
2165
      FieldMetaData.addStructMetaDataMap(getPaymentsForUser_args.class, metaDataMap);
2166
    }
2167
 
2168
    public getPaymentsForUser_args() {
2169
    }
2170
 
2171
    public getPaymentsForUser_args(
2172
      long userId,
695 rajveer 2173
      long fromTime,
2174
      long toTime,
123 ashish 2175
      PaymentStatus status,
695 rajveer 2176
      long gatewayId)
123 ashish 2177
    {
2178
      this();
2179
      this.userId = userId;
2180
      setUserIdIsSet(true);
695 rajveer 2181
      this.fromTime = fromTime;
2182
      setFromTimeIsSet(true);
2183
      this.toTime = toTime;
2184
      setToTimeIsSet(true);
123 ashish 2185
      this.status = status;
695 rajveer 2186
      this.gatewayId = gatewayId;
2187
      setGatewayIdIsSet(true);
123 ashish 2188
    }
2189
 
2190
    /**
2191
     * Performs a deep copy on <i>other</i>.
2192
     */
2193
    public getPaymentsForUser_args(getPaymentsForUser_args other) {
2194
      __isset_bit_vector.clear();
2195
      __isset_bit_vector.or(other.__isset_bit_vector);
2196
      this.userId = other.userId;
695 rajveer 2197
      this.fromTime = other.fromTime;
2198
      this.toTime = other.toTime;
123 ashish 2199
      if (other.isSetStatus()) {
2200
        this.status = other.status;
2201
      }
695 rajveer 2202
      this.gatewayId = other.gatewayId;
123 ashish 2203
    }
2204
 
2205
    public getPaymentsForUser_args deepCopy() {
2206
      return new getPaymentsForUser_args(this);
2207
    }
2208
 
2209
    @Deprecated
2210
    public getPaymentsForUser_args clone() {
2211
      return new getPaymentsForUser_args(this);
2212
    }
2213
 
2214
    public long getUserId() {
2215
      return this.userId;
2216
    }
2217
 
2218
    public getPaymentsForUser_args setUserId(long userId) {
2219
      this.userId = userId;
2220
      setUserIdIsSet(true);
2221
      return this;
2222
    }
2223
 
2224
    public void unsetUserId() {
2225
      __isset_bit_vector.clear(__USERID_ISSET_ID);
2226
    }
2227
 
2228
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
2229
    public boolean isSetUserId() {
2230
      return __isset_bit_vector.get(__USERID_ISSET_ID);
2231
    }
2232
 
2233
    public void setUserIdIsSet(boolean value) {
2234
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
2235
    }
2236
 
695 rajveer 2237
    public long getFromTime() {
2238
      return this.fromTime;
123 ashish 2239
    }
2240
 
695 rajveer 2241
    public getPaymentsForUser_args setFromTime(long fromTime) {
2242
      this.fromTime = fromTime;
2243
      setFromTimeIsSet(true);
123 ashish 2244
      return this;
2245
    }
2246
 
695 rajveer 2247
    public void unsetFromTime() {
2248
      __isset_bit_vector.clear(__FROMTIME_ISSET_ID);
123 ashish 2249
    }
2250
 
695 rajveer 2251
    /** Returns true if field fromTime is set (has been asigned a value) and false otherwise */
2252
    public boolean isSetFromTime() {
2253
      return __isset_bit_vector.get(__FROMTIME_ISSET_ID);
123 ashish 2254
    }
2255
 
695 rajveer 2256
    public void setFromTimeIsSet(boolean value) {
2257
      __isset_bit_vector.set(__FROMTIME_ISSET_ID, value);
123 ashish 2258
    }
2259
 
695 rajveer 2260
    public long getToTime() {
2261
      return this.toTime;
123 ashish 2262
    }
2263
 
695 rajveer 2264
    public getPaymentsForUser_args setToTime(long toTime) {
2265
      this.toTime = toTime;
2266
      setToTimeIsSet(true);
123 ashish 2267
      return this;
2268
    }
2269
 
695 rajveer 2270
    public void unsetToTime() {
2271
      __isset_bit_vector.clear(__TOTIME_ISSET_ID);
123 ashish 2272
    }
2273
 
695 rajveer 2274
    /** Returns true if field toTime is set (has been asigned a value) and false otherwise */
2275
    public boolean isSetToTime() {
2276
      return __isset_bit_vector.get(__TOTIME_ISSET_ID);
123 ashish 2277
    }
2278
 
695 rajveer 2279
    public void setToTimeIsSet(boolean value) {
2280
      __isset_bit_vector.set(__TOTIME_ISSET_ID, value);
123 ashish 2281
    }
2282
 
2283
    /**
2284
     * 
2285
     * @see PaymentStatus
2286
     */
2287
    public PaymentStatus getStatus() {
2288
      return this.status;
2289
    }
2290
 
2291
    /**
2292
     * 
2293
     * @see PaymentStatus
2294
     */
2295
    public getPaymentsForUser_args setStatus(PaymentStatus status) {
2296
      this.status = status;
2297
      return this;
2298
    }
2299
 
2300
    public void unsetStatus() {
2301
      this.status = null;
2302
    }
2303
 
2304
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
2305
    public boolean isSetStatus() {
2306
      return this.status != null;
2307
    }
2308
 
2309
    public void setStatusIsSet(boolean value) {
2310
      if (!value) {
2311
        this.status = null;
2312
      }
2313
    }
2314
 
695 rajveer 2315
    public long getGatewayId() {
2316
      return this.gatewayId;
123 ashish 2317
    }
2318
 
695 rajveer 2319
    public getPaymentsForUser_args setGatewayId(long gatewayId) {
2320
      this.gatewayId = gatewayId;
2321
      setGatewayIdIsSet(true);
123 ashish 2322
      return this;
2323
    }
2324
 
695 rajveer 2325
    public void unsetGatewayId() {
2326
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 2327
    }
2328
 
695 rajveer 2329
    /** Returns true if field gatewayId is set (has been asigned a value) and false otherwise */
2330
    public boolean isSetGatewayId() {
2331
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 2332
    }
2333
 
695 rajveer 2334
    public void setGatewayIdIsSet(boolean value) {
2335
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
123 ashish 2336
    }
2337
 
2338
    public void setFieldValue(_Fields field, Object value) {
2339
      switch (field) {
2340
      case USER_ID:
2341
        if (value == null) {
2342
          unsetUserId();
2343
        } else {
2344
          setUserId((Long)value);
2345
        }
2346
        break;
2347
 
2348
      case FROM_TIME:
2349
        if (value == null) {
695 rajveer 2350
          unsetFromTime();
123 ashish 2351
        } else {
695 rajveer 2352
          setFromTime((Long)value);
123 ashish 2353
        }
2354
        break;
2355
 
2356
      case TO_TIME:
2357
        if (value == null) {
695 rajveer 2358
          unsetToTime();
123 ashish 2359
        } else {
695 rajveer 2360
          setToTime((Long)value);
123 ashish 2361
        }
2362
        break;
2363
 
2364
      case STATUS:
2365
        if (value == null) {
2366
          unsetStatus();
2367
        } else {
2368
          setStatus((PaymentStatus)value);
2369
        }
2370
        break;
2371
 
420 ashish 2372
      case GATEWAY_ID:
123 ashish 2373
        if (value == null) {
695 rajveer 2374
          unsetGatewayId();
123 ashish 2375
        } else {
695 rajveer 2376
          setGatewayId((Long)value);
123 ashish 2377
        }
2378
        break;
2379
 
2380
      }
2381
    }
2382
 
2383
    public void setFieldValue(int fieldID, Object value) {
2384
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2385
    }
2386
 
2387
    public Object getFieldValue(_Fields field) {
2388
      switch (field) {
2389
      case USER_ID:
2390
        return new Long(getUserId());
2391
 
2392
      case FROM_TIME:
695 rajveer 2393
        return new Long(getFromTime());
123 ashish 2394
 
2395
      case TO_TIME:
695 rajveer 2396
        return new Long(getToTime());
123 ashish 2397
 
2398
      case STATUS:
2399
        return getStatus();
2400
 
420 ashish 2401
      case GATEWAY_ID:
695 rajveer 2402
        return new Long(getGatewayId());
123 ashish 2403
 
2404
      }
2405
      throw new IllegalStateException();
2406
    }
2407
 
2408
    public Object getFieldValue(int fieldId) {
2409
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2410
    }
2411
 
2412
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2413
    public boolean isSet(_Fields field) {
2414
      switch (field) {
2415
      case USER_ID:
2416
        return isSetUserId();
2417
      case FROM_TIME:
695 rajveer 2418
        return isSetFromTime();
123 ashish 2419
      case TO_TIME:
695 rajveer 2420
        return isSetToTime();
123 ashish 2421
      case STATUS:
2422
        return isSetStatus();
420 ashish 2423
      case GATEWAY_ID:
695 rajveer 2424
        return isSetGatewayId();
123 ashish 2425
      }
2426
      throw new IllegalStateException();
2427
    }
2428
 
2429
    public boolean isSet(int fieldID) {
2430
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2431
    }
2432
 
2433
    @Override
2434
    public boolean equals(Object that) {
2435
      if (that == null)
2436
        return false;
2437
      if (that instanceof getPaymentsForUser_args)
2438
        return this.equals((getPaymentsForUser_args)that);
2439
      return false;
2440
    }
2441
 
2442
    public boolean equals(getPaymentsForUser_args that) {
2443
      if (that == null)
2444
        return false;
2445
 
2446
      boolean this_present_userId = true;
2447
      boolean that_present_userId = true;
2448
      if (this_present_userId || that_present_userId) {
2449
        if (!(this_present_userId && that_present_userId))
2450
          return false;
2451
        if (this.userId != that.userId)
2452
          return false;
2453
      }
2454
 
695 rajveer 2455
      boolean this_present_fromTime = true;
2456
      boolean that_present_fromTime = true;
2457
      if (this_present_fromTime || that_present_fromTime) {
2458
        if (!(this_present_fromTime && that_present_fromTime))
123 ashish 2459
          return false;
695 rajveer 2460
        if (this.fromTime != that.fromTime)
123 ashish 2461
          return false;
2462
      }
2463
 
695 rajveer 2464
      boolean this_present_toTime = true;
2465
      boolean that_present_toTime = true;
2466
      if (this_present_toTime || that_present_toTime) {
2467
        if (!(this_present_toTime && that_present_toTime))
123 ashish 2468
          return false;
695 rajveer 2469
        if (this.toTime != that.toTime)
123 ashish 2470
          return false;
2471
      }
2472
 
2473
      boolean this_present_status = true && this.isSetStatus();
2474
      boolean that_present_status = true && that.isSetStatus();
2475
      if (this_present_status || that_present_status) {
2476
        if (!(this_present_status && that_present_status))
2477
          return false;
2478
        if (!this.status.equals(that.status))
2479
          return false;
2480
      }
2481
 
695 rajveer 2482
      boolean this_present_gatewayId = true;
2483
      boolean that_present_gatewayId = true;
2484
      if (this_present_gatewayId || that_present_gatewayId) {
2485
        if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 2486
          return false;
695 rajveer 2487
        if (this.gatewayId != that.gatewayId)
123 ashish 2488
          return false;
2489
      }
2490
 
2491
      return true;
2492
    }
2493
 
2494
    @Override
2495
    public int hashCode() {
2496
      return 0;
2497
    }
2498
 
2499
    public int compareTo(getPaymentsForUser_args other) {
2500
      if (!getClass().equals(other.getClass())) {
2501
        return getClass().getName().compareTo(other.getClass().getName());
2502
      }
2503
 
2504
      int lastComparison = 0;
2505
      getPaymentsForUser_args typedOther = (getPaymentsForUser_args)other;
2506
 
2507
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
2508
      if (lastComparison != 0) {
2509
        return lastComparison;
2510
      }
2511
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
2512
      if (lastComparison != 0) {
2513
        return lastComparison;
2514
      }
695 rajveer 2515
      lastComparison = Boolean.valueOf(isSetFromTime()).compareTo(isSetFromTime());
123 ashish 2516
      if (lastComparison != 0) {
2517
        return lastComparison;
2518
      }
695 rajveer 2519
      lastComparison = TBaseHelper.compareTo(fromTime, typedOther.fromTime);
123 ashish 2520
      if (lastComparison != 0) {
2521
        return lastComparison;
2522
      }
695 rajveer 2523
      lastComparison = Boolean.valueOf(isSetToTime()).compareTo(isSetToTime());
123 ashish 2524
      if (lastComparison != 0) {
2525
        return lastComparison;
2526
      }
695 rajveer 2527
      lastComparison = TBaseHelper.compareTo(toTime, typedOther.toTime);
123 ashish 2528
      if (lastComparison != 0) {
2529
        return lastComparison;
2530
      }
2531
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
2532
      if (lastComparison != 0) {
2533
        return lastComparison;
2534
      }
2535
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
2536
      if (lastComparison != 0) {
2537
        return lastComparison;
2538
      }
695 rajveer 2539
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(isSetGatewayId());
123 ashish 2540
      if (lastComparison != 0) {
2541
        return lastComparison;
2542
      }
695 rajveer 2543
      lastComparison = TBaseHelper.compareTo(gatewayId, typedOther.gatewayId);
123 ashish 2544
      if (lastComparison != 0) {
2545
        return lastComparison;
2546
      }
2547
      return 0;
2548
    }
2549
 
2550
    public void read(TProtocol iprot) throws TException {
2551
      TField field;
2552
      iprot.readStructBegin();
2553
      while (true)
2554
      {
2555
        field = iprot.readFieldBegin();
2556
        if (field.type == TType.STOP) { 
2557
          break;
2558
        }
2559
        _Fields fieldId = _Fields.findByThriftId(field.id);
2560
        if (fieldId == null) {
2561
          TProtocolUtil.skip(iprot, field.type);
2562
        } else {
2563
          switch (fieldId) {
2564
            case USER_ID:
2565
              if (field.type == TType.I64) {
2566
                this.userId = iprot.readI64();
2567
                setUserIdIsSet(true);
2568
              } else { 
2569
                TProtocolUtil.skip(iprot, field.type);
2570
              }
2571
              break;
2572
            case FROM_TIME:
2573
              if (field.type == TType.I64) {
695 rajveer 2574
                this.fromTime = iprot.readI64();
2575
                setFromTimeIsSet(true);
123 ashish 2576
              } else { 
2577
                TProtocolUtil.skip(iprot, field.type);
2578
              }
2579
              break;
2580
            case TO_TIME:
2581
              if (field.type == TType.I64) {
695 rajveer 2582
                this.toTime = iprot.readI64();
2583
                setToTimeIsSet(true);
123 ashish 2584
              } else { 
2585
                TProtocolUtil.skip(iprot, field.type);
2586
              }
2587
              break;
2588
            case STATUS:
2589
              if (field.type == TType.I32) {
2590
                this.status = PaymentStatus.findByValue(iprot.readI32());
2591
              } else { 
2592
                TProtocolUtil.skip(iprot, field.type);
2593
              }
2594
              break;
420 ashish 2595
            case GATEWAY_ID:
2596
              if (field.type == TType.I64) {
695 rajveer 2597
                this.gatewayId = iprot.readI64();
2598
                setGatewayIdIsSet(true);
123 ashish 2599
              } else { 
2600
                TProtocolUtil.skip(iprot, field.type);
2601
              }
2602
              break;
2603
          }
2604
          iprot.readFieldEnd();
2605
        }
2606
      }
2607
      iprot.readStructEnd();
2608
      validate();
2609
    }
2610
 
2611
    public void write(TProtocol oprot) throws TException {
2612
      validate();
2613
 
2614
      oprot.writeStructBegin(STRUCT_DESC);
2615
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
2616
      oprot.writeI64(this.userId);
2617
      oprot.writeFieldEnd();
2618
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
695 rajveer 2619
      oprot.writeI64(this.fromTime);
123 ashish 2620
      oprot.writeFieldEnd();
2621
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
695 rajveer 2622
      oprot.writeI64(this.toTime);
123 ashish 2623
      oprot.writeFieldEnd();
2624
      if (this.status != null) {
2625
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
2626
        oprot.writeI32(this.status.getValue());
2627
        oprot.writeFieldEnd();
2628
      }
420 ashish 2629
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
695 rajveer 2630
      oprot.writeI64(this.gatewayId);
420 ashish 2631
      oprot.writeFieldEnd();
123 ashish 2632
      oprot.writeFieldStop();
2633
      oprot.writeStructEnd();
2634
    }
2635
 
2636
    @Override
2637
    public String toString() {
2638
      StringBuilder sb = new StringBuilder("getPaymentsForUser_args(");
2639
      boolean first = true;
2640
 
2641
      sb.append("userId:");
2642
      sb.append(this.userId);
2643
      first = false;
2644
      if (!first) sb.append(", ");
695 rajveer 2645
      sb.append("fromTime:");
2646
      sb.append(this.fromTime);
123 ashish 2647
      first = false;
2648
      if (!first) sb.append(", ");
695 rajveer 2649
      sb.append("toTime:");
2650
      sb.append(this.toTime);
123 ashish 2651
      first = false;
2652
      if (!first) sb.append(", ");
2653
      sb.append("status:");
2654
      if (this.status == null) {
2655
        sb.append("null");
2656
      } else {
2657
        String status_name = status.name();
2658
        if (status_name != null) {
2659
          sb.append(status_name);
2660
          sb.append(" (");
2661
        }
2662
        sb.append(this.status);
2663
        if (status_name != null) {
2664
          sb.append(")");
2665
        }
2666
      }
2667
      first = false;
2668
      if (!first) sb.append(", ");
695 rajveer 2669
      sb.append("gatewayId:");
2670
      sb.append(this.gatewayId);
123 ashish 2671
      first = false;
2672
      sb.append(")");
2673
      return sb.toString();
2674
    }
2675
 
2676
    public void validate() throws TException {
2677
      // check for required fields
2678
    }
2679
 
2680
  }
2681
 
695 rajveer 2682
  public static class getPaymentsForUser_result implements TBase<getPaymentsForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPaymentsForUser_result>   {
123 ashish 2683
    private static final TStruct STRUCT_DESC = new TStruct("getPaymentsForUser_result");
2684
 
2685
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
2686
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
2687
 
2688
    private List<Payment> success;
2689
    private PaymentException pe;
2690
 
2691
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2692
    public enum _Fields implements TFieldIdEnum {
2693
      SUCCESS((short)0, "success"),
2694
      PE((short)1, "pe");
2695
 
2696
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2697
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2698
 
2699
      static {
2700
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2701
          byId.put((int)field._thriftId, field);
2702
          byName.put(field.getFieldName(), field);
2703
        }
2704
      }
2705
 
2706
      /**
2707
       * Find the _Fields constant that matches fieldId, or null if its not found.
2708
       */
2709
      public static _Fields findByThriftId(int fieldId) {
2710
        return byId.get(fieldId);
2711
      }
2712
 
2713
      /**
2714
       * Find the _Fields constant that matches fieldId, throwing an exception
2715
       * if it is not found.
2716
       */
2717
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2718
        _Fields fields = findByThriftId(fieldId);
2719
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2720
        return fields;
2721
      }
2722
 
2723
      /**
2724
       * Find the _Fields constant that matches name, or null if its not found.
2725
       */
2726
      public static _Fields findByName(String name) {
2727
        return byName.get(name);
2728
      }
2729
 
2730
      private final short _thriftId;
2731
      private final String _fieldName;
2732
 
2733
      _Fields(short thriftId, String fieldName) {
2734
        _thriftId = thriftId;
2735
        _fieldName = fieldName;
2736
      }
2737
 
2738
      public short getThriftFieldId() {
2739
        return _thriftId;
2740
      }
2741
 
2742
      public String getFieldName() {
2743
        return _fieldName;
2744
      }
2745
    }
2746
 
2747
    // isset id assignments
2748
 
2749
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2750
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
2751
          new ListMetaData(TType.LIST, 
2752
              new StructMetaData(TType.STRUCT, Payment.class))));
2753
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
2754
          new FieldValueMetaData(TType.STRUCT)));
2755
    }});
2756
 
2757
    static {
2758
      FieldMetaData.addStructMetaDataMap(getPaymentsForUser_result.class, metaDataMap);
2759
    }
2760
 
2761
    public getPaymentsForUser_result() {
2762
    }
2763
 
2764
    public getPaymentsForUser_result(
2765
      List<Payment> success,
2766
      PaymentException pe)
2767
    {
2768
      this();
2769
      this.success = success;
2770
      this.pe = pe;
2771
    }
2772
 
2773
    /**
2774
     * Performs a deep copy on <i>other</i>.
2775
     */
2776
    public getPaymentsForUser_result(getPaymentsForUser_result other) {
2777
      if (other.isSetSuccess()) {
2778
        List<Payment> __this__success = new ArrayList<Payment>();
2779
        for (Payment other_element : other.success) {
2780
          __this__success.add(new Payment(other_element));
2781
        }
2782
        this.success = __this__success;
2783
      }
2784
      if (other.isSetPe()) {
2785
        this.pe = new PaymentException(other.pe);
2786
      }
2787
    }
2788
 
2789
    public getPaymentsForUser_result deepCopy() {
2790
      return new getPaymentsForUser_result(this);
2791
    }
2792
 
2793
    @Deprecated
2794
    public getPaymentsForUser_result clone() {
2795
      return new getPaymentsForUser_result(this);
2796
    }
2797
 
2798
    public int getSuccessSize() {
2799
      return (this.success == null) ? 0 : this.success.size();
2800
    }
2801
 
2802
    public java.util.Iterator<Payment> getSuccessIterator() {
2803
      return (this.success == null) ? null : this.success.iterator();
2804
    }
2805
 
2806
    public void addToSuccess(Payment elem) {
2807
      if (this.success == null) {
2808
        this.success = new ArrayList<Payment>();
2809
      }
2810
      this.success.add(elem);
2811
    }
2812
 
2813
    public List<Payment> getSuccess() {
2814
      return this.success;
2815
    }
2816
 
2817
    public getPaymentsForUser_result setSuccess(List<Payment> success) {
2818
      this.success = success;
2819
      return this;
2820
    }
2821
 
2822
    public void unsetSuccess() {
2823
      this.success = null;
2824
    }
2825
 
2826
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2827
    public boolean isSetSuccess() {
2828
      return this.success != null;
2829
    }
2830
 
2831
    public void setSuccessIsSet(boolean value) {
2832
      if (!value) {
2833
        this.success = null;
2834
      }
2835
    }
2836
 
2837
    public PaymentException getPe() {
2838
      return this.pe;
2839
    }
2840
 
2841
    public getPaymentsForUser_result setPe(PaymentException pe) {
2842
      this.pe = pe;
2843
      return this;
2844
    }
2845
 
2846
    public void unsetPe() {
2847
      this.pe = null;
2848
    }
2849
 
2850
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
2851
    public boolean isSetPe() {
2852
      return this.pe != null;
2853
    }
2854
 
2855
    public void setPeIsSet(boolean value) {
2856
      if (!value) {
2857
        this.pe = null;
2858
      }
2859
    }
2860
 
2861
    public void setFieldValue(_Fields field, Object value) {
2862
      switch (field) {
2863
      case SUCCESS:
2864
        if (value == null) {
2865
          unsetSuccess();
2866
        } else {
2867
          setSuccess((List<Payment>)value);
2868
        }
2869
        break;
2870
 
2871
      case PE:
2872
        if (value == null) {
2873
          unsetPe();
2874
        } else {
2875
          setPe((PaymentException)value);
2876
        }
2877
        break;
2878
 
2879
      }
2880
    }
2881
 
2882
    public void setFieldValue(int fieldID, Object value) {
2883
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2884
    }
2885
 
2886
    public Object getFieldValue(_Fields field) {
2887
      switch (field) {
2888
      case SUCCESS:
2889
        return getSuccess();
2890
 
2891
      case PE:
2892
        return getPe();
2893
 
2894
      }
2895
      throw new IllegalStateException();
2896
    }
2897
 
2898
    public Object getFieldValue(int fieldId) {
2899
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2900
    }
2901
 
2902
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2903
    public boolean isSet(_Fields field) {
2904
      switch (field) {
2905
      case SUCCESS:
2906
        return isSetSuccess();
2907
      case PE:
2908
        return isSetPe();
2909
      }
2910
      throw new IllegalStateException();
2911
    }
2912
 
2913
    public boolean isSet(int fieldID) {
2914
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2915
    }
2916
 
2917
    @Override
2918
    public boolean equals(Object that) {
2919
      if (that == null)
2920
        return false;
2921
      if (that instanceof getPaymentsForUser_result)
2922
        return this.equals((getPaymentsForUser_result)that);
2923
      return false;
2924
    }
2925
 
2926
    public boolean equals(getPaymentsForUser_result that) {
2927
      if (that == null)
2928
        return false;
2929
 
2930
      boolean this_present_success = true && this.isSetSuccess();
2931
      boolean that_present_success = true && that.isSetSuccess();
2932
      if (this_present_success || that_present_success) {
2933
        if (!(this_present_success && that_present_success))
2934
          return false;
2935
        if (!this.success.equals(that.success))
2936
          return false;
2937
      }
2938
 
2939
      boolean this_present_pe = true && this.isSetPe();
2940
      boolean that_present_pe = true && that.isSetPe();
2941
      if (this_present_pe || that_present_pe) {
2942
        if (!(this_present_pe && that_present_pe))
2943
          return false;
2944
        if (!this.pe.equals(that.pe))
2945
          return false;
2946
      }
2947
 
2948
      return true;
2949
    }
2950
 
2951
    @Override
2952
    public int hashCode() {
2953
      return 0;
2954
    }
2955
 
695 rajveer 2956
    public int compareTo(getPaymentsForUser_result other) {
123 ashish 2957
      if (!getClass().equals(other.getClass())) {
2958
        return getClass().getName().compareTo(other.getClass().getName());
2959
      }
2960
 
2961
      int lastComparison = 0;
695 rajveer 2962
      getPaymentsForUser_result typedOther = (getPaymentsForUser_result)other;
123 ashish 2963
 
695 rajveer 2964
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
123 ashish 2965
      if (lastComparison != 0) {
2966
        return lastComparison;
2967
      }
695 rajveer 2968
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
123 ashish 2969
      if (lastComparison != 0) {
2970
        return lastComparison;
2971
      }
695 rajveer 2972
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());
123 ashish 2973
      if (lastComparison != 0) {
2974
        return lastComparison;
2975
      }
695 rajveer 2976
      lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);
123 ashish 2977
      if (lastComparison != 0) {
2978
        return lastComparison;
2979
      }
2980
      return 0;
2981
    }
2982
 
2983
    public void read(TProtocol iprot) throws TException {
2984
      TField field;
2985
      iprot.readStructBegin();
2986
      while (true)
2987
      {
2988
        field = iprot.readFieldBegin();
2989
        if (field.type == TType.STOP) { 
2990
          break;
2991
        }
2992
        _Fields fieldId = _Fields.findByThriftId(field.id);
2993
        if (fieldId == null) {
2994
          TProtocolUtil.skip(iprot, field.type);
2995
        } else {
2996
          switch (fieldId) {
2997
            case SUCCESS:
2998
              if (field.type == TType.LIST) {
2999
                {
695 rajveer 3000
                  TList _list8 = iprot.readListBegin();
3001
                  this.success = new ArrayList<Payment>(_list8.size);
3002
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
123 ashish 3003
                  {
695 rajveer 3004
                    Payment _elem10;
3005
                    _elem10 = new Payment();
3006
                    _elem10.read(iprot);
3007
                    this.success.add(_elem10);
123 ashish 3008
                  }
3009
                  iprot.readListEnd();
3010
                }
3011
              } else { 
3012
                TProtocolUtil.skip(iprot, field.type);
3013
              }
3014
              break;
3015
            case PE:
3016
              if (field.type == TType.STRUCT) {
3017
                this.pe = new PaymentException();
3018
                this.pe.read(iprot);
3019
              } else { 
3020
                TProtocolUtil.skip(iprot, field.type);
3021
              }
3022
              break;
3023
          }
3024
          iprot.readFieldEnd();
3025
        }
3026
      }
3027
      iprot.readStructEnd();
3028
      validate();
3029
    }
3030
 
3031
    public void write(TProtocol oprot) throws TException {
3032
      oprot.writeStructBegin(STRUCT_DESC);
3033
 
3034
      if (this.isSetSuccess()) {
3035
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3036
        {
3037
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
695 rajveer 3038
          for (Payment _iter11 : this.success)
123 ashish 3039
          {
695 rajveer 3040
            _iter11.write(oprot);
123 ashish 3041
          }
3042
          oprot.writeListEnd();
3043
        }
3044
        oprot.writeFieldEnd();
3045
      } else if (this.isSetPe()) {
3046
        oprot.writeFieldBegin(PE_FIELD_DESC);
3047
        this.pe.write(oprot);
3048
        oprot.writeFieldEnd();
3049
      }
3050
      oprot.writeFieldStop();
3051
      oprot.writeStructEnd();
3052
    }
3053
 
3054
    @Override
3055
    public String toString() {
695 rajveer 3056
      StringBuilder sb = new StringBuilder("getPaymentsForUser_result(");
123 ashish 3057
      boolean first = true;
3058
 
3059
      sb.append("success:");
3060
      if (this.success == null) {
3061
        sb.append("null");
3062
      } else {
3063
        sb.append(this.success);
3064
      }
3065
      first = false;
3066
      if (!first) sb.append(", ");
3067
      sb.append("pe:");
3068
      if (this.pe == null) {
3069
        sb.append("null");
3070
      } else {
3071
        sb.append(this.pe);
3072
      }
3073
      first = false;
3074
      sb.append(")");
3075
      return sb.toString();
3076
    }
3077
 
3078
    public void validate() throws TException {
3079
      // check for required fields
3080
    }
3081
 
3082
  }
3083
 
3084
  public static class getPayments_args implements TBase<getPayments_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPayments_args>   {
3085
    private static final TStruct STRUCT_DESC = new TStruct("getPayments_args");
3086
 
695 rajveer 3087
    private static final TField FROM_TIME_FIELD_DESC = new TField("fromTime", TType.I64, (short)1);
3088
    private static final TField TO_TIME_FIELD_DESC = new TField("toTime", TType.I64, (short)2);
123 ashish 3089
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
695 rajveer 3090
    private static final TField GATEWAY_ID_FIELD_DESC = new TField("gatewayId", TType.I64, (short)4);
123 ashish 3091
 
695 rajveer 3092
    private long fromTime;
3093
    private long toTime;
123 ashish 3094
    private PaymentStatus status;
695 rajveer 3095
    private long gatewayId;
123 ashish 3096
 
3097
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3098
    public enum _Fields implements TFieldIdEnum {
695 rajveer 3099
      FROM_TIME((short)1, "fromTime"),
3100
      TO_TIME((short)2, "toTime"),
123 ashish 3101
      /**
3102
       * 
3103
       * @see PaymentStatus
3104
       */
3105
      STATUS((short)3, "status"),
695 rajveer 3106
      GATEWAY_ID((short)4, "gatewayId");
123 ashish 3107
 
3108
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3109
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3110
 
3111
      static {
3112
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3113
          byId.put((int)field._thriftId, field);
3114
          byName.put(field.getFieldName(), field);
3115
        }
3116
      }
3117
 
3118
      /**
3119
       * Find the _Fields constant that matches fieldId, or null if its not found.
3120
       */
3121
      public static _Fields findByThriftId(int fieldId) {
3122
        return byId.get(fieldId);
3123
      }
3124
 
3125
      /**
3126
       * Find the _Fields constant that matches fieldId, throwing an exception
3127
       * if it is not found.
3128
       */
3129
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3130
        _Fields fields = findByThriftId(fieldId);
3131
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3132
        return fields;
3133
      }
3134
 
3135
      /**
3136
       * Find the _Fields constant that matches name, or null if its not found.
3137
       */
3138
      public static _Fields findByName(String name) {
3139
        return byName.get(name);
3140
      }
3141
 
3142
      private final short _thriftId;
3143
      private final String _fieldName;
3144
 
3145
      _Fields(short thriftId, String fieldName) {
3146
        _thriftId = thriftId;
3147
        _fieldName = fieldName;
3148
      }
3149
 
3150
      public short getThriftFieldId() {
3151
        return _thriftId;
3152
      }
3153
 
3154
      public String getFieldName() {
3155
        return _fieldName;
3156
      }
3157
    }
3158
 
3159
    // isset id assignments
695 rajveer 3160
    private static final int __FROMTIME_ISSET_ID = 0;
3161
    private static final int __TOTIME_ISSET_ID = 1;
3162
    private static final int __GATEWAYID_ISSET_ID = 2;
420 ashish 3163
    private BitSet __isset_bit_vector = new BitSet(3);
123 ashish 3164
 
3165
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
695 rajveer 3166
      put(_Fields.FROM_TIME, new FieldMetaData("fromTime", TFieldRequirementType.DEFAULT, 
123 ashish 3167
          new FieldValueMetaData(TType.I64)));
695 rajveer 3168
      put(_Fields.TO_TIME, new FieldMetaData("toTime", TFieldRequirementType.DEFAULT, 
123 ashish 3169
          new FieldValueMetaData(TType.I64)));
3170
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
3171
          new EnumMetaData(TType.ENUM, PaymentStatus.class)));
695 rajveer 3172
      put(_Fields.GATEWAY_ID, new FieldMetaData("gatewayId", TFieldRequirementType.DEFAULT, 
420 ashish 3173
          new FieldValueMetaData(TType.I64)));
123 ashish 3174
    }});
3175
 
3176
    static {
3177
      FieldMetaData.addStructMetaDataMap(getPayments_args.class, metaDataMap);
3178
    }
3179
 
3180
    public getPayments_args() {
3181
    }
3182
 
3183
    public getPayments_args(
695 rajveer 3184
      long fromTime,
3185
      long toTime,
123 ashish 3186
      PaymentStatus status,
695 rajveer 3187
      long gatewayId)
123 ashish 3188
    {
3189
      this();
695 rajveer 3190
      this.fromTime = fromTime;
3191
      setFromTimeIsSet(true);
3192
      this.toTime = toTime;
3193
      setToTimeIsSet(true);
123 ashish 3194
      this.status = status;
695 rajveer 3195
      this.gatewayId = gatewayId;
3196
      setGatewayIdIsSet(true);
123 ashish 3197
    }
3198
 
3199
    /**
3200
     * Performs a deep copy on <i>other</i>.
3201
     */
3202
    public getPayments_args(getPayments_args other) {
3203
      __isset_bit_vector.clear();
3204
      __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 3205
      this.fromTime = other.fromTime;
3206
      this.toTime = other.toTime;
123 ashish 3207
      if (other.isSetStatus()) {
3208
        this.status = other.status;
3209
      }
695 rajveer 3210
      this.gatewayId = other.gatewayId;
123 ashish 3211
    }
3212
 
3213
    public getPayments_args deepCopy() {
3214
      return new getPayments_args(this);
3215
    }
3216
 
3217
    @Deprecated
3218
    public getPayments_args clone() {
3219
      return new getPayments_args(this);
3220
    }
3221
 
695 rajveer 3222
    public long getFromTime() {
3223
      return this.fromTime;
123 ashish 3224
    }
3225
 
695 rajveer 3226
    public getPayments_args setFromTime(long fromTime) {
3227
      this.fromTime = fromTime;
3228
      setFromTimeIsSet(true);
123 ashish 3229
      return this;
3230
    }
3231
 
695 rajveer 3232
    public void unsetFromTime() {
3233
      __isset_bit_vector.clear(__FROMTIME_ISSET_ID);
123 ashish 3234
    }
3235
 
695 rajveer 3236
    /** Returns true if field fromTime is set (has been asigned a value) and false otherwise */
3237
    public boolean isSetFromTime() {
3238
      return __isset_bit_vector.get(__FROMTIME_ISSET_ID);
123 ashish 3239
    }
3240
 
695 rajveer 3241
    public void setFromTimeIsSet(boolean value) {
3242
      __isset_bit_vector.set(__FROMTIME_ISSET_ID, value);
123 ashish 3243
    }
3244
 
695 rajveer 3245
    public long getToTime() {
3246
      return this.toTime;
123 ashish 3247
    }
3248
 
695 rajveer 3249
    public getPayments_args setToTime(long toTime) {
3250
      this.toTime = toTime;
3251
      setToTimeIsSet(true);
123 ashish 3252
      return this;
3253
    }
3254
 
695 rajveer 3255
    public void unsetToTime() {
3256
      __isset_bit_vector.clear(__TOTIME_ISSET_ID);
123 ashish 3257
    }
3258
 
695 rajveer 3259
    /** Returns true if field toTime is set (has been asigned a value) and false otherwise */
3260
    public boolean isSetToTime() {
3261
      return __isset_bit_vector.get(__TOTIME_ISSET_ID);
123 ashish 3262
    }
3263
 
695 rajveer 3264
    public void setToTimeIsSet(boolean value) {
3265
      __isset_bit_vector.set(__TOTIME_ISSET_ID, value);
123 ashish 3266
    }
3267
 
3268
    /**
3269
     * 
3270
     * @see PaymentStatus
3271
     */
3272
    public PaymentStatus getStatus() {
3273
      return this.status;
3274
    }
3275
 
3276
    /**
3277
     * 
3278
     * @see PaymentStatus
3279
     */
3280
    public getPayments_args setStatus(PaymentStatus status) {
3281
      this.status = status;
3282
      return this;
3283
    }
3284
 
3285
    public void unsetStatus() {
3286
      this.status = null;
3287
    }
3288
 
3289
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
3290
    public boolean isSetStatus() {
3291
      return this.status != null;
3292
    }
3293
 
3294
    public void setStatusIsSet(boolean value) {
3295
      if (!value) {
3296
        this.status = null;
3297
      }
3298
    }
3299
 
695 rajveer 3300
    public long getGatewayId() {
3301
      return this.gatewayId;
123 ashish 3302
    }
3303
 
695 rajveer 3304
    public getPayments_args setGatewayId(long gatewayId) {
3305
      this.gatewayId = gatewayId;
3306
      setGatewayIdIsSet(true);
123 ashish 3307
      return this;
3308
    }
3309
 
695 rajveer 3310
    public void unsetGatewayId() {
3311
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 3312
    }
3313
 
695 rajveer 3314
    /** Returns true if field gatewayId is set (has been asigned a value) and false otherwise */
3315
    public boolean isSetGatewayId() {
3316
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 3317
    }
3318
 
695 rajveer 3319
    public void setGatewayIdIsSet(boolean value) {
3320
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
123 ashish 3321
    }
3322
 
3323
    public void setFieldValue(_Fields field, Object value) {
3324
      switch (field) {
3325
      case FROM_TIME:
3326
        if (value == null) {
695 rajveer 3327
          unsetFromTime();
123 ashish 3328
        } else {
695 rajveer 3329
          setFromTime((Long)value);
123 ashish 3330
        }
3331
        break;
3332
 
3333
      case TO_TIME:
3334
        if (value == null) {
695 rajveer 3335
          unsetToTime();
123 ashish 3336
        } else {
695 rajveer 3337
          setToTime((Long)value);
123 ashish 3338
        }
3339
        break;
3340
 
3341
      case STATUS:
3342
        if (value == null) {
3343
          unsetStatus();
3344
        } else {
3345
          setStatus((PaymentStatus)value);
3346
        }
3347
        break;
3348
 
420 ashish 3349
      case GATEWAY_ID:
123 ashish 3350
        if (value == null) {
695 rajveer 3351
          unsetGatewayId();
123 ashish 3352
        } else {
695 rajveer 3353
          setGatewayId((Long)value);
123 ashish 3354
        }
3355
        break;
3356
 
3357
      }
3358
    }
3359
 
3360
    public void setFieldValue(int fieldID, Object value) {
3361
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3362
    }
3363
 
3364
    public Object getFieldValue(_Fields field) {
3365
      switch (field) {
3366
      case FROM_TIME:
695 rajveer 3367
        return new Long(getFromTime());
123 ashish 3368
 
3369
      case TO_TIME:
695 rajveer 3370
        return new Long(getToTime());
123 ashish 3371
 
3372
      case STATUS:
3373
        return getStatus();
3374
 
420 ashish 3375
      case GATEWAY_ID:
695 rajveer 3376
        return new Long(getGatewayId());
123 ashish 3377
 
3378
      }
3379
      throw new IllegalStateException();
3380
    }
3381
 
3382
    public Object getFieldValue(int fieldId) {
3383
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3384
    }
3385
 
3386
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3387
    public boolean isSet(_Fields field) {
3388
      switch (field) {
3389
      case FROM_TIME:
695 rajveer 3390
        return isSetFromTime();
123 ashish 3391
      case TO_TIME:
695 rajveer 3392
        return isSetToTime();
123 ashish 3393
      case STATUS:
3394
        return isSetStatus();
420 ashish 3395
      case GATEWAY_ID:
695 rajveer 3396
        return isSetGatewayId();
123 ashish 3397
      }
3398
      throw new IllegalStateException();
3399
    }
3400
 
3401
    public boolean isSet(int fieldID) {
3402
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3403
    }
3404
 
3405
    @Override
3406
    public boolean equals(Object that) {
3407
      if (that == null)
3408
        return false;
3409
      if (that instanceof getPayments_args)
3410
        return this.equals((getPayments_args)that);
3411
      return false;
3412
    }
3413
 
3414
    public boolean equals(getPayments_args that) {
3415
      if (that == null)
3416
        return false;
3417
 
695 rajveer 3418
      boolean this_present_fromTime = true;
3419
      boolean that_present_fromTime = true;
3420
      if (this_present_fromTime || that_present_fromTime) {
3421
        if (!(this_present_fromTime && that_present_fromTime))
123 ashish 3422
          return false;
695 rajveer 3423
        if (this.fromTime != that.fromTime)
123 ashish 3424
          return false;
3425
      }
3426
 
695 rajveer 3427
      boolean this_present_toTime = true;
3428
      boolean that_present_toTime = true;
3429
      if (this_present_toTime || that_present_toTime) {
3430
        if (!(this_present_toTime && that_present_toTime))
123 ashish 3431
          return false;
695 rajveer 3432
        if (this.toTime != that.toTime)
123 ashish 3433
          return false;
3434
      }
3435
 
3436
      boolean this_present_status = true && this.isSetStatus();
3437
      boolean that_present_status = true && that.isSetStatus();
3438
      if (this_present_status || that_present_status) {
3439
        if (!(this_present_status && that_present_status))
3440
          return false;
3441
        if (!this.status.equals(that.status))
3442
          return false;
3443
      }
3444
 
695 rajveer 3445
      boolean this_present_gatewayId = true;
3446
      boolean that_present_gatewayId = true;
3447
      if (this_present_gatewayId || that_present_gatewayId) {
3448
        if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 3449
          return false;
695 rajveer 3450
        if (this.gatewayId != that.gatewayId)
123 ashish 3451
          return false;
3452
      }
3453
 
3454
      return true;
3455
    }
3456
 
3457
    @Override
3458
    public int hashCode() {
3459
      return 0;
3460
    }
3461
 
3462
    public int compareTo(getPayments_args other) {
3463
      if (!getClass().equals(other.getClass())) {
3464
        return getClass().getName().compareTo(other.getClass().getName());
3465
      }
3466
 
3467
      int lastComparison = 0;
3468
      getPayments_args typedOther = (getPayments_args)other;
3469
 
695 rajveer 3470
      lastComparison = Boolean.valueOf(isSetFromTime()).compareTo(isSetFromTime());
123 ashish 3471
      if (lastComparison != 0) {
3472
        return lastComparison;
3473
      }
695 rajveer 3474
      lastComparison = TBaseHelper.compareTo(fromTime, typedOther.fromTime);
123 ashish 3475
      if (lastComparison != 0) {
3476
        return lastComparison;
3477
      }
695 rajveer 3478
      lastComparison = Boolean.valueOf(isSetToTime()).compareTo(isSetToTime());
123 ashish 3479
      if (lastComparison != 0) {
3480
        return lastComparison;
3481
      }
695 rajveer 3482
      lastComparison = TBaseHelper.compareTo(toTime, typedOther.toTime);
123 ashish 3483
      if (lastComparison != 0) {
3484
        return lastComparison;
3485
      }
3486
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
3487
      if (lastComparison != 0) {
3488
        return lastComparison;
3489
      }
3490
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
3491
      if (lastComparison != 0) {
3492
        return lastComparison;
3493
      }
695 rajveer 3494
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(isSetGatewayId());
123 ashish 3495
      if (lastComparison != 0) {
3496
        return lastComparison;
3497
      }
695 rajveer 3498
      lastComparison = TBaseHelper.compareTo(gatewayId, typedOther.gatewayId);
123 ashish 3499
      if (lastComparison != 0) {
3500
        return lastComparison;
3501
      }
3502
      return 0;
3503
    }
3504
 
3505
    public void read(TProtocol iprot) throws TException {
3506
      TField field;
3507
      iprot.readStructBegin();
3508
      while (true)
3509
      {
3510
        field = iprot.readFieldBegin();
3511
        if (field.type == TType.STOP) { 
3512
          break;
3513
        }
3514
        _Fields fieldId = _Fields.findByThriftId(field.id);
3515
        if (fieldId == null) {
3516
          TProtocolUtil.skip(iprot, field.type);
3517
        } else {
3518
          switch (fieldId) {
3519
            case FROM_TIME:
3520
              if (field.type == TType.I64) {
695 rajveer 3521
                this.fromTime = iprot.readI64();
3522
                setFromTimeIsSet(true);
123 ashish 3523
              } else { 
3524
                TProtocolUtil.skip(iprot, field.type);
3525
              }
3526
              break;
3527
            case TO_TIME:
3528
              if (field.type == TType.I64) {
695 rajveer 3529
                this.toTime = iprot.readI64();
3530
                setToTimeIsSet(true);
123 ashish 3531
              } else { 
3532
                TProtocolUtil.skip(iprot, field.type);
3533
              }
3534
              break;
3535
            case STATUS:
3536
              if (field.type == TType.I32) {
3537
                this.status = PaymentStatus.findByValue(iprot.readI32());
3538
              } else { 
3539
                TProtocolUtil.skip(iprot, field.type);
3540
              }
3541
              break;
420 ashish 3542
            case GATEWAY_ID:
3543
              if (field.type == TType.I64) {
695 rajveer 3544
                this.gatewayId = iprot.readI64();
3545
                setGatewayIdIsSet(true);
123 ashish 3546
              } else { 
3547
                TProtocolUtil.skip(iprot, field.type);
3548
              }
3549
              break;
3550
          }
3551
          iprot.readFieldEnd();
3552
        }
3553
      }
3554
      iprot.readStructEnd();
3555
      validate();
3556
    }
3557
 
3558
    public void write(TProtocol oprot) throws TException {
3559
      validate();
3560
 
3561
      oprot.writeStructBegin(STRUCT_DESC);
3562
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
695 rajveer 3563
      oprot.writeI64(this.fromTime);
123 ashish 3564
      oprot.writeFieldEnd();
3565
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
695 rajveer 3566
      oprot.writeI64(this.toTime);
123 ashish 3567
      oprot.writeFieldEnd();
3568
      if (this.status != null) {
3569
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
3570
        oprot.writeI32(this.status.getValue());
3571
        oprot.writeFieldEnd();
3572
      }
420 ashish 3573
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
695 rajveer 3574
      oprot.writeI64(this.gatewayId);
420 ashish 3575
      oprot.writeFieldEnd();
123 ashish 3576
      oprot.writeFieldStop();
3577
      oprot.writeStructEnd();
3578
    }
3579
 
3580
    @Override
3581
    public String toString() {
3582
      StringBuilder sb = new StringBuilder("getPayments_args(");
3583
      boolean first = true;
3584
 
695 rajveer 3585
      sb.append("fromTime:");
3586
      sb.append(this.fromTime);
123 ashish 3587
      first = false;
3588
      if (!first) sb.append(", ");
695 rajveer 3589
      sb.append("toTime:");
3590
      sb.append(this.toTime);
123 ashish 3591
      first = false;
3592
      if (!first) sb.append(", ");
3593
      sb.append("status:");
3594
      if (this.status == null) {
3595
        sb.append("null");
3596
      } else {
3597
        String status_name = status.name();
3598
        if (status_name != null) {
3599
          sb.append(status_name);
3600
          sb.append(" (");
3601
        }
3602
        sb.append(this.status);
3603
        if (status_name != null) {
3604
          sb.append(")");
3605
        }
3606
      }
3607
      first = false;
3608
      if (!first) sb.append(", ");
695 rajveer 3609
      sb.append("gatewayId:");
3610
      sb.append(this.gatewayId);
123 ashish 3611
      first = false;
3612
      sb.append(")");
3613
      return sb.toString();
3614
    }
3615
 
3616
    public void validate() throws TException {
3617
      // check for required fields
3618
    }
3619
 
3620
  }
3621
 
695 rajveer 3622
  public static class getPayments_result implements TBase<getPayments_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPayments_result>   {
123 ashish 3623
    private static final TStruct STRUCT_DESC = new TStruct("getPayments_result");
3624
 
3625
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
3626
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
3627
 
3628
    private List<Payment> success;
3629
    private PaymentException pe;
3630
 
3631
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3632
    public enum _Fields implements TFieldIdEnum {
3633
      SUCCESS((short)0, "success"),
3634
      PE((short)1, "pe");
3635
 
3636
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3637
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3638
 
3639
      static {
3640
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3641
          byId.put((int)field._thriftId, field);
3642
          byName.put(field.getFieldName(), field);
3643
        }
3644
      }
3645
 
3646
      /**
3647
       * Find the _Fields constant that matches fieldId, or null if its not found.
3648
       */
3649
      public static _Fields findByThriftId(int fieldId) {
3650
        return byId.get(fieldId);
3651
      }
3652
 
3653
      /**
3654
       * Find the _Fields constant that matches fieldId, throwing an exception
3655
       * if it is not found.
3656
       */
3657
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3658
        _Fields fields = findByThriftId(fieldId);
3659
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3660
        return fields;
3661
      }
3662
 
3663
      /**
3664
       * Find the _Fields constant that matches name, or null if its not found.
3665
       */
3666
      public static _Fields findByName(String name) {
3667
        return byName.get(name);
3668
      }
3669
 
3670
      private final short _thriftId;
3671
      private final String _fieldName;
3672
 
3673
      _Fields(short thriftId, String fieldName) {
3674
        _thriftId = thriftId;
3675
        _fieldName = fieldName;
3676
      }
3677
 
3678
      public short getThriftFieldId() {
3679
        return _thriftId;
3680
      }
3681
 
3682
      public String getFieldName() {
3683
        return _fieldName;
3684
      }
3685
    }
3686
 
3687
    // isset id assignments
3688
 
3689
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3690
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3691
          new ListMetaData(TType.LIST, 
3692
              new StructMetaData(TType.STRUCT, Payment.class))));
3693
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
3694
          new FieldValueMetaData(TType.STRUCT)));
3695
    }});
3696
 
3697
    static {
3698
      FieldMetaData.addStructMetaDataMap(getPayments_result.class, metaDataMap);
3699
    }
3700
 
3701
    public getPayments_result() {
3702
    }
3703
 
3704
    public getPayments_result(
3705
      List<Payment> success,
3706
      PaymentException pe)
3707
    {
3708
      this();
3709
      this.success = success;
3710
      this.pe = pe;
3711
    }
3712
 
3713
    /**
3714
     * Performs a deep copy on <i>other</i>.
3715
     */
3716
    public getPayments_result(getPayments_result other) {
3717
      if (other.isSetSuccess()) {
3718
        List<Payment> __this__success = new ArrayList<Payment>();
3719
        for (Payment other_element : other.success) {
3720
          __this__success.add(new Payment(other_element));
3721
        }
3722
        this.success = __this__success;
3723
      }
3724
      if (other.isSetPe()) {
3725
        this.pe = new PaymentException(other.pe);
3726
      }
3727
    }
3728
 
3729
    public getPayments_result deepCopy() {
3730
      return new getPayments_result(this);
3731
    }
3732
 
3733
    @Deprecated
3734
    public getPayments_result clone() {
3735
      return new getPayments_result(this);
3736
    }
3737
 
3738
    public int getSuccessSize() {
3739
      return (this.success == null) ? 0 : this.success.size();
3740
    }
3741
 
3742
    public java.util.Iterator<Payment> getSuccessIterator() {
3743
      return (this.success == null) ? null : this.success.iterator();
3744
    }
3745
 
3746
    public void addToSuccess(Payment elem) {
3747
      if (this.success == null) {
3748
        this.success = new ArrayList<Payment>();
3749
      }
3750
      this.success.add(elem);
3751
    }
3752
 
3753
    public List<Payment> getSuccess() {
3754
      return this.success;
3755
    }
3756
 
3757
    public getPayments_result setSuccess(List<Payment> success) {
3758
      this.success = success;
3759
      return this;
3760
    }
3761
 
3762
    public void unsetSuccess() {
3763
      this.success = null;
3764
    }
3765
 
3766
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3767
    public boolean isSetSuccess() {
3768
      return this.success != null;
3769
    }
3770
 
3771
    public void setSuccessIsSet(boolean value) {
3772
      if (!value) {
3773
        this.success = null;
3774
      }
3775
    }
3776
 
3777
    public PaymentException getPe() {
3778
      return this.pe;
3779
    }
3780
 
3781
    public getPayments_result setPe(PaymentException pe) {
3782
      this.pe = pe;
3783
      return this;
3784
    }
3785
 
3786
    public void unsetPe() {
3787
      this.pe = null;
3788
    }
3789
 
3790
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
3791
    public boolean isSetPe() {
3792
      return this.pe != null;
3793
    }
3794
 
3795
    public void setPeIsSet(boolean value) {
3796
      if (!value) {
3797
        this.pe = null;
3798
      }
3799
    }
3800
 
3801
    public void setFieldValue(_Fields field, Object value) {
3802
      switch (field) {
3803
      case SUCCESS:
3804
        if (value == null) {
3805
          unsetSuccess();
3806
        } else {
3807
          setSuccess((List<Payment>)value);
3808
        }
3809
        break;
3810
 
3811
      case PE:
3812
        if (value == null) {
3813
          unsetPe();
3814
        } else {
3815
          setPe((PaymentException)value);
3816
        }
3817
        break;
3818
 
3819
      }
3820
    }
3821
 
3822
    public void setFieldValue(int fieldID, Object value) {
3823
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3824
    }
3825
 
3826
    public Object getFieldValue(_Fields field) {
3827
      switch (field) {
3828
      case SUCCESS:
3829
        return getSuccess();
3830
 
3831
      case PE:
3832
        return getPe();
3833
 
3834
      }
3835
      throw new IllegalStateException();
3836
    }
3837
 
3838
    public Object getFieldValue(int fieldId) {
3839
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3840
    }
3841
 
3842
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3843
    public boolean isSet(_Fields field) {
3844
      switch (field) {
3845
      case SUCCESS:
3846
        return isSetSuccess();
3847
      case PE:
3848
        return isSetPe();
3849
      }
3850
      throw new IllegalStateException();
3851
    }
3852
 
3853
    public boolean isSet(int fieldID) {
3854
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3855
    }
3856
 
3857
    @Override
3858
    public boolean equals(Object that) {
3859
      if (that == null)
3860
        return false;
3861
      if (that instanceof getPayments_result)
3862
        return this.equals((getPayments_result)that);
3863
      return false;
3864
    }
3865
 
3866
    public boolean equals(getPayments_result that) {
3867
      if (that == null)
3868
        return false;
3869
 
3870
      boolean this_present_success = true && this.isSetSuccess();
3871
      boolean that_present_success = true && that.isSetSuccess();
3872
      if (this_present_success || that_present_success) {
3873
        if (!(this_present_success && that_present_success))
3874
          return false;
3875
        if (!this.success.equals(that.success))
3876
          return false;
3877
      }
3878
 
3879
      boolean this_present_pe = true && this.isSetPe();
3880
      boolean that_present_pe = true && that.isSetPe();
3881
      if (this_present_pe || that_present_pe) {
3882
        if (!(this_present_pe && that_present_pe))
3883
          return false;
3884
        if (!this.pe.equals(that.pe))
3885
          return false;
3886
      }
3887
 
3888
      return true;
3889
    }
3890
 
3891
    @Override
3892
    public int hashCode() {
3893
      return 0;
3894
    }
3895
 
695 rajveer 3896
    public int compareTo(getPayments_result other) {
123 ashish 3897
      if (!getClass().equals(other.getClass())) {
3898
        return getClass().getName().compareTo(other.getClass().getName());
3899
      }
3900
 
3901
      int lastComparison = 0;
695 rajveer 3902
      getPayments_result typedOther = (getPayments_result)other;
123 ashish 3903
 
695 rajveer 3904
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
123 ashish 3905
      if (lastComparison != 0) {
3906
        return lastComparison;
3907
      }
695 rajveer 3908
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
123 ashish 3909
      if (lastComparison != 0) {
3910
        return lastComparison;
3911
      }
695 rajveer 3912
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());
3913
      if (lastComparison != 0) {
3914
        return lastComparison;
123 ashish 3915
      }
695 rajveer 3916
      lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);
3917
      if (lastComparison != 0) {
3918
        return lastComparison;
123 ashish 3919
      }
3920
      return 0;
3921
    }
3922
 
3923
    public void read(TProtocol iprot) throws TException {
3924
      TField field;
3925
      iprot.readStructBegin();
3926
      while (true)
3927
      {
3928
        field = iprot.readFieldBegin();
3929
        if (field.type == TType.STOP) { 
3930
          break;
3931
        }
3932
        _Fields fieldId = _Fields.findByThriftId(field.id);
3933
        if (fieldId == null) {
3934
          TProtocolUtil.skip(iprot, field.type);
3935
        } else {
3936
          switch (fieldId) {
3937
            case SUCCESS:
420 ashish 3938
              if (field.type == TType.LIST) {
3939
                {
695 rajveer 3940
                  TList _list12 = iprot.readListBegin();
3941
                  this.success = new ArrayList<Payment>(_list12.size);
3942
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
420 ashish 3943
                  {
695 rajveer 3944
                    Payment _elem14;
3945
                    _elem14 = new Payment();
3946
                    _elem14.read(iprot);
3947
                    this.success.add(_elem14);
420 ashish 3948
                  }
3949
                  iprot.readListEnd();
3950
                }
123 ashish 3951
              } else { 
3952
                TProtocolUtil.skip(iprot, field.type);
3953
              }
3954
              break;
3955
            case PE:
3956
              if (field.type == TType.STRUCT) {
3957
                this.pe = new PaymentException();
3958
                this.pe.read(iprot);
3959
              } else { 
3960
                TProtocolUtil.skip(iprot, field.type);
3961
              }
3962
              break;
3963
          }
3964
          iprot.readFieldEnd();
3965
        }
3966
      }
3967
      iprot.readStructEnd();
3968
      validate();
3969
    }
3970
 
3971
    public void write(TProtocol oprot) throws TException {
3972
      oprot.writeStructBegin(STRUCT_DESC);
3973
 
3974
      if (this.isSetSuccess()) {
3975
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
420 ashish 3976
        {
3977
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
695 rajveer 3978
          for (Payment _iter15 : this.success)
420 ashish 3979
          {
695 rajveer 3980
            _iter15.write(oprot);
420 ashish 3981
          }
3982
          oprot.writeListEnd();
3983
        }
123 ashish 3984
        oprot.writeFieldEnd();
3985
      } else if (this.isSetPe()) {
3986
        oprot.writeFieldBegin(PE_FIELD_DESC);
3987
        this.pe.write(oprot);
3988
        oprot.writeFieldEnd();
3989
      }
3990
      oprot.writeFieldStop();
3991
      oprot.writeStructEnd();
3992
    }
3993
 
3994
    @Override
3995
    public String toString() {
695 rajveer 3996
      StringBuilder sb = new StringBuilder("getPayments_result(");
123 ashish 3997
      boolean first = true;
3998
 
3999
      sb.append("success:");
4000
      if (this.success == null) {
4001
        sb.append("null");
4002
      } else {
4003
        sb.append(this.success);
4004
      }
4005
      first = false;
4006
      if (!first) sb.append(", ");
4007
      sb.append("pe:");
4008
      if (this.pe == null) {
4009
        sb.append("null");
4010
      } else {
4011
        sb.append(this.pe);
4012
      }
4013
      first = false;
4014
      sb.append(")");
4015
      return sb.toString();
4016
    }
4017
 
4018
    public void validate() throws TException {
4019
      // check for required fields
4020
    }
4021
 
4022
  }
4023
 
695 rajveer 4024
  public static class getPaymentGateway_args implements TBase<getPaymentGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPaymentGateway_args>   {
4025
    private static final TStruct STRUCT_DESC = new TStruct("getPaymentGateway_args");
123 ashish 4026
 
420 ashish 4027
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
123 ashish 4028
 
420 ashish 4029
    private long id;
123 ashish 4030
 
4031
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4032
    public enum _Fields implements TFieldIdEnum {
695 rajveer 4033
      ID((short)1, "id");
123 ashish 4034
 
4035
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4036
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4037
 
4038
      static {
4039
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4040
          byId.put((int)field._thriftId, field);
4041
          byName.put(field.getFieldName(), field);
4042
        }
4043
      }
4044
 
4045
      /**
4046
       * Find the _Fields constant that matches fieldId, or null if its not found.
4047
       */
4048
      public static _Fields findByThriftId(int fieldId) {
4049
        return byId.get(fieldId);
4050
      }
4051
 
4052
      /**
4053
       * Find the _Fields constant that matches fieldId, throwing an exception
4054
       * if it is not found.
4055
       */
4056
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4057
        _Fields fields = findByThriftId(fieldId);
4058
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4059
        return fields;
4060
      }
4061
 
4062
      /**
4063
       * Find the _Fields constant that matches name, or null if its not found.
4064
       */
4065
      public static _Fields findByName(String name) {
4066
        return byName.get(name);
4067
      }
4068
 
4069
      private final short _thriftId;
4070
      private final String _fieldName;
4071
 
4072
      _Fields(short thriftId, String fieldName) {
4073
        _thriftId = thriftId;
4074
        _fieldName = fieldName;
4075
      }
4076
 
4077
      public short getThriftFieldId() {
4078
        return _thriftId;
4079
      }
4080
 
4081
      public String getFieldName() {
4082
        return _fieldName;
4083
      }
4084
    }
4085
 
4086
    // isset id assignments
420 ashish 4087
    private static final int __ID_ISSET_ID = 0;
123 ashish 4088
    private BitSet __isset_bit_vector = new BitSet(1);
4089
 
4090
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
420 ashish 4091
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
123 ashish 4092
          new FieldValueMetaData(TType.I64)));
4093
    }});
4094
 
4095
    static {
695 rajveer 4096
      FieldMetaData.addStructMetaDataMap(getPaymentGateway_args.class, metaDataMap);
123 ashish 4097
    }
4098
 
695 rajveer 4099
    public getPaymentGateway_args() {
123 ashish 4100
    }
4101
 
695 rajveer 4102
    public getPaymentGateway_args(
4103
      long id)
123 ashish 4104
    {
4105
      this();
420 ashish 4106
      this.id = id;
4107
      setIdIsSet(true);
123 ashish 4108
    }
4109
 
4110
    /**
4111
     * Performs a deep copy on <i>other</i>.
4112
     */
695 rajveer 4113
    public getPaymentGateway_args(getPaymentGateway_args other) {
123 ashish 4114
      __isset_bit_vector.clear();
4115
      __isset_bit_vector.or(other.__isset_bit_vector);
420 ashish 4116
      this.id = other.id;
123 ashish 4117
    }
4118
 
695 rajveer 4119
    public getPaymentGateway_args deepCopy() {
4120
      return new getPaymentGateway_args(this);
123 ashish 4121
    }
4122
 
4123
    @Deprecated
695 rajveer 4124
    public getPaymentGateway_args clone() {
4125
      return new getPaymentGateway_args(this);
123 ashish 4126
    }
4127
 
420 ashish 4128
    public long getId() {
4129
      return this.id;
123 ashish 4130
    }
4131
 
695 rajveer 4132
    public getPaymentGateway_args setId(long id) {
420 ashish 4133
      this.id = id;
4134
      setIdIsSet(true);
123 ashish 4135
      return this;
4136
    }
4137
 
420 ashish 4138
    public void unsetId() {
4139
      __isset_bit_vector.clear(__ID_ISSET_ID);
123 ashish 4140
    }
4141
 
420 ashish 4142
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
4143
    public boolean isSetId() {
4144
      return __isset_bit_vector.get(__ID_ISSET_ID);
123 ashish 4145
    }
4146
 
420 ashish 4147
    public void setIdIsSet(boolean value) {
4148
      __isset_bit_vector.set(__ID_ISSET_ID, value);
123 ashish 4149
    }
4150
 
4151
    public void setFieldValue(_Fields field, Object value) {
4152
      switch (field) {
420 ashish 4153
      case ID:
123 ashish 4154
        if (value == null) {
420 ashish 4155
          unsetId();
123 ashish 4156
        } else {
420 ashish 4157
          setId((Long)value);
123 ashish 4158
        }
4159
        break;
4160
 
4161
      }
4162
    }
4163
 
4164
    public void setFieldValue(int fieldID, Object value) {
4165
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4166
    }
4167
 
4168
    public Object getFieldValue(_Fields field) {
4169
      switch (field) {
420 ashish 4170
      case ID:
4171
        return new Long(getId());
123 ashish 4172
 
4173
      }
4174
      throw new IllegalStateException();
4175
    }
4176
 
4177
    public Object getFieldValue(int fieldId) {
4178
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4179
    }
4180
 
4181
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4182
    public boolean isSet(_Fields field) {
4183
      switch (field) {
420 ashish 4184
      case ID:
4185
        return isSetId();
123 ashish 4186
      }
4187
      throw new IllegalStateException();
4188
    }
4189
 
4190
    public boolean isSet(int fieldID) {
4191
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4192
    }
4193
 
4194
    @Override
4195
    public boolean equals(Object that) {
4196
      if (that == null)
4197
        return false;
695 rajveer 4198
      if (that instanceof getPaymentGateway_args)
4199
        return this.equals((getPaymentGateway_args)that);
123 ashish 4200
      return false;
4201
    }
4202
 
695 rajveer 4203
    public boolean equals(getPaymentGateway_args that) {
123 ashish 4204
      if (that == null)
4205
        return false;
4206
 
420 ashish 4207
      boolean this_present_id = true;
4208
      boolean that_present_id = true;
4209
      if (this_present_id || that_present_id) {
4210
        if (!(this_present_id && that_present_id))
123 ashish 4211
          return false;
420 ashish 4212
        if (this.id != that.id)
123 ashish 4213
          return false;
4214
      }
4215
 
4216
      return true;
4217
    }
4218
 
4219
    @Override
4220
    public int hashCode() {
4221
      return 0;
4222
    }
4223
 
695 rajveer 4224
    public int compareTo(getPaymentGateway_args other) {
123 ashish 4225
      if (!getClass().equals(other.getClass())) {
4226
        return getClass().getName().compareTo(other.getClass().getName());
4227
      }
4228
 
4229
      int lastComparison = 0;
695 rajveer 4230
      getPaymentGateway_args typedOther = (getPaymentGateway_args)other;
123 ashish 4231
 
420 ashish 4232
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
123 ashish 4233
      if (lastComparison != 0) {
4234
        return lastComparison;
4235
      }
420 ashish 4236
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
123 ashish 4237
      if (lastComparison != 0) {
4238
        return lastComparison;
4239
      }
4240
      return 0;
4241
    }
4242
 
4243
    public void read(TProtocol iprot) throws TException {
4244
      TField field;
4245
      iprot.readStructBegin();
4246
      while (true)
4247
      {
4248
        field = iprot.readFieldBegin();
4249
        if (field.type == TType.STOP) { 
4250
          break;
4251
        }
4252
        _Fields fieldId = _Fields.findByThriftId(field.id);
4253
        if (fieldId == null) {
4254
          TProtocolUtil.skip(iprot, field.type);
4255
        } else {
4256
          switch (fieldId) {
420 ashish 4257
            case ID:
123 ashish 4258
              if (field.type == TType.I64) {
420 ashish 4259
                this.id = iprot.readI64();
4260
                setIdIsSet(true);
123 ashish 4261
              } else { 
4262
                TProtocolUtil.skip(iprot, field.type);
4263
              }
4264
              break;
4265
          }
4266
          iprot.readFieldEnd();
4267
        }
4268
      }
4269
      iprot.readStructEnd();
4270
      validate();
4271
    }
4272
 
4273
    public void write(TProtocol oprot) throws TException {
4274
      validate();
4275
 
4276
      oprot.writeStructBegin(STRUCT_DESC);
420 ashish 4277
      oprot.writeFieldBegin(ID_FIELD_DESC);
4278
      oprot.writeI64(this.id);
123 ashish 4279
      oprot.writeFieldEnd();
4280
      oprot.writeFieldStop();
4281
      oprot.writeStructEnd();
4282
    }
4283
 
4284
    @Override
4285
    public String toString() {
695 rajveer 4286
      StringBuilder sb = new StringBuilder("getPaymentGateway_args(");
123 ashish 4287
      boolean first = true;
4288
 
420 ashish 4289
      sb.append("id:");
4290
      sb.append(this.id);
123 ashish 4291
      first = false;
4292
      sb.append(")");
4293
      return sb.toString();
4294
    }
4295
 
4296
    public void validate() throws TException {
4297
      // check for required fields
4298
    }
4299
 
4300
  }
4301
 
695 rajveer 4302
  public static class getPaymentGateway_result implements TBase<getPaymentGateway_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPaymentGateway_result>   {
4303
    private static final TStruct STRUCT_DESC = new TStruct("getPaymentGateway_result");
123 ashish 4304
 
695 rajveer 4305
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
123 ashish 4306
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
4307
 
695 rajveer 4308
    private PaymentGateway success;
123 ashish 4309
    private PaymentException pe;
4310
 
4311
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4312
    public enum _Fields implements TFieldIdEnum {
420 ashish 4313
      SUCCESS((short)0, "success"),
4314
      PE((short)1, "pe");
4315
 
4316
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4317
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4318
 
4319
      static {
4320
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4321
          byId.put((int)field._thriftId, field);
4322
          byName.put(field.getFieldName(), field);
4323
        }
4324
      }
4325
 
4326
      /**
4327
       * Find the _Fields constant that matches fieldId, or null if its not found.
4328
       */
4329
      public static _Fields findByThriftId(int fieldId) {
4330
        return byId.get(fieldId);
4331
      }
4332
 
4333
      /**
4334
       * Find the _Fields constant that matches fieldId, throwing an exception
4335
       * if it is not found.
4336
       */
4337
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4338
        _Fields fields = findByThriftId(fieldId);
4339
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4340
        return fields;
4341
      }
4342
 
4343
      /**
4344
       * Find the _Fields constant that matches name, or null if its not found.
4345
       */
4346
      public static _Fields findByName(String name) {
4347
        return byName.get(name);
4348
      }
4349
 
4350
      private final short _thriftId;
4351
      private final String _fieldName;
4352
 
4353
      _Fields(short thriftId, String fieldName) {
4354
        _thriftId = thriftId;
4355
        _fieldName = fieldName;
4356
      }
4357
 
4358
      public short getThriftFieldId() {
4359
        return _thriftId;
4360
      }
4361
 
4362
      public String getFieldName() {
4363
        return _fieldName;
4364
      }
4365
    }
4366
 
4367
    // isset id assignments
4368
 
4369
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4370
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
695 rajveer 4371
          new StructMetaData(TType.STRUCT, PaymentGateway.class)));
420 ashish 4372
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
4373
          new FieldValueMetaData(TType.STRUCT)));
4374
    }});
4375
 
4376
    static {
695 rajveer 4377
      FieldMetaData.addStructMetaDataMap(getPaymentGateway_result.class, metaDataMap);
420 ashish 4378
    }
4379
 
695 rajveer 4380
    public getPaymentGateway_result() {
420 ashish 4381
    }
4382
 
695 rajveer 4383
    public getPaymentGateway_result(
4384
      PaymentGateway success,
420 ashish 4385
      PaymentException pe)
4386
    {
4387
      this();
4388
      this.success = success;
4389
      this.pe = pe;
4390
    }
4391
 
4392
    /**
4393
     * Performs a deep copy on <i>other</i>.
4394
     */
695 rajveer 4395
    public getPaymentGateway_result(getPaymentGateway_result other) {
420 ashish 4396
      if (other.isSetSuccess()) {
695 rajveer 4397
        this.success = new PaymentGateway(other.success);
420 ashish 4398
      }
4399
      if (other.isSetPe()) {
4400
        this.pe = new PaymentException(other.pe);
4401
      }
4402
    }
4403
 
695 rajveer 4404
    public getPaymentGateway_result deepCopy() {
4405
      return new getPaymentGateway_result(this);
420 ashish 4406
    }
4407
 
4408
    @Deprecated
695 rajveer 4409
    public getPaymentGateway_result clone() {
4410
      return new getPaymentGateway_result(this);
420 ashish 4411
    }
4412
 
695 rajveer 4413
    public PaymentGateway getSuccess() {
420 ashish 4414
      return this.success;
4415
    }
4416
 
695 rajveer 4417
    public getPaymentGateway_result setSuccess(PaymentGateway success) {
420 ashish 4418
      this.success = success;
4419
      return this;
4420
    }
4421
 
4422
    public void unsetSuccess() {
4423
      this.success = null;
4424
    }
4425
 
4426
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4427
    public boolean isSetSuccess() {
4428
      return this.success != null;
4429
    }
4430
 
4431
    public void setSuccessIsSet(boolean value) {
4432
      if (!value) {
4433
        this.success = null;
4434
      }
4435
    }
4436
 
4437
    public PaymentException getPe() {
4438
      return this.pe;
4439
    }
4440
 
695 rajveer 4441
    public getPaymentGateway_result setPe(PaymentException pe) {
420 ashish 4442
      this.pe = pe;
4443
      return this;
4444
    }
4445
 
4446
    public void unsetPe() {
4447
      this.pe = null;
4448
    }
4449
 
4450
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
4451
    public boolean isSetPe() {
4452
      return this.pe != null;
4453
    }
4454
 
4455
    public void setPeIsSet(boolean value) {
4456
      if (!value) {
4457
        this.pe = null;
4458
      }
4459
    }
4460
 
4461
    public void setFieldValue(_Fields field, Object value) {
4462
      switch (field) {
4463
      case SUCCESS:
4464
        if (value == null) {
4465
          unsetSuccess();
4466
        } else {
695 rajveer 4467
          setSuccess((PaymentGateway)value);
420 ashish 4468
        }
4469
        break;
4470
 
4471
      case PE:
4472
        if (value == null) {
4473
          unsetPe();
4474
        } else {
4475
          setPe((PaymentException)value);
4476
        }
4477
        break;
4478
 
4479
      }
4480
    }
4481
 
4482
    public void setFieldValue(int fieldID, Object value) {
4483
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4484
    }
4485
 
4486
    public Object getFieldValue(_Fields field) {
4487
      switch (field) {
4488
      case SUCCESS:
4489
        return getSuccess();
4490
 
4491
      case PE:
4492
        return getPe();
4493
 
4494
      }
4495
      throw new IllegalStateException();
4496
    }
4497
 
4498
    public Object getFieldValue(int fieldId) {
4499
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4500
    }
4501
 
4502
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4503
    public boolean isSet(_Fields field) {
4504
      switch (field) {
4505
      case SUCCESS:
4506
        return isSetSuccess();
4507
      case PE:
4508
        return isSetPe();
4509
      }
4510
      throw new IllegalStateException();
4511
    }
4512
 
4513
    public boolean isSet(int fieldID) {
4514
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4515
    }
4516
 
4517
    @Override
4518
    public boolean equals(Object that) {
4519
      if (that == null)
4520
        return false;
695 rajveer 4521
      if (that instanceof getPaymentGateway_result)
4522
        return this.equals((getPaymentGateway_result)that);
420 ashish 4523
      return false;
4524
    }
4525
 
695 rajveer 4526
    public boolean equals(getPaymentGateway_result that) {
420 ashish 4527
      if (that == null)
4528
        return false;
4529
 
4530
      boolean this_present_success = true && this.isSetSuccess();
4531
      boolean that_present_success = true && that.isSetSuccess();
4532
      if (this_present_success || that_present_success) {
4533
        if (!(this_present_success && that_present_success))
4534
          return false;
4535
        if (!this.success.equals(that.success))
4536
          return false;
4537
      }
4538
 
4539
      boolean this_present_pe = true && this.isSetPe();
4540
      boolean that_present_pe = true && that.isSetPe();
4541
      if (this_present_pe || that_present_pe) {
4542
        if (!(this_present_pe && that_present_pe))
4543
          return false;
4544
        if (!this.pe.equals(that.pe))
4545
          return false;
4546
      }
4547
 
4548
      return true;
4549
    }
4550
 
4551
    @Override
4552
    public int hashCode() {
4553
      return 0;
4554
    }
4555
 
695 rajveer 4556
    public int compareTo(getPaymentGateway_result other) {
4557
      if (!getClass().equals(other.getClass())) {
4558
        return getClass().getName().compareTo(other.getClass().getName());
4559
      }
4560
 
4561
      int lastComparison = 0;
4562
      getPaymentGateway_result typedOther = (getPaymentGateway_result)other;
4563
 
4564
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4565
      if (lastComparison != 0) {
4566
        return lastComparison;
4567
      }
4568
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4569
      if (lastComparison != 0) {
4570
        return lastComparison;
4571
      }
4572
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());
4573
      if (lastComparison != 0) {
4574
        return lastComparison;
4575
      }
4576
      lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);
4577
      if (lastComparison != 0) {
4578
        return lastComparison;
4579
      }
4580
      return 0;
4581
    }
4582
 
420 ashish 4583
    public void read(TProtocol iprot) throws TException {
4584
      TField field;
4585
      iprot.readStructBegin();
4586
      while (true)
4587
      {
4588
        field = iprot.readFieldBegin();
4589
        if (field.type == TType.STOP) { 
4590
          break;
4591
        }
4592
        _Fields fieldId = _Fields.findByThriftId(field.id);
4593
        if (fieldId == null) {
4594
          TProtocolUtil.skip(iprot, field.type);
4595
        } else {
4596
          switch (fieldId) {
4597
            case SUCCESS:
695 rajveer 4598
              if (field.type == TType.STRUCT) {
4599
                this.success = new PaymentGateway();
4600
                this.success.read(iprot);
420 ashish 4601
              } else { 
4602
                TProtocolUtil.skip(iprot, field.type);
4603
              }
4604
              break;
4605
            case PE:
4606
              if (field.type == TType.STRUCT) {
4607
                this.pe = new PaymentException();
4608
                this.pe.read(iprot);
4609
              } else { 
4610
                TProtocolUtil.skip(iprot, field.type);
4611
              }
4612
              break;
4613
          }
4614
          iprot.readFieldEnd();
4615
        }
4616
      }
4617
      iprot.readStructEnd();
4618
      validate();
4619
    }
4620
 
4621
    public void write(TProtocol oprot) throws TException {
4622
      oprot.writeStructBegin(STRUCT_DESC);
4623
 
4624
      if (this.isSetSuccess()) {
4625
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
695 rajveer 4626
        this.success.write(oprot);
420 ashish 4627
        oprot.writeFieldEnd();
4628
      } else if (this.isSetPe()) {
4629
        oprot.writeFieldBegin(PE_FIELD_DESC);
4630
        this.pe.write(oprot);
4631
        oprot.writeFieldEnd();
4632
      }
4633
      oprot.writeFieldStop();
4634
      oprot.writeStructEnd();
4635
    }
4636
 
4637
    @Override
4638
    public String toString() {
695 rajveer 4639
      StringBuilder sb = new StringBuilder("getPaymentGateway_result(");
420 ashish 4640
      boolean first = true;
4641
 
4642
      sb.append("success:");
4643
      if (this.success == null) {
4644
        sb.append("null");
4645
      } else {
4646
        sb.append(this.success);
4647
      }
4648
      first = false;
4649
      if (!first) sb.append(", ");
4650
      sb.append("pe:");
4651
      if (this.pe == null) {
4652
        sb.append("null");
4653
      } else {
4654
        sb.append(this.pe);
4655
      }
4656
      first = false;
4657
      sb.append(")");
4658
      return sb.toString();
4659
    }
4660
 
4661
    public void validate() throws TException {
4662
      // check for required fields
4663
    }
4664
 
4665
  }
4666
 
695 rajveer 4667
  public static class getPayment_args implements TBase<getPayment_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPayment_args>   {
4668
    private static final TStruct STRUCT_DESC = new TStruct("getPayment_args");
420 ashish 4669
 
4670
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
4671
 
4672
    private long id;
4673
 
4674
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4675
    public enum _Fields implements TFieldIdEnum {
4676
      ID((short)1, "id");
4677
 
4678
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4679
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4680
 
4681
      static {
4682
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4683
          byId.put((int)field._thriftId, field);
4684
          byName.put(field.getFieldName(), field);
4685
        }
4686
      }
4687
 
4688
      /**
4689
       * Find the _Fields constant that matches fieldId, or null if its not found.
4690
       */
4691
      public static _Fields findByThriftId(int fieldId) {
4692
        return byId.get(fieldId);
4693
      }
4694
 
4695
      /**
4696
       * Find the _Fields constant that matches fieldId, throwing an exception
4697
       * if it is not found.
4698
       */
4699
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4700
        _Fields fields = findByThriftId(fieldId);
4701
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4702
        return fields;
4703
      }
4704
 
4705
      /**
4706
       * Find the _Fields constant that matches name, or null if its not found.
4707
       */
4708
      public static _Fields findByName(String name) {
4709
        return byName.get(name);
4710
      }
4711
 
4712
      private final short _thriftId;
4713
      private final String _fieldName;
4714
 
4715
      _Fields(short thriftId, String fieldName) {
4716
        _thriftId = thriftId;
4717
        _fieldName = fieldName;
4718
      }
4719
 
4720
      public short getThriftFieldId() {
4721
        return _thriftId;
4722
      }
4723
 
4724
      public String getFieldName() {
4725
        return _fieldName;
4726
      }
4727
    }
4728
 
4729
    // isset id assignments
4730
    private static final int __ID_ISSET_ID = 0;
4731
    private BitSet __isset_bit_vector = new BitSet(1);
4732
 
4733
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4734
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
4735
          new FieldValueMetaData(TType.I64)));
4736
    }});
4737
 
4738
    static {
695 rajveer 4739
      FieldMetaData.addStructMetaDataMap(getPayment_args.class, metaDataMap);
420 ashish 4740
    }
4741
 
695 rajveer 4742
    public getPayment_args() {
420 ashish 4743
    }
4744
 
695 rajveer 4745
    public getPayment_args(
420 ashish 4746
      long id)
4747
    {
4748
      this();
4749
      this.id = id;
4750
      setIdIsSet(true);
4751
    }
4752
 
4753
    /**
4754
     * Performs a deep copy on <i>other</i>.
4755
     */
695 rajveer 4756
    public getPayment_args(getPayment_args other) {
420 ashish 4757
      __isset_bit_vector.clear();
4758
      __isset_bit_vector.or(other.__isset_bit_vector);
4759
      this.id = other.id;
4760
    }
4761
 
695 rajveer 4762
    public getPayment_args deepCopy() {
4763
      return new getPayment_args(this);
420 ashish 4764
    }
4765
 
4766
    @Deprecated
695 rajveer 4767
    public getPayment_args clone() {
4768
      return new getPayment_args(this);
420 ashish 4769
    }
4770
 
4771
    public long getId() {
4772
      return this.id;
4773
    }
4774
 
695 rajveer 4775
    public getPayment_args setId(long id) {
420 ashish 4776
      this.id = id;
4777
      setIdIsSet(true);
4778
      return this;
4779
    }
4780
 
4781
    public void unsetId() {
4782
      __isset_bit_vector.clear(__ID_ISSET_ID);
4783
    }
4784
 
4785
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
4786
    public boolean isSetId() {
4787
      return __isset_bit_vector.get(__ID_ISSET_ID);
4788
    }
4789
 
4790
    public void setIdIsSet(boolean value) {
4791
      __isset_bit_vector.set(__ID_ISSET_ID, value);
4792
    }
4793
 
4794
    public void setFieldValue(_Fields field, Object value) {
4795
      switch (field) {
4796
      case ID:
4797
        if (value == null) {
4798
          unsetId();
4799
        } else {
4800
          setId((Long)value);
4801
        }
4802
        break;
4803
 
4804
      }
4805
    }
4806
 
4807
    public void setFieldValue(int fieldID, Object value) {
4808
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4809
    }
4810
 
4811
    public Object getFieldValue(_Fields field) {
4812
      switch (field) {
4813
      case ID:
4814
        return new Long(getId());
4815
 
4816
      }
4817
      throw new IllegalStateException();
4818
    }
4819
 
4820
    public Object getFieldValue(int fieldId) {
4821
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4822
    }
4823
 
4824
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4825
    public boolean isSet(_Fields field) {
4826
      switch (field) {
4827
      case ID:
4828
        return isSetId();
4829
      }
4830
      throw new IllegalStateException();
4831
    }
4832
 
4833
    public boolean isSet(int fieldID) {
4834
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4835
    }
4836
 
4837
    @Override
4838
    public boolean equals(Object that) {
4839
      if (that == null)
4840
        return false;
695 rajveer 4841
      if (that instanceof getPayment_args)
4842
        return this.equals((getPayment_args)that);
420 ashish 4843
      return false;
4844
    }
4845
 
695 rajveer 4846
    public boolean equals(getPayment_args that) {
420 ashish 4847
      if (that == null)
4848
        return false;
4849
 
4850
      boolean this_present_id = true;
4851
      boolean that_present_id = true;
4852
      if (this_present_id || that_present_id) {
4853
        if (!(this_present_id && that_present_id))
4854
          return false;
4855
        if (this.id != that.id)
4856
          return false;
4857
      }
4858
 
4859
      return true;
4860
    }
4861
 
4862
    @Override
4863
    public int hashCode() {
4864
      return 0;
4865
    }
4866
 
695 rajveer 4867
    public int compareTo(getPayment_args other) {
420 ashish 4868
      if (!getClass().equals(other.getClass())) {
4869
        return getClass().getName().compareTo(other.getClass().getName());
4870
      }
4871
 
4872
      int lastComparison = 0;
695 rajveer 4873
      getPayment_args typedOther = (getPayment_args)other;
420 ashish 4874
 
4875
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
4876
      if (lastComparison != 0) {
4877
        return lastComparison;
4878
      }
4879
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
4880
      if (lastComparison != 0) {
4881
        return lastComparison;
4882
      }
4883
      return 0;
4884
    }
4885
 
4886
    public void read(TProtocol iprot) throws TException {
4887
      TField field;
4888
      iprot.readStructBegin();
4889
      while (true)
4890
      {
4891
        field = iprot.readFieldBegin();
4892
        if (field.type == TType.STOP) { 
4893
          break;
4894
        }
4895
        _Fields fieldId = _Fields.findByThriftId(field.id);
4896
        if (fieldId == null) {
4897
          TProtocolUtil.skip(iprot, field.type);
4898
        } else {
4899
          switch (fieldId) {
4900
            case ID:
4901
              if (field.type == TType.I64) {
4902
                this.id = iprot.readI64();
4903
                setIdIsSet(true);
4904
              } else { 
4905
                TProtocolUtil.skip(iprot, field.type);
4906
              }
4907
              break;
4908
          }
4909
          iprot.readFieldEnd();
4910
        }
4911
      }
4912
      iprot.readStructEnd();
4913
      validate();
4914
    }
4915
 
4916
    public void write(TProtocol oprot) throws TException {
4917
      validate();
4918
 
4919
      oprot.writeStructBegin(STRUCT_DESC);
4920
      oprot.writeFieldBegin(ID_FIELD_DESC);
4921
      oprot.writeI64(this.id);
4922
      oprot.writeFieldEnd();
4923
      oprot.writeFieldStop();
4924
      oprot.writeStructEnd();
4925
    }
4926
 
4927
    @Override
4928
    public String toString() {
695 rajveer 4929
      StringBuilder sb = new StringBuilder("getPayment_args(");
420 ashish 4930
      boolean first = true;
4931
 
4932
      sb.append("id:");
4933
      sb.append(this.id);
4934
      first = false;
4935
      sb.append(")");
4936
      return sb.toString();
4937
    }
4938
 
4939
    public void validate() throws TException {
4940
      // check for required fields
4941
    }
4942
 
4943
  }
4944
 
695 rajveer 4945
  public static class getPayment_result implements TBase<getPayment_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPayment_result>   {
4946
    private static final TStruct STRUCT_DESC = new TStruct("getPayment_result");
420 ashish 4947
 
4948
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
4949
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
4950
 
695 rajveer 4951
    private Payment success;
420 ashish 4952
    private PaymentException pe;
4953
 
4954
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4955
    public enum _Fields implements TFieldIdEnum {
4956
      SUCCESS((short)0, "success"),
4957
      PE((short)1, "pe");
4958
 
4959
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4960
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4961
 
4962
      static {
4963
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4964
          byId.put((int)field._thriftId, field);
4965
          byName.put(field.getFieldName(), field);
4966
        }
4967
      }
4968
 
4969
      /**
4970
       * Find the _Fields constant that matches fieldId, or null if its not found.
4971
       */
4972
      public static _Fields findByThriftId(int fieldId) {
4973
        return byId.get(fieldId);
4974
      }
4975
 
4976
      /**
4977
       * Find the _Fields constant that matches fieldId, throwing an exception
4978
       * if it is not found.
4979
       */
4980
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4981
        _Fields fields = findByThriftId(fieldId);
4982
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4983
        return fields;
4984
      }
4985
 
4986
      /**
4987
       * Find the _Fields constant that matches name, or null if its not found.
4988
       */
4989
      public static _Fields findByName(String name) {
4990
        return byName.get(name);
4991
      }
4992
 
4993
      private final short _thriftId;
4994
      private final String _fieldName;
4995
 
4996
      _Fields(short thriftId, String fieldName) {
4997
        _thriftId = thriftId;
4998
        _fieldName = fieldName;
4999
      }
5000
 
5001
      public short getThriftFieldId() {
5002
        return _thriftId;
5003
      }
5004
 
5005
      public String getFieldName() {
5006
        return _fieldName;
5007
      }
5008
    }
5009
 
5010
    // isset id assignments
5011
 
5012
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5013
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
695 rajveer 5014
          new StructMetaData(TType.STRUCT, Payment.class)));
420 ashish 5015
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
5016
          new FieldValueMetaData(TType.STRUCT)));
5017
    }});
5018
 
5019
    static {
695 rajveer 5020
      FieldMetaData.addStructMetaDataMap(getPayment_result.class, metaDataMap);
420 ashish 5021
    }
5022
 
695 rajveer 5023
    public getPayment_result() {
420 ashish 5024
    }
5025
 
695 rajveer 5026
    public getPayment_result(
5027
      Payment success,
420 ashish 5028
      PaymentException pe)
5029
    {
5030
      this();
5031
      this.success = success;
5032
      this.pe = pe;
5033
    }
5034
 
5035
    /**
5036
     * Performs a deep copy on <i>other</i>.
5037
     */
695 rajveer 5038
    public getPayment_result(getPayment_result other) {
420 ashish 5039
      if (other.isSetSuccess()) {
695 rajveer 5040
        this.success = new Payment(other.success);
420 ashish 5041
      }
5042
      if (other.isSetPe()) {
5043
        this.pe = new PaymentException(other.pe);
5044
      }
5045
    }
5046
 
695 rajveer 5047
    public getPayment_result deepCopy() {
5048
      return new getPayment_result(this);
420 ashish 5049
    }
5050
 
5051
    @Deprecated
695 rajveer 5052
    public getPayment_result clone() {
5053
      return new getPayment_result(this);
420 ashish 5054
    }
5055
 
695 rajveer 5056
    public Payment getSuccess() {
420 ashish 5057
      return this.success;
5058
    }
5059
 
695 rajveer 5060
    public getPayment_result setSuccess(Payment success) {
420 ashish 5061
      this.success = success;
5062
      return this;
5063
    }
5064
 
5065
    public void unsetSuccess() {
5066
      this.success = null;
5067
    }
5068
 
5069
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5070
    public boolean isSetSuccess() {
5071
      return this.success != null;
5072
    }
5073
 
5074
    public void setSuccessIsSet(boolean value) {
5075
      if (!value) {
5076
        this.success = null;
5077
      }
5078
    }
5079
 
5080
    public PaymentException getPe() {
5081
      return this.pe;
5082
    }
5083
 
695 rajveer 5084
    public getPayment_result setPe(PaymentException pe) {
420 ashish 5085
      this.pe = pe;
5086
      return this;
5087
    }
5088
 
5089
    public void unsetPe() {
5090
      this.pe = null;
5091
    }
5092
 
5093
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
5094
    public boolean isSetPe() {
5095
      return this.pe != null;
5096
    }
5097
 
5098
    public void setPeIsSet(boolean value) {
5099
      if (!value) {
5100
        this.pe = null;
5101
      }
5102
    }
5103
 
5104
    public void setFieldValue(_Fields field, Object value) {
5105
      switch (field) {
5106
      case SUCCESS:
5107
        if (value == null) {
5108
          unsetSuccess();
5109
        } else {
695 rajveer 5110
          setSuccess((Payment)value);
420 ashish 5111
        }
5112
        break;
5113
 
5114
      case PE:
5115
        if (value == null) {
5116
          unsetPe();
5117
        } else {
5118
          setPe((PaymentException)value);
5119
        }
5120
        break;
5121
 
5122
      }
5123
    }
5124
 
5125
    public void setFieldValue(int fieldID, Object value) {
5126
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5127
    }
5128
 
5129
    public Object getFieldValue(_Fields field) {
5130
      switch (field) {
5131
      case SUCCESS:
5132
        return getSuccess();
5133
 
5134
      case PE:
5135
        return getPe();
5136
 
5137
      }
5138
      throw new IllegalStateException();
5139
    }
5140
 
5141
    public Object getFieldValue(int fieldId) {
5142
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5143
    }
5144
 
5145
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5146
    public boolean isSet(_Fields field) {
5147
      switch (field) {
5148
      case SUCCESS:
5149
        return isSetSuccess();
5150
      case PE:
5151
        return isSetPe();
5152
      }
5153
      throw new IllegalStateException();
5154
    }
5155
 
5156
    public boolean isSet(int fieldID) {
5157
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5158
    }
5159
 
5160
    @Override
5161
    public boolean equals(Object that) {
5162
      if (that == null)
5163
        return false;
695 rajveer 5164
      if (that instanceof getPayment_result)
5165
        return this.equals((getPayment_result)that);
420 ashish 5166
      return false;
5167
    }
5168
 
695 rajveer 5169
    public boolean equals(getPayment_result that) {
420 ashish 5170
      if (that == null)
5171
        return false;
5172
 
5173
      boolean this_present_success = true && this.isSetSuccess();
5174
      boolean that_present_success = true && that.isSetSuccess();
5175
      if (this_present_success || that_present_success) {
5176
        if (!(this_present_success && that_present_success))
5177
          return false;
5178
        if (!this.success.equals(that.success))
5179
          return false;
5180
      }
5181
 
5182
      boolean this_present_pe = true && this.isSetPe();
5183
      boolean that_present_pe = true && that.isSetPe();
5184
      if (this_present_pe || that_present_pe) {
5185
        if (!(this_present_pe && that_present_pe))
5186
          return false;
5187
        if (!this.pe.equals(that.pe))
5188
          return false;
5189
      }
5190
 
5191
      return true;
5192
    }
5193
 
5194
    @Override
5195
    public int hashCode() {
5196
      return 0;
5197
    }
5198
 
695 rajveer 5199
    public int compareTo(getPayment_result other) {
420 ashish 5200
      if (!getClass().equals(other.getClass())) {
5201
        return getClass().getName().compareTo(other.getClass().getName());
5202
      }
5203
 
5204
      int lastComparison = 0;
695 rajveer 5205
      getPayment_result typedOther = (getPayment_result)other;
420 ashish 5206
 
695 rajveer 5207
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
420 ashish 5208
      if (lastComparison != 0) {
5209
        return lastComparison;
5210
      }
695 rajveer 5211
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
420 ashish 5212
      if (lastComparison != 0) {
5213
        return lastComparison;
5214
      }
695 rajveer 5215
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());
420 ashish 5216
      if (lastComparison != 0) {
5217
        return lastComparison;
5218
      }
695 rajveer 5219
      lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);
420 ashish 5220
      if (lastComparison != 0) {
5221
        return lastComparison;
5222
      }
5223
      return 0;
5224
    }
5225
 
5226
    public void read(TProtocol iprot) throws TException {
5227
      TField field;
5228
      iprot.readStructBegin();
5229
      while (true)
5230
      {
5231
        field = iprot.readFieldBegin();
5232
        if (field.type == TType.STOP) { 
5233
          break;
5234
        }
5235
        _Fields fieldId = _Fields.findByThriftId(field.id);
5236
        if (fieldId == null) {
5237
          TProtocolUtil.skip(iprot, field.type);
5238
        } else {
5239
          switch (fieldId) {
695 rajveer 5240
            case SUCCESS:
5241
              if (field.type == TType.STRUCT) {
5242
                this.success = new Payment();
5243
                this.success.read(iprot);
420 ashish 5244
              } else { 
5245
                TProtocolUtil.skip(iprot, field.type);
5246
              }
5247
              break;
5248
            case PE:
5249
              if (field.type == TType.STRUCT) {
5250
                this.pe = new PaymentException();
5251
                this.pe.read(iprot);
5252
              } else { 
5253
                TProtocolUtil.skip(iprot, field.type);
5254
              }
5255
              break;
5256
          }
5257
          iprot.readFieldEnd();
5258
        }
5259
      }
5260
      iprot.readStructEnd();
5261
      validate();
5262
    }
5263
 
5264
    public void write(TProtocol oprot) throws TException {
5265
      oprot.writeStructBegin(STRUCT_DESC);
5266
 
695 rajveer 5267
      if (this.isSetSuccess()) {
5268
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5269
        this.success.write(oprot);
5270
        oprot.writeFieldEnd();
5271
      } else if (this.isSetPe()) {
420 ashish 5272
        oprot.writeFieldBegin(PE_FIELD_DESC);
5273
        this.pe.write(oprot);
5274
        oprot.writeFieldEnd();
5275
      }
5276
      oprot.writeFieldStop();
5277
      oprot.writeStructEnd();
5278
    }
5279
 
5280
    @Override
5281
    public String toString() {
695 rajveer 5282
      StringBuilder sb = new StringBuilder("getPayment_result(");
420 ashish 5283
      boolean first = true;
5284
 
695 rajveer 5285
      sb.append("success:");
5286
      if (this.success == null) {
5287
        sb.append("null");
5288
      } else {
5289
        sb.append(this.success);
5290
      }
5291
      first = false;
5292
      if (!first) sb.append(", ");
420 ashish 5293
      sb.append("pe:");
5294
      if (this.pe == null) {
5295
        sb.append("null");
5296
      } else {
5297
        sb.append(this.pe);
5298
      }
5299
      first = false;
5300
      sb.append(")");
5301
      return sb.toString();
5302
    }
5303
 
5304
    public void validate() throws TException {
5305
      // check for required fields
5306
    }
5307
 
5308
  }
5309
 
695 rajveer 5310
  public static class getPaymentForTxnId_args implements TBase<getPaymentForTxnId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPaymentForTxnId_args>   {
5311
    private static final TStruct STRUCT_DESC = new TStruct("getPaymentForTxnId_args");
420 ashish 5312
 
695 rajveer 5313
    private static final TField TXN_ID_FIELD_DESC = new TField("txnId", TType.I64, (short)1);
420 ashish 5314
 
695 rajveer 5315
    private long txnId;
420 ashish 5316
 
5317
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5318
    public enum _Fields implements TFieldIdEnum {
695 rajveer 5319
      TXN_ID((short)1, "txnId");
420 ashish 5320
 
5321
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5322
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5323
 
5324
      static {
5325
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5326
          byId.put((int)field._thriftId, field);
5327
          byName.put(field.getFieldName(), field);
5328
        }
5329
      }
5330
 
5331
      /**
5332
       * Find the _Fields constant that matches fieldId, or null if its not found.
5333
       */
5334
      public static _Fields findByThriftId(int fieldId) {
5335
        return byId.get(fieldId);
5336
      }
5337
 
5338
      /**
5339
       * Find the _Fields constant that matches fieldId, throwing an exception
5340
       * if it is not found.
5341
       */
5342
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5343
        _Fields fields = findByThriftId(fieldId);
5344
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5345
        return fields;
5346
      }
5347
 
5348
      /**
5349
       * Find the _Fields constant that matches name, or null if its not found.
5350
       */
5351
      public static _Fields findByName(String name) {
5352
        return byName.get(name);
5353
      }
5354
 
5355
      private final short _thriftId;
5356
      private final String _fieldName;
5357
 
5358
      _Fields(short thriftId, String fieldName) {
5359
        _thriftId = thriftId;
5360
        _fieldName = fieldName;
5361
      }
5362
 
5363
      public short getThriftFieldId() {
5364
        return _thriftId;
5365
      }
5366
 
5367
      public String getFieldName() {
5368
        return _fieldName;
5369
      }
5370
    }
5371
 
5372
    // isset id assignments
695 rajveer 5373
    private static final int __TXNID_ISSET_ID = 0;
420 ashish 5374
    private BitSet __isset_bit_vector = new BitSet(1);
5375
 
5376
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
695 rajveer 5377
      put(_Fields.TXN_ID, new FieldMetaData("txnId", TFieldRequirementType.DEFAULT, 
420 ashish 5378
          new FieldValueMetaData(TType.I64)));
5379
    }});
5380
 
5381
    static {
695 rajveer 5382
      FieldMetaData.addStructMetaDataMap(getPaymentForTxnId_args.class, metaDataMap);
420 ashish 5383
    }
5384
 
695 rajveer 5385
    public getPaymentForTxnId_args() {
420 ashish 5386
    }
5387
 
695 rajveer 5388
    public getPaymentForTxnId_args(
5389
      long txnId)
420 ashish 5390
    {
5391
      this();
695 rajveer 5392
      this.txnId = txnId;
5393
      setTxnIdIsSet(true);
420 ashish 5394
    }
5395
 
5396
    /**
5397
     * Performs a deep copy on <i>other</i>.
5398
     */
695 rajveer 5399
    public getPaymentForTxnId_args(getPaymentForTxnId_args other) {
420 ashish 5400
      __isset_bit_vector.clear();
5401
      __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 5402
      this.txnId = other.txnId;
420 ashish 5403
    }
5404
 
695 rajveer 5405
    public getPaymentForTxnId_args deepCopy() {
5406
      return new getPaymentForTxnId_args(this);
420 ashish 5407
    }
5408
 
5409
    @Deprecated
695 rajveer 5410
    public getPaymentForTxnId_args clone() {
5411
      return new getPaymentForTxnId_args(this);
420 ashish 5412
    }
5413
 
695 rajveer 5414
    public long getTxnId() {
5415
      return this.txnId;
420 ashish 5416
    }
5417
 
695 rajveer 5418
    public getPaymentForTxnId_args setTxnId(long txnId) {
5419
      this.txnId = txnId;
5420
      setTxnIdIsSet(true);
420 ashish 5421
      return this;
5422
    }
5423
 
695 rajveer 5424
    public void unsetTxnId() {
5425
      __isset_bit_vector.clear(__TXNID_ISSET_ID);
420 ashish 5426
    }
5427
 
695 rajveer 5428
    /** Returns true if field txnId is set (has been asigned a value) and false otherwise */
5429
    public boolean isSetTxnId() {
5430
      return __isset_bit_vector.get(__TXNID_ISSET_ID);
420 ashish 5431
    }
5432
 
695 rajveer 5433
    public void setTxnIdIsSet(boolean value) {
5434
      __isset_bit_vector.set(__TXNID_ISSET_ID, value);
420 ashish 5435
    }
5436
 
5437
    public void setFieldValue(_Fields field, Object value) {
5438
      switch (field) {
695 rajveer 5439
      case TXN_ID:
420 ashish 5440
        if (value == null) {
695 rajveer 5441
          unsetTxnId();
420 ashish 5442
        } else {
695 rajveer 5443
          setTxnId((Long)value);
420 ashish 5444
        }
5445
        break;
5446
 
5447
      }
5448
    }
5449
 
5450
    public void setFieldValue(int fieldID, Object value) {
5451
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5452
    }
5453
 
5454
    public Object getFieldValue(_Fields field) {
5455
      switch (field) {
695 rajveer 5456
      case TXN_ID:
5457
        return new Long(getTxnId());
420 ashish 5458
 
5459
      }
5460
      throw new IllegalStateException();
5461
    }
5462
 
5463
    public Object getFieldValue(int fieldId) {
5464
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5465
    }
5466
 
5467
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5468
    public boolean isSet(_Fields field) {
5469
      switch (field) {
695 rajveer 5470
      case TXN_ID:
5471
        return isSetTxnId();
420 ashish 5472
      }
5473
      throw new IllegalStateException();
5474
    }
5475
 
5476
    public boolean isSet(int fieldID) {
5477
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5478
    }
5479
 
5480
    @Override
5481
    public boolean equals(Object that) {
5482
      if (that == null)
5483
        return false;
695 rajveer 5484
      if (that instanceof getPaymentForTxnId_args)
5485
        return this.equals((getPaymentForTxnId_args)that);
420 ashish 5486
      return false;
5487
    }
5488
 
695 rajveer 5489
    public boolean equals(getPaymentForTxnId_args that) {
420 ashish 5490
      if (that == null)
5491
        return false;
5492
 
695 rajveer 5493
      boolean this_present_txnId = true;
5494
      boolean that_present_txnId = true;
5495
      if (this_present_txnId || that_present_txnId) {
5496
        if (!(this_present_txnId && that_present_txnId))
420 ashish 5497
          return false;
695 rajveer 5498
        if (this.txnId != that.txnId)
420 ashish 5499
          return false;
5500
      }
5501
 
5502
      return true;
5503
    }
5504
 
5505
    @Override
5506
    public int hashCode() {
5507
      return 0;
5508
    }
5509
 
695 rajveer 5510
    public int compareTo(getPaymentForTxnId_args other) {
420 ashish 5511
      if (!getClass().equals(other.getClass())) {
5512
        return getClass().getName().compareTo(other.getClass().getName());
5513
      }
5514
 
5515
      int lastComparison = 0;
695 rajveer 5516
      getPaymentForTxnId_args typedOther = (getPaymentForTxnId_args)other;
420 ashish 5517
 
695 rajveer 5518
      lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(isSetTxnId());
420 ashish 5519
      if (lastComparison != 0) {
5520
        return lastComparison;
5521
      }
695 rajveer 5522
      lastComparison = TBaseHelper.compareTo(txnId, typedOther.txnId);
420 ashish 5523
      if (lastComparison != 0) {
5524
        return lastComparison;
5525
      }
5526
      return 0;
5527
    }
5528
 
5529
    public void read(TProtocol iprot) throws TException {
5530
      TField field;
5531
      iprot.readStructBegin();
5532
      while (true)
5533
      {
5534
        field = iprot.readFieldBegin();
5535
        if (field.type == TType.STOP) { 
5536
          break;
5537
        }
5538
        _Fields fieldId = _Fields.findByThriftId(field.id);
5539
        if (fieldId == null) {
5540
          TProtocolUtil.skip(iprot, field.type);
5541
        } else {
5542
          switch (fieldId) {
695 rajveer 5543
            case TXN_ID:
420 ashish 5544
              if (field.type == TType.I64) {
695 rajveer 5545
                this.txnId = iprot.readI64();
5546
                setTxnIdIsSet(true);
420 ashish 5547
              } else { 
5548
                TProtocolUtil.skip(iprot, field.type);
5549
              }
5550
              break;
5551
          }
5552
          iprot.readFieldEnd();
5553
        }
5554
      }
5555
      iprot.readStructEnd();
5556
      validate();
5557
    }
5558
 
5559
    public void write(TProtocol oprot) throws TException {
5560
      validate();
5561
 
5562
      oprot.writeStructBegin(STRUCT_DESC);
695 rajveer 5563
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
5564
      oprot.writeI64(this.txnId);
420 ashish 5565
      oprot.writeFieldEnd();
5566
      oprot.writeFieldStop();
5567
      oprot.writeStructEnd();
5568
    }
5569
 
5570
    @Override
5571
    public String toString() {
695 rajveer 5572
      StringBuilder sb = new StringBuilder("getPaymentForTxnId_args(");
420 ashish 5573
      boolean first = true;
5574
 
695 rajveer 5575
      sb.append("txnId:");
5576
      sb.append(this.txnId);
420 ashish 5577
      first = false;
5578
      sb.append(")");
5579
      return sb.toString();
5580
    }
5581
 
5582
    public void validate() throws TException {
5583
      // check for required fields
5584
    }
5585
 
5586
  }
5587
 
695 rajveer 5588
  public static class getPaymentForTxnId_result implements TBase<getPaymentForTxnId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPaymentForTxnId_result>   {
5589
    private static final TStruct STRUCT_DESC = new TStruct("getPaymentForTxnId_result");
420 ashish 5590
 
695 rajveer 5591
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
420 ashish 5592
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
5593
 
695 rajveer 5594
    private List<Payment> success;
420 ashish 5595
    private PaymentException pe;
5596
 
5597
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5598
    public enum _Fields implements TFieldIdEnum {
5599
      SUCCESS((short)0, "success"),
5600
      PE((short)1, "pe");
5601
 
5602
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5603
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5604
 
5605
      static {
5606
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5607
          byId.put((int)field._thriftId, field);
5608
          byName.put(field.getFieldName(), field);
5609
        }
5610
      }
5611
 
5612
      /**
5613
       * Find the _Fields constant that matches fieldId, or null if its not found.
5614
       */
5615
      public static _Fields findByThriftId(int fieldId) {
5616
        return byId.get(fieldId);
5617
      }
5618
 
5619
      /**
5620
       * Find the _Fields constant that matches fieldId, throwing an exception
5621
       * if it is not found.
5622
       */
5623
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5624
        _Fields fields = findByThriftId(fieldId);
5625
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5626
        return fields;
5627
      }
5628
 
5629
      /**
5630
       * Find the _Fields constant that matches name, or null if its not found.
5631
       */
5632
      public static _Fields findByName(String name) {
5633
        return byName.get(name);
5634
      }
5635
 
5636
      private final short _thriftId;
5637
      private final String _fieldName;
5638
 
5639
      _Fields(short thriftId, String fieldName) {
5640
        _thriftId = thriftId;
5641
        _fieldName = fieldName;
5642
      }
5643
 
5644
      public short getThriftFieldId() {
5645
        return _thriftId;
5646
      }
5647
 
5648
      public String getFieldName() {
5649
        return _fieldName;
5650
      }
5651
    }
5652
 
5653
    // isset id assignments
5654
 
5655
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5656
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
695 rajveer 5657
          new ListMetaData(TType.LIST, 
5658
              new StructMetaData(TType.STRUCT, Payment.class))));
420 ashish 5659
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
5660
          new FieldValueMetaData(TType.STRUCT)));
5661
    }});
5662
 
5663
    static {
695 rajveer 5664
      FieldMetaData.addStructMetaDataMap(getPaymentForTxnId_result.class, metaDataMap);
420 ashish 5665
    }
5666
 
695 rajveer 5667
    public getPaymentForTxnId_result() {
420 ashish 5668
    }
5669
 
695 rajveer 5670
    public getPaymentForTxnId_result(
5671
      List<Payment> success,
420 ashish 5672
      PaymentException pe)
5673
    {
5674
      this();
5675
      this.success = success;
5676
      this.pe = pe;
5677
    }
5678
 
5679
    /**
5680
     * Performs a deep copy on <i>other</i>.
5681
     */
695 rajveer 5682
    public getPaymentForTxnId_result(getPaymentForTxnId_result other) {
420 ashish 5683
      if (other.isSetSuccess()) {
695 rajveer 5684
        List<Payment> __this__success = new ArrayList<Payment>();
5685
        for (Payment other_element : other.success) {
5686
          __this__success.add(new Payment(other_element));
5687
        }
5688
        this.success = __this__success;
420 ashish 5689
      }
5690
      if (other.isSetPe()) {
5691
        this.pe = new PaymentException(other.pe);
5692
      }
5693
    }
5694
 
695 rajveer 5695
    public getPaymentForTxnId_result deepCopy() {
5696
      return new getPaymentForTxnId_result(this);
420 ashish 5697
    }
5698
 
5699
    @Deprecated
695 rajveer 5700
    public getPaymentForTxnId_result clone() {
5701
      return new getPaymentForTxnId_result(this);
420 ashish 5702
    }
5703
 
695 rajveer 5704
    public int getSuccessSize() {
5705
      return (this.success == null) ? 0 : this.success.size();
5706
    }
5707
 
5708
    public java.util.Iterator<Payment> getSuccessIterator() {
5709
      return (this.success == null) ? null : this.success.iterator();
5710
    }
5711
 
5712
    public void addToSuccess(Payment elem) {
5713
      if (this.success == null) {
5714
        this.success = new ArrayList<Payment>();
5715
      }
5716
      this.success.add(elem);
5717
    }
5718
 
5719
    public List<Payment> getSuccess() {
420 ashish 5720
      return this.success;
5721
    }
5722
 
695 rajveer 5723
    public getPaymentForTxnId_result setSuccess(List<Payment> success) {
420 ashish 5724
      this.success = success;
5725
      return this;
5726
    }
5727
 
5728
    public void unsetSuccess() {
5729
      this.success = null;
5730
    }
5731
 
5732
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5733
    public boolean isSetSuccess() {
5734
      return this.success != null;
5735
    }
5736
 
5737
    public void setSuccessIsSet(boolean value) {
5738
      if (!value) {
5739
        this.success = null;
5740
      }
5741
    }
5742
 
5743
    public PaymentException getPe() {
5744
      return this.pe;
5745
    }
5746
 
695 rajveer 5747
    public getPaymentForTxnId_result setPe(PaymentException pe) {
420 ashish 5748
      this.pe = pe;
5749
      return this;
5750
    }
5751
 
5752
    public void unsetPe() {
5753
      this.pe = null;
5754
    }
5755
 
5756
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
5757
    public boolean isSetPe() {
5758
      return this.pe != null;
5759
    }
5760
 
5761
    public void setPeIsSet(boolean value) {
5762
      if (!value) {
5763
        this.pe = null;
5764
      }
5765
    }
5766
 
5767
    public void setFieldValue(_Fields field, Object value) {
5768
      switch (field) {
5769
      case SUCCESS:
5770
        if (value == null) {
5771
          unsetSuccess();
5772
        } else {
695 rajveer 5773
          setSuccess((List<Payment>)value);
420 ashish 5774
        }
5775
        break;
5776
 
5777
      case PE:
5778
        if (value == null) {
5779
          unsetPe();
5780
        } else {
5781
          setPe((PaymentException)value);
5782
        }
5783
        break;
5784
 
5785
      }
5786
    }
5787
 
5788
    public void setFieldValue(int fieldID, Object value) {
5789
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5790
    }
5791
 
5792
    public Object getFieldValue(_Fields field) {
5793
      switch (field) {
5794
      case SUCCESS:
5795
        return getSuccess();
5796
 
5797
      case PE:
5798
        return getPe();
5799
 
5800
      }
5801
      throw new IllegalStateException();
5802
    }
5803
 
5804
    public Object getFieldValue(int fieldId) {
5805
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5806
    }
5807
 
5808
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5809
    public boolean isSet(_Fields field) {
5810
      switch (field) {
5811
      case SUCCESS:
5812
        return isSetSuccess();
5813
      case PE:
5814
        return isSetPe();
5815
      }
5816
      throw new IllegalStateException();
5817
    }
5818
 
5819
    public boolean isSet(int fieldID) {
5820
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5821
    }
5822
 
5823
    @Override
5824
    public boolean equals(Object that) {
5825
      if (that == null)
5826
        return false;
695 rajveer 5827
      if (that instanceof getPaymentForTxnId_result)
5828
        return this.equals((getPaymentForTxnId_result)that);
420 ashish 5829
      return false;
5830
    }
5831
 
695 rajveer 5832
    public boolean equals(getPaymentForTxnId_result that) {
420 ashish 5833
      if (that == null)
5834
        return false;
5835
 
5836
      boolean this_present_success = true && this.isSetSuccess();
5837
      boolean that_present_success = true && that.isSetSuccess();
5838
      if (this_present_success || that_present_success) {
5839
        if (!(this_present_success && that_present_success))
5840
          return false;
5841
        if (!this.success.equals(that.success))
5842
          return false;
5843
      }
5844
 
5845
      boolean this_present_pe = true && this.isSetPe();
5846
      boolean that_present_pe = true && that.isSetPe();
5847
      if (this_present_pe || that_present_pe) {
5848
        if (!(this_present_pe && that_present_pe))
5849
          return false;
5850
        if (!this.pe.equals(that.pe))
5851
          return false;
5852
      }
5853
 
5854
      return true;
5855
    }
5856
 
5857
    @Override
5858
    public int hashCode() {
5859
      return 0;
5860
    }
5861
 
695 rajveer 5862
    public int compareTo(getPaymentForTxnId_result other) {
5863
      if (!getClass().equals(other.getClass())) {
5864
        return getClass().getName().compareTo(other.getClass().getName());
5865
      }
5866
 
5867
      int lastComparison = 0;
5868
      getPaymentForTxnId_result typedOther = (getPaymentForTxnId_result)other;
5869
 
5870
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5871
      if (lastComparison != 0) {
5872
        return lastComparison;
5873
      }
5874
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5875
      if (lastComparison != 0) {
5876
        return lastComparison;
5877
      }
5878
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());
5879
      if (lastComparison != 0) {
5880
        return lastComparison;
5881
      }
5882
      lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);
5883
      if (lastComparison != 0) {
5884
        return lastComparison;
5885
      }
5886
      return 0;
5887
    }
5888
 
420 ashish 5889
    public void read(TProtocol iprot) throws TException {
5890
      TField field;
5891
      iprot.readStructBegin();
5892
      while (true)
5893
      {
5894
        field = iprot.readFieldBegin();
5895
        if (field.type == TType.STOP) { 
5896
          break;
5897
        }
5898
        _Fields fieldId = _Fields.findByThriftId(field.id);
5899
        if (fieldId == null) {
5900
          TProtocolUtil.skip(iprot, field.type);
5901
        } else {
5902
          switch (fieldId) {
5903
            case SUCCESS:
695 rajveer 5904
              if (field.type == TType.LIST) {
5905
                {
5906
                  TList _list16 = iprot.readListBegin();
5907
                  this.success = new ArrayList<Payment>(_list16.size);
5908
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
5909
                  {
5910
                    Payment _elem18;
5911
                    _elem18 = new Payment();
5912
                    _elem18.read(iprot);
5913
                    this.success.add(_elem18);
5914
                  }
5915
                  iprot.readListEnd();
5916
                }
420 ashish 5917
              } else { 
5918
                TProtocolUtil.skip(iprot, field.type);
5919
              }
5920
              break;
5921
            case PE:
5922
              if (field.type == TType.STRUCT) {
5923
                this.pe = new PaymentException();
5924
                this.pe.read(iprot);
5925
              } else { 
5926
                TProtocolUtil.skip(iprot, field.type);
5927
              }
5928
              break;
5929
          }
5930
          iprot.readFieldEnd();
5931
        }
5932
      }
5933
      iprot.readStructEnd();
5934
      validate();
5935
    }
5936
 
5937
    public void write(TProtocol oprot) throws TException {
5938
      oprot.writeStructBegin(STRUCT_DESC);
5939
 
5940
      if (this.isSetSuccess()) {
5941
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
695 rajveer 5942
        {
5943
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
5944
          for (Payment _iter19 : this.success)
5945
          {
5946
            _iter19.write(oprot);
5947
          }
5948
          oprot.writeListEnd();
5949
        }
420 ashish 5950
        oprot.writeFieldEnd();
5951
      } else if (this.isSetPe()) {
5952
        oprot.writeFieldBegin(PE_FIELD_DESC);
5953
        this.pe.write(oprot);
5954
        oprot.writeFieldEnd();
5955
      }
5956
      oprot.writeFieldStop();
5957
      oprot.writeStructEnd();
5958
    }
5959
 
5960
    @Override
5961
    public String toString() {
695 rajveer 5962
      StringBuilder sb = new StringBuilder("getPaymentForTxnId_result(");
420 ashish 5963
      boolean first = true;
5964
 
5965
      sb.append("success:");
5966
      if (this.success == null) {
5967
        sb.append("null");
5968
      } else {
5969
        sb.append(this.success);
5970
      }
5971
      first = false;
5972
      if (!first) sb.append(", ");
5973
      sb.append("pe:");
5974
      if (this.pe == null) {
5975
        sb.append("null");
5976
      } else {
5977
        sb.append(this.pe);
5978
      }
5979
      first = false;
5980
      sb.append(")");
5981
      return sb.toString();
5982
    }
5983
 
5984
    public void validate() throws TException {
5985
      // check for required fields
5986
    }
5987
 
5988
  }
5989
 
695 rajveer 5990
  public static class updatePaymentDetails_args implements TBase<updatePaymentDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePaymentDetails_args>   {
5991
    private static final TStruct STRUCT_DESC = new TStruct("updatePaymentDetails_args");
420 ashish 5992
 
5993
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
695 rajveer 5994
    private static final TField GATEWAY_PAYMENT_ID_FIELD_DESC = new TField("gatewayPaymentId", TType.STRING, (short)2);
5995
    private static final TField SESSION_ID_FIELD_DESC = new TField("sessionId", TType.STRING, (short)3);
5996
    private static final TField GATEWAY_TXN_STATUS_FIELD_DESC = new TField("gatewayTxnStatus", TType.STRING, (short)4);
5997
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)5);
5998
    private static final TField GATEWAY_TXN_ID_FIELD_DESC = new TField("gatewayTxnId", TType.STRING, (short)6);
5999
    private static final TField AUTH_CODE_FIELD_DESC = new TField("authCode", TType.STRING, (short)7);
6000
    private static final TField REFERENCE_CODE_FIELD_DESC = new TField("referenceCode", TType.STRING, (short)8);
6001
    private static final TField ERROR_CODE_FIELD_DESC = new TField("errorCode", TType.STRING, (short)9);
6002
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)10);
1119 rajveer 6003
    private static final TField GATEWAY_TXN_DATE_FIELD_DESC = new TField("gatewayTxnDate", TType.STRING, (short)11);
6004
    private static final TField ATTRIBUTES_FIELD_DESC = new TField("attributes", TType.LIST, (short)12);
420 ashish 6005
 
6006
    private long id;
695 rajveer 6007
    private String gatewayPaymentId;
6008
    private String sessionId;
6009
    private String gatewayTxnStatus;
6010
    private String description;
6011
    private String gatewayTxnId;
6012
    private String authCode;
6013
    private String referenceCode;
6014
    private String errorCode;
6015
    private PaymentStatus status;
1119 rajveer 6016
    private String gatewayTxnDate;
695 rajveer 6017
    private List<Attribute> attributes;
420 ashish 6018
 
6019
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6020
    public enum _Fields implements TFieldIdEnum {
6021
      ID((short)1, "id"),
695 rajveer 6022
      GATEWAY_PAYMENT_ID((short)2, "gatewayPaymentId"),
6023
      SESSION_ID((short)3, "sessionId"),
6024
      GATEWAY_TXN_STATUS((short)4, "gatewayTxnStatus"),
6025
      DESCRIPTION((short)5, "description"),
6026
      GATEWAY_TXN_ID((short)6, "gatewayTxnId"),
6027
      AUTH_CODE((short)7, "authCode"),
6028
      REFERENCE_CODE((short)8, "referenceCode"),
6029
      ERROR_CODE((short)9, "errorCode"),
6030
      /**
6031
       * 
6032
       * @see PaymentStatus
6033
       */
6034
      STATUS((short)10, "status"),
1119 rajveer 6035
      GATEWAY_TXN_DATE((short)11, "gatewayTxnDate"),
6036
      ATTRIBUTES((short)12, "attributes");
420 ashish 6037
 
6038
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6039
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6040
 
6041
      static {
6042
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6043
          byId.put((int)field._thriftId, field);
6044
          byName.put(field.getFieldName(), field);
6045
        }
6046
      }
6047
 
6048
      /**
6049
       * Find the _Fields constant that matches fieldId, or null if its not found.
6050
       */
6051
      public static _Fields findByThriftId(int fieldId) {
6052
        return byId.get(fieldId);
6053
      }
6054
 
6055
      /**
6056
       * Find the _Fields constant that matches fieldId, throwing an exception
6057
       * if it is not found.
6058
       */
6059
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6060
        _Fields fields = findByThriftId(fieldId);
6061
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6062
        return fields;
6063
      }
6064
 
6065
      /**
6066
       * Find the _Fields constant that matches name, or null if its not found.
6067
       */
6068
      public static _Fields findByName(String name) {
6069
        return byName.get(name);
6070
      }
6071
 
6072
      private final short _thriftId;
6073
      private final String _fieldName;
6074
 
6075
      _Fields(short thriftId, String fieldName) {
6076
        _thriftId = thriftId;
6077
        _fieldName = fieldName;
6078
      }
6079
 
6080
      public short getThriftFieldId() {
6081
        return _thriftId;
6082
      }
6083
 
6084
      public String getFieldName() {
6085
        return _fieldName;
6086
      }
6087
    }
6088
 
6089
    // isset id assignments
6090
    private static final int __ID_ISSET_ID = 0;
6091
    private BitSet __isset_bit_vector = new BitSet(1);
6092
 
6093
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6094
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
6095
          new FieldValueMetaData(TType.I64)));
695 rajveer 6096
      put(_Fields.GATEWAY_PAYMENT_ID, new FieldMetaData("gatewayPaymentId", TFieldRequirementType.DEFAULT, 
420 ashish 6097
          new FieldValueMetaData(TType.STRING)));
695 rajveer 6098
      put(_Fields.SESSION_ID, new FieldMetaData("sessionId", TFieldRequirementType.DEFAULT, 
420 ashish 6099
          new FieldValueMetaData(TType.STRING)));
695 rajveer 6100
      put(_Fields.GATEWAY_TXN_STATUS, new FieldMetaData("gatewayTxnStatus", TFieldRequirementType.DEFAULT, 
420 ashish 6101
          new FieldValueMetaData(TType.STRING)));
695 rajveer 6102
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
420 ashish 6103
          new FieldValueMetaData(TType.STRING)));
695 rajveer 6104
      put(_Fields.GATEWAY_TXN_ID, new FieldMetaData("gatewayTxnId", TFieldRequirementType.DEFAULT, 
420 ashish 6105
          new FieldValueMetaData(TType.STRING)));
695 rajveer 6106
      put(_Fields.AUTH_CODE, new FieldMetaData("authCode", TFieldRequirementType.DEFAULT, 
420 ashish 6107
          new FieldValueMetaData(TType.STRING)));
695 rajveer 6108
      put(_Fields.REFERENCE_CODE, new FieldMetaData("referenceCode", TFieldRequirementType.DEFAULT, 
420 ashish 6109
          new FieldValueMetaData(TType.STRING)));
695 rajveer 6110
      put(_Fields.ERROR_CODE, new FieldMetaData("errorCode", TFieldRequirementType.DEFAULT, 
6111
          new FieldValueMetaData(TType.STRING)));
6112
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6113
          new EnumMetaData(TType.ENUM, PaymentStatus.class)));
1119 rajveer 6114
      put(_Fields.GATEWAY_TXN_DATE, new FieldMetaData("gatewayTxnDate", TFieldRequirementType.DEFAULT, 
6115
          new FieldValueMetaData(TType.STRING)));
695 rajveer 6116
      put(_Fields.ATTRIBUTES, new FieldMetaData("attributes", TFieldRequirementType.DEFAULT, 
6117
          new ListMetaData(TType.LIST, 
6118
              new StructMetaData(TType.STRUCT, Attribute.class))));
420 ashish 6119
    }});
6120
 
6121
    static {
695 rajveer 6122
      FieldMetaData.addStructMetaDataMap(updatePaymentDetails_args.class, metaDataMap);
420 ashish 6123
    }
6124
 
695 rajveer 6125
    public updatePaymentDetails_args() {
420 ashish 6126
    }
6127
 
695 rajveer 6128
    public updatePaymentDetails_args(
420 ashish 6129
      long id,
695 rajveer 6130
      String gatewayPaymentId,
6131
      String sessionId,
6132
      String gatewayTxnStatus,
6133
      String description,
6134
      String gatewayTxnId,
6135
      String authCode,
6136
      String referenceCode,
6137
      String errorCode,
6138
      PaymentStatus status,
1119 rajveer 6139
      String gatewayTxnDate,
695 rajveer 6140
      List<Attribute> attributes)
420 ashish 6141
    {
6142
      this();
6143
      this.id = id;
6144
      setIdIsSet(true);
695 rajveer 6145
      this.gatewayPaymentId = gatewayPaymentId;
6146
      this.sessionId = sessionId;
6147
      this.gatewayTxnStatus = gatewayTxnStatus;
6148
      this.description = description;
6149
      this.gatewayTxnId = gatewayTxnId;
6150
      this.authCode = authCode;
6151
      this.referenceCode = referenceCode;
6152
      this.errorCode = errorCode;
6153
      this.status = status;
1119 rajveer 6154
      this.gatewayTxnDate = gatewayTxnDate;
695 rajveer 6155
      this.attributes = attributes;
420 ashish 6156
    }
6157
 
6158
    /**
6159
     * Performs a deep copy on <i>other</i>.
6160
     */
695 rajveer 6161
    public updatePaymentDetails_args(updatePaymentDetails_args other) {
420 ashish 6162
      __isset_bit_vector.clear();
6163
      __isset_bit_vector.or(other.__isset_bit_vector);
6164
      this.id = other.id;
695 rajveer 6165
      if (other.isSetGatewayPaymentId()) {
6166
        this.gatewayPaymentId = other.gatewayPaymentId;
420 ashish 6167
      }
695 rajveer 6168
      if (other.isSetSessionId()) {
6169
        this.sessionId = other.sessionId;
420 ashish 6170
      }
695 rajveer 6171
      if (other.isSetGatewayTxnStatus()) {
6172
        this.gatewayTxnStatus = other.gatewayTxnStatus;
420 ashish 6173
      }
695 rajveer 6174
      if (other.isSetDescription()) {
6175
        this.description = other.description;
420 ashish 6176
      }
695 rajveer 6177
      if (other.isSetGatewayTxnId()) {
6178
        this.gatewayTxnId = other.gatewayTxnId;
420 ashish 6179
      }
695 rajveer 6180
      if (other.isSetAuthCode()) {
6181
        this.authCode = other.authCode;
420 ashish 6182
      }
695 rajveer 6183
      if (other.isSetReferenceCode()) {
6184
        this.referenceCode = other.referenceCode;
420 ashish 6185
      }
695 rajveer 6186
      if (other.isSetErrorCode()) {
6187
        this.errorCode = other.errorCode;
6188
      }
6189
      if (other.isSetStatus()) {
6190
        this.status = other.status;
6191
      }
1119 rajveer 6192
      if (other.isSetGatewayTxnDate()) {
6193
        this.gatewayTxnDate = other.gatewayTxnDate;
6194
      }
695 rajveer 6195
      if (other.isSetAttributes()) {
6196
        List<Attribute> __this__attributes = new ArrayList<Attribute>();
6197
        for (Attribute other_element : other.attributes) {
6198
          __this__attributes.add(new Attribute(other_element));
6199
        }
6200
        this.attributes = __this__attributes;
6201
      }
420 ashish 6202
    }
6203
 
695 rajveer 6204
    public updatePaymentDetails_args deepCopy() {
6205
      return new updatePaymentDetails_args(this);
420 ashish 6206
    }
6207
 
6208
    @Deprecated
695 rajveer 6209
    public updatePaymentDetails_args clone() {
6210
      return new updatePaymentDetails_args(this);
420 ashish 6211
    }
6212
 
6213
    public long getId() {
6214
      return this.id;
6215
    }
6216
 
695 rajveer 6217
    public updatePaymentDetails_args setId(long id) {
420 ashish 6218
      this.id = id;
6219
      setIdIsSet(true);
6220
      return this;
6221
    }
6222
 
6223
    public void unsetId() {
6224
      __isset_bit_vector.clear(__ID_ISSET_ID);
6225
    }
6226
 
6227
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
6228
    public boolean isSetId() {
6229
      return __isset_bit_vector.get(__ID_ISSET_ID);
6230
    }
6231
 
6232
    public void setIdIsSet(boolean value) {
6233
      __isset_bit_vector.set(__ID_ISSET_ID, value);
6234
    }
6235
 
695 rajveer 6236
    public String getGatewayPaymentId() {
6237
      return this.gatewayPaymentId;
420 ashish 6238
    }
6239
 
695 rajveer 6240
    public updatePaymentDetails_args setGatewayPaymentId(String gatewayPaymentId) {
6241
      this.gatewayPaymentId = gatewayPaymentId;
420 ashish 6242
      return this;
6243
    }
6244
 
695 rajveer 6245
    public void unsetGatewayPaymentId() {
6246
      this.gatewayPaymentId = null;
420 ashish 6247
    }
6248
 
695 rajveer 6249
    /** Returns true if field gatewayPaymentId is set (has been asigned a value) and false otherwise */
6250
    public boolean isSetGatewayPaymentId() {
6251
      return this.gatewayPaymentId != null;
420 ashish 6252
    }
6253
 
695 rajveer 6254
    public void setGatewayPaymentIdIsSet(boolean value) {
420 ashish 6255
      if (!value) {
695 rajveer 6256
        this.gatewayPaymentId = null;
420 ashish 6257
      }
6258
    }
6259
 
695 rajveer 6260
    public String getSessionId() {
6261
      return this.sessionId;
420 ashish 6262
    }
6263
 
695 rajveer 6264
    public updatePaymentDetails_args setSessionId(String sessionId) {
6265
      this.sessionId = sessionId;
420 ashish 6266
      return this;
6267
    }
6268
 
695 rajveer 6269
    public void unsetSessionId() {
6270
      this.sessionId = null;
420 ashish 6271
    }
6272
 
695 rajveer 6273
    /** Returns true if field sessionId is set (has been asigned a value) and false otherwise */
6274
    public boolean isSetSessionId() {
6275
      return this.sessionId != null;
420 ashish 6276
    }
6277
 
695 rajveer 6278
    public void setSessionIdIsSet(boolean value) {
420 ashish 6279
      if (!value) {
695 rajveer 6280
        this.sessionId = null;
420 ashish 6281
      }
6282
    }
6283
 
695 rajveer 6284
    public String getGatewayTxnStatus() {
6285
      return this.gatewayTxnStatus;
420 ashish 6286
    }
6287
 
695 rajveer 6288
    public updatePaymentDetails_args setGatewayTxnStatus(String gatewayTxnStatus) {
6289
      this.gatewayTxnStatus = gatewayTxnStatus;
420 ashish 6290
      return this;
6291
    }
6292
 
695 rajveer 6293
    public void unsetGatewayTxnStatus() {
6294
      this.gatewayTxnStatus = null;
420 ashish 6295
    }
6296
 
695 rajveer 6297
    /** Returns true if field gatewayTxnStatus is set (has been asigned a value) and false otherwise */
6298
    public boolean isSetGatewayTxnStatus() {
6299
      return this.gatewayTxnStatus != null;
420 ashish 6300
    }
6301
 
695 rajveer 6302
    public void setGatewayTxnStatusIsSet(boolean value) {
420 ashish 6303
      if (!value) {
695 rajveer 6304
        this.gatewayTxnStatus = null;
420 ashish 6305
      }
6306
    }
6307
 
695 rajveer 6308
    public String getDescription() {
6309
      return this.description;
420 ashish 6310
    }
6311
 
695 rajveer 6312
    public updatePaymentDetails_args setDescription(String description) {
6313
      this.description = description;
420 ashish 6314
      return this;
6315
    }
6316
 
695 rajveer 6317
    public void unsetDescription() {
6318
      this.description = null;
420 ashish 6319
    }
6320
 
695 rajveer 6321
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
6322
    public boolean isSetDescription() {
6323
      return this.description != null;
420 ashish 6324
    }
6325
 
695 rajveer 6326
    public void setDescriptionIsSet(boolean value) {
420 ashish 6327
      if (!value) {
695 rajveer 6328
        this.description = null;
420 ashish 6329
      }
6330
    }
6331
 
695 rajveer 6332
    public String getGatewayTxnId() {
6333
      return this.gatewayTxnId;
420 ashish 6334
    }
6335
 
695 rajveer 6336
    public updatePaymentDetails_args setGatewayTxnId(String gatewayTxnId) {
6337
      this.gatewayTxnId = gatewayTxnId;
420 ashish 6338
      return this;
6339
    }
6340
 
695 rajveer 6341
    public void unsetGatewayTxnId() {
6342
      this.gatewayTxnId = null;
420 ashish 6343
    }
6344
 
695 rajveer 6345
    /** Returns true if field gatewayTxnId is set (has been asigned a value) and false otherwise */
6346
    public boolean isSetGatewayTxnId() {
6347
      return this.gatewayTxnId != null;
420 ashish 6348
    }
6349
 
695 rajveer 6350
    public void setGatewayTxnIdIsSet(boolean value) {
420 ashish 6351
      if (!value) {
695 rajveer 6352
        this.gatewayTxnId = null;
420 ashish 6353
      }
6354
    }
6355
 
695 rajveer 6356
    public String getAuthCode() {
6357
      return this.authCode;
420 ashish 6358
    }
6359
 
695 rajveer 6360
    public updatePaymentDetails_args setAuthCode(String authCode) {
6361
      this.authCode = authCode;
420 ashish 6362
      return this;
6363
    }
6364
 
695 rajveer 6365
    public void unsetAuthCode() {
6366
      this.authCode = null;
420 ashish 6367
    }
6368
 
695 rajveer 6369
    /** Returns true if field authCode is set (has been asigned a value) and false otherwise */
6370
    public boolean isSetAuthCode() {
6371
      return this.authCode != null;
420 ashish 6372
    }
6373
 
695 rajveer 6374
    public void setAuthCodeIsSet(boolean value) {
420 ashish 6375
      if (!value) {
695 rajveer 6376
        this.authCode = null;
420 ashish 6377
      }
6378
    }
6379
 
695 rajveer 6380
    public String getReferenceCode() {
6381
      return this.referenceCode;
420 ashish 6382
    }
6383
 
695 rajveer 6384
    public updatePaymentDetails_args setReferenceCode(String referenceCode) {
6385
      this.referenceCode = referenceCode;
420 ashish 6386
      return this;
6387
    }
6388
 
695 rajveer 6389
    public void unsetReferenceCode() {
6390
      this.referenceCode = null;
420 ashish 6391
    }
6392
 
695 rajveer 6393
    /** Returns true if field referenceCode is set (has been asigned a value) and false otherwise */
6394
    public boolean isSetReferenceCode() {
6395
      return this.referenceCode != null;
420 ashish 6396
    }
6397
 
695 rajveer 6398
    public void setReferenceCodeIsSet(boolean value) {
420 ashish 6399
      if (!value) {
695 rajveer 6400
        this.referenceCode = null;
420 ashish 6401
      }
6402
    }
6403
 
695 rajveer 6404
    public String getErrorCode() {
6405
      return this.errorCode;
6406
    }
6407
 
6408
    public updatePaymentDetails_args setErrorCode(String errorCode) {
6409
      this.errorCode = errorCode;
6410
      return this;
6411
    }
6412
 
6413
    public void unsetErrorCode() {
6414
      this.errorCode = null;
6415
    }
6416
 
6417
    /** Returns true if field errorCode is set (has been asigned a value) and false otherwise */
6418
    public boolean isSetErrorCode() {
6419
      return this.errorCode != null;
6420
    }
6421
 
6422
    public void setErrorCodeIsSet(boolean value) {
6423
      if (!value) {
6424
        this.errorCode = null;
6425
      }
6426
    }
6427
 
6428
    /**
6429
     * 
6430
     * @see PaymentStatus
6431
     */
6432
    public PaymentStatus getStatus() {
6433
      return this.status;
6434
    }
6435
 
6436
    /**
6437
     * 
6438
     * @see PaymentStatus
6439
     */
6440
    public updatePaymentDetails_args setStatus(PaymentStatus status) {
6441
      this.status = status;
6442
      return this;
6443
    }
6444
 
6445
    public void unsetStatus() {
6446
      this.status = null;
6447
    }
6448
 
6449
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6450
    public boolean isSetStatus() {
6451
      return this.status != null;
6452
    }
6453
 
6454
    public void setStatusIsSet(boolean value) {
6455
      if (!value) {
6456
        this.status = null;
6457
      }
6458
    }
6459
 
1119 rajveer 6460
    public String getGatewayTxnDate() {
6461
      return this.gatewayTxnDate;
6462
    }
6463
 
6464
    public updatePaymentDetails_args setGatewayTxnDate(String gatewayTxnDate) {
6465
      this.gatewayTxnDate = gatewayTxnDate;
6466
      return this;
6467
    }
6468
 
6469
    public void unsetGatewayTxnDate() {
6470
      this.gatewayTxnDate = null;
6471
    }
6472
 
6473
    /** Returns true if field gatewayTxnDate is set (has been asigned a value) and false otherwise */
6474
    public boolean isSetGatewayTxnDate() {
6475
      return this.gatewayTxnDate != null;
6476
    }
6477
 
6478
    public void setGatewayTxnDateIsSet(boolean value) {
6479
      if (!value) {
6480
        this.gatewayTxnDate = null;
6481
      }
6482
    }
6483
 
695 rajveer 6484
    public int getAttributesSize() {
6485
      return (this.attributes == null) ? 0 : this.attributes.size();
6486
    }
6487
 
6488
    public java.util.Iterator<Attribute> getAttributesIterator() {
6489
      return (this.attributes == null) ? null : this.attributes.iterator();
6490
    }
6491
 
6492
    public void addToAttributes(Attribute elem) {
6493
      if (this.attributes == null) {
6494
        this.attributes = new ArrayList<Attribute>();
6495
      }
6496
      this.attributes.add(elem);
6497
    }
6498
 
6499
    public List<Attribute> getAttributes() {
6500
      return this.attributes;
6501
    }
6502
 
6503
    public updatePaymentDetails_args setAttributes(List<Attribute> attributes) {
6504
      this.attributes = attributes;
6505
      return this;
6506
    }
6507
 
6508
    public void unsetAttributes() {
6509
      this.attributes = null;
6510
    }
6511
 
6512
    /** Returns true if field attributes is set (has been asigned a value) and false otherwise */
6513
    public boolean isSetAttributes() {
6514
      return this.attributes != null;
6515
    }
6516
 
6517
    public void setAttributesIsSet(boolean value) {
6518
      if (!value) {
6519
        this.attributes = null;
6520
      }
6521
    }
6522
 
420 ashish 6523
    public void setFieldValue(_Fields field, Object value) {
6524
      switch (field) {
6525
      case ID:
6526
        if (value == null) {
6527
          unsetId();
6528
        } else {
6529
          setId((Long)value);
6530
        }
6531
        break;
6532
 
695 rajveer 6533
      case GATEWAY_PAYMENT_ID:
420 ashish 6534
        if (value == null) {
695 rajveer 6535
          unsetGatewayPaymentId();
420 ashish 6536
        } else {
695 rajveer 6537
          setGatewayPaymentId((String)value);
420 ashish 6538
        }
6539
        break;
6540
 
695 rajveer 6541
      case SESSION_ID:
420 ashish 6542
        if (value == null) {
695 rajveer 6543
          unsetSessionId();
420 ashish 6544
        } else {
695 rajveer 6545
          setSessionId((String)value);
420 ashish 6546
        }
6547
        break;
6548
 
695 rajveer 6549
      case GATEWAY_TXN_STATUS:
420 ashish 6550
        if (value == null) {
695 rajveer 6551
          unsetGatewayTxnStatus();
420 ashish 6552
        } else {
695 rajveer 6553
          setGatewayTxnStatus((String)value);
420 ashish 6554
        }
6555
        break;
6556
 
695 rajveer 6557
      case DESCRIPTION:
420 ashish 6558
        if (value == null) {
695 rajveer 6559
          unsetDescription();
420 ashish 6560
        } else {
695 rajveer 6561
          setDescription((String)value);
420 ashish 6562
        }
6563
        break;
6564
 
695 rajveer 6565
      case GATEWAY_TXN_ID:
420 ashish 6566
        if (value == null) {
695 rajveer 6567
          unsetGatewayTxnId();
420 ashish 6568
        } else {
695 rajveer 6569
          setGatewayTxnId((String)value);
420 ashish 6570
        }
6571
        break;
6572
 
6573
      case AUTH_CODE:
6574
        if (value == null) {
695 rajveer 6575
          unsetAuthCode();
420 ashish 6576
        } else {
695 rajveer 6577
          setAuthCode((String)value);
420 ashish 6578
        }
6579
        break;
6580
 
695 rajveer 6581
      case REFERENCE_CODE:
420 ashish 6582
        if (value == null) {
695 rajveer 6583
          unsetReferenceCode();
420 ashish 6584
        } else {
695 rajveer 6585
          setReferenceCode((String)value);
420 ashish 6586
        }
6587
        break;
6588
 
695 rajveer 6589
      case ERROR_CODE:
6590
        if (value == null) {
6591
          unsetErrorCode();
6592
        } else {
6593
          setErrorCode((String)value);
6594
        }
6595
        break;
6596
 
6597
      case STATUS:
6598
        if (value == null) {
6599
          unsetStatus();
6600
        } else {
6601
          setStatus((PaymentStatus)value);
6602
        }
6603
        break;
6604
 
1119 rajveer 6605
      case GATEWAY_TXN_DATE:
6606
        if (value == null) {
6607
          unsetGatewayTxnDate();
6608
        } else {
6609
          setGatewayTxnDate((String)value);
6610
        }
6611
        break;
6612
 
695 rajveer 6613
      case ATTRIBUTES:
6614
        if (value == null) {
6615
          unsetAttributes();
6616
        } else {
6617
          setAttributes((List<Attribute>)value);
6618
        }
6619
        break;
6620
 
420 ashish 6621
      }
6622
    }
6623
 
6624
    public void setFieldValue(int fieldID, Object value) {
6625
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6626
    }
6627
 
6628
    public Object getFieldValue(_Fields field) {
6629
      switch (field) {
6630
      case ID:
6631
        return new Long(getId());
6632
 
695 rajveer 6633
      case GATEWAY_PAYMENT_ID:
6634
        return getGatewayPaymentId();
420 ashish 6635
 
695 rajveer 6636
      case SESSION_ID:
6637
        return getSessionId();
420 ashish 6638
 
695 rajveer 6639
      case GATEWAY_TXN_STATUS:
6640
        return getGatewayTxnStatus();
420 ashish 6641
 
695 rajveer 6642
      case DESCRIPTION:
6643
        return getDescription();
420 ashish 6644
 
695 rajveer 6645
      case GATEWAY_TXN_ID:
6646
        return getGatewayTxnId();
420 ashish 6647
 
6648
      case AUTH_CODE:
695 rajveer 6649
        return getAuthCode();
420 ashish 6650
 
695 rajveer 6651
      case REFERENCE_CODE:
6652
        return getReferenceCode();
420 ashish 6653
 
695 rajveer 6654
      case ERROR_CODE:
6655
        return getErrorCode();
6656
 
6657
      case STATUS:
6658
        return getStatus();
6659
 
1119 rajveer 6660
      case GATEWAY_TXN_DATE:
6661
        return getGatewayTxnDate();
6662
 
695 rajveer 6663
      case ATTRIBUTES:
6664
        return getAttributes();
6665
 
420 ashish 6666
      }
6667
      throw new IllegalStateException();
6668
    }
6669
 
6670
    public Object getFieldValue(int fieldId) {
6671
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6672
    }
6673
 
6674
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6675
    public boolean isSet(_Fields field) {
6676
      switch (field) {
6677
      case ID:
6678
        return isSetId();
695 rajveer 6679
      case GATEWAY_PAYMENT_ID:
6680
        return isSetGatewayPaymentId();
420 ashish 6681
      case SESSION_ID:
695 rajveer 6682
        return isSetSessionId();
6683
      case GATEWAY_TXN_STATUS:
6684
        return isSetGatewayTxnStatus();
6685
      case DESCRIPTION:
6686
        return isSetDescription();
6687
      case GATEWAY_TXN_ID:
6688
        return isSetGatewayTxnId();
420 ashish 6689
      case AUTH_CODE:
695 rajveer 6690
        return isSetAuthCode();
6691
      case REFERENCE_CODE:
6692
        return isSetReferenceCode();
6693
      case ERROR_CODE:
6694
        return isSetErrorCode();
6695
      case STATUS:
6696
        return isSetStatus();
1119 rajveer 6697
      case GATEWAY_TXN_DATE:
6698
        return isSetGatewayTxnDate();
695 rajveer 6699
      case ATTRIBUTES:
6700
        return isSetAttributes();
420 ashish 6701
      }
6702
      throw new IllegalStateException();
6703
    }
6704
 
6705
    public boolean isSet(int fieldID) {
6706
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6707
    }
6708
 
6709
    @Override
6710
    public boolean equals(Object that) {
6711
      if (that == null)
6712
        return false;
695 rajveer 6713
      if (that instanceof updatePaymentDetails_args)
6714
        return this.equals((updatePaymentDetails_args)that);
420 ashish 6715
      return false;
6716
    }
6717
 
695 rajveer 6718
    public boolean equals(updatePaymentDetails_args that) {
420 ashish 6719
      if (that == null)
6720
        return false;
6721
 
6722
      boolean this_present_id = true;
6723
      boolean that_present_id = true;
6724
      if (this_present_id || that_present_id) {
6725
        if (!(this_present_id && that_present_id))
6726
          return false;
6727
        if (this.id != that.id)
6728
          return false;
6729
      }
6730
 
695 rajveer 6731
      boolean this_present_gatewayPaymentId = true && this.isSetGatewayPaymentId();
6732
      boolean that_present_gatewayPaymentId = true && that.isSetGatewayPaymentId();
6733
      if (this_present_gatewayPaymentId || that_present_gatewayPaymentId) {
6734
        if (!(this_present_gatewayPaymentId && that_present_gatewayPaymentId))
420 ashish 6735
          return false;
695 rajveer 6736
        if (!this.gatewayPaymentId.equals(that.gatewayPaymentId))
420 ashish 6737
          return false;
6738
      }
6739
 
695 rajveer 6740
      boolean this_present_sessionId = true && this.isSetSessionId();
6741
      boolean that_present_sessionId = true && that.isSetSessionId();
6742
      if (this_present_sessionId || that_present_sessionId) {
6743
        if (!(this_present_sessionId && that_present_sessionId))
420 ashish 6744
          return false;
695 rajveer 6745
        if (!this.sessionId.equals(that.sessionId))
420 ashish 6746
          return false;
6747
      }
6748
 
695 rajveer 6749
      boolean this_present_gatewayTxnStatus = true && this.isSetGatewayTxnStatus();
6750
      boolean that_present_gatewayTxnStatus = true && that.isSetGatewayTxnStatus();
6751
      if (this_present_gatewayTxnStatus || that_present_gatewayTxnStatus) {
6752
        if (!(this_present_gatewayTxnStatus && that_present_gatewayTxnStatus))
420 ashish 6753
          return false;
695 rajveer 6754
        if (!this.gatewayTxnStatus.equals(that.gatewayTxnStatus))
420 ashish 6755
          return false;
6756
      }
6757
 
695 rajveer 6758
      boolean this_present_description = true && this.isSetDescription();
6759
      boolean that_present_description = true && that.isSetDescription();
6760
      if (this_present_description || that_present_description) {
6761
        if (!(this_present_description && that_present_description))
420 ashish 6762
          return false;
695 rajveer 6763
        if (!this.description.equals(that.description))
420 ashish 6764
          return false;
6765
      }
6766
 
695 rajveer 6767
      boolean this_present_gatewayTxnId = true && this.isSetGatewayTxnId();
6768
      boolean that_present_gatewayTxnId = true && that.isSetGatewayTxnId();
6769
      if (this_present_gatewayTxnId || that_present_gatewayTxnId) {
6770
        if (!(this_present_gatewayTxnId && that_present_gatewayTxnId))
420 ashish 6771
          return false;
695 rajveer 6772
        if (!this.gatewayTxnId.equals(that.gatewayTxnId))
420 ashish 6773
          return false;
6774
      }
6775
 
695 rajveer 6776
      boolean this_present_authCode = true && this.isSetAuthCode();
6777
      boolean that_present_authCode = true && that.isSetAuthCode();
6778
      if (this_present_authCode || that_present_authCode) {
6779
        if (!(this_present_authCode && that_present_authCode))
420 ashish 6780
          return false;
695 rajveer 6781
        if (!this.authCode.equals(that.authCode))
420 ashish 6782
          return false;
6783
      }
6784
 
695 rajveer 6785
      boolean this_present_referenceCode = true && this.isSetReferenceCode();
6786
      boolean that_present_referenceCode = true && that.isSetReferenceCode();
6787
      if (this_present_referenceCode || that_present_referenceCode) {
6788
        if (!(this_present_referenceCode && that_present_referenceCode))
420 ashish 6789
          return false;
695 rajveer 6790
        if (!this.referenceCode.equals(that.referenceCode))
420 ashish 6791
          return false;
6792
      }
6793
 
695 rajveer 6794
      boolean this_present_errorCode = true && this.isSetErrorCode();
6795
      boolean that_present_errorCode = true && that.isSetErrorCode();
6796
      if (this_present_errorCode || that_present_errorCode) {
6797
        if (!(this_present_errorCode && that_present_errorCode))
6798
          return false;
6799
        if (!this.errorCode.equals(that.errorCode))
6800
          return false;
6801
      }
6802
 
6803
      boolean this_present_status = true && this.isSetStatus();
6804
      boolean that_present_status = true && that.isSetStatus();
6805
      if (this_present_status || that_present_status) {
6806
        if (!(this_present_status && that_present_status))
6807
          return false;
6808
        if (!this.status.equals(that.status))
6809
          return false;
6810
      }
6811
 
1119 rajveer 6812
      boolean this_present_gatewayTxnDate = true && this.isSetGatewayTxnDate();
6813
      boolean that_present_gatewayTxnDate = true && that.isSetGatewayTxnDate();
6814
      if (this_present_gatewayTxnDate || that_present_gatewayTxnDate) {
6815
        if (!(this_present_gatewayTxnDate && that_present_gatewayTxnDate))
6816
          return false;
6817
        if (!this.gatewayTxnDate.equals(that.gatewayTxnDate))
6818
          return false;
6819
      }
6820
 
695 rajveer 6821
      boolean this_present_attributes = true && this.isSetAttributes();
6822
      boolean that_present_attributes = true && that.isSetAttributes();
6823
      if (this_present_attributes || that_present_attributes) {
6824
        if (!(this_present_attributes && that_present_attributes))
6825
          return false;
6826
        if (!this.attributes.equals(that.attributes))
6827
          return false;
6828
      }
6829
 
420 ashish 6830
      return true;
6831
    }
6832
 
6833
    @Override
6834
    public int hashCode() {
6835
      return 0;
6836
    }
6837
 
695 rajveer 6838
    public int compareTo(updatePaymentDetails_args other) {
420 ashish 6839
      if (!getClass().equals(other.getClass())) {
6840
        return getClass().getName().compareTo(other.getClass().getName());
6841
      }
6842
 
6843
      int lastComparison = 0;
695 rajveer 6844
      updatePaymentDetails_args typedOther = (updatePaymentDetails_args)other;
420 ashish 6845
 
6846
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
6847
      if (lastComparison != 0) {
6848
        return lastComparison;
6849
      }
6850
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
6851
      if (lastComparison != 0) {
6852
        return lastComparison;
6853
      }
695 rajveer 6854
      lastComparison = Boolean.valueOf(isSetGatewayPaymentId()).compareTo(isSetGatewayPaymentId());
420 ashish 6855
      if (lastComparison != 0) {
6856
        return lastComparison;
6857
      }
695 rajveer 6858
      lastComparison = TBaseHelper.compareTo(gatewayPaymentId, typedOther.gatewayPaymentId);
420 ashish 6859
      if (lastComparison != 0) {
6860
        return lastComparison;
6861
      }
695 rajveer 6862
      lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(isSetSessionId());
420 ashish 6863
      if (lastComparison != 0) {
6864
        return lastComparison;
6865
      }
695 rajveer 6866
      lastComparison = TBaseHelper.compareTo(sessionId, typedOther.sessionId);
420 ashish 6867
      if (lastComparison != 0) {
6868
        return lastComparison;
6869
      }
695 rajveer 6870
      lastComparison = Boolean.valueOf(isSetGatewayTxnStatus()).compareTo(isSetGatewayTxnStatus());
420 ashish 6871
      if (lastComparison != 0) {
6872
        return lastComparison;
6873
      }
695 rajveer 6874
      lastComparison = TBaseHelper.compareTo(gatewayTxnStatus, typedOther.gatewayTxnStatus);
420 ashish 6875
      if (lastComparison != 0) {
6876
        return lastComparison;
6877
      }
695 rajveer 6878
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
420 ashish 6879
      if (lastComparison != 0) {
6880
        return lastComparison;
6881
      }
695 rajveer 6882
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
420 ashish 6883
      if (lastComparison != 0) {
6884
        return lastComparison;
6885
      }
695 rajveer 6886
      lastComparison = Boolean.valueOf(isSetGatewayTxnId()).compareTo(isSetGatewayTxnId());
420 ashish 6887
      if (lastComparison != 0) {
6888
        return lastComparison;
6889
      }
695 rajveer 6890
      lastComparison = TBaseHelper.compareTo(gatewayTxnId, typedOther.gatewayTxnId);
420 ashish 6891
      if (lastComparison != 0) {
6892
        return lastComparison;
6893
      }
695 rajveer 6894
      lastComparison = Boolean.valueOf(isSetAuthCode()).compareTo(isSetAuthCode());
420 ashish 6895
      if (lastComparison != 0) {
6896
        return lastComparison;
6897
      }
695 rajveer 6898
      lastComparison = TBaseHelper.compareTo(authCode, typedOther.authCode);
420 ashish 6899
      if (lastComparison != 0) {
6900
        return lastComparison;
6901
      }
695 rajveer 6902
      lastComparison = Boolean.valueOf(isSetReferenceCode()).compareTo(isSetReferenceCode());
420 ashish 6903
      if (lastComparison != 0) {
6904
        return lastComparison;
6905
      }
695 rajveer 6906
      lastComparison = TBaseHelper.compareTo(referenceCode, typedOther.referenceCode);
420 ashish 6907
      if (lastComparison != 0) {
6908
        return lastComparison;
6909
      }
695 rajveer 6910
      lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(isSetErrorCode());
6911
      if (lastComparison != 0) {
6912
        return lastComparison;
6913
      }
6914
      lastComparison = TBaseHelper.compareTo(errorCode, typedOther.errorCode);
6915
      if (lastComparison != 0) {
6916
        return lastComparison;
6917
      }
6918
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
6919
      if (lastComparison != 0) {
6920
        return lastComparison;
6921
      }
6922
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
6923
      if (lastComparison != 0) {
6924
        return lastComparison;
6925
      }
1119 rajveer 6926
      lastComparison = Boolean.valueOf(isSetGatewayTxnDate()).compareTo(isSetGatewayTxnDate());
6927
      if (lastComparison != 0) {
6928
        return lastComparison;
6929
      }
6930
      lastComparison = TBaseHelper.compareTo(gatewayTxnDate, typedOther.gatewayTxnDate);
6931
      if (lastComparison != 0) {
6932
        return lastComparison;
6933
      }
695 rajveer 6934
      lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(isSetAttributes());
6935
      if (lastComparison != 0) {
6936
        return lastComparison;
6937
      }
6938
      lastComparison = TBaseHelper.compareTo(attributes, typedOther.attributes);
6939
      if (lastComparison != 0) {
6940
        return lastComparison;
6941
      }
420 ashish 6942
      return 0;
6943
    }
6944
 
6945
    public void read(TProtocol iprot) throws TException {
6946
      TField field;
6947
      iprot.readStructBegin();
6948
      while (true)
6949
      {
6950
        field = iprot.readFieldBegin();
6951
        if (field.type == TType.STOP) { 
6952
          break;
6953
        }
6954
        _Fields fieldId = _Fields.findByThriftId(field.id);
6955
        if (fieldId == null) {
6956
          TProtocolUtil.skip(iprot, field.type);
6957
        } else {
6958
          switch (fieldId) {
6959
            case ID:
6960
              if (field.type == TType.I64) {
6961
                this.id = iprot.readI64();
6962
                setIdIsSet(true);
6963
              } else { 
6964
                TProtocolUtil.skip(iprot, field.type);
6965
              }
6966
              break;
695 rajveer 6967
            case GATEWAY_PAYMENT_ID:
420 ashish 6968
              if (field.type == TType.STRING) {
695 rajveer 6969
                this.gatewayPaymentId = iprot.readString();
420 ashish 6970
              } else { 
6971
                TProtocolUtil.skip(iprot, field.type);
6972
              }
6973
              break;
695 rajveer 6974
            case SESSION_ID:
420 ashish 6975
              if (field.type == TType.STRING) {
695 rajveer 6976
                this.sessionId = iprot.readString();
420 ashish 6977
              } else { 
6978
                TProtocolUtil.skip(iprot, field.type);
6979
              }
6980
              break;
695 rajveer 6981
            case GATEWAY_TXN_STATUS:
420 ashish 6982
              if (field.type == TType.STRING) {
695 rajveer 6983
                this.gatewayTxnStatus = iprot.readString();
420 ashish 6984
              } else { 
6985
                TProtocolUtil.skip(iprot, field.type);
6986
              }
6987
              break;
695 rajveer 6988
            case DESCRIPTION:
420 ashish 6989
              if (field.type == TType.STRING) {
695 rajveer 6990
                this.description = iprot.readString();
420 ashish 6991
              } else { 
6992
                TProtocolUtil.skip(iprot, field.type);
6993
              }
6994
              break;
695 rajveer 6995
            case GATEWAY_TXN_ID:
420 ashish 6996
              if (field.type == TType.STRING) {
695 rajveer 6997
                this.gatewayTxnId = iprot.readString();
420 ashish 6998
              } else { 
6999
                TProtocolUtil.skip(iprot, field.type);
7000
              }
7001
              break;
7002
            case AUTH_CODE:
7003
              if (field.type == TType.STRING) {
695 rajveer 7004
                this.authCode = iprot.readString();
420 ashish 7005
              } else { 
7006
                TProtocolUtil.skip(iprot, field.type);
7007
              }
7008
              break;
695 rajveer 7009
            case REFERENCE_CODE:
420 ashish 7010
              if (field.type == TType.STRING) {
695 rajveer 7011
                this.referenceCode = iprot.readString();
420 ashish 7012
              } else { 
7013
                TProtocolUtil.skip(iprot, field.type);
7014
              }
7015
              break;
695 rajveer 7016
            case ERROR_CODE:
7017
              if (field.type == TType.STRING) {
7018
                this.errorCode = iprot.readString();
7019
              } else { 
7020
                TProtocolUtil.skip(iprot, field.type);
7021
              }
7022
              break;
7023
            case STATUS:
7024
              if (field.type == TType.I32) {
7025
                this.status = PaymentStatus.findByValue(iprot.readI32());
7026
              } else { 
7027
                TProtocolUtil.skip(iprot, field.type);
7028
              }
7029
              break;
1119 rajveer 7030
            case GATEWAY_TXN_DATE:
7031
              if (field.type == TType.STRING) {
7032
                this.gatewayTxnDate = iprot.readString();
7033
              } else { 
7034
                TProtocolUtil.skip(iprot, field.type);
7035
              }
7036
              break;
695 rajveer 7037
            case ATTRIBUTES:
7038
              if (field.type == TType.LIST) {
7039
                {
7040
                  TList _list20 = iprot.readListBegin();
7041
                  this.attributes = new ArrayList<Attribute>(_list20.size);
7042
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
7043
                  {
7044
                    Attribute _elem22;
7045
                    _elem22 = new Attribute();
7046
                    _elem22.read(iprot);
7047
                    this.attributes.add(_elem22);
7048
                  }
7049
                  iprot.readListEnd();
7050
                }
7051
              } else { 
7052
                TProtocolUtil.skip(iprot, field.type);
7053
              }
7054
              break;
420 ashish 7055
          }
7056
          iprot.readFieldEnd();
7057
        }
7058
      }
7059
      iprot.readStructEnd();
7060
      validate();
7061
    }
7062
 
7063
    public void write(TProtocol oprot) throws TException {
7064
      validate();
7065
 
7066
      oprot.writeStructBegin(STRUCT_DESC);
7067
      oprot.writeFieldBegin(ID_FIELD_DESC);
7068
      oprot.writeI64(this.id);
7069
      oprot.writeFieldEnd();
695 rajveer 7070
      if (this.gatewayPaymentId != null) {
7071
        oprot.writeFieldBegin(GATEWAY_PAYMENT_ID_FIELD_DESC);
7072
        oprot.writeString(this.gatewayPaymentId);
420 ashish 7073
        oprot.writeFieldEnd();
7074
      }
695 rajveer 7075
      if (this.sessionId != null) {
7076
        oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
7077
        oprot.writeString(this.sessionId);
420 ashish 7078
        oprot.writeFieldEnd();
7079
      }
695 rajveer 7080
      if (this.gatewayTxnStatus != null) {
7081
        oprot.writeFieldBegin(GATEWAY_TXN_STATUS_FIELD_DESC);
7082
        oprot.writeString(this.gatewayTxnStatus);
420 ashish 7083
        oprot.writeFieldEnd();
7084
      }
695 rajveer 7085
      if (this.description != null) {
7086
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
7087
        oprot.writeString(this.description);
420 ashish 7088
        oprot.writeFieldEnd();
7089
      }
695 rajveer 7090
      if (this.gatewayTxnId != null) {
7091
        oprot.writeFieldBegin(GATEWAY_TXN_ID_FIELD_DESC);
7092
        oprot.writeString(this.gatewayTxnId);
420 ashish 7093
        oprot.writeFieldEnd();
7094
      }
695 rajveer 7095
      if (this.authCode != null) {
420 ashish 7096
        oprot.writeFieldBegin(AUTH_CODE_FIELD_DESC);
695 rajveer 7097
        oprot.writeString(this.authCode);
420 ashish 7098
        oprot.writeFieldEnd();
7099
      }
695 rajveer 7100
      if (this.referenceCode != null) {
7101
        oprot.writeFieldBegin(REFERENCE_CODE_FIELD_DESC);
7102
        oprot.writeString(this.referenceCode);
420 ashish 7103
        oprot.writeFieldEnd();
7104
      }
695 rajveer 7105
      if (this.errorCode != null) {
7106
        oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);
7107
        oprot.writeString(this.errorCode);
7108
        oprot.writeFieldEnd();
7109
      }
7110
      if (this.status != null) {
7111
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
7112
        oprot.writeI32(this.status.getValue());
7113
        oprot.writeFieldEnd();
7114
      }
1119 rajveer 7115
      if (this.gatewayTxnDate != null) {
7116
        oprot.writeFieldBegin(GATEWAY_TXN_DATE_FIELD_DESC);
7117
        oprot.writeString(this.gatewayTxnDate);
7118
        oprot.writeFieldEnd();
7119
      }
695 rajveer 7120
      if (this.attributes != null) {
7121
        oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
7122
        {
7123
          oprot.writeListBegin(new TList(TType.STRUCT, this.attributes.size()));
7124
          for (Attribute _iter23 : this.attributes)
7125
          {
7126
            _iter23.write(oprot);
7127
          }
7128
          oprot.writeListEnd();
7129
        }
7130
        oprot.writeFieldEnd();
7131
      }
420 ashish 7132
      oprot.writeFieldStop();
7133
      oprot.writeStructEnd();
7134
    }
7135
 
7136
    @Override
7137
    public String toString() {
695 rajveer 7138
      StringBuilder sb = new StringBuilder("updatePaymentDetails_args(");
420 ashish 7139
      boolean first = true;
7140
 
7141
      sb.append("id:");
7142
      sb.append(this.id);
7143
      first = false;
7144
      if (!first) sb.append(", ");
695 rajveer 7145
      sb.append("gatewayPaymentId:");
7146
      if (this.gatewayPaymentId == null) {
420 ashish 7147
        sb.append("null");
7148
      } else {
695 rajveer 7149
        sb.append(this.gatewayPaymentId);
420 ashish 7150
      }
7151
      first = false;
7152
      if (!first) sb.append(", ");
695 rajveer 7153
      sb.append("sessionId:");
7154
      if (this.sessionId == null) {
420 ashish 7155
        sb.append("null");
7156
      } else {
695 rajveer 7157
        sb.append(this.sessionId);
420 ashish 7158
      }
7159
      first = false;
7160
      if (!first) sb.append(", ");
695 rajveer 7161
      sb.append("gatewayTxnStatus:");
7162
      if (this.gatewayTxnStatus == null) {
420 ashish 7163
        sb.append("null");
7164
      } else {
695 rajveer 7165
        sb.append(this.gatewayTxnStatus);
420 ashish 7166
      }
7167
      first = false;
7168
      if (!first) sb.append(", ");
695 rajveer 7169
      sb.append("description:");
7170
      if (this.description == null) {
420 ashish 7171
        sb.append("null");
7172
      } else {
695 rajveer 7173
        sb.append(this.description);
420 ashish 7174
      }
7175
      first = false;
7176
      if (!first) sb.append(", ");
695 rajveer 7177
      sb.append("gatewayTxnId:");
7178
      if (this.gatewayTxnId == null) {
420 ashish 7179
        sb.append("null");
7180
      } else {
695 rajveer 7181
        sb.append(this.gatewayTxnId);
420 ashish 7182
      }
7183
      first = false;
7184
      if (!first) sb.append(", ");
695 rajveer 7185
      sb.append("authCode:");
7186
      if (this.authCode == null) {
420 ashish 7187
        sb.append("null");
7188
      } else {
695 rajveer 7189
        sb.append(this.authCode);
420 ashish 7190
      }
7191
      first = false;
7192
      if (!first) sb.append(", ");
695 rajveer 7193
      sb.append("referenceCode:");
7194
      if (this.referenceCode == null) {
420 ashish 7195
        sb.append("null");
7196
      } else {
695 rajveer 7197
        sb.append(this.referenceCode);
420 ashish 7198
      }
7199
      first = false;
695 rajveer 7200
      if (!first) sb.append(", ");
7201
      sb.append("errorCode:");
7202
      if (this.errorCode == null) {
7203
        sb.append("null");
7204
      } else {
7205
        sb.append(this.errorCode);
7206
      }
7207
      first = false;
7208
      if (!first) sb.append(", ");
7209
      sb.append("status:");
7210
      if (this.status == null) {
7211
        sb.append("null");
7212
      } else {
7213
        String status_name = status.name();
7214
        if (status_name != null) {
7215
          sb.append(status_name);
7216
          sb.append(" (");
7217
        }
7218
        sb.append(this.status);
7219
        if (status_name != null) {
7220
          sb.append(")");
7221
        }
7222
      }
7223
      first = false;
7224
      if (!first) sb.append(", ");
1119 rajveer 7225
      sb.append("gatewayTxnDate:");
7226
      if (this.gatewayTxnDate == null) {
7227
        sb.append("null");
7228
      } else {
7229
        sb.append(this.gatewayTxnDate);
7230
      }
7231
      first = false;
7232
      if (!first) sb.append(", ");
695 rajveer 7233
      sb.append("attributes:");
7234
      if (this.attributes == null) {
7235
        sb.append("null");
7236
      } else {
7237
        sb.append(this.attributes);
7238
      }
7239
      first = false;
420 ashish 7240
      sb.append(")");
7241
      return sb.toString();
7242
    }
7243
 
7244
    public void validate() throws TException {
7245
      // check for required fields
7246
    }
7247
 
7248
  }
7249
 
695 rajveer 7250
  public static class updatePaymentDetails_result implements TBase<updatePaymentDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePaymentDetails_result>   {
7251
    private static final TStruct STRUCT_DESC = new TStruct("updatePaymentDetails_result");
420 ashish 7252
 
695 rajveer 7253
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
420 ashish 7254
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
7255
 
695 rajveer 7256
    private boolean success;
420 ashish 7257
    private PaymentException pe;
7258
 
7259
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7260
    public enum _Fields implements TFieldIdEnum {
695 rajveer 7261
      SUCCESS((short)0, "success"),
420 ashish 7262
      PE((short)1, "pe");
7263
 
7264
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7265
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7266
 
7267
      static {
7268
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7269
          byId.put((int)field._thriftId, field);
7270
          byName.put(field.getFieldName(), field);
7271
        }
7272
      }
7273
 
7274
      /**
7275
       * Find the _Fields constant that matches fieldId, or null if its not found.
7276
       */
7277
      public static _Fields findByThriftId(int fieldId) {
7278
        return byId.get(fieldId);
7279
      }
7280
 
7281
      /**
7282
       * Find the _Fields constant that matches fieldId, throwing an exception
7283
       * if it is not found.
7284
       */
7285
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7286
        _Fields fields = findByThriftId(fieldId);
7287
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7288
        return fields;
7289
      }
7290
 
7291
      /**
7292
       * Find the _Fields constant that matches name, or null if its not found.
7293
       */
7294
      public static _Fields findByName(String name) {
7295
        return byName.get(name);
7296
      }
7297
 
7298
      private final short _thriftId;
7299
      private final String _fieldName;
7300
 
7301
      _Fields(short thriftId, String fieldName) {
7302
        _thriftId = thriftId;
7303
        _fieldName = fieldName;
7304
      }
7305
 
7306
      public short getThriftFieldId() {
7307
        return _thriftId;
7308
      }
7309
 
7310
      public String getFieldName() {
7311
        return _fieldName;
7312
      }
7313
    }
7314
 
7315
    // isset id assignments
695 rajveer 7316
    private static final int __SUCCESS_ISSET_ID = 0;
7317
    private BitSet __isset_bit_vector = new BitSet(1);
420 ashish 7318
 
7319
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
695 rajveer 7320
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7321
          new FieldValueMetaData(TType.BOOL)));
420 ashish 7322
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
7323
          new FieldValueMetaData(TType.STRUCT)));
7324
    }});
7325
 
7326
    static {
695 rajveer 7327
      FieldMetaData.addStructMetaDataMap(updatePaymentDetails_result.class, metaDataMap);
420 ashish 7328
    }
7329
 
695 rajveer 7330
    public updatePaymentDetails_result() {
420 ashish 7331
    }
7332
 
695 rajveer 7333
    public updatePaymentDetails_result(
7334
      boolean success,
420 ashish 7335
      PaymentException pe)
7336
    {
7337
      this();
695 rajveer 7338
      this.success = success;
7339
      setSuccessIsSet(true);
420 ashish 7340
      this.pe = pe;
7341
    }
7342
 
7343
    /**
7344
     * Performs a deep copy on <i>other</i>.
7345
     */
695 rajveer 7346
    public updatePaymentDetails_result(updatePaymentDetails_result other) {
7347
      __isset_bit_vector.clear();
7348
      __isset_bit_vector.or(other.__isset_bit_vector);
7349
      this.success = other.success;
420 ashish 7350
      if (other.isSetPe()) {
7351
        this.pe = new PaymentException(other.pe);
7352
      }
7353
    }
7354
 
695 rajveer 7355
    public updatePaymentDetails_result deepCopy() {
7356
      return new updatePaymentDetails_result(this);
420 ashish 7357
    }
7358
 
7359
    @Deprecated
695 rajveer 7360
    public updatePaymentDetails_result clone() {
7361
      return new updatePaymentDetails_result(this);
420 ashish 7362
    }
7363
 
695 rajveer 7364
    public boolean isSuccess() {
7365
      return this.success;
7366
    }
7367
 
7368
    public updatePaymentDetails_result setSuccess(boolean success) {
7369
      this.success = success;
7370
      setSuccessIsSet(true);
7371
      return this;
7372
    }
7373
 
7374
    public void unsetSuccess() {
7375
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7376
    }
7377
 
7378
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7379
    public boolean isSetSuccess() {
7380
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7381
    }
7382
 
7383
    public void setSuccessIsSet(boolean value) {
7384
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7385
    }
7386
 
420 ashish 7387
    public PaymentException getPe() {
7388
      return this.pe;
7389
    }
7390
 
695 rajveer 7391
    public updatePaymentDetails_result setPe(PaymentException pe) {
420 ashish 7392
      this.pe = pe;
7393
      return this;
7394
    }
7395
 
7396
    public void unsetPe() {
7397
      this.pe = null;
7398
    }
7399
 
7400
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
7401
    public boolean isSetPe() {
7402
      return this.pe != null;
7403
    }
7404
 
7405
    public void setPeIsSet(boolean value) {
7406
      if (!value) {
7407
        this.pe = null;
7408
      }
7409
    }
7410
 
7411
    public void setFieldValue(_Fields field, Object value) {
7412
      switch (field) {
695 rajveer 7413
      case SUCCESS:
7414
        if (value == null) {
7415
          unsetSuccess();
7416
        } else {
7417
          setSuccess((Boolean)value);
7418
        }
7419
        break;
7420
 
420 ashish 7421
      case PE:
7422
        if (value == null) {
7423
          unsetPe();
7424
        } else {
7425
          setPe((PaymentException)value);
7426
        }
7427
        break;
7428
 
7429
      }
7430
    }
7431
 
7432
    public void setFieldValue(int fieldID, Object value) {
7433
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7434
    }
7435
 
7436
    public Object getFieldValue(_Fields field) {
7437
      switch (field) {
695 rajveer 7438
      case SUCCESS:
7439
        return new Boolean(isSuccess());
7440
 
420 ashish 7441
      case PE:
7442
        return getPe();
7443
 
7444
      }
7445
      throw new IllegalStateException();
7446
    }
7447
 
7448
    public Object getFieldValue(int fieldId) {
7449
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7450
    }
7451
 
7452
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7453
    public boolean isSet(_Fields field) {
7454
      switch (field) {
695 rajveer 7455
      case SUCCESS:
7456
        return isSetSuccess();
420 ashish 7457
      case PE:
7458
        return isSetPe();
7459
      }
7460
      throw new IllegalStateException();
7461
    }
7462
 
7463
    public boolean isSet(int fieldID) {
7464
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7465
    }
7466
 
7467
    @Override
7468
    public boolean equals(Object that) {
7469
      if (that == null)
7470
        return false;
695 rajveer 7471
      if (that instanceof updatePaymentDetails_result)
7472
        return this.equals((updatePaymentDetails_result)that);
420 ashish 7473
      return false;
7474
    }
7475
 
695 rajveer 7476
    public boolean equals(updatePaymentDetails_result that) {
420 ashish 7477
      if (that == null)
7478
        return false;
7479
 
695 rajveer 7480
      boolean this_present_success = true;
7481
      boolean that_present_success = true;
7482
      if (this_present_success || that_present_success) {
7483
        if (!(this_present_success && that_present_success))
7484
          return false;
7485
        if (this.success != that.success)
7486
          return false;
7487
      }
7488
 
420 ashish 7489
      boolean this_present_pe = true && this.isSetPe();
7490
      boolean that_present_pe = true && that.isSetPe();
7491
      if (this_present_pe || that_present_pe) {
7492
        if (!(this_present_pe && that_present_pe))
7493
          return false;
7494
        if (!this.pe.equals(that.pe))
7495
          return false;
7496
      }
7497
 
7498
      return true;
7499
    }
7500
 
7501
    @Override
7502
    public int hashCode() {
7503
      return 0;
7504
    }
7505
 
695 rajveer 7506
    public int compareTo(updatePaymentDetails_result other) {
420 ashish 7507
      if (!getClass().equals(other.getClass())) {
7508
        return getClass().getName().compareTo(other.getClass().getName());
7509
      }
7510
 
7511
      int lastComparison = 0;
695 rajveer 7512
      updatePaymentDetails_result typedOther = (updatePaymentDetails_result)other;
420 ashish 7513
 
695 rajveer 7514
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7515
      if (lastComparison != 0) {
7516
        return lastComparison;
7517
      }
7518
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7519
      if (lastComparison != 0) {
7520
        return lastComparison;
7521
      }
420 ashish 7522
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());
7523
      if (lastComparison != 0) {
7524
        return lastComparison;
7525
      }
7526
      lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);
7527
      if (lastComparison != 0) {
7528
        return lastComparison;
7529
      }
7530
      return 0;
7531
    }
7532
 
7533
    public void read(TProtocol iprot) throws TException {
7534
      TField field;
7535
      iprot.readStructBegin();
7536
      while (true)
7537
      {
7538
        field = iprot.readFieldBegin();
7539
        if (field.type == TType.STOP) { 
7540
          break;
7541
        }
7542
        _Fields fieldId = _Fields.findByThriftId(field.id);
7543
        if (fieldId == null) {
7544
          TProtocolUtil.skip(iprot, field.type);
7545
        } else {
7546
          switch (fieldId) {
695 rajveer 7547
            case SUCCESS:
7548
              if (field.type == TType.BOOL) {
7549
                this.success = iprot.readBool();
7550
                setSuccessIsSet(true);
7551
              } else { 
7552
                TProtocolUtil.skip(iprot, field.type);
7553
              }
7554
              break;
420 ashish 7555
            case PE:
7556
              if (field.type == TType.STRUCT) {
7557
                this.pe = new PaymentException();
7558
                this.pe.read(iprot);
7559
              } else { 
7560
                TProtocolUtil.skip(iprot, field.type);
7561
              }
7562
              break;
7563
          }
7564
          iprot.readFieldEnd();
7565
        }
7566
      }
7567
      iprot.readStructEnd();
7568
      validate();
7569
    }
7570
 
7571
    public void write(TProtocol oprot) throws TException {
7572
      oprot.writeStructBegin(STRUCT_DESC);
7573
 
695 rajveer 7574
      if (this.isSetSuccess()) {
7575
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7576
        oprot.writeBool(this.success);
7577
        oprot.writeFieldEnd();
7578
      } else if (this.isSetPe()) {
420 ashish 7579
        oprot.writeFieldBegin(PE_FIELD_DESC);
7580
        this.pe.write(oprot);
7581
        oprot.writeFieldEnd();
7582
      }
7583
      oprot.writeFieldStop();
7584
      oprot.writeStructEnd();
7585
    }
7586
 
7587
    @Override
7588
    public String toString() {
695 rajveer 7589
      StringBuilder sb = new StringBuilder("updatePaymentDetails_result(");
420 ashish 7590
      boolean first = true;
7591
 
695 rajveer 7592
      sb.append("success:");
7593
      sb.append(this.success);
7594
      first = false;
7595
      if (!first) sb.append(", ");
420 ashish 7596
      sb.append("pe:");
7597
      if (this.pe == null) {
7598
        sb.append("null");
7599
      } else {
7600
        sb.append(this.pe);
7601
      }
7602
      first = false;
7603
      sb.append(")");
7604
      return sb.toString();
7605
    }
7606
 
7607
    public void validate() throws TException {
7608
      // check for required fields
7609
    }
7610
 
7611
  }
7612
 
1629 ankur.sing 7613
  public static class getMaxPaymentAmount_args implements TBase<getMaxPaymentAmount_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMaxPaymentAmount_args>   {
7614
    private static final TStruct STRUCT_DESC = new TStruct("getMaxPaymentAmount_args");
7615
 
7616
 
7617
 
7618
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7619
    public enum _Fields implements TFieldIdEnum {
7620
;
7621
 
7622
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7623
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7624
 
7625
      static {
7626
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7627
          byId.put((int)field._thriftId, field);
7628
          byName.put(field.getFieldName(), field);
7629
        }
7630
      }
7631
 
7632
      /**
7633
       * Find the _Fields constant that matches fieldId, or null if its not found.
7634
       */
7635
      public static _Fields findByThriftId(int fieldId) {
7636
        return byId.get(fieldId);
7637
      }
7638
 
7639
      /**
7640
       * Find the _Fields constant that matches fieldId, throwing an exception
7641
       * if it is not found.
7642
       */
7643
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7644
        _Fields fields = findByThriftId(fieldId);
7645
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7646
        return fields;
7647
      }
7648
 
7649
      /**
7650
       * Find the _Fields constant that matches name, or null if its not found.
7651
       */
7652
      public static _Fields findByName(String name) {
7653
        return byName.get(name);
7654
      }
7655
 
7656
      private final short _thriftId;
7657
      private final String _fieldName;
7658
 
7659
      _Fields(short thriftId, String fieldName) {
7660
        _thriftId = thriftId;
7661
        _fieldName = fieldName;
7662
      }
7663
 
7664
      public short getThriftFieldId() {
7665
        return _thriftId;
7666
      }
7667
 
7668
      public String getFieldName() {
7669
        return _fieldName;
7670
      }
7671
    }
7672
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7673
    }});
7674
 
7675
    static {
7676
      FieldMetaData.addStructMetaDataMap(getMaxPaymentAmount_args.class, metaDataMap);
7677
    }
7678
 
7679
    public getMaxPaymentAmount_args() {
7680
    }
7681
 
7682
    /**
7683
     * Performs a deep copy on <i>other</i>.
7684
     */
7685
    public getMaxPaymentAmount_args(getMaxPaymentAmount_args other) {
7686
    }
7687
 
7688
    public getMaxPaymentAmount_args deepCopy() {
7689
      return new getMaxPaymentAmount_args(this);
7690
    }
7691
 
7692
    @Deprecated
7693
    public getMaxPaymentAmount_args clone() {
7694
      return new getMaxPaymentAmount_args(this);
7695
    }
7696
 
7697
    public void setFieldValue(_Fields field, Object value) {
7698
      switch (field) {
7699
      }
7700
    }
7701
 
7702
    public void setFieldValue(int fieldID, Object value) {
7703
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7704
    }
7705
 
7706
    public Object getFieldValue(_Fields field) {
7707
      switch (field) {
7708
      }
7709
      throw new IllegalStateException();
7710
    }
7711
 
7712
    public Object getFieldValue(int fieldId) {
7713
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7714
    }
7715
 
7716
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7717
    public boolean isSet(_Fields field) {
7718
      switch (field) {
7719
      }
7720
      throw new IllegalStateException();
7721
    }
7722
 
7723
    public boolean isSet(int fieldID) {
7724
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7725
    }
7726
 
7727
    @Override
7728
    public boolean equals(Object that) {
7729
      if (that == null)
7730
        return false;
7731
      if (that instanceof getMaxPaymentAmount_args)
7732
        return this.equals((getMaxPaymentAmount_args)that);
7733
      return false;
7734
    }
7735
 
7736
    public boolean equals(getMaxPaymentAmount_args that) {
7737
      if (that == null)
7738
        return false;
7739
 
7740
      return true;
7741
    }
7742
 
7743
    @Override
7744
    public int hashCode() {
7745
      return 0;
7746
    }
7747
 
7748
    public int compareTo(getMaxPaymentAmount_args other) {
7749
      if (!getClass().equals(other.getClass())) {
7750
        return getClass().getName().compareTo(other.getClass().getName());
7751
      }
7752
 
7753
      int lastComparison = 0;
7754
      getMaxPaymentAmount_args typedOther = (getMaxPaymentAmount_args)other;
7755
 
7756
      return 0;
7757
    }
7758
 
7759
    public void read(TProtocol iprot) throws TException {
7760
      TField field;
7761
      iprot.readStructBegin();
7762
      while (true)
7763
      {
7764
        field = iprot.readFieldBegin();
7765
        if (field.type == TType.STOP) { 
7766
          break;
7767
        }
7768
        _Fields fieldId = _Fields.findByThriftId(field.id);
7769
        if (fieldId == null) {
7770
          TProtocolUtil.skip(iprot, field.type);
7771
        } else {
7772
          switch (fieldId) {
7773
          }
7774
          iprot.readFieldEnd();
7775
        }
7776
      }
7777
      iprot.readStructEnd();
7778
      validate();
7779
    }
7780
 
7781
    public void write(TProtocol oprot) throws TException {
7782
      validate();
7783
 
7784
      oprot.writeStructBegin(STRUCT_DESC);
7785
      oprot.writeFieldStop();
7786
      oprot.writeStructEnd();
7787
    }
7788
 
7789
    @Override
7790
    public String toString() {
7791
      StringBuilder sb = new StringBuilder("getMaxPaymentAmount_args(");
7792
      boolean first = true;
7793
 
7794
      sb.append(")");
7795
      return sb.toString();
7796
    }
7797
 
7798
    public void validate() throws TException {
7799
      // check for required fields
7800
    }
7801
 
7802
  }
7803
 
7804
  public static class getMaxPaymentAmount_result implements TBase<getMaxPaymentAmount_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMaxPaymentAmount_result>   {
7805
    private static final TStruct STRUCT_DESC = new TStruct("getMaxPaymentAmount_result");
7806
 
7807
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.DOUBLE, (short)0);
7808
 
7809
    private double success;
7810
 
7811
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7812
    public enum _Fields implements TFieldIdEnum {
7813
      SUCCESS((short)0, "success");
7814
 
7815
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7816
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7817
 
7818
      static {
7819
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7820
          byId.put((int)field._thriftId, field);
7821
          byName.put(field.getFieldName(), field);
7822
        }
7823
      }
7824
 
7825
      /**
7826
       * Find the _Fields constant that matches fieldId, or null if its not found.
7827
       */
7828
      public static _Fields findByThriftId(int fieldId) {
7829
        return byId.get(fieldId);
7830
      }
7831
 
7832
      /**
7833
       * Find the _Fields constant that matches fieldId, throwing an exception
7834
       * if it is not found.
7835
       */
7836
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7837
        _Fields fields = findByThriftId(fieldId);
7838
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7839
        return fields;
7840
      }
7841
 
7842
      /**
7843
       * Find the _Fields constant that matches name, or null if its not found.
7844
       */
7845
      public static _Fields findByName(String name) {
7846
        return byName.get(name);
7847
      }
7848
 
7849
      private final short _thriftId;
7850
      private final String _fieldName;
7851
 
7852
      _Fields(short thriftId, String fieldName) {
7853
        _thriftId = thriftId;
7854
        _fieldName = fieldName;
7855
      }
7856
 
7857
      public short getThriftFieldId() {
7858
        return _thriftId;
7859
      }
7860
 
7861
      public String getFieldName() {
7862
        return _fieldName;
7863
      }
7864
    }
7865
 
7866
    // isset id assignments
7867
    private static final int __SUCCESS_ISSET_ID = 0;
7868
    private BitSet __isset_bit_vector = new BitSet(1);
7869
 
7870
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7871
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7872
          new FieldValueMetaData(TType.DOUBLE)));
7873
    }});
7874
 
7875
    static {
7876
      FieldMetaData.addStructMetaDataMap(getMaxPaymentAmount_result.class, metaDataMap);
7877
    }
7878
 
7879
    public getMaxPaymentAmount_result() {
7880
    }
7881
 
7882
    public getMaxPaymentAmount_result(
7883
      double success)
7884
    {
7885
      this();
7886
      this.success = success;
7887
      setSuccessIsSet(true);
7888
    }
7889
 
7890
    /**
7891
     * Performs a deep copy on <i>other</i>.
7892
     */
7893
    public getMaxPaymentAmount_result(getMaxPaymentAmount_result other) {
7894
      __isset_bit_vector.clear();
7895
      __isset_bit_vector.or(other.__isset_bit_vector);
7896
      this.success = other.success;
7897
    }
7898
 
7899
    public getMaxPaymentAmount_result deepCopy() {
7900
      return new getMaxPaymentAmount_result(this);
7901
    }
7902
 
7903
    @Deprecated
7904
    public getMaxPaymentAmount_result clone() {
7905
      return new getMaxPaymentAmount_result(this);
7906
    }
7907
 
7908
    public double getSuccess() {
7909
      return this.success;
7910
    }
7911
 
7912
    public getMaxPaymentAmount_result setSuccess(double success) {
7913
      this.success = success;
7914
      setSuccessIsSet(true);
7915
      return this;
7916
    }
7917
 
7918
    public void unsetSuccess() {
7919
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7920
    }
7921
 
7922
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7923
    public boolean isSetSuccess() {
7924
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7925
    }
7926
 
7927
    public void setSuccessIsSet(boolean value) {
7928
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7929
    }
7930
 
7931
    public void setFieldValue(_Fields field, Object value) {
7932
      switch (field) {
7933
      case SUCCESS:
7934
        if (value == null) {
7935
          unsetSuccess();
7936
        } else {
7937
          setSuccess((Double)value);
7938
        }
7939
        break;
7940
 
7941
      }
7942
    }
7943
 
7944
    public void setFieldValue(int fieldID, Object value) {
7945
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7946
    }
7947
 
7948
    public Object getFieldValue(_Fields field) {
7949
      switch (field) {
7950
      case SUCCESS:
7951
        return new Double(getSuccess());
7952
 
7953
      }
7954
      throw new IllegalStateException();
7955
    }
7956
 
7957
    public Object getFieldValue(int fieldId) {
7958
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7959
    }
7960
 
7961
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7962
    public boolean isSet(_Fields field) {
7963
      switch (field) {
7964
      case SUCCESS:
7965
        return isSetSuccess();
7966
      }
7967
      throw new IllegalStateException();
7968
    }
7969
 
7970
    public boolean isSet(int fieldID) {
7971
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7972
    }
7973
 
7974
    @Override
7975
    public boolean equals(Object that) {
7976
      if (that == null)
7977
        return false;
7978
      if (that instanceof getMaxPaymentAmount_result)
7979
        return this.equals((getMaxPaymentAmount_result)that);
7980
      return false;
7981
    }
7982
 
7983
    public boolean equals(getMaxPaymentAmount_result that) {
7984
      if (that == null)
7985
        return false;
7986
 
7987
      boolean this_present_success = true;
7988
      boolean that_present_success = true;
7989
      if (this_present_success || that_present_success) {
7990
        if (!(this_present_success && that_present_success))
7991
          return false;
7992
        if (this.success != that.success)
7993
          return false;
7994
      }
7995
 
7996
      return true;
7997
    }
7998
 
7999
    @Override
8000
    public int hashCode() {
8001
      return 0;
8002
    }
8003
 
8004
    public int compareTo(getMaxPaymentAmount_result other) {
8005
      if (!getClass().equals(other.getClass())) {
8006
        return getClass().getName().compareTo(other.getClass().getName());
8007
      }
8008
 
8009
      int lastComparison = 0;
8010
      getMaxPaymentAmount_result typedOther = (getMaxPaymentAmount_result)other;
8011
 
8012
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8013
      if (lastComparison != 0) {
8014
        return lastComparison;
8015
      }
8016
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8017
      if (lastComparison != 0) {
8018
        return lastComparison;
8019
      }
8020
      return 0;
8021
    }
8022
 
8023
    public void read(TProtocol iprot) throws TException {
8024
      TField field;
8025
      iprot.readStructBegin();
8026
      while (true)
8027
      {
8028
        field = iprot.readFieldBegin();
8029
        if (field.type == TType.STOP) { 
8030
          break;
8031
        }
8032
        _Fields fieldId = _Fields.findByThriftId(field.id);
8033
        if (fieldId == null) {
8034
          TProtocolUtil.skip(iprot, field.type);
8035
        } else {
8036
          switch (fieldId) {
8037
            case SUCCESS:
8038
              if (field.type == TType.DOUBLE) {
8039
                this.success = iprot.readDouble();
8040
                setSuccessIsSet(true);
8041
              } else { 
8042
                TProtocolUtil.skip(iprot, field.type);
8043
              }
8044
              break;
8045
          }
8046
          iprot.readFieldEnd();
8047
        }
8048
      }
8049
      iprot.readStructEnd();
8050
      validate();
8051
    }
8052
 
8053
    public void write(TProtocol oprot) throws TException {
8054
      oprot.writeStructBegin(STRUCT_DESC);
8055
 
8056
      if (this.isSetSuccess()) {
8057
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8058
        oprot.writeDouble(this.success);
8059
        oprot.writeFieldEnd();
8060
      }
8061
      oprot.writeFieldStop();
8062
      oprot.writeStructEnd();
8063
    }
8064
 
8065
    @Override
8066
    public String toString() {
8067
      StringBuilder sb = new StringBuilder("getMaxPaymentAmount_result(");
8068
      boolean first = true;
8069
 
8070
      sb.append("success:");
8071
      sb.append(this.success);
8072
      first = false;
8073
      sb.append(")");
8074
      return sb.toString();
8075
    }
8076
 
8077
    public void validate() throws TException {
8078
      // check for required fields
8079
    }
8080
 
8081
  }
8082
 
8083
  public static class getMinPaymentAmount_args implements TBase<getMinPaymentAmount_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMinPaymentAmount_args>   {
8084
    private static final TStruct STRUCT_DESC = new TStruct("getMinPaymentAmount_args");
8085
 
8086
 
8087
 
8088
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8089
    public enum _Fields implements TFieldIdEnum {
8090
;
8091
 
8092
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8093
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8094
 
8095
      static {
8096
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8097
          byId.put((int)field._thriftId, field);
8098
          byName.put(field.getFieldName(), field);
8099
        }
8100
      }
8101
 
8102
      /**
8103
       * Find the _Fields constant that matches fieldId, or null if its not found.
8104
       */
8105
      public static _Fields findByThriftId(int fieldId) {
8106
        return byId.get(fieldId);
8107
      }
8108
 
8109
      /**
8110
       * Find the _Fields constant that matches fieldId, throwing an exception
8111
       * if it is not found.
8112
       */
8113
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8114
        _Fields fields = findByThriftId(fieldId);
8115
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8116
        return fields;
8117
      }
8118
 
8119
      /**
8120
       * Find the _Fields constant that matches name, or null if its not found.
8121
       */
8122
      public static _Fields findByName(String name) {
8123
        return byName.get(name);
8124
      }
8125
 
8126
      private final short _thriftId;
8127
      private final String _fieldName;
8128
 
8129
      _Fields(short thriftId, String fieldName) {
8130
        _thriftId = thriftId;
8131
        _fieldName = fieldName;
8132
      }
8133
 
8134
      public short getThriftFieldId() {
8135
        return _thriftId;
8136
      }
8137
 
8138
      public String getFieldName() {
8139
        return _fieldName;
8140
      }
8141
    }
8142
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8143
    }});
8144
 
8145
    static {
8146
      FieldMetaData.addStructMetaDataMap(getMinPaymentAmount_args.class, metaDataMap);
8147
    }
8148
 
8149
    public getMinPaymentAmount_args() {
8150
    }
8151
 
8152
    /**
8153
     * Performs a deep copy on <i>other</i>.
8154
     */
8155
    public getMinPaymentAmount_args(getMinPaymentAmount_args other) {
8156
    }
8157
 
8158
    public getMinPaymentAmount_args deepCopy() {
8159
      return new getMinPaymentAmount_args(this);
8160
    }
8161
 
8162
    @Deprecated
8163
    public getMinPaymentAmount_args clone() {
8164
      return new getMinPaymentAmount_args(this);
8165
    }
8166
 
8167
    public void setFieldValue(_Fields field, Object value) {
8168
      switch (field) {
8169
      }
8170
    }
8171
 
8172
    public void setFieldValue(int fieldID, Object value) {
8173
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8174
    }
8175
 
8176
    public Object getFieldValue(_Fields field) {
8177
      switch (field) {
8178
      }
8179
      throw new IllegalStateException();
8180
    }
8181
 
8182
    public Object getFieldValue(int fieldId) {
8183
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8184
    }
8185
 
8186
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8187
    public boolean isSet(_Fields field) {
8188
      switch (field) {
8189
      }
8190
      throw new IllegalStateException();
8191
    }
8192
 
8193
    public boolean isSet(int fieldID) {
8194
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8195
    }
8196
 
8197
    @Override
8198
    public boolean equals(Object that) {
8199
      if (that == null)
8200
        return false;
8201
      if (that instanceof getMinPaymentAmount_args)
8202
        return this.equals((getMinPaymentAmount_args)that);
8203
      return false;
8204
    }
8205
 
8206
    public boolean equals(getMinPaymentAmount_args that) {
8207
      if (that == null)
8208
        return false;
8209
 
8210
      return true;
8211
    }
8212
 
8213
    @Override
8214
    public int hashCode() {
8215
      return 0;
8216
    }
8217
 
8218
    public int compareTo(getMinPaymentAmount_args other) {
8219
      if (!getClass().equals(other.getClass())) {
8220
        return getClass().getName().compareTo(other.getClass().getName());
8221
      }
8222
 
8223
      int lastComparison = 0;
8224
      getMinPaymentAmount_args typedOther = (getMinPaymentAmount_args)other;
8225
 
8226
      return 0;
8227
    }
8228
 
8229
    public void read(TProtocol iprot) throws TException {
8230
      TField field;
8231
      iprot.readStructBegin();
8232
      while (true)
8233
      {
8234
        field = iprot.readFieldBegin();
8235
        if (field.type == TType.STOP) { 
8236
          break;
8237
        }
8238
        _Fields fieldId = _Fields.findByThriftId(field.id);
8239
        if (fieldId == null) {
8240
          TProtocolUtil.skip(iprot, field.type);
8241
        } else {
8242
          switch (fieldId) {
8243
          }
8244
          iprot.readFieldEnd();
8245
        }
8246
      }
8247
      iprot.readStructEnd();
8248
      validate();
8249
    }
8250
 
8251
    public void write(TProtocol oprot) throws TException {
8252
      validate();
8253
 
8254
      oprot.writeStructBegin(STRUCT_DESC);
8255
      oprot.writeFieldStop();
8256
      oprot.writeStructEnd();
8257
    }
8258
 
8259
    @Override
8260
    public String toString() {
8261
      StringBuilder sb = new StringBuilder("getMinPaymentAmount_args(");
8262
      boolean first = true;
8263
 
8264
      sb.append(")");
8265
      return sb.toString();
8266
    }
8267
 
8268
    public void validate() throws TException {
8269
      // check for required fields
8270
    }
8271
 
8272
  }
8273
 
8274
  public static class getMinPaymentAmount_result implements TBase<getMinPaymentAmount_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMinPaymentAmount_result>   {
8275
    private static final TStruct STRUCT_DESC = new TStruct("getMinPaymentAmount_result");
8276
 
8277
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.DOUBLE, (short)0);
8278
 
8279
    private double success;
8280
 
8281
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8282
    public enum _Fields implements TFieldIdEnum {
8283
      SUCCESS((short)0, "success");
8284
 
8285
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8286
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8287
 
8288
      static {
8289
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8290
          byId.put((int)field._thriftId, field);
8291
          byName.put(field.getFieldName(), field);
8292
        }
8293
      }
8294
 
8295
      /**
8296
       * Find the _Fields constant that matches fieldId, or null if its not found.
8297
       */
8298
      public static _Fields findByThriftId(int fieldId) {
8299
        return byId.get(fieldId);
8300
      }
8301
 
8302
      /**
8303
       * Find the _Fields constant that matches fieldId, throwing an exception
8304
       * if it is not found.
8305
       */
8306
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8307
        _Fields fields = findByThriftId(fieldId);
8308
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8309
        return fields;
8310
      }
8311
 
8312
      /**
8313
       * Find the _Fields constant that matches name, or null if its not found.
8314
       */
8315
      public static _Fields findByName(String name) {
8316
        return byName.get(name);
8317
      }
8318
 
8319
      private final short _thriftId;
8320
      private final String _fieldName;
8321
 
8322
      _Fields(short thriftId, String fieldName) {
8323
        _thriftId = thriftId;
8324
        _fieldName = fieldName;
8325
      }
8326
 
8327
      public short getThriftFieldId() {
8328
        return _thriftId;
8329
      }
8330
 
8331
      public String getFieldName() {
8332
        return _fieldName;
8333
      }
8334
    }
8335
 
8336
    // isset id assignments
8337
    private static final int __SUCCESS_ISSET_ID = 0;
8338
    private BitSet __isset_bit_vector = new BitSet(1);
8339
 
8340
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8341
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8342
          new FieldValueMetaData(TType.DOUBLE)));
8343
    }});
8344
 
8345
    static {
8346
      FieldMetaData.addStructMetaDataMap(getMinPaymentAmount_result.class, metaDataMap);
8347
    }
8348
 
8349
    public getMinPaymentAmount_result() {
8350
    }
8351
 
8352
    public getMinPaymentAmount_result(
8353
      double success)
8354
    {
8355
      this();
8356
      this.success = success;
8357
      setSuccessIsSet(true);
8358
    }
8359
 
8360
    /**
8361
     * Performs a deep copy on <i>other</i>.
8362
     */
8363
    public getMinPaymentAmount_result(getMinPaymentAmount_result other) {
8364
      __isset_bit_vector.clear();
8365
      __isset_bit_vector.or(other.__isset_bit_vector);
8366
      this.success = other.success;
8367
    }
8368
 
8369
    public getMinPaymentAmount_result deepCopy() {
8370
      return new getMinPaymentAmount_result(this);
8371
    }
8372
 
8373
    @Deprecated
8374
    public getMinPaymentAmount_result clone() {
8375
      return new getMinPaymentAmount_result(this);
8376
    }
8377
 
8378
    public double getSuccess() {
8379
      return this.success;
8380
    }
8381
 
8382
    public getMinPaymentAmount_result setSuccess(double success) {
8383
      this.success = success;
8384
      setSuccessIsSet(true);
8385
      return this;
8386
    }
8387
 
8388
    public void unsetSuccess() {
8389
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8390
    }
8391
 
8392
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8393
    public boolean isSetSuccess() {
8394
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8395
    }
8396
 
8397
    public void setSuccessIsSet(boolean value) {
8398
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8399
    }
8400
 
8401
    public void setFieldValue(_Fields field, Object value) {
8402
      switch (field) {
8403
      case SUCCESS:
8404
        if (value == null) {
8405
          unsetSuccess();
8406
        } else {
8407
          setSuccess((Double)value);
8408
        }
8409
        break;
8410
 
8411
      }
8412
    }
8413
 
8414
    public void setFieldValue(int fieldID, Object value) {
8415
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8416
    }
8417
 
8418
    public Object getFieldValue(_Fields field) {
8419
      switch (field) {
8420
      case SUCCESS:
8421
        return new Double(getSuccess());
8422
 
8423
      }
8424
      throw new IllegalStateException();
8425
    }
8426
 
8427
    public Object getFieldValue(int fieldId) {
8428
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8429
    }
8430
 
8431
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8432
    public boolean isSet(_Fields field) {
8433
      switch (field) {
8434
      case SUCCESS:
8435
        return isSetSuccess();
8436
      }
8437
      throw new IllegalStateException();
8438
    }
8439
 
8440
    public boolean isSet(int fieldID) {
8441
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8442
    }
8443
 
8444
    @Override
8445
    public boolean equals(Object that) {
8446
      if (that == null)
8447
        return false;
8448
      if (that instanceof getMinPaymentAmount_result)
8449
        return this.equals((getMinPaymentAmount_result)that);
8450
      return false;
8451
    }
8452
 
8453
    public boolean equals(getMinPaymentAmount_result that) {
8454
      if (that == null)
8455
        return false;
8456
 
8457
      boolean this_present_success = true;
8458
      boolean that_present_success = true;
8459
      if (this_present_success || that_present_success) {
8460
        if (!(this_present_success && that_present_success))
8461
          return false;
8462
        if (this.success != that.success)
8463
          return false;
8464
      }
8465
 
8466
      return true;
8467
    }
8468
 
8469
    @Override
8470
    public int hashCode() {
8471
      return 0;
8472
    }
8473
 
8474
    public int compareTo(getMinPaymentAmount_result other) {
8475
      if (!getClass().equals(other.getClass())) {
8476
        return getClass().getName().compareTo(other.getClass().getName());
8477
      }
8478
 
8479
      int lastComparison = 0;
8480
      getMinPaymentAmount_result typedOther = (getMinPaymentAmount_result)other;
8481
 
8482
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8483
      if (lastComparison != 0) {
8484
        return lastComparison;
8485
      }
8486
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8487
      if (lastComparison != 0) {
8488
        return lastComparison;
8489
      }
8490
      return 0;
8491
    }
8492
 
8493
    public void read(TProtocol iprot) throws TException {
8494
      TField field;
8495
      iprot.readStructBegin();
8496
      while (true)
8497
      {
8498
        field = iprot.readFieldBegin();
8499
        if (field.type == TType.STOP) { 
8500
          break;
8501
        }
8502
        _Fields fieldId = _Fields.findByThriftId(field.id);
8503
        if (fieldId == null) {
8504
          TProtocolUtil.skip(iprot, field.type);
8505
        } else {
8506
          switch (fieldId) {
8507
            case SUCCESS:
8508
              if (field.type == TType.DOUBLE) {
8509
                this.success = iprot.readDouble();
8510
                setSuccessIsSet(true);
8511
              } else { 
8512
                TProtocolUtil.skip(iprot, field.type);
8513
              }
8514
              break;
8515
          }
8516
          iprot.readFieldEnd();
8517
        }
8518
      }
8519
      iprot.readStructEnd();
8520
      validate();
8521
    }
8522
 
8523
    public void write(TProtocol oprot) throws TException {
8524
      oprot.writeStructBegin(STRUCT_DESC);
8525
 
8526
      if (this.isSetSuccess()) {
8527
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8528
        oprot.writeDouble(this.success);
8529
        oprot.writeFieldEnd();
8530
      }
8531
      oprot.writeFieldStop();
8532
      oprot.writeStructEnd();
8533
    }
8534
 
8535
    @Override
8536
    public String toString() {
8537
      StringBuilder sb = new StringBuilder("getMinPaymentAmount_result(");
8538
      boolean first = true;
8539
 
8540
      sb.append("success:");
8541
      sb.append(this.success);
8542
      first = false;
8543
      sb.append(")");
8544
      return sb.toString();
8545
    }
8546
 
8547
    public void validate() throws TException {
8548
      // check for required fields
8549
    }
8550
 
8551
  }
8552
 
123 ashish 8553
}