Subversion Repositories SmartDukaan

Rev

Rev 2747 | Rev 3374 | 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
    /**
2060 ankur.sing 59
     * get all payments for user. If gatewayId is 0, then it is ignored while filtering.
695 rajveer 60
     * 
1855 chandransh 61
     * 
695 rajveer 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
    /**
1731 ankur.sing 113
     * Returns the minimum and maximum amounts among successful payments.
114
     * List contains two double values, first minimum and second maximum amount.
1629 ankur.sing 115
     */
1731 ankur.sing 116
    public List<Double> getSuccessfulPaymentsAmountRange() throws TException;
1629 ankur.sing 117
 
2462 chandransh 118
    /**
2708 chandransh 119
     * Captures an already authorized EBS Payment and returns a map containing the details of the captured transaction
2462 chandransh 120
     * 
121
     * @param merchantPaymentId
122
     */
2708 chandransh 123
    public Map<String,String> captureEbsPayment(long merchantPaymentId) throws PaymentException, TException;
124
 
125
    /**
126
     * Captures an already authorized Hdfc Payment and returns a map containing the details of the captured transaction
127
     * 
128
     * @param merchantPaymentId
129
     */
2462 chandransh 130
    public Map<String,String> captureHdfcPayment(long merchantPaymentId) throws PaymentException, TException;
131
 
132
    /**
133
     * Initialize the payment pipe for a HDFC payment. The URL the user should be redirected to is returned.
134
     * In case of any processing error, an exception is raised.
135
     * 
136
     * @param merchantPaymentId
137
     */
138
    public String initializeHdfcPayment(long merchantPaymentId) throws PaymentException, TException;
139
 
2690 chandransh 140
    /**
141
     * Create a refund of the given amount corresponding to the given order to be processed through the same
142
     * payment gateway which processed the payment for the corresponding transaction.
143
     * Returns the id of the newly created Refund.
144
     * 
145
     * @param orderId
146
     * @param merchantTxnId
147
     * @param amount
148
     */
149
    public long createRefund(long orderId, long merchantTxnId, double amount) throws PaymentException, TException;
150
 
3010 chandransh 151
    /**
152
     * Capture the payment for the given merchant transaction id. It processes the last payment for the given
153
     * transaction. If the capture attempt failed, the payment is marked as failed.
154
     * 
155
     * @param merchantTxnId
156
     */
157
    public boolean capturePayment(long merchantTxnId) throws PaymentException, TException;
158
 
123 ashish 159
  }
160
 
161
  public static class Client implements Iface {
162
    public Client(TProtocol prot)
163
    {
164
      this(prot, prot);
165
    }
166
 
167
    public Client(TProtocol iprot, TProtocol oprot)
168
    {
169
      iprot_ = iprot;
170
      oprot_ = oprot;
171
    }
172
 
173
    protected TProtocol iprot_;
174
    protected TProtocol oprot_;
175
 
176
    protected int seqid_;
177
 
178
    public TProtocol getInputProtocol()
179
    {
180
      return this.iprot_;
181
    }
182
 
183
    public TProtocol getOutputProtocol()
184
    {
185
      return this.oprot_;
186
    }
187
 
764 rajveer 188
    public void closeSession() throws TException
189
    {
190
      send_closeSession();
191
      recv_closeSession();
192
    }
193
 
194
    public void send_closeSession() throws TException
195
    {
196
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
197
      closeSession_args args = new closeSession_args();
198
      args.write(oprot_);
199
      oprot_.writeMessageEnd();
200
      oprot_.getTransport().flush();
201
    }
202
 
203
    public void recv_closeSession() throws TException
204
    {
205
      TMessage msg = iprot_.readMessageBegin();
206
      if (msg.type == TMessageType.EXCEPTION) {
207
        TApplicationException x = TApplicationException.read(iprot_);
208
        iprot_.readMessageEnd();
209
        throw x;
210
      }
211
      closeSession_result result = new closeSession_result();
212
      result.read(iprot_);
213
      iprot_.readMessageEnd();
214
      return;
215
    }
216
 
695 rajveer 217
    public long createPayment(long userId, double amount, long gatewayId, long txnId) throws PaymentException, TException
123 ashish 218
    {
695 rajveer 219
      send_createPayment(userId, amount, gatewayId, txnId);
123 ashish 220
      return recv_createPayment();
221
    }
222
 
695 rajveer 223
    public void send_createPayment(long userId, double amount, long gatewayId, long txnId) throws TException
123 ashish 224
    {
225
      oprot_.writeMessageBegin(new TMessage("createPayment", TMessageType.CALL, seqid_));
226
      createPayment_args args = new createPayment_args();
695 rajveer 227
      args.userId = userId;
123 ashish 228
      args.amount = amount;
695 rajveer 229
      args.gatewayId = gatewayId;
230
      args.txnId = txnId;
123 ashish 231
      args.write(oprot_);
232
      oprot_.writeMessageEnd();
233
      oprot_.getTransport().flush();
234
    }
235
 
420 ashish 236
    public long recv_createPayment() throws PaymentException, TException
123 ashish 237
    {
238
      TMessage msg = iprot_.readMessageBegin();
239
      if (msg.type == TMessageType.EXCEPTION) {
240
        TApplicationException x = TApplicationException.read(iprot_);
241
        iprot_.readMessageEnd();
242
        throw x;
243
      }
244
      createPayment_result result = new createPayment_result();
245
      result.read(iprot_);
246
      iprot_.readMessageEnd();
247
      if (result.isSetSuccess()) {
248
        return result.success;
249
      }
250
      if (result.pe != null) {
251
        throw result.pe;
252
      }
253
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createPayment failed: unknown result");
254
    }
255
 
695 rajveer 256
    public List<Payment> getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, TException
123 ashish 257
    {
695 rajveer 258
      send_getPaymentsForUser(userId, fromTime, toTime, status, gatewayId);
123 ashish 259
      return recv_getPaymentsForUser();
260
    }
261
 
695 rajveer 262
    public void send_getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws TException
123 ashish 263
    {
264
      oprot_.writeMessageBegin(new TMessage("getPaymentsForUser", TMessageType.CALL, seqid_));
265
      getPaymentsForUser_args args = new getPaymentsForUser_args();
266
      args.userId = userId;
695 rajveer 267
      args.fromTime = fromTime;
268
      args.toTime = toTime;
123 ashish 269
      args.status = status;
695 rajveer 270
      args.gatewayId = gatewayId;
123 ashish 271
      args.write(oprot_);
272
      oprot_.writeMessageEnd();
273
      oprot_.getTransport().flush();
274
    }
275
 
276
    public List<Payment> recv_getPaymentsForUser() throws PaymentException, TException
277
    {
278
      TMessage msg = iprot_.readMessageBegin();
279
      if (msg.type == TMessageType.EXCEPTION) {
280
        TApplicationException x = TApplicationException.read(iprot_);
281
        iprot_.readMessageEnd();
282
        throw x;
283
      }
284
      getPaymentsForUser_result result = new getPaymentsForUser_result();
285
      result.read(iprot_);
286
      iprot_.readMessageEnd();
287
      if (result.isSetSuccess()) {
288
        return result.success;
289
      }
290
      if (result.pe != null) {
291
        throw result.pe;
292
      }
293
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentsForUser failed: unknown result");
294
    }
295
 
695 rajveer 296
    public List<Payment> getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, TException
123 ashish 297
    {
695 rajveer 298
      send_getPayments(fromTime, toTime, status, gatewayId);
123 ashish 299
      return recv_getPayments();
300
    }
301
 
695 rajveer 302
    public void send_getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws TException
123 ashish 303
    {
304
      oprot_.writeMessageBegin(new TMessage("getPayments", TMessageType.CALL, seqid_));
305
      getPayments_args args = new getPayments_args();
695 rajveer 306
      args.fromTime = fromTime;
307
      args.toTime = toTime;
123 ashish 308
      args.status = status;
695 rajveer 309
      args.gatewayId = gatewayId;
123 ashish 310
      args.write(oprot_);
311
      oprot_.writeMessageEnd();
312
      oprot_.getTransport().flush();
313
    }
314
 
315
    public List<Payment> recv_getPayments() throws PaymentException, TException
316
    {
317
      TMessage msg = iprot_.readMessageBegin();
318
      if (msg.type == TMessageType.EXCEPTION) {
319
        TApplicationException x = TApplicationException.read(iprot_);
320
        iprot_.readMessageEnd();
321
        throw x;
322
      }
323
      getPayments_result result = new getPayments_result();
324
      result.read(iprot_);
325
      iprot_.readMessageEnd();
326
      if (result.isSetSuccess()) {
327
        return result.success;
328
      }
329
      if (result.pe != null) {
330
        throw result.pe;
331
      }
332
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPayments failed: unknown result");
333
    }
334
 
420 ashish 335
    public PaymentGateway getPaymentGateway(long id) throws PaymentException, TException
336
    {
337
      send_getPaymentGateway(id);
338
      return recv_getPaymentGateway();
339
    }
340
 
341
    public void send_getPaymentGateway(long id) throws TException
342
    {
343
      oprot_.writeMessageBegin(new TMessage("getPaymentGateway", TMessageType.CALL, seqid_));
344
      getPaymentGateway_args args = new getPaymentGateway_args();
345
      args.id = id;
346
      args.write(oprot_);
347
      oprot_.writeMessageEnd();
348
      oprot_.getTransport().flush();
349
    }
350
 
351
    public PaymentGateway recv_getPaymentGateway() throws PaymentException, TException
352
    {
353
      TMessage msg = iprot_.readMessageBegin();
354
      if (msg.type == TMessageType.EXCEPTION) {
355
        TApplicationException x = TApplicationException.read(iprot_);
356
        iprot_.readMessageEnd();
357
        throw x;
358
      }
359
      getPaymentGateway_result result = new getPaymentGateway_result();
360
      result.read(iprot_);
361
      iprot_.readMessageEnd();
362
      if (result.isSetSuccess()) {
363
        return result.success;
364
      }
365
      if (result.pe != null) {
366
        throw result.pe;
367
      }
368
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentGateway failed: unknown result");
369
    }
370
 
695 rajveer 371
    public Payment getPayment(long id) throws PaymentException, TException
420 ashish 372
    {
695 rajveer 373
      send_getPayment(id);
374
      return recv_getPayment();
420 ashish 375
    }
376
 
695 rajveer 377
    public void send_getPayment(long id) throws TException
420 ashish 378
    {
695 rajveer 379
      oprot_.writeMessageBegin(new TMessage("getPayment", TMessageType.CALL, seqid_));
380
      getPayment_args args = new getPayment_args();
420 ashish 381
      args.id = id;
382
      args.write(oprot_);
383
      oprot_.writeMessageEnd();
384
      oprot_.getTransport().flush();
385
    }
386
 
695 rajveer 387
    public Payment recv_getPayment() throws PaymentException, TException
420 ashish 388
    {
389
      TMessage msg = iprot_.readMessageBegin();
390
      if (msg.type == TMessageType.EXCEPTION) {
391
        TApplicationException x = TApplicationException.read(iprot_);
392
        iprot_.readMessageEnd();
393
        throw x;
394
      }
695 rajveer 395
      getPayment_result result = new getPayment_result();
420 ashish 396
      result.read(iprot_);
397
      iprot_.readMessageEnd();
695 rajveer 398
      if (result.isSetSuccess()) {
399
        return result.success;
400
      }
420 ashish 401
      if (result.pe != null) {
402
        throw result.pe;
403
      }
695 rajveer 404
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPayment failed: unknown result");
420 ashish 405
    }
406
 
695 rajveer 407
    public List<Payment> getPaymentForTxnId(long txnId) throws PaymentException, TException
420 ashish 408
    {
695 rajveer 409
      send_getPaymentForTxnId(txnId);
410
      return recv_getPaymentForTxnId();
420 ashish 411
    }
412
 
695 rajveer 413
    public void send_getPaymentForTxnId(long txnId) throws TException
420 ashish 414
    {
695 rajveer 415
      oprot_.writeMessageBegin(new TMessage("getPaymentForTxnId", TMessageType.CALL, seqid_));
416
      getPaymentForTxnId_args args = new getPaymentForTxnId_args();
417
      args.txnId = txnId;
420 ashish 418
      args.write(oprot_);
419
      oprot_.writeMessageEnd();
420
      oprot_.getTransport().flush();
421
    }
422
 
695 rajveer 423
    public List<Payment> recv_getPaymentForTxnId() throws PaymentException, TException
420 ashish 424
    {
425
      TMessage msg = iprot_.readMessageBegin();
426
      if (msg.type == TMessageType.EXCEPTION) {
427
        TApplicationException x = TApplicationException.read(iprot_);
428
        iprot_.readMessageEnd();
429
        throw x;
430
      }
695 rajveer 431
      getPaymentForTxnId_result result = new getPaymentForTxnId_result();
420 ashish 432
      result.read(iprot_);
433
      iprot_.readMessageEnd();
434
      if (result.isSetSuccess()) {
435
        return result.success;
436
      }
437
      if (result.pe != null) {
438
        throw result.pe;
439
      }
695 rajveer 440
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getPaymentForTxnId failed: unknown result");
420 ashish 441
    }
442
 
1119 rajveer 443
    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 444
    {
1119 rajveer 445
      send_updatePaymentDetails(id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes);
695 rajveer 446
      return recv_updatePaymentDetails();
420 ashish 447
    }
448
 
1119 rajveer 449
    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 450
    {
695 rajveer 451
      oprot_.writeMessageBegin(new TMessage("updatePaymentDetails", TMessageType.CALL, seqid_));
452
      updatePaymentDetails_args args = new updatePaymentDetails_args();
420 ashish 453
      args.id = id;
695 rajveer 454
      args.gatewayPaymentId = gatewayPaymentId;
455
      args.sessionId = sessionId;
456
      args.gatewayTxnStatus = gatewayTxnStatus;
457
      args.description = description;
458
      args.gatewayTxnId = gatewayTxnId;
459
      args.authCode = authCode;
460
      args.referenceCode = referenceCode;
461
      args.errorCode = errorCode;
462
      args.status = status;
1119 rajveer 463
      args.gatewayTxnDate = gatewayTxnDate;
695 rajveer 464
      args.attributes = attributes;
420 ashish 465
      args.write(oprot_);
466
      oprot_.writeMessageEnd();
467
      oprot_.getTransport().flush();
468
    }
469
 
695 rajveer 470
    public boolean recv_updatePaymentDetails() throws PaymentException, TException
420 ashish 471
    {
472
      TMessage msg = iprot_.readMessageBegin();
473
      if (msg.type == TMessageType.EXCEPTION) {
474
        TApplicationException x = TApplicationException.read(iprot_);
475
        iprot_.readMessageEnd();
476
        throw x;
477
      }
695 rajveer 478
      updatePaymentDetails_result result = new updatePaymentDetails_result();
420 ashish 479
      result.read(iprot_);
480
      iprot_.readMessageEnd();
695 rajveer 481
      if (result.isSetSuccess()) {
482
        return result.success;
483
      }
420 ashish 484
      if (result.pe != null) {
485
        throw result.pe;
486
      }
695 rajveer 487
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePaymentDetails failed: unknown result");
420 ashish 488
    }
489
 
1731 ankur.sing 490
    public List<Double> getSuccessfulPaymentsAmountRange() throws TException
1629 ankur.sing 491
    {
1731 ankur.sing 492
      send_getSuccessfulPaymentsAmountRange();
493
      return recv_getSuccessfulPaymentsAmountRange();
1629 ankur.sing 494
    }
495
 
1731 ankur.sing 496
    public void send_getSuccessfulPaymentsAmountRange() throws TException
1629 ankur.sing 497
    {
1731 ankur.sing 498
      oprot_.writeMessageBegin(new TMessage("getSuccessfulPaymentsAmountRange", TMessageType.CALL, seqid_));
499
      getSuccessfulPaymentsAmountRange_args args = new getSuccessfulPaymentsAmountRange_args();
1629 ankur.sing 500
      args.write(oprot_);
501
      oprot_.writeMessageEnd();
502
      oprot_.getTransport().flush();
503
    }
504
 
1731 ankur.sing 505
    public List<Double> recv_getSuccessfulPaymentsAmountRange() throws TException
1629 ankur.sing 506
    {
507
      TMessage msg = iprot_.readMessageBegin();
508
      if (msg.type == TMessageType.EXCEPTION) {
509
        TApplicationException x = TApplicationException.read(iprot_);
510
        iprot_.readMessageEnd();
511
        throw x;
512
      }
1731 ankur.sing 513
      getSuccessfulPaymentsAmountRange_result result = new getSuccessfulPaymentsAmountRange_result();
1629 ankur.sing 514
      result.read(iprot_);
515
      iprot_.readMessageEnd();
516
      if (result.isSetSuccess()) {
517
        return result.success;
518
      }
1731 ankur.sing 519
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getSuccessfulPaymentsAmountRange failed: unknown result");
1629 ankur.sing 520
    }
521
 
2708 chandransh 522
    public Map<String,String> captureEbsPayment(long merchantPaymentId) throws PaymentException, TException
523
    {
524
      send_captureEbsPayment(merchantPaymentId);
525
      return recv_captureEbsPayment();
526
    }
527
 
528
    public void send_captureEbsPayment(long merchantPaymentId) throws TException
529
    {
530
      oprot_.writeMessageBegin(new TMessage("captureEbsPayment", TMessageType.CALL, seqid_));
531
      captureEbsPayment_args args = new captureEbsPayment_args();
532
      args.merchantPaymentId = merchantPaymentId;
533
      args.write(oprot_);
534
      oprot_.writeMessageEnd();
535
      oprot_.getTransport().flush();
536
    }
537
 
538
    public Map<String,String> recv_captureEbsPayment() throws PaymentException, TException
539
    {
540
      TMessage msg = iprot_.readMessageBegin();
541
      if (msg.type == TMessageType.EXCEPTION) {
542
        TApplicationException x = TApplicationException.read(iprot_);
543
        iprot_.readMessageEnd();
544
        throw x;
545
      }
546
      captureEbsPayment_result result = new captureEbsPayment_result();
547
      result.read(iprot_);
548
      iprot_.readMessageEnd();
549
      if (result.isSetSuccess()) {
550
        return result.success;
551
      }
552
      if (result.pe != null) {
553
        throw result.pe;
554
      }
555
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "captureEbsPayment failed: unknown result");
556
    }
557
 
2462 chandransh 558
    public Map<String,String> captureHdfcPayment(long merchantPaymentId) throws PaymentException, TException
559
    {
560
      send_captureHdfcPayment(merchantPaymentId);
561
      return recv_captureHdfcPayment();
562
    }
563
 
564
    public void send_captureHdfcPayment(long merchantPaymentId) throws TException
565
    {
566
      oprot_.writeMessageBegin(new TMessage("captureHdfcPayment", TMessageType.CALL, seqid_));
567
      captureHdfcPayment_args args = new captureHdfcPayment_args();
568
      args.merchantPaymentId = merchantPaymentId;
569
      args.write(oprot_);
570
      oprot_.writeMessageEnd();
571
      oprot_.getTransport().flush();
572
    }
573
 
574
    public Map<String,String> recv_captureHdfcPayment() throws PaymentException, TException
575
    {
576
      TMessage msg = iprot_.readMessageBegin();
577
      if (msg.type == TMessageType.EXCEPTION) {
578
        TApplicationException x = TApplicationException.read(iprot_);
579
        iprot_.readMessageEnd();
580
        throw x;
581
      }
582
      captureHdfcPayment_result result = new captureHdfcPayment_result();
583
      result.read(iprot_);
584
      iprot_.readMessageEnd();
585
      if (result.isSetSuccess()) {
586
        return result.success;
587
      }
588
      if (result.pe != null) {
589
        throw result.pe;
590
      }
591
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "captureHdfcPayment failed: unknown result");
592
    }
593
 
594
    public String initializeHdfcPayment(long merchantPaymentId) throws PaymentException, TException
595
    {
596
      send_initializeHdfcPayment(merchantPaymentId);
597
      return recv_initializeHdfcPayment();
598
    }
599
 
600
    public void send_initializeHdfcPayment(long merchantPaymentId) throws TException
601
    {
602
      oprot_.writeMessageBegin(new TMessage("initializeHdfcPayment", TMessageType.CALL, seqid_));
603
      initializeHdfcPayment_args args = new initializeHdfcPayment_args();
604
      args.merchantPaymentId = merchantPaymentId;
605
      args.write(oprot_);
606
      oprot_.writeMessageEnd();
607
      oprot_.getTransport().flush();
608
    }
609
 
610
    public String recv_initializeHdfcPayment() throws PaymentException, TException
611
    {
612
      TMessage msg = iprot_.readMessageBegin();
613
      if (msg.type == TMessageType.EXCEPTION) {
614
        TApplicationException x = TApplicationException.read(iprot_);
615
        iprot_.readMessageEnd();
616
        throw x;
617
      }
618
      initializeHdfcPayment_result result = new initializeHdfcPayment_result();
619
      result.read(iprot_);
620
      iprot_.readMessageEnd();
621
      if (result.isSetSuccess()) {
622
        return result.success;
623
      }
624
      if (result.pe != null) {
625
        throw result.pe;
626
      }
627
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "initializeHdfcPayment failed: unknown result");
628
    }
629
 
2690 chandransh 630
    public long createRefund(long orderId, long merchantTxnId, double amount) throws PaymentException, TException
631
    {
632
      send_createRefund(orderId, merchantTxnId, amount);
633
      return recv_createRefund();
634
    }
635
 
636
    public void send_createRefund(long orderId, long merchantTxnId, double amount) throws TException
637
    {
638
      oprot_.writeMessageBegin(new TMessage("createRefund", TMessageType.CALL, seqid_));
639
      createRefund_args args = new createRefund_args();
640
      args.orderId = orderId;
641
      args.merchantTxnId = merchantTxnId;
642
      args.amount = amount;
643
      args.write(oprot_);
644
      oprot_.writeMessageEnd();
645
      oprot_.getTransport().flush();
646
    }
647
 
648
    public long recv_createRefund() throws PaymentException, TException
649
    {
650
      TMessage msg = iprot_.readMessageBegin();
651
      if (msg.type == TMessageType.EXCEPTION) {
652
        TApplicationException x = TApplicationException.read(iprot_);
653
        iprot_.readMessageEnd();
654
        throw x;
655
      }
656
      createRefund_result result = new createRefund_result();
657
      result.read(iprot_);
658
      iprot_.readMessageEnd();
659
      if (result.isSetSuccess()) {
660
        return result.success;
661
      }
662
      if (result.pe != null) {
663
        throw result.pe;
664
      }
665
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createRefund failed: unknown result");
666
    }
667
 
3010 chandransh 668
    public boolean capturePayment(long merchantTxnId) throws PaymentException, TException
669
    {
670
      send_capturePayment(merchantTxnId);
671
      return recv_capturePayment();
672
    }
673
 
674
    public void send_capturePayment(long merchantTxnId) throws TException
675
    {
676
      oprot_.writeMessageBegin(new TMessage("capturePayment", TMessageType.CALL, seqid_));
677
      capturePayment_args args = new capturePayment_args();
678
      args.merchantTxnId = merchantTxnId;
679
      args.write(oprot_);
680
      oprot_.writeMessageEnd();
681
      oprot_.getTransport().flush();
682
    }
683
 
684
    public boolean recv_capturePayment() throws PaymentException, TException
685
    {
686
      TMessage msg = iprot_.readMessageBegin();
687
      if (msg.type == TMessageType.EXCEPTION) {
688
        TApplicationException x = TApplicationException.read(iprot_);
689
        iprot_.readMessageEnd();
690
        throw x;
691
      }
692
      capturePayment_result result = new capturePayment_result();
693
      result.read(iprot_);
694
      iprot_.readMessageEnd();
695
      if (result.isSetSuccess()) {
696
        return result.success;
697
      }
698
      if (result.pe != null) {
699
        throw result.pe;
700
      }
701
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "capturePayment failed: unknown result");
702
    }
703
 
123 ashish 704
  }
705
  public static class Processor implements TProcessor {
706
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
707
    public Processor(Iface iface)
708
    {
709
      iface_ = iface;
764 rajveer 710
      processMap_.put("closeSession", new closeSession());
123 ashish 711
      processMap_.put("createPayment", new createPayment());
712
      processMap_.put("getPaymentsForUser", new getPaymentsForUser());
713
      processMap_.put("getPayments", new getPayments());
420 ashish 714
      processMap_.put("getPaymentGateway", new getPaymentGateway());
715
      processMap_.put("getPayment", new getPayment());
695 rajveer 716
      processMap_.put("getPaymentForTxnId", new getPaymentForTxnId());
717
      processMap_.put("updatePaymentDetails", new updatePaymentDetails());
1731 ankur.sing 718
      processMap_.put("getSuccessfulPaymentsAmountRange", new getSuccessfulPaymentsAmountRange());
2708 chandransh 719
      processMap_.put("captureEbsPayment", new captureEbsPayment());
2462 chandransh 720
      processMap_.put("captureHdfcPayment", new captureHdfcPayment());
721
      processMap_.put("initializeHdfcPayment", new initializeHdfcPayment());
2690 chandransh 722
      processMap_.put("createRefund", new createRefund());
3010 chandransh 723
      processMap_.put("capturePayment", new capturePayment());
123 ashish 724
    }
725
 
726
    protected static interface ProcessFunction {
727
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
728
    }
729
 
730
    private Iface iface_;
731
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
732
 
733
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
734
    {
735
      TMessage msg = iprot.readMessageBegin();
736
      ProcessFunction fn = processMap_.get(msg.name);
737
      if (fn == null) {
738
        TProtocolUtil.skip(iprot, TType.STRUCT);
739
        iprot.readMessageEnd();
740
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
741
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
742
        x.write(oprot);
743
        oprot.writeMessageEnd();
744
        oprot.getTransport().flush();
745
        return true;
746
      }
747
      fn.process(msg.seqid, iprot, oprot);
748
      return true;
749
    }
750
 
764 rajveer 751
    private class closeSession implements ProcessFunction {
752
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
753
      {
754
        closeSession_args args = new closeSession_args();
755
        args.read(iprot);
756
        iprot.readMessageEnd();
757
        closeSession_result result = new closeSession_result();
758
        iface_.closeSession();
759
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
760
        result.write(oprot);
761
        oprot.writeMessageEnd();
762
        oprot.getTransport().flush();
763
      }
764
 
765
    }
766
 
123 ashish 767
    private class createPayment implements ProcessFunction {
768
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
769
      {
770
        createPayment_args args = new createPayment_args();
771
        args.read(iprot);
772
        iprot.readMessageEnd();
773
        createPayment_result result = new createPayment_result();
774
        try {
695 rajveer 775
          result.success = iface_.createPayment(args.userId, args.amount, args.gatewayId, args.txnId);
420 ashish 776
          result.setSuccessIsSet(true);
123 ashish 777
        } catch (PaymentException pe) {
778
          result.pe = pe;
779
        } catch (Throwable th) {
780
          LOGGER.error("Internal error processing createPayment", th);
781
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createPayment");
782
          oprot.writeMessageBegin(new TMessage("createPayment", TMessageType.EXCEPTION, seqid));
783
          x.write(oprot);
784
          oprot.writeMessageEnd();
785
          oprot.getTransport().flush();
786
          return;
787
        }
788
        oprot.writeMessageBegin(new TMessage("createPayment", TMessageType.REPLY, seqid));
789
        result.write(oprot);
790
        oprot.writeMessageEnd();
791
        oprot.getTransport().flush();
792
      }
793
 
794
    }
795
 
796
    private class getPaymentsForUser implements ProcessFunction {
797
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
798
      {
799
        getPaymentsForUser_args args = new getPaymentsForUser_args();
800
        args.read(iprot);
801
        iprot.readMessageEnd();
802
        getPaymentsForUser_result result = new getPaymentsForUser_result();
803
        try {
695 rajveer 804
          result.success = iface_.getPaymentsForUser(args.userId, args.fromTime, args.toTime, args.status, args.gatewayId);
123 ashish 805
        } catch (PaymentException pe) {
806
          result.pe = pe;
807
        } catch (Throwable th) {
808
          LOGGER.error("Internal error processing getPaymentsForUser", th);
809
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPaymentsForUser");
810
          oprot.writeMessageBegin(new TMessage("getPaymentsForUser", TMessageType.EXCEPTION, seqid));
811
          x.write(oprot);
812
          oprot.writeMessageEnd();
813
          oprot.getTransport().flush();
814
          return;
815
        }
816
        oprot.writeMessageBegin(new TMessage("getPaymentsForUser", TMessageType.REPLY, seqid));
817
        result.write(oprot);
818
        oprot.writeMessageEnd();
819
        oprot.getTransport().flush();
820
      }
821
 
822
    }
823
 
824
    private class getPayments implements ProcessFunction {
825
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
826
      {
827
        getPayments_args args = new getPayments_args();
828
        args.read(iprot);
829
        iprot.readMessageEnd();
830
        getPayments_result result = new getPayments_result();
831
        try {
695 rajveer 832
          result.success = iface_.getPayments(args.fromTime, args.toTime, args.status, args.gatewayId);
123 ashish 833
        } catch (PaymentException pe) {
834
          result.pe = pe;
835
        } catch (Throwable th) {
836
          LOGGER.error("Internal error processing getPayments", th);
837
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPayments");
838
          oprot.writeMessageBegin(new TMessage("getPayments", TMessageType.EXCEPTION, seqid));
839
          x.write(oprot);
840
          oprot.writeMessageEnd();
841
          oprot.getTransport().flush();
842
          return;
843
        }
844
        oprot.writeMessageBegin(new TMessage("getPayments", TMessageType.REPLY, seqid));
845
        result.write(oprot);
846
        oprot.writeMessageEnd();
847
        oprot.getTransport().flush();
848
      }
849
 
850
    }
851
 
420 ashish 852
    private class getPaymentGateway implements ProcessFunction {
853
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
854
      {
855
        getPaymentGateway_args args = new getPaymentGateway_args();
856
        args.read(iprot);
857
        iprot.readMessageEnd();
858
        getPaymentGateway_result result = new getPaymentGateway_result();
859
        try {
860
          result.success = iface_.getPaymentGateway(args.id);
861
        } catch (PaymentException pe) {
862
          result.pe = pe;
863
        } catch (Throwable th) {
864
          LOGGER.error("Internal error processing getPaymentGateway", th);
865
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPaymentGateway");
866
          oprot.writeMessageBegin(new TMessage("getPaymentGateway", TMessageType.EXCEPTION, seqid));
867
          x.write(oprot);
868
          oprot.writeMessageEnd();
869
          oprot.getTransport().flush();
870
          return;
871
        }
872
        oprot.writeMessageBegin(new TMessage("getPaymentGateway", TMessageType.REPLY, seqid));
873
        result.write(oprot);
874
        oprot.writeMessageEnd();
875
        oprot.getTransport().flush();
876
      }
877
 
878
    }
879
 
695 rajveer 880
    private class getPayment implements ProcessFunction {
420 ashish 881
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
882
      {
695 rajveer 883
        getPayment_args args = new getPayment_args();
420 ashish 884
        args.read(iprot);
885
        iprot.readMessageEnd();
695 rajveer 886
        getPayment_result result = new getPayment_result();
420 ashish 887
        try {
695 rajveer 888
          result.success = iface_.getPayment(args.id);
420 ashish 889
        } catch (PaymentException pe) {
890
          result.pe = pe;
891
        } catch (Throwable th) {
695 rajveer 892
          LOGGER.error("Internal error processing getPayment", th);
893
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPayment");
894
          oprot.writeMessageBegin(new TMessage("getPayment", TMessageType.EXCEPTION, seqid));
420 ashish 895
          x.write(oprot);
896
          oprot.writeMessageEnd();
897
          oprot.getTransport().flush();
898
          return;
899
        }
695 rajveer 900
        oprot.writeMessageBegin(new TMessage("getPayment", TMessageType.REPLY, seqid));
420 ashish 901
        result.write(oprot);
902
        oprot.writeMessageEnd();
903
        oprot.getTransport().flush();
904
      }
905
 
906
    }
907
 
695 rajveer 908
    private class getPaymentForTxnId implements ProcessFunction {
420 ashish 909
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
910
      {
695 rajveer 911
        getPaymentForTxnId_args args = new getPaymentForTxnId_args();
420 ashish 912
        args.read(iprot);
913
        iprot.readMessageEnd();
695 rajveer 914
        getPaymentForTxnId_result result = new getPaymentForTxnId_result();
420 ashish 915
        try {
695 rajveer 916
          result.success = iface_.getPaymentForTxnId(args.txnId);
420 ashish 917
        } catch (PaymentException pe) {
918
          result.pe = pe;
919
        } catch (Throwable th) {
695 rajveer 920
          LOGGER.error("Internal error processing getPaymentForTxnId", th);
921
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getPaymentForTxnId");
922
          oprot.writeMessageBegin(new TMessage("getPaymentForTxnId", TMessageType.EXCEPTION, seqid));
420 ashish 923
          x.write(oprot);
924
          oprot.writeMessageEnd();
925
          oprot.getTransport().flush();
926
          return;
927
        }
695 rajveer 928
        oprot.writeMessageBegin(new TMessage("getPaymentForTxnId", TMessageType.REPLY, seqid));
420 ashish 929
        result.write(oprot);
930
        oprot.writeMessageEnd();
931
        oprot.getTransport().flush();
932
      }
933
 
934
    }
935
 
695 rajveer 936
    private class updatePaymentDetails implements ProcessFunction {
420 ashish 937
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
938
      {
695 rajveer 939
        updatePaymentDetails_args args = new updatePaymentDetails_args();
420 ashish 940
        args.read(iprot);
941
        iprot.readMessageEnd();
695 rajveer 942
        updatePaymentDetails_result result = new updatePaymentDetails_result();
420 ashish 943
        try {
1119 rajveer 944
          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 945
          result.setSuccessIsSet(true);
420 ashish 946
        } catch (PaymentException pe) {
947
          result.pe = pe;
948
        } catch (Throwable th) {
695 rajveer 949
          LOGGER.error("Internal error processing updatePaymentDetails", th);
950
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePaymentDetails");
951
          oprot.writeMessageBegin(new TMessage("updatePaymentDetails", TMessageType.EXCEPTION, seqid));
420 ashish 952
          x.write(oprot);
953
          oprot.writeMessageEnd();
954
          oprot.getTransport().flush();
955
          return;
956
        }
695 rajveer 957
        oprot.writeMessageBegin(new TMessage("updatePaymentDetails", TMessageType.REPLY, seqid));
420 ashish 958
        result.write(oprot);
959
        oprot.writeMessageEnd();
960
        oprot.getTransport().flush();
961
      }
962
 
963
    }
964
 
1731 ankur.sing 965
    private class getSuccessfulPaymentsAmountRange implements ProcessFunction {
1629 ankur.sing 966
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
967
      {
1731 ankur.sing 968
        getSuccessfulPaymentsAmountRange_args args = new getSuccessfulPaymentsAmountRange_args();
1629 ankur.sing 969
        args.read(iprot);
970
        iprot.readMessageEnd();
1731 ankur.sing 971
        getSuccessfulPaymentsAmountRange_result result = new getSuccessfulPaymentsAmountRange_result();
972
        result.success = iface_.getSuccessfulPaymentsAmountRange();
973
        oprot.writeMessageBegin(new TMessage("getSuccessfulPaymentsAmountRange", TMessageType.REPLY, seqid));
1629 ankur.sing 974
        result.write(oprot);
975
        oprot.writeMessageEnd();
976
        oprot.getTransport().flush();
977
      }
978
 
979
    }
980
 
2708 chandransh 981
    private class captureEbsPayment implements ProcessFunction {
982
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
983
      {
984
        captureEbsPayment_args args = new captureEbsPayment_args();
985
        args.read(iprot);
986
        iprot.readMessageEnd();
987
        captureEbsPayment_result result = new captureEbsPayment_result();
988
        try {
989
          result.success = iface_.captureEbsPayment(args.merchantPaymentId);
990
        } catch (PaymentException pe) {
991
          result.pe = pe;
992
        } catch (Throwable th) {
993
          LOGGER.error("Internal error processing captureEbsPayment", th);
994
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing captureEbsPayment");
995
          oprot.writeMessageBegin(new TMessage("captureEbsPayment", TMessageType.EXCEPTION, seqid));
996
          x.write(oprot);
997
          oprot.writeMessageEnd();
998
          oprot.getTransport().flush();
999
          return;
1000
        }
1001
        oprot.writeMessageBegin(new TMessage("captureEbsPayment", TMessageType.REPLY, seqid));
1002
        result.write(oprot);
1003
        oprot.writeMessageEnd();
1004
        oprot.getTransport().flush();
1005
      }
1006
 
1007
    }
1008
 
2462 chandransh 1009
    private class captureHdfcPayment implements ProcessFunction {
1010
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1011
      {
1012
        captureHdfcPayment_args args = new captureHdfcPayment_args();
1013
        args.read(iprot);
1014
        iprot.readMessageEnd();
1015
        captureHdfcPayment_result result = new captureHdfcPayment_result();
1016
        try {
1017
          result.success = iface_.captureHdfcPayment(args.merchantPaymentId);
1018
        } catch (PaymentException pe) {
1019
          result.pe = pe;
1020
        } catch (Throwable th) {
1021
          LOGGER.error("Internal error processing captureHdfcPayment", th);
1022
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing captureHdfcPayment");
1023
          oprot.writeMessageBegin(new TMessage("captureHdfcPayment", TMessageType.EXCEPTION, seqid));
1024
          x.write(oprot);
1025
          oprot.writeMessageEnd();
1026
          oprot.getTransport().flush();
1027
          return;
1028
        }
1029
        oprot.writeMessageBegin(new TMessage("captureHdfcPayment", TMessageType.REPLY, seqid));
1030
        result.write(oprot);
1031
        oprot.writeMessageEnd();
1032
        oprot.getTransport().flush();
1033
      }
1034
 
1035
    }
1036
 
1037
    private class initializeHdfcPayment implements ProcessFunction {
1038
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1039
      {
1040
        initializeHdfcPayment_args args = new initializeHdfcPayment_args();
1041
        args.read(iprot);
1042
        iprot.readMessageEnd();
1043
        initializeHdfcPayment_result result = new initializeHdfcPayment_result();
1044
        try {
1045
          result.success = iface_.initializeHdfcPayment(args.merchantPaymentId);
1046
        } catch (PaymentException pe) {
1047
          result.pe = pe;
1048
        } catch (Throwable th) {
1049
          LOGGER.error("Internal error processing initializeHdfcPayment", th);
1050
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing initializeHdfcPayment");
1051
          oprot.writeMessageBegin(new TMessage("initializeHdfcPayment", TMessageType.EXCEPTION, seqid));
1052
          x.write(oprot);
1053
          oprot.writeMessageEnd();
1054
          oprot.getTransport().flush();
1055
          return;
1056
        }
1057
        oprot.writeMessageBegin(new TMessage("initializeHdfcPayment", TMessageType.REPLY, seqid));
1058
        result.write(oprot);
1059
        oprot.writeMessageEnd();
1060
        oprot.getTransport().flush();
1061
      }
1062
 
1063
    }
1064
 
2690 chandransh 1065
    private class createRefund implements ProcessFunction {
1066
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1067
      {
1068
        createRefund_args args = new createRefund_args();
1069
        args.read(iprot);
1070
        iprot.readMessageEnd();
1071
        createRefund_result result = new createRefund_result();
1072
        try {
1073
          result.success = iface_.createRefund(args.orderId, args.merchantTxnId, args.amount);
1074
          result.setSuccessIsSet(true);
1075
        } catch (PaymentException pe) {
1076
          result.pe = pe;
1077
        } catch (Throwable th) {
1078
          LOGGER.error("Internal error processing createRefund", th);
1079
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createRefund");
1080
          oprot.writeMessageBegin(new TMessage("createRefund", TMessageType.EXCEPTION, seqid));
1081
          x.write(oprot);
1082
          oprot.writeMessageEnd();
1083
          oprot.getTransport().flush();
1084
          return;
1085
        }
1086
        oprot.writeMessageBegin(new TMessage("createRefund", TMessageType.REPLY, seqid));
1087
        result.write(oprot);
1088
        oprot.writeMessageEnd();
1089
        oprot.getTransport().flush();
1090
      }
1091
 
1092
    }
1093
 
3010 chandransh 1094
    private class capturePayment implements ProcessFunction {
1095
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1096
      {
1097
        capturePayment_args args = new capturePayment_args();
1098
        args.read(iprot);
1099
        iprot.readMessageEnd();
1100
        capturePayment_result result = new capturePayment_result();
1101
        try {
1102
          result.success = iface_.capturePayment(args.merchantTxnId);
1103
          result.setSuccessIsSet(true);
1104
        } catch (PaymentException pe) {
1105
          result.pe = pe;
1106
        } catch (Throwable th) {
1107
          LOGGER.error("Internal error processing capturePayment", th);
1108
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing capturePayment");
1109
          oprot.writeMessageBegin(new TMessage("capturePayment", TMessageType.EXCEPTION, seqid));
1110
          x.write(oprot);
1111
          oprot.writeMessageEnd();
1112
          oprot.getTransport().flush();
1113
          return;
1114
        }
1115
        oprot.writeMessageBegin(new TMessage("capturePayment", TMessageType.REPLY, seqid));
1116
        result.write(oprot);
1117
        oprot.writeMessageEnd();
1118
        oprot.getTransport().flush();
1119
      }
1120
 
1121
    }
1122
 
123 ashish 1123
  }
1124
 
764 rajveer 1125
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
1126
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
1127
 
1128
 
1129
 
1130
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1131
    public enum _Fields implements TFieldIdEnum {
1132
;
1133
 
1134
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1135
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1136
 
1137
      static {
1138
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1139
          byId.put((int)field._thriftId, field);
1140
          byName.put(field.getFieldName(), field);
1141
        }
1142
      }
1143
 
1144
      /**
1145
       * Find the _Fields constant that matches fieldId, or null if its not found.
1146
       */
1147
      public static _Fields findByThriftId(int fieldId) {
1148
        return byId.get(fieldId);
1149
      }
1150
 
1151
      /**
1152
       * Find the _Fields constant that matches fieldId, throwing an exception
1153
       * if it is not found.
1154
       */
1155
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1156
        _Fields fields = findByThriftId(fieldId);
1157
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1158
        return fields;
1159
      }
1160
 
1161
      /**
1162
       * Find the _Fields constant that matches name, or null if its not found.
1163
       */
1164
      public static _Fields findByName(String name) {
1165
        return byName.get(name);
1166
      }
1167
 
1168
      private final short _thriftId;
1169
      private final String _fieldName;
1170
 
1171
      _Fields(short thriftId, String fieldName) {
1172
        _thriftId = thriftId;
1173
        _fieldName = fieldName;
1174
      }
1175
 
1176
      public short getThriftFieldId() {
1177
        return _thriftId;
1178
      }
1179
 
1180
      public String getFieldName() {
1181
        return _fieldName;
1182
      }
1183
    }
1184
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1185
    }});
1186
 
1187
    static {
1188
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
1189
    }
1190
 
1191
    public closeSession_args() {
1192
    }
1193
 
1194
    /**
1195
     * Performs a deep copy on <i>other</i>.
1196
     */
1197
    public closeSession_args(closeSession_args other) {
1198
    }
1199
 
1200
    public closeSession_args deepCopy() {
1201
      return new closeSession_args(this);
1202
    }
1203
 
1204
    @Deprecated
1205
    public closeSession_args clone() {
1206
      return new closeSession_args(this);
1207
    }
1208
 
1209
    public void setFieldValue(_Fields field, Object value) {
1210
      switch (field) {
1211
      }
1212
    }
1213
 
1214
    public void setFieldValue(int fieldID, Object value) {
1215
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1216
    }
1217
 
1218
    public Object getFieldValue(_Fields field) {
1219
      switch (field) {
1220
      }
1221
      throw new IllegalStateException();
1222
    }
1223
 
1224
    public Object getFieldValue(int fieldId) {
1225
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1226
    }
1227
 
1228
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1229
    public boolean isSet(_Fields field) {
1230
      switch (field) {
1231
      }
1232
      throw new IllegalStateException();
1233
    }
1234
 
1235
    public boolean isSet(int fieldID) {
1236
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1237
    }
1238
 
1239
    @Override
1240
    public boolean equals(Object that) {
1241
      if (that == null)
1242
        return false;
1243
      if (that instanceof closeSession_args)
1244
        return this.equals((closeSession_args)that);
1245
      return false;
1246
    }
1247
 
1248
    public boolean equals(closeSession_args that) {
1249
      if (that == null)
1250
        return false;
1251
 
1252
      return true;
1253
    }
1254
 
1255
    @Override
1256
    public int hashCode() {
1257
      return 0;
1258
    }
1259
 
1260
    public int compareTo(closeSession_args other) {
1261
      if (!getClass().equals(other.getClass())) {
1262
        return getClass().getName().compareTo(other.getClass().getName());
1263
      }
1264
 
1265
      int lastComparison = 0;
1266
      closeSession_args typedOther = (closeSession_args)other;
1267
 
1268
      return 0;
1269
    }
1270
 
1271
    public void read(TProtocol iprot) throws TException {
1272
      TField field;
1273
      iprot.readStructBegin();
1274
      while (true)
1275
      {
1276
        field = iprot.readFieldBegin();
1277
        if (field.type == TType.STOP) { 
1278
          break;
1279
        }
1280
        _Fields fieldId = _Fields.findByThriftId(field.id);
1281
        if (fieldId == null) {
1282
          TProtocolUtil.skip(iprot, field.type);
1283
        } else {
1284
          switch (fieldId) {
1285
          }
1286
          iprot.readFieldEnd();
1287
        }
1288
      }
1289
      iprot.readStructEnd();
1290
      validate();
1291
    }
1292
 
1293
    public void write(TProtocol oprot) throws TException {
1294
      validate();
1295
 
1296
      oprot.writeStructBegin(STRUCT_DESC);
1297
      oprot.writeFieldStop();
1298
      oprot.writeStructEnd();
1299
    }
1300
 
1301
    @Override
1302
    public String toString() {
1303
      StringBuilder sb = new StringBuilder("closeSession_args(");
1304
      boolean first = true;
1305
 
1306
      sb.append(")");
1307
      return sb.toString();
1308
    }
1309
 
1310
    public void validate() throws TException {
1311
      // check for required fields
1312
    }
1313
 
1314
  }
1315
 
1316
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
1317
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
1318
 
1319
 
1320
 
1321
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1322
    public enum _Fields implements TFieldIdEnum {
1323
;
1324
 
1325
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1326
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1327
 
1328
      static {
1329
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1330
          byId.put((int)field._thriftId, field);
1331
          byName.put(field.getFieldName(), field);
1332
        }
1333
      }
1334
 
1335
      /**
1336
       * Find the _Fields constant that matches fieldId, or null if its not found.
1337
       */
1338
      public static _Fields findByThriftId(int fieldId) {
1339
        return byId.get(fieldId);
1340
      }
1341
 
1342
      /**
1343
       * Find the _Fields constant that matches fieldId, throwing an exception
1344
       * if it is not found.
1345
       */
1346
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1347
        _Fields fields = findByThriftId(fieldId);
1348
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1349
        return fields;
1350
      }
1351
 
1352
      /**
1353
       * Find the _Fields constant that matches name, or null if its not found.
1354
       */
1355
      public static _Fields findByName(String name) {
1356
        return byName.get(name);
1357
      }
1358
 
1359
      private final short _thriftId;
1360
      private final String _fieldName;
1361
 
1362
      _Fields(short thriftId, String fieldName) {
1363
        _thriftId = thriftId;
1364
        _fieldName = fieldName;
1365
      }
1366
 
1367
      public short getThriftFieldId() {
1368
        return _thriftId;
1369
      }
1370
 
1371
      public String getFieldName() {
1372
        return _fieldName;
1373
      }
1374
    }
1375
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
1376
    }});
1377
 
1378
    static {
1379
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
1380
    }
1381
 
1382
    public closeSession_result() {
1383
    }
1384
 
1385
    /**
1386
     * Performs a deep copy on <i>other</i>.
1387
     */
1388
    public closeSession_result(closeSession_result other) {
1389
    }
1390
 
1391
    public closeSession_result deepCopy() {
1392
      return new closeSession_result(this);
1393
    }
1394
 
1395
    @Deprecated
1396
    public closeSession_result clone() {
1397
      return new closeSession_result(this);
1398
    }
1399
 
1400
    public void setFieldValue(_Fields field, Object value) {
1401
      switch (field) {
1402
      }
1403
    }
1404
 
1405
    public void setFieldValue(int fieldID, Object value) {
1406
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1407
    }
1408
 
1409
    public Object getFieldValue(_Fields field) {
1410
      switch (field) {
1411
      }
1412
      throw new IllegalStateException();
1413
    }
1414
 
1415
    public Object getFieldValue(int fieldId) {
1416
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1417
    }
1418
 
1419
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1420
    public boolean isSet(_Fields field) {
1421
      switch (field) {
1422
      }
1423
      throw new IllegalStateException();
1424
    }
1425
 
1426
    public boolean isSet(int fieldID) {
1427
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1428
    }
1429
 
1430
    @Override
1431
    public boolean equals(Object that) {
1432
      if (that == null)
1433
        return false;
1434
      if (that instanceof closeSession_result)
1435
        return this.equals((closeSession_result)that);
1436
      return false;
1437
    }
1438
 
1439
    public boolean equals(closeSession_result that) {
1440
      if (that == null)
1441
        return false;
1442
 
1443
      return true;
1444
    }
1445
 
1446
    @Override
1447
    public int hashCode() {
1448
      return 0;
1449
    }
1450
 
1451
    public int compareTo(closeSession_result other) {
1452
      if (!getClass().equals(other.getClass())) {
1453
        return getClass().getName().compareTo(other.getClass().getName());
1454
      }
1455
 
1456
      int lastComparison = 0;
1457
      closeSession_result typedOther = (closeSession_result)other;
1458
 
1459
      return 0;
1460
    }
1461
 
1462
    public void read(TProtocol iprot) throws TException {
1463
      TField field;
1464
      iprot.readStructBegin();
1465
      while (true)
1466
      {
1467
        field = iprot.readFieldBegin();
1468
        if (field.type == TType.STOP) { 
1469
          break;
1470
        }
1471
        _Fields fieldId = _Fields.findByThriftId(field.id);
1472
        if (fieldId == null) {
1473
          TProtocolUtil.skip(iprot, field.type);
1474
        } else {
1475
          switch (fieldId) {
1476
          }
1477
          iprot.readFieldEnd();
1478
        }
1479
      }
1480
      iprot.readStructEnd();
1481
      validate();
1482
    }
1483
 
1484
    public void write(TProtocol oprot) throws TException {
1485
      oprot.writeStructBegin(STRUCT_DESC);
1486
 
1487
      oprot.writeFieldStop();
1488
      oprot.writeStructEnd();
1489
    }
1490
 
1491
    @Override
1492
    public String toString() {
1493
      StringBuilder sb = new StringBuilder("closeSession_result(");
1494
      boolean first = true;
1495
 
1496
      sb.append(")");
1497
      return sb.toString();
1498
    }
1499
 
1500
    public void validate() throws TException {
1501
      // check for required fields
1502
    }
1503
 
1504
  }
1505
 
123 ashish 1506
  public static class createPayment_args implements TBase<createPayment_args._Fields>, java.io.Serializable, Cloneable, Comparable<createPayment_args>   {
1507
    private static final TStruct STRUCT_DESC = new TStruct("createPayment_args");
1508
 
695 rajveer 1509
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
1510
    private static final TField AMOUNT_FIELD_DESC = new TField("amount", TType.DOUBLE, (short)2);
1511
    private static final TField GATEWAY_ID_FIELD_DESC = new TField("gatewayId", TType.I64, (short)3);
1512
    private static final TField TXN_ID_FIELD_DESC = new TField("txnId", TType.I64, (short)4);
123 ashish 1513
 
695 rajveer 1514
    private long userId;
123 ashish 1515
    private double amount;
695 rajveer 1516
    private long gatewayId;
1517
    private long txnId;
123 ashish 1518
 
1519
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
1520
    public enum _Fields implements TFieldIdEnum {
695 rajveer 1521
      USER_ID((short)1, "userId"),
1522
      AMOUNT((short)2, "amount"),
1523
      GATEWAY_ID((short)3, "gatewayId"),
1524
      TXN_ID((short)4, "txnId");
123 ashish 1525
 
1526
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
1527
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
1528
 
1529
      static {
1530
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
1531
          byId.put((int)field._thriftId, field);
1532
          byName.put(field.getFieldName(), field);
1533
        }
1534
      }
1535
 
1536
      /**
1537
       * Find the _Fields constant that matches fieldId, or null if its not found.
1538
       */
1539
      public static _Fields findByThriftId(int fieldId) {
1540
        return byId.get(fieldId);
1541
      }
1542
 
1543
      /**
1544
       * Find the _Fields constant that matches fieldId, throwing an exception
1545
       * if it is not found.
1546
       */
1547
      public static _Fields findByThriftIdOrThrow(int fieldId) {
1548
        _Fields fields = findByThriftId(fieldId);
1549
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
1550
        return fields;
1551
      }
1552
 
1553
      /**
1554
       * Find the _Fields constant that matches name, or null if its not found.
1555
       */
1556
      public static _Fields findByName(String name) {
1557
        return byName.get(name);
1558
      }
1559
 
1560
      private final short _thriftId;
1561
      private final String _fieldName;
1562
 
1563
      _Fields(short thriftId, String fieldName) {
1564
        _thriftId = thriftId;
1565
        _fieldName = fieldName;
1566
      }
1567
 
1568
      public short getThriftFieldId() {
1569
        return _thriftId;
1570
      }
1571
 
1572
      public String getFieldName() {
1573
        return _fieldName;
1574
      }
1575
    }
1576
 
1577
    // isset id assignments
695 rajveer 1578
    private static final int __USERID_ISSET_ID = 0;
1579
    private static final int __AMOUNT_ISSET_ID = 1;
1580
    private static final int __GATEWAYID_ISSET_ID = 2;
1581
    private static final int __TXNID_ISSET_ID = 3;
420 ashish 1582
    private BitSet __isset_bit_vector = new BitSet(4);
123 ashish 1583
 
1584
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
695 rajveer 1585
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
123 ashish 1586
          new FieldValueMetaData(TType.I64)));
1587
      put(_Fields.AMOUNT, new FieldMetaData("amount", TFieldRequirementType.DEFAULT, 
1588
          new FieldValueMetaData(TType.DOUBLE)));
695 rajveer 1589
      put(_Fields.GATEWAY_ID, new FieldMetaData("gatewayId", TFieldRequirementType.DEFAULT, 
420 ashish 1590
          new FieldValueMetaData(TType.I64)));
695 rajveer 1591
      put(_Fields.TXN_ID, new FieldMetaData("txnId", TFieldRequirementType.DEFAULT, 
1592
          new FieldValueMetaData(TType.I64)));
123 ashish 1593
    }});
1594
 
1595
    static {
1596
      FieldMetaData.addStructMetaDataMap(createPayment_args.class, metaDataMap);
1597
    }
1598
 
1599
    public createPayment_args() {
1600
    }
1601
 
1602
    public createPayment_args(
695 rajveer 1603
      long userId,
123 ashish 1604
      double amount,
695 rajveer 1605
      long gatewayId,
1606
      long txnId)
123 ashish 1607
    {
1608
      this();
695 rajveer 1609
      this.userId = userId;
1610
      setUserIdIsSet(true);
123 ashish 1611
      this.amount = amount;
1612
      setAmountIsSet(true);
695 rajveer 1613
      this.gatewayId = gatewayId;
1614
      setGatewayIdIsSet(true);
1615
      this.txnId = txnId;
1616
      setTxnIdIsSet(true);
123 ashish 1617
    }
1618
 
1619
    /**
1620
     * Performs a deep copy on <i>other</i>.
1621
     */
1622
    public createPayment_args(createPayment_args other) {
1623
      __isset_bit_vector.clear();
1624
      __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 1625
      this.userId = other.userId;
123 ashish 1626
      this.amount = other.amount;
695 rajveer 1627
      this.gatewayId = other.gatewayId;
1628
      this.txnId = other.txnId;
123 ashish 1629
    }
1630
 
1631
    public createPayment_args deepCopy() {
1632
      return new createPayment_args(this);
1633
    }
1634
 
1635
    @Deprecated
1636
    public createPayment_args clone() {
1637
      return new createPayment_args(this);
1638
    }
1639
 
695 rajveer 1640
    public long getUserId() {
1641
      return this.userId;
123 ashish 1642
    }
1643
 
695 rajveer 1644
    public createPayment_args setUserId(long userId) {
1645
      this.userId = userId;
1646
      setUserIdIsSet(true);
123 ashish 1647
      return this;
1648
    }
1649
 
695 rajveer 1650
    public void unsetUserId() {
1651
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 1652
    }
1653
 
695 rajveer 1654
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
1655
    public boolean isSetUserId() {
1656
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 1657
    }
1658
 
695 rajveer 1659
    public void setUserIdIsSet(boolean value) {
1660
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
123 ashish 1661
    }
1662
 
1663
    public double getAmount() {
1664
      return this.amount;
1665
    }
1666
 
1667
    public createPayment_args setAmount(double amount) {
1668
      this.amount = amount;
1669
      setAmountIsSet(true);
1670
      return this;
1671
    }
1672
 
1673
    public void unsetAmount() {
1674
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
1675
    }
1676
 
1677
    /** Returns true if field amount is set (has been asigned a value) and false otherwise */
1678
    public boolean isSetAmount() {
1679
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
1680
    }
1681
 
1682
    public void setAmountIsSet(boolean value) {
1683
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
1684
    }
1685
 
695 rajveer 1686
    public long getGatewayId() {
1687
      return this.gatewayId;
123 ashish 1688
    }
1689
 
695 rajveer 1690
    public createPayment_args setGatewayId(long gatewayId) {
1691
      this.gatewayId = gatewayId;
1692
      setGatewayIdIsSet(true);
123 ashish 1693
      return this;
1694
    }
1695
 
695 rajveer 1696
    public void unsetGatewayId() {
1697
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 1698
    }
1699
 
695 rajveer 1700
    /** Returns true if field gatewayId is set (has been asigned a value) and false otherwise */
1701
    public boolean isSetGatewayId() {
1702
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 1703
    }
1704
 
695 rajveer 1705
    public void setGatewayIdIsSet(boolean value) {
1706
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
123 ashish 1707
    }
1708
 
695 rajveer 1709
    public long getTxnId() {
1710
      return this.txnId;
1711
    }
1712
 
1713
    public createPayment_args setTxnId(long txnId) {
1714
      this.txnId = txnId;
1715
      setTxnIdIsSet(true);
1716
      return this;
1717
    }
1718
 
1719
    public void unsetTxnId() {
1720
      __isset_bit_vector.clear(__TXNID_ISSET_ID);
1721
    }
1722
 
1723
    /** Returns true if field txnId is set (has been asigned a value) and false otherwise */
1724
    public boolean isSetTxnId() {
1725
      return __isset_bit_vector.get(__TXNID_ISSET_ID);
1726
    }
1727
 
1728
    public void setTxnIdIsSet(boolean value) {
1729
      __isset_bit_vector.set(__TXNID_ISSET_ID, value);
1730
    }
1731
 
123 ashish 1732
    public void setFieldValue(_Fields field, Object value) {
1733
      switch (field) {
1734
      case USER_ID:
1735
        if (value == null) {
695 rajveer 1736
          unsetUserId();
123 ashish 1737
        } else {
695 rajveer 1738
          setUserId((Long)value);
123 ashish 1739
        }
1740
        break;
1741
 
695 rajveer 1742
      case AMOUNT:
123 ashish 1743
        if (value == null) {
695 rajveer 1744
          unsetAmount();
123 ashish 1745
        } else {
695 rajveer 1746
          setAmount((Double)value);
123 ashish 1747
        }
1748
        break;
1749
 
695 rajveer 1750
      case GATEWAY_ID:
123 ashish 1751
        if (value == null) {
695 rajveer 1752
          unsetGatewayId();
123 ashish 1753
        } else {
695 rajveer 1754
          setGatewayId((Long)value);
123 ashish 1755
        }
1756
        break;
1757
 
695 rajveer 1758
      case TXN_ID:
123 ashish 1759
        if (value == null) {
695 rajveer 1760
          unsetTxnId();
123 ashish 1761
        } else {
695 rajveer 1762
          setTxnId((Long)value);
123 ashish 1763
        }
1764
        break;
1765
 
1766
      }
1767
    }
1768
 
1769
    public void setFieldValue(int fieldID, Object value) {
1770
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
1771
    }
1772
 
1773
    public Object getFieldValue(_Fields field) {
1774
      switch (field) {
1775
      case USER_ID:
695 rajveer 1776
        return new Long(getUserId());
123 ashish 1777
 
1778
      case AMOUNT:
1779
        return new Double(getAmount());
1780
 
420 ashish 1781
      case GATEWAY_ID:
695 rajveer 1782
        return new Long(getGatewayId());
123 ashish 1783
 
695 rajveer 1784
      case TXN_ID:
1785
        return new Long(getTxnId());
1786
 
123 ashish 1787
      }
1788
      throw new IllegalStateException();
1789
    }
1790
 
1791
    public Object getFieldValue(int fieldId) {
1792
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
1793
    }
1794
 
1795
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
1796
    public boolean isSet(_Fields field) {
1797
      switch (field) {
1798
      case USER_ID:
695 rajveer 1799
        return isSetUserId();
123 ashish 1800
      case AMOUNT:
1801
        return isSetAmount();
420 ashish 1802
      case GATEWAY_ID:
695 rajveer 1803
        return isSetGatewayId();
1804
      case TXN_ID:
1805
        return isSetTxnId();
123 ashish 1806
      }
1807
      throw new IllegalStateException();
1808
    }
1809
 
1810
    public boolean isSet(int fieldID) {
1811
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
1812
    }
1813
 
1814
    @Override
1815
    public boolean equals(Object that) {
1816
      if (that == null)
1817
        return false;
1818
      if (that instanceof createPayment_args)
1819
        return this.equals((createPayment_args)that);
1820
      return false;
1821
    }
1822
 
1823
    public boolean equals(createPayment_args that) {
1824
      if (that == null)
1825
        return false;
1826
 
695 rajveer 1827
      boolean this_present_userId = true;
1828
      boolean that_present_userId = true;
1829
      if (this_present_userId || that_present_userId) {
1830
        if (!(this_present_userId && that_present_userId))
123 ashish 1831
          return false;
695 rajveer 1832
        if (this.userId != that.userId)
123 ashish 1833
          return false;
1834
      }
1835
 
1836
      boolean this_present_amount = true;
1837
      boolean that_present_amount = true;
1838
      if (this_present_amount || that_present_amount) {
1839
        if (!(this_present_amount && that_present_amount))
1840
          return false;
1841
        if (this.amount != that.amount)
1842
          return false;
1843
      }
1844
 
695 rajveer 1845
      boolean this_present_gatewayId = true;
1846
      boolean that_present_gatewayId = true;
1847
      if (this_present_gatewayId || that_present_gatewayId) {
1848
        if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 1849
          return false;
695 rajveer 1850
        if (this.gatewayId != that.gatewayId)
123 ashish 1851
          return false;
1852
      }
1853
 
695 rajveer 1854
      boolean this_present_txnId = true;
1855
      boolean that_present_txnId = true;
1856
      if (this_present_txnId || that_present_txnId) {
1857
        if (!(this_present_txnId && that_present_txnId))
1858
          return false;
1859
        if (this.txnId != that.txnId)
1860
          return false;
1861
      }
1862
 
123 ashish 1863
      return true;
1864
    }
1865
 
1866
    @Override
1867
    public int hashCode() {
1868
      return 0;
1869
    }
1870
 
1871
    public int compareTo(createPayment_args other) {
1872
      if (!getClass().equals(other.getClass())) {
1873
        return getClass().getName().compareTo(other.getClass().getName());
1874
      }
1875
 
1876
      int lastComparison = 0;
1877
      createPayment_args typedOther = (createPayment_args)other;
1878
 
695 rajveer 1879
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
123 ashish 1880
      if (lastComparison != 0) {
1881
        return lastComparison;
1882
      }
695 rajveer 1883
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
123 ashish 1884
      if (lastComparison != 0) {
1885
        return lastComparison;
1886
      }
695 rajveer 1887
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(isSetAmount());
123 ashish 1888
      if (lastComparison != 0) {
1889
        return lastComparison;
1890
      }
695 rajveer 1891
      lastComparison = TBaseHelper.compareTo(amount, typedOther.amount);
123 ashish 1892
      if (lastComparison != 0) {
1893
        return lastComparison;
1894
      }
695 rajveer 1895
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(isSetGatewayId());
123 ashish 1896
      if (lastComparison != 0) {
1897
        return lastComparison;
1898
      }
695 rajveer 1899
      lastComparison = TBaseHelper.compareTo(gatewayId, typedOther.gatewayId);
123 ashish 1900
      if (lastComparison != 0) {
1901
        return lastComparison;
1902
      }
695 rajveer 1903
      lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(isSetTxnId());
123 ashish 1904
      if (lastComparison != 0) {
1905
        return lastComparison;
1906
      }
695 rajveer 1907
      lastComparison = TBaseHelper.compareTo(txnId, typedOther.txnId);
123 ashish 1908
      if (lastComparison != 0) {
1909
        return lastComparison;
1910
      }
1911
      return 0;
1912
    }
1913
 
1914
    public void read(TProtocol iprot) throws TException {
1915
      TField field;
1916
      iprot.readStructBegin();
1917
      while (true)
1918
      {
1919
        field = iprot.readFieldBegin();
1920
        if (field.type == TType.STOP) { 
1921
          break;
1922
        }
1923
        _Fields fieldId = _Fields.findByThriftId(field.id);
1924
        if (fieldId == null) {
1925
          TProtocolUtil.skip(iprot, field.type);
1926
        } else {
1927
          switch (fieldId) {
1928
            case USER_ID:
1929
              if (field.type == TType.I64) {
695 rajveer 1930
                this.userId = iprot.readI64();
1931
                setUserIdIsSet(true);
123 ashish 1932
              } else { 
1933
                TProtocolUtil.skip(iprot, field.type);
1934
              }
1935
              break;
1936
            case AMOUNT:
1937
              if (field.type == TType.DOUBLE) {
1938
                this.amount = iprot.readDouble();
1939
                setAmountIsSet(true);
1940
              } else { 
1941
                TProtocolUtil.skip(iprot, field.type);
1942
              }
1943
              break;
420 ashish 1944
            case GATEWAY_ID:
1945
              if (field.type == TType.I64) {
695 rajveer 1946
                this.gatewayId = iprot.readI64();
1947
                setGatewayIdIsSet(true);
123 ashish 1948
              } else { 
1949
                TProtocolUtil.skip(iprot, field.type);
1950
              }
1951
              break;
695 rajveer 1952
            case TXN_ID:
1953
              if (field.type == TType.I64) {
1954
                this.txnId = iprot.readI64();
1955
                setTxnIdIsSet(true);
1956
              } else { 
1957
                TProtocolUtil.skip(iprot, field.type);
1958
              }
1959
              break;
123 ashish 1960
          }
1961
          iprot.readFieldEnd();
1962
        }
1963
      }
1964
      iprot.readStructEnd();
1965
      validate();
1966
    }
1967
 
1968
    public void write(TProtocol oprot) throws TException {
1969
      validate();
1970
 
1971
      oprot.writeStructBegin(STRUCT_DESC);
1972
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
695 rajveer 1973
      oprot.writeI64(this.userId);
123 ashish 1974
      oprot.writeFieldEnd();
1975
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
1976
      oprot.writeDouble(this.amount);
1977
      oprot.writeFieldEnd();
420 ashish 1978
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
695 rajveer 1979
      oprot.writeI64(this.gatewayId);
420 ashish 1980
      oprot.writeFieldEnd();
695 rajveer 1981
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
1982
      oprot.writeI64(this.txnId);
1983
      oprot.writeFieldEnd();
123 ashish 1984
      oprot.writeFieldStop();
1985
      oprot.writeStructEnd();
1986
    }
1987
 
1988
    @Override
1989
    public String toString() {
1990
      StringBuilder sb = new StringBuilder("createPayment_args(");
1991
      boolean first = true;
1992
 
695 rajveer 1993
      sb.append("userId:");
1994
      sb.append(this.userId);
123 ashish 1995
      first = false;
1996
      if (!first) sb.append(", ");
1997
      sb.append("amount:");
1998
      sb.append(this.amount);
1999
      first = false;
2000
      if (!first) sb.append(", ");
695 rajveer 2001
      sb.append("gatewayId:");
2002
      sb.append(this.gatewayId);
123 ashish 2003
      first = false;
695 rajveer 2004
      if (!first) sb.append(", ");
2005
      sb.append("txnId:");
2006
      sb.append(this.txnId);
2007
      first = false;
123 ashish 2008
      sb.append(")");
2009
      return sb.toString();
2010
    }
2011
 
2012
    public void validate() throws TException {
2013
      // check for required fields
2014
    }
2015
 
2016
  }
2017
 
420 ashish 2018
  public static class createPayment_result implements TBase<createPayment_result._Fields>, java.io.Serializable, Cloneable, Comparable<createPayment_result>   {
123 ashish 2019
    private static final TStruct STRUCT_DESC = new TStruct("createPayment_result");
2020
 
420 ashish 2021
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
123 ashish 2022
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
2023
 
420 ashish 2024
    private long success;
123 ashish 2025
    private PaymentException pe;
2026
 
2027
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2028
    public enum _Fields implements TFieldIdEnum {
2029
      SUCCESS((short)0, "success"),
2030
      PE((short)1, "pe");
2031
 
2032
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2033
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2034
 
2035
      static {
2036
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2037
          byId.put((int)field._thriftId, field);
2038
          byName.put(field.getFieldName(), field);
2039
        }
2040
      }
2041
 
2042
      /**
2043
       * Find the _Fields constant that matches fieldId, or null if its not found.
2044
       */
2045
      public static _Fields findByThriftId(int fieldId) {
2046
        return byId.get(fieldId);
2047
      }
2048
 
2049
      /**
2050
       * Find the _Fields constant that matches fieldId, throwing an exception
2051
       * if it is not found.
2052
       */
2053
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2054
        _Fields fields = findByThriftId(fieldId);
2055
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2056
        return fields;
2057
      }
2058
 
2059
      /**
2060
       * Find the _Fields constant that matches name, or null if its not found.
2061
       */
2062
      public static _Fields findByName(String name) {
2063
        return byName.get(name);
2064
      }
2065
 
2066
      private final short _thriftId;
2067
      private final String _fieldName;
2068
 
2069
      _Fields(short thriftId, String fieldName) {
2070
        _thriftId = thriftId;
2071
        _fieldName = fieldName;
2072
      }
2073
 
2074
      public short getThriftFieldId() {
2075
        return _thriftId;
2076
      }
2077
 
2078
      public String getFieldName() {
2079
        return _fieldName;
2080
      }
2081
    }
2082
 
2083
    // isset id assignments
420 ashish 2084
    private static final int __SUCCESS_ISSET_ID = 0;
2085
    private BitSet __isset_bit_vector = new BitSet(1);
123 ashish 2086
 
2087
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2088
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
420 ashish 2089
          new FieldValueMetaData(TType.I64)));
123 ashish 2090
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
2091
          new FieldValueMetaData(TType.STRUCT)));
2092
    }});
2093
 
2094
    static {
2095
      FieldMetaData.addStructMetaDataMap(createPayment_result.class, metaDataMap);
2096
    }
2097
 
2098
    public createPayment_result() {
2099
    }
2100
 
2101
    public createPayment_result(
420 ashish 2102
      long success,
123 ashish 2103
      PaymentException pe)
2104
    {
2105
      this();
2106
      this.success = success;
420 ashish 2107
      setSuccessIsSet(true);
123 ashish 2108
      this.pe = pe;
2109
    }
2110
 
2111
    /**
2112
     * Performs a deep copy on <i>other</i>.
2113
     */
2114
    public createPayment_result(createPayment_result other) {
420 ashish 2115
      __isset_bit_vector.clear();
2116
      __isset_bit_vector.or(other.__isset_bit_vector);
2117
      this.success = other.success;
123 ashish 2118
      if (other.isSetPe()) {
2119
        this.pe = new PaymentException(other.pe);
2120
      }
2121
    }
2122
 
2123
    public createPayment_result deepCopy() {
2124
      return new createPayment_result(this);
2125
    }
2126
 
2127
    @Deprecated
2128
    public createPayment_result clone() {
2129
      return new createPayment_result(this);
2130
    }
2131
 
420 ashish 2132
    public long getSuccess() {
123 ashish 2133
      return this.success;
2134
    }
2135
 
420 ashish 2136
    public createPayment_result setSuccess(long success) {
123 ashish 2137
      this.success = success;
420 ashish 2138
      setSuccessIsSet(true);
123 ashish 2139
      return this;
2140
    }
2141
 
2142
    public void unsetSuccess() {
420 ashish 2143
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 2144
    }
2145
 
2146
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
2147
    public boolean isSetSuccess() {
420 ashish 2148
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 2149
    }
2150
 
2151
    public void setSuccessIsSet(boolean value) {
420 ashish 2152
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
123 ashish 2153
    }
2154
 
2155
    public PaymentException getPe() {
2156
      return this.pe;
2157
    }
2158
 
2159
    public createPayment_result setPe(PaymentException pe) {
2160
      this.pe = pe;
2161
      return this;
2162
    }
2163
 
2164
    public void unsetPe() {
2165
      this.pe = null;
2166
    }
2167
 
2168
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
2169
    public boolean isSetPe() {
2170
      return this.pe != null;
2171
    }
2172
 
2173
    public void setPeIsSet(boolean value) {
2174
      if (!value) {
2175
        this.pe = null;
2176
      }
2177
    }
2178
 
2179
    public void setFieldValue(_Fields field, Object value) {
2180
      switch (field) {
2181
      case SUCCESS:
2182
        if (value == null) {
2183
          unsetSuccess();
2184
        } else {
420 ashish 2185
          setSuccess((Long)value);
123 ashish 2186
        }
2187
        break;
2188
 
2189
      case PE:
2190
        if (value == null) {
2191
          unsetPe();
2192
        } else {
2193
          setPe((PaymentException)value);
2194
        }
2195
        break;
2196
 
2197
      }
2198
    }
2199
 
2200
    public void setFieldValue(int fieldID, Object value) {
2201
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2202
    }
2203
 
2204
    public Object getFieldValue(_Fields field) {
2205
      switch (field) {
2206
      case SUCCESS:
420 ashish 2207
        return new Long(getSuccess());
123 ashish 2208
 
2209
      case PE:
2210
        return getPe();
2211
 
2212
      }
2213
      throw new IllegalStateException();
2214
    }
2215
 
2216
    public Object getFieldValue(int fieldId) {
2217
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2218
    }
2219
 
2220
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2221
    public boolean isSet(_Fields field) {
2222
      switch (field) {
2223
      case SUCCESS:
2224
        return isSetSuccess();
2225
      case PE:
2226
        return isSetPe();
2227
      }
2228
      throw new IllegalStateException();
2229
    }
2230
 
2231
    public boolean isSet(int fieldID) {
2232
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2233
    }
2234
 
2235
    @Override
2236
    public boolean equals(Object that) {
2237
      if (that == null)
2238
        return false;
2239
      if (that instanceof createPayment_result)
2240
        return this.equals((createPayment_result)that);
2241
      return false;
2242
    }
2243
 
2244
    public boolean equals(createPayment_result that) {
2245
      if (that == null)
2246
        return false;
2247
 
420 ashish 2248
      boolean this_present_success = true;
2249
      boolean that_present_success = true;
123 ashish 2250
      if (this_present_success || that_present_success) {
2251
        if (!(this_present_success && that_present_success))
2252
          return false;
420 ashish 2253
        if (this.success != that.success)
123 ashish 2254
          return false;
2255
      }
2256
 
2257
      boolean this_present_pe = true && this.isSetPe();
2258
      boolean that_present_pe = true && that.isSetPe();
2259
      if (this_present_pe || that_present_pe) {
2260
        if (!(this_present_pe && that_present_pe))
2261
          return false;
2262
        if (!this.pe.equals(that.pe))
2263
          return false;
2264
      }
2265
 
2266
      return true;
2267
    }
2268
 
2269
    @Override
2270
    public int hashCode() {
2271
      return 0;
2272
    }
2273
 
420 ashish 2274
    public int compareTo(createPayment_result other) {
2275
      if (!getClass().equals(other.getClass())) {
2276
        return getClass().getName().compareTo(other.getClass().getName());
2277
      }
2278
 
2279
      int lastComparison = 0;
2280
      createPayment_result typedOther = (createPayment_result)other;
2281
 
2282
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
2283
      if (lastComparison != 0) {
2284
        return lastComparison;
2285
      }
2286
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
2287
      if (lastComparison != 0) {
2288
        return lastComparison;
2289
      }
2290
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());
2291
      if (lastComparison != 0) {
2292
        return lastComparison;
2293
      }
2294
      lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);
2295
      if (lastComparison != 0) {
2296
        return lastComparison;
2297
      }
2298
      return 0;
2299
    }
2300
 
123 ashish 2301
    public void read(TProtocol iprot) throws TException {
2302
      TField field;
2303
      iprot.readStructBegin();
2304
      while (true)
2305
      {
2306
        field = iprot.readFieldBegin();
2307
        if (field.type == TType.STOP) { 
2308
          break;
2309
        }
2310
        _Fields fieldId = _Fields.findByThriftId(field.id);
2311
        if (fieldId == null) {
2312
          TProtocolUtil.skip(iprot, field.type);
2313
        } else {
2314
          switch (fieldId) {
2315
            case SUCCESS:
420 ashish 2316
              if (field.type == TType.I64) {
2317
                this.success = iprot.readI64();
2318
                setSuccessIsSet(true);
123 ashish 2319
              } else { 
2320
                TProtocolUtil.skip(iprot, field.type);
2321
              }
2322
              break;
2323
            case PE:
2324
              if (field.type == TType.STRUCT) {
2325
                this.pe = new PaymentException();
2326
                this.pe.read(iprot);
2327
              } else { 
2328
                TProtocolUtil.skip(iprot, field.type);
2329
              }
2330
              break;
2331
          }
2332
          iprot.readFieldEnd();
2333
        }
2334
      }
2335
      iprot.readStructEnd();
2336
      validate();
2337
    }
2338
 
2339
    public void write(TProtocol oprot) throws TException {
2340
      oprot.writeStructBegin(STRUCT_DESC);
2341
 
2342
      if (this.isSetSuccess()) {
2343
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
420 ashish 2344
        oprot.writeI64(this.success);
123 ashish 2345
        oprot.writeFieldEnd();
2346
      } else if (this.isSetPe()) {
2347
        oprot.writeFieldBegin(PE_FIELD_DESC);
2348
        this.pe.write(oprot);
2349
        oprot.writeFieldEnd();
2350
      }
2351
      oprot.writeFieldStop();
2352
      oprot.writeStructEnd();
2353
    }
2354
 
2355
    @Override
2356
    public String toString() {
2357
      StringBuilder sb = new StringBuilder("createPayment_result(");
2358
      boolean first = true;
2359
 
2360
      sb.append("success:");
420 ashish 2361
      sb.append(this.success);
123 ashish 2362
      first = false;
2363
      if (!first) sb.append(", ");
2364
      sb.append("pe:");
2365
      if (this.pe == null) {
2366
        sb.append("null");
2367
      } else {
2368
        sb.append(this.pe);
2369
      }
2370
      first = false;
2371
      sb.append(")");
2372
      return sb.toString();
2373
    }
2374
 
2375
    public void validate() throws TException {
2376
      // check for required fields
2377
    }
2378
 
2379
  }
2380
 
2381
  public static class getPaymentsForUser_args implements TBase<getPaymentsForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPaymentsForUser_args>   {
2382
    private static final TStruct STRUCT_DESC = new TStruct("getPaymentsForUser_args");
2383
 
2384
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
695 rajveer 2385
    private static final TField FROM_TIME_FIELD_DESC = new TField("fromTime", TType.I64, (short)2);
2386
    private static final TField TO_TIME_FIELD_DESC = new TField("toTime", TType.I64, (short)3);
123 ashish 2387
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
695 rajveer 2388
    private static final TField GATEWAY_ID_FIELD_DESC = new TField("gatewayId", TType.I64, (short)5);
123 ashish 2389
 
2390
    private long userId;
695 rajveer 2391
    private long fromTime;
2392
    private long toTime;
123 ashish 2393
    private PaymentStatus status;
695 rajveer 2394
    private long gatewayId;
123 ashish 2395
 
2396
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2397
    public enum _Fields implements TFieldIdEnum {
2398
      USER_ID((short)1, "userId"),
695 rajveer 2399
      FROM_TIME((short)2, "fromTime"),
2400
      TO_TIME((short)3, "toTime"),
123 ashish 2401
      /**
2402
       * 
2403
       * @see PaymentStatus
2404
       */
2405
      STATUS((short)4, "status"),
695 rajveer 2406
      GATEWAY_ID((short)5, "gatewayId");
123 ashish 2407
 
2408
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2409
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2410
 
2411
      static {
2412
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2413
          byId.put((int)field._thriftId, field);
2414
          byName.put(field.getFieldName(), field);
2415
        }
2416
      }
2417
 
2418
      /**
2419
       * Find the _Fields constant that matches fieldId, or null if its not found.
2420
       */
2421
      public static _Fields findByThriftId(int fieldId) {
2422
        return byId.get(fieldId);
2423
      }
2424
 
2425
      /**
2426
       * Find the _Fields constant that matches fieldId, throwing an exception
2427
       * if it is not found.
2428
       */
2429
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2430
        _Fields fields = findByThriftId(fieldId);
2431
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2432
        return fields;
2433
      }
2434
 
2435
      /**
2436
       * Find the _Fields constant that matches name, or null if its not found.
2437
       */
2438
      public static _Fields findByName(String name) {
2439
        return byName.get(name);
2440
      }
2441
 
2442
      private final short _thriftId;
2443
      private final String _fieldName;
2444
 
2445
      _Fields(short thriftId, String fieldName) {
2446
        _thriftId = thriftId;
2447
        _fieldName = fieldName;
2448
      }
2449
 
2450
      public short getThriftFieldId() {
2451
        return _thriftId;
2452
      }
2453
 
2454
      public String getFieldName() {
2455
        return _fieldName;
2456
      }
2457
    }
2458
 
2459
    // isset id assignments
2460
    private static final int __USERID_ISSET_ID = 0;
695 rajveer 2461
    private static final int __FROMTIME_ISSET_ID = 1;
2462
    private static final int __TOTIME_ISSET_ID = 2;
2463
    private static final int __GATEWAYID_ISSET_ID = 3;
420 ashish 2464
    private BitSet __isset_bit_vector = new BitSet(4);
123 ashish 2465
 
2466
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2467
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
2468
          new FieldValueMetaData(TType.I64)));
695 rajveer 2469
      put(_Fields.FROM_TIME, new FieldMetaData("fromTime", TFieldRequirementType.DEFAULT, 
123 ashish 2470
          new FieldValueMetaData(TType.I64)));
695 rajveer 2471
      put(_Fields.TO_TIME, new FieldMetaData("toTime", TFieldRequirementType.DEFAULT, 
123 ashish 2472
          new FieldValueMetaData(TType.I64)));
2473
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
2474
          new EnumMetaData(TType.ENUM, PaymentStatus.class)));
695 rajveer 2475
      put(_Fields.GATEWAY_ID, new FieldMetaData("gatewayId", TFieldRequirementType.DEFAULT, 
420 ashish 2476
          new FieldValueMetaData(TType.I64)));
123 ashish 2477
    }});
2478
 
2479
    static {
2480
      FieldMetaData.addStructMetaDataMap(getPaymentsForUser_args.class, metaDataMap);
2481
    }
2482
 
2483
    public getPaymentsForUser_args() {
2484
    }
2485
 
2486
    public getPaymentsForUser_args(
2487
      long userId,
695 rajveer 2488
      long fromTime,
2489
      long toTime,
123 ashish 2490
      PaymentStatus status,
695 rajveer 2491
      long gatewayId)
123 ashish 2492
    {
2493
      this();
2494
      this.userId = userId;
2495
      setUserIdIsSet(true);
695 rajveer 2496
      this.fromTime = fromTime;
2497
      setFromTimeIsSet(true);
2498
      this.toTime = toTime;
2499
      setToTimeIsSet(true);
123 ashish 2500
      this.status = status;
695 rajveer 2501
      this.gatewayId = gatewayId;
2502
      setGatewayIdIsSet(true);
123 ashish 2503
    }
2504
 
2505
    /**
2506
     * Performs a deep copy on <i>other</i>.
2507
     */
2508
    public getPaymentsForUser_args(getPaymentsForUser_args other) {
2509
      __isset_bit_vector.clear();
2510
      __isset_bit_vector.or(other.__isset_bit_vector);
2511
      this.userId = other.userId;
695 rajveer 2512
      this.fromTime = other.fromTime;
2513
      this.toTime = other.toTime;
123 ashish 2514
      if (other.isSetStatus()) {
2515
        this.status = other.status;
2516
      }
695 rajveer 2517
      this.gatewayId = other.gatewayId;
123 ashish 2518
    }
2519
 
2520
    public getPaymentsForUser_args deepCopy() {
2521
      return new getPaymentsForUser_args(this);
2522
    }
2523
 
2524
    @Deprecated
2525
    public getPaymentsForUser_args clone() {
2526
      return new getPaymentsForUser_args(this);
2527
    }
2528
 
2529
    public long getUserId() {
2530
      return this.userId;
2531
    }
2532
 
2533
    public getPaymentsForUser_args setUserId(long userId) {
2534
      this.userId = userId;
2535
      setUserIdIsSet(true);
2536
      return this;
2537
    }
2538
 
2539
    public void unsetUserId() {
2540
      __isset_bit_vector.clear(__USERID_ISSET_ID);
2541
    }
2542
 
2543
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
2544
    public boolean isSetUserId() {
2545
      return __isset_bit_vector.get(__USERID_ISSET_ID);
2546
    }
2547
 
2548
    public void setUserIdIsSet(boolean value) {
2549
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
2550
    }
2551
 
695 rajveer 2552
    public long getFromTime() {
2553
      return this.fromTime;
123 ashish 2554
    }
2555
 
695 rajveer 2556
    public getPaymentsForUser_args setFromTime(long fromTime) {
2557
      this.fromTime = fromTime;
2558
      setFromTimeIsSet(true);
123 ashish 2559
      return this;
2560
    }
2561
 
695 rajveer 2562
    public void unsetFromTime() {
2563
      __isset_bit_vector.clear(__FROMTIME_ISSET_ID);
123 ashish 2564
    }
2565
 
695 rajveer 2566
    /** Returns true if field fromTime is set (has been asigned a value) and false otherwise */
2567
    public boolean isSetFromTime() {
2568
      return __isset_bit_vector.get(__FROMTIME_ISSET_ID);
123 ashish 2569
    }
2570
 
695 rajveer 2571
    public void setFromTimeIsSet(boolean value) {
2572
      __isset_bit_vector.set(__FROMTIME_ISSET_ID, value);
123 ashish 2573
    }
2574
 
695 rajveer 2575
    public long getToTime() {
2576
      return this.toTime;
123 ashish 2577
    }
2578
 
695 rajveer 2579
    public getPaymentsForUser_args setToTime(long toTime) {
2580
      this.toTime = toTime;
2581
      setToTimeIsSet(true);
123 ashish 2582
      return this;
2583
    }
2584
 
695 rajveer 2585
    public void unsetToTime() {
2586
      __isset_bit_vector.clear(__TOTIME_ISSET_ID);
123 ashish 2587
    }
2588
 
695 rajveer 2589
    /** Returns true if field toTime is set (has been asigned a value) and false otherwise */
2590
    public boolean isSetToTime() {
2591
      return __isset_bit_vector.get(__TOTIME_ISSET_ID);
123 ashish 2592
    }
2593
 
695 rajveer 2594
    public void setToTimeIsSet(boolean value) {
2595
      __isset_bit_vector.set(__TOTIME_ISSET_ID, value);
123 ashish 2596
    }
2597
 
2598
    /**
2599
     * 
2600
     * @see PaymentStatus
2601
     */
2602
    public PaymentStatus getStatus() {
2603
      return this.status;
2604
    }
2605
 
2606
    /**
2607
     * 
2608
     * @see PaymentStatus
2609
     */
2610
    public getPaymentsForUser_args setStatus(PaymentStatus status) {
2611
      this.status = status;
2612
      return this;
2613
    }
2614
 
2615
    public void unsetStatus() {
2616
      this.status = null;
2617
    }
2618
 
2619
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
2620
    public boolean isSetStatus() {
2621
      return this.status != null;
2622
    }
2623
 
2624
    public void setStatusIsSet(boolean value) {
2625
      if (!value) {
2626
        this.status = null;
2627
      }
2628
    }
2629
 
695 rajveer 2630
    public long getGatewayId() {
2631
      return this.gatewayId;
123 ashish 2632
    }
2633
 
695 rajveer 2634
    public getPaymentsForUser_args setGatewayId(long gatewayId) {
2635
      this.gatewayId = gatewayId;
2636
      setGatewayIdIsSet(true);
123 ashish 2637
      return this;
2638
    }
2639
 
695 rajveer 2640
    public void unsetGatewayId() {
2641
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 2642
    }
2643
 
695 rajveer 2644
    /** Returns true if field gatewayId is set (has been asigned a value) and false otherwise */
2645
    public boolean isSetGatewayId() {
2646
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 2647
    }
2648
 
695 rajveer 2649
    public void setGatewayIdIsSet(boolean value) {
2650
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
123 ashish 2651
    }
2652
 
2653
    public void setFieldValue(_Fields field, Object value) {
2654
      switch (field) {
2655
      case USER_ID:
2656
        if (value == null) {
2657
          unsetUserId();
2658
        } else {
2659
          setUserId((Long)value);
2660
        }
2661
        break;
2662
 
2663
      case FROM_TIME:
2664
        if (value == null) {
695 rajveer 2665
          unsetFromTime();
123 ashish 2666
        } else {
695 rajveer 2667
          setFromTime((Long)value);
123 ashish 2668
        }
2669
        break;
2670
 
2671
      case TO_TIME:
2672
        if (value == null) {
695 rajveer 2673
          unsetToTime();
123 ashish 2674
        } else {
695 rajveer 2675
          setToTime((Long)value);
123 ashish 2676
        }
2677
        break;
2678
 
2679
      case STATUS:
2680
        if (value == null) {
2681
          unsetStatus();
2682
        } else {
2683
          setStatus((PaymentStatus)value);
2684
        }
2685
        break;
2686
 
420 ashish 2687
      case GATEWAY_ID:
123 ashish 2688
        if (value == null) {
695 rajveer 2689
          unsetGatewayId();
123 ashish 2690
        } else {
695 rajveer 2691
          setGatewayId((Long)value);
123 ashish 2692
        }
2693
        break;
2694
 
2695
      }
2696
    }
2697
 
2698
    public void setFieldValue(int fieldID, Object value) {
2699
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2700
    }
2701
 
2702
    public Object getFieldValue(_Fields field) {
2703
      switch (field) {
2704
      case USER_ID:
2705
        return new Long(getUserId());
2706
 
2707
      case FROM_TIME:
695 rajveer 2708
        return new Long(getFromTime());
123 ashish 2709
 
2710
      case TO_TIME:
695 rajveer 2711
        return new Long(getToTime());
123 ashish 2712
 
2713
      case STATUS:
2714
        return getStatus();
2715
 
420 ashish 2716
      case GATEWAY_ID:
695 rajveer 2717
        return new Long(getGatewayId());
123 ashish 2718
 
2719
      }
2720
      throw new IllegalStateException();
2721
    }
2722
 
2723
    public Object getFieldValue(int fieldId) {
2724
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2725
    }
2726
 
2727
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2728
    public boolean isSet(_Fields field) {
2729
      switch (field) {
2730
      case USER_ID:
2731
        return isSetUserId();
2732
      case FROM_TIME:
695 rajveer 2733
        return isSetFromTime();
123 ashish 2734
      case TO_TIME:
695 rajveer 2735
        return isSetToTime();
123 ashish 2736
      case STATUS:
2737
        return isSetStatus();
420 ashish 2738
      case GATEWAY_ID:
695 rajveer 2739
        return isSetGatewayId();
123 ashish 2740
      }
2741
      throw new IllegalStateException();
2742
    }
2743
 
2744
    public boolean isSet(int fieldID) {
2745
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2746
    }
2747
 
2748
    @Override
2749
    public boolean equals(Object that) {
2750
      if (that == null)
2751
        return false;
2752
      if (that instanceof getPaymentsForUser_args)
2753
        return this.equals((getPaymentsForUser_args)that);
2754
      return false;
2755
    }
2756
 
2757
    public boolean equals(getPaymentsForUser_args that) {
2758
      if (that == null)
2759
        return false;
2760
 
2761
      boolean this_present_userId = true;
2762
      boolean that_present_userId = true;
2763
      if (this_present_userId || that_present_userId) {
2764
        if (!(this_present_userId && that_present_userId))
2765
          return false;
2766
        if (this.userId != that.userId)
2767
          return false;
2768
      }
2769
 
695 rajveer 2770
      boolean this_present_fromTime = true;
2771
      boolean that_present_fromTime = true;
2772
      if (this_present_fromTime || that_present_fromTime) {
2773
        if (!(this_present_fromTime && that_present_fromTime))
123 ashish 2774
          return false;
695 rajveer 2775
        if (this.fromTime != that.fromTime)
123 ashish 2776
          return false;
2777
      }
2778
 
695 rajveer 2779
      boolean this_present_toTime = true;
2780
      boolean that_present_toTime = true;
2781
      if (this_present_toTime || that_present_toTime) {
2782
        if (!(this_present_toTime && that_present_toTime))
123 ashish 2783
          return false;
695 rajveer 2784
        if (this.toTime != that.toTime)
123 ashish 2785
          return false;
2786
      }
2787
 
2788
      boolean this_present_status = true && this.isSetStatus();
2789
      boolean that_present_status = true && that.isSetStatus();
2790
      if (this_present_status || that_present_status) {
2791
        if (!(this_present_status && that_present_status))
2792
          return false;
2793
        if (!this.status.equals(that.status))
2794
          return false;
2795
      }
2796
 
695 rajveer 2797
      boolean this_present_gatewayId = true;
2798
      boolean that_present_gatewayId = true;
2799
      if (this_present_gatewayId || that_present_gatewayId) {
2800
        if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 2801
          return false;
695 rajveer 2802
        if (this.gatewayId != that.gatewayId)
123 ashish 2803
          return false;
2804
      }
2805
 
2806
      return true;
2807
    }
2808
 
2809
    @Override
2810
    public int hashCode() {
2811
      return 0;
2812
    }
2813
 
2814
    public int compareTo(getPaymentsForUser_args other) {
2815
      if (!getClass().equals(other.getClass())) {
2816
        return getClass().getName().compareTo(other.getClass().getName());
2817
      }
2818
 
2819
      int lastComparison = 0;
2820
      getPaymentsForUser_args typedOther = (getPaymentsForUser_args)other;
2821
 
2822
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
2823
      if (lastComparison != 0) {
2824
        return lastComparison;
2825
      }
2826
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
2827
      if (lastComparison != 0) {
2828
        return lastComparison;
2829
      }
695 rajveer 2830
      lastComparison = Boolean.valueOf(isSetFromTime()).compareTo(isSetFromTime());
123 ashish 2831
      if (lastComparison != 0) {
2832
        return lastComparison;
2833
      }
695 rajveer 2834
      lastComparison = TBaseHelper.compareTo(fromTime, typedOther.fromTime);
123 ashish 2835
      if (lastComparison != 0) {
2836
        return lastComparison;
2837
      }
695 rajveer 2838
      lastComparison = Boolean.valueOf(isSetToTime()).compareTo(isSetToTime());
123 ashish 2839
      if (lastComparison != 0) {
2840
        return lastComparison;
2841
      }
695 rajveer 2842
      lastComparison = TBaseHelper.compareTo(toTime, typedOther.toTime);
123 ashish 2843
      if (lastComparison != 0) {
2844
        return lastComparison;
2845
      }
2846
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
2847
      if (lastComparison != 0) {
2848
        return lastComparison;
2849
      }
2850
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
2851
      if (lastComparison != 0) {
2852
        return lastComparison;
2853
      }
695 rajveer 2854
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(isSetGatewayId());
123 ashish 2855
      if (lastComparison != 0) {
2856
        return lastComparison;
2857
      }
695 rajveer 2858
      lastComparison = TBaseHelper.compareTo(gatewayId, typedOther.gatewayId);
123 ashish 2859
      if (lastComparison != 0) {
2860
        return lastComparison;
2861
      }
2862
      return 0;
2863
    }
2864
 
2865
    public void read(TProtocol iprot) throws TException {
2866
      TField field;
2867
      iprot.readStructBegin();
2868
      while (true)
2869
      {
2870
        field = iprot.readFieldBegin();
2871
        if (field.type == TType.STOP) { 
2872
          break;
2873
        }
2874
        _Fields fieldId = _Fields.findByThriftId(field.id);
2875
        if (fieldId == null) {
2876
          TProtocolUtil.skip(iprot, field.type);
2877
        } else {
2878
          switch (fieldId) {
2879
            case USER_ID:
2880
              if (field.type == TType.I64) {
2881
                this.userId = iprot.readI64();
2882
                setUserIdIsSet(true);
2883
              } else { 
2884
                TProtocolUtil.skip(iprot, field.type);
2885
              }
2886
              break;
2887
            case FROM_TIME:
2888
              if (field.type == TType.I64) {
695 rajveer 2889
                this.fromTime = iprot.readI64();
2890
                setFromTimeIsSet(true);
123 ashish 2891
              } else { 
2892
                TProtocolUtil.skip(iprot, field.type);
2893
              }
2894
              break;
2895
            case TO_TIME:
2896
              if (field.type == TType.I64) {
695 rajveer 2897
                this.toTime = iprot.readI64();
2898
                setToTimeIsSet(true);
123 ashish 2899
              } else { 
2900
                TProtocolUtil.skip(iprot, field.type);
2901
              }
2902
              break;
2903
            case STATUS:
2904
              if (field.type == TType.I32) {
2905
                this.status = PaymentStatus.findByValue(iprot.readI32());
2906
              } else { 
2907
                TProtocolUtil.skip(iprot, field.type);
2908
              }
2909
              break;
420 ashish 2910
            case GATEWAY_ID:
2911
              if (field.type == TType.I64) {
695 rajveer 2912
                this.gatewayId = iprot.readI64();
2913
                setGatewayIdIsSet(true);
123 ashish 2914
              } else { 
2915
                TProtocolUtil.skip(iprot, field.type);
2916
              }
2917
              break;
2918
          }
2919
          iprot.readFieldEnd();
2920
        }
2921
      }
2922
      iprot.readStructEnd();
2923
      validate();
2924
    }
2925
 
2926
    public void write(TProtocol oprot) throws TException {
2927
      validate();
2928
 
2929
      oprot.writeStructBegin(STRUCT_DESC);
2930
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
2931
      oprot.writeI64(this.userId);
2932
      oprot.writeFieldEnd();
2933
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
695 rajveer 2934
      oprot.writeI64(this.fromTime);
123 ashish 2935
      oprot.writeFieldEnd();
2936
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
695 rajveer 2937
      oprot.writeI64(this.toTime);
123 ashish 2938
      oprot.writeFieldEnd();
2939
      if (this.status != null) {
2940
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
2941
        oprot.writeI32(this.status.getValue());
2942
        oprot.writeFieldEnd();
2943
      }
420 ashish 2944
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
695 rajveer 2945
      oprot.writeI64(this.gatewayId);
420 ashish 2946
      oprot.writeFieldEnd();
123 ashish 2947
      oprot.writeFieldStop();
2948
      oprot.writeStructEnd();
2949
    }
2950
 
2951
    @Override
2952
    public String toString() {
2953
      StringBuilder sb = new StringBuilder("getPaymentsForUser_args(");
2954
      boolean first = true;
2955
 
2956
      sb.append("userId:");
2957
      sb.append(this.userId);
2958
      first = false;
2959
      if (!first) sb.append(", ");
695 rajveer 2960
      sb.append("fromTime:");
2961
      sb.append(this.fromTime);
123 ashish 2962
      first = false;
2963
      if (!first) sb.append(", ");
695 rajveer 2964
      sb.append("toTime:");
2965
      sb.append(this.toTime);
123 ashish 2966
      first = false;
2967
      if (!first) sb.append(", ");
2968
      sb.append("status:");
2969
      if (this.status == null) {
2970
        sb.append("null");
2971
      } else {
2972
        String status_name = status.name();
2973
        if (status_name != null) {
2974
          sb.append(status_name);
2975
          sb.append(" (");
2976
        }
2977
        sb.append(this.status);
2978
        if (status_name != null) {
2979
          sb.append(")");
2980
        }
2981
      }
2982
      first = false;
2983
      if (!first) sb.append(", ");
695 rajveer 2984
      sb.append("gatewayId:");
2985
      sb.append(this.gatewayId);
123 ashish 2986
      first = false;
2987
      sb.append(")");
2988
      return sb.toString();
2989
    }
2990
 
2991
    public void validate() throws TException {
2992
      // check for required fields
2993
    }
2994
 
2995
  }
2996
 
695 rajveer 2997
  public static class getPaymentsForUser_result implements TBase<getPaymentsForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPaymentsForUser_result>   {
123 ashish 2998
    private static final TStruct STRUCT_DESC = new TStruct("getPaymentsForUser_result");
2999
 
3000
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
3001
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
3002
 
3003
    private List<Payment> success;
3004
    private PaymentException pe;
3005
 
3006
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3007
    public enum _Fields implements TFieldIdEnum {
3008
      SUCCESS((short)0, "success"),
3009
      PE((short)1, "pe");
3010
 
3011
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3012
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3013
 
3014
      static {
3015
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3016
          byId.put((int)field._thriftId, field);
3017
          byName.put(field.getFieldName(), field);
3018
        }
3019
      }
3020
 
3021
      /**
3022
       * Find the _Fields constant that matches fieldId, or null if its not found.
3023
       */
3024
      public static _Fields findByThriftId(int fieldId) {
3025
        return byId.get(fieldId);
3026
      }
3027
 
3028
      /**
3029
       * Find the _Fields constant that matches fieldId, throwing an exception
3030
       * if it is not found.
3031
       */
3032
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3033
        _Fields fields = findByThriftId(fieldId);
3034
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3035
        return fields;
3036
      }
3037
 
3038
      /**
3039
       * Find the _Fields constant that matches name, or null if its not found.
3040
       */
3041
      public static _Fields findByName(String name) {
3042
        return byName.get(name);
3043
      }
3044
 
3045
      private final short _thriftId;
3046
      private final String _fieldName;
3047
 
3048
      _Fields(short thriftId, String fieldName) {
3049
        _thriftId = thriftId;
3050
        _fieldName = fieldName;
3051
      }
3052
 
3053
      public short getThriftFieldId() {
3054
        return _thriftId;
3055
      }
3056
 
3057
      public String getFieldName() {
3058
        return _fieldName;
3059
      }
3060
    }
3061
 
3062
    // isset id assignments
3063
 
3064
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3065
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3066
          new ListMetaData(TType.LIST, 
3067
              new StructMetaData(TType.STRUCT, Payment.class))));
3068
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
3069
          new FieldValueMetaData(TType.STRUCT)));
3070
    }});
3071
 
3072
    static {
3073
      FieldMetaData.addStructMetaDataMap(getPaymentsForUser_result.class, metaDataMap);
3074
    }
3075
 
3076
    public getPaymentsForUser_result() {
3077
    }
3078
 
3079
    public getPaymentsForUser_result(
3080
      List<Payment> success,
3081
      PaymentException pe)
3082
    {
3083
      this();
3084
      this.success = success;
3085
      this.pe = pe;
3086
    }
3087
 
3088
    /**
3089
     * Performs a deep copy on <i>other</i>.
3090
     */
3091
    public getPaymentsForUser_result(getPaymentsForUser_result other) {
3092
      if (other.isSetSuccess()) {
3093
        List<Payment> __this__success = new ArrayList<Payment>();
3094
        for (Payment other_element : other.success) {
3095
          __this__success.add(new Payment(other_element));
3096
        }
3097
        this.success = __this__success;
3098
      }
3099
      if (other.isSetPe()) {
3100
        this.pe = new PaymentException(other.pe);
3101
      }
3102
    }
3103
 
3104
    public getPaymentsForUser_result deepCopy() {
3105
      return new getPaymentsForUser_result(this);
3106
    }
3107
 
3108
    @Deprecated
3109
    public getPaymentsForUser_result clone() {
3110
      return new getPaymentsForUser_result(this);
3111
    }
3112
 
3113
    public int getSuccessSize() {
3114
      return (this.success == null) ? 0 : this.success.size();
3115
    }
3116
 
3117
    public java.util.Iterator<Payment> getSuccessIterator() {
3118
      return (this.success == null) ? null : this.success.iterator();
3119
    }
3120
 
3121
    public void addToSuccess(Payment elem) {
3122
      if (this.success == null) {
3123
        this.success = new ArrayList<Payment>();
3124
      }
3125
      this.success.add(elem);
3126
    }
3127
 
3128
    public List<Payment> getSuccess() {
3129
      return this.success;
3130
    }
3131
 
3132
    public getPaymentsForUser_result setSuccess(List<Payment> success) {
3133
      this.success = success;
3134
      return this;
3135
    }
3136
 
3137
    public void unsetSuccess() {
3138
      this.success = null;
3139
    }
3140
 
3141
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3142
    public boolean isSetSuccess() {
3143
      return this.success != null;
3144
    }
3145
 
3146
    public void setSuccessIsSet(boolean value) {
3147
      if (!value) {
3148
        this.success = null;
3149
      }
3150
    }
3151
 
3152
    public PaymentException getPe() {
3153
      return this.pe;
3154
    }
3155
 
3156
    public getPaymentsForUser_result setPe(PaymentException pe) {
3157
      this.pe = pe;
3158
      return this;
3159
    }
3160
 
3161
    public void unsetPe() {
3162
      this.pe = null;
3163
    }
3164
 
3165
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
3166
    public boolean isSetPe() {
3167
      return this.pe != null;
3168
    }
3169
 
3170
    public void setPeIsSet(boolean value) {
3171
      if (!value) {
3172
        this.pe = null;
3173
      }
3174
    }
3175
 
3176
    public void setFieldValue(_Fields field, Object value) {
3177
      switch (field) {
3178
      case SUCCESS:
3179
        if (value == null) {
3180
          unsetSuccess();
3181
        } else {
3182
          setSuccess((List<Payment>)value);
3183
        }
3184
        break;
3185
 
3186
      case PE:
3187
        if (value == null) {
3188
          unsetPe();
3189
        } else {
3190
          setPe((PaymentException)value);
3191
        }
3192
        break;
3193
 
3194
      }
3195
    }
3196
 
3197
    public void setFieldValue(int fieldID, Object value) {
3198
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3199
    }
3200
 
3201
    public Object getFieldValue(_Fields field) {
3202
      switch (field) {
3203
      case SUCCESS:
3204
        return getSuccess();
3205
 
3206
      case PE:
3207
        return getPe();
3208
 
3209
      }
3210
      throw new IllegalStateException();
3211
    }
3212
 
3213
    public Object getFieldValue(int fieldId) {
3214
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3215
    }
3216
 
3217
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3218
    public boolean isSet(_Fields field) {
3219
      switch (field) {
3220
      case SUCCESS:
3221
        return isSetSuccess();
3222
      case PE:
3223
        return isSetPe();
3224
      }
3225
      throw new IllegalStateException();
3226
    }
3227
 
3228
    public boolean isSet(int fieldID) {
3229
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3230
    }
3231
 
3232
    @Override
3233
    public boolean equals(Object that) {
3234
      if (that == null)
3235
        return false;
3236
      if (that instanceof getPaymentsForUser_result)
3237
        return this.equals((getPaymentsForUser_result)that);
3238
      return false;
3239
    }
3240
 
3241
    public boolean equals(getPaymentsForUser_result that) {
3242
      if (that == null)
3243
        return false;
3244
 
3245
      boolean this_present_success = true && this.isSetSuccess();
3246
      boolean that_present_success = true && that.isSetSuccess();
3247
      if (this_present_success || that_present_success) {
3248
        if (!(this_present_success && that_present_success))
3249
          return false;
3250
        if (!this.success.equals(that.success))
3251
          return false;
3252
      }
3253
 
3254
      boolean this_present_pe = true && this.isSetPe();
3255
      boolean that_present_pe = true && that.isSetPe();
3256
      if (this_present_pe || that_present_pe) {
3257
        if (!(this_present_pe && that_present_pe))
3258
          return false;
3259
        if (!this.pe.equals(that.pe))
3260
          return false;
3261
      }
3262
 
3263
      return true;
3264
    }
3265
 
3266
    @Override
3267
    public int hashCode() {
3268
      return 0;
3269
    }
3270
 
695 rajveer 3271
    public int compareTo(getPaymentsForUser_result other) {
123 ashish 3272
      if (!getClass().equals(other.getClass())) {
3273
        return getClass().getName().compareTo(other.getClass().getName());
3274
      }
3275
 
3276
      int lastComparison = 0;
695 rajveer 3277
      getPaymentsForUser_result typedOther = (getPaymentsForUser_result)other;
123 ashish 3278
 
695 rajveer 3279
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
123 ashish 3280
      if (lastComparison != 0) {
3281
        return lastComparison;
3282
      }
695 rajveer 3283
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
123 ashish 3284
      if (lastComparison != 0) {
3285
        return lastComparison;
3286
      }
695 rajveer 3287
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());
123 ashish 3288
      if (lastComparison != 0) {
3289
        return lastComparison;
3290
      }
695 rajveer 3291
      lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);
123 ashish 3292
      if (lastComparison != 0) {
3293
        return lastComparison;
3294
      }
3295
      return 0;
3296
    }
3297
 
3298
    public void read(TProtocol iprot) throws TException {
3299
      TField field;
3300
      iprot.readStructBegin();
3301
      while (true)
3302
      {
3303
        field = iprot.readFieldBegin();
3304
        if (field.type == TType.STOP) { 
3305
          break;
3306
        }
3307
        _Fields fieldId = _Fields.findByThriftId(field.id);
3308
        if (fieldId == null) {
3309
          TProtocolUtil.skip(iprot, field.type);
3310
        } else {
3311
          switch (fieldId) {
3312
            case SUCCESS:
3313
              if (field.type == TType.LIST) {
3314
                {
2747 chandransh 3315
                  TList _list12 = iprot.readListBegin();
3316
                  this.success = new ArrayList<Payment>(_list12.size);
3317
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
123 ashish 3318
                  {
2747 chandransh 3319
                    Payment _elem14;
3320
                    _elem14 = new Payment();
3321
                    _elem14.read(iprot);
3322
                    this.success.add(_elem14);
123 ashish 3323
                  }
3324
                  iprot.readListEnd();
3325
                }
3326
              } else { 
3327
                TProtocolUtil.skip(iprot, field.type);
3328
              }
3329
              break;
3330
            case PE:
3331
              if (field.type == TType.STRUCT) {
3332
                this.pe = new PaymentException();
3333
                this.pe.read(iprot);
3334
              } else { 
3335
                TProtocolUtil.skip(iprot, field.type);
3336
              }
3337
              break;
3338
          }
3339
          iprot.readFieldEnd();
3340
        }
3341
      }
3342
      iprot.readStructEnd();
3343
      validate();
3344
    }
3345
 
3346
    public void write(TProtocol oprot) throws TException {
3347
      oprot.writeStructBegin(STRUCT_DESC);
3348
 
3349
      if (this.isSetSuccess()) {
3350
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3351
        {
3352
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
2747 chandransh 3353
          for (Payment _iter15 : this.success)
123 ashish 3354
          {
2747 chandransh 3355
            _iter15.write(oprot);
123 ashish 3356
          }
3357
          oprot.writeListEnd();
3358
        }
3359
        oprot.writeFieldEnd();
3360
      } else if (this.isSetPe()) {
3361
        oprot.writeFieldBegin(PE_FIELD_DESC);
3362
        this.pe.write(oprot);
3363
        oprot.writeFieldEnd();
3364
      }
3365
      oprot.writeFieldStop();
3366
      oprot.writeStructEnd();
3367
    }
3368
 
3369
    @Override
3370
    public String toString() {
695 rajveer 3371
      StringBuilder sb = new StringBuilder("getPaymentsForUser_result(");
123 ashish 3372
      boolean first = true;
3373
 
3374
      sb.append("success:");
3375
      if (this.success == null) {
3376
        sb.append("null");
3377
      } else {
3378
        sb.append(this.success);
3379
      }
3380
      first = false;
3381
      if (!first) sb.append(", ");
3382
      sb.append("pe:");
3383
      if (this.pe == null) {
3384
        sb.append("null");
3385
      } else {
3386
        sb.append(this.pe);
3387
      }
3388
      first = false;
3389
      sb.append(")");
3390
      return sb.toString();
3391
    }
3392
 
3393
    public void validate() throws TException {
3394
      // check for required fields
3395
    }
3396
 
3397
  }
3398
 
3399
  public static class getPayments_args implements TBase<getPayments_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPayments_args>   {
3400
    private static final TStruct STRUCT_DESC = new TStruct("getPayments_args");
3401
 
695 rajveer 3402
    private static final TField FROM_TIME_FIELD_DESC = new TField("fromTime", TType.I64, (short)1);
3403
    private static final TField TO_TIME_FIELD_DESC = new TField("toTime", TType.I64, (short)2);
123 ashish 3404
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
695 rajveer 3405
    private static final TField GATEWAY_ID_FIELD_DESC = new TField("gatewayId", TType.I64, (short)4);
123 ashish 3406
 
695 rajveer 3407
    private long fromTime;
3408
    private long toTime;
123 ashish 3409
    private PaymentStatus status;
695 rajveer 3410
    private long gatewayId;
123 ashish 3411
 
3412
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3413
    public enum _Fields implements TFieldIdEnum {
695 rajveer 3414
      FROM_TIME((short)1, "fromTime"),
3415
      TO_TIME((short)2, "toTime"),
123 ashish 3416
      /**
3417
       * 
3418
       * @see PaymentStatus
3419
       */
3420
      STATUS((short)3, "status"),
695 rajveer 3421
      GATEWAY_ID((short)4, "gatewayId");
123 ashish 3422
 
3423
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3424
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3425
 
3426
      static {
3427
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3428
          byId.put((int)field._thriftId, field);
3429
          byName.put(field.getFieldName(), field);
3430
        }
3431
      }
3432
 
3433
      /**
3434
       * Find the _Fields constant that matches fieldId, or null if its not found.
3435
       */
3436
      public static _Fields findByThriftId(int fieldId) {
3437
        return byId.get(fieldId);
3438
      }
3439
 
3440
      /**
3441
       * Find the _Fields constant that matches fieldId, throwing an exception
3442
       * if it is not found.
3443
       */
3444
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3445
        _Fields fields = findByThriftId(fieldId);
3446
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3447
        return fields;
3448
      }
3449
 
3450
      /**
3451
       * Find the _Fields constant that matches name, or null if its not found.
3452
       */
3453
      public static _Fields findByName(String name) {
3454
        return byName.get(name);
3455
      }
3456
 
3457
      private final short _thriftId;
3458
      private final String _fieldName;
3459
 
3460
      _Fields(short thriftId, String fieldName) {
3461
        _thriftId = thriftId;
3462
        _fieldName = fieldName;
3463
      }
3464
 
3465
      public short getThriftFieldId() {
3466
        return _thriftId;
3467
      }
3468
 
3469
      public String getFieldName() {
3470
        return _fieldName;
3471
      }
3472
    }
3473
 
3474
    // isset id assignments
695 rajveer 3475
    private static final int __FROMTIME_ISSET_ID = 0;
3476
    private static final int __TOTIME_ISSET_ID = 1;
3477
    private static final int __GATEWAYID_ISSET_ID = 2;
420 ashish 3478
    private BitSet __isset_bit_vector = new BitSet(3);
123 ashish 3479
 
3480
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
695 rajveer 3481
      put(_Fields.FROM_TIME, new FieldMetaData("fromTime", TFieldRequirementType.DEFAULT, 
123 ashish 3482
          new FieldValueMetaData(TType.I64)));
695 rajveer 3483
      put(_Fields.TO_TIME, new FieldMetaData("toTime", TFieldRequirementType.DEFAULT, 
123 ashish 3484
          new FieldValueMetaData(TType.I64)));
3485
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
3486
          new EnumMetaData(TType.ENUM, PaymentStatus.class)));
695 rajveer 3487
      put(_Fields.GATEWAY_ID, new FieldMetaData("gatewayId", TFieldRequirementType.DEFAULT, 
420 ashish 3488
          new FieldValueMetaData(TType.I64)));
123 ashish 3489
    }});
3490
 
3491
    static {
3492
      FieldMetaData.addStructMetaDataMap(getPayments_args.class, metaDataMap);
3493
    }
3494
 
3495
    public getPayments_args() {
3496
    }
3497
 
3498
    public getPayments_args(
695 rajveer 3499
      long fromTime,
3500
      long toTime,
123 ashish 3501
      PaymentStatus status,
695 rajveer 3502
      long gatewayId)
123 ashish 3503
    {
3504
      this();
695 rajveer 3505
      this.fromTime = fromTime;
3506
      setFromTimeIsSet(true);
3507
      this.toTime = toTime;
3508
      setToTimeIsSet(true);
123 ashish 3509
      this.status = status;
695 rajveer 3510
      this.gatewayId = gatewayId;
3511
      setGatewayIdIsSet(true);
123 ashish 3512
    }
3513
 
3514
    /**
3515
     * Performs a deep copy on <i>other</i>.
3516
     */
3517
    public getPayments_args(getPayments_args other) {
3518
      __isset_bit_vector.clear();
3519
      __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 3520
      this.fromTime = other.fromTime;
3521
      this.toTime = other.toTime;
123 ashish 3522
      if (other.isSetStatus()) {
3523
        this.status = other.status;
3524
      }
695 rajveer 3525
      this.gatewayId = other.gatewayId;
123 ashish 3526
    }
3527
 
3528
    public getPayments_args deepCopy() {
3529
      return new getPayments_args(this);
3530
    }
3531
 
3532
    @Deprecated
3533
    public getPayments_args clone() {
3534
      return new getPayments_args(this);
3535
    }
3536
 
695 rajveer 3537
    public long getFromTime() {
3538
      return this.fromTime;
123 ashish 3539
    }
3540
 
695 rajveer 3541
    public getPayments_args setFromTime(long fromTime) {
3542
      this.fromTime = fromTime;
3543
      setFromTimeIsSet(true);
123 ashish 3544
      return this;
3545
    }
3546
 
695 rajveer 3547
    public void unsetFromTime() {
3548
      __isset_bit_vector.clear(__FROMTIME_ISSET_ID);
123 ashish 3549
    }
3550
 
695 rajveer 3551
    /** Returns true if field fromTime is set (has been asigned a value) and false otherwise */
3552
    public boolean isSetFromTime() {
3553
      return __isset_bit_vector.get(__FROMTIME_ISSET_ID);
123 ashish 3554
    }
3555
 
695 rajveer 3556
    public void setFromTimeIsSet(boolean value) {
3557
      __isset_bit_vector.set(__FROMTIME_ISSET_ID, value);
123 ashish 3558
    }
3559
 
695 rajveer 3560
    public long getToTime() {
3561
      return this.toTime;
123 ashish 3562
    }
3563
 
695 rajveer 3564
    public getPayments_args setToTime(long toTime) {
3565
      this.toTime = toTime;
3566
      setToTimeIsSet(true);
123 ashish 3567
      return this;
3568
    }
3569
 
695 rajveer 3570
    public void unsetToTime() {
3571
      __isset_bit_vector.clear(__TOTIME_ISSET_ID);
123 ashish 3572
    }
3573
 
695 rajveer 3574
    /** Returns true if field toTime is set (has been asigned a value) and false otherwise */
3575
    public boolean isSetToTime() {
3576
      return __isset_bit_vector.get(__TOTIME_ISSET_ID);
123 ashish 3577
    }
3578
 
695 rajveer 3579
    public void setToTimeIsSet(boolean value) {
3580
      __isset_bit_vector.set(__TOTIME_ISSET_ID, value);
123 ashish 3581
    }
3582
 
3583
    /**
3584
     * 
3585
     * @see PaymentStatus
3586
     */
3587
    public PaymentStatus getStatus() {
3588
      return this.status;
3589
    }
3590
 
3591
    /**
3592
     * 
3593
     * @see PaymentStatus
3594
     */
3595
    public getPayments_args setStatus(PaymentStatus status) {
3596
      this.status = status;
3597
      return this;
3598
    }
3599
 
3600
    public void unsetStatus() {
3601
      this.status = null;
3602
    }
3603
 
3604
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
3605
    public boolean isSetStatus() {
3606
      return this.status != null;
3607
    }
3608
 
3609
    public void setStatusIsSet(boolean value) {
3610
      if (!value) {
3611
        this.status = null;
3612
      }
3613
    }
3614
 
695 rajveer 3615
    public long getGatewayId() {
3616
      return this.gatewayId;
123 ashish 3617
    }
3618
 
695 rajveer 3619
    public getPayments_args setGatewayId(long gatewayId) {
3620
      this.gatewayId = gatewayId;
3621
      setGatewayIdIsSet(true);
123 ashish 3622
      return this;
3623
    }
3624
 
695 rajveer 3625
    public void unsetGatewayId() {
3626
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 3627
    }
3628
 
695 rajveer 3629
    /** Returns true if field gatewayId is set (has been asigned a value) and false otherwise */
3630
    public boolean isSetGatewayId() {
3631
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 3632
    }
3633
 
695 rajveer 3634
    public void setGatewayIdIsSet(boolean value) {
3635
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
123 ashish 3636
    }
3637
 
3638
    public void setFieldValue(_Fields field, Object value) {
3639
      switch (field) {
3640
      case FROM_TIME:
3641
        if (value == null) {
695 rajveer 3642
          unsetFromTime();
123 ashish 3643
        } else {
695 rajveer 3644
          setFromTime((Long)value);
123 ashish 3645
        }
3646
        break;
3647
 
3648
      case TO_TIME:
3649
        if (value == null) {
695 rajveer 3650
          unsetToTime();
123 ashish 3651
        } else {
695 rajveer 3652
          setToTime((Long)value);
123 ashish 3653
        }
3654
        break;
3655
 
3656
      case STATUS:
3657
        if (value == null) {
3658
          unsetStatus();
3659
        } else {
3660
          setStatus((PaymentStatus)value);
3661
        }
3662
        break;
3663
 
420 ashish 3664
      case GATEWAY_ID:
123 ashish 3665
        if (value == null) {
695 rajveer 3666
          unsetGatewayId();
123 ashish 3667
        } else {
695 rajveer 3668
          setGatewayId((Long)value);
123 ashish 3669
        }
3670
        break;
3671
 
3672
      }
3673
    }
3674
 
3675
    public void setFieldValue(int fieldID, Object value) {
3676
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3677
    }
3678
 
3679
    public Object getFieldValue(_Fields field) {
3680
      switch (field) {
3681
      case FROM_TIME:
695 rajveer 3682
        return new Long(getFromTime());
123 ashish 3683
 
3684
      case TO_TIME:
695 rajveer 3685
        return new Long(getToTime());
123 ashish 3686
 
3687
      case STATUS:
3688
        return getStatus();
3689
 
420 ashish 3690
      case GATEWAY_ID:
695 rajveer 3691
        return new Long(getGatewayId());
123 ashish 3692
 
3693
      }
3694
      throw new IllegalStateException();
3695
    }
3696
 
3697
    public Object getFieldValue(int fieldId) {
3698
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3699
    }
3700
 
3701
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3702
    public boolean isSet(_Fields field) {
3703
      switch (field) {
3704
      case FROM_TIME:
695 rajveer 3705
        return isSetFromTime();
123 ashish 3706
      case TO_TIME:
695 rajveer 3707
        return isSetToTime();
123 ashish 3708
      case STATUS:
3709
        return isSetStatus();
420 ashish 3710
      case GATEWAY_ID:
695 rajveer 3711
        return isSetGatewayId();
123 ashish 3712
      }
3713
      throw new IllegalStateException();
3714
    }
3715
 
3716
    public boolean isSet(int fieldID) {
3717
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3718
    }
3719
 
3720
    @Override
3721
    public boolean equals(Object that) {
3722
      if (that == null)
3723
        return false;
3724
      if (that instanceof getPayments_args)
3725
        return this.equals((getPayments_args)that);
3726
      return false;
3727
    }
3728
 
3729
    public boolean equals(getPayments_args that) {
3730
      if (that == null)
3731
        return false;
3732
 
695 rajveer 3733
      boolean this_present_fromTime = true;
3734
      boolean that_present_fromTime = true;
3735
      if (this_present_fromTime || that_present_fromTime) {
3736
        if (!(this_present_fromTime && that_present_fromTime))
123 ashish 3737
          return false;
695 rajveer 3738
        if (this.fromTime != that.fromTime)
123 ashish 3739
          return false;
3740
      }
3741
 
695 rajveer 3742
      boolean this_present_toTime = true;
3743
      boolean that_present_toTime = true;
3744
      if (this_present_toTime || that_present_toTime) {
3745
        if (!(this_present_toTime && that_present_toTime))
123 ashish 3746
          return false;
695 rajveer 3747
        if (this.toTime != that.toTime)
123 ashish 3748
          return false;
3749
      }
3750
 
3751
      boolean this_present_status = true && this.isSetStatus();
3752
      boolean that_present_status = true && that.isSetStatus();
3753
      if (this_present_status || that_present_status) {
3754
        if (!(this_present_status && that_present_status))
3755
          return false;
3756
        if (!this.status.equals(that.status))
3757
          return false;
3758
      }
3759
 
695 rajveer 3760
      boolean this_present_gatewayId = true;
3761
      boolean that_present_gatewayId = true;
3762
      if (this_present_gatewayId || that_present_gatewayId) {
3763
        if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 3764
          return false;
695 rajveer 3765
        if (this.gatewayId != that.gatewayId)
123 ashish 3766
          return false;
3767
      }
3768
 
3769
      return true;
3770
    }
3771
 
3772
    @Override
3773
    public int hashCode() {
3774
      return 0;
3775
    }
3776
 
3777
    public int compareTo(getPayments_args other) {
3778
      if (!getClass().equals(other.getClass())) {
3779
        return getClass().getName().compareTo(other.getClass().getName());
3780
      }
3781
 
3782
      int lastComparison = 0;
3783
      getPayments_args typedOther = (getPayments_args)other;
3784
 
695 rajveer 3785
      lastComparison = Boolean.valueOf(isSetFromTime()).compareTo(isSetFromTime());
123 ashish 3786
      if (lastComparison != 0) {
3787
        return lastComparison;
3788
      }
695 rajveer 3789
      lastComparison = TBaseHelper.compareTo(fromTime, typedOther.fromTime);
123 ashish 3790
      if (lastComparison != 0) {
3791
        return lastComparison;
3792
      }
695 rajveer 3793
      lastComparison = Boolean.valueOf(isSetToTime()).compareTo(isSetToTime());
123 ashish 3794
      if (lastComparison != 0) {
3795
        return lastComparison;
3796
      }
695 rajveer 3797
      lastComparison = TBaseHelper.compareTo(toTime, typedOther.toTime);
123 ashish 3798
      if (lastComparison != 0) {
3799
        return lastComparison;
3800
      }
3801
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
3802
      if (lastComparison != 0) {
3803
        return lastComparison;
3804
      }
3805
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
3806
      if (lastComparison != 0) {
3807
        return lastComparison;
3808
      }
695 rajveer 3809
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(isSetGatewayId());
123 ashish 3810
      if (lastComparison != 0) {
3811
        return lastComparison;
3812
      }
695 rajveer 3813
      lastComparison = TBaseHelper.compareTo(gatewayId, typedOther.gatewayId);
123 ashish 3814
      if (lastComparison != 0) {
3815
        return lastComparison;
3816
      }
3817
      return 0;
3818
    }
3819
 
3820
    public void read(TProtocol iprot) throws TException {
3821
      TField field;
3822
      iprot.readStructBegin();
3823
      while (true)
3824
      {
3825
        field = iprot.readFieldBegin();
3826
        if (field.type == TType.STOP) { 
3827
          break;
3828
        }
3829
        _Fields fieldId = _Fields.findByThriftId(field.id);
3830
        if (fieldId == null) {
3831
          TProtocolUtil.skip(iprot, field.type);
3832
        } else {
3833
          switch (fieldId) {
3834
            case FROM_TIME:
3835
              if (field.type == TType.I64) {
695 rajveer 3836
                this.fromTime = iprot.readI64();
3837
                setFromTimeIsSet(true);
123 ashish 3838
              } else { 
3839
                TProtocolUtil.skip(iprot, field.type);
3840
              }
3841
              break;
3842
            case TO_TIME:
3843
              if (field.type == TType.I64) {
695 rajveer 3844
                this.toTime = iprot.readI64();
3845
                setToTimeIsSet(true);
123 ashish 3846
              } else { 
3847
                TProtocolUtil.skip(iprot, field.type);
3848
              }
3849
              break;
3850
            case STATUS:
3851
              if (field.type == TType.I32) {
3852
                this.status = PaymentStatus.findByValue(iprot.readI32());
3853
              } else { 
3854
                TProtocolUtil.skip(iprot, field.type);
3855
              }
3856
              break;
420 ashish 3857
            case GATEWAY_ID:
3858
              if (field.type == TType.I64) {
695 rajveer 3859
                this.gatewayId = iprot.readI64();
3860
                setGatewayIdIsSet(true);
123 ashish 3861
              } else { 
3862
                TProtocolUtil.skip(iprot, field.type);
3863
              }
3864
              break;
3865
          }
3866
          iprot.readFieldEnd();
3867
        }
3868
      }
3869
      iprot.readStructEnd();
3870
      validate();
3871
    }
3872
 
3873
    public void write(TProtocol oprot) throws TException {
3874
      validate();
3875
 
3876
      oprot.writeStructBegin(STRUCT_DESC);
3877
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
695 rajveer 3878
      oprot.writeI64(this.fromTime);
123 ashish 3879
      oprot.writeFieldEnd();
3880
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
695 rajveer 3881
      oprot.writeI64(this.toTime);
123 ashish 3882
      oprot.writeFieldEnd();
3883
      if (this.status != null) {
3884
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
3885
        oprot.writeI32(this.status.getValue());
3886
        oprot.writeFieldEnd();
3887
      }
420 ashish 3888
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
695 rajveer 3889
      oprot.writeI64(this.gatewayId);
420 ashish 3890
      oprot.writeFieldEnd();
123 ashish 3891
      oprot.writeFieldStop();
3892
      oprot.writeStructEnd();
3893
    }
3894
 
3895
    @Override
3896
    public String toString() {
3897
      StringBuilder sb = new StringBuilder("getPayments_args(");
3898
      boolean first = true;
3899
 
695 rajveer 3900
      sb.append("fromTime:");
3901
      sb.append(this.fromTime);
123 ashish 3902
      first = false;
3903
      if (!first) sb.append(", ");
695 rajveer 3904
      sb.append("toTime:");
3905
      sb.append(this.toTime);
123 ashish 3906
      first = false;
3907
      if (!first) sb.append(", ");
3908
      sb.append("status:");
3909
      if (this.status == null) {
3910
        sb.append("null");
3911
      } else {
3912
        String status_name = status.name();
3913
        if (status_name != null) {
3914
          sb.append(status_name);
3915
          sb.append(" (");
3916
        }
3917
        sb.append(this.status);
3918
        if (status_name != null) {
3919
          sb.append(")");
3920
        }
3921
      }
3922
      first = false;
3923
      if (!first) sb.append(", ");
695 rajveer 3924
      sb.append("gatewayId:");
3925
      sb.append(this.gatewayId);
123 ashish 3926
      first = false;
3927
      sb.append(")");
3928
      return sb.toString();
3929
    }
3930
 
3931
    public void validate() throws TException {
3932
      // check for required fields
3933
    }
3934
 
3935
  }
3936
 
695 rajveer 3937
  public static class getPayments_result implements TBase<getPayments_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPayments_result>   {
123 ashish 3938
    private static final TStruct STRUCT_DESC = new TStruct("getPayments_result");
3939
 
3940
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
3941
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
3942
 
3943
    private List<Payment> success;
3944
    private PaymentException pe;
3945
 
3946
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3947
    public enum _Fields implements TFieldIdEnum {
3948
      SUCCESS((short)0, "success"),
3949
      PE((short)1, "pe");
3950
 
3951
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3952
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3953
 
3954
      static {
3955
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3956
          byId.put((int)field._thriftId, field);
3957
          byName.put(field.getFieldName(), field);
3958
        }
3959
      }
3960
 
3961
      /**
3962
       * Find the _Fields constant that matches fieldId, or null if its not found.
3963
       */
3964
      public static _Fields findByThriftId(int fieldId) {
3965
        return byId.get(fieldId);
3966
      }
3967
 
3968
      /**
3969
       * Find the _Fields constant that matches fieldId, throwing an exception
3970
       * if it is not found.
3971
       */
3972
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3973
        _Fields fields = findByThriftId(fieldId);
3974
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3975
        return fields;
3976
      }
3977
 
3978
      /**
3979
       * Find the _Fields constant that matches name, or null if its not found.
3980
       */
3981
      public static _Fields findByName(String name) {
3982
        return byName.get(name);
3983
      }
3984
 
3985
      private final short _thriftId;
3986
      private final String _fieldName;
3987
 
3988
      _Fields(short thriftId, String fieldName) {
3989
        _thriftId = thriftId;
3990
        _fieldName = fieldName;
3991
      }
3992
 
3993
      public short getThriftFieldId() {
3994
        return _thriftId;
3995
      }
3996
 
3997
      public String getFieldName() {
3998
        return _fieldName;
3999
      }
4000
    }
4001
 
4002
    // isset id assignments
4003
 
4004
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4005
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4006
          new ListMetaData(TType.LIST, 
4007
              new StructMetaData(TType.STRUCT, Payment.class))));
4008
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
4009
          new FieldValueMetaData(TType.STRUCT)));
4010
    }});
4011
 
4012
    static {
4013
      FieldMetaData.addStructMetaDataMap(getPayments_result.class, metaDataMap);
4014
    }
4015
 
4016
    public getPayments_result() {
4017
    }
4018
 
4019
    public getPayments_result(
4020
      List<Payment> success,
4021
      PaymentException pe)
4022
    {
4023
      this();
4024
      this.success = success;
4025
      this.pe = pe;
4026
    }
4027
 
4028
    /**
4029
     * Performs a deep copy on <i>other</i>.
4030
     */
4031
    public getPayments_result(getPayments_result other) {
4032
      if (other.isSetSuccess()) {
4033
        List<Payment> __this__success = new ArrayList<Payment>();
4034
        for (Payment other_element : other.success) {
4035
          __this__success.add(new Payment(other_element));
4036
        }
4037
        this.success = __this__success;
4038
      }
4039
      if (other.isSetPe()) {
4040
        this.pe = new PaymentException(other.pe);
4041
      }
4042
    }
4043
 
4044
    public getPayments_result deepCopy() {
4045
      return new getPayments_result(this);
4046
    }
4047
 
4048
    @Deprecated
4049
    public getPayments_result clone() {
4050
      return new getPayments_result(this);
4051
    }
4052
 
4053
    public int getSuccessSize() {
4054
      return (this.success == null) ? 0 : this.success.size();
4055
    }
4056
 
4057
    public java.util.Iterator<Payment> getSuccessIterator() {
4058
      return (this.success == null) ? null : this.success.iterator();
4059
    }
4060
 
4061
    public void addToSuccess(Payment elem) {
4062
      if (this.success == null) {
4063
        this.success = new ArrayList<Payment>();
4064
      }
4065
      this.success.add(elem);
4066
    }
4067
 
4068
    public List<Payment> getSuccess() {
4069
      return this.success;
4070
    }
4071
 
4072
    public getPayments_result setSuccess(List<Payment> success) {
4073
      this.success = success;
4074
      return this;
4075
    }
4076
 
4077
    public void unsetSuccess() {
4078
      this.success = null;
4079
    }
4080
 
4081
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4082
    public boolean isSetSuccess() {
4083
      return this.success != null;
4084
    }
4085
 
4086
    public void setSuccessIsSet(boolean value) {
4087
      if (!value) {
4088
        this.success = null;
4089
      }
4090
    }
4091
 
4092
    public PaymentException getPe() {
4093
      return this.pe;
4094
    }
4095
 
4096
    public getPayments_result setPe(PaymentException pe) {
4097
      this.pe = pe;
4098
      return this;
4099
    }
4100
 
4101
    public void unsetPe() {
4102
      this.pe = null;
4103
    }
4104
 
4105
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
4106
    public boolean isSetPe() {
4107
      return this.pe != null;
4108
    }
4109
 
4110
    public void setPeIsSet(boolean value) {
4111
      if (!value) {
4112
        this.pe = null;
4113
      }
4114
    }
4115
 
4116
    public void setFieldValue(_Fields field, Object value) {
4117
      switch (field) {
4118
      case SUCCESS:
4119
        if (value == null) {
4120
          unsetSuccess();
4121
        } else {
4122
          setSuccess((List<Payment>)value);
4123
        }
4124
        break;
4125
 
4126
      case PE:
4127
        if (value == null) {
4128
          unsetPe();
4129
        } else {
4130
          setPe((PaymentException)value);
4131
        }
4132
        break;
4133
 
4134
      }
4135
    }
4136
 
4137
    public void setFieldValue(int fieldID, Object value) {
4138
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4139
    }
4140
 
4141
    public Object getFieldValue(_Fields field) {
4142
      switch (field) {
4143
      case SUCCESS:
4144
        return getSuccess();
4145
 
4146
      case PE:
4147
        return getPe();
4148
 
4149
      }
4150
      throw new IllegalStateException();
4151
    }
4152
 
4153
    public Object getFieldValue(int fieldId) {
4154
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4155
    }
4156
 
4157
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4158
    public boolean isSet(_Fields field) {
4159
      switch (field) {
4160
      case SUCCESS:
4161
        return isSetSuccess();
4162
      case PE:
4163
        return isSetPe();
4164
      }
4165
      throw new IllegalStateException();
4166
    }
4167
 
4168
    public boolean isSet(int fieldID) {
4169
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4170
    }
4171
 
4172
    @Override
4173
    public boolean equals(Object that) {
4174
      if (that == null)
4175
        return false;
4176
      if (that instanceof getPayments_result)
4177
        return this.equals((getPayments_result)that);
4178
      return false;
4179
    }
4180
 
4181
    public boolean equals(getPayments_result that) {
4182
      if (that == null)
4183
        return false;
4184
 
4185
      boolean this_present_success = true && this.isSetSuccess();
4186
      boolean that_present_success = true && that.isSetSuccess();
4187
      if (this_present_success || that_present_success) {
4188
        if (!(this_present_success && that_present_success))
4189
          return false;
4190
        if (!this.success.equals(that.success))
4191
          return false;
4192
      }
4193
 
4194
      boolean this_present_pe = true && this.isSetPe();
4195
      boolean that_present_pe = true && that.isSetPe();
4196
      if (this_present_pe || that_present_pe) {
4197
        if (!(this_present_pe && that_present_pe))
4198
          return false;
4199
        if (!this.pe.equals(that.pe))
4200
          return false;
4201
      }
4202
 
4203
      return true;
4204
    }
4205
 
4206
    @Override
4207
    public int hashCode() {
4208
      return 0;
4209
    }
4210
 
695 rajveer 4211
    public int compareTo(getPayments_result other) {
123 ashish 4212
      if (!getClass().equals(other.getClass())) {
4213
        return getClass().getName().compareTo(other.getClass().getName());
4214
      }
4215
 
4216
      int lastComparison = 0;
695 rajveer 4217
      getPayments_result typedOther = (getPayments_result)other;
123 ashish 4218
 
695 rajveer 4219
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
123 ashish 4220
      if (lastComparison != 0) {
4221
        return lastComparison;
4222
      }
695 rajveer 4223
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
123 ashish 4224
      if (lastComparison != 0) {
4225
        return lastComparison;
4226
      }
695 rajveer 4227
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());
4228
      if (lastComparison != 0) {
4229
        return lastComparison;
123 ashish 4230
      }
695 rajveer 4231
      lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);
4232
      if (lastComparison != 0) {
4233
        return lastComparison;
123 ashish 4234
      }
4235
      return 0;
4236
    }
4237
 
4238
    public void read(TProtocol iprot) throws TException {
4239
      TField field;
4240
      iprot.readStructBegin();
4241
      while (true)
4242
      {
4243
        field = iprot.readFieldBegin();
4244
        if (field.type == TType.STOP) { 
4245
          break;
4246
        }
4247
        _Fields fieldId = _Fields.findByThriftId(field.id);
4248
        if (fieldId == null) {
4249
          TProtocolUtil.skip(iprot, field.type);
4250
        } else {
4251
          switch (fieldId) {
4252
            case SUCCESS:
420 ashish 4253
              if (field.type == TType.LIST) {
4254
                {
2747 chandransh 4255
                  TList _list16 = iprot.readListBegin();
4256
                  this.success = new ArrayList<Payment>(_list16.size);
4257
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
420 ashish 4258
                  {
2747 chandransh 4259
                    Payment _elem18;
4260
                    _elem18 = new Payment();
4261
                    _elem18.read(iprot);
4262
                    this.success.add(_elem18);
420 ashish 4263
                  }
4264
                  iprot.readListEnd();
4265
                }
123 ashish 4266
              } else { 
4267
                TProtocolUtil.skip(iprot, field.type);
4268
              }
4269
              break;
4270
            case PE:
4271
              if (field.type == TType.STRUCT) {
4272
                this.pe = new PaymentException();
4273
                this.pe.read(iprot);
4274
              } else { 
4275
                TProtocolUtil.skip(iprot, field.type);
4276
              }
4277
              break;
4278
          }
4279
          iprot.readFieldEnd();
4280
        }
4281
      }
4282
      iprot.readStructEnd();
4283
      validate();
4284
    }
4285
 
4286
    public void write(TProtocol oprot) throws TException {
4287
      oprot.writeStructBegin(STRUCT_DESC);
4288
 
4289
      if (this.isSetSuccess()) {
4290
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
420 ashish 4291
        {
4292
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
2747 chandransh 4293
          for (Payment _iter19 : this.success)
420 ashish 4294
          {
2747 chandransh 4295
            _iter19.write(oprot);
420 ashish 4296
          }
4297
          oprot.writeListEnd();
4298
        }
123 ashish 4299
        oprot.writeFieldEnd();
4300
      } else if (this.isSetPe()) {
4301
        oprot.writeFieldBegin(PE_FIELD_DESC);
4302
        this.pe.write(oprot);
4303
        oprot.writeFieldEnd();
4304
      }
4305
      oprot.writeFieldStop();
4306
      oprot.writeStructEnd();
4307
    }
4308
 
4309
    @Override
4310
    public String toString() {
695 rajveer 4311
      StringBuilder sb = new StringBuilder("getPayments_result(");
123 ashish 4312
      boolean first = true;
4313
 
4314
      sb.append("success:");
4315
      if (this.success == null) {
4316
        sb.append("null");
4317
      } else {
4318
        sb.append(this.success);
4319
      }
4320
      first = false;
4321
      if (!first) sb.append(", ");
4322
      sb.append("pe:");
4323
      if (this.pe == null) {
4324
        sb.append("null");
4325
      } else {
4326
        sb.append(this.pe);
4327
      }
4328
      first = false;
4329
      sb.append(")");
4330
      return sb.toString();
4331
    }
4332
 
4333
    public void validate() throws TException {
4334
      // check for required fields
4335
    }
4336
 
4337
  }
4338
 
695 rajveer 4339
  public static class getPaymentGateway_args implements TBase<getPaymentGateway_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPaymentGateway_args>   {
4340
    private static final TStruct STRUCT_DESC = new TStruct("getPaymentGateway_args");
123 ashish 4341
 
420 ashish 4342
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
123 ashish 4343
 
420 ashish 4344
    private long id;
123 ashish 4345
 
4346
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4347
    public enum _Fields implements TFieldIdEnum {
695 rajveer 4348
      ID((short)1, "id");
123 ashish 4349
 
4350
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4351
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4352
 
4353
      static {
4354
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4355
          byId.put((int)field._thriftId, field);
4356
          byName.put(field.getFieldName(), field);
4357
        }
4358
      }
4359
 
4360
      /**
4361
       * Find the _Fields constant that matches fieldId, or null if its not found.
4362
       */
4363
      public static _Fields findByThriftId(int fieldId) {
4364
        return byId.get(fieldId);
4365
      }
4366
 
4367
      /**
4368
       * Find the _Fields constant that matches fieldId, throwing an exception
4369
       * if it is not found.
4370
       */
4371
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4372
        _Fields fields = findByThriftId(fieldId);
4373
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4374
        return fields;
4375
      }
4376
 
4377
      /**
4378
       * Find the _Fields constant that matches name, or null if its not found.
4379
       */
4380
      public static _Fields findByName(String name) {
4381
        return byName.get(name);
4382
      }
4383
 
4384
      private final short _thriftId;
4385
      private final String _fieldName;
4386
 
4387
      _Fields(short thriftId, String fieldName) {
4388
        _thriftId = thriftId;
4389
        _fieldName = fieldName;
4390
      }
4391
 
4392
      public short getThriftFieldId() {
4393
        return _thriftId;
4394
      }
4395
 
4396
      public String getFieldName() {
4397
        return _fieldName;
4398
      }
4399
    }
4400
 
4401
    // isset id assignments
420 ashish 4402
    private static final int __ID_ISSET_ID = 0;
123 ashish 4403
    private BitSet __isset_bit_vector = new BitSet(1);
4404
 
4405
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
420 ashish 4406
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
123 ashish 4407
          new FieldValueMetaData(TType.I64)));
4408
    }});
4409
 
4410
    static {
695 rajveer 4411
      FieldMetaData.addStructMetaDataMap(getPaymentGateway_args.class, metaDataMap);
123 ashish 4412
    }
4413
 
695 rajveer 4414
    public getPaymentGateway_args() {
123 ashish 4415
    }
4416
 
695 rajveer 4417
    public getPaymentGateway_args(
4418
      long id)
123 ashish 4419
    {
4420
      this();
420 ashish 4421
      this.id = id;
4422
      setIdIsSet(true);
123 ashish 4423
    }
4424
 
4425
    /**
4426
     * Performs a deep copy on <i>other</i>.
4427
     */
695 rajveer 4428
    public getPaymentGateway_args(getPaymentGateway_args other) {
123 ashish 4429
      __isset_bit_vector.clear();
4430
      __isset_bit_vector.or(other.__isset_bit_vector);
420 ashish 4431
      this.id = other.id;
123 ashish 4432
    }
4433
 
695 rajveer 4434
    public getPaymentGateway_args deepCopy() {
4435
      return new getPaymentGateway_args(this);
123 ashish 4436
    }
4437
 
4438
    @Deprecated
695 rajveer 4439
    public getPaymentGateway_args clone() {
4440
      return new getPaymentGateway_args(this);
123 ashish 4441
    }
4442
 
420 ashish 4443
    public long getId() {
4444
      return this.id;
123 ashish 4445
    }
4446
 
695 rajveer 4447
    public getPaymentGateway_args setId(long id) {
420 ashish 4448
      this.id = id;
4449
      setIdIsSet(true);
123 ashish 4450
      return this;
4451
    }
4452
 
420 ashish 4453
    public void unsetId() {
4454
      __isset_bit_vector.clear(__ID_ISSET_ID);
123 ashish 4455
    }
4456
 
420 ashish 4457
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
4458
    public boolean isSetId() {
4459
      return __isset_bit_vector.get(__ID_ISSET_ID);
123 ashish 4460
    }
4461
 
420 ashish 4462
    public void setIdIsSet(boolean value) {
4463
      __isset_bit_vector.set(__ID_ISSET_ID, value);
123 ashish 4464
    }
4465
 
4466
    public void setFieldValue(_Fields field, Object value) {
4467
      switch (field) {
420 ashish 4468
      case ID:
123 ashish 4469
        if (value == null) {
420 ashish 4470
          unsetId();
123 ashish 4471
        } else {
420 ashish 4472
          setId((Long)value);
123 ashish 4473
        }
4474
        break;
4475
 
4476
      }
4477
    }
4478
 
4479
    public void setFieldValue(int fieldID, Object value) {
4480
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4481
    }
4482
 
4483
    public Object getFieldValue(_Fields field) {
4484
      switch (field) {
420 ashish 4485
      case ID:
4486
        return new Long(getId());
123 ashish 4487
 
4488
      }
4489
      throw new IllegalStateException();
4490
    }
4491
 
4492
    public Object getFieldValue(int fieldId) {
4493
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4494
    }
4495
 
4496
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4497
    public boolean isSet(_Fields field) {
4498
      switch (field) {
420 ashish 4499
      case ID:
4500
        return isSetId();
123 ashish 4501
      }
4502
      throw new IllegalStateException();
4503
    }
4504
 
4505
    public boolean isSet(int fieldID) {
4506
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4507
    }
4508
 
4509
    @Override
4510
    public boolean equals(Object that) {
4511
      if (that == null)
4512
        return false;
695 rajveer 4513
      if (that instanceof getPaymentGateway_args)
4514
        return this.equals((getPaymentGateway_args)that);
123 ashish 4515
      return false;
4516
    }
4517
 
695 rajveer 4518
    public boolean equals(getPaymentGateway_args that) {
123 ashish 4519
      if (that == null)
4520
        return false;
4521
 
420 ashish 4522
      boolean this_present_id = true;
4523
      boolean that_present_id = true;
4524
      if (this_present_id || that_present_id) {
4525
        if (!(this_present_id && that_present_id))
123 ashish 4526
          return false;
420 ashish 4527
        if (this.id != that.id)
123 ashish 4528
          return false;
4529
      }
4530
 
4531
      return true;
4532
    }
4533
 
4534
    @Override
4535
    public int hashCode() {
4536
      return 0;
4537
    }
4538
 
695 rajveer 4539
    public int compareTo(getPaymentGateway_args other) {
123 ashish 4540
      if (!getClass().equals(other.getClass())) {
4541
        return getClass().getName().compareTo(other.getClass().getName());
4542
      }
4543
 
4544
      int lastComparison = 0;
695 rajveer 4545
      getPaymentGateway_args typedOther = (getPaymentGateway_args)other;
123 ashish 4546
 
420 ashish 4547
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
123 ashish 4548
      if (lastComparison != 0) {
4549
        return lastComparison;
4550
      }
420 ashish 4551
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
123 ashish 4552
      if (lastComparison != 0) {
4553
        return lastComparison;
4554
      }
4555
      return 0;
4556
    }
4557
 
4558
    public void read(TProtocol iprot) throws TException {
4559
      TField field;
4560
      iprot.readStructBegin();
4561
      while (true)
4562
      {
4563
        field = iprot.readFieldBegin();
4564
        if (field.type == TType.STOP) { 
4565
          break;
4566
        }
4567
        _Fields fieldId = _Fields.findByThriftId(field.id);
4568
        if (fieldId == null) {
4569
          TProtocolUtil.skip(iprot, field.type);
4570
        } else {
4571
          switch (fieldId) {
420 ashish 4572
            case ID:
123 ashish 4573
              if (field.type == TType.I64) {
420 ashish 4574
                this.id = iprot.readI64();
4575
                setIdIsSet(true);
123 ashish 4576
              } else { 
4577
                TProtocolUtil.skip(iprot, field.type);
4578
              }
4579
              break;
4580
          }
4581
          iprot.readFieldEnd();
4582
        }
4583
      }
4584
      iprot.readStructEnd();
4585
      validate();
4586
    }
4587
 
4588
    public void write(TProtocol oprot) throws TException {
4589
      validate();
4590
 
4591
      oprot.writeStructBegin(STRUCT_DESC);
420 ashish 4592
      oprot.writeFieldBegin(ID_FIELD_DESC);
4593
      oprot.writeI64(this.id);
123 ashish 4594
      oprot.writeFieldEnd();
4595
      oprot.writeFieldStop();
4596
      oprot.writeStructEnd();
4597
    }
4598
 
4599
    @Override
4600
    public String toString() {
695 rajveer 4601
      StringBuilder sb = new StringBuilder("getPaymentGateway_args(");
123 ashish 4602
      boolean first = true;
4603
 
420 ashish 4604
      sb.append("id:");
4605
      sb.append(this.id);
123 ashish 4606
      first = false;
4607
      sb.append(")");
4608
      return sb.toString();
4609
    }
4610
 
4611
    public void validate() throws TException {
4612
      // check for required fields
4613
    }
4614
 
4615
  }
4616
 
695 rajveer 4617
  public static class getPaymentGateway_result implements TBase<getPaymentGateway_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPaymentGateway_result>   {
4618
    private static final TStruct STRUCT_DESC = new TStruct("getPaymentGateway_result");
123 ashish 4619
 
695 rajveer 4620
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
123 ashish 4621
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
4622
 
695 rajveer 4623
    private PaymentGateway success;
123 ashish 4624
    private PaymentException pe;
4625
 
4626
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4627
    public enum _Fields implements TFieldIdEnum {
420 ashish 4628
      SUCCESS((short)0, "success"),
4629
      PE((short)1, "pe");
4630
 
4631
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4632
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4633
 
4634
      static {
4635
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4636
          byId.put((int)field._thriftId, field);
4637
          byName.put(field.getFieldName(), field);
4638
        }
4639
      }
4640
 
4641
      /**
4642
       * Find the _Fields constant that matches fieldId, or null if its not found.
4643
       */
4644
      public static _Fields findByThriftId(int fieldId) {
4645
        return byId.get(fieldId);
4646
      }
4647
 
4648
      /**
4649
       * Find the _Fields constant that matches fieldId, throwing an exception
4650
       * if it is not found.
4651
       */
4652
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4653
        _Fields fields = findByThriftId(fieldId);
4654
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4655
        return fields;
4656
      }
4657
 
4658
      /**
4659
       * Find the _Fields constant that matches name, or null if its not found.
4660
       */
4661
      public static _Fields findByName(String name) {
4662
        return byName.get(name);
4663
      }
4664
 
4665
      private final short _thriftId;
4666
      private final String _fieldName;
4667
 
4668
      _Fields(short thriftId, String fieldName) {
4669
        _thriftId = thriftId;
4670
        _fieldName = fieldName;
4671
      }
4672
 
4673
      public short getThriftFieldId() {
4674
        return _thriftId;
4675
      }
4676
 
4677
      public String getFieldName() {
4678
        return _fieldName;
4679
      }
4680
    }
4681
 
4682
    // isset id assignments
4683
 
4684
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4685
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
695 rajveer 4686
          new StructMetaData(TType.STRUCT, PaymentGateway.class)));
420 ashish 4687
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
4688
          new FieldValueMetaData(TType.STRUCT)));
4689
    }});
4690
 
4691
    static {
695 rajveer 4692
      FieldMetaData.addStructMetaDataMap(getPaymentGateway_result.class, metaDataMap);
420 ashish 4693
    }
4694
 
695 rajveer 4695
    public getPaymentGateway_result() {
420 ashish 4696
    }
4697
 
695 rajveer 4698
    public getPaymentGateway_result(
4699
      PaymentGateway success,
420 ashish 4700
      PaymentException pe)
4701
    {
4702
      this();
4703
      this.success = success;
4704
      this.pe = pe;
4705
    }
4706
 
4707
    /**
4708
     * Performs a deep copy on <i>other</i>.
4709
     */
695 rajveer 4710
    public getPaymentGateway_result(getPaymentGateway_result other) {
420 ashish 4711
      if (other.isSetSuccess()) {
695 rajveer 4712
        this.success = new PaymentGateway(other.success);
420 ashish 4713
      }
4714
      if (other.isSetPe()) {
4715
        this.pe = new PaymentException(other.pe);
4716
      }
4717
    }
4718
 
695 rajveer 4719
    public getPaymentGateway_result deepCopy() {
4720
      return new getPaymentGateway_result(this);
420 ashish 4721
    }
4722
 
4723
    @Deprecated
695 rajveer 4724
    public getPaymentGateway_result clone() {
4725
      return new getPaymentGateway_result(this);
420 ashish 4726
    }
4727
 
695 rajveer 4728
    public PaymentGateway getSuccess() {
420 ashish 4729
      return this.success;
4730
    }
4731
 
695 rajveer 4732
    public getPaymentGateway_result setSuccess(PaymentGateway success) {
420 ashish 4733
      this.success = success;
4734
      return this;
4735
    }
4736
 
4737
    public void unsetSuccess() {
4738
      this.success = null;
4739
    }
4740
 
4741
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4742
    public boolean isSetSuccess() {
4743
      return this.success != null;
4744
    }
4745
 
4746
    public void setSuccessIsSet(boolean value) {
4747
      if (!value) {
4748
        this.success = null;
4749
      }
4750
    }
4751
 
4752
    public PaymentException getPe() {
4753
      return this.pe;
4754
    }
4755
 
695 rajveer 4756
    public getPaymentGateway_result setPe(PaymentException pe) {
420 ashish 4757
      this.pe = pe;
4758
      return this;
4759
    }
4760
 
4761
    public void unsetPe() {
4762
      this.pe = null;
4763
    }
4764
 
4765
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
4766
    public boolean isSetPe() {
4767
      return this.pe != null;
4768
    }
4769
 
4770
    public void setPeIsSet(boolean value) {
4771
      if (!value) {
4772
        this.pe = null;
4773
      }
4774
    }
4775
 
4776
    public void setFieldValue(_Fields field, Object value) {
4777
      switch (field) {
4778
      case SUCCESS:
4779
        if (value == null) {
4780
          unsetSuccess();
4781
        } else {
695 rajveer 4782
          setSuccess((PaymentGateway)value);
420 ashish 4783
        }
4784
        break;
4785
 
4786
      case PE:
4787
        if (value == null) {
4788
          unsetPe();
4789
        } else {
4790
          setPe((PaymentException)value);
4791
        }
4792
        break;
4793
 
4794
      }
4795
    }
4796
 
4797
    public void setFieldValue(int fieldID, Object value) {
4798
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4799
    }
4800
 
4801
    public Object getFieldValue(_Fields field) {
4802
      switch (field) {
4803
      case SUCCESS:
4804
        return getSuccess();
4805
 
4806
      case PE:
4807
        return getPe();
4808
 
4809
      }
4810
      throw new IllegalStateException();
4811
    }
4812
 
4813
    public Object getFieldValue(int fieldId) {
4814
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4815
    }
4816
 
4817
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4818
    public boolean isSet(_Fields field) {
4819
      switch (field) {
4820
      case SUCCESS:
4821
        return isSetSuccess();
4822
      case PE:
4823
        return isSetPe();
4824
      }
4825
      throw new IllegalStateException();
4826
    }
4827
 
4828
    public boolean isSet(int fieldID) {
4829
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4830
    }
4831
 
4832
    @Override
4833
    public boolean equals(Object that) {
4834
      if (that == null)
4835
        return false;
695 rajveer 4836
      if (that instanceof getPaymentGateway_result)
4837
        return this.equals((getPaymentGateway_result)that);
420 ashish 4838
      return false;
4839
    }
4840
 
695 rajveer 4841
    public boolean equals(getPaymentGateway_result that) {
420 ashish 4842
      if (that == null)
4843
        return false;
4844
 
4845
      boolean this_present_success = true && this.isSetSuccess();
4846
      boolean that_present_success = true && that.isSetSuccess();
4847
      if (this_present_success || that_present_success) {
4848
        if (!(this_present_success && that_present_success))
4849
          return false;
4850
        if (!this.success.equals(that.success))
4851
          return false;
4852
      }
4853
 
4854
      boolean this_present_pe = true && this.isSetPe();
4855
      boolean that_present_pe = true && that.isSetPe();
4856
      if (this_present_pe || that_present_pe) {
4857
        if (!(this_present_pe && that_present_pe))
4858
          return false;
4859
        if (!this.pe.equals(that.pe))
4860
          return false;
4861
      }
4862
 
4863
      return true;
4864
    }
4865
 
4866
    @Override
4867
    public int hashCode() {
4868
      return 0;
4869
    }
4870
 
695 rajveer 4871
    public int compareTo(getPaymentGateway_result other) {
4872
      if (!getClass().equals(other.getClass())) {
4873
        return getClass().getName().compareTo(other.getClass().getName());
4874
      }
4875
 
4876
      int lastComparison = 0;
4877
      getPaymentGateway_result typedOther = (getPaymentGateway_result)other;
4878
 
4879
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4880
      if (lastComparison != 0) {
4881
        return lastComparison;
4882
      }
4883
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4884
      if (lastComparison != 0) {
4885
        return lastComparison;
4886
      }
4887
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());
4888
      if (lastComparison != 0) {
4889
        return lastComparison;
4890
      }
4891
      lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);
4892
      if (lastComparison != 0) {
4893
        return lastComparison;
4894
      }
4895
      return 0;
4896
    }
4897
 
420 ashish 4898
    public void read(TProtocol iprot) throws TException {
4899
      TField field;
4900
      iprot.readStructBegin();
4901
      while (true)
4902
      {
4903
        field = iprot.readFieldBegin();
4904
        if (field.type == TType.STOP) { 
4905
          break;
4906
        }
4907
        _Fields fieldId = _Fields.findByThriftId(field.id);
4908
        if (fieldId == null) {
4909
          TProtocolUtil.skip(iprot, field.type);
4910
        } else {
4911
          switch (fieldId) {
4912
            case SUCCESS:
695 rajveer 4913
              if (field.type == TType.STRUCT) {
4914
                this.success = new PaymentGateway();
4915
                this.success.read(iprot);
420 ashish 4916
              } else { 
4917
                TProtocolUtil.skip(iprot, field.type);
4918
              }
4919
              break;
4920
            case PE:
4921
              if (field.type == TType.STRUCT) {
4922
                this.pe = new PaymentException();
4923
                this.pe.read(iprot);
4924
              } else { 
4925
                TProtocolUtil.skip(iprot, field.type);
4926
              }
4927
              break;
4928
          }
4929
          iprot.readFieldEnd();
4930
        }
4931
      }
4932
      iprot.readStructEnd();
4933
      validate();
4934
    }
4935
 
4936
    public void write(TProtocol oprot) throws TException {
4937
      oprot.writeStructBegin(STRUCT_DESC);
4938
 
4939
      if (this.isSetSuccess()) {
4940
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
695 rajveer 4941
        this.success.write(oprot);
420 ashish 4942
        oprot.writeFieldEnd();
4943
      } else if (this.isSetPe()) {
4944
        oprot.writeFieldBegin(PE_FIELD_DESC);
4945
        this.pe.write(oprot);
4946
        oprot.writeFieldEnd();
4947
      }
4948
      oprot.writeFieldStop();
4949
      oprot.writeStructEnd();
4950
    }
4951
 
4952
    @Override
4953
    public String toString() {
695 rajveer 4954
      StringBuilder sb = new StringBuilder("getPaymentGateway_result(");
420 ashish 4955
      boolean first = true;
4956
 
4957
      sb.append("success:");
4958
      if (this.success == null) {
4959
        sb.append("null");
4960
      } else {
4961
        sb.append(this.success);
4962
      }
4963
      first = false;
4964
      if (!first) sb.append(", ");
4965
      sb.append("pe:");
4966
      if (this.pe == null) {
4967
        sb.append("null");
4968
      } else {
4969
        sb.append(this.pe);
4970
      }
4971
      first = false;
4972
      sb.append(")");
4973
      return sb.toString();
4974
    }
4975
 
4976
    public void validate() throws TException {
4977
      // check for required fields
4978
    }
4979
 
4980
  }
4981
 
695 rajveer 4982
  public static class getPayment_args implements TBase<getPayment_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPayment_args>   {
4983
    private static final TStruct STRUCT_DESC = new TStruct("getPayment_args");
420 ashish 4984
 
4985
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
4986
 
4987
    private long id;
4988
 
4989
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4990
    public enum _Fields implements TFieldIdEnum {
4991
      ID((short)1, "id");
4992
 
4993
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4994
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4995
 
4996
      static {
4997
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4998
          byId.put((int)field._thriftId, field);
4999
          byName.put(field.getFieldName(), field);
5000
        }
5001
      }
5002
 
5003
      /**
5004
       * Find the _Fields constant that matches fieldId, or null if its not found.
5005
       */
5006
      public static _Fields findByThriftId(int fieldId) {
5007
        return byId.get(fieldId);
5008
      }
5009
 
5010
      /**
5011
       * Find the _Fields constant that matches fieldId, throwing an exception
5012
       * if it is not found.
5013
       */
5014
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5015
        _Fields fields = findByThriftId(fieldId);
5016
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5017
        return fields;
5018
      }
5019
 
5020
      /**
5021
       * Find the _Fields constant that matches name, or null if its not found.
5022
       */
5023
      public static _Fields findByName(String name) {
5024
        return byName.get(name);
5025
      }
5026
 
5027
      private final short _thriftId;
5028
      private final String _fieldName;
5029
 
5030
      _Fields(short thriftId, String fieldName) {
5031
        _thriftId = thriftId;
5032
        _fieldName = fieldName;
5033
      }
5034
 
5035
      public short getThriftFieldId() {
5036
        return _thriftId;
5037
      }
5038
 
5039
      public String getFieldName() {
5040
        return _fieldName;
5041
      }
5042
    }
5043
 
5044
    // isset id assignments
5045
    private static final int __ID_ISSET_ID = 0;
5046
    private BitSet __isset_bit_vector = new BitSet(1);
5047
 
5048
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5049
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
5050
          new FieldValueMetaData(TType.I64)));
5051
    }});
5052
 
5053
    static {
695 rajveer 5054
      FieldMetaData.addStructMetaDataMap(getPayment_args.class, metaDataMap);
420 ashish 5055
    }
5056
 
695 rajveer 5057
    public getPayment_args() {
420 ashish 5058
    }
5059
 
695 rajveer 5060
    public getPayment_args(
420 ashish 5061
      long id)
5062
    {
5063
      this();
5064
      this.id = id;
5065
      setIdIsSet(true);
5066
    }
5067
 
5068
    /**
5069
     * Performs a deep copy on <i>other</i>.
5070
     */
695 rajveer 5071
    public getPayment_args(getPayment_args other) {
420 ashish 5072
      __isset_bit_vector.clear();
5073
      __isset_bit_vector.or(other.__isset_bit_vector);
5074
      this.id = other.id;
5075
    }
5076
 
695 rajveer 5077
    public getPayment_args deepCopy() {
5078
      return new getPayment_args(this);
420 ashish 5079
    }
5080
 
5081
    @Deprecated
695 rajveer 5082
    public getPayment_args clone() {
5083
      return new getPayment_args(this);
420 ashish 5084
    }
5085
 
5086
    public long getId() {
5087
      return this.id;
5088
    }
5089
 
695 rajveer 5090
    public getPayment_args setId(long id) {
420 ashish 5091
      this.id = id;
5092
      setIdIsSet(true);
5093
      return this;
5094
    }
5095
 
5096
    public void unsetId() {
5097
      __isset_bit_vector.clear(__ID_ISSET_ID);
5098
    }
5099
 
5100
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
5101
    public boolean isSetId() {
5102
      return __isset_bit_vector.get(__ID_ISSET_ID);
5103
    }
5104
 
5105
    public void setIdIsSet(boolean value) {
5106
      __isset_bit_vector.set(__ID_ISSET_ID, value);
5107
    }
5108
 
5109
    public void setFieldValue(_Fields field, Object value) {
5110
      switch (field) {
5111
      case ID:
5112
        if (value == null) {
5113
          unsetId();
5114
        } else {
5115
          setId((Long)value);
5116
        }
5117
        break;
5118
 
5119
      }
5120
    }
5121
 
5122
    public void setFieldValue(int fieldID, Object value) {
5123
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5124
    }
5125
 
5126
    public Object getFieldValue(_Fields field) {
5127
      switch (field) {
5128
      case ID:
5129
        return new Long(getId());
5130
 
5131
      }
5132
      throw new IllegalStateException();
5133
    }
5134
 
5135
    public Object getFieldValue(int fieldId) {
5136
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5137
    }
5138
 
5139
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5140
    public boolean isSet(_Fields field) {
5141
      switch (field) {
5142
      case ID:
5143
        return isSetId();
5144
      }
5145
      throw new IllegalStateException();
5146
    }
5147
 
5148
    public boolean isSet(int fieldID) {
5149
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5150
    }
5151
 
5152
    @Override
5153
    public boolean equals(Object that) {
5154
      if (that == null)
5155
        return false;
695 rajveer 5156
      if (that instanceof getPayment_args)
5157
        return this.equals((getPayment_args)that);
420 ashish 5158
      return false;
5159
    }
5160
 
695 rajveer 5161
    public boolean equals(getPayment_args that) {
420 ashish 5162
      if (that == null)
5163
        return false;
5164
 
5165
      boolean this_present_id = true;
5166
      boolean that_present_id = true;
5167
      if (this_present_id || that_present_id) {
5168
        if (!(this_present_id && that_present_id))
5169
          return false;
5170
        if (this.id != that.id)
5171
          return false;
5172
      }
5173
 
5174
      return true;
5175
    }
5176
 
5177
    @Override
5178
    public int hashCode() {
5179
      return 0;
5180
    }
5181
 
695 rajveer 5182
    public int compareTo(getPayment_args other) {
420 ashish 5183
      if (!getClass().equals(other.getClass())) {
5184
        return getClass().getName().compareTo(other.getClass().getName());
5185
      }
5186
 
5187
      int lastComparison = 0;
695 rajveer 5188
      getPayment_args typedOther = (getPayment_args)other;
420 ashish 5189
 
5190
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
5191
      if (lastComparison != 0) {
5192
        return lastComparison;
5193
      }
5194
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
5195
      if (lastComparison != 0) {
5196
        return lastComparison;
5197
      }
5198
      return 0;
5199
    }
5200
 
5201
    public void read(TProtocol iprot) throws TException {
5202
      TField field;
5203
      iprot.readStructBegin();
5204
      while (true)
5205
      {
5206
        field = iprot.readFieldBegin();
5207
        if (field.type == TType.STOP) { 
5208
          break;
5209
        }
5210
        _Fields fieldId = _Fields.findByThriftId(field.id);
5211
        if (fieldId == null) {
5212
          TProtocolUtil.skip(iprot, field.type);
5213
        } else {
5214
          switch (fieldId) {
5215
            case ID:
5216
              if (field.type == TType.I64) {
5217
                this.id = iprot.readI64();
5218
                setIdIsSet(true);
5219
              } else { 
5220
                TProtocolUtil.skip(iprot, field.type);
5221
              }
5222
              break;
5223
          }
5224
          iprot.readFieldEnd();
5225
        }
5226
      }
5227
      iprot.readStructEnd();
5228
      validate();
5229
    }
5230
 
5231
    public void write(TProtocol oprot) throws TException {
5232
      validate();
5233
 
5234
      oprot.writeStructBegin(STRUCT_DESC);
5235
      oprot.writeFieldBegin(ID_FIELD_DESC);
5236
      oprot.writeI64(this.id);
5237
      oprot.writeFieldEnd();
5238
      oprot.writeFieldStop();
5239
      oprot.writeStructEnd();
5240
    }
5241
 
5242
    @Override
5243
    public String toString() {
695 rajveer 5244
      StringBuilder sb = new StringBuilder("getPayment_args(");
420 ashish 5245
      boolean first = true;
5246
 
5247
      sb.append("id:");
5248
      sb.append(this.id);
5249
      first = false;
5250
      sb.append(")");
5251
      return sb.toString();
5252
    }
5253
 
5254
    public void validate() throws TException {
5255
      // check for required fields
5256
    }
5257
 
5258
  }
5259
 
695 rajveer 5260
  public static class getPayment_result implements TBase<getPayment_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPayment_result>   {
5261
    private static final TStruct STRUCT_DESC = new TStruct("getPayment_result");
420 ashish 5262
 
5263
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
5264
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
5265
 
695 rajveer 5266
    private Payment success;
420 ashish 5267
    private PaymentException pe;
5268
 
5269
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5270
    public enum _Fields implements TFieldIdEnum {
5271
      SUCCESS((short)0, "success"),
5272
      PE((short)1, "pe");
5273
 
5274
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5275
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5276
 
5277
      static {
5278
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5279
          byId.put((int)field._thriftId, field);
5280
          byName.put(field.getFieldName(), field);
5281
        }
5282
      }
5283
 
5284
      /**
5285
       * Find the _Fields constant that matches fieldId, or null if its not found.
5286
       */
5287
      public static _Fields findByThriftId(int fieldId) {
5288
        return byId.get(fieldId);
5289
      }
5290
 
5291
      /**
5292
       * Find the _Fields constant that matches fieldId, throwing an exception
5293
       * if it is not found.
5294
       */
5295
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5296
        _Fields fields = findByThriftId(fieldId);
5297
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5298
        return fields;
5299
      }
5300
 
5301
      /**
5302
       * Find the _Fields constant that matches name, or null if its not found.
5303
       */
5304
      public static _Fields findByName(String name) {
5305
        return byName.get(name);
5306
      }
5307
 
5308
      private final short _thriftId;
5309
      private final String _fieldName;
5310
 
5311
      _Fields(short thriftId, String fieldName) {
5312
        _thriftId = thriftId;
5313
        _fieldName = fieldName;
5314
      }
5315
 
5316
      public short getThriftFieldId() {
5317
        return _thriftId;
5318
      }
5319
 
5320
      public String getFieldName() {
5321
        return _fieldName;
5322
      }
5323
    }
5324
 
5325
    // isset id assignments
5326
 
5327
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5328
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
695 rajveer 5329
          new StructMetaData(TType.STRUCT, Payment.class)));
420 ashish 5330
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
5331
          new FieldValueMetaData(TType.STRUCT)));
5332
    }});
5333
 
5334
    static {
695 rajveer 5335
      FieldMetaData.addStructMetaDataMap(getPayment_result.class, metaDataMap);
420 ashish 5336
    }
5337
 
695 rajveer 5338
    public getPayment_result() {
420 ashish 5339
    }
5340
 
695 rajveer 5341
    public getPayment_result(
5342
      Payment success,
420 ashish 5343
      PaymentException pe)
5344
    {
5345
      this();
5346
      this.success = success;
5347
      this.pe = pe;
5348
    }
5349
 
5350
    /**
5351
     * Performs a deep copy on <i>other</i>.
5352
     */
695 rajveer 5353
    public getPayment_result(getPayment_result other) {
420 ashish 5354
      if (other.isSetSuccess()) {
695 rajveer 5355
        this.success = new Payment(other.success);
420 ashish 5356
      }
5357
      if (other.isSetPe()) {
5358
        this.pe = new PaymentException(other.pe);
5359
      }
5360
    }
5361
 
695 rajveer 5362
    public getPayment_result deepCopy() {
5363
      return new getPayment_result(this);
420 ashish 5364
    }
5365
 
5366
    @Deprecated
695 rajveer 5367
    public getPayment_result clone() {
5368
      return new getPayment_result(this);
420 ashish 5369
    }
5370
 
695 rajveer 5371
    public Payment getSuccess() {
420 ashish 5372
      return this.success;
5373
    }
5374
 
695 rajveer 5375
    public getPayment_result setSuccess(Payment success) {
420 ashish 5376
      this.success = success;
5377
      return this;
5378
    }
5379
 
5380
    public void unsetSuccess() {
5381
      this.success = null;
5382
    }
5383
 
5384
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5385
    public boolean isSetSuccess() {
5386
      return this.success != null;
5387
    }
5388
 
5389
    public void setSuccessIsSet(boolean value) {
5390
      if (!value) {
5391
        this.success = null;
5392
      }
5393
    }
5394
 
5395
    public PaymentException getPe() {
5396
      return this.pe;
5397
    }
5398
 
695 rajveer 5399
    public getPayment_result setPe(PaymentException pe) {
420 ashish 5400
      this.pe = pe;
5401
      return this;
5402
    }
5403
 
5404
    public void unsetPe() {
5405
      this.pe = null;
5406
    }
5407
 
5408
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
5409
    public boolean isSetPe() {
5410
      return this.pe != null;
5411
    }
5412
 
5413
    public void setPeIsSet(boolean value) {
5414
      if (!value) {
5415
        this.pe = null;
5416
      }
5417
    }
5418
 
5419
    public void setFieldValue(_Fields field, Object value) {
5420
      switch (field) {
5421
      case SUCCESS:
5422
        if (value == null) {
5423
          unsetSuccess();
5424
        } else {
695 rajveer 5425
          setSuccess((Payment)value);
420 ashish 5426
        }
5427
        break;
5428
 
5429
      case PE:
5430
        if (value == null) {
5431
          unsetPe();
5432
        } else {
5433
          setPe((PaymentException)value);
5434
        }
5435
        break;
5436
 
5437
      }
5438
    }
5439
 
5440
    public void setFieldValue(int fieldID, Object value) {
5441
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5442
    }
5443
 
5444
    public Object getFieldValue(_Fields field) {
5445
      switch (field) {
5446
      case SUCCESS:
5447
        return getSuccess();
5448
 
5449
      case PE:
5450
        return getPe();
5451
 
5452
      }
5453
      throw new IllegalStateException();
5454
    }
5455
 
5456
    public Object getFieldValue(int fieldId) {
5457
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5458
    }
5459
 
5460
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5461
    public boolean isSet(_Fields field) {
5462
      switch (field) {
5463
      case SUCCESS:
5464
        return isSetSuccess();
5465
      case PE:
5466
        return isSetPe();
5467
      }
5468
      throw new IllegalStateException();
5469
    }
5470
 
5471
    public boolean isSet(int fieldID) {
5472
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5473
    }
5474
 
5475
    @Override
5476
    public boolean equals(Object that) {
5477
      if (that == null)
5478
        return false;
695 rajveer 5479
      if (that instanceof getPayment_result)
5480
        return this.equals((getPayment_result)that);
420 ashish 5481
      return false;
5482
    }
5483
 
695 rajveer 5484
    public boolean equals(getPayment_result that) {
420 ashish 5485
      if (that == null)
5486
        return false;
5487
 
5488
      boolean this_present_success = true && this.isSetSuccess();
5489
      boolean that_present_success = true && that.isSetSuccess();
5490
      if (this_present_success || that_present_success) {
5491
        if (!(this_present_success && that_present_success))
5492
          return false;
5493
        if (!this.success.equals(that.success))
5494
          return false;
5495
      }
5496
 
5497
      boolean this_present_pe = true && this.isSetPe();
5498
      boolean that_present_pe = true && that.isSetPe();
5499
      if (this_present_pe || that_present_pe) {
5500
        if (!(this_present_pe && that_present_pe))
5501
          return false;
5502
        if (!this.pe.equals(that.pe))
5503
          return false;
5504
      }
5505
 
5506
      return true;
5507
    }
5508
 
5509
    @Override
5510
    public int hashCode() {
5511
      return 0;
5512
    }
5513
 
695 rajveer 5514
    public int compareTo(getPayment_result other) {
420 ashish 5515
      if (!getClass().equals(other.getClass())) {
5516
        return getClass().getName().compareTo(other.getClass().getName());
5517
      }
5518
 
5519
      int lastComparison = 0;
695 rajveer 5520
      getPayment_result typedOther = (getPayment_result)other;
420 ashish 5521
 
695 rajveer 5522
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
420 ashish 5523
      if (lastComparison != 0) {
5524
        return lastComparison;
5525
      }
695 rajveer 5526
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
420 ashish 5527
      if (lastComparison != 0) {
5528
        return lastComparison;
5529
      }
695 rajveer 5530
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());
420 ashish 5531
      if (lastComparison != 0) {
5532
        return lastComparison;
5533
      }
695 rajveer 5534
      lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);
420 ashish 5535
      if (lastComparison != 0) {
5536
        return lastComparison;
5537
      }
5538
      return 0;
5539
    }
5540
 
5541
    public void read(TProtocol iprot) throws TException {
5542
      TField field;
5543
      iprot.readStructBegin();
5544
      while (true)
5545
      {
5546
        field = iprot.readFieldBegin();
5547
        if (field.type == TType.STOP) { 
5548
          break;
5549
        }
5550
        _Fields fieldId = _Fields.findByThriftId(field.id);
5551
        if (fieldId == null) {
5552
          TProtocolUtil.skip(iprot, field.type);
5553
        } else {
5554
          switch (fieldId) {
695 rajveer 5555
            case SUCCESS:
5556
              if (field.type == TType.STRUCT) {
5557
                this.success = new Payment();
5558
                this.success.read(iprot);
420 ashish 5559
              } else { 
5560
                TProtocolUtil.skip(iprot, field.type);
5561
              }
5562
              break;
5563
            case PE:
5564
              if (field.type == TType.STRUCT) {
5565
                this.pe = new PaymentException();
5566
                this.pe.read(iprot);
5567
              } else { 
5568
                TProtocolUtil.skip(iprot, field.type);
5569
              }
5570
              break;
5571
          }
5572
          iprot.readFieldEnd();
5573
        }
5574
      }
5575
      iprot.readStructEnd();
5576
      validate();
5577
    }
5578
 
5579
    public void write(TProtocol oprot) throws TException {
5580
      oprot.writeStructBegin(STRUCT_DESC);
5581
 
695 rajveer 5582
      if (this.isSetSuccess()) {
5583
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5584
        this.success.write(oprot);
5585
        oprot.writeFieldEnd();
5586
      } else if (this.isSetPe()) {
420 ashish 5587
        oprot.writeFieldBegin(PE_FIELD_DESC);
5588
        this.pe.write(oprot);
5589
        oprot.writeFieldEnd();
5590
      }
5591
      oprot.writeFieldStop();
5592
      oprot.writeStructEnd();
5593
    }
5594
 
5595
    @Override
5596
    public String toString() {
695 rajveer 5597
      StringBuilder sb = new StringBuilder("getPayment_result(");
420 ashish 5598
      boolean first = true;
5599
 
695 rajveer 5600
      sb.append("success:");
5601
      if (this.success == null) {
5602
        sb.append("null");
5603
      } else {
5604
        sb.append(this.success);
5605
      }
5606
      first = false;
5607
      if (!first) sb.append(", ");
420 ashish 5608
      sb.append("pe:");
5609
      if (this.pe == null) {
5610
        sb.append("null");
5611
      } else {
5612
        sb.append(this.pe);
5613
      }
5614
      first = false;
5615
      sb.append(")");
5616
      return sb.toString();
5617
    }
5618
 
5619
    public void validate() throws TException {
5620
      // check for required fields
5621
    }
5622
 
5623
  }
5624
 
695 rajveer 5625
  public static class getPaymentForTxnId_args implements TBase<getPaymentForTxnId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getPaymentForTxnId_args>   {
5626
    private static final TStruct STRUCT_DESC = new TStruct("getPaymentForTxnId_args");
420 ashish 5627
 
695 rajveer 5628
    private static final TField TXN_ID_FIELD_DESC = new TField("txnId", TType.I64, (short)1);
420 ashish 5629
 
695 rajveer 5630
    private long txnId;
420 ashish 5631
 
5632
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5633
    public enum _Fields implements TFieldIdEnum {
695 rajveer 5634
      TXN_ID((short)1, "txnId");
420 ashish 5635
 
5636
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5637
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5638
 
5639
      static {
5640
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5641
          byId.put((int)field._thriftId, field);
5642
          byName.put(field.getFieldName(), field);
5643
        }
5644
      }
5645
 
5646
      /**
5647
       * Find the _Fields constant that matches fieldId, or null if its not found.
5648
       */
5649
      public static _Fields findByThriftId(int fieldId) {
5650
        return byId.get(fieldId);
5651
      }
5652
 
5653
      /**
5654
       * Find the _Fields constant that matches fieldId, throwing an exception
5655
       * if it is not found.
5656
       */
5657
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5658
        _Fields fields = findByThriftId(fieldId);
5659
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5660
        return fields;
5661
      }
5662
 
5663
      /**
5664
       * Find the _Fields constant that matches name, or null if its not found.
5665
       */
5666
      public static _Fields findByName(String name) {
5667
        return byName.get(name);
5668
      }
5669
 
5670
      private final short _thriftId;
5671
      private final String _fieldName;
5672
 
5673
      _Fields(short thriftId, String fieldName) {
5674
        _thriftId = thriftId;
5675
        _fieldName = fieldName;
5676
      }
5677
 
5678
      public short getThriftFieldId() {
5679
        return _thriftId;
5680
      }
5681
 
5682
      public String getFieldName() {
5683
        return _fieldName;
5684
      }
5685
    }
5686
 
5687
    // isset id assignments
695 rajveer 5688
    private static final int __TXNID_ISSET_ID = 0;
420 ashish 5689
    private BitSet __isset_bit_vector = new BitSet(1);
5690
 
5691
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
695 rajveer 5692
      put(_Fields.TXN_ID, new FieldMetaData("txnId", TFieldRequirementType.DEFAULT, 
420 ashish 5693
          new FieldValueMetaData(TType.I64)));
5694
    }});
5695
 
5696
    static {
695 rajveer 5697
      FieldMetaData.addStructMetaDataMap(getPaymentForTxnId_args.class, metaDataMap);
420 ashish 5698
    }
5699
 
695 rajveer 5700
    public getPaymentForTxnId_args() {
420 ashish 5701
    }
5702
 
695 rajveer 5703
    public getPaymentForTxnId_args(
5704
      long txnId)
420 ashish 5705
    {
5706
      this();
695 rajveer 5707
      this.txnId = txnId;
5708
      setTxnIdIsSet(true);
420 ashish 5709
    }
5710
 
5711
    /**
5712
     * Performs a deep copy on <i>other</i>.
5713
     */
695 rajveer 5714
    public getPaymentForTxnId_args(getPaymentForTxnId_args other) {
420 ashish 5715
      __isset_bit_vector.clear();
5716
      __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 5717
      this.txnId = other.txnId;
420 ashish 5718
    }
5719
 
695 rajveer 5720
    public getPaymentForTxnId_args deepCopy() {
5721
      return new getPaymentForTxnId_args(this);
420 ashish 5722
    }
5723
 
5724
    @Deprecated
695 rajveer 5725
    public getPaymentForTxnId_args clone() {
5726
      return new getPaymentForTxnId_args(this);
420 ashish 5727
    }
5728
 
695 rajveer 5729
    public long getTxnId() {
5730
      return this.txnId;
420 ashish 5731
    }
5732
 
695 rajveer 5733
    public getPaymentForTxnId_args setTxnId(long txnId) {
5734
      this.txnId = txnId;
5735
      setTxnIdIsSet(true);
420 ashish 5736
      return this;
5737
    }
5738
 
695 rajveer 5739
    public void unsetTxnId() {
5740
      __isset_bit_vector.clear(__TXNID_ISSET_ID);
420 ashish 5741
    }
5742
 
695 rajveer 5743
    /** Returns true if field txnId is set (has been asigned a value) and false otherwise */
5744
    public boolean isSetTxnId() {
5745
      return __isset_bit_vector.get(__TXNID_ISSET_ID);
420 ashish 5746
    }
5747
 
695 rajveer 5748
    public void setTxnIdIsSet(boolean value) {
5749
      __isset_bit_vector.set(__TXNID_ISSET_ID, value);
420 ashish 5750
    }
5751
 
5752
    public void setFieldValue(_Fields field, Object value) {
5753
      switch (field) {
695 rajveer 5754
      case TXN_ID:
420 ashish 5755
        if (value == null) {
695 rajveer 5756
          unsetTxnId();
420 ashish 5757
        } else {
695 rajveer 5758
          setTxnId((Long)value);
420 ashish 5759
        }
5760
        break;
5761
 
5762
      }
5763
    }
5764
 
5765
    public void setFieldValue(int fieldID, Object value) {
5766
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5767
    }
5768
 
5769
    public Object getFieldValue(_Fields field) {
5770
      switch (field) {
695 rajveer 5771
      case TXN_ID:
5772
        return new Long(getTxnId());
420 ashish 5773
 
5774
      }
5775
      throw new IllegalStateException();
5776
    }
5777
 
5778
    public Object getFieldValue(int fieldId) {
5779
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5780
    }
5781
 
5782
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5783
    public boolean isSet(_Fields field) {
5784
      switch (field) {
695 rajveer 5785
      case TXN_ID:
5786
        return isSetTxnId();
420 ashish 5787
      }
5788
      throw new IllegalStateException();
5789
    }
5790
 
5791
    public boolean isSet(int fieldID) {
5792
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5793
    }
5794
 
5795
    @Override
5796
    public boolean equals(Object that) {
5797
      if (that == null)
5798
        return false;
695 rajveer 5799
      if (that instanceof getPaymentForTxnId_args)
5800
        return this.equals((getPaymentForTxnId_args)that);
420 ashish 5801
      return false;
5802
    }
5803
 
695 rajveer 5804
    public boolean equals(getPaymentForTxnId_args that) {
420 ashish 5805
      if (that == null)
5806
        return false;
5807
 
695 rajveer 5808
      boolean this_present_txnId = true;
5809
      boolean that_present_txnId = true;
5810
      if (this_present_txnId || that_present_txnId) {
5811
        if (!(this_present_txnId && that_present_txnId))
420 ashish 5812
          return false;
695 rajveer 5813
        if (this.txnId != that.txnId)
420 ashish 5814
          return false;
5815
      }
5816
 
5817
      return true;
5818
    }
5819
 
5820
    @Override
5821
    public int hashCode() {
5822
      return 0;
5823
    }
5824
 
695 rajveer 5825
    public int compareTo(getPaymentForTxnId_args other) {
420 ashish 5826
      if (!getClass().equals(other.getClass())) {
5827
        return getClass().getName().compareTo(other.getClass().getName());
5828
      }
5829
 
5830
      int lastComparison = 0;
695 rajveer 5831
      getPaymentForTxnId_args typedOther = (getPaymentForTxnId_args)other;
420 ashish 5832
 
695 rajveer 5833
      lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(isSetTxnId());
420 ashish 5834
      if (lastComparison != 0) {
5835
        return lastComparison;
5836
      }
695 rajveer 5837
      lastComparison = TBaseHelper.compareTo(txnId, typedOther.txnId);
420 ashish 5838
      if (lastComparison != 0) {
5839
        return lastComparison;
5840
      }
5841
      return 0;
5842
    }
5843
 
5844
    public void read(TProtocol iprot) throws TException {
5845
      TField field;
5846
      iprot.readStructBegin();
5847
      while (true)
5848
      {
5849
        field = iprot.readFieldBegin();
5850
        if (field.type == TType.STOP) { 
5851
          break;
5852
        }
5853
        _Fields fieldId = _Fields.findByThriftId(field.id);
5854
        if (fieldId == null) {
5855
          TProtocolUtil.skip(iprot, field.type);
5856
        } else {
5857
          switch (fieldId) {
695 rajveer 5858
            case TXN_ID:
420 ashish 5859
              if (field.type == TType.I64) {
695 rajveer 5860
                this.txnId = iprot.readI64();
5861
                setTxnIdIsSet(true);
420 ashish 5862
              } else { 
5863
                TProtocolUtil.skip(iprot, field.type);
5864
              }
5865
              break;
5866
          }
5867
          iprot.readFieldEnd();
5868
        }
5869
      }
5870
      iprot.readStructEnd();
5871
      validate();
5872
    }
5873
 
5874
    public void write(TProtocol oprot) throws TException {
5875
      validate();
5876
 
5877
      oprot.writeStructBegin(STRUCT_DESC);
695 rajveer 5878
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
5879
      oprot.writeI64(this.txnId);
420 ashish 5880
      oprot.writeFieldEnd();
5881
      oprot.writeFieldStop();
5882
      oprot.writeStructEnd();
5883
    }
5884
 
5885
    @Override
5886
    public String toString() {
695 rajveer 5887
      StringBuilder sb = new StringBuilder("getPaymentForTxnId_args(");
420 ashish 5888
      boolean first = true;
5889
 
695 rajveer 5890
      sb.append("txnId:");
5891
      sb.append(this.txnId);
420 ashish 5892
      first = false;
5893
      sb.append(")");
5894
      return sb.toString();
5895
    }
5896
 
5897
    public void validate() throws TException {
5898
      // check for required fields
5899
    }
5900
 
5901
  }
5902
 
695 rajveer 5903
  public static class getPaymentForTxnId_result implements TBase<getPaymentForTxnId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getPaymentForTxnId_result>   {
5904
    private static final TStruct STRUCT_DESC = new TStruct("getPaymentForTxnId_result");
420 ashish 5905
 
695 rajveer 5906
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
420 ashish 5907
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
5908
 
695 rajveer 5909
    private List<Payment> success;
420 ashish 5910
    private PaymentException pe;
5911
 
5912
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5913
    public enum _Fields implements TFieldIdEnum {
5914
      SUCCESS((short)0, "success"),
5915
      PE((short)1, "pe");
5916
 
5917
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5918
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5919
 
5920
      static {
5921
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5922
          byId.put((int)field._thriftId, field);
5923
          byName.put(field.getFieldName(), field);
5924
        }
5925
      }
5926
 
5927
      /**
5928
       * Find the _Fields constant that matches fieldId, or null if its not found.
5929
       */
5930
      public static _Fields findByThriftId(int fieldId) {
5931
        return byId.get(fieldId);
5932
      }
5933
 
5934
      /**
5935
       * Find the _Fields constant that matches fieldId, throwing an exception
5936
       * if it is not found.
5937
       */
5938
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5939
        _Fields fields = findByThriftId(fieldId);
5940
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5941
        return fields;
5942
      }
5943
 
5944
      /**
5945
       * Find the _Fields constant that matches name, or null if its not found.
5946
       */
5947
      public static _Fields findByName(String name) {
5948
        return byName.get(name);
5949
      }
5950
 
5951
      private final short _thriftId;
5952
      private final String _fieldName;
5953
 
5954
      _Fields(short thriftId, String fieldName) {
5955
        _thriftId = thriftId;
5956
        _fieldName = fieldName;
5957
      }
5958
 
5959
      public short getThriftFieldId() {
5960
        return _thriftId;
5961
      }
5962
 
5963
      public String getFieldName() {
5964
        return _fieldName;
5965
      }
5966
    }
5967
 
5968
    // isset id assignments
5969
 
5970
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5971
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
695 rajveer 5972
          new ListMetaData(TType.LIST, 
5973
              new StructMetaData(TType.STRUCT, Payment.class))));
420 ashish 5974
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
5975
          new FieldValueMetaData(TType.STRUCT)));
5976
    }});
5977
 
5978
    static {
695 rajveer 5979
      FieldMetaData.addStructMetaDataMap(getPaymentForTxnId_result.class, metaDataMap);
420 ashish 5980
    }
5981
 
695 rajveer 5982
    public getPaymentForTxnId_result() {
420 ashish 5983
    }
5984
 
695 rajveer 5985
    public getPaymentForTxnId_result(
5986
      List<Payment> success,
420 ashish 5987
      PaymentException pe)
5988
    {
5989
      this();
5990
      this.success = success;
5991
      this.pe = pe;
5992
    }
5993
 
5994
    /**
5995
     * Performs a deep copy on <i>other</i>.
5996
     */
695 rajveer 5997
    public getPaymentForTxnId_result(getPaymentForTxnId_result other) {
420 ashish 5998
      if (other.isSetSuccess()) {
695 rajveer 5999
        List<Payment> __this__success = new ArrayList<Payment>();
6000
        for (Payment other_element : other.success) {
6001
          __this__success.add(new Payment(other_element));
6002
        }
6003
        this.success = __this__success;
420 ashish 6004
      }
6005
      if (other.isSetPe()) {
6006
        this.pe = new PaymentException(other.pe);
6007
      }
6008
    }
6009
 
695 rajveer 6010
    public getPaymentForTxnId_result deepCopy() {
6011
      return new getPaymentForTxnId_result(this);
420 ashish 6012
    }
6013
 
6014
    @Deprecated
695 rajveer 6015
    public getPaymentForTxnId_result clone() {
6016
      return new getPaymentForTxnId_result(this);
420 ashish 6017
    }
6018
 
695 rajveer 6019
    public int getSuccessSize() {
6020
      return (this.success == null) ? 0 : this.success.size();
6021
    }
6022
 
6023
    public java.util.Iterator<Payment> getSuccessIterator() {
6024
      return (this.success == null) ? null : this.success.iterator();
6025
    }
6026
 
6027
    public void addToSuccess(Payment elem) {
6028
      if (this.success == null) {
6029
        this.success = new ArrayList<Payment>();
6030
      }
6031
      this.success.add(elem);
6032
    }
6033
 
6034
    public List<Payment> getSuccess() {
420 ashish 6035
      return this.success;
6036
    }
6037
 
695 rajveer 6038
    public getPaymentForTxnId_result setSuccess(List<Payment> success) {
420 ashish 6039
      this.success = success;
6040
      return this;
6041
    }
6042
 
6043
    public void unsetSuccess() {
6044
      this.success = null;
6045
    }
6046
 
6047
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6048
    public boolean isSetSuccess() {
6049
      return this.success != null;
6050
    }
6051
 
6052
    public void setSuccessIsSet(boolean value) {
6053
      if (!value) {
6054
        this.success = null;
6055
      }
6056
    }
6057
 
6058
    public PaymentException getPe() {
6059
      return this.pe;
6060
    }
6061
 
695 rajveer 6062
    public getPaymentForTxnId_result setPe(PaymentException pe) {
420 ashish 6063
      this.pe = pe;
6064
      return this;
6065
    }
6066
 
6067
    public void unsetPe() {
6068
      this.pe = null;
6069
    }
6070
 
6071
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
6072
    public boolean isSetPe() {
6073
      return this.pe != null;
6074
    }
6075
 
6076
    public void setPeIsSet(boolean value) {
6077
      if (!value) {
6078
        this.pe = null;
6079
      }
6080
    }
6081
 
6082
    public void setFieldValue(_Fields field, Object value) {
6083
      switch (field) {
6084
      case SUCCESS:
6085
        if (value == null) {
6086
          unsetSuccess();
6087
        } else {
695 rajveer 6088
          setSuccess((List<Payment>)value);
420 ashish 6089
        }
6090
        break;
6091
 
6092
      case PE:
6093
        if (value == null) {
6094
          unsetPe();
6095
        } else {
6096
          setPe((PaymentException)value);
6097
        }
6098
        break;
6099
 
6100
      }
6101
    }
6102
 
6103
    public void setFieldValue(int fieldID, Object value) {
6104
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6105
    }
6106
 
6107
    public Object getFieldValue(_Fields field) {
6108
      switch (field) {
6109
      case SUCCESS:
6110
        return getSuccess();
6111
 
6112
      case PE:
6113
        return getPe();
6114
 
6115
      }
6116
      throw new IllegalStateException();
6117
    }
6118
 
6119
    public Object getFieldValue(int fieldId) {
6120
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6121
    }
6122
 
6123
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6124
    public boolean isSet(_Fields field) {
6125
      switch (field) {
6126
      case SUCCESS:
6127
        return isSetSuccess();
6128
      case PE:
6129
        return isSetPe();
6130
      }
6131
      throw new IllegalStateException();
6132
    }
6133
 
6134
    public boolean isSet(int fieldID) {
6135
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6136
    }
6137
 
6138
    @Override
6139
    public boolean equals(Object that) {
6140
      if (that == null)
6141
        return false;
695 rajveer 6142
      if (that instanceof getPaymentForTxnId_result)
6143
        return this.equals((getPaymentForTxnId_result)that);
420 ashish 6144
      return false;
6145
    }
6146
 
695 rajveer 6147
    public boolean equals(getPaymentForTxnId_result that) {
420 ashish 6148
      if (that == null)
6149
        return false;
6150
 
6151
      boolean this_present_success = true && this.isSetSuccess();
6152
      boolean that_present_success = true && that.isSetSuccess();
6153
      if (this_present_success || that_present_success) {
6154
        if (!(this_present_success && that_present_success))
6155
          return false;
6156
        if (!this.success.equals(that.success))
6157
          return false;
6158
      }
6159
 
6160
      boolean this_present_pe = true && this.isSetPe();
6161
      boolean that_present_pe = true && that.isSetPe();
6162
      if (this_present_pe || that_present_pe) {
6163
        if (!(this_present_pe && that_present_pe))
6164
          return false;
6165
        if (!this.pe.equals(that.pe))
6166
          return false;
6167
      }
6168
 
6169
      return true;
6170
    }
6171
 
6172
    @Override
6173
    public int hashCode() {
6174
      return 0;
6175
    }
6176
 
695 rajveer 6177
    public int compareTo(getPaymentForTxnId_result other) {
6178
      if (!getClass().equals(other.getClass())) {
6179
        return getClass().getName().compareTo(other.getClass().getName());
6180
      }
6181
 
6182
      int lastComparison = 0;
6183
      getPaymentForTxnId_result typedOther = (getPaymentForTxnId_result)other;
6184
 
6185
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6186
      if (lastComparison != 0) {
6187
        return lastComparison;
6188
      }
6189
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6190
      if (lastComparison != 0) {
6191
        return lastComparison;
6192
      }
6193
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());
6194
      if (lastComparison != 0) {
6195
        return lastComparison;
6196
      }
6197
      lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);
6198
      if (lastComparison != 0) {
6199
        return lastComparison;
6200
      }
6201
      return 0;
6202
    }
6203
 
420 ashish 6204
    public void read(TProtocol iprot) throws TException {
6205
      TField field;
6206
      iprot.readStructBegin();
6207
      while (true)
6208
      {
6209
        field = iprot.readFieldBegin();
6210
        if (field.type == TType.STOP) { 
6211
          break;
6212
        }
6213
        _Fields fieldId = _Fields.findByThriftId(field.id);
6214
        if (fieldId == null) {
6215
          TProtocolUtil.skip(iprot, field.type);
6216
        } else {
6217
          switch (fieldId) {
6218
            case SUCCESS:
695 rajveer 6219
              if (field.type == TType.LIST) {
6220
                {
2747 chandransh 6221
                  TList _list20 = iprot.readListBegin();
6222
                  this.success = new ArrayList<Payment>(_list20.size);
6223
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
695 rajveer 6224
                  {
2747 chandransh 6225
                    Payment _elem22;
6226
                    _elem22 = new Payment();
6227
                    _elem22.read(iprot);
6228
                    this.success.add(_elem22);
695 rajveer 6229
                  }
6230
                  iprot.readListEnd();
6231
                }
420 ashish 6232
              } else { 
6233
                TProtocolUtil.skip(iprot, field.type);
6234
              }
6235
              break;
6236
            case PE:
6237
              if (field.type == TType.STRUCT) {
6238
                this.pe = new PaymentException();
6239
                this.pe.read(iprot);
6240
              } else { 
6241
                TProtocolUtil.skip(iprot, field.type);
6242
              }
6243
              break;
6244
          }
6245
          iprot.readFieldEnd();
6246
        }
6247
      }
6248
      iprot.readStructEnd();
6249
      validate();
6250
    }
6251
 
6252
    public void write(TProtocol oprot) throws TException {
6253
      oprot.writeStructBegin(STRUCT_DESC);
6254
 
6255
      if (this.isSetSuccess()) {
6256
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
695 rajveer 6257
        {
6258
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
2747 chandransh 6259
          for (Payment _iter23 : this.success)
695 rajveer 6260
          {
2747 chandransh 6261
            _iter23.write(oprot);
695 rajveer 6262
          }
6263
          oprot.writeListEnd();
6264
        }
420 ashish 6265
        oprot.writeFieldEnd();
6266
      } else if (this.isSetPe()) {
6267
        oprot.writeFieldBegin(PE_FIELD_DESC);
6268
        this.pe.write(oprot);
6269
        oprot.writeFieldEnd();
6270
      }
6271
      oprot.writeFieldStop();
6272
      oprot.writeStructEnd();
6273
    }
6274
 
6275
    @Override
6276
    public String toString() {
695 rajveer 6277
      StringBuilder sb = new StringBuilder("getPaymentForTxnId_result(");
420 ashish 6278
      boolean first = true;
6279
 
6280
      sb.append("success:");
6281
      if (this.success == null) {
6282
        sb.append("null");
6283
      } else {
6284
        sb.append(this.success);
6285
      }
6286
      first = false;
6287
      if (!first) sb.append(", ");
6288
      sb.append("pe:");
6289
      if (this.pe == null) {
6290
        sb.append("null");
6291
      } else {
6292
        sb.append(this.pe);
6293
      }
6294
      first = false;
6295
      sb.append(")");
6296
      return sb.toString();
6297
    }
6298
 
6299
    public void validate() throws TException {
6300
      // check for required fields
6301
    }
6302
 
6303
  }
6304
 
695 rajveer 6305
  public static class updatePaymentDetails_args implements TBase<updatePaymentDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePaymentDetails_args>   {
6306
    private static final TStruct STRUCT_DESC = new TStruct("updatePaymentDetails_args");
420 ashish 6307
 
6308
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
695 rajveer 6309
    private static final TField GATEWAY_PAYMENT_ID_FIELD_DESC = new TField("gatewayPaymentId", TType.STRING, (short)2);
6310
    private static final TField SESSION_ID_FIELD_DESC = new TField("sessionId", TType.STRING, (short)3);
6311
    private static final TField GATEWAY_TXN_STATUS_FIELD_DESC = new TField("gatewayTxnStatus", TType.STRING, (short)4);
6312
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)5);
6313
    private static final TField GATEWAY_TXN_ID_FIELD_DESC = new TField("gatewayTxnId", TType.STRING, (short)6);
6314
    private static final TField AUTH_CODE_FIELD_DESC = new TField("authCode", TType.STRING, (short)7);
6315
    private static final TField REFERENCE_CODE_FIELD_DESC = new TField("referenceCode", TType.STRING, (short)8);
6316
    private static final TField ERROR_CODE_FIELD_DESC = new TField("errorCode", TType.STRING, (short)9);
6317
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)10);
1119 rajveer 6318
    private static final TField GATEWAY_TXN_DATE_FIELD_DESC = new TField("gatewayTxnDate", TType.STRING, (short)11);
6319
    private static final TField ATTRIBUTES_FIELD_DESC = new TField("attributes", TType.LIST, (short)12);
420 ashish 6320
 
6321
    private long id;
695 rajveer 6322
    private String gatewayPaymentId;
6323
    private String sessionId;
6324
    private String gatewayTxnStatus;
6325
    private String description;
6326
    private String gatewayTxnId;
6327
    private String authCode;
6328
    private String referenceCode;
6329
    private String errorCode;
6330
    private PaymentStatus status;
1119 rajveer 6331
    private String gatewayTxnDate;
695 rajveer 6332
    private List<Attribute> attributes;
420 ashish 6333
 
6334
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6335
    public enum _Fields implements TFieldIdEnum {
6336
      ID((short)1, "id"),
695 rajveer 6337
      GATEWAY_PAYMENT_ID((short)2, "gatewayPaymentId"),
6338
      SESSION_ID((short)3, "sessionId"),
6339
      GATEWAY_TXN_STATUS((short)4, "gatewayTxnStatus"),
6340
      DESCRIPTION((short)5, "description"),
6341
      GATEWAY_TXN_ID((short)6, "gatewayTxnId"),
6342
      AUTH_CODE((short)7, "authCode"),
6343
      REFERENCE_CODE((short)8, "referenceCode"),
6344
      ERROR_CODE((short)9, "errorCode"),
6345
      /**
6346
       * 
6347
       * @see PaymentStatus
6348
       */
6349
      STATUS((short)10, "status"),
1119 rajveer 6350
      GATEWAY_TXN_DATE((short)11, "gatewayTxnDate"),
6351
      ATTRIBUTES((short)12, "attributes");
420 ashish 6352
 
6353
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6354
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6355
 
6356
      static {
6357
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6358
          byId.put((int)field._thriftId, field);
6359
          byName.put(field.getFieldName(), field);
6360
        }
6361
      }
6362
 
6363
      /**
6364
       * Find the _Fields constant that matches fieldId, or null if its not found.
6365
       */
6366
      public static _Fields findByThriftId(int fieldId) {
6367
        return byId.get(fieldId);
6368
      }
6369
 
6370
      /**
6371
       * Find the _Fields constant that matches fieldId, throwing an exception
6372
       * if it is not found.
6373
       */
6374
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6375
        _Fields fields = findByThriftId(fieldId);
6376
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6377
        return fields;
6378
      }
6379
 
6380
      /**
6381
       * Find the _Fields constant that matches name, or null if its not found.
6382
       */
6383
      public static _Fields findByName(String name) {
6384
        return byName.get(name);
6385
      }
6386
 
6387
      private final short _thriftId;
6388
      private final String _fieldName;
6389
 
6390
      _Fields(short thriftId, String fieldName) {
6391
        _thriftId = thriftId;
6392
        _fieldName = fieldName;
6393
      }
6394
 
6395
      public short getThriftFieldId() {
6396
        return _thriftId;
6397
      }
6398
 
6399
      public String getFieldName() {
6400
        return _fieldName;
6401
      }
6402
    }
6403
 
6404
    // isset id assignments
6405
    private static final int __ID_ISSET_ID = 0;
6406
    private BitSet __isset_bit_vector = new BitSet(1);
6407
 
6408
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6409
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
6410
          new FieldValueMetaData(TType.I64)));
695 rajveer 6411
      put(_Fields.GATEWAY_PAYMENT_ID, new FieldMetaData("gatewayPaymentId", TFieldRequirementType.DEFAULT, 
420 ashish 6412
          new FieldValueMetaData(TType.STRING)));
695 rajveer 6413
      put(_Fields.SESSION_ID, new FieldMetaData("sessionId", TFieldRequirementType.DEFAULT, 
420 ashish 6414
          new FieldValueMetaData(TType.STRING)));
695 rajveer 6415
      put(_Fields.GATEWAY_TXN_STATUS, new FieldMetaData("gatewayTxnStatus", TFieldRequirementType.DEFAULT, 
420 ashish 6416
          new FieldValueMetaData(TType.STRING)));
695 rajveer 6417
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
420 ashish 6418
          new FieldValueMetaData(TType.STRING)));
695 rajveer 6419
      put(_Fields.GATEWAY_TXN_ID, new FieldMetaData("gatewayTxnId", TFieldRequirementType.DEFAULT, 
420 ashish 6420
          new FieldValueMetaData(TType.STRING)));
695 rajveer 6421
      put(_Fields.AUTH_CODE, new FieldMetaData("authCode", TFieldRequirementType.DEFAULT, 
420 ashish 6422
          new FieldValueMetaData(TType.STRING)));
695 rajveer 6423
      put(_Fields.REFERENCE_CODE, new FieldMetaData("referenceCode", TFieldRequirementType.DEFAULT, 
420 ashish 6424
          new FieldValueMetaData(TType.STRING)));
695 rajveer 6425
      put(_Fields.ERROR_CODE, new FieldMetaData("errorCode", TFieldRequirementType.DEFAULT, 
6426
          new FieldValueMetaData(TType.STRING)));
6427
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6428
          new EnumMetaData(TType.ENUM, PaymentStatus.class)));
1119 rajveer 6429
      put(_Fields.GATEWAY_TXN_DATE, new FieldMetaData("gatewayTxnDate", TFieldRequirementType.DEFAULT, 
6430
          new FieldValueMetaData(TType.STRING)));
695 rajveer 6431
      put(_Fields.ATTRIBUTES, new FieldMetaData("attributes", TFieldRequirementType.DEFAULT, 
6432
          new ListMetaData(TType.LIST, 
6433
              new StructMetaData(TType.STRUCT, Attribute.class))));
420 ashish 6434
    }});
6435
 
6436
    static {
695 rajveer 6437
      FieldMetaData.addStructMetaDataMap(updatePaymentDetails_args.class, metaDataMap);
420 ashish 6438
    }
6439
 
695 rajveer 6440
    public updatePaymentDetails_args() {
420 ashish 6441
    }
6442
 
695 rajveer 6443
    public updatePaymentDetails_args(
420 ashish 6444
      long id,
695 rajveer 6445
      String gatewayPaymentId,
6446
      String sessionId,
6447
      String gatewayTxnStatus,
6448
      String description,
6449
      String gatewayTxnId,
6450
      String authCode,
6451
      String referenceCode,
6452
      String errorCode,
6453
      PaymentStatus status,
1119 rajveer 6454
      String gatewayTxnDate,
695 rajveer 6455
      List<Attribute> attributes)
420 ashish 6456
    {
6457
      this();
6458
      this.id = id;
6459
      setIdIsSet(true);
695 rajveer 6460
      this.gatewayPaymentId = gatewayPaymentId;
6461
      this.sessionId = sessionId;
6462
      this.gatewayTxnStatus = gatewayTxnStatus;
6463
      this.description = description;
6464
      this.gatewayTxnId = gatewayTxnId;
6465
      this.authCode = authCode;
6466
      this.referenceCode = referenceCode;
6467
      this.errorCode = errorCode;
6468
      this.status = status;
1119 rajveer 6469
      this.gatewayTxnDate = gatewayTxnDate;
695 rajveer 6470
      this.attributes = attributes;
420 ashish 6471
    }
6472
 
6473
    /**
6474
     * Performs a deep copy on <i>other</i>.
6475
     */
695 rajveer 6476
    public updatePaymentDetails_args(updatePaymentDetails_args other) {
420 ashish 6477
      __isset_bit_vector.clear();
6478
      __isset_bit_vector.or(other.__isset_bit_vector);
6479
      this.id = other.id;
695 rajveer 6480
      if (other.isSetGatewayPaymentId()) {
6481
        this.gatewayPaymentId = other.gatewayPaymentId;
420 ashish 6482
      }
695 rajveer 6483
      if (other.isSetSessionId()) {
6484
        this.sessionId = other.sessionId;
420 ashish 6485
      }
695 rajveer 6486
      if (other.isSetGatewayTxnStatus()) {
6487
        this.gatewayTxnStatus = other.gatewayTxnStatus;
420 ashish 6488
      }
695 rajveer 6489
      if (other.isSetDescription()) {
6490
        this.description = other.description;
420 ashish 6491
      }
695 rajveer 6492
      if (other.isSetGatewayTxnId()) {
6493
        this.gatewayTxnId = other.gatewayTxnId;
420 ashish 6494
      }
695 rajveer 6495
      if (other.isSetAuthCode()) {
6496
        this.authCode = other.authCode;
420 ashish 6497
      }
695 rajveer 6498
      if (other.isSetReferenceCode()) {
6499
        this.referenceCode = other.referenceCode;
420 ashish 6500
      }
695 rajveer 6501
      if (other.isSetErrorCode()) {
6502
        this.errorCode = other.errorCode;
6503
      }
6504
      if (other.isSetStatus()) {
6505
        this.status = other.status;
6506
      }
1119 rajveer 6507
      if (other.isSetGatewayTxnDate()) {
6508
        this.gatewayTxnDate = other.gatewayTxnDate;
6509
      }
695 rajveer 6510
      if (other.isSetAttributes()) {
6511
        List<Attribute> __this__attributes = new ArrayList<Attribute>();
6512
        for (Attribute other_element : other.attributes) {
6513
          __this__attributes.add(new Attribute(other_element));
6514
        }
6515
        this.attributes = __this__attributes;
6516
      }
420 ashish 6517
    }
6518
 
695 rajveer 6519
    public updatePaymentDetails_args deepCopy() {
6520
      return new updatePaymentDetails_args(this);
420 ashish 6521
    }
6522
 
6523
    @Deprecated
695 rajveer 6524
    public updatePaymentDetails_args clone() {
6525
      return new updatePaymentDetails_args(this);
420 ashish 6526
    }
6527
 
6528
    public long getId() {
6529
      return this.id;
6530
    }
6531
 
695 rajveer 6532
    public updatePaymentDetails_args setId(long id) {
420 ashish 6533
      this.id = id;
6534
      setIdIsSet(true);
6535
      return this;
6536
    }
6537
 
6538
    public void unsetId() {
6539
      __isset_bit_vector.clear(__ID_ISSET_ID);
6540
    }
6541
 
6542
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
6543
    public boolean isSetId() {
6544
      return __isset_bit_vector.get(__ID_ISSET_ID);
6545
    }
6546
 
6547
    public void setIdIsSet(boolean value) {
6548
      __isset_bit_vector.set(__ID_ISSET_ID, value);
6549
    }
6550
 
695 rajveer 6551
    public String getGatewayPaymentId() {
6552
      return this.gatewayPaymentId;
420 ashish 6553
    }
6554
 
695 rajveer 6555
    public updatePaymentDetails_args setGatewayPaymentId(String gatewayPaymentId) {
6556
      this.gatewayPaymentId = gatewayPaymentId;
420 ashish 6557
      return this;
6558
    }
6559
 
695 rajveer 6560
    public void unsetGatewayPaymentId() {
6561
      this.gatewayPaymentId = null;
420 ashish 6562
    }
6563
 
695 rajveer 6564
    /** Returns true if field gatewayPaymentId is set (has been asigned a value) and false otherwise */
6565
    public boolean isSetGatewayPaymentId() {
6566
      return this.gatewayPaymentId != null;
420 ashish 6567
    }
6568
 
695 rajveer 6569
    public void setGatewayPaymentIdIsSet(boolean value) {
420 ashish 6570
      if (!value) {
695 rajveer 6571
        this.gatewayPaymentId = null;
420 ashish 6572
      }
6573
    }
6574
 
695 rajveer 6575
    public String getSessionId() {
6576
      return this.sessionId;
420 ashish 6577
    }
6578
 
695 rajveer 6579
    public updatePaymentDetails_args setSessionId(String sessionId) {
6580
      this.sessionId = sessionId;
420 ashish 6581
      return this;
6582
    }
6583
 
695 rajveer 6584
    public void unsetSessionId() {
6585
      this.sessionId = null;
420 ashish 6586
    }
6587
 
695 rajveer 6588
    /** Returns true if field sessionId is set (has been asigned a value) and false otherwise */
6589
    public boolean isSetSessionId() {
6590
      return this.sessionId != null;
420 ashish 6591
    }
6592
 
695 rajveer 6593
    public void setSessionIdIsSet(boolean value) {
420 ashish 6594
      if (!value) {
695 rajveer 6595
        this.sessionId = null;
420 ashish 6596
      }
6597
    }
6598
 
695 rajveer 6599
    public String getGatewayTxnStatus() {
6600
      return this.gatewayTxnStatus;
420 ashish 6601
    }
6602
 
695 rajveer 6603
    public updatePaymentDetails_args setGatewayTxnStatus(String gatewayTxnStatus) {
6604
      this.gatewayTxnStatus = gatewayTxnStatus;
420 ashish 6605
      return this;
6606
    }
6607
 
695 rajveer 6608
    public void unsetGatewayTxnStatus() {
6609
      this.gatewayTxnStatus = null;
420 ashish 6610
    }
6611
 
695 rajveer 6612
    /** Returns true if field gatewayTxnStatus is set (has been asigned a value) and false otherwise */
6613
    public boolean isSetGatewayTxnStatus() {
6614
      return this.gatewayTxnStatus != null;
420 ashish 6615
    }
6616
 
695 rajveer 6617
    public void setGatewayTxnStatusIsSet(boolean value) {
420 ashish 6618
      if (!value) {
695 rajveer 6619
        this.gatewayTxnStatus = null;
420 ashish 6620
      }
6621
    }
6622
 
695 rajveer 6623
    public String getDescription() {
6624
      return this.description;
420 ashish 6625
    }
6626
 
695 rajveer 6627
    public updatePaymentDetails_args setDescription(String description) {
6628
      this.description = description;
420 ashish 6629
      return this;
6630
    }
6631
 
695 rajveer 6632
    public void unsetDescription() {
6633
      this.description = null;
420 ashish 6634
    }
6635
 
695 rajveer 6636
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
6637
    public boolean isSetDescription() {
6638
      return this.description != null;
420 ashish 6639
    }
6640
 
695 rajveer 6641
    public void setDescriptionIsSet(boolean value) {
420 ashish 6642
      if (!value) {
695 rajveer 6643
        this.description = null;
420 ashish 6644
      }
6645
    }
6646
 
695 rajveer 6647
    public String getGatewayTxnId() {
6648
      return this.gatewayTxnId;
420 ashish 6649
    }
6650
 
695 rajveer 6651
    public updatePaymentDetails_args setGatewayTxnId(String gatewayTxnId) {
6652
      this.gatewayTxnId = gatewayTxnId;
420 ashish 6653
      return this;
6654
    }
6655
 
695 rajveer 6656
    public void unsetGatewayTxnId() {
6657
      this.gatewayTxnId = null;
420 ashish 6658
    }
6659
 
695 rajveer 6660
    /** Returns true if field gatewayTxnId is set (has been asigned a value) and false otherwise */
6661
    public boolean isSetGatewayTxnId() {
6662
      return this.gatewayTxnId != null;
420 ashish 6663
    }
6664
 
695 rajveer 6665
    public void setGatewayTxnIdIsSet(boolean value) {
420 ashish 6666
      if (!value) {
695 rajveer 6667
        this.gatewayTxnId = null;
420 ashish 6668
      }
6669
    }
6670
 
695 rajveer 6671
    public String getAuthCode() {
6672
      return this.authCode;
420 ashish 6673
    }
6674
 
695 rajveer 6675
    public updatePaymentDetails_args setAuthCode(String authCode) {
6676
      this.authCode = authCode;
420 ashish 6677
      return this;
6678
    }
6679
 
695 rajveer 6680
    public void unsetAuthCode() {
6681
      this.authCode = null;
420 ashish 6682
    }
6683
 
695 rajveer 6684
    /** Returns true if field authCode is set (has been asigned a value) and false otherwise */
6685
    public boolean isSetAuthCode() {
6686
      return this.authCode != null;
420 ashish 6687
    }
6688
 
695 rajveer 6689
    public void setAuthCodeIsSet(boolean value) {
420 ashish 6690
      if (!value) {
695 rajveer 6691
        this.authCode = null;
420 ashish 6692
      }
6693
    }
6694
 
695 rajveer 6695
    public String getReferenceCode() {
6696
      return this.referenceCode;
420 ashish 6697
    }
6698
 
695 rajveer 6699
    public updatePaymentDetails_args setReferenceCode(String referenceCode) {
6700
      this.referenceCode = referenceCode;
420 ashish 6701
      return this;
6702
    }
6703
 
695 rajveer 6704
    public void unsetReferenceCode() {
6705
      this.referenceCode = null;
420 ashish 6706
    }
6707
 
695 rajveer 6708
    /** Returns true if field referenceCode is set (has been asigned a value) and false otherwise */
6709
    public boolean isSetReferenceCode() {
6710
      return this.referenceCode != null;
420 ashish 6711
    }
6712
 
695 rajveer 6713
    public void setReferenceCodeIsSet(boolean value) {
420 ashish 6714
      if (!value) {
695 rajveer 6715
        this.referenceCode = null;
420 ashish 6716
      }
6717
    }
6718
 
695 rajveer 6719
    public String getErrorCode() {
6720
      return this.errorCode;
6721
    }
6722
 
6723
    public updatePaymentDetails_args setErrorCode(String errorCode) {
6724
      this.errorCode = errorCode;
6725
      return this;
6726
    }
6727
 
6728
    public void unsetErrorCode() {
6729
      this.errorCode = null;
6730
    }
6731
 
6732
    /** Returns true if field errorCode is set (has been asigned a value) and false otherwise */
6733
    public boolean isSetErrorCode() {
6734
      return this.errorCode != null;
6735
    }
6736
 
6737
    public void setErrorCodeIsSet(boolean value) {
6738
      if (!value) {
6739
        this.errorCode = null;
6740
      }
6741
    }
6742
 
6743
    /**
6744
     * 
6745
     * @see PaymentStatus
6746
     */
6747
    public PaymentStatus getStatus() {
6748
      return this.status;
6749
    }
6750
 
6751
    /**
6752
     * 
6753
     * @see PaymentStatus
6754
     */
6755
    public updatePaymentDetails_args setStatus(PaymentStatus status) {
6756
      this.status = status;
6757
      return this;
6758
    }
6759
 
6760
    public void unsetStatus() {
6761
      this.status = null;
6762
    }
6763
 
6764
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6765
    public boolean isSetStatus() {
6766
      return this.status != null;
6767
    }
6768
 
6769
    public void setStatusIsSet(boolean value) {
6770
      if (!value) {
6771
        this.status = null;
6772
      }
6773
    }
6774
 
1119 rajveer 6775
    public String getGatewayTxnDate() {
6776
      return this.gatewayTxnDate;
6777
    }
6778
 
6779
    public updatePaymentDetails_args setGatewayTxnDate(String gatewayTxnDate) {
6780
      this.gatewayTxnDate = gatewayTxnDate;
6781
      return this;
6782
    }
6783
 
6784
    public void unsetGatewayTxnDate() {
6785
      this.gatewayTxnDate = null;
6786
    }
6787
 
6788
    /** Returns true if field gatewayTxnDate is set (has been asigned a value) and false otherwise */
6789
    public boolean isSetGatewayTxnDate() {
6790
      return this.gatewayTxnDate != null;
6791
    }
6792
 
6793
    public void setGatewayTxnDateIsSet(boolean value) {
6794
      if (!value) {
6795
        this.gatewayTxnDate = null;
6796
      }
6797
    }
6798
 
695 rajveer 6799
    public int getAttributesSize() {
6800
      return (this.attributes == null) ? 0 : this.attributes.size();
6801
    }
6802
 
6803
    public java.util.Iterator<Attribute> getAttributesIterator() {
6804
      return (this.attributes == null) ? null : this.attributes.iterator();
6805
    }
6806
 
6807
    public void addToAttributes(Attribute elem) {
6808
      if (this.attributes == null) {
6809
        this.attributes = new ArrayList<Attribute>();
6810
      }
6811
      this.attributes.add(elem);
6812
    }
6813
 
6814
    public List<Attribute> getAttributes() {
6815
      return this.attributes;
6816
    }
6817
 
6818
    public updatePaymentDetails_args setAttributes(List<Attribute> attributes) {
6819
      this.attributes = attributes;
6820
      return this;
6821
    }
6822
 
6823
    public void unsetAttributes() {
6824
      this.attributes = null;
6825
    }
6826
 
6827
    /** Returns true if field attributes is set (has been asigned a value) and false otherwise */
6828
    public boolean isSetAttributes() {
6829
      return this.attributes != null;
6830
    }
6831
 
6832
    public void setAttributesIsSet(boolean value) {
6833
      if (!value) {
6834
        this.attributes = null;
6835
      }
6836
    }
6837
 
420 ashish 6838
    public void setFieldValue(_Fields field, Object value) {
6839
      switch (field) {
6840
      case ID:
6841
        if (value == null) {
6842
          unsetId();
6843
        } else {
6844
          setId((Long)value);
6845
        }
6846
        break;
6847
 
695 rajveer 6848
      case GATEWAY_PAYMENT_ID:
420 ashish 6849
        if (value == null) {
695 rajveer 6850
          unsetGatewayPaymentId();
420 ashish 6851
        } else {
695 rajveer 6852
          setGatewayPaymentId((String)value);
420 ashish 6853
        }
6854
        break;
6855
 
695 rajveer 6856
      case SESSION_ID:
420 ashish 6857
        if (value == null) {
695 rajveer 6858
          unsetSessionId();
420 ashish 6859
        } else {
695 rajveer 6860
          setSessionId((String)value);
420 ashish 6861
        }
6862
        break;
6863
 
695 rajveer 6864
      case GATEWAY_TXN_STATUS:
420 ashish 6865
        if (value == null) {
695 rajveer 6866
          unsetGatewayTxnStatus();
420 ashish 6867
        } else {
695 rajveer 6868
          setGatewayTxnStatus((String)value);
420 ashish 6869
        }
6870
        break;
6871
 
695 rajveer 6872
      case DESCRIPTION:
420 ashish 6873
        if (value == null) {
695 rajveer 6874
          unsetDescription();
420 ashish 6875
        } else {
695 rajveer 6876
          setDescription((String)value);
420 ashish 6877
        }
6878
        break;
6879
 
695 rajveer 6880
      case GATEWAY_TXN_ID:
420 ashish 6881
        if (value == null) {
695 rajveer 6882
          unsetGatewayTxnId();
420 ashish 6883
        } else {
695 rajveer 6884
          setGatewayTxnId((String)value);
420 ashish 6885
        }
6886
        break;
6887
 
6888
      case AUTH_CODE:
6889
        if (value == null) {
695 rajveer 6890
          unsetAuthCode();
420 ashish 6891
        } else {
695 rajveer 6892
          setAuthCode((String)value);
420 ashish 6893
        }
6894
        break;
6895
 
695 rajveer 6896
      case REFERENCE_CODE:
420 ashish 6897
        if (value == null) {
695 rajveer 6898
          unsetReferenceCode();
420 ashish 6899
        } else {
695 rajveer 6900
          setReferenceCode((String)value);
420 ashish 6901
        }
6902
        break;
6903
 
695 rajveer 6904
      case ERROR_CODE:
6905
        if (value == null) {
6906
          unsetErrorCode();
6907
        } else {
6908
          setErrorCode((String)value);
6909
        }
6910
        break;
6911
 
6912
      case STATUS:
6913
        if (value == null) {
6914
          unsetStatus();
6915
        } else {
6916
          setStatus((PaymentStatus)value);
6917
        }
6918
        break;
6919
 
1119 rajveer 6920
      case GATEWAY_TXN_DATE:
6921
        if (value == null) {
6922
          unsetGatewayTxnDate();
6923
        } else {
6924
          setGatewayTxnDate((String)value);
6925
        }
6926
        break;
6927
 
695 rajveer 6928
      case ATTRIBUTES:
6929
        if (value == null) {
6930
          unsetAttributes();
6931
        } else {
6932
          setAttributes((List<Attribute>)value);
6933
        }
6934
        break;
6935
 
420 ashish 6936
      }
6937
    }
6938
 
6939
    public void setFieldValue(int fieldID, Object value) {
6940
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6941
    }
6942
 
6943
    public Object getFieldValue(_Fields field) {
6944
      switch (field) {
6945
      case ID:
6946
        return new Long(getId());
6947
 
695 rajveer 6948
      case GATEWAY_PAYMENT_ID:
6949
        return getGatewayPaymentId();
420 ashish 6950
 
695 rajveer 6951
      case SESSION_ID:
6952
        return getSessionId();
420 ashish 6953
 
695 rajveer 6954
      case GATEWAY_TXN_STATUS:
6955
        return getGatewayTxnStatus();
420 ashish 6956
 
695 rajveer 6957
      case DESCRIPTION:
6958
        return getDescription();
420 ashish 6959
 
695 rajveer 6960
      case GATEWAY_TXN_ID:
6961
        return getGatewayTxnId();
420 ashish 6962
 
6963
      case AUTH_CODE:
695 rajveer 6964
        return getAuthCode();
420 ashish 6965
 
695 rajveer 6966
      case REFERENCE_CODE:
6967
        return getReferenceCode();
420 ashish 6968
 
695 rajveer 6969
      case ERROR_CODE:
6970
        return getErrorCode();
6971
 
6972
      case STATUS:
6973
        return getStatus();
6974
 
1119 rajveer 6975
      case GATEWAY_TXN_DATE:
6976
        return getGatewayTxnDate();
6977
 
695 rajveer 6978
      case ATTRIBUTES:
6979
        return getAttributes();
6980
 
420 ashish 6981
      }
6982
      throw new IllegalStateException();
6983
    }
6984
 
6985
    public Object getFieldValue(int fieldId) {
6986
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6987
    }
6988
 
6989
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6990
    public boolean isSet(_Fields field) {
6991
      switch (field) {
6992
      case ID:
6993
        return isSetId();
695 rajveer 6994
      case GATEWAY_PAYMENT_ID:
6995
        return isSetGatewayPaymentId();
420 ashish 6996
      case SESSION_ID:
695 rajveer 6997
        return isSetSessionId();
6998
      case GATEWAY_TXN_STATUS:
6999
        return isSetGatewayTxnStatus();
7000
      case DESCRIPTION:
7001
        return isSetDescription();
7002
      case GATEWAY_TXN_ID:
7003
        return isSetGatewayTxnId();
420 ashish 7004
      case AUTH_CODE:
695 rajveer 7005
        return isSetAuthCode();
7006
      case REFERENCE_CODE:
7007
        return isSetReferenceCode();
7008
      case ERROR_CODE:
7009
        return isSetErrorCode();
7010
      case STATUS:
7011
        return isSetStatus();
1119 rajveer 7012
      case GATEWAY_TXN_DATE:
7013
        return isSetGatewayTxnDate();
695 rajveer 7014
      case ATTRIBUTES:
7015
        return isSetAttributes();
420 ashish 7016
      }
7017
      throw new IllegalStateException();
7018
    }
7019
 
7020
    public boolean isSet(int fieldID) {
7021
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7022
    }
7023
 
7024
    @Override
7025
    public boolean equals(Object that) {
7026
      if (that == null)
7027
        return false;
695 rajveer 7028
      if (that instanceof updatePaymentDetails_args)
7029
        return this.equals((updatePaymentDetails_args)that);
420 ashish 7030
      return false;
7031
    }
7032
 
695 rajveer 7033
    public boolean equals(updatePaymentDetails_args that) {
420 ashish 7034
      if (that == null)
7035
        return false;
7036
 
7037
      boolean this_present_id = true;
7038
      boolean that_present_id = true;
7039
      if (this_present_id || that_present_id) {
7040
        if (!(this_present_id && that_present_id))
7041
          return false;
7042
        if (this.id != that.id)
7043
          return false;
7044
      }
7045
 
695 rajveer 7046
      boolean this_present_gatewayPaymentId = true && this.isSetGatewayPaymentId();
7047
      boolean that_present_gatewayPaymentId = true && that.isSetGatewayPaymentId();
7048
      if (this_present_gatewayPaymentId || that_present_gatewayPaymentId) {
7049
        if (!(this_present_gatewayPaymentId && that_present_gatewayPaymentId))
420 ashish 7050
          return false;
695 rajveer 7051
        if (!this.gatewayPaymentId.equals(that.gatewayPaymentId))
420 ashish 7052
          return false;
7053
      }
7054
 
695 rajveer 7055
      boolean this_present_sessionId = true && this.isSetSessionId();
7056
      boolean that_present_sessionId = true && that.isSetSessionId();
7057
      if (this_present_sessionId || that_present_sessionId) {
7058
        if (!(this_present_sessionId && that_present_sessionId))
420 ashish 7059
          return false;
695 rajveer 7060
        if (!this.sessionId.equals(that.sessionId))
420 ashish 7061
          return false;
7062
      }
7063
 
695 rajveer 7064
      boolean this_present_gatewayTxnStatus = true && this.isSetGatewayTxnStatus();
7065
      boolean that_present_gatewayTxnStatus = true && that.isSetGatewayTxnStatus();
7066
      if (this_present_gatewayTxnStatus || that_present_gatewayTxnStatus) {
7067
        if (!(this_present_gatewayTxnStatus && that_present_gatewayTxnStatus))
420 ashish 7068
          return false;
695 rajveer 7069
        if (!this.gatewayTxnStatus.equals(that.gatewayTxnStatus))
420 ashish 7070
          return false;
7071
      }
7072
 
695 rajveer 7073
      boolean this_present_description = true && this.isSetDescription();
7074
      boolean that_present_description = true && that.isSetDescription();
7075
      if (this_present_description || that_present_description) {
7076
        if (!(this_present_description && that_present_description))
420 ashish 7077
          return false;
695 rajveer 7078
        if (!this.description.equals(that.description))
420 ashish 7079
          return false;
7080
      }
7081
 
695 rajveer 7082
      boolean this_present_gatewayTxnId = true && this.isSetGatewayTxnId();
7083
      boolean that_present_gatewayTxnId = true && that.isSetGatewayTxnId();
7084
      if (this_present_gatewayTxnId || that_present_gatewayTxnId) {
7085
        if (!(this_present_gatewayTxnId && that_present_gatewayTxnId))
420 ashish 7086
          return false;
695 rajveer 7087
        if (!this.gatewayTxnId.equals(that.gatewayTxnId))
420 ashish 7088
          return false;
7089
      }
7090
 
695 rajveer 7091
      boolean this_present_authCode = true && this.isSetAuthCode();
7092
      boolean that_present_authCode = true && that.isSetAuthCode();
7093
      if (this_present_authCode || that_present_authCode) {
7094
        if (!(this_present_authCode && that_present_authCode))
420 ashish 7095
          return false;
695 rajveer 7096
        if (!this.authCode.equals(that.authCode))
420 ashish 7097
          return false;
7098
      }
7099
 
695 rajveer 7100
      boolean this_present_referenceCode = true && this.isSetReferenceCode();
7101
      boolean that_present_referenceCode = true && that.isSetReferenceCode();
7102
      if (this_present_referenceCode || that_present_referenceCode) {
7103
        if (!(this_present_referenceCode && that_present_referenceCode))
420 ashish 7104
          return false;
695 rajveer 7105
        if (!this.referenceCode.equals(that.referenceCode))
420 ashish 7106
          return false;
7107
      }
7108
 
695 rajveer 7109
      boolean this_present_errorCode = true && this.isSetErrorCode();
7110
      boolean that_present_errorCode = true && that.isSetErrorCode();
7111
      if (this_present_errorCode || that_present_errorCode) {
7112
        if (!(this_present_errorCode && that_present_errorCode))
7113
          return false;
7114
        if (!this.errorCode.equals(that.errorCode))
7115
          return false;
7116
      }
7117
 
7118
      boolean this_present_status = true && this.isSetStatus();
7119
      boolean that_present_status = true && that.isSetStatus();
7120
      if (this_present_status || that_present_status) {
7121
        if (!(this_present_status && that_present_status))
7122
          return false;
7123
        if (!this.status.equals(that.status))
7124
          return false;
7125
      }
7126
 
1119 rajveer 7127
      boolean this_present_gatewayTxnDate = true && this.isSetGatewayTxnDate();
7128
      boolean that_present_gatewayTxnDate = true && that.isSetGatewayTxnDate();
7129
      if (this_present_gatewayTxnDate || that_present_gatewayTxnDate) {
7130
        if (!(this_present_gatewayTxnDate && that_present_gatewayTxnDate))
7131
          return false;
7132
        if (!this.gatewayTxnDate.equals(that.gatewayTxnDate))
7133
          return false;
7134
      }
7135
 
695 rajveer 7136
      boolean this_present_attributes = true && this.isSetAttributes();
7137
      boolean that_present_attributes = true && that.isSetAttributes();
7138
      if (this_present_attributes || that_present_attributes) {
7139
        if (!(this_present_attributes && that_present_attributes))
7140
          return false;
7141
        if (!this.attributes.equals(that.attributes))
7142
          return false;
7143
      }
7144
 
420 ashish 7145
      return true;
7146
    }
7147
 
7148
    @Override
7149
    public int hashCode() {
7150
      return 0;
7151
    }
7152
 
695 rajveer 7153
    public int compareTo(updatePaymentDetails_args other) {
420 ashish 7154
      if (!getClass().equals(other.getClass())) {
7155
        return getClass().getName().compareTo(other.getClass().getName());
7156
      }
7157
 
7158
      int lastComparison = 0;
695 rajveer 7159
      updatePaymentDetails_args typedOther = (updatePaymentDetails_args)other;
420 ashish 7160
 
7161
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
7162
      if (lastComparison != 0) {
7163
        return lastComparison;
7164
      }
7165
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
7166
      if (lastComparison != 0) {
7167
        return lastComparison;
7168
      }
695 rajveer 7169
      lastComparison = Boolean.valueOf(isSetGatewayPaymentId()).compareTo(isSetGatewayPaymentId());
420 ashish 7170
      if (lastComparison != 0) {
7171
        return lastComparison;
7172
      }
695 rajveer 7173
      lastComparison = TBaseHelper.compareTo(gatewayPaymentId, typedOther.gatewayPaymentId);
420 ashish 7174
      if (lastComparison != 0) {
7175
        return lastComparison;
7176
      }
695 rajveer 7177
      lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(isSetSessionId());
420 ashish 7178
      if (lastComparison != 0) {
7179
        return lastComparison;
7180
      }
695 rajveer 7181
      lastComparison = TBaseHelper.compareTo(sessionId, typedOther.sessionId);
420 ashish 7182
      if (lastComparison != 0) {
7183
        return lastComparison;
7184
      }
695 rajveer 7185
      lastComparison = Boolean.valueOf(isSetGatewayTxnStatus()).compareTo(isSetGatewayTxnStatus());
420 ashish 7186
      if (lastComparison != 0) {
7187
        return lastComparison;
7188
      }
695 rajveer 7189
      lastComparison = TBaseHelper.compareTo(gatewayTxnStatus, typedOther.gatewayTxnStatus);
420 ashish 7190
      if (lastComparison != 0) {
7191
        return lastComparison;
7192
      }
695 rajveer 7193
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
420 ashish 7194
      if (lastComparison != 0) {
7195
        return lastComparison;
7196
      }
695 rajveer 7197
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
420 ashish 7198
      if (lastComparison != 0) {
7199
        return lastComparison;
7200
      }
695 rajveer 7201
      lastComparison = Boolean.valueOf(isSetGatewayTxnId()).compareTo(isSetGatewayTxnId());
420 ashish 7202
      if (lastComparison != 0) {
7203
        return lastComparison;
7204
      }
695 rajveer 7205
      lastComparison = TBaseHelper.compareTo(gatewayTxnId, typedOther.gatewayTxnId);
420 ashish 7206
      if (lastComparison != 0) {
7207
        return lastComparison;
7208
      }
695 rajveer 7209
      lastComparison = Boolean.valueOf(isSetAuthCode()).compareTo(isSetAuthCode());
420 ashish 7210
      if (lastComparison != 0) {
7211
        return lastComparison;
7212
      }
695 rajveer 7213
      lastComparison = TBaseHelper.compareTo(authCode, typedOther.authCode);
420 ashish 7214
      if (lastComparison != 0) {
7215
        return lastComparison;
7216
      }
695 rajveer 7217
      lastComparison = Boolean.valueOf(isSetReferenceCode()).compareTo(isSetReferenceCode());
420 ashish 7218
      if (lastComparison != 0) {
7219
        return lastComparison;
7220
      }
695 rajveer 7221
      lastComparison = TBaseHelper.compareTo(referenceCode, typedOther.referenceCode);
420 ashish 7222
      if (lastComparison != 0) {
7223
        return lastComparison;
7224
      }
695 rajveer 7225
      lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(isSetErrorCode());
7226
      if (lastComparison != 0) {
7227
        return lastComparison;
7228
      }
7229
      lastComparison = TBaseHelper.compareTo(errorCode, typedOther.errorCode);
7230
      if (lastComparison != 0) {
7231
        return lastComparison;
7232
      }
7233
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
7234
      if (lastComparison != 0) {
7235
        return lastComparison;
7236
      }
7237
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
7238
      if (lastComparison != 0) {
7239
        return lastComparison;
7240
      }
1119 rajveer 7241
      lastComparison = Boolean.valueOf(isSetGatewayTxnDate()).compareTo(isSetGatewayTxnDate());
7242
      if (lastComparison != 0) {
7243
        return lastComparison;
7244
      }
7245
      lastComparison = TBaseHelper.compareTo(gatewayTxnDate, typedOther.gatewayTxnDate);
7246
      if (lastComparison != 0) {
7247
        return lastComparison;
7248
      }
695 rajveer 7249
      lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(isSetAttributes());
7250
      if (lastComparison != 0) {
7251
        return lastComparison;
7252
      }
7253
      lastComparison = TBaseHelper.compareTo(attributes, typedOther.attributes);
7254
      if (lastComparison != 0) {
7255
        return lastComparison;
7256
      }
420 ashish 7257
      return 0;
7258
    }
7259
 
7260
    public void read(TProtocol iprot) throws TException {
7261
      TField field;
7262
      iprot.readStructBegin();
7263
      while (true)
7264
      {
7265
        field = iprot.readFieldBegin();
7266
        if (field.type == TType.STOP) { 
7267
          break;
7268
        }
7269
        _Fields fieldId = _Fields.findByThriftId(field.id);
7270
        if (fieldId == null) {
7271
          TProtocolUtil.skip(iprot, field.type);
7272
        } else {
7273
          switch (fieldId) {
7274
            case ID:
7275
              if (field.type == TType.I64) {
7276
                this.id = iprot.readI64();
7277
                setIdIsSet(true);
7278
              } else { 
7279
                TProtocolUtil.skip(iprot, field.type);
7280
              }
7281
              break;
695 rajveer 7282
            case GATEWAY_PAYMENT_ID:
420 ashish 7283
              if (field.type == TType.STRING) {
695 rajveer 7284
                this.gatewayPaymentId = iprot.readString();
420 ashish 7285
              } else { 
7286
                TProtocolUtil.skip(iprot, field.type);
7287
              }
7288
              break;
695 rajveer 7289
            case SESSION_ID:
420 ashish 7290
              if (field.type == TType.STRING) {
695 rajveer 7291
                this.sessionId = iprot.readString();
420 ashish 7292
              } else { 
7293
                TProtocolUtil.skip(iprot, field.type);
7294
              }
7295
              break;
695 rajveer 7296
            case GATEWAY_TXN_STATUS:
420 ashish 7297
              if (field.type == TType.STRING) {
695 rajveer 7298
                this.gatewayTxnStatus = iprot.readString();
420 ashish 7299
              } else { 
7300
                TProtocolUtil.skip(iprot, field.type);
7301
              }
7302
              break;
695 rajveer 7303
            case DESCRIPTION:
420 ashish 7304
              if (field.type == TType.STRING) {
695 rajveer 7305
                this.description = iprot.readString();
420 ashish 7306
              } else { 
7307
                TProtocolUtil.skip(iprot, field.type);
7308
              }
7309
              break;
695 rajveer 7310
            case GATEWAY_TXN_ID:
420 ashish 7311
              if (field.type == TType.STRING) {
695 rajveer 7312
                this.gatewayTxnId = iprot.readString();
420 ashish 7313
              } else { 
7314
                TProtocolUtil.skip(iprot, field.type);
7315
              }
7316
              break;
7317
            case AUTH_CODE:
7318
              if (field.type == TType.STRING) {
695 rajveer 7319
                this.authCode = iprot.readString();
420 ashish 7320
              } else { 
7321
                TProtocolUtil.skip(iprot, field.type);
7322
              }
7323
              break;
695 rajveer 7324
            case REFERENCE_CODE:
420 ashish 7325
              if (field.type == TType.STRING) {
695 rajveer 7326
                this.referenceCode = iprot.readString();
420 ashish 7327
              } else { 
7328
                TProtocolUtil.skip(iprot, field.type);
7329
              }
7330
              break;
695 rajveer 7331
            case ERROR_CODE:
7332
              if (field.type == TType.STRING) {
7333
                this.errorCode = iprot.readString();
7334
              } else { 
7335
                TProtocolUtil.skip(iprot, field.type);
7336
              }
7337
              break;
7338
            case STATUS:
7339
              if (field.type == TType.I32) {
7340
                this.status = PaymentStatus.findByValue(iprot.readI32());
7341
              } else { 
7342
                TProtocolUtil.skip(iprot, field.type);
7343
              }
7344
              break;
1119 rajveer 7345
            case GATEWAY_TXN_DATE:
7346
              if (field.type == TType.STRING) {
7347
                this.gatewayTxnDate = iprot.readString();
7348
              } else { 
7349
                TProtocolUtil.skip(iprot, field.type);
7350
              }
7351
              break;
695 rajveer 7352
            case ATTRIBUTES:
7353
              if (field.type == TType.LIST) {
7354
                {
2747 chandransh 7355
                  TList _list24 = iprot.readListBegin();
7356
                  this.attributes = new ArrayList<Attribute>(_list24.size);
7357
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
695 rajveer 7358
                  {
2747 chandransh 7359
                    Attribute _elem26;
7360
                    _elem26 = new Attribute();
7361
                    _elem26.read(iprot);
7362
                    this.attributes.add(_elem26);
695 rajveer 7363
                  }
7364
                  iprot.readListEnd();
7365
                }
7366
              } else { 
7367
                TProtocolUtil.skip(iprot, field.type);
7368
              }
7369
              break;
420 ashish 7370
          }
7371
          iprot.readFieldEnd();
7372
        }
7373
      }
7374
      iprot.readStructEnd();
7375
      validate();
7376
    }
7377
 
7378
    public void write(TProtocol oprot) throws TException {
7379
      validate();
7380
 
7381
      oprot.writeStructBegin(STRUCT_DESC);
7382
      oprot.writeFieldBegin(ID_FIELD_DESC);
7383
      oprot.writeI64(this.id);
7384
      oprot.writeFieldEnd();
695 rajveer 7385
      if (this.gatewayPaymentId != null) {
7386
        oprot.writeFieldBegin(GATEWAY_PAYMENT_ID_FIELD_DESC);
7387
        oprot.writeString(this.gatewayPaymentId);
420 ashish 7388
        oprot.writeFieldEnd();
7389
      }
695 rajveer 7390
      if (this.sessionId != null) {
7391
        oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
7392
        oprot.writeString(this.sessionId);
420 ashish 7393
        oprot.writeFieldEnd();
7394
      }
695 rajveer 7395
      if (this.gatewayTxnStatus != null) {
7396
        oprot.writeFieldBegin(GATEWAY_TXN_STATUS_FIELD_DESC);
7397
        oprot.writeString(this.gatewayTxnStatus);
420 ashish 7398
        oprot.writeFieldEnd();
7399
      }
695 rajveer 7400
      if (this.description != null) {
7401
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
7402
        oprot.writeString(this.description);
420 ashish 7403
        oprot.writeFieldEnd();
7404
      }
695 rajveer 7405
      if (this.gatewayTxnId != null) {
7406
        oprot.writeFieldBegin(GATEWAY_TXN_ID_FIELD_DESC);
7407
        oprot.writeString(this.gatewayTxnId);
420 ashish 7408
        oprot.writeFieldEnd();
7409
      }
695 rajveer 7410
      if (this.authCode != null) {
420 ashish 7411
        oprot.writeFieldBegin(AUTH_CODE_FIELD_DESC);
695 rajveer 7412
        oprot.writeString(this.authCode);
420 ashish 7413
        oprot.writeFieldEnd();
7414
      }
695 rajveer 7415
      if (this.referenceCode != null) {
7416
        oprot.writeFieldBegin(REFERENCE_CODE_FIELD_DESC);
7417
        oprot.writeString(this.referenceCode);
420 ashish 7418
        oprot.writeFieldEnd();
7419
      }
695 rajveer 7420
      if (this.errorCode != null) {
7421
        oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);
7422
        oprot.writeString(this.errorCode);
7423
        oprot.writeFieldEnd();
7424
      }
7425
      if (this.status != null) {
7426
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
7427
        oprot.writeI32(this.status.getValue());
7428
        oprot.writeFieldEnd();
7429
      }
1119 rajveer 7430
      if (this.gatewayTxnDate != null) {
7431
        oprot.writeFieldBegin(GATEWAY_TXN_DATE_FIELD_DESC);
7432
        oprot.writeString(this.gatewayTxnDate);
7433
        oprot.writeFieldEnd();
7434
      }
695 rajveer 7435
      if (this.attributes != null) {
7436
        oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
7437
        {
7438
          oprot.writeListBegin(new TList(TType.STRUCT, this.attributes.size()));
2747 chandransh 7439
          for (Attribute _iter27 : this.attributes)
695 rajveer 7440
          {
2747 chandransh 7441
            _iter27.write(oprot);
695 rajveer 7442
          }
7443
          oprot.writeListEnd();
7444
        }
7445
        oprot.writeFieldEnd();
7446
      }
420 ashish 7447
      oprot.writeFieldStop();
7448
      oprot.writeStructEnd();
7449
    }
7450
 
7451
    @Override
7452
    public String toString() {
695 rajveer 7453
      StringBuilder sb = new StringBuilder("updatePaymentDetails_args(");
420 ashish 7454
      boolean first = true;
7455
 
7456
      sb.append("id:");
7457
      sb.append(this.id);
7458
      first = false;
7459
      if (!first) sb.append(", ");
695 rajveer 7460
      sb.append("gatewayPaymentId:");
7461
      if (this.gatewayPaymentId == null) {
420 ashish 7462
        sb.append("null");
7463
      } else {
695 rajveer 7464
        sb.append(this.gatewayPaymentId);
420 ashish 7465
      }
7466
      first = false;
7467
      if (!first) sb.append(", ");
695 rajveer 7468
      sb.append("sessionId:");
7469
      if (this.sessionId == null) {
420 ashish 7470
        sb.append("null");
7471
      } else {
695 rajveer 7472
        sb.append(this.sessionId);
420 ashish 7473
      }
7474
      first = false;
7475
      if (!first) sb.append(", ");
695 rajveer 7476
      sb.append("gatewayTxnStatus:");
7477
      if (this.gatewayTxnStatus == null) {
420 ashish 7478
        sb.append("null");
7479
      } else {
695 rajveer 7480
        sb.append(this.gatewayTxnStatus);
420 ashish 7481
      }
7482
      first = false;
7483
      if (!first) sb.append(", ");
695 rajveer 7484
      sb.append("description:");
7485
      if (this.description == null) {
420 ashish 7486
        sb.append("null");
7487
      } else {
695 rajveer 7488
        sb.append(this.description);
420 ashish 7489
      }
7490
      first = false;
7491
      if (!first) sb.append(", ");
695 rajveer 7492
      sb.append("gatewayTxnId:");
7493
      if (this.gatewayTxnId == null) {
420 ashish 7494
        sb.append("null");
7495
      } else {
695 rajveer 7496
        sb.append(this.gatewayTxnId);
420 ashish 7497
      }
7498
      first = false;
7499
      if (!first) sb.append(", ");
695 rajveer 7500
      sb.append("authCode:");
7501
      if (this.authCode == null) {
420 ashish 7502
        sb.append("null");
7503
      } else {
695 rajveer 7504
        sb.append(this.authCode);
420 ashish 7505
      }
7506
      first = false;
7507
      if (!first) sb.append(", ");
695 rajveer 7508
      sb.append("referenceCode:");
7509
      if (this.referenceCode == null) {
420 ashish 7510
        sb.append("null");
7511
      } else {
695 rajveer 7512
        sb.append(this.referenceCode);
420 ashish 7513
      }
7514
      first = false;
695 rajveer 7515
      if (!first) sb.append(", ");
7516
      sb.append("errorCode:");
7517
      if (this.errorCode == null) {
7518
        sb.append("null");
7519
      } else {
7520
        sb.append(this.errorCode);
7521
      }
7522
      first = false;
7523
      if (!first) sb.append(", ");
7524
      sb.append("status:");
7525
      if (this.status == null) {
7526
        sb.append("null");
7527
      } else {
7528
        String status_name = status.name();
7529
        if (status_name != null) {
7530
          sb.append(status_name);
7531
          sb.append(" (");
7532
        }
7533
        sb.append(this.status);
7534
        if (status_name != null) {
7535
          sb.append(")");
7536
        }
7537
      }
7538
      first = false;
7539
      if (!first) sb.append(", ");
1119 rajveer 7540
      sb.append("gatewayTxnDate:");
7541
      if (this.gatewayTxnDate == null) {
7542
        sb.append("null");
7543
      } else {
7544
        sb.append(this.gatewayTxnDate);
7545
      }
7546
      first = false;
7547
      if (!first) sb.append(", ");
695 rajveer 7548
      sb.append("attributes:");
7549
      if (this.attributes == null) {
7550
        sb.append("null");
7551
      } else {
7552
        sb.append(this.attributes);
7553
      }
7554
      first = false;
420 ashish 7555
      sb.append(")");
7556
      return sb.toString();
7557
    }
7558
 
7559
    public void validate() throws TException {
7560
      // check for required fields
7561
    }
7562
 
7563
  }
7564
 
695 rajveer 7565
  public static class updatePaymentDetails_result implements TBase<updatePaymentDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePaymentDetails_result>   {
7566
    private static final TStruct STRUCT_DESC = new TStruct("updatePaymentDetails_result");
420 ashish 7567
 
695 rajveer 7568
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
420 ashish 7569
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
7570
 
695 rajveer 7571
    private boolean success;
420 ashish 7572
    private PaymentException pe;
7573
 
7574
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7575
    public enum _Fields implements TFieldIdEnum {
695 rajveer 7576
      SUCCESS((short)0, "success"),
420 ashish 7577
      PE((short)1, "pe");
7578
 
7579
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7580
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7581
 
7582
      static {
7583
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7584
          byId.put((int)field._thriftId, field);
7585
          byName.put(field.getFieldName(), field);
7586
        }
7587
      }
7588
 
7589
      /**
7590
       * Find the _Fields constant that matches fieldId, or null if its not found.
7591
       */
7592
      public static _Fields findByThriftId(int fieldId) {
7593
        return byId.get(fieldId);
7594
      }
7595
 
7596
      /**
7597
       * Find the _Fields constant that matches fieldId, throwing an exception
7598
       * if it is not found.
7599
       */
7600
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7601
        _Fields fields = findByThriftId(fieldId);
7602
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7603
        return fields;
7604
      }
7605
 
7606
      /**
7607
       * Find the _Fields constant that matches name, or null if its not found.
7608
       */
7609
      public static _Fields findByName(String name) {
7610
        return byName.get(name);
7611
      }
7612
 
7613
      private final short _thriftId;
7614
      private final String _fieldName;
7615
 
7616
      _Fields(short thriftId, String fieldName) {
7617
        _thriftId = thriftId;
7618
        _fieldName = fieldName;
7619
      }
7620
 
7621
      public short getThriftFieldId() {
7622
        return _thriftId;
7623
      }
7624
 
7625
      public String getFieldName() {
7626
        return _fieldName;
7627
      }
7628
    }
7629
 
7630
    // isset id assignments
695 rajveer 7631
    private static final int __SUCCESS_ISSET_ID = 0;
7632
    private BitSet __isset_bit_vector = new BitSet(1);
420 ashish 7633
 
7634
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
695 rajveer 7635
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7636
          new FieldValueMetaData(TType.BOOL)));
420 ashish 7637
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
7638
          new FieldValueMetaData(TType.STRUCT)));
7639
    }});
7640
 
7641
    static {
695 rajveer 7642
      FieldMetaData.addStructMetaDataMap(updatePaymentDetails_result.class, metaDataMap);
420 ashish 7643
    }
7644
 
695 rajveer 7645
    public updatePaymentDetails_result() {
420 ashish 7646
    }
7647
 
695 rajveer 7648
    public updatePaymentDetails_result(
7649
      boolean success,
420 ashish 7650
      PaymentException pe)
7651
    {
7652
      this();
695 rajveer 7653
      this.success = success;
7654
      setSuccessIsSet(true);
420 ashish 7655
      this.pe = pe;
7656
    }
7657
 
7658
    /**
7659
     * Performs a deep copy on <i>other</i>.
7660
     */
695 rajveer 7661
    public updatePaymentDetails_result(updatePaymentDetails_result other) {
7662
      __isset_bit_vector.clear();
7663
      __isset_bit_vector.or(other.__isset_bit_vector);
7664
      this.success = other.success;
420 ashish 7665
      if (other.isSetPe()) {
7666
        this.pe = new PaymentException(other.pe);
7667
      }
7668
    }
7669
 
695 rajveer 7670
    public updatePaymentDetails_result deepCopy() {
7671
      return new updatePaymentDetails_result(this);
420 ashish 7672
    }
7673
 
7674
    @Deprecated
695 rajveer 7675
    public updatePaymentDetails_result clone() {
7676
      return new updatePaymentDetails_result(this);
420 ashish 7677
    }
7678
 
695 rajveer 7679
    public boolean isSuccess() {
7680
      return this.success;
7681
    }
7682
 
7683
    public updatePaymentDetails_result setSuccess(boolean success) {
7684
      this.success = success;
7685
      setSuccessIsSet(true);
7686
      return this;
7687
    }
7688
 
7689
    public void unsetSuccess() {
7690
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7691
    }
7692
 
7693
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7694
    public boolean isSetSuccess() {
7695
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7696
    }
7697
 
7698
    public void setSuccessIsSet(boolean value) {
7699
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7700
    }
7701
 
420 ashish 7702
    public PaymentException getPe() {
7703
      return this.pe;
7704
    }
7705
 
695 rajveer 7706
    public updatePaymentDetails_result setPe(PaymentException pe) {
420 ashish 7707
      this.pe = pe;
7708
      return this;
7709
    }
7710
 
7711
    public void unsetPe() {
7712
      this.pe = null;
7713
    }
7714
 
7715
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
7716
    public boolean isSetPe() {
7717
      return this.pe != null;
7718
    }
7719
 
7720
    public void setPeIsSet(boolean value) {
7721
      if (!value) {
7722
        this.pe = null;
7723
      }
7724
    }
7725
 
7726
    public void setFieldValue(_Fields field, Object value) {
7727
      switch (field) {
695 rajveer 7728
      case SUCCESS:
7729
        if (value == null) {
7730
          unsetSuccess();
7731
        } else {
7732
          setSuccess((Boolean)value);
7733
        }
7734
        break;
7735
 
420 ashish 7736
      case PE:
7737
        if (value == null) {
7738
          unsetPe();
7739
        } else {
7740
          setPe((PaymentException)value);
7741
        }
7742
        break;
7743
 
7744
      }
7745
    }
7746
 
7747
    public void setFieldValue(int fieldID, Object value) {
7748
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7749
    }
7750
 
7751
    public Object getFieldValue(_Fields field) {
7752
      switch (field) {
695 rajveer 7753
      case SUCCESS:
7754
        return new Boolean(isSuccess());
7755
 
420 ashish 7756
      case PE:
7757
        return getPe();
7758
 
7759
      }
7760
      throw new IllegalStateException();
7761
    }
7762
 
7763
    public Object getFieldValue(int fieldId) {
7764
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7765
    }
7766
 
7767
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7768
    public boolean isSet(_Fields field) {
7769
      switch (field) {
695 rajveer 7770
      case SUCCESS:
7771
        return isSetSuccess();
420 ashish 7772
      case PE:
7773
        return isSetPe();
7774
      }
7775
      throw new IllegalStateException();
7776
    }
7777
 
7778
    public boolean isSet(int fieldID) {
7779
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7780
    }
7781
 
7782
    @Override
7783
    public boolean equals(Object that) {
7784
      if (that == null)
7785
        return false;
695 rajveer 7786
      if (that instanceof updatePaymentDetails_result)
7787
        return this.equals((updatePaymentDetails_result)that);
420 ashish 7788
      return false;
7789
    }
7790
 
695 rajveer 7791
    public boolean equals(updatePaymentDetails_result that) {
420 ashish 7792
      if (that == null)
7793
        return false;
7794
 
695 rajveer 7795
      boolean this_present_success = true;
7796
      boolean that_present_success = true;
7797
      if (this_present_success || that_present_success) {
7798
        if (!(this_present_success && that_present_success))
7799
          return false;
7800
        if (this.success != that.success)
7801
          return false;
7802
      }
7803
 
420 ashish 7804
      boolean this_present_pe = true && this.isSetPe();
7805
      boolean that_present_pe = true && that.isSetPe();
7806
      if (this_present_pe || that_present_pe) {
7807
        if (!(this_present_pe && that_present_pe))
7808
          return false;
7809
        if (!this.pe.equals(that.pe))
7810
          return false;
7811
      }
7812
 
7813
      return true;
7814
    }
7815
 
7816
    @Override
7817
    public int hashCode() {
7818
      return 0;
7819
    }
7820
 
695 rajveer 7821
    public int compareTo(updatePaymentDetails_result other) {
420 ashish 7822
      if (!getClass().equals(other.getClass())) {
7823
        return getClass().getName().compareTo(other.getClass().getName());
7824
      }
7825
 
7826
      int lastComparison = 0;
695 rajveer 7827
      updatePaymentDetails_result typedOther = (updatePaymentDetails_result)other;
420 ashish 7828
 
695 rajveer 7829
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7830
      if (lastComparison != 0) {
7831
        return lastComparison;
7832
      }
7833
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7834
      if (lastComparison != 0) {
7835
        return lastComparison;
7836
      }
420 ashish 7837
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());
7838
      if (lastComparison != 0) {
7839
        return lastComparison;
7840
      }
7841
      lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);
7842
      if (lastComparison != 0) {
7843
        return lastComparison;
7844
      }
7845
      return 0;
7846
    }
7847
 
7848
    public void read(TProtocol iprot) throws TException {
7849
      TField field;
7850
      iprot.readStructBegin();
7851
      while (true)
7852
      {
7853
        field = iprot.readFieldBegin();
7854
        if (field.type == TType.STOP) { 
7855
          break;
7856
        }
7857
        _Fields fieldId = _Fields.findByThriftId(field.id);
7858
        if (fieldId == null) {
7859
          TProtocolUtil.skip(iprot, field.type);
7860
        } else {
7861
          switch (fieldId) {
695 rajveer 7862
            case SUCCESS:
7863
              if (field.type == TType.BOOL) {
7864
                this.success = iprot.readBool();
7865
                setSuccessIsSet(true);
7866
              } else { 
7867
                TProtocolUtil.skip(iprot, field.type);
7868
              }
7869
              break;
420 ashish 7870
            case PE:
7871
              if (field.type == TType.STRUCT) {
7872
                this.pe = new PaymentException();
7873
                this.pe.read(iprot);
7874
              } else { 
7875
                TProtocolUtil.skip(iprot, field.type);
7876
              }
7877
              break;
7878
          }
7879
          iprot.readFieldEnd();
7880
        }
7881
      }
7882
      iprot.readStructEnd();
7883
      validate();
7884
    }
7885
 
7886
    public void write(TProtocol oprot) throws TException {
7887
      oprot.writeStructBegin(STRUCT_DESC);
7888
 
695 rajveer 7889
      if (this.isSetSuccess()) {
7890
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7891
        oprot.writeBool(this.success);
7892
        oprot.writeFieldEnd();
7893
      } else if (this.isSetPe()) {
420 ashish 7894
        oprot.writeFieldBegin(PE_FIELD_DESC);
7895
        this.pe.write(oprot);
7896
        oprot.writeFieldEnd();
7897
      }
7898
      oprot.writeFieldStop();
7899
      oprot.writeStructEnd();
7900
    }
7901
 
7902
    @Override
7903
    public String toString() {
695 rajveer 7904
      StringBuilder sb = new StringBuilder("updatePaymentDetails_result(");
420 ashish 7905
      boolean first = true;
7906
 
695 rajveer 7907
      sb.append("success:");
7908
      sb.append(this.success);
7909
      first = false;
7910
      if (!first) sb.append(", ");
420 ashish 7911
      sb.append("pe:");
7912
      if (this.pe == null) {
7913
        sb.append("null");
7914
      } else {
7915
        sb.append(this.pe);
7916
      }
7917
      first = false;
7918
      sb.append(")");
7919
      return sb.toString();
7920
    }
7921
 
7922
    public void validate() throws TException {
7923
      // check for required fields
7924
    }
7925
 
7926
  }
7927
 
1731 ankur.sing 7928
  public static class getSuccessfulPaymentsAmountRange_args implements TBase<getSuccessfulPaymentsAmountRange_args._Fields>, java.io.Serializable, Cloneable, Comparable<getSuccessfulPaymentsAmountRange_args>   {
7929
    private static final TStruct STRUCT_DESC = new TStruct("getSuccessfulPaymentsAmountRange_args");
1629 ankur.sing 7930
 
7931
 
7932
 
7933
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7934
    public enum _Fields implements TFieldIdEnum {
7935
;
7936
 
7937
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7938
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7939
 
7940
      static {
7941
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7942
          byId.put((int)field._thriftId, field);
7943
          byName.put(field.getFieldName(), field);
7944
        }
7945
      }
7946
 
7947
      /**
7948
       * Find the _Fields constant that matches fieldId, or null if its not found.
7949
       */
7950
      public static _Fields findByThriftId(int fieldId) {
7951
        return byId.get(fieldId);
7952
      }
7953
 
7954
      /**
7955
       * Find the _Fields constant that matches fieldId, throwing an exception
7956
       * if it is not found.
7957
       */
7958
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7959
        _Fields fields = findByThriftId(fieldId);
7960
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7961
        return fields;
7962
      }
7963
 
7964
      /**
7965
       * Find the _Fields constant that matches name, or null if its not found.
7966
       */
7967
      public static _Fields findByName(String name) {
7968
        return byName.get(name);
7969
      }
7970
 
7971
      private final short _thriftId;
7972
      private final String _fieldName;
7973
 
7974
      _Fields(short thriftId, String fieldName) {
7975
        _thriftId = thriftId;
7976
        _fieldName = fieldName;
7977
      }
7978
 
7979
      public short getThriftFieldId() {
7980
        return _thriftId;
7981
      }
7982
 
7983
      public String getFieldName() {
7984
        return _fieldName;
7985
      }
7986
    }
7987
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7988
    }});
7989
 
7990
    static {
1731 ankur.sing 7991
      FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentsAmountRange_args.class, metaDataMap);
1629 ankur.sing 7992
    }
7993
 
1731 ankur.sing 7994
    public getSuccessfulPaymentsAmountRange_args() {
1629 ankur.sing 7995
    }
7996
 
7997
    /**
7998
     * Performs a deep copy on <i>other</i>.
7999
     */
1731 ankur.sing 8000
    public getSuccessfulPaymentsAmountRange_args(getSuccessfulPaymentsAmountRange_args other) {
1629 ankur.sing 8001
    }
8002
 
1731 ankur.sing 8003
    public getSuccessfulPaymentsAmountRange_args deepCopy() {
8004
      return new getSuccessfulPaymentsAmountRange_args(this);
1629 ankur.sing 8005
    }
8006
 
8007
    @Deprecated
1731 ankur.sing 8008
    public getSuccessfulPaymentsAmountRange_args clone() {
8009
      return new getSuccessfulPaymentsAmountRange_args(this);
1629 ankur.sing 8010
    }
8011
 
8012
    public void setFieldValue(_Fields field, Object value) {
8013
      switch (field) {
8014
      }
8015
    }
8016
 
8017
    public void setFieldValue(int fieldID, Object value) {
8018
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8019
    }
8020
 
8021
    public Object getFieldValue(_Fields field) {
8022
      switch (field) {
8023
      }
8024
      throw new IllegalStateException();
8025
    }
8026
 
8027
    public Object getFieldValue(int fieldId) {
8028
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8029
    }
8030
 
8031
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8032
    public boolean isSet(_Fields field) {
8033
      switch (field) {
8034
      }
8035
      throw new IllegalStateException();
8036
    }
8037
 
8038
    public boolean isSet(int fieldID) {
8039
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8040
    }
8041
 
8042
    @Override
8043
    public boolean equals(Object that) {
8044
      if (that == null)
8045
        return false;
1731 ankur.sing 8046
      if (that instanceof getSuccessfulPaymentsAmountRange_args)
8047
        return this.equals((getSuccessfulPaymentsAmountRange_args)that);
1629 ankur.sing 8048
      return false;
8049
    }
8050
 
1731 ankur.sing 8051
    public boolean equals(getSuccessfulPaymentsAmountRange_args that) {
1629 ankur.sing 8052
      if (that == null)
8053
        return false;
8054
 
8055
      return true;
8056
    }
8057
 
8058
    @Override
8059
    public int hashCode() {
8060
      return 0;
8061
    }
8062
 
1731 ankur.sing 8063
    public int compareTo(getSuccessfulPaymentsAmountRange_args other) {
1629 ankur.sing 8064
      if (!getClass().equals(other.getClass())) {
8065
        return getClass().getName().compareTo(other.getClass().getName());
8066
      }
8067
 
8068
      int lastComparison = 0;
1731 ankur.sing 8069
      getSuccessfulPaymentsAmountRange_args typedOther = (getSuccessfulPaymentsAmountRange_args)other;
1629 ankur.sing 8070
 
8071
      return 0;
8072
    }
8073
 
8074
    public void read(TProtocol iprot) throws TException {
8075
      TField field;
8076
      iprot.readStructBegin();
8077
      while (true)
8078
      {
8079
        field = iprot.readFieldBegin();
8080
        if (field.type == TType.STOP) { 
8081
          break;
8082
        }
8083
        _Fields fieldId = _Fields.findByThriftId(field.id);
8084
        if (fieldId == null) {
8085
          TProtocolUtil.skip(iprot, field.type);
8086
        } else {
8087
          switch (fieldId) {
8088
          }
8089
          iprot.readFieldEnd();
8090
        }
8091
      }
8092
      iprot.readStructEnd();
8093
      validate();
8094
    }
8095
 
8096
    public void write(TProtocol oprot) throws TException {
8097
      validate();
8098
 
8099
      oprot.writeStructBegin(STRUCT_DESC);
8100
      oprot.writeFieldStop();
8101
      oprot.writeStructEnd();
8102
    }
8103
 
8104
    @Override
8105
    public String toString() {
1731 ankur.sing 8106
      StringBuilder sb = new StringBuilder("getSuccessfulPaymentsAmountRange_args(");
1629 ankur.sing 8107
      boolean first = true;
8108
 
8109
      sb.append(")");
8110
      return sb.toString();
8111
    }
8112
 
8113
    public void validate() throws TException {
8114
      // check for required fields
8115
    }
8116
 
8117
  }
8118
 
1731 ankur.sing 8119
  public static class getSuccessfulPaymentsAmountRange_result implements TBase<getSuccessfulPaymentsAmountRange_result._Fields>, java.io.Serializable, Cloneable, Comparable<getSuccessfulPaymentsAmountRange_result>   {
8120
    private static final TStruct STRUCT_DESC = new TStruct("getSuccessfulPaymentsAmountRange_result");
1629 ankur.sing 8121
 
1731 ankur.sing 8122
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
1629 ankur.sing 8123
 
1731 ankur.sing 8124
    private List<Double> success;
1629 ankur.sing 8125
 
8126
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8127
    public enum _Fields implements TFieldIdEnum {
8128
      SUCCESS((short)0, "success");
8129
 
8130
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8131
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8132
 
8133
      static {
8134
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8135
          byId.put((int)field._thriftId, field);
8136
          byName.put(field.getFieldName(), field);
8137
        }
8138
      }
8139
 
8140
      /**
8141
       * Find the _Fields constant that matches fieldId, or null if its not found.
8142
       */
8143
      public static _Fields findByThriftId(int fieldId) {
8144
        return byId.get(fieldId);
8145
      }
8146
 
8147
      /**
8148
       * Find the _Fields constant that matches fieldId, throwing an exception
8149
       * if it is not found.
8150
       */
8151
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8152
        _Fields fields = findByThriftId(fieldId);
8153
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8154
        return fields;
8155
      }
8156
 
8157
      /**
8158
       * Find the _Fields constant that matches name, or null if its not found.
8159
       */
8160
      public static _Fields findByName(String name) {
8161
        return byName.get(name);
8162
      }
8163
 
8164
      private final short _thriftId;
8165
      private final String _fieldName;
8166
 
8167
      _Fields(short thriftId, String fieldName) {
8168
        _thriftId = thriftId;
8169
        _fieldName = fieldName;
8170
      }
8171
 
8172
      public short getThriftFieldId() {
8173
        return _thriftId;
8174
      }
8175
 
8176
      public String getFieldName() {
8177
        return _fieldName;
8178
      }
8179
    }
8180
 
8181
    // isset id assignments
8182
 
8183
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8184
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1731 ankur.sing 8185
          new ListMetaData(TType.LIST, 
8186
              new FieldValueMetaData(TType.DOUBLE))));
1629 ankur.sing 8187
    }});
8188
 
8189
    static {
1731 ankur.sing 8190
      FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentsAmountRange_result.class, metaDataMap);
1629 ankur.sing 8191
    }
8192
 
1731 ankur.sing 8193
    public getSuccessfulPaymentsAmountRange_result() {
1629 ankur.sing 8194
    }
8195
 
1731 ankur.sing 8196
    public getSuccessfulPaymentsAmountRange_result(
8197
      List<Double> success)
1629 ankur.sing 8198
    {
8199
      this();
8200
      this.success = success;
8201
    }
8202
 
8203
    /**
8204
     * Performs a deep copy on <i>other</i>.
8205
     */
1731 ankur.sing 8206
    public getSuccessfulPaymentsAmountRange_result(getSuccessfulPaymentsAmountRange_result other) {
8207
      if (other.isSetSuccess()) {
8208
        List<Double> __this__success = new ArrayList<Double>();
8209
        for (Double other_element : other.success) {
8210
          __this__success.add(other_element);
1629 ankur.sing 8211
        }
1731 ankur.sing 8212
        this.success = __this__success;
1629 ankur.sing 8213
      }
8214
    }
8215
 
1731 ankur.sing 8216
    public getSuccessfulPaymentsAmountRange_result deepCopy() {
8217
      return new getSuccessfulPaymentsAmountRange_result(this);
1629 ankur.sing 8218
    }
8219
 
8220
    @Deprecated
1731 ankur.sing 8221
    public getSuccessfulPaymentsAmountRange_result clone() {
8222
      return new getSuccessfulPaymentsAmountRange_result(this);
1629 ankur.sing 8223
    }
8224
 
1731 ankur.sing 8225
    public int getSuccessSize() {
8226
      return (this.success == null) ? 0 : this.success.size();
1629 ankur.sing 8227
    }
8228
 
1731 ankur.sing 8229
    public java.util.Iterator<Double> getSuccessIterator() {
8230
      return (this.success == null) ? null : this.success.iterator();
1629 ankur.sing 8231
    }
8232
 
1731 ankur.sing 8233
    public void addToSuccess(double elem) {
8234
      if (this.success == null) {
8235
        this.success = new ArrayList<Double>();
1629 ankur.sing 8236
      }
1731 ankur.sing 8237
      this.success.add(elem);
1629 ankur.sing 8238
    }
8239
 
1731 ankur.sing 8240
    public List<Double> getSuccess() {
1629 ankur.sing 8241
      return this.success;
8242
    }
8243
 
1731 ankur.sing 8244
    public getSuccessfulPaymentsAmountRange_result setSuccess(List<Double> success) {
1629 ankur.sing 8245
      this.success = success;
8246
      return this;
8247
    }
8248
 
8249
    public void unsetSuccess() {
1731 ankur.sing 8250
      this.success = null;
1629 ankur.sing 8251
    }
8252
 
8253
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8254
    public boolean isSetSuccess() {
1731 ankur.sing 8255
      return this.success != null;
1629 ankur.sing 8256
    }
8257
 
8258
    public void setSuccessIsSet(boolean value) {
1731 ankur.sing 8259
      if (!value) {
8260
        this.success = null;
8261
      }
1629 ankur.sing 8262
    }
8263
 
8264
    public void setFieldValue(_Fields field, Object value) {
8265
      switch (field) {
8266
      case SUCCESS:
8267
        if (value == null) {
8268
          unsetSuccess();
8269
        } else {
1731 ankur.sing 8270
          setSuccess((List<Double>)value);
1629 ankur.sing 8271
        }
8272
        break;
8273
 
8274
      }
8275
    }
8276
 
8277
    public void setFieldValue(int fieldID, Object value) {
8278
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8279
    }
8280
 
8281
    public Object getFieldValue(_Fields field) {
8282
      switch (field) {
8283
      case SUCCESS:
1731 ankur.sing 8284
        return getSuccess();
1629 ankur.sing 8285
 
8286
      }
8287
      throw new IllegalStateException();
8288
    }
8289
 
8290
    public Object getFieldValue(int fieldId) {
8291
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8292
    }
8293
 
8294
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8295
    public boolean isSet(_Fields field) {
8296
      switch (field) {
8297
      case SUCCESS:
8298
        return isSetSuccess();
8299
      }
8300
      throw new IllegalStateException();
8301
    }
8302
 
8303
    public boolean isSet(int fieldID) {
8304
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8305
    }
8306
 
8307
    @Override
8308
    public boolean equals(Object that) {
8309
      if (that == null)
8310
        return false;
1731 ankur.sing 8311
      if (that instanceof getSuccessfulPaymentsAmountRange_result)
8312
        return this.equals((getSuccessfulPaymentsAmountRange_result)that);
1629 ankur.sing 8313
      return false;
8314
    }
8315
 
1731 ankur.sing 8316
    public boolean equals(getSuccessfulPaymentsAmountRange_result that) {
1629 ankur.sing 8317
      if (that == null)
8318
        return false;
8319
 
1731 ankur.sing 8320
      boolean this_present_success = true && this.isSetSuccess();
8321
      boolean that_present_success = true && that.isSetSuccess();
1629 ankur.sing 8322
      if (this_present_success || that_present_success) {
8323
        if (!(this_present_success && that_present_success))
8324
          return false;
1731 ankur.sing 8325
        if (!this.success.equals(that.success))
1629 ankur.sing 8326
          return false;
8327
      }
8328
 
8329
      return true;
8330
    }
8331
 
8332
    @Override
8333
    public int hashCode() {
8334
      return 0;
8335
    }
8336
 
1731 ankur.sing 8337
    public int compareTo(getSuccessfulPaymentsAmountRange_result other) {
1629 ankur.sing 8338
      if (!getClass().equals(other.getClass())) {
8339
        return getClass().getName().compareTo(other.getClass().getName());
8340
      }
8341
 
8342
      int lastComparison = 0;
1731 ankur.sing 8343
      getSuccessfulPaymentsAmountRange_result typedOther = (getSuccessfulPaymentsAmountRange_result)other;
1629 ankur.sing 8344
 
8345
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8346
      if (lastComparison != 0) {
8347
        return lastComparison;
8348
      }
8349
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8350
      if (lastComparison != 0) {
8351
        return lastComparison;
8352
      }
8353
      return 0;
8354
    }
8355
 
8356
    public void read(TProtocol iprot) throws TException {
8357
      TField field;
8358
      iprot.readStructBegin();
8359
      while (true)
8360
      {
8361
        field = iprot.readFieldBegin();
8362
        if (field.type == TType.STOP) { 
8363
          break;
8364
        }
8365
        _Fields fieldId = _Fields.findByThriftId(field.id);
8366
        if (fieldId == null) {
8367
          TProtocolUtil.skip(iprot, field.type);
8368
        } else {
8369
          switch (fieldId) {
8370
            case SUCCESS:
1731 ankur.sing 8371
              if (field.type == TType.LIST) {
8372
                {
2747 chandransh 8373
                  TList _list28 = iprot.readListBegin();
8374
                  this.success = new ArrayList<Double>(_list28.size);
8375
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
1731 ankur.sing 8376
                  {
2747 chandransh 8377
                    double _elem30;
8378
                    _elem30 = iprot.readDouble();
8379
                    this.success.add(_elem30);
1731 ankur.sing 8380
                  }
8381
                  iprot.readListEnd();
8382
                }
1629 ankur.sing 8383
              } else { 
8384
                TProtocolUtil.skip(iprot, field.type);
8385
              }
8386
              break;
8387
          }
8388
          iprot.readFieldEnd();
8389
        }
8390
      }
8391
      iprot.readStructEnd();
8392
      validate();
8393
    }
8394
 
8395
    public void write(TProtocol oprot) throws TException {
8396
      oprot.writeStructBegin(STRUCT_DESC);
8397
 
8398
      if (this.isSetSuccess()) {
8399
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1731 ankur.sing 8400
        {
8401
          oprot.writeListBegin(new TList(TType.DOUBLE, this.success.size()));
2747 chandransh 8402
          for (double _iter31 : this.success)
1731 ankur.sing 8403
          {
2747 chandransh 8404
            oprot.writeDouble(_iter31);
1731 ankur.sing 8405
          }
8406
          oprot.writeListEnd();
8407
        }
1629 ankur.sing 8408
        oprot.writeFieldEnd();
8409
      }
8410
      oprot.writeFieldStop();
8411
      oprot.writeStructEnd();
8412
    }
8413
 
8414
    @Override
8415
    public String toString() {
1731 ankur.sing 8416
      StringBuilder sb = new StringBuilder("getSuccessfulPaymentsAmountRange_result(");
1629 ankur.sing 8417
      boolean first = true;
8418
 
8419
      sb.append("success:");
1731 ankur.sing 8420
      if (this.success == null) {
8421
        sb.append("null");
8422
      } else {
8423
        sb.append(this.success);
8424
      }
1629 ankur.sing 8425
      first = false;
8426
      sb.append(")");
8427
      return sb.toString();
8428
    }
8429
 
8430
    public void validate() throws TException {
8431
      // check for required fields
8432
    }
8433
 
8434
  }
8435
 
3010 chandransh 8436
  public static class captureEbsPayment_args implements TBase<captureEbsPayment_args._Fields>, java.io.Serializable, Cloneable, Comparable<captureEbsPayment_args>   {
8437
    private static final TStruct STRUCT_DESC = new TStruct("captureEbsPayment_args");
2462 chandransh 8438
 
3010 chandransh 8439
    private static final TField MERCHANT_PAYMENT_ID_FIELD_DESC = new TField("merchantPaymentId", TType.I64, (short)1);
2462 chandransh 8440
 
3010 chandransh 8441
    private long merchantPaymentId;
2462 chandransh 8442
 
8443
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8444
    public enum _Fields implements TFieldIdEnum {
3010 chandransh 8445
      MERCHANT_PAYMENT_ID((short)1, "merchantPaymentId");
2462 chandransh 8446
 
8447
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8448
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8449
 
8450
      static {
8451
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8452
          byId.put((int)field._thriftId, field);
8453
          byName.put(field.getFieldName(), field);
8454
        }
8455
      }
8456
 
8457
      /**
8458
       * Find the _Fields constant that matches fieldId, or null if its not found.
8459
       */
8460
      public static _Fields findByThriftId(int fieldId) {
8461
        return byId.get(fieldId);
8462
      }
8463
 
8464
      /**
8465
       * Find the _Fields constant that matches fieldId, throwing an exception
8466
       * if it is not found.
8467
       */
8468
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8469
        _Fields fields = findByThriftId(fieldId);
8470
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8471
        return fields;
8472
      }
8473
 
8474
      /**
8475
       * Find the _Fields constant that matches name, or null if its not found.
8476
       */
8477
      public static _Fields findByName(String name) {
8478
        return byName.get(name);
8479
      }
8480
 
8481
      private final short _thriftId;
8482
      private final String _fieldName;
8483
 
8484
      _Fields(short thriftId, String fieldName) {
8485
        _thriftId = thriftId;
8486
        _fieldName = fieldName;
8487
      }
8488
 
8489
      public short getThriftFieldId() {
8490
        return _thriftId;
8491
      }
8492
 
8493
      public String getFieldName() {
8494
        return _fieldName;
8495
      }
8496
    }
8497
 
8498
    // isset id assignments
3010 chandransh 8499
    private static final int __MERCHANTPAYMENTID_ISSET_ID = 0;
8500
    private BitSet __isset_bit_vector = new BitSet(1);
2462 chandransh 8501
 
8502
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3010 chandransh 8503
      put(_Fields.MERCHANT_PAYMENT_ID, new FieldMetaData("merchantPaymentId", TFieldRequirementType.DEFAULT, 
8504
          new FieldValueMetaData(TType.I64)));
2462 chandransh 8505
    }});
8506
 
8507
    static {
3010 chandransh 8508
      FieldMetaData.addStructMetaDataMap(captureEbsPayment_args.class, metaDataMap);
2462 chandransh 8509
    }
8510
 
3010 chandransh 8511
    public captureEbsPayment_args() {
2462 chandransh 8512
    }
8513
 
3010 chandransh 8514
    public captureEbsPayment_args(
8515
      long merchantPaymentId)
2462 chandransh 8516
    {
8517
      this();
3010 chandransh 8518
      this.merchantPaymentId = merchantPaymentId;
8519
      setMerchantPaymentIdIsSet(true);
2462 chandransh 8520
    }
8521
 
8522
    /**
8523
     * Performs a deep copy on <i>other</i>.
8524
     */
3010 chandransh 8525
    public captureEbsPayment_args(captureEbsPayment_args other) {
8526
      __isset_bit_vector.clear();
8527
      __isset_bit_vector.or(other.__isset_bit_vector);
8528
      this.merchantPaymentId = other.merchantPaymentId;
2462 chandransh 8529
    }
8530
 
3010 chandransh 8531
    public captureEbsPayment_args deepCopy() {
8532
      return new captureEbsPayment_args(this);
2462 chandransh 8533
    }
8534
 
8535
    @Deprecated
3010 chandransh 8536
    public captureEbsPayment_args clone() {
8537
      return new captureEbsPayment_args(this);
2462 chandransh 8538
    }
8539
 
3010 chandransh 8540
    public long getMerchantPaymentId() {
8541
      return this.merchantPaymentId;
2462 chandransh 8542
    }
8543
 
3010 chandransh 8544
    public captureEbsPayment_args setMerchantPaymentId(long merchantPaymentId) {
8545
      this.merchantPaymentId = merchantPaymentId;
8546
      setMerchantPaymentIdIsSet(true);
2462 chandransh 8547
      return this;
8548
    }
8549
 
3010 chandransh 8550
    public void unsetMerchantPaymentId() {
8551
      __isset_bit_vector.clear(__MERCHANTPAYMENTID_ISSET_ID);
2462 chandransh 8552
    }
8553
 
3010 chandransh 8554
    /** Returns true if field merchantPaymentId is set (has been asigned a value) and false otherwise */
8555
    public boolean isSetMerchantPaymentId() {
8556
      return __isset_bit_vector.get(__MERCHANTPAYMENTID_ISSET_ID);
2462 chandransh 8557
    }
8558
 
3010 chandransh 8559
    public void setMerchantPaymentIdIsSet(boolean value) {
8560
      __isset_bit_vector.set(__MERCHANTPAYMENTID_ISSET_ID, value);
2462 chandransh 8561
    }
8562
 
8563
    public void setFieldValue(_Fields field, Object value) {
8564
      switch (field) {
3010 chandransh 8565
      case MERCHANT_PAYMENT_ID:
2462 chandransh 8566
        if (value == null) {
3010 chandransh 8567
          unsetMerchantPaymentId();
2462 chandransh 8568
        } else {
3010 chandransh 8569
          setMerchantPaymentId((Long)value);
2462 chandransh 8570
        }
8571
        break;
8572
 
8573
      }
8574
    }
8575
 
8576
    public void setFieldValue(int fieldID, Object value) {
8577
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8578
    }
8579
 
8580
    public Object getFieldValue(_Fields field) {
8581
      switch (field) {
3010 chandransh 8582
      case MERCHANT_PAYMENT_ID:
8583
        return new Long(getMerchantPaymentId());
2462 chandransh 8584
 
8585
      }
8586
      throw new IllegalStateException();
8587
    }
8588
 
8589
    public Object getFieldValue(int fieldId) {
8590
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8591
    }
8592
 
8593
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8594
    public boolean isSet(_Fields field) {
8595
      switch (field) {
3010 chandransh 8596
      case MERCHANT_PAYMENT_ID:
8597
        return isSetMerchantPaymentId();
2462 chandransh 8598
      }
8599
      throw new IllegalStateException();
8600
    }
8601
 
8602
    public boolean isSet(int fieldID) {
8603
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8604
    }
8605
 
8606
    @Override
8607
    public boolean equals(Object that) {
8608
      if (that == null)
8609
        return false;
3010 chandransh 8610
      if (that instanceof captureEbsPayment_args)
8611
        return this.equals((captureEbsPayment_args)that);
2462 chandransh 8612
      return false;
8613
    }
8614
 
3010 chandransh 8615
    public boolean equals(captureEbsPayment_args that) {
2462 chandransh 8616
      if (that == null)
8617
        return false;
8618
 
3010 chandransh 8619
      boolean this_present_merchantPaymentId = true;
8620
      boolean that_present_merchantPaymentId = true;
8621
      if (this_present_merchantPaymentId || that_present_merchantPaymentId) {
8622
        if (!(this_present_merchantPaymentId && that_present_merchantPaymentId))
2462 chandransh 8623
          return false;
3010 chandransh 8624
        if (this.merchantPaymentId != that.merchantPaymentId)
2462 chandransh 8625
          return false;
8626
      }
8627
 
8628
      return true;
8629
    }
8630
 
8631
    @Override
8632
    public int hashCode() {
8633
      return 0;
8634
    }
8635
 
3010 chandransh 8636
    public int compareTo(captureEbsPayment_args other) {
8637
      if (!getClass().equals(other.getClass())) {
8638
        return getClass().getName().compareTo(other.getClass().getName());
8639
      }
8640
 
8641
      int lastComparison = 0;
8642
      captureEbsPayment_args typedOther = (captureEbsPayment_args)other;
8643
 
8644
      lastComparison = Boolean.valueOf(isSetMerchantPaymentId()).compareTo(isSetMerchantPaymentId());
8645
      if (lastComparison != 0) {
8646
        return lastComparison;
8647
      }
8648
      lastComparison = TBaseHelper.compareTo(merchantPaymentId, typedOther.merchantPaymentId);
8649
      if (lastComparison != 0) {
8650
        return lastComparison;
8651
      }
8652
      return 0;
8653
    }
8654
 
2462 chandransh 8655
    public void read(TProtocol iprot) throws TException {
8656
      TField field;
8657
      iprot.readStructBegin();
8658
      while (true)
8659
      {
8660
        field = iprot.readFieldBegin();
8661
        if (field.type == TType.STOP) { 
8662
          break;
8663
        }
8664
        _Fields fieldId = _Fields.findByThriftId(field.id);
8665
        if (fieldId == null) {
8666
          TProtocolUtil.skip(iprot, field.type);
8667
        } else {
8668
          switch (fieldId) {
3010 chandransh 8669
            case MERCHANT_PAYMENT_ID:
8670
              if (field.type == TType.I64) {
8671
                this.merchantPaymentId = iprot.readI64();
8672
                setMerchantPaymentIdIsSet(true);
2462 chandransh 8673
              } else { 
8674
                TProtocolUtil.skip(iprot, field.type);
8675
              }
8676
              break;
8677
          }
8678
          iprot.readFieldEnd();
8679
        }
8680
      }
8681
      iprot.readStructEnd();
8682
      validate();
8683
    }
8684
 
8685
    public void write(TProtocol oprot) throws TException {
8686
      validate();
8687
 
8688
      oprot.writeStructBegin(STRUCT_DESC);
3010 chandransh 8689
      oprot.writeFieldBegin(MERCHANT_PAYMENT_ID_FIELD_DESC);
8690
      oprot.writeI64(this.merchantPaymentId);
8691
      oprot.writeFieldEnd();
2462 chandransh 8692
      oprot.writeFieldStop();
8693
      oprot.writeStructEnd();
8694
    }
8695
 
8696
    @Override
8697
    public String toString() {
3010 chandransh 8698
      StringBuilder sb = new StringBuilder("captureEbsPayment_args(");
2462 chandransh 8699
      boolean first = true;
8700
 
3010 chandransh 8701
      sb.append("merchantPaymentId:");
8702
      sb.append(this.merchantPaymentId);
2462 chandransh 8703
      first = false;
8704
      sb.append(")");
8705
      return sb.toString();
8706
    }
8707
 
8708
    public void validate() throws TException {
8709
      // check for required fields
8710
    }
8711
 
8712
  }
8713
 
3010 chandransh 8714
  public static class captureEbsPayment_result implements TBase<captureEbsPayment_result._Fields>, java.io.Serializable, Cloneable   {
8715
    private static final TStruct STRUCT_DESC = new TStruct("captureEbsPayment_result");
2462 chandransh 8716
 
3010 chandransh 8717
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0);
2462 chandransh 8718
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
8719
 
3010 chandransh 8720
    private Map<String,String> success;
2462 chandransh 8721
    private PaymentException pe;
8722
 
8723
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8724
    public enum _Fields implements TFieldIdEnum {
8725
      SUCCESS((short)0, "success"),
8726
      PE((short)1, "pe");
8727
 
8728
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8729
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8730
 
8731
      static {
8732
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8733
          byId.put((int)field._thriftId, field);
8734
          byName.put(field.getFieldName(), field);
8735
        }
8736
      }
8737
 
8738
      /**
8739
       * Find the _Fields constant that matches fieldId, or null if its not found.
8740
       */
8741
      public static _Fields findByThriftId(int fieldId) {
8742
        return byId.get(fieldId);
8743
      }
8744
 
8745
      /**
8746
       * Find the _Fields constant that matches fieldId, throwing an exception
8747
       * if it is not found.
8748
       */
8749
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8750
        _Fields fields = findByThriftId(fieldId);
8751
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8752
        return fields;
8753
      }
8754
 
8755
      /**
8756
       * Find the _Fields constant that matches name, or null if its not found.
8757
       */
8758
      public static _Fields findByName(String name) {
8759
        return byName.get(name);
8760
      }
8761
 
8762
      private final short _thriftId;
8763
      private final String _fieldName;
8764
 
8765
      _Fields(short thriftId, String fieldName) {
8766
        _thriftId = thriftId;
8767
        _fieldName = fieldName;
8768
      }
8769
 
8770
      public short getThriftFieldId() {
8771
        return _thriftId;
8772
      }
8773
 
8774
      public String getFieldName() {
8775
        return _fieldName;
8776
      }
8777
    }
8778
 
8779
    // isset id assignments
8780
 
8781
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8782
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3010 chandransh 8783
          new MapMetaData(TType.MAP, 
8784
              new FieldValueMetaData(TType.STRING), 
8785
              new FieldValueMetaData(TType.STRING))));
2462 chandransh 8786
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
8787
          new FieldValueMetaData(TType.STRUCT)));
8788
    }});
8789
 
8790
    static {
3010 chandransh 8791
      FieldMetaData.addStructMetaDataMap(captureEbsPayment_result.class, metaDataMap);
2462 chandransh 8792
    }
8793
 
3010 chandransh 8794
    public captureEbsPayment_result() {
2462 chandransh 8795
    }
8796
 
3010 chandransh 8797
    public captureEbsPayment_result(
8798
      Map<String,String> success,
2462 chandransh 8799
      PaymentException pe)
8800
    {
8801
      this();
8802
      this.success = success;
8803
      this.pe = pe;
8804
    }
8805
 
8806
    /**
8807
     * Performs a deep copy on <i>other</i>.
8808
     */
3010 chandransh 8809
    public captureEbsPayment_result(captureEbsPayment_result other) {
2462 chandransh 8810
      if (other.isSetSuccess()) {
3010 chandransh 8811
        Map<String,String> __this__success = new HashMap<String,String>();
8812
        for (Map.Entry<String, String> other_element : other.success.entrySet()) {
8813
 
8814
          String other_element_key = other_element.getKey();
8815
          String other_element_value = other_element.getValue();
8816
 
8817
          String __this__success_copy_key = other_element_key;
8818
 
8819
          String __this__success_copy_value = other_element_value;
8820
 
8821
          __this__success.put(__this__success_copy_key, __this__success_copy_value);
8822
        }
8823
        this.success = __this__success;
2462 chandransh 8824
      }
8825
      if (other.isSetPe()) {
8826
        this.pe = new PaymentException(other.pe);
8827
      }
8828
    }
8829
 
3010 chandransh 8830
    public captureEbsPayment_result deepCopy() {
8831
      return new captureEbsPayment_result(this);
2462 chandransh 8832
    }
8833
 
8834
    @Deprecated
3010 chandransh 8835
    public captureEbsPayment_result clone() {
8836
      return new captureEbsPayment_result(this);
2462 chandransh 8837
    }
8838
 
3010 chandransh 8839
    public int getSuccessSize() {
8840
      return (this.success == null) ? 0 : this.success.size();
8841
    }
8842
 
8843
    public void putToSuccess(String key, String val) {
8844
      if (this.success == null) {
8845
        this.success = new HashMap<String,String>();
8846
      }
8847
      this.success.put(key, val);
8848
    }
8849
 
8850
    public Map<String,String> getSuccess() {
2462 chandransh 8851
      return this.success;
8852
    }
8853
 
3010 chandransh 8854
    public captureEbsPayment_result setSuccess(Map<String,String> success) {
2462 chandransh 8855
      this.success = success;
8856
      return this;
8857
    }
8858
 
8859
    public void unsetSuccess() {
8860
      this.success = null;
8861
    }
8862
 
8863
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8864
    public boolean isSetSuccess() {
8865
      return this.success != null;
8866
    }
8867
 
8868
    public void setSuccessIsSet(boolean value) {
8869
      if (!value) {
8870
        this.success = null;
8871
      }
8872
    }
8873
 
8874
    public PaymentException getPe() {
8875
      return this.pe;
8876
    }
8877
 
3010 chandransh 8878
    public captureEbsPayment_result setPe(PaymentException pe) {
2462 chandransh 8879
      this.pe = pe;
8880
      return this;
8881
    }
8882
 
8883
    public void unsetPe() {
8884
      this.pe = null;
8885
    }
8886
 
8887
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
8888
    public boolean isSetPe() {
8889
      return this.pe != null;
8890
    }
8891
 
8892
    public void setPeIsSet(boolean value) {
8893
      if (!value) {
8894
        this.pe = null;
8895
      }
8896
    }
8897
 
8898
    public void setFieldValue(_Fields field, Object value) {
8899
      switch (field) {
8900
      case SUCCESS:
8901
        if (value == null) {
8902
          unsetSuccess();
8903
        } else {
3010 chandransh 8904
          setSuccess((Map<String,String>)value);
2462 chandransh 8905
        }
8906
        break;
8907
 
8908
      case PE:
8909
        if (value == null) {
8910
          unsetPe();
8911
        } else {
8912
          setPe((PaymentException)value);
8913
        }
8914
        break;
8915
 
8916
      }
8917
    }
8918
 
8919
    public void setFieldValue(int fieldID, Object value) {
8920
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8921
    }
8922
 
8923
    public Object getFieldValue(_Fields field) {
8924
      switch (field) {
8925
      case SUCCESS:
8926
        return getSuccess();
8927
 
8928
      case PE:
8929
        return getPe();
8930
 
8931
      }
8932
      throw new IllegalStateException();
8933
    }
8934
 
8935
    public Object getFieldValue(int fieldId) {
8936
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8937
    }
8938
 
8939
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8940
    public boolean isSet(_Fields field) {
8941
      switch (field) {
8942
      case SUCCESS:
8943
        return isSetSuccess();
8944
      case PE:
8945
        return isSetPe();
8946
      }
8947
      throw new IllegalStateException();
8948
    }
8949
 
8950
    public boolean isSet(int fieldID) {
8951
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8952
    }
8953
 
8954
    @Override
8955
    public boolean equals(Object that) {
8956
      if (that == null)
8957
        return false;
3010 chandransh 8958
      if (that instanceof captureEbsPayment_result)
8959
        return this.equals((captureEbsPayment_result)that);
2462 chandransh 8960
      return false;
8961
    }
8962
 
3010 chandransh 8963
    public boolean equals(captureEbsPayment_result that) {
2462 chandransh 8964
      if (that == null)
8965
        return false;
8966
 
8967
      boolean this_present_success = true && this.isSetSuccess();
8968
      boolean that_present_success = true && that.isSetSuccess();
8969
      if (this_present_success || that_present_success) {
8970
        if (!(this_present_success && that_present_success))
8971
          return false;
8972
        if (!this.success.equals(that.success))
8973
          return false;
8974
      }
8975
 
8976
      boolean this_present_pe = true && this.isSetPe();
8977
      boolean that_present_pe = true && that.isSetPe();
8978
      if (this_present_pe || that_present_pe) {
8979
        if (!(this_present_pe && that_present_pe))
8980
          return false;
8981
        if (!this.pe.equals(that.pe))
8982
          return false;
8983
      }
8984
 
8985
      return true;
8986
    }
8987
 
8988
    @Override
8989
    public int hashCode() {
8990
      return 0;
8991
    }
8992
 
8993
    public void read(TProtocol iprot) throws TException {
8994
      TField field;
8995
      iprot.readStructBegin();
8996
      while (true)
8997
      {
8998
        field = iprot.readFieldBegin();
8999
        if (field.type == TType.STOP) { 
9000
          break;
9001
        }
9002
        _Fields fieldId = _Fields.findByThriftId(field.id);
9003
        if (fieldId == null) {
9004
          TProtocolUtil.skip(iprot, field.type);
9005
        } else {
9006
          switch (fieldId) {
9007
            case SUCCESS:
3010 chandransh 9008
              if (field.type == TType.MAP) {
9009
                {
9010
                  TMap _map32 = iprot.readMapBegin();
9011
                  this.success = new HashMap<String,String>(2*_map32.size);
9012
                  for (int _i33 = 0; _i33 < _map32.size; ++_i33)
9013
                  {
9014
                    String _key34;
9015
                    String _val35;
9016
                    _key34 = iprot.readString();
9017
                    _val35 = iprot.readString();
9018
                    this.success.put(_key34, _val35);
9019
                  }
9020
                  iprot.readMapEnd();
9021
                }
2462 chandransh 9022
              } else { 
9023
                TProtocolUtil.skip(iprot, field.type);
9024
              }
9025
              break;
9026
            case PE:
9027
              if (field.type == TType.STRUCT) {
9028
                this.pe = new PaymentException();
9029
                this.pe.read(iprot);
9030
              } else { 
9031
                TProtocolUtil.skip(iprot, field.type);
9032
              }
9033
              break;
9034
          }
9035
          iprot.readFieldEnd();
9036
        }
9037
      }
9038
      iprot.readStructEnd();
9039
      validate();
9040
    }
9041
 
9042
    public void write(TProtocol oprot) throws TException {
9043
      oprot.writeStructBegin(STRUCT_DESC);
9044
 
9045
      if (this.isSetSuccess()) {
9046
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3010 chandransh 9047
        {
9048
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.success.size()));
9049
          for (Map.Entry<String, String> _iter36 : this.success.entrySet())
9050
          {
9051
            oprot.writeString(_iter36.getKey());
9052
            oprot.writeString(_iter36.getValue());
9053
          }
9054
          oprot.writeMapEnd();
9055
        }
2462 chandransh 9056
        oprot.writeFieldEnd();
9057
      } else if (this.isSetPe()) {
9058
        oprot.writeFieldBegin(PE_FIELD_DESC);
9059
        this.pe.write(oprot);
9060
        oprot.writeFieldEnd();
9061
      }
9062
      oprot.writeFieldStop();
9063
      oprot.writeStructEnd();
9064
    }
9065
 
9066
    @Override
9067
    public String toString() {
3010 chandransh 9068
      StringBuilder sb = new StringBuilder("captureEbsPayment_result(");
2462 chandransh 9069
      boolean first = true;
9070
 
9071
      sb.append("success:");
9072
      if (this.success == null) {
9073
        sb.append("null");
9074
      } else {
9075
        sb.append(this.success);
9076
      }
9077
      first = false;
9078
      if (!first) sb.append(", ");
9079
      sb.append("pe:");
9080
      if (this.pe == null) {
9081
        sb.append("null");
9082
      } else {
9083
        sb.append(this.pe);
9084
      }
9085
      first = false;
9086
      sb.append(")");
9087
      return sb.toString();
9088
    }
9089
 
9090
    public void validate() throws TException {
9091
      // check for required fields
9092
    }
9093
 
9094
  }
9095
 
3010 chandransh 9096
  public static class captureHdfcPayment_args implements TBase<captureHdfcPayment_args._Fields>, java.io.Serializable, Cloneable, Comparable<captureHdfcPayment_args>   {
9097
    private static final TStruct STRUCT_DESC = new TStruct("captureHdfcPayment_args");
2708 chandransh 9098
 
9099
    private static final TField MERCHANT_PAYMENT_ID_FIELD_DESC = new TField("merchantPaymentId", TType.I64, (short)1);
9100
 
9101
    private long merchantPaymentId;
9102
 
9103
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9104
    public enum _Fields implements TFieldIdEnum {
9105
      MERCHANT_PAYMENT_ID((short)1, "merchantPaymentId");
9106
 
9107
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9108
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9109
 
9110
      static {
9111
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9112
          byId.put((int)field._thriftId, field);
9113
          byName.put(field.getFieldName(), field);
9114
        }
9115
      }
9116
 
9117
      /**
9118
       * Find the _Fields constant that matches fieldId, or null if its not found.
9119
       */
9120
      public static _Fields findByThriftId(int fieldId) {
9121
        return byId.get(fieldId);
9122
      }
9123
 
9124
      /**
9125
       * Find the _Fields constant that matches fieldId, throwing an exception
9126
       * if it is not found.
9127
       */
9128
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9129
        _Fields fields = findByThriftId(fieldId);
9130
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9131
        return fields;
9132
      }
9133
 
9134
      /**
9135
       * Find the _Fields constant that matches name, or null if its not found.
9136
       */
9137
      public static _Fields findByName(String name) {
9138
        return byName.get(name);
9139
      }
9140
 
9141
      private final short _thriftId;
9142
      private final String _fieldName;
9143
 
9144
      _Fields(short thriftId, String fieldName) {
9145
        _thriftId = thriftId;
9146
        _fieldName = fieldName;
9147
      }
9148
 
9149
      public short getThriftFieldId() {
9150
        return _thriftId;
9151
      }
9152
 
9153
      public String getFieldName() {
9154
        return _fieldName;
9155
      }
9156
    }
9157
 
9158
    // isset id assignments
9159
    private static final int __MERCHANTPAYMENTID_ISSET_ID = 0;
9160
    private BitSet __isset_bit_vector = new BitSet(1);
9161
 
9162
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9163
      put(_Fields.MERCHANT_PAYMENT_ID, new FieldMetaData("merchantPaymentId", TFieldRequirementType.DEFAULT, 
9164
          new FieldValueMetaData(TType.I64)));
9165
    }});
9166
 
9167
    static {
3010 chandransh 9168
      FieldMetaData.addStructMetaDataMap(captureHdfcPayment_args.class, metaDataMap);
2708 chandransh 9169
    }
9170
 
3010 chandransh 9171
    public captureHdfcPayment_args() {
2708 chandransh 9172
    }
9173
 
3010 chandransh 9174
    public captureHdfcPayment_args(
2708 chandransh 9175
      long merchantPaymentId)
9176
    {
9177
      this();
9178
      this.merchantPaymentId = merchantPaymentId;
9179
      setMerchantPaymentIdIsSet(true);
9180
    }
9181
 
9182
    /**
9183
     * Performs a deep copy on <i>other</i>.
9184
     */
3010 chandransh 9185
    public captureHdfcPayment_args(captureHdfcPayment_args other) {
2708 chandransh 9186
      __isset_bit_vector.clear();
9187
      __isset_bit_vector.or(other.__isset_bit_vector);
9188
      this.merchantPaymentId = other.merchantPaymentId;
9189
    }
9190
 
3010 chandransh 9191
    public captureHdfcPayment_args deepCopy() {
9192
      return new captureHdfcPayment_args(this);
2708 chandransh 9193
    }
9194
 
9195
    @Deprecated
3010 chandransh 9196
    public captureHdfcPayment_args clone() {
9197
      return new captureHdfcPayment_args(this);
2708 chandransh 9198
    }
9199
 
9200
    public long getMerchantPaymentId() {
9201
      return this.merchantPaymentId;
9202
    }
9203
 
3010 chandransh 9204
    public captureHdfcPayment_args setMerchantPaymentId(long merchantPaymentId) {
2708 chandransh 9205
      this.merchantPaymentId = merchantPaymentId;
9206
      setMerchantPaymentIdIsSet(true);
9207
      return this;
9208
    }
9209
 
9210
    public void unsetMerchantPaymentId() {
9211
      __isset_bit_vector.clear(__MERCHANTPAYMENTID_ISSET_ID);
9212
    }
9213
 
9214
    /** Returns true if field merchantPaymentId is set (has been asigned a value) and false otherwise */
9215
    public boolean isSetMerchantPaymentId() {
9216
      return __isset_bit_vector.get(__MERCHANTPAYMENTID_ISSET_ID);
9217
    }
9218
 
9219
    public void setMerchantPaymentIdIsSet(boolean value) {
9220
      __isset_bit_vector.set(__MERCHANTPAYMENTID_ISSET_ID, value);
9221
    }
9222
 
9223
    public void setFieldValue(_Fields field, Object value) {
9224
      switch (field) {
9225
      case MERCHANT_PAYMENT_ID:
9226
        if (value == null) {
9227
          unsetMerchantPaymentId();
9228
        } else {
9229
          setMerchantPaymentId((Long)value);
9230
        }
9231
        break;
9232
 
9233
      }
9234
    }
9235
 
9236
    public void setFieldValue(int fieldID, Object value) {
9237
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9238
    }
9239
 
9240
    public Object getFieldValue(_Fields field) {
9241
      switch (field) {
9242
      case MERCHANT_PAYMENT_ID:
9243
        return new Long(getMerchantPaymentId());
9244
 
9245
      }
9246
      throw new IllegalStateException();
9247
    }
9248
 
9249
    public Object getFieldValue(int fieldId) {
9250
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9251
    }
9252
 
9253
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9254
    public boolean isSet(_Fields field) {
9255
      switch (field) {
9256
      case MERCHANT_PAYMENT_ID:
9257
        return isSetMerchantPaymentId();
9258
      }
9259
      throw new IllegalStateException();
9260
    }
9261
 
9262
    public boolean isSet(int fieldID) {
9263
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9264
    }
9265
 
9266
    @Override
9267
    public boolean equals(Object that) {
9268
      if (that == null)
9269
        return false;
3010 chandransh 9270
      if (that instanceof captureHdfcPayment_args)
9271
        return this.equals((captureHdfcPayment_args)that);
2708 chandransh 9272
      return false;
9273
    }
9274
 
3010 chandransh 9275
    public boolean equals(captureHdfcPayment_args that) {
2708 chandransh 9276
      if (that == null)
9277
        return false;
9278
 
9279
      boolean this_present_merchantPaymentId = true;
9280
      boolean that_present_merchantPaymentId = true;
9281
      if (this_present_merchantPaymentId || that_present_merchantPaymentId) {
9282
        if (!(this_present_merchantPaymentId && that_present_merchantPaymentId))
9283
          return false;
9284
        if (this.merchantPaymentId != that.merchantPaymentId)
9285
          return false;
9286
      }
9287
 
9288
      return true;
9289
    }
9290
 
9291
    @Override
9292
    public int hashCode() {
9293
      return 0;
9294
    }
9295
 
3010 chandransh 9296
    public int compareTo(captureHdfcPayment_args other) {
2708 chandransh 9297
      if (!getClass().equals(other.getClass())) {
9298
        return getClass().getName().compareTo(other.getClass().getName());
9299
      }
9300
 
9301
      int lastComparison = 0;
3010 chandransh 9302
      captureHdfcPayment_args typedOther = (captureHdfcPayment_args)other;
2708 chandransh 9303
 
9304
      lastComparison = Boolean.valueOf(isSetMerchantPaymentId()).compareTo(isSetMerchantPaymentId());
9305
      if (lastComparison != 0) {
9306
        return lastComparison;
9307
      }
9308
      lastComparison = TBaseHelper.compareTo(merchantPaymentId, typedOther.merchantPaymentId);
9309
      if (lastComparison != 0) {
9310
        return lastComparison;
9311
      }
9312
      return 0;
9313
    }
9314
 
9315
    public void read(TProtocol iprot) throws TException {
9316
      TField field;
9317
      iprot.readStructBegin();
9318
      while (true)
9319
      {
9320
        field = iprot.readFieldBegin();
9321
        if (field.type == TType.STOP) { 
9322
          break;
9323
        }
9324
        _Fields fieldId = _Fields.findByThriftId(field.id);
9325
        if (fieldId == null) {
9326
          TProtocolUtil.skip(iprot, field.type);
9327
        } else {
9328
          switch (fieldId) {
9329
            case MERCHANT_PAYMENT_ID:
9330
              if (field.type == TType.I64) {
9331
                this.merchantPaymentId = iprot.readI64();
9332
                setMerchantPaymentIdIsSet(true);
9333
              } else { 
9334
                TProtocolUtil.skip(iprot, field.type);
9335
              }
9336
              break;
9337
          }
9338
          iprot.readFieldEnd();
9339
        }
9340
      }
9341
      iprot.readStructEnd();
9342
      validate();
9343
    }
9344
 
9345
    public void write(TProtocol oprot) throws TException {
9346
      validate();
9347
 
9348
      oprot.writeStructBegin(STRUCT_DESC);
9349
      oprot.writeFieldBegin(MERCHANT_PAYMENT_ID_FIELD_DESC);
9350
      oprot.writeI64(this.merchantPaymentId);
9351
      oprot.writeFieldEnd();
9352
      oprot.writeFieldStop();
9353
      oprot.writeStructEnd();
9354
    }
9355
 
9356
    @Override
9357
    public String toString() {
3010 chandransh 9358
      StringBuilder sb = new StringBuilder("captureHdfcPayment_args(");
2708 chandransh 9359
      boolean first = true;
9360
 
9361
      sb.append("merchantPaymentId:");
9362
      sb.append(this.merchantPaymentId);
9363
      first = false;
9364
      sb.append(")");
9365
      return sb.toString();
9366
    }
9367
 
9368
    public void validate() throws TException {
9369
      // check for required fields
9370
    }
9371
 
9372
  }
9373
 
3010 chandransh 9374
  public static class captureHdfcPayment_result implements TBase<captureHdfcPayment_result._Fields>, java.io.Serializable, Cloneable   {
9375
    private static final TStruct STRUCT_DESC = new TStruct("captureHdfcPayment_result");
2708 chandransh 9376
 
9377
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.MAP, (short)0);
9378
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
9379
 
9380
    private Map<String,String> success;
9381
    private PaymentException pe;
9382
 
9383
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9384
    public enum _Fields implements TFieldIdEnum {
9385
      SUCCESS((short)0, "success"),
9386
      PE((short)1, "pe");
9387
 
9388
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9389
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9390
 
9391
      static {
9392
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9393
          byId.put((int)field._thriftId, field);
9394
          byName.put(field.getFieldName(), field);
9395
        }
9396
      }
9397
 
9398
      /**
9399
       * Find the _Fields constant that matches fieldId, or null if its not found.
9400
       */
9401
      public static _Fields findByThriftId(int fieldId) {
9402
        return byId.get(fieldId);
9403
      }
9404
 
9405
      /**
9406
       * Find the _Fields constant that matches fieldId, throwing an exception
9407
       * if it is not found.
9408
       */
9409
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9410
        _Fields fields = findByThriftId(fieldId);
9411
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9412
        return fields;
9413
      }
9414
 
9415
      /**
9416
       * Find the _Fields constant that matches name, or null if its not found.
9417
       */
9418
      public static _Fields findByName(String name) {
9419
        return byName.get(name);
9420
      }
9421
 
9422
      private final short _thriftId;
9423
      private final String _fieldName;
9424
 
9425
      _Fields(short thriftId, String fieldName) {
9426
        _thriftId = thriftId;
9427
        _fieldName = fieldName;
9428
      }
9429
 
9430
      public short getThriftFieldId() {
9431
        return _thriftId;
9432
      }
9433
 
9434
      public String getFieldName() {
9435
        return _fieldName;
9436
      }
9437
    }
9438
 
9439
    // isset id assignments
9440
 
9441
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9442
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9443
          new MapMetaData(TType.MAP, 
9444
              new FieldValueMetaData(TType.STRING), 
9445
              new FieldValueMetaData(TType.STRING))));
9446
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
9447
          new FieldValueMetaData(TType.STRUCT)));
9448
    }});
9449
 
9450
    static {
3010 chandransh 9451
      FieldMetaData.addStructMetaDataMap(captureHdfcPayment_result.class, metaDataMap);
2708 chandransh 9452
    }
9453
 
3010 chandransh 9454
    public captureHdfcPayment_result() {
2708 chandransh 9455
    }
9456
 
3010 chandransh 9457
    public captureHdfcPayment_result(
2708 chandransh 9458
      Map<String,String> success,
9459
      PaymentException pe)
9460
    {
9461
      this();
9462
      this.success = success;
9463
      this.pe = pe;
9464
    }
9465
 
9466
    /**
9467
     * Performs a deep copy on <i>other</i>.
9468
     */
3010 chandransh 9469
    public captureHdfcPayment_result(captureHdfcPayment_result other) {
2708 chandransh 9470
      if (other.isSetSuccess()) {
9471
        Map<String,String> __this__success = new HashMap<String,String>();
9472
        for (Map.Entry<String, String> other_element : other.success.entrySet()) {
9473
 
9474
          String other_element_key = other_element.getKey();
9475
          String other_element_value = other_element.getValue();
9476
 
9477
          String __this__success_copy_key = other_element_key;
9478
 
9479
          String __this__success_copy_value = other_element_value;
9480
 
9481
          __this__success.put(__this__success_copy_key, __this__success_copy_value);
9482
        }
9483
        this.success = __this__success;
9484
      }
9485
      if (other.isSetPe()) {
9486
        this.pe = new PaymentException(other.pe);
9487
      }
9488
    }
9489
 
3010 chandransh 9490
    public captureHdfcPayment_result deepCopy() {
9491
      return new captureHdfcPayment_result(this);
2708 chandransh 9492
    }
9493
 
9494
    @Deprecated
3010 chandransh 9495
    public captureHdfcPayment_result clone() {
9496
      return new captureHdfcPayment_result(this);
2708 chandransh 9497
    }
9498
 
9499
    public int getSuccessSize() {
9500
      return (this.success == null) ? 0 : this.success.size();
9501
    }
9502
 
9503
    public void putToSuccess(String key, String val) {
9504
      if (this.success == null) {
9505
        this.success = new HashMap<String,String>();
9506
      }
9507
      this.success.put(key, val);
9508
    }
9509
 
9510
    public Map<String,String> getSuccess() {
9511
      return this.success;
9512
    }
9513
 
3010 chandransh 9514
    public captureHdfcPayment_result setSuccess(Map<String,String> success) {
2708 chandransh 9515
      this.success = success;
9516
      return this;
9517
    }
9518
 
9519
    public void unsetSuccess() {
9520
      this.success = null;
9521
    }
9522
 
9523
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9524
    public boolean isSetSuccess() {
9525
      return this.success != null;
9526
    }
9527
 
9528
    public void setSuccessIsSet(boolean value) {
9529
      if (!value) {
9530
        this.success = null;
9531
      }
9532
    }
9533
 
9534
    public PaymentException getPe() {
9535
      return this.pe;
9536
    }
9537
 
3010 chandransh 9538
    public captureHdfcPayment_result setPe(PaymentException pe) {
2708 chandransh 9539
      this.pe = pe;
9540
      return this;
9541
    }
9542
 
9543
    public void unsetPe() {
9544
      this.pe = null;
9545
    }
9546
 
9547
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
9548
    public boolean isSetPe() {
9549
      return this.pe != null;
9550
    }
9551
 
9552
    public void setPeIsSet(boolean value) {
9553
      if (!value) {
9554
        this.pe = null;
9555
      }
9556
    }
9557
 
9558
    public void setFieldValue(_Fields field, Object value) {
9559
      switch (field) {
9560
      case SUCCESS:
9561
        if (value == null) {
9562
          unsetSuccess();
9563
        } else {
9564
          setSuccess((Map<String,String>)value);
9565
        }
9566
        break;
9567
 
9568
      case PE:
9569
        if (value == null) {
9570
          unsetPe();
9571
        } else {
9572
          setPe((PaymentException)value);
9573
        }
9574
        break;
9575
 
9576
      }
9577
    }
9578
 
9579
    public void setFieldValue(int fieldID, Object value) {
9580
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9581
    }
9582
 
9583
    public Object getFieldValue(_Fields field) {
9584
      switch (field) {
9585
      case SUCCESS:
9586
        return getSuccess();
9587
 
9588
      case PE:
9589
        return getPe();
9590
 
9591
      }
9592
      throw new IllegalStateException();
9593
    }
9594
 
9595
    public Object getFieldValue(int fieldId) {
9596
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9597
    }
9598
 
9599
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9600
    public boolean isSet(_Fields field) {
9601
      switch (field) {
9602
      case SUCCESS:
9603
        return isSetSuccess();
9604
      case PE:
9605
        return isSetPe();
9606
      }
9607
      throw new IllegalStateException();
9608
    }
9609
 
9610
    public boolean isSet(int fieldID) {
9611
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9612
    }
9613
 
9614
    @Override
9615
    public boolean equals(Object that) {
9616
      if (that == null)
9617
        return false;
3010 chandransh 9618
      if (that instanceof captureHdfcPayment_result)
9619
        return this.equals((captureHdfcPayment_result)that);
2708 chandransh 9620
      return false;
9621
    }
9622
 
3010 chandransh 9623
    public boolean equals(captureHdfcPayment_result that) {
2708 chandransh 9624
      if (that == null)
9625
        return false;
9626
 
9627
      boolean this_present_success = true && this.isSetSuccess();
9628
      boolean that_present_success = true && that.isSetSuccess();
9629
      if (this_present_success || that_present_success) {
9630
        if (!(this_present_success && that_present_success))
9631
          return false;
9632
        if (!this.success.equals(that.success))
9633
          return false;
9634
      }
9635
 
9636
      boolean this_present_pe = true && this.isSetPe();
9637
      boolean that_present_pe = true && that.isSetPe();
9638
      if (this_present_pe || that_present_pe) {
9639
        if (!(this_present_pe && that_present_pe))
9640
          return false;
9641
        if (!this.pe.equals(that.pe))
9642
          return false;
9643
      }
9644
 
9645
      return true;
9646
    }
9647
 
9648
    @Override
9649
    public int hashCode() {
9650
      return 0;
9651
    }
9652
 
9653
    public void read(TProtocol iprot) throws TException {
9654
      TField field;
9655
      iprot.readStructBegin();
9656
      while (true)
9657
      {
9658
        field = iprot.readFieldBegin();
9659
        if (field.type == TType.STOP) { 
9660
          break;
9661
        }
9662
        _Fields fieldId = _Fields.findByThriftId(field.id);
9663
        if (fieldId == null) {
9664
          TProtocolUtil.skip(iprot, field.type);
9665
        } else {
9666
          switch (fieldId) {
9667
            case SUCCESS:
9668
              if (field.type == TType.MAP) {
9669
                {
2747 chandransh 9670
                  TMap _map37 = iprot.readMapBegin();
9671
                  this.success = new HashMap<String,String>(2*_map37.size);
9672
                  for (int _i38 = 0; _i38 < _map37.size; ++_i38)
2708 chandransh 9673
                  {
2747 chandransh 9674
                    String _key39;
9675
                    String _val40;
9676
                    _key39 = iprot.readString();
9677
                    _val40 = iprot.readString();
9678
                    this.success.put(_key39, _val40);
2708 chandransh 9679
                  }
9680
                  iprot.readMapEnd();
9681
                }
9682
              } else { 
9683
                TProtocolUtil.skip(iprot, field.type);
9684
              }
9685
              break;
9686
            case PE:
9687
              if (field.type == TType.STRUCT) {
9688
                this.pe = new PaymentException();
9689
                this.pe.read(iprot);
9690
              } else { 
9691
                TProtocolUtil.skip(iprot, field.type);
9692
              }
9693
              break;
9694
          }
9695
          iprot.readFieldEnd();
9696
        }
9697
      }
9698
      iprot.readStructEnd();
9699
      validate();
9700
    }
9701
 
9702
    public void write(TProtocol oprot) throws TException {
9703
      oprot.writeStructBegin(STRUCT_DESC);
9704
 
9705
      if (this.isSetSuccess()) {
9706
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9707
        {
9708
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.success.size()));
2747 chandransh 9709
          for (Map.Entry<String, String> _iter41 : this.success.entrySet())
2708 chandransh 9710
          {
2747 chandransh 9711
            oprot.writeString(_iter41.getKey());
9712
            oprot.writeString(_iter41.getValue());
2708 chandransh 9713
          }
9714
          oprot.writeMapEnd();
9715
        }
9716
        oprot.writeFieldEnd();
9717
      } else if (this.isSetPe()) {
9718
        oprot.writeFieldBegin(PE_FIELD_DESC);
9719
        this.pe.write(oprot);
9720
        oprot.writeFieldEnd();
9721
      }
9722
      oprot.writeFieldStop();
9723
      oprot.writeStructEnd();
9724
    }
9725
 
9726
    @Override
9727
    public String toString() {
3010 chandransh 9728
      StringBuilder sb = new StringBuilder("captureHdfcPayment_result(");
2708 chandransh 9729
      boolean first = true;
9730
 
9731
      sb.append("success:");
9732
      if (this.success == null) {
9733
        sb.append("null");
9734
      } else {
9735
        sb.append(this.success);
9736
      }
9737
      first = false;
9738
      if (!first) sb.append(", ");
9739
      sb.append("pe:");
9740
      if (this.pe == null) {
9741
        sb.append("null");
9742
      } else {
9743
        sb.append(this.pe);
9744
      }
9745
      first = false;
9746
      sb.append(")");
9747
      return sb.toString();
9748
    }
9749
 
9750
    public void validate() throws TException {
9751
      // check for required fields
9752
    }
9753
 
9754
  }
9755
 
3010 chandransh 9756
  public static class initializeHdfcPayment_args implements TBase<initializeHdfcPayment_args._Fields>, java.io.Serializable, Cloneable, Comparable<initializeHdfcPayment_args>   {
9757
    private static final TStruct STRUCT_DESC = new TStruct("initializeHdfcPayment_args");
2462 chandransh 9758
 
9759
    private static final TField MERCHANT_PAYMENT_ID_FIELD_DESC = new TField("merchantPaymentId", TType.I64, (short)1);
9760
 
9761
    private long merchantPaymentId;
9762
 
9763
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9764
    public enum _Fields implements TFieldIdEnum {
9765
      MERCHANT_PAYMENT_ID((short)1, "merchantPaymentId");
9766
 
9767
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9768
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9769
 
9770
      static {
9771
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9772
          byId.put((int)field._thriftId, field);
9773
          byName.put(field.getFieldName(), field);
9774
        }
9775
      }
9776
 
9777
      /**
9778
       * Find the _Fields constant that matches fieldId, or null if its not found.
9779
       */
9780
      public static _Fields findByThriftId(int fieldId) {
9781
        return byId.get(fieldId);
9782
      }
9783
 
9784
      /**
9785
       * Find the _Fields constant that matches fieldId, throwing an exception
9786
       * if it is not found.
9787
       */
9788
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9789
        _Fields fields = findByThriftId(fieldId);
9790
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9791
        return fields;
9792
      }
9793
 
9794
      /**
9795
       * Find the _Fields constant that matches name, or null if its not found.
9796
       */
9797
      public static _Fields findByName(String name) {
9798
        return byName.get(name);
9799
      }
9800
 
9801
      private final short _thriftId;
9802
      private final String _fieldName;
9803
 
9804
      _Fields(short thriftId, String fieldName) {
9805
        _thriftId = thriftId;
9806
        _fieldName = fieldName;
9807
      }
9808
 
9809
      public short getThriftFieldId() {
9810
        return _thriftId;
9811
      }
9812
 
9813
      public String getFieldName() {
9814
        return _fieldName;
9815
      }
9816
    }
9817
 
9818
    // isset id assignments
9819
    private static final int __MERCHANTPAYMENTID_ISSET_ID = 0;
9820
    private BitSet __isset_bit_vector = new BitSet(1);
9821
 
9822
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9823
      put(_Fields.MERCHANT_PAYMENT_ID, new FieldMetaData("merchantPaymentId", TFieldRequirementType.DEFAULT, 
9824
          new FieldValueMetaData(TType.I64)));
9825
    }});
9826
 
9827
    static {
3010 chandransh 9828
      FieldMetaData.addStructMetaDataMap(initializeHdfcPayment_args.class, metaDataMap);
2462 chandransh 9829
    }
9830
 
3010 chandransh 9831
    public initializeHdfcPayment_args() {
2462 chandransh 9832
    }
9833
 
3010 chandransh 9834
    public initializeHdfcPayment_args(
2462 chandransh 9835
      long merchantPaymentId)
9836
    {
9837
      this();
9838
      this.merchantPaymentId = merchantPaymentId;
9839
      setMerchantPaymentIdIsSet(true);
9840
    }
9841
 
9842
    /**
9843
     * Performs a deep copy on <i>other</i>.
9844
     */
3010 chandransh 9845
    public initializeHdfcPayment_args(initializeHdfcPayment_args other) {
2462 chandransh 9846
      __isset_bit_vector.clear();
9847
      __isset_bit_vector.or(other.__isset_bit_vector);
9848
      this.merchantPaymentId = other.merchantPaymentId;
9849
    }
9850
 
3010 chandransh 9851
    public initializeHdfcPayment_args deepCopy() {
9852
      return new initializeHdfcPayment_args(this);
2462 chandransh 9853
    }
9854
 
9855
    @Deprecated
3010 chandransh 9856
    public initializeHdfcPayment_args clone() {
9857
      return new initializeHdfcPayment_args(this);
2462 chandransh 9858
    }
9859
 
9860
    public long getMerchantPaymentId() {
9861
      return this.merchantPaymentId;
9862
    }
9863
 
3010 chandransh 9864
    public initializeHdfcPayment_args setMerchantPaymentId(long merchantPaymentId) {
2462 chandransh 9865
      this.merchantPaymentId = merchantPaymentId;
9866
      setMerchantPaymentIdIsSet(true);
9867
      return this;
9868
    }
9869
 
9870
    public void unsetMerchantPaymentId() {
9871
      __isset_bit_vector.clear(__MERCHANTPAYMENTID_ISSET_ID);
9872
    }
9873
 
9874
    /** Returns true if field merchantPaymentId is set (has been asigned a value) and false otherwise */
9875
    public boolean isSetMerchantPaymentId() {
9876
      return __isset_bit_vector.get(__MERCHANTPAYMENTID_ISSET_ID);
9877
    }
9878
 
9879
    public void setMerchantPaymentIdIsSet(boolean value) {
9880
      __isset_bit_vector.set(__MERCHANTPAYMENTID_ISSET_ID, value);
9881
    }
9882
 
9883
    public void setFieldValue(_Fields field, Object value) {
9884
      switch (field) {
9885
      case MERCHANT_PAYMENT_ID:
9886
        if (value == null) {
9887
          unsetMerchantPaymentId();
9888
        } else {
9889
          setMerchantPaymentId((Long)value);
9890
        }
9891
        break;
9892
 
9893
      }
9894
    }
9895
 
9896
    public void setFieldValue(int fieldID, Object value) {
9897
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9898
    }
9899
 
9900
    public Object getFieldValue(_Fields field) {
9901
      switch (field) {
9902
      case MERCHANT_PAYMENT_ID:
9903
        return new Long(getMerchantPaymentId());
9904
 
9905
      }
9906
      throw new IllegalStateException();
9907
    }
9908
 
9909
    public Object getFieldValue(int fieldId) {
9910
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9911
    }
9912
 
9913
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9914
    public boolean isSet(_Fields field) {
9915
      switch (field) {
9916
      case MERCHANT_PAYMENT_ID:
9917
        return isSetMerchantPaymentId();
9918
      }
9919
      throw new IllegalStateException();
9920
    }
9921
 
9922
    public boolean isSet(int fieldID) {
9923
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9924
    }
9925
 
9926
    @Override
9927
    public boolean equals(Object that) {
9928
      if (that == null)
9929
        return false;
3010 chandransh 9930
      if (that instanceof initializeHdfcPayment_args)
9931
        return this.equals((initializeHdfcPayment_args)that);
2462 chandransh 9932
      return false;
9933
    }
9934
 
3010 chandransh 9935
    public boolean equals(initializeHdfcPayment_args that) {
2462 chandransh 9936
      if (that == null)
9937
        return false;
9938
 
9939
      boolean this_present_merchantPaymentId = true;
9940
      boolean that_present_merchantPaymentId = true;
9941
      if (this_present_merchantPaymentId || that_present_merchantPaymentId) {
9942
        if (!(this_present_merchantPaymentId && that_present_merchantPaymentId))
9943
          return false;
9944
        if (this.merchantPaymentId != that.merchantPaymentId)
9945
          return false;
9946
      }
9947
 
9948
      return true;
9949
    }
9950
 
9951
    @Override
9952
    public int hashCode() {
9953
      return 0;
9954
    }
9955
 
3010 chandransh 9956
    public int compareTo(initializeHdfcPayment_args other) {
2462 chandransh 9957
      if (!getClass().equals(other.getClass())) {
9958
        return getClass().getName().compareTo(other.getClass().getName());
9959
      }
9960
 
9961
      int lastComparison = 0;
3010 chandransh 9962
      initializeHdfcPayment_args typedOther = (initializeHdfcPayment_args)other;
2462 chandransh 9963
 
9964
      lastComparison = Boolean.valueOf(isSetMerchantPaymentId()).compareTo(isSetMerchantPaymentId());
9965
      if (lastComparison != 0) {
9966
        return lastComparison;
9967
      }
9968
      lastComparison = TBaseHelper.compareTo(merchantPaymentId, typedOther.merchantPaymentId);
9969
      if (lastComparison != 0) {
9970
        return lastComparison;
9971
      }
9972
      return 0;
9973
    }
9974
 
9975
    public void read(TProtocol iprot) throws TException {
9976
      TField field;
9977
      iprot.readStructBegin();
9978
      while (true)
9979
      {
9980
        field = iprot.readFieldBegin();
9981
        if (field.type == TType.STOP) { 
9982
          break;
9983
        }
9984
        _Fields fieldId = _Fields.findByThriftId(field.id);
9985
        if (fieldId == null) {
9986
          TProtocolUtil.skip(iprot, field.type);
9987
        } else {
9988
          switch (fieldId) {
9989
            case MERCHANT_PAYMENT_ID:
9990
              if (field.type == TType.I64) {
9991
                this.merchantPaymentId = iprot.readI64();
9992
                setMerchantPaymentIdIsSet(true);
9993
              } else { 
9994
                TProtocolUtil.skip(iprot, field.type);
9995
              }
9996
              break;
9997
          }
9998
          iprot.readFieldEnd();
9999
        }
10000
      }
10001
      iprot.readStructEnd();
10002
      validate();
10003
    }
10004
 
10005
    public void write(TProtocol oprot) throws TException {
10006
      validate();
10007
 
10008
      oprot.writeStructBegin(STRUCT_DESC);
10009
      oprot.writeFieldBegin(MERCHANT_PAYMENT_ID_FIELD_DESC);
10010
      oprot.writeI64(this.merchantPaymentId);
10011
      oprot.writeFieldEnd();
10012
      oprot.writeFieldStop();
10013
      oprot.writeStructEnd();
10014
    }
10015
 
10016
    @Override
10017
    public String toString() {
3010 chandransh 10018
      StringBuilder sb = new StringBuilder("initializeHdfcPayment_args(");
2462 chandransh 10019
      boolean first = true;
10020
 
10021
      sb.append("merchantPaymentId:");
10022
      sb.append(this.merchantPaymentId);
10023
      first = false;
10024
      sb.append(")");
10025
      return sb.toString();
10026
    }
10027
 
10028
    public void validate() throws TException {
10029
      // check for required fields
10030
    }
10031
 
10032
  }
10033
 
3010 chandransh 10034
  public static class initializeHdfcPayment_result implements TBase<initializeHdfcPayment_result._Fields>, java.io.Serializable, Cloneable, Comparable<initializeHdfcPayment_result>   {
10035
    private static final TStruct STRUCT_DESC = new TStruct("initializeHdfcPayment_result");
2462 chandransh 10036
 
3010 chandransh 10037
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
2462 chandransh 10038
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
10039
 
3010 chandransh 10040
    private String success;
2462 chandransh 10041
    private PaymentException pe;
10042
 
10043
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10044
    public enum _Fields implements TFieldIdEnum {
10045
      SUCCESS((short)0, "success"),
10046
      PE((short)1, "pe");
10047
 
10048
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10049
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10050
 
10051
      static {
10052
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10053
          byId.put((int)field._thriftId, field);
10054
          byName.put(field.getFieldName(), field);
10055
        }
10056
      }
10057
 
10058
      /**
10059
       * Find the _Fields constant that matches fieldId, or null if its not found.
10060
       */
10061
      public static _Fields findByThriftId(int fieldId) {
10062
        return byId.get(fieldId);
10063
      }
10064
 
10065
      /**
10066
       * Find the _Fields constant that matches fieldId, throwing an exception
10067
       * if it is not found.
10068
       */
10069
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10070
        _Fields fields = findByThriftId(fieldId);
10071
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10072
        return fields;
10073
      }
10074
 
10075
      /**
10076
       * Find the _Fields constant that matches name, or null if its not found.
10077
       */
10078
      public static _Fields findByName(String name) {
10079
        return byName.get(name);
10080
      }
10081
 
10082
      private final short _thriftId;
10083
      private final String _fieldName;
10084
 
10085
      _Fields(short thriftId, String fieldName) {
10086
        _thriftId = thriftId;
10087
        _fieldName = fieldName;
10088
      }
10089
 
10090
      public short getThriftFieldId() {
10091
        return _thriftId;
10092
      }
10093
 
10094
      public String getFieldName() {
10095
        return _fieldName;
10096
      }
10097
    }
10098
 
10099
    // isset id assignments
10100
 
10101
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10102
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3010 chandransh 10103
          new FieldValueMetaData(TType.STRING)));
2462 chandransh 10104
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
10105
          new FieldValueMetaData(TType.STRUCT)));
10106
    }});
10107
 
10108
    static {
3010 chandransh 10109
      FieldMetaData.addStructMetaDataMap(initializeHdfcPayment_result.class, metaDataMap);
2462 chandransh 10110
    }
10111
 
3010 chandransh 10112
    public initializeHdfcPayment_result() {
2462 chandransh 10113
    }
10114
 
3010 chandransh 10115
    public initializeHdfcPayment_result(
10116
      String success,
2462 chandransh 10117
      PaymentException pe)
10118
    {
10119
      this();
10120
      this.success = success;
10121
      this.pe = pe;
10122
    }
10123
 
10124
    /**
10125
     * Performs a deep copy on <i>other</i>.
10126
     */
3010 chandransh 10127
    public initializeHdfcPayment_result(initializeHdfcPayment_result other) {
2462 chandransh 10128
      if (other.isSetSuccess()) {
3010 chandransh 10129
        this.success = other.success;
2462 chandransh 10130
      }
10131
      if (other.isSetPe()) {
10132
        this.pe = new PaymentException(other.pe);
10133
      }
10134
    }
10135
 
3010 chandransh 10136
    public initializeHdfcPayment_result deepCopy() {
10137
      return new initializeHdfcPayment_result(this);
2462 chandransh 10138
    }
10139
 
10140
    @Deprecated
3010 chandransh 10141
    public initializeHdfcPayment_result clone() {
10142
      return new initializeHdfcPayment_result(this);
2462 chandransh 10143
    }
10144
 
3010 chandransh 10145
    public String getSuccess() {
2462 chandransh 10146
      return this.success;
10147
    }
10148
 
3010 chandransh 10149
    public initializeHdfcPayment_result setSuccess(String success) {
2462 chandransh 10150
      this.success = success;
10151
      return this;
10152
    }
10153
 
10154
    public void unsetSuccess() {
10155
      this.success = null;
10156
    }
10157
 
10158
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10159
    public boolean isSetSuccess() {
10160
      return this.success != null;
10161
    }
10162
 
10163
    public void setSuccessIsSet(boolean value) {
10164
      if (!value) {
10165
        this.success = null;
10166
      }
10167
    }
10168
 
10169
    public PaymentException getPe() {
10170
      return this.pe;
10171
    }
10172
 
3010 chandransh 10173
    public initializeHdfcPayment_result setPe(PaymentException pe) {
2462 chandransh 10174
      this.pe = pe;
10175
      return this;
10176
    }
10177
 
10178
    public void unsetPe() {
10179
      this.pe = null;
10180
    }
10181
 
10182
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
10183
    public boolean isSetPe() {
10184
      return this.pe != null;
10185
    }
10186
 
10187
    public void setPeIsSet(boolean value) {
10188
      if (!value) {
10189
        this.pe = null;
10190
      }
10191
    }
10192
 
10193
    public void setFieldValue(_Fields field, Object value) {
10194
      switch (field) {
10195
      case SUCCESS:
10196
        if (value == null) {
10197
          unsetSuccess();
10198
        } else {
3010 chandransh 10199
          setSuccess((String)value);
2462 chandransh 10200
        }
10201
        break;
10202
 
10203
      case PE:
10204
        if (value == null) {
10205
          unsetPe();
10206
        } else {
10207
          setPe((PaymentException)value);
10208
        }
10209
        break;
10210
 
10211
      }
10212
    }
10213
 
10214
    public void setFieldValue(int fieldID, Object value) {
10215
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10216
    }
10217
 
10218
    public Object getFieldValue(_Fields field) {
10219
      switch (field) {
10220
      case SUCCESS:
10221
        return getSuccess();
10222
 
10223
      case PE:
10224
        return getPe();
10225
 
10226
      }
10227
      throw new IllegalStateException();
10228
    }
10229
 
10230
    public Object getFieldValue(int fieldId) {
10231
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10232
    }
10233
 
10234
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10235
    public boolean isSet(_Fields field) {
10236
      switch (field) {
10237
      case SUCCESS:
10238
        return isSetSuccess();
10239
      case PE:
10240
        return isSetPe();
10241
      }
10242
      throw new IllegalStateException();
10243
    }
10244
 
10245
    public boolean isSet(int fieldID) {
10246
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10247
    }
10248
 
10249
    @Override
10250
    public boolean equals(Object that) {
10251
      if (that == null)
10252
        return false;
3010 chandransh 10253
      if (that instanceof initializeHdfcPayment_result)
10254
        return this.equals((initializeHdfcPayment_result)that);
2462 chandransh 10255
      return false;
10256
    }
10257
 
3010 chandransh 10258
    public boolean equals(initializeHdfcPayment_result that) {
2462 chandransh 10259
      if (that == null)
10260
        return false;
10261
 
10262
      boolean this_present_success = true && this.isSetSuccess();
10263
      boolean that_present_success = true && that.isSetSuccess();
10264
      if (this_present_success || that_present_success) {
10265
        if (!(this_present_success && that_present_success))
10266
          return false;
10267
        if (!this.success.equals(that.success))
10268
          return false;
10269
      }
10270
 
10271
      boolean this_present_pe = true && this.isSetPe();
10272
      boolean that_present_pe = true && that.isSetPe();
10273
      if (this_present_pe || that_present_pe) {
10274
        if (!(this_present_pe && that_present_pe))
10275
          return false;
10276
        if (!this.pe.equals(that.pe))
10277
          return false;
10278
      }
10279
 
10280
      return true;
10281
    }
10282
 
10283
    @Override
10284
    public int hashCode() {
10285
      return 0;
10286
    }
10287
 
3010 chandransh 10288
    public int compareTo(initializeHdfcPayment_result other) {
10289
      if (!getClass().equals(other.getClass())) {
10290
        return getClass().getName().compareTo(other.getClass().getName());
10291
      }
10292
 
10293
      int lastComparison = 0;
10294
      initializeHdfcPayment_result typedOther = (initializeHdfcPayment_result)other;
10295
 
10296
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10297
      if (lastComparison != 0) {
10298
        return lastComparison;
10299
      }
10300
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10301
      if (lastComparison != 0) {
10302
        return lastComparison;
10303
      }
10304
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());
10305
      if (lastComparison != 0) {
10306
        return lastComparison;
10307
      }
10308
      lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);
10309
      if (lastComparison != 0) {
10310
        return lastComparison;
10311
      }
10312
      return 0;
10313
    }
10314
 
2462 chandransh 10315
    public void read(TProtocol iprot) throws TException {
10316
      TField field;
10317
      iprot.readStructBegin();
10318
      while (true)
10319
      {
10320
        field = iprot.readFieldBegin();
10321
        if (field.type == TType.STOP) { 
10322
          break;
10323
        }
10324
        _Fields fieldId = _Fields.findByThriftId(field.id);
10325
        if (fieldId == null) {
10326
          TProtocolUtil.skip(iprot, field.type);
10327
        } else {
10328
          switch (fieldId) {
10329
            case SUCCESS:
3010 chandransh 10330
              if (field.type == TType.STRING) {
10331
                this.success = iprot.readString();
2462 chandransh 10332
              } else { 
10333
                TProtocolUtil.skip(iprot, field.type);
10334
              }
10335
              break;
10336
            case PE:
10337
              if (field.type == TType.STRUCT) {
10338
                this.pe = new PaymentException();
10339
                this.pe.read(iprot);
10340
              } else { 
10341
                TProtocolUtil.skip(iprot, field.type);
10342
              }
10343
              break;
10344
          }
10345
          iprot.readFieldEnd();
10346
        }
10347
      }
10348
      iprot.readStructEnd();
10349
      validate();
10350
    }
10351
 
10352
    public void write(TProtocol oprot) throws TException {
10353
      oprot.writeStructBegin(STRUCT_DESC);
10354
 
10355
      if (this.isSetSuccess()) {
10356
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3010 chandransh 10357
        oprot.writeString(this.success);
2462 chandransh 10358
        oprot.writeFieldEnd();
10359
      } else if (this.isSetPe()) {
10360
        oprot.writeFieldBegin(PE_FIELD_DESC);
10361
        this.pe.write(oprot);
10362
        oprot.writeFieldEnd();
10363
      }
10364
      oprot.writeFieldStop();
10365
      oprot.writeStructEnd();
10366
    }
10367
 
10368
    @Override
10369
    public String toString() {
3010 chandransh 10370
      StringBuilder sb = new StringBuilder("initializeHdfcPayment_result(");
2462 chandransh 10371
      boolean first = true;
10372
 
10373
      sb.append("success:");
10374
      if (this.success == null) {
10375
        sb.append("null");
10376
      } else {
10377
        sb.append(this.success);
10378
      }
10379
      first = false;
10380
      if (!first) sb.append(", ");
10381
      sb.append("pe:");
10382
      if (this.pe == null) {
10383
        sb.append("null");
10384
      } else {
10385
        sb.append(this.pe);
10386
      }
10387
      first = false;
10388
      sb.append(")");
10389
      return sb.toString();
10390
    }
10391
 
10392
    public void validate() throws TException {
10393
      // check for required fields
10394
    }
10395
 
10396
  }
10397
 
3010 chandransh 10398
  public static class createRefund_args implements TBase<createRefund_args._Fields>, java.io.Serializable, Cloneable, Comparable<createRefund_args>   {
10399
    private static final TStruct STRUCT_DESC = new TStruct("createRefund_args");
2462 chandransh 10400
 
3010 chandransh 10401
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
10402
    private static final TField MERCHANT_TXN_ID_FIELD_DESC = new TField("merchantTxnId", TType.I64, (short)2);
10403
    private static final TField AMOUNT_FIELD_DESC = new TField("amount", TType.DOUBLE, (short)3);
2462 chandransh 10404
 
3010 chandransh 10405
    private long orderId;
10406
    private long merchantTxnId;
10407
    private double amount;
2462 chandransh 10408
 
10409
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10410
    public enum _Fields implements TFieldIdEnum {
3010 chandransh 10411
      ORDER_ID((short)1, "orderId"),
10412
      MERCHANT_TXN_ID((short)2, "merchantTxnId"),
10413
      AMOUNT((short)3, "amount");
2462 chandransh 10414
 
10415
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10416
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10417
 
10418
      static {
10419
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10420
          byId.put((int)field._thriftId, field);
10421
          byName.put(field.getFieldName(), field);
10422
        }
10423
      }
10424
 
10425
      /**
10426
       * Find the _Fields constant that matches fieldId, or null if its not found.
10427
       */
10428
      public static _Fields findByThriftId(int fieldId) {
10429
        return byId.get(fieldId);
10430
      }
10431
 
10432
      /**
10433
       * Find the _Fields constant that matches fieldId, throwing an exception
10434
       * if it is not found.
10435
       */
10436
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10437
        _Fields fields = findByThriftId(fieldId);
10438
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10439
        return fields;
10440
      }
10441
 
10442
      /**
10443
       * Find the _Fields constant that matches name, or null if its not found.
10444
       */
10445
      public static _Fields findByName(String name) {
10446
        return byName.get(name);
10447
      }
10448
 
10449
      private final short _thriftId;
10450
      private final String _fieldName;
10451
 
10452
      _Fields(short thriftId, String fieldName) {
10453
        _thriftId = thriftId;
10454
        _fieldName = fieldName;
10455
      }
10456
 
10457
      public short getThriftFieldId() {
10458
        return _thriftId;
10459
      }
10460
 
10461
      public String getFieldName() {
10462
        return _fieldName;
10463
      }
10464
    }
10465
 
10466
    // isset id assignments
3010 chandransh 10467
    private static final int __ORDERID_ISSET_ID = 0;
10468
    private static final int __MERCHANTTXNID_ISSET_ID = 1;
10469
    private static final int __AMOUNT_ISSET_ID = 2;
10470
    private BitSet __isset_bit_vector = new BitSet(3);
2462 chandransh 10471
 
10472
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3010 chandransh 10473
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
2462 chandransh 10474
          new FieldValueMetaData(TType.I64)));
3010 chandransh 10475
      put(_Fields.MERCHANT_TXN_ID, new FieldMetaData("merchantTxnId", TFieldRequirementType.DEFAULT, 
10476
          new FieldValueMetaData(TType.I64)));
10477
      put(_Fields.AMOUNT, new FieldMetaData("amount", TFieldRequirementType.DEFAULT, 
10478
          new FieldValueMetaData(TType.DOUBLE)));
2462 chandransh 10479
    }});
10480
 
10481
    static {
3010 chandransh 10482
      FieldMetaData.addStructMetaDataMap(createRefund_args.class, metaDataMap);
2462 chandransh 10483
    }
10484
 
3010 chandransh 10485
    public createRefund_args() {
2462 chandransh 10486
    }
10487
 
3010 chandransh 10488
    public createRefund_args(
10489
      long orderId,
10490
      long merchantTxnId,
10491
      double amount)
2462 chandransh 10492
    {
10493
      this();
3010 chandransh 10494
      this.orderId = orderId;
10495
      setOrderIdIsSet(true);
10496
      this.merchantTxnId = merchantTxnId;
10497
      setMerchantTxnIdIsSet(true);
10498
      this.amount = amount;
10499
      setAmountIsSet(true);
2462 chandransh 10500
    }
10501
 
10502
    /**
10503
     * Performs a deep copy on <i>other</i>.
10504
     */
3010 chandransh 10505
    public createRefund_args(createRefund_args other) {
2462 chandransh 10506
      __isset_bit_vector.clear();
10507
      __isset_bit_vector.or(other.__isset_bit_vector);
3010 chandransh 10508
      this.orderId = other.orderId;
10509
      this.merchantTxnId = other.merchantTxnId;
10510
      this.amount = other.amount;
2462 chandransh 10511
    }
10512
 
3010 chandransh 10513
    public createRefund_args deepCopy() {
10514
      return new createRefund_args(this);
2462 chandransh 10515
    }
10516
 
10517
    @Deprecated
3010 chandransh 10518
    public createRefund_args clone() {
10519
      return new createRefund_args(this);
2462 chandransh 10520
    }
10521
 
3010 chandransh 10522
    public long getOrderId() {
10523
      return this.orderId;
2462 chandransh 10524
    }
10525
 
3010 chandransh 10526
    public createRefund_args setOrderId(long orderId) {
10527
      this.orderId = orderId;
10528
      setOrderIdIsSet(true);
2462 chandransh 10529
      return this;
10530
    }
10531
 
3010 chandransh 10532
    public void unsetOrderId() {
10533
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
2462 chandransh 10534
    }
10535
 
3010 chandransh 10536
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
10537
    public boolean isSetOrderId() {
10538
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
2462 chandransh 10539
    }
10540
 
3010 chandransh 10541
    public void setOrderIdIsSet(boolean value) {
10542
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
2462 chandransh 10543
    }
10544
 
3010 chandransh 10545
    public long getMerchantTxnId() {
10546
      return this.merchantTxnId;
10547
    }
10548
 
10549
    public createRefund_args setMerchantTxnId(long merchantTxnId) {
10550
      this.merchantTxnId = merchantTxnId;
10551
      setMerchantTxnIdIsSet(true);
10552
      return this;
10553
    }
10554
 
10555
    public void unsetMerchantTxnId() {
10556
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
10557
    }
10558
 
10559
    /** Returns true if field merchantTxnId is set (has been asigned a value) and false otherwise */
10560
    public boolean isSetMerchantTxnId() {
10561
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
10562
    }
10563
 
10564
    public void setMerchantTxnIdIsSet(boolean value) {
10565
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
10566
    }
10567
 
10568
    public double getAmount() {
10569
      return this.amount;
10570
    }
10571
 
10572
    public createRefund_args setAmount(double amount) {
10573
      this.amount = amount;
10574
      setAmountIsSet(true);
10575
      return this;
10576
    }
10577
 
10578
    public void unsetAmount() {
10579
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
10580
    }
10581
 
10582
    /** Returns true if field amount is set (has been asigned a value) and false otherwise */
10583
    public boolean isSetAmount() {
10584
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
10585
    }
10586
 
10587
    public void setAmountIsSet(boolean value) {
10588
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
10589
    }
10590
 
2462 chandransh 10591
    public void setFieldValue(_Fields field, Object value) {
10592
      switch (field) {
3010 chandransh 10593
      case ORDER_ID:
2462 chandransh 10594
        if (value == null) {
3010 chandransh 10595
          unsetOrderId();
2462 chandransh 10596
        } else {
3010 chandransh 10597
          setOrderId((Long)value);
2462 chandransh 10598
        }
10599
        break;
10600
 
3010 chandransh 10601
      case MERCHANT_TXN_ID:
10602
        if (value == null) {
10603
          unsetMerchantTxnId();
10604
        } else {
10605
          setMerchantTxnId((Long)value);
10606
        }
10607
        break;
10608
 
10609
      case AMOUNT:
10610
        if (value == null) {
10611
          unsetAmount();
10612
        } else {
10613
          setAmount((Double)value);
10614
        }
10615
        break;
10616
 
2462 chandransh 10617
      }
10618
    }
10619
 
10620
    public void setFieldValue(int fieldID, Object value) {
10621
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10622
    }
10623
 
10624
    public Object getFieldValue(_Fields field) {
10625
      switch (field) {
3010 chandransh 10626
      case ORDER_ID:
10627
        return new Long(getOrderId());
2462 chandransh 10628
 
3010 chandransh 10629
      case MERCHANT_TXN_ID:
10630
        return new Long(getMerchantTxnId());
10631
 
10632
      case AMOUNT:
10633
        return new Double(getAmount());
10634
 
2462 chandransh 10635
      }
10636
      throw new IllegalStateException();
10637
    }
10638
 
10639
    public Object getFieldValue(int fieldId) {
10640
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10641
    }
10642
 
10643
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10644
    public boolean isSet(_Fields field) {
10645
      switch (field) {
3010 chandransh 10646
      case ORDER_ID:
10647
        return isSetOrderId();
10648
      case MERCHANT_TXN_ID:
10649
        return isSetMerchantTxnId();
10650
      case AMOUNT:
10651
        return isSetAmount();
2462 chandransh 10652
      }
10653
      throw new IllegalStateException();
10654
    }
10655
 
10656
    public boolean isSet(int fieldID) {
10657
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10658
    }
10659
 
10660
    @Override
10661
    public boolean equals(Object that) {
10662
      if (that == null)
10663
        return false;
3010 chandransh 10664
      if (that instanceof createRefund_args)
10665
        return this.equals((createRefund_args)that);
2462 chandransh 10666
      return false;
10667
    }
10668
 
3010 chandransh 10669
    public boolean equals(createRefund_args that) {
2462 chandransh 10670
      if (that == null)
10671
        return false;
10672
 
3010 chandransh 10673
      boolean this_present_orderId = true;
10674
      boolean that_present_orderId = true;
10675
      if (this_present_orderId || that_present_orderId) {
10676
        if (!(this_present_orderId && that_present_orderId))
2462 chandransh 10677
          return false;
3010 chandransh 10678
        if (this.orderId != that.orderId)
2462 chandransh 10679
          return false;
10680
      }
10681
 
3010 chandransh 10682
      boolean this_present_merchantTxnId = true;
10683
      boolean that_present_merchantTxnId = true;
10684
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
10685
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
10686
          return false;
10687
        if (this.merchantTxnId != that.merchantTxnId)
10688
          return false;
10689
      }
10690
 
10691
      boolean this_present_amount = true;
10692
      boolean that_present_amount = true;
10693
      if (this_present_amount || that_present_amount) {
10694
        if (!(this_present_amount && that_present_amount))
10695
          return false;
10696
        if (this.amount != that.amount)
10697
          return false;
10698
      }
10699
 
2462 chandransh 10700
      return true;
10701
    }
10702
 
10703
    @Override
10704
    public int hashCode() {
10705
      return 0;
10706
    }
10707
 
3010 chandransh 10708
    public int compareTo(createRefund_args other) {
2462 chandransh 10709
      if (!getClass().equals(other.getClass())) {
10710
        return getClass().getName().compareTo(other.getClass().getName());
10711
      }
10712
 
10713
      int lastComparison = 0;
3010 chandransh 10714
      createRefund_args typedOther = (createRefund_args)other;
2462 chandransh 10715
 
3010 chandransh 10716
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
2462 chandransh 10717
      if (lastComparison != 0) {
10718
        return lastComparison;
10719
      }
3010 chandransh 10720
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
2462 chandransh 10721
      if (lastComparison != 0) {
10722
        return lastComparison;
10723
      }
3010 chandransh 10724
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(isSetMerchantTxnId());
10725
      if (lastComparison != 0) {
10726
        return lastComparison;
10727
      }
10728
      lastComparison = TBaseHelper.compareTo(merchantTxnId, typedOther.merchantTxnId);
10729
      if (lastComparison != 0) {
10730
        return lastComparison;
10731
      }
10732
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(isSetAmount());
10733
      if (lastComparison != 0) {
10734
        return lastComparison;
10735
      }
10736
      lastComparison = TBaseHelper.compareTo(amount, typedOther.amount);
10737
      if (lastComparison != 0) {
10738
        return lastComparison;
10739
      }
2462 chandransh 10740
      return 0;
10741
    }
10742
 
10743
    public void read(TProtocol iprot) throws TException {
10744
      TField field;
10745
      iprot.readStructBegin();
10746
      while (true)
10747
      {
10748
        field = iprot.readFieldBegin();
10749
        if (field.type == TType.STOP) { 
10750
          break;
10751
        }
10752
        _Fields fieldId = _Fields.findByThriftId(field.id);
10753
        if (fieldId == null) {
10754
          TProtocolUtil.skip(iprot, field.type);
10755
        } else {
10756
          switch (fieldId) {
3010 chandransh 10757
            case ORDER_ID:
2462 chandransh 10758
              if (field.type == TType.I64) {
3010 chandransh 10759
                this.orderId = iprot.readI64();
10760
                setOrderIdIsSet(true);
2462 chandransh 10761
              } else { 
10762
                TProtocolUtil.skip(iprot, field.type);
10763
              }
10764
              break;
3010 chandransh 10765
            case MERCHANT_TXN_ID:
10766
              if (field.type == TType.I64) {
10767
                this.merchantTxnId = iprot.readI64();
10768
                setMerchantTxnIdIsSet(true);
10769
              } else { 
10770
                TProtocolUtil.skip(iprot, field.type);
10771
              }
10772
              break;
10773
            case AMOUNT:
10774
              if (field.type == TType.DOUBLE) {
10775
                this.amount = iprot.readDouble();
10776
                setAmountIsSet(true);
10777
              } else { 
10778
                TProtocolUtil.skip(iprot, field.type);
10779
              }
10780
              break;
2462 chandransh 10781
          }
10782
          iprot.readFieldEnd();
10783
        }
10784
      }
10785
      iprot.readStructEnd();
10786
      validate();
10787
    }
10788
 
10789
    public void write(TProtocol oprot) throws TException {
10790
      validate();
10791
 
10792
      oprot.writeStructBegin(STRUCT_DESC);
3010 chandransh 10793
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
10794
      oprot.writeI64(this.orderId);
2462 chandransh 10795
      oprot.writeFieldEnd();
3010 chandransh 10796
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
10797
      oprot.writeI64(this.merchantTxnId);
10798
      oprot.writeFieldEnd();
10799
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
10800
      oprot.writeDouble(this.amount);
10801
      oprot.writeFieldEnd();
2462 chandransh 10802
      oprot.writeFieldStop();
10803
      oprot.writeStructEnd();
10804
    }
10805
 
10806
    @Override
10807
    public String toString() {
3010 chandransh 10808
      StringBuilder sb = new StringBuilder("createRefund_args(");
2462 chandransh 10809
      boolean first = true;
10810
 
3010 chandransh 10811
      sb.append("orderId:");
10812
      sb.append(this.orderId);
2462 chandransh 10813
      first = false;
3010 chandransh 10814
      if (!first) sb.append(", ");
10815
      sb.append("merchantTxnId:");
10816
      sb.append(this.merchantTxnId);
10817
      first = false;
10818
      if (!first) sb.append(", ");
10819
      sb.append("amount:");
10820
      sb.append(this.amount);
10821
      first = false;
2462 chandransh 10822
      sb.append(")");
10823
      return sb.toString();
10824
    }
10825
 
10826
    public void validate() throws TException {
10827
      // check for required fields
10828
    }
10829
 
10830
  }
10831
 
3010 chandransh 10832
  public static class createRefund_result implements TBase<createRefund_result._Fields>, java.io.Serializable, Cloneable, Comparable<createRefund_result>   {
10833
    private static final TStruct STRUCT_DESC = new TStruct("createRefund_result");
2462 chandransh 10834
 
3010 chandransh 10835
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
2462 chandransh 10836
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
10837
 
3010 chandransh 10838
    private long success;
2462 chandransh 10839
    private PaymentException pe;
10840
 
10841
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10842
    public enum _Fields implements TFieldIdEnum {
10843
      SUCCESS((short)0, "success"),
10844
      PE((short)1, "pe");
10845
 
10846
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10847
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10848
 
10849
      static {
10850
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10851
          byId.put((int)field._thriftId, field);
10852
          byName.put(field.getFieldName(), field);
10853
        }
10854
      }
10855
 
10856
      /**
10857
       * Find the _Fields constant that matches fieldId, or null if its not found.
10858
       */
10859
      public static _Fields findByThriftId(int fieldId) {
10860
        return byId.get(fieldId);
10861
      }
10862
 
10863
      /**
10864
       * Find the _Fields constant that matches fieldId, throwing an exception
10865
       * if it is not found.
10866
       */
10867
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10868
        _Fields fields = findByThriftId(fieldId);
10869
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10870
        return fields;
10871
      }
10872
 
10873
      /**
10874
       * Find the _Fields constant that matches name, or null if its not found.
10875
       */
10876
      public static _Fields findByName(String name) {
10877
        return byName.get(name);
10878
      }
10879
 
10880
      private final short _thriftId;
10881
      private final String _fieldName;
10882
 
10883
      _Fields(short thriftId, String fieldName) {
10884
        _thriftId = thriftId;
10885
        _fieldName = fieldName;
10886
      }
10887
 
10888
      public short getThriftFieldId() {
10889
        return _thriftId;
10890
      }
10891
 
10892
      public String getFieldName() {
10893
        return _fieldName;
10894
      }
10895
    }
10896
 
10897
    // isset id assignments
3010 chandransh 10898
    private static final int __SUCCESS_ISSET_ID = 0;
10899
    private BitSet __isset_bit_vector = new BitSet(1);
2462 chandransh 10900
 
10901
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10902
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3010 chandransh 10903
          new FieldValueMetaData(TType.I64)));
2462 chandransh 10904
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
10905
          new FieldValueMetaData(TType.STRUCT)));
10906
    }});
10907
 
10908
    static {
3010 chandransh 10909
      FieldMetaData.addStructMetaDataMap(createRefund_result.class, metaDataMap);
2462 chandransh 10910
    }
10911
 
3010 chandransh 10912
    public createRefund_result() {
2462 chandransh 10913
    }
10914
 
3010 chandransh 10915
    public createRefund_result(
10916
      long success,
2462 chandransh 10917
      PaymentException pe)
10918
    {
10919
      this();
10920
      this.success = success;
3010 chandransh 10921
      setSuccessIsSet(true);
2462 chandransh 10922
      this.pe = pe;
10923
    }
10924
 
10925
    /**
10926
     * Performs a deep copy on <i>other</i>.
10927
     */
3010 chandransh 10928
    public createRefund_result(createRefund_result other) {
10929
      __isset_bit_vector.clear();
10930
      __isset_bit_vector.or(other.__isset_bit_vector);
10931
      this.success = other.success;
2462 chandransh 10932
      if (other.isSetPe()) {
10933
        this.pe = new PaymentException(other.pe);
10934
      }
10935
    }
10936
 
3010 chandransh 10937
    public createRefund_result deepCopy() {
10938
      return new createRefund_result(this);
2462 chandransh 10939
    }
10940
 
10941
    @Deprecated
3010 chandransh 10942
    public createRefund_result clone() {
10943
      return new createRefund_result(this);
2462 chandransh 10944
    }
10945
 
3010 chandransh 10946
    public long getSuccess() {
2462 chandransh 10947
      return this.success;
10948
    }
10949
 
3010 chandransh 10950
    public createRefund_result setSuccess(long success) {
2462 chandransh 10951
      this.success = success;
3010 chandransh 10952
      setSuccessIsSet(true);
2462 chandransh 10953
      return this;
10954
    }
10955
 
10956
    public void unsetSuccess() {
3010 chandransh 10957
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2462 chandransh 10958
    }
10959
 
10960
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10961
    public boolean isSetSuccess() {
3010 chandransh 10962
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2462 chandransh 10963
    }
10964
 
10965
    public void setSuccessIsSet(boolean value) {
3010 chandransh 10966
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2462 chandransh 10967
    }
10968
 
10969
    public PaymentException getPe() {
10970
      return this.pe;
10971
    }
10972
 
3010 chandransh 10973
    public createRefund_result setPe(PaymentException pe) {
2462 chandransh 10974
      this.pe = pe;
10975
      return this;
10976
    }
10977
 
10978
    public void unsetPe() {
10979
      this.pe = null;
10980
    }
10981
 
10982
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
10983
    public boolean isSetPe() {
10984
      return this.pe != null;
10985
    }
10986
 
10987
    public void setPeIsSet(boolean value) {
10988
      if (!value) {
10989
        this.pe = null;
10990
      }
10991
    }
10992
 
10993
    public void setFieldValue(_Fields field, Object value) {
10994
      switch (field) {
10995
      case SUCCESS:
10996
        if (value == null) {
10997
          unsetSuccess();
10998
        } else {
3010 chandransh 10999
          setSuccess((Long)value);
2462 chandransh 11000
        }
11001
        break;
11002
 
11003
      case PE:
11004
        if (value == null) {
11005
          unsetPe();
11006
        } else {
11007
          setPe((PaymentException)value);
11008
        }
11009
        break;
11010
 
11011
      }
11012
    }
11013
 
11014
    public void setFieldValue(int fieldID, Object value) {
11015
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11016
    }
11017
 
11018
    public Object getFieldValue(_Fields field) {
11019
      switch (field) {
11020
      case SUCCESS:
3010 chandransh 11021
        return new Long(getSuccess());
2462 chandransh 11022
 
11023
      case PE:
11024
        return getPe();
11025
 
11026
      }
11027
      throw new IllegalStateException();
11028
    }
11029
 
11030
    public Object getFieldValue(int fieldId) {
11031
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11032
    }
11033
 
11034
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11035
    public boolean isSet(_Fields field) {
11036
      switch (field) {
11037
      case SUCCESS:
11038
        return isSetSuccess();
11039
      case PE:
11040
        return isSetPe();
11041
      }
11042
      throw new IllegalStateException();
11043
    }
11044
 
11045
    public boolean isSet(int fieldID) {
11046
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11047
    }
11048
 
11049
    @Override
11050
    public boolean equals(Object that) {
11051
      if (that == null)
11052
        return false;
3010 chandransh 11053
      if (that instanceof createRefund_result)
11054
        return this.equals((createRefund_result)that);
2462 chandransh 11055
      return false;
11056
    }
11057
 
3010 chandransh 11058
    public boolean equals(createRefund_result that) {
2462 chandransh 11059
      if (that == null)
11060
        return false;
11061
 
3010 chandransh 11062
      boolean this_present_success = true;
11063
      boolean that_present_success = true;
2462 chandransh 11064
      if (this_present_success || that_present_success) {
11065
        if (!(this_present_success && that_present_success))
11066
          return false;
3010 chandransh 11067
        if (this.success != that.success)
2462 chandransh 11068
          return false;
11069
      }
11070
 
11071
      boolean this_present_pe = true && this.isSetPe();
11072
      boolean that_present_pe = true && that.isSetPe();
11073
      if (this_present_pe || that_present_pe) {
11074
        if (!(this_present_pe && that_present_pe))
11075
          return false;
11076
        if (!this.pe.equals(that.pe))
11077
          return false;
11078
      }
11079
 
11080
      return true;
11081
    }
11082
 
11083
    @Override
11084
    public int hashCode() {
11085
      return 0;
11086
    }
11087
 
3010 chandransh 11088
    public int compareTo(createRefund_result other) {
2462 chandransh 11089
      if (!getClass().equals(other.getClass())) {
11090
        return getClass().getName().compareTo(other.getClass().getName());
11091
      }
11092
 
11093
      int lastComparison = 0;
3010 chandransh 11094
      createRefund_result typedOther = (createRefund_result)other;
2462 chandransh 11095
 
11096
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11097
      if (lastComparison != 0) {
11098
        return lastComparison;
11099
      }
11100
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11101
      if (lastComparison != 0) {
11102
        return lastComparison;
11103
      }
11104
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());
11105
      if (lastComparison != 0) {
11106
        return lastComparison;
11107
      }
11108
      lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);
11109
      if (lastComparison != 0) {
11110
        return lastComparison;
11111
      }
11112
      return 0;
11113
    }
11114
 
11115
    public void read(TProtocol iprot) throws TException {
11116
      TField field;
11117
      iprot.readStructBegin();
11118
      while (true)
11119
      {
11120
        field = iprot.readFieldBegin();
11121
        if (field.type == TType.STOP) { 
11122
          break;
11123
        }
11124
        _Fields fieldId = _Fields.findByThriftId(field.id);
11125
        if (fieldId == null) {
11126
          TProtocolUtil.skip(iprot, field.type);
11127
        } else {
11128
          switch (fieldId) {
11129
            case SUCCESS:
3010 chandransh 11130
              if (field.type == TType.I64) {
11131
                this.success = iprot.readI64();
11132
                setSuccessIsSet(true);
2462 chandransh 11133
              } else { 
11134
                TProtocolUtil.skip(iprot, field.type);
11135
              }
11136
              break;
11137
            case PE:
11138
              if (field.type == TType.STRUCT) {
11139
                this.pe = new PaymentException();
11140
                this.pe.read(iprot);
11141
              } else { 
11142
                TProtocolUtil.skip(iprot, field.type);
11143
              }
11144
              break;
11145
          }
11146
          iprot.readFieldEnd();
11147
        }
11148
      }
11149
      iprot.readStructEnd();
11150
      validate();
11151
    }
11152
 
11153
    public void write(TProtocol oprot) throws TException {
11154
      oprot.writeStructBegin(STRUCT_DESC);
11155
 
11156
      if (this.isSetSuccess()) {
11157
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3010 chandransh 11158
        oprot.writeI64(this.success);
2462 chandransh 11159
        oprot.writeFieldEnd();
11160
      } else if (this.isSetPe()) {
11161
        oprot.writeFieldBegin(PE_FIELD_DESC);
11162
        this.pe.write(oprot);
11163
        oprot.writeFieldEnd();
11164
      }
11165
      oprot.writeFieldStop();
11166
      oprot.writeStructEnd();
11167
    }
11168
 
11169
    @Override
11170
    public String toString() {
3010 chandransh 11171
      StringBuilder sb = new StringBuilder("createRefund_result(");
2462 chandransh 11172
      boolean first = true;
11173
 
11174
      sb.append("success:");
3010 chandransh 11175
      sb.append(this.success);
2462 chandransh 11176
      first = false;
11177
      if (!first) sb.append(", ");
11178
      sb.append("pe:");
11179
      if (this.pe == null) {
11180
        sb.append("null");
11181
      } else {
11182
        sb.append(this.pe);
11183
      }
11184
      first = false;
11185
      sb.append(")");
11186
      return sb.toString();
11187
    }
11188
 
11189
    public void validate() throws TException {
11190
      // check for required fields
11191
    }
11192
 
11193
  }
11194
 
3010 chandransh 11195
  public static class capturePayment_args implements TBase<capturePayment_args._Fields>, java.io.Serializable, Cloneable, Comparable<capturePayment_args>   {
11196
    private static final TStruct STRUCT_DESC = new TStruct("capturePayment_args");
2690 chandransh 11197
 
3010 chandransh 11198
    private static final TField MERCHANT_TXN_ID_FIELD_DESC = new TField("merchantTxnId", TType.I64, (short)1);
2690 chandransh 11199
 
11200
    private long merchantTxnId;
11201
 
11202
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11203
    public enum _Fields implements TFieldIdEnum {
3010 chandransh 11204
      MERCHANT_TXN_ID((short)1, "merchantTxnId");
2690 chandransh 11205
 
11206
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11207
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11208
 
11209
      static {
11210
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11211
          byId.put((int)field._thriftId, field);
11212
          byName.put(field.getFieldName(), field);
11213
        }
11214
      }
11215
 
11216
      /**
11217
       * Find the _Fields constant that matches fieldId, or null if its not found.
11218
       */
11219
      public static _Fields findByThriftId(int fieldId) {
11220
        return byId.get(fieldId);
11221
      }
11222
 
11223
      /**
11224
       * Find the _Fields constant that matches fieldId, throwing an exception
11225
       * if it is not found.
11226
       */
11227
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11228
        _Fields fields = findByThriftId(fieldId);
11229
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11230
        return fields;
11231
      }
11232
 
11233
      /**
11234
       * Find the _Fields constant that matches name, or null if its not found.
11235
       */
11236
      public static _Fields findByName(String name) {
11237
        return byName.get(name);
11238
      }
11239
 
11240
      private final short _thriftId;
11241
      private final String _fieldName;
11242
 
11243
      _Fields(short thriftId, String fieldName) {
11244
        _thriftId = thriftId;
11245
        _fieldName = fieldName;
11246
      }
11247
 
11248
      public short getThriftFieldId() {
11249
        return _thriftId;
11250
      }
11251
 
11252
      public String getFieldName() {
11253
        return _fieldName;
11254
      }
11255
    }
11256
 
11257
    // isset id assignments
3010 chandransh 11258
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
11259
    private BitSet __isset_bit_vector = new BitSet(1);
2690 chandransh 11260
 
11261
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11262
      put(_Fields.MERCHANT_TXN_ID, new FieldMetaData("merchantTxnId", TFieldRequirementType.DEFAULT, 
11263
          new FieldValueMetaData(TType.I64)));
11264
    }});
11265
 
11266
    static {
3010 chandransh 11267
      FieldMetaData.addStructMetaDataMap(capturePayment_args.class, metaDataMap);
2690 chandransh 11268
    }
11269
 
3010 chandransh 11270
    public capturePayment_args() {
2690 chandransh 11271
    }
11272
 
3010 chandransh 11273
    public capturePayment_args(
11274
      long merchantTxnId)
2690 chandransh 11275
    {
11276
      this();
11277
      this.merchantTxnId = merchantTxnId;
11278
      setMerchantTxnIdIsSet(true);
11279
    }
11280
 
11281
    /**
11282
     * Performs a deep copy on <i>other</i>.
11283
     */
3010 chandransh 11284
    public capturePayment_args(capturePayment_args other) {
2690 chandransh 11285
      __isset_bit_vector.clear();
11286
      __isset_bit_vector.or(other.__isset_bit_vector);
11287
      this.merchantTxnId = other.merchantTxnId;
11288
    }
11289
 
3010 chandransh 11290
    public capturePayment_args deepCopy() {
11291
      return new capturePayment_args(this);
2690 chandransh 11292
    }
11293
 
11294
    @Deprecated
3010 chandransh 11295
    public capturePayment_args clone() {
11296
      return new capturePayment_args(this);
2690 chandransh 11297
    }
11298
 
11299
    public long getMerchantTxnId() {
11300
      return this.merchantTxnId;
11301
    }
11302
 
3010 chandransh 11303
    public capturePayment_args setMerchantTxnId(long merchantTxnId) {
2690 chandransh 11304
      this.merchantTxnId = merchantTxnId;
11305
      setMerchantTxnIdIsSet(true);
11306
      return this;
11307
    }
11308
 
11309
    public void unsetMerchantTxnId() {
11310
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
11311
    }
11312
 
11313
    /** Returns true if field merchantTxnId is set (has been asigned a value) and false otherwise */
11314
    public boolean isSetMerchantTxnId() {
11315
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
11316
    }
11317
 
11318
    public void setMerchantTxnIdIsSet(boolean value) {
11319
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
11320
    }
11321
 
11322
    public void setFieldValue(_Fields field, Object value) {
11323
      switch (field) {
11324
      case MERCHANT_TXN_ID:
11325
        if (value == null) {
11326
          unsetMerchantTxnId();
11327
        } else {
11328
          setMerchantTxnId((Long)value);
11329
        }
11330
        break;
11331
 
11332
      }
11333
    }
11334
 
11335
    public void setFieldValue(int fieldID, Object value) {
11336
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11337
    }
11338
 
11339
    public Object getFieldValue(_Fields field) {
11340
      switch (field) {
11341
      case MERCHANT_TXN_ID:
11342
        return new Long(getMerchantTxnId());
11343
 
11344
      }
11345
      throw new IllegalStateException();
11346
    }
11347
 
11348
    public Object getFieldValue(int fieldId) {
11349
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11350
    }
11351
 
11352
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11353
    public boolean isSet(_Fields field) {
11354
      switch (field) {
11355
      case MERCHANT_TXN_ID:
11356
        return isSetMerchantTxnId();
11357
      }
11358
      throw new IllegalStateException();
11359
    }
11360
 
11361
    public boolean isSet(int fieldID) {
11362
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11363
    }
11364
 
11365
    @Override
11366
    public boolean equals(Object that) {
11367
      if (that == null)
11368
        return false;
3010 chandransh 11369
      if (that instanceof capturePayment_args)
11370
        return this.equals((capturePayment_args)that);
2690 chandransh 11371
      return false;
11372
    }
11373
 
3010 chandransh 11374
    public boolean equals(capturePayment_args that) {
2690 chandransh 11375
      if (that == null)
11376
        return false;
11377
 
11378
      boolean this_present_merchantTxnId = true;
11379
      boolean that_present_merchantTxnId = true;
11380
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
11381
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
11382
          return false;
11383
        if (this.merchantTxnId != that.merchantTxnId)
11384
          return false;
11385
      }
11386
 
11387
      return true;
11388
    }
11389
 
11390
    @Override
11391
    public int hashCode() {
11392
      return 0;
11393
    }
11394
 
3010 chandransh 11395
    public int compareTo(capturePayment_args other) {
2690 chandransh 11396
      if (!getClass().equals(other.getClass())) {
11397
        return getClass().getName().compareTo(other.getClass().getName());
11398
      }
11399
 
11400
      int lastComparison = 0;
3010 chandransh 11401
      capturePayment_args typedOther = (capturePayment_args)other;
2690 chandransh 11402
 
11403
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(isSetMerchantTxnId());
11404
      if (lastComparison != 0) {
11405
        return lastComparison;
11406
      }
11407
      lastComparison = TBaseHelper.compareTo(merchantTxnId, typedOther.merchantTxnId);
11408
      if (lastComparison != 0) {
11409
        return lastComparison;
11410
      }
11411
      return 0;
11412
    }
11413
 
11414
    public void read(TProtocol iprot) throws TException {
11415
      TField field;
11416
      iprot.readStructBegin();
11417
      while (true)
11418
      {
11419
        field = iprot.readFieldBegin();
11420
        if (field.type == TType.STOP) { 
11421
          break;
11422
        }
11423
        _Fields fieldId = _Fields.findByThriftId(field.id);
11424
        if (fieldId == null) {
11425
          TProtocolUtil.skip(iprot, field.type);
11426
        } else {
11427
          switch (fieldId) {
11428
            case MERCHANT_TXN_ID:
11429
              if (field.type == TType.I64) {
11430
                this.merchantTxnId = iprot.readI64();
11431
                setMerchantTxnIdIsSet(true);
11432
              } else { 
11433
                TProtocolUtil.skip(iprot, field.type);
11434
              }
11435
              break;
11436
          }
11437
          iprot.readFieldEnd();
11438
        }
11439
      }
11440
      iprot.readStructEnd();
11441
      validate();
11442
    }
11443
 
11444
    public void write(TProtocol oprot) throws TException {
11445
      validate();
11446
 
11447
      oprot.writeStructBegin(STRUCT_DESC);
11448
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
11449
      oprot.writeI64(this.merchantTxnId);
11450
      oprot.writeFieldEnd();
11451
      oprot.writeFieldStop();
11452
      oprot.writeStructEnd();
11453
    }
11454
 
11455
    @Override
11456
    public String toString() {
3010 chandransh 11457
      StringBuilder sb = new StringBuilder("capturePayment_args(");
2690 chandransh 11458
      boolean first = true;
11459
 
11460
      sb.append("merchantTxnId:");
11461
      sb.append(this.merchantTxnId);
11462
      first = false;
11463
      sb.append(")");
11464
      return sb.toString();
11465
    }
11466
 
11467
    public void validate() throws TException {
11468
      // check for required fields
11469
    }
11470
 
11471
  }
11472
 
3010 chandransh 11473
  public static class capturePayment_result implements TBase<capturePayment_result._Fields>, java.io.Serializable, Cloneable, Comparable<capturePayment_result>   {
11474
    private static final TStruct STRUCT_DESC = new TStruct("capturePayment_result");
2690 chandransh 11475
 
3010 chandransh 11476
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
2690 chandransh 11477
    private static final TField PE_FIELD_DESC = new TField("pe", TType.STRUCT, (short)1);
11478
 
3010 chandransh 11479
    private boolean success;
2690 chandransh 11480
    private PaymentException pe;
11481
 
11482
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11483
    public enum _Fields implements TFieldIdEnum {
11484
      SUCCESS((short)0, "success"),
11485
      PE((short)1, "pe");
11486
 
11487
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11488
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11489
 
11490
      static {
11491
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11492
          byId.put((int)field._thriftId, field);
11493
          byName.put(field.getFieldName(), field);
11494
        }
11495
      }
11496
 
11497
      /**
11498
       * Find the _Fields constant that matches fieldId, or null if its not found.
11499
       */
11500
      public static _Fields findByThriftId(int fieldId) {
11501
        return byId.get(fieldId);
11502
      }
11503
 
11504
      /**
11505
       * Find the _Fields constant that matches fieldId, throwing an exception
11506
       * if it is not found.
11507
       */
11508
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11509
        _Fields fields = findByThriftId(fieldId);
11510
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11511
        return fields;
11512
      }
11513
 
11514
      /**
11515
       * Find the _Fields constant that matches name, or null if its not found.
11516
       */
11517
      public static _Fields findByName(String name) {
11518
        return byName.get(name);
11519
      }
11520
 
11521
      private final short _thriftId;
11522
      private final String _fieldName;
11523
 
11524
      _Fields(short thriftId, String fieldName) {
11525
        _thriftId = thriftId;
11526
        _fieldName = fieldName;
11527
      }
11528
 
11529
      public short getThriftFieldId() {
11530
        return _thriftId;
11531
      }
11532
 
11533
      public String getFieldName() {
11534
        return _fieldName;
11535
      }
11536
    }
11537
 
11538
    // isset id assignments
11539
    private static final int __SUCCESS_ISSET_ID = 0;
11540
    private BitSet __isset_bit_vector = new BitSet(1);
11541
 
11542
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11543
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3010 chandransh 11544
          new FieldValueMetaData(TType.BOOL)));
2690 chandransh 11545
      put(_Fields.PE, new FieldMetaData("pe", TFieldRequirementType.DEFAULT, 
11546
          new FieldValueMetaData(TType.STRUCT)));
11547
    }});
11548
 
11549
    static {
3010 chandransh 11550
      FieldMetaData.addStructMetaDataMap(capturePayment_result.class, metaDataMap);
2690 chandransh 11551
    }
11552
 
3010 chandransh 11553
    public capturePayment_result() {
2690 chandransh 11554
    }
11555
 
3010 chandransh 11556
    public capturePayment_result(
11557
      boolean success,
2690 chandransh 11558
      PaymentException pe)
11559
    {
11560
      this();
11561
      this.success = success;
11562
      setSuccessIsSet(true);
11563
      this.pe = pe;
11564
    }
11565
 
11566
    /**
11567
     * Performs a deep copy on <i>other</i>.
11568
     */
3010 chandransh 11569
    public capturePayment_result(capturePayment_result other) {
2690 chandransh 11570
      __isset_bit_vector.clear();
11571
      __isset_bit_vector.or(other.__isset_bit_vector);
11572
      this.success = other.success;
11573
      if (other.isSetPe()) {
11574
        this.pe = new PaymentException(other.pe);
11575
      }
11576
    }
11577
 
3010 chandransh 11578
    public capturePayment_result deepCopy() {
11579
      return new capturePayment_result(this);
2690 chandransh 11580
    }
11581
 
11582
    @Deprecated
3010 chandransh 11583
    public capturePayment_result clone() {
11584
      return new capturePayment_result(this);
2690 chandransh 11585
    }
11586
 
3010 chandransh 11587
    public boolean isSuccess() {
2690 chandransh 11588
      return this.success;
11589
    }
11590
 
3010 chandransh 11591
    public capturePayment_result setSuccess(boolean success) {
2690 chandransh 11592
      this.success = success;
11593
      setSuccessIsSet(true);
11594
      return this;
11595
    }
11596
 
11597
    public void unsetSuccess() {
11598
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11599
    }
11600
 
11601
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11602
    public boolean isSetSuccess() {
11603
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11604
    }
11605
 
11606
    public void setSuccessIsSet(boolean value) {
11607
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11608
    }
11609
 
11610
    public PaymentException getPe() {
11611
      return this.pe;
11612
    }
11613
 
3010 chandransh 11614
    public capturePayment_result setPe(PaymentException pe) {
2690 chandransh 11615
      this.pe = pe;
11616
      return this;
11617
    }
11618
 
11619
    public void unsetPe() {
11620
      this.pe = null;
11621
    }
11622
 
11623
    /** Returns true if field pe is set (has been asigned a value) and false otherwise */
11624
    public boolean isSetPe() {
11625
      return this.pe != null;
11626
    }
11627
 
11628
    public void setPeIsSet(boolean value) {
11629
      if (!value) {
11630
        this.pe = null;
11631
      }
11632
    }
11633
 
11634
    public void setFieldValue(_Fields field, Object value) {
11635
      switch (field) {
11636
      case SUCCESS:
11637
        if (value == null) {
11638
          unsetSuccess();
11639
        } else {
3010 chandransh 11640
          setSuccess((Boolean)value);
2690 chandransh 11641
        }
11642
        break;
11643
 
11644
      case PE:
11645
        if (value == null) {
11646
          unsetPe();
11647
        } else {
11648
          setPe((PaymentException)value);
11649
        }
11650
        break;
11651
 
11652
      }
11653
    }
11654
 
11655
    public void setFieldValue(int fieldID, Object value) {
11656
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11657
    }
11658
 
11659
    public Object getFieldValue(_Fields field) {
11660
      switch (field) {
11661
      case SUCCESS:
3010 chandransh 11662
        return new Boolean(isSuccess());
2690 chandransh 11663
 
11664
      case PE:
11665
        return getPe();
11666
 
11667
      }
11668
      throw new IllegalStateException();
11669
    }
11670
 
11671
    public Object getFieldValue(int fieldId) {
11672
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11673
    }
11674
 
11675
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11676
    public boolean isSet(_Fields field) {
11677
      switch (field) {
11678
      case SUCCESS:
11679
        return isSetSuccess();
11680
      case PE:
11681
        return isSetPe();
11682
      }
11683
      throw new IllegalStateException();
11684
    }
11685
 
11686
    public boolean isSet(int fieldID) {
11687
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11688
    }
11689
 
11690
    @Override
11691
    public boolean equals(Object that) {
11692
      if (that == null)
11693
        return false;
3010 chandransh 11694
      if (that instanceof capturePayment_result)
11695
        return this.equals((capturePayment_result)that);
2690 chandransh 11696
      return false;
11697
    }
11698
 
3010 chandransh 11699
    public boolean equals(capturePayment_result that) {
2690 chandransh 11700
      if (that == null)
11701
        return false;
11702
 
11703
      boolean this_present_success = true;
11704
      boolean that_present_success = true;
11705
      if (this_present_success || that_present_success) {
11706
        if (!(this_present_success && that_present_success))
11707
          return false;
11708
        if (this.success != that.success)
11709
          return false;
11710
      }
11711
 
11712
      boolean this_present_pe = true && this.isSetPe();
11713
      boolean that_present_pe = true && that.isSetPe();
11714
      if (this_present_pe || that_present_pe) {
11715
        if (!(this_present_pe && that_present_pe))
11716
          return false;
11717
        if (!this.pe.equals(that.pe))
11718
          return false;
11719
      }
11720
 
11721
      return true;
11722
    }
11723
 
11724
    @Override
11725
    public int hashCode() {
11726
      return 0;
11727
    }
11728
 
3010 chandransh 11729
    public int compareTo(capturePayment_result other) {
2690 chandransh 11730
      if (!getClass().equals(other.getClass())) {
11731
        return getClass().getName().compareTo(other.getClass().getName());
11732
      }
11733
 
11734
      int lastComparison = 0;
3010 chandransh 11735
      capturePayment_result typedOther = (capturePayment_result)other;
2690 chandransh 11736
 
11737
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11738
      if (lastComparison != 0) {
11739
        return lastComparison;
11740
      }
11741
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11742
      if (lastComparison != 0) {
11743
        return lastComparison;
11744
      }
11745
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(isSetPe());
11746
      if (lastComparison != 0) {
11747
        return lastComparison;
11748
      }
11749
      lastComparison = TBaseHelper.compareTo(pe, typedOther.pe);
11750
      if (lastComparison != 0) {
11751
        return lastComparison;
11752
      }
11753
      return 0;
11754
    }
11755
 
11756
    public void read(TProtocol iprot) throws TException {
11757
      TField field;
11758
      iprot.readStructBegin();
11759
      while (true)
11760
      {
11761
        field = iprot.readFieldBegin();
11762
        if (field.type == TType.STOP) { 
11763
          break;
11764
        }
11765
        _Fields fieldId = _Fields.findByThriftId(field.id);
11766
        if (fieldId == null) {
11767
          TProtocolUtil.skip(iprot, field.type);
11768
        } else {
11769
          switch (fieldId) {
11770
            case SUCCESS:
3010 chandransh 11771
              if (field.type == TType.BOOL) {
11772
                this.success = iprot.readBool();
2690 chandransh 11773
                setSuccessIsSet(true);
11774
              } else { 
11775
                TProtocolUtil.skip(iprot, field.type);
11776
              }
11777
              break;
11778
            case PE:
11779
              if (field.type == TType.STRUCT) {
11780
                this.pe = new PaymentException();
11781
                this.pe.read(iprot);
11782
              } else { 
11783
                TProtocolUtil.skip(iprot, field.type);
11784
              }
11785
              break;
11786
          }
11787
          iprot.readFieldEnd();
11788
        }
11789
      }
11790
      iprot.readStructEnd();
11791
      validate();
11792
    }
11793
 
11794
    public void write(TProtocol oprot) throws TException {
11795
      oprot.writeStructBegin(STRUCT_DESC);
11796
 
11797
      if (this.isSetSuccess()) {
11798
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3010 chandransh 11799
        oprot.writeBool(this.success);
2690 chandransh 11800
        oprot.writeFieldEnd();
11801
      } else if (this.isSetPe()) {
11802
        oprot.writeFieldBegin(PE_FIELD_DESC);
11803
        this.pe.write(oprot);
11804
        oprot.writeFieldEnd();
11805
      }
11806
      oprot.writeFieldStop();
11807
      oprot.writeStructEnd();
11808
    }
11809
 
11810
    @Override
11811
    public String toString() {
3010 chandransh 11812
      StringBuilder sb = new StringBuilder("capturePayment_result(");
2690 chandransh 11813
      boolean first = true;
11814
 
11815
      sb.append("success:");
11816
      sb.append(this.success);
11817
      first = false;
11818
      if (!first) sb.append(", ");
11819
      sb.append("pe:");
11820
      if (this.pe == null) {
11821
        sb.append("null");
11822
      } else {
11823
        sb.append(this.pe);
11824
      }
11825
      first = false;
11826
      sb.append(")");
11827
      return sb.toString();
11828
    }
11829
 
11830
    public void validate() throws TException {
11831
      // check for required fields
11832
    }
11833
 
11834
  }
11835
 
123 ashish 11836
}