Subversion Repositories SmartDukaan

Rev

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