Subversion Repositories SmartDukaan

Rev

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