Subversion Repositories SmartDukaan

Rev

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

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