Subversion Repositories SmartDukaan

Rev

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