Subversion Repositories SmartDukaan

Rev

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

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