Subversion Repositories SmartDukaan

Rev

Rev 8618 | Rev 8914 | 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
     * @param userId
31
     * @param amount
32
     * @param gatewayId
33
     * @param txnId
6050 anupam.sin 34
     * @param isDigital
695 rajveer 35
     */
6050 anupam.sin 36
    public long createPayment(long userId, double amount, long gatewayId, long txnId, boolean isDigital) throws PaymentException, org.apache.thrift.TException;
123 ashish 37
 
695 rajveer 38
    /**
4141 chandransh 39
     * Get all payments for user. If status and gateway are null, they are ignored. Same for times as well.
695 rajveer 40
     * 
41
     * @param userId
42
     * @param fromTime
43
     * @param toTime
44
     * @param status
45
     * @param gatewayId
46
     */
3430 rajveer 47
    public List<Payment> getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, org.apache.thrift.TException;
123 ashish 48
 
695 rajveer 49
    /**
4141 chandransh 50
     * Get all payments in the given status for the given gateway. If gatewayId is 0, then it is ignored.
695 rajveer 51
     * 
52
     * @param fromTime
53
     * @param toTime
54
     * @param status
55
     * @param gatewayId
56
     */
3430 rajveer 57
    public List<Payment> getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, org.apache.thrift.TException;
123 ashish 58
 
695 rajveer 59
    /**
4141 chandransh 60
     * Get all payments for the given gateway which were captured between the given dates. If the gatewayId is 0, it's ignored.
695 rajveer 61
     * 
4141 chandransh 62
     * @param fromTime
63
     * @param toTime
64
     * @param gatewayId
65
     */
66
    public List<Payment> getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId) throws PaymentException, org.apache.thrift.TException;
67
 
68
    /**
69
     * Get the gateway for the given id.
695 rajveer 70
     * 
71
     * @param id
72
     */
3430 rajveer 73
    public PaymentGateway getPaymentGateway(long id) throws PaymentException, org.apache.thrift.TException;
420 ashish 74
 
695 rajveer 75
    /**
4600 varun.gupt 76
     * Get all active Payment Gateways
77
     * 
78
     */
79
    public List<PaymentGateway> getActivePaymentGateways() throws PaymentException, org.apache.thrift.TException;
80
 
81
    /**
695 rajveer 82
     * Get a particular payment info
83
     * 
84
     * 
85
     * @param id
86
     */
3430 rajveer 87
    public Payment getPayment(long id) throws PaymentException, org.apache.thrift.TException;
420 ashish 88
 
695 rajveer 89
    /**
4600 varun.gupt 90
     * Get payments for a transaction. Will raise exception.
695 rajveer 91
     * 
92
     * 
93
     * @param txnId
94
     */
3430 rajveer 95
    public List<Payment> getPaymentForTxnId(long txnId) throws PaymentException, org.apache.thrift.TException;
420 ashish 96
 
695 rajveer 97
    /**
7049 anupam.sin 98
     * Get payments for a recharge transaction id. Will raise exception.
99
     * 
100
     * 
101
     * @param txnId
102
     */
103
    public List<Payment> getPaymentForRechargeTxnId(long txnId) throws PaymentException, org.apache.thrift.TException;
104
 
105
    /**
4600 varun.gupt 106
     * Get successful payment for a transaction. Will raise exception.
107
     * 
108
     * 
109
     * @param txnId
110
     */
111
    public Payment getSuccessfulPaymentForTxnId(long txnId) throws PaymentException, org.apache.thrift.TException;
112
 
113
    /**
695 rajveer 114
     * mark payment successful and store parameters
115
     * 
116
     * 
117
     * @param id
118
     * @param gatewayPaymentId
119
     * @param sessionId
120
     * @param gatewayTxnStatus
121
     * @param description
122
     * @param gatewayTxnId
123
     * @param authCode
124
     * @param referenceCode
125
     * @param errorCode
126
     * @param status
1119 rajveer 127
     * @param gatewayTxnDate
695 rajveer 128
     * @param attributes
129
     */
3430 rajveer 130
    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 131
 
1629 ankur.sing 132
    /**
1731 ankur.sing 133
     * Returns the minimum and maximum amounts among successful payments.
134
     * List contains two double values, first minimum and second maximum amount.
1629 ankur.sing 135
     */
3430 rajveer 136
    public List<Double> getSuccessfulPaymentsAmountRange() throws org.apache.thrift.TException;
1629 ankur.sing 137
 
2462 chandransh 138
    /**
139
     * Initialize the payment pipe for a HDFC payment. The URL the user should be redirected to is returned.
140
     * In case of any processing error, an exception is raised.
141
     * 
142
     * @param merchantPaymentId
143
     */
3430 rajveer 144
    public String initializeHdfcPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException;
2462 chandransh 145
 
2690 chandransh 146
    /**
6050 anupam.sin 147
     * Initialize the payment pipe for a HDFC payment in case of a digital order. The URL the user should be redirected to is returned.
6228 anupam.sin 148
     * In case of any processing error, an exception is raised. The phone is a madatory field and is required in case of dth payments.
6050 anupam.sin 149
     * 
150
     * @param merchantPaymentId
151
     * @param rechargeOrderId
6228 anupam.sin 152
     * @param phone
6050 anupam.sin 153
     */
6228 anupam.sin 154
    public String doHdfcPaymentForDigitalOrder(long merchantPaymentId, long rechargeOrderId, String phone) throws PaymentException, org.apache.thrift.TException;
6050 anupam.sin 155
 
156
    /**
3616 chandransh 157
     * Initialize the payment pipe for a HDFC EMI payment. The URL the user should be redirected to is returned.
158
     * In case of any processing error, an exception is raised.
159
     * 
160
     * @param merchantPaymentId
161
     */
162
    public String initializeHdfcEmiPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException;
163
 
164
    /**
2690 chandransh 165
     * Create a refund of the given amount corresponding to the given order to be processed through the same
166
     * payment gateway which processed the payment for the corresponding transaction.
167
     * Returns the id of the newly created Refund.
168
     * 
169
     * @param orderId
170
     * @param merchantTxnId
171
     * @param amount
172
     */
3430 rajveer 173
    public long createRefund(long orderId, long merchantTxnId, double amount) throws PaymentException, org.apache.thrift.TException;
2690 chandransh 174
 
3010 chandransh 175
    /**
176
     * Capture the payment for the given merchant transaction id. It processes the last payment for the given
6503 rajveer 177
     * transaction. If the capture attempt failed, the payment is marked as failed. PaymentException with error
178
     * code 104 is	thrown in case no payments are found for the transaction id passed. PaymentException is also
179
     * thrown with error code 106 in case capture was not possible due to connection
180
     * issue.
3010 chandransh 181
     * 
182
     * @param merchantTxnId
8618 rajveer 183
     * @param isDigital
3010 chandransh 184
     */
8618 rajveer 185
    public boolean capturePayment(long merchantTxnId, boolean isDigital) throws PaymentException, org.apache.thrift.TException;
3010 chandransh 186
 
3956 chandransh 187
    /**
6503 rajveer 188
     * Refund the payment for the given merchant transaction id. It processes the last payment for the given
189
     * transaction. If refund will be failed nothing will be updated in database.
6486 rajveer 190
     * 
191
     * @param merchantTxnId
192
     * @param amount
193
     * @param isDigital
194
     */
195
    public boolean refundPayment(long merchantTxnId, double amount, boolean isDigital) throws PaymentException, org.apache.thrift.TException;
196
 
197
    /**
3956 chandransh 198
     * Adds the given amount to the captured amount of a COD payment.
199
     * Updates the captured amount for the corresponding payment and marks it as PARTIALLY CAPTURED.
200
     * If the captured amount becomes equal to total amount, then the payment status is set as SUCCESS.
201
     * Also sets the name of the entity which transferred the money, the date on which it was transferred
202
     * and the corresponding transaction id.
203
     * 
204
     * Returns false if the payment couldn't be captured.
205
     * Throws exception if no such payment could be found or if the captured amount will exceed the total amount after capturing.
206
     * 
207
     * @param merchantTxnId
208
     * @param amount
209
     * @param xferBy
210
     * @param xferTxnId
211
     * @param xferDate
212
     */
213
    public boolean partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate) throws PaymentException, org.apache.thrift.TException;
214
 
4008 mandeep.dh 215
    /**
216
     * Returns the list of payments that require some extra processing and
217
     * which belong to a particular category. This is currently used by CRM
218
     * application.
219
     * 
220
     * @param category
221
     */
222
    public List<Long> getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category) throws org.apache.thrift.TException;
223
 
224
    /**
225
     * Marks a particular payment as processed for a particular cateogory.
226
     * It essentially deletes the payment if it is processed for a particular
227
     * category. This is currently used by CRM application.
228
     * 
229
     * @param paymentId
230
     * @param category
231
     */
232
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category) throws org.apache.thrift.TException;
233
 
8907 rajveer 234
    public boolean validatePaymentAtGateway(long merchantTxnId, double amount, boolean isDigital) throws PaymentException, org.apache.thrift.TException;
235
 
123 ashish 236
  }
237
 
3430 rajveer 238
  public interface AsyncIface extends in.shop2020.generic.GenericService .AsyncIface {
239
 
6050 anupam.sin 240
    public void createPayment(long userId, double amount, long gatewayId, long txnId, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createPayment_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 241
 
242
    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;
243
 
244
    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;
245
 
4141 chandransh 246
    public void getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentsByCapturedDate_call> resultHandler) throws org.apache.thrift.TException;
247
 
3430 rajveer 248
    public void getPaymentGateway(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentGateway_call> resultHandler) throws org.apache.thrift.TException;
249
 
4600 varun.gupt 250
    public void getActivePaymentGateways(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getActivePaymentGateways_call> resultHandler) throws org.apache.thrift.TException;
251
 
3430 rajveer 252
    public void getPayment(long id, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPayment_call> resultHandler) throws org.apache.thrift.TException;
253
 
254
    public void getPaymentForTxnId(long txnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentForTxnId_call> resultHandler) throws org.apache.thrift.TException;
255
 
7049 anupam.sin 256
    public void getPaymentForRechargeTxnId(long txnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentForRechargeTxnId_call> resultHandler) throws org.apache.thrift.TException;
257
 
4600 varun.gupt 258
    public void getSuccessfulPaymentForTxnId(long txnId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentForTxnId_call> resultHandler) throws org.apache.thrift.TException;
259
 
3430 rajveer 260
    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;
261
 
262
    public void getSuccessfulPaymentsAmountRange(org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getSuccessfulPaymentsAmountRange_call> resultHandler) throws org.apache.thrift.TException;
263
 
264
    public void initializeHdfcPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.initializeHdfcPayment_call> resultHandler) throws org.apache.thrift.TException;
265
 
6228 anupam.sin 266
    public void doHdfcPaymentForDigitalOrder(long merchantPaymentId, long rechargeOrderId, String phone, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.doHdfcPaymentForDigitalOrder_call> resultHandler) throws org.apache.thrift.TException;
6050 anupam.sin 267
 
3616 chandransh 268
    public void initializeHdfcEmiPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.initializeHdfcEmiPayment_call> resultHandler) throws org.apache.thrift.TException;
269
 
3430 rajveer 270
    public void createRefund(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.createRefund_call> resultHandler) throws org.apache.thrift.TException;
271
 
8618 rajveer 272
    public void capturePayment(long merchantTxnId, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.capturePayment_call> resultHandler) throws org.apache.thrift.TException;
3430 rajveer 273
 
6486 rajveer 274
    public void refundPayment(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.refundPayment_call> resultHandler) throws org.apache.thrift.TException;
275
 
3956 chandransh 276
    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;
277
 
4008 mandeep.dh 278
    public void getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.getPaymentsRequiringExtraProcessing_call> resultHandler) throws org.apache.thrift.TException;
279
 
280
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.markPaymentAsProcessed_call> resultHandler) throws org.apache.thrift.TException;
281
 
8907 rajveer 282
    public void validatePaymentAtGateway(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<AsyncClient.validatePaymentAtGateway_call> resultHandler) throws org.apache.thrift.TException;
283
 
3430 rajveer 284
  }
285
 
3374 rajveer 286
  public static class Client extends in.shop2020.generic.GenericService.Client implements Iface {
3430 rajveer 287
    public static class Factory implements org.apache.thrift.TServiceClientFactory<Client> {
288
      public Factory() {}
289
      public Client getClient(org.apache.thrift.protocol.TProtocol prot) {
290
        return new Client(prot);
291
      }
292
      public Client getClient(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
293
        return new Client(iprot, oprot);
294
      }
295
    }
296
 
297
    public Client(org.apache.thrift.protocol.TProtocol prot)
123 ashish 298
    {
3430 rajveer 299
      super(prot, prot);
123 ashish 300
    }
301
 
3430 rajveer 302
    public Client(org.apache.thrift.protocol.TProtocol iprot, org.apache.thrift.protocol.TProtocol oprot) {
3374 rajveer 303
      super(iprot, oprot);
123 ashish 304
    }
305
 
6050 anupam.sin 306
    public long createPayment(long userId, double amount, long gatewayId, long txnId, boolean isDigital) throws PaymentException, org.apache.thrift.TException
123 ashish 307
    {
6050 anupam.sin 308
      send_createPayment(userId, amount, gatewayId, txnId, isDigital);
123 ashish 309
      return recv_createPayment();
310
    }
311
 
6050 anupam.sin 312
    public void send_createPayment(long userId, double amount, long gatewayId, long txnId, boolean isDigital) throws org.apache.thrift.TException
123 ashish 313
    {
314
      createPayment_args args = new createPayment_args();
3430 rajveer 315
      args.setUserId(userId);
316
      args.setAmount(amount);
317
      args.setGatewayId(gatewayId);
318
      args.setTxnId(txnId);
6050 anupam.sin 319
      args.setIsDigital(isDigital);
3430 rajveer 320
      sendBase("createPayment", args);
123 ashish 321
    }
322
 
3430 rajveer 323
    public long recv_createPayment() throws PaymentException, org.apache.thrift.TException
123 ashish 324
    {
325
      createPayment_result result = new createPayment_result();
3430 rajveer 326
      receiveBase(result, "createPayment");
123 ashish 327
      if (result.isSetSuccess()) {
328
        return result.success;
329
      }
330
      if (result.pe != null) {
331
        throw result.pe;
332
      }
3430 rajveer 333
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createPayment failed: unknown result");
123 ashish 334
    }
335
 
3430 rajveer 336
    public List<Payment> getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, org.apache.thrift.TException
123 ashish 337
    {
695 rajveer 338
      send_getPaymentsForUser(userId, fromTime, toTime, status, gatewayId);
123 ashish 339
      return recv_getPaymentsForUser();
340
    }
341
 
3430 rajveer 342
    public void send_getPaymentsForUser(long userId, long fromTime, long toTime, PaymentStatus status, long gatewayId) throws org.apache.thrift.TException
123 ashish 343
    {
344
      getPaymentsForUser_args args = new getPaymentsForUser_args();
3430 rajveer 345
      args.setUserId(userId);
346
      args.setFromTime(fromTime);
347
      args.setToTime(toTime);
348
      args.setStatus(status);
349
      args.setGatewayId(gatewayId);
350
      sendBase("getPaymentsForUser", args);
123 ashish 351
    }
352
 
3430 rajveer 353
    public List<Payment> recv_getPaymentsForUser() throws PaymentException, org.apache.thrift.TException
123 ashish 354
    {
355
      getPaymentsForUser_result result = new getPaymentsForUser_result();
3430 rajveer 356
      receiveBase(result, "getPaymentsForUser");
123 ashish 357
      if (result.isSetSuccess()) {
358
        return result.success;
359
      }
360
      if (result.pe != null) {
361
        throw result.pe;
362
      }
3430 rajveer 363
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentsForUser failed: unknown result");
123 ashish 364
    }
365
 
3430 rajveer 366
    public List<Payment> getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws PaymentException, org.apache.thrift.TException
123 ashish 367
    {
695 rajveer 368
      send_getPayments(fromTime, toTime, status, gatewayId);
123 ashish 369
      return recv_getPayments();
370
    }
371
 
3430 rajveer 372
    public void send_getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId) throws org.apache.thrift.TException
123 ashish 373
    {
374
      getPayments_args args = new getPayments_args();
3430 rajveer 375
      args.setFromTime(fromTime);
376
      args.setToTime(toTime);
377
      args.setStatus(status);
378
      args.setGatewayId(gatewayId);
379
      sendBase("getPayments", args);
123 ashish 380
    }
381
 
3430 rajveer 382
    public List<Payment> recv_getPayments() throws PaymentException, org.apache.thrift.TException
123 ashish 383
    {
384
      getPayments_result result = new getPayments_result();
3430 rajveer 385
      receiveBase(result, "getPayments");
123 ashish 386
      if (result.isSetSuccess()) {
387
        return result.success;
388
      }
389
      if (result.pe != null) {
390
        throw result.pe;
391
      }
3430 rajveer 392
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPayments failed: unknown result");
123 ashish 393
    }
394
 
4141 chandransh 395
    public List<Payment> getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId) throws PaymentException, org.apache.thrift.TException
396
    {
397
      send_getPaymentsByCapturedDate(fromTime, toTime, gatewayId);
398
      return recv_getPaymentsByCapturedDate();
399
    }
400
 
401
    public void send_getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId) throws org.apache.thrift.TException
402
    {
403
      getPaymentsByCapturedDate_args args = new getPaymentsByCapturedDate_args();
404
      args.setFromTime(fromTime);
405
      args.setToTime(toTime);
406
      args.setGatewayId(gatewayId);
407
      sendBase("getPaymentsByCapturedDate", args);
408
    }
409
 
410
    public List<Payment> recv_getPaymentsByCapturedDate() throws PaymentException, org.apache.thrift.TException
411
    {
412
      getPaymentsByCapturedDate_result result = new getPaymentsByCapturedDate_result();
413
      receiveBase(result, "getPaymentsByCapturedDate");
414
      if (result.isSetSuccess()) {
415
        return result.success;
416
      }
417
      if (result.pe != null) {
418
        throw result.pe;
419
      }
420
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentsByCapturedDate failed: unknown result");
421
    }
422
 
3430 rajveer 423
    public PaymentGateway getPaymentGateway(long id) throws PaymentException, org.apache.thrift.TException
420 ashish 424
    {
425
      send_getPaymentGateway(id);
426
      return recv_getPaymentGateway();
427
    }
428
 
3430 rajveer 429
    public void send_getPaymentGateway(long id) throws org.apache.thrift.TException
420 ashish 430
    {
431
      getPaymentGateway_args args = new getPaymentGateway_args();
3430 rajveer 432
      args.setId(id);
433
      sendBase("getPaymentGateway", args);
420 ashish 434
    }
435
 
3430 rajveer 436
    public PaymentGateway recv_getPaymentGateway() throws PaymentException, org.apache.thrift.TException
420 ashish 437
    {
438
      getPaymentGateway_result result = new getPaymentGateway_result();
3430 rajveer 439
      receiveBase(result, "getPaymentGateway");
420 ashish 440
      if (result.isSetSuccess()) {
441
        return result.success;
442
      }
443
      if (result.pe != null) {
444
        throw result.pe;
445
      }
3430 rajveer 446
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentGateway failed: unknown result");
420 ashish 447
    }
448
 
4600 varun.gupt 449
    public List<PaymentGateway> getActivePaymentGateways() throws PaymentException, org.apache.thrift.TException
450
    {
451
      send_getActivePaymentGateways();
452
      return recv_getActivePaymentGateways();
453
    }
454
 
455
    public void send_getActivePaymentGateways() throws org.apache.thrift.TException
456
    {
457
      getActivePaymentGateways_args args = new getActivePaymentGateways_args();
458
      sendBase("getActivePaymentGateways", args);
459
    }
460
 
461
    public List<PaymentGateway> recv_getActivePaymentGateways() throws PaymentException, org.apache.thrift.TException
462
    {
463
      getActivePaymentGateways_result result = new getActivePaymentGateways_result();
464
      receiveBase(result, "getActivePaymentGateways");
465
      if (result.isSetSuccess()) {
466
        return result.success;
467
      }
468
      if (result.pe != null) {
469
        throw result.pe;
470
      }
471
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getActivePaymentGateways failed: unknown result");
472
    }
473
 
3430 rajveer 474
    public Payment getPayment(long id) throws PaymentException, org.apache.thrift.TException
420 ashish 475
    {
695 rajveer 476
      send_getPayment(id);
477
      return recv_getPayment();
420 ashish 478
    }
479
 
3430 rajveer 480
    public void send_getPayment(long id) throws org.apache.thrift.TException
420 ashish 481
    {
695 rajveer 482
      getPayment_args args = new getPayment_args();
3430 rajveer 483
      args.setId(id);
484
      sendBase("getPayment", args);
420 ashish 485
    }
486
 
3430 rajveer 487
    public Payment recv_getPayment() throws PaymentException, org.apache.thrift.TException
420 ashish 488
    {
695 rajveer 489
      getPayment_result result = new getPayment_result();
3430 rajveer 490
      receiveBase(result, "getPayment");
695 rajveer 491
      if (result.isSetSuccess()) {
492
        return result.success;
493
      }
420 ashish 494
      if (result.pe != null) {
495
        throw result.pe;
496
      }
3430 rajveer 497
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPayment failed: unknown result");
420 ashish 498
    }
499
 
3430 rajveer 500
    public List<Payment> getPaymentForTxnId(long txnId) throws PaymentException, org.apache.thrift.TException
420 ashish 501
    {
695 rajveer 502
      send_getPaymentForTxnId(txnId);
503
      return recv_getPaymentForTxnId();
420 ashish 504
    }
505
 
3430 rajveer 506
    public void send_getPaymentForTxnId(long txnId) throws org.apache.thrift.TException
420 ashish 507
    {
695 rajveer 508
      getPaymentForTxnId_args args = new getPaymentForTxnId_args();
3430 rajveer 509
      args.setTxnId(txnId);
510
      sendBase("getPaymentForTxnId", args);
420 ashish 511
    }
512
 
3430 rajveer 513
    public List<Payment> recv_getPaymentForTxnId() throws PaymentException, org.apache.thrift.TException
420 ashish 514
    {
695 rajveer 515
      getPaymentForTxnId_result result = new getPaymentForTxnId_result();
3430 rajveer 516
      receiveBase(result, "getPaymentForTxnId");
420 ashish 517
      if (result.isSetSuccess()) {
518
        return result.success;
519
      }
520
      if (result.pe != null) {
521
        throw result.pe;
522
      }
3430 rajveer 523
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentForTxnId failed: unknown result");
420 ashish 524
    }
525
 
7049 anupam.sin 526
    public List<Payment> getPaymentForRechargeTxnId(long txnId) throws PaymentException, org.apache.thrift.TException
527
    {
528
      send_getPaymentForRechargeTxnId(txnId);
529
      return recv_getPaymentForRechargeTxnId();
530
    }
531
 
532
    public void send_getPaymentForRechargeTxnId(long txnId) throws org.apache.thrift.TException
533
    {
534
      getPaymentForRechargeTxnId_args args = new getPaymentForRechargeTxnId_args();
535
      args.setTxnId(txnId);
536
      sendBase("getPaymentForRechargeTxnId", args);
537
    }
538
 
539
    public List<Payment> recv_getPaymentForRechargeTxnId() throws PaymentException, org.apache.thrift.TException
540
    {
541
      getPaymentForRechargeTxnId_result result = new getPaymentForRechargeTxnId_result();
542
      receiveBase(result, "getPaymentForRechargeTxnId");
543
      if (result.isSetSuccess()) {
544
        return result.success;
545
      }
546
      if (result.pe != null) {
547
        throw result.pe;
548
      }
549
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentForRechargeTxnId failed: unknown result");
550
    }
551
 
4600 varun.gupt 552
    public Payment getSuccessfulPaymentForTxnId(long txnId) throws PaymentException, org.apache.thrift.TException
553
    {
554
      send_getSuccessfulPaymentForTxnId(txnId);
555
      return recv_getSuccessfulPaymentForTxnId();
556
    }
557
 
558
    public void send_getSuccessfulPaymentForTxnId(long txnId) throws org.apache.thrift.TException
559
    {
560
      getSuccessfulPaymentForTxnId_args args = new getSuccessfulPaymentForTxnId_args();
561
      args.setTxnId(txnId);
562
      sendBase("getSuccessfulPaymentForTxnId", args);
563
    }
564
 
565
    public Payment recv_getSuccessfulPaymentForTxnId() throws PaymentException, org.apache.thrift.TException
566
    {
567
      getSuccessfulPaymentForTxnId_result result = new getSuccessfulPaymentForTxnId_result();
568
      receiveBase(result, "getSuccessfulPaymentForTxnId");
569
      if (result.isSetSuccess()) {
570
        return result.success;
571
      }
572
      if (result.pe != null) {
573
        throw result.pe;
574
      }
575
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuccessfulPaymentForTxnId failed: unknown result");
576
    }
577
 
3430 rajveer 578
    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 579
    {
1119 rajveer 580
      send_updatePaymentDetails(id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes);
695 rajveer 581
      return recv_updatePaymentDetails();
420 ashish 582
    }
583
 
3430 rajveer 584
    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 585
    {
695 rajveer 586
      updatePaymentDetails_args args = new updatePaymentDetails_args();
3430 rajveer 587
      args.setId(id);
588
      args.setGatewayPaymentId(gatewayPaymentId);
589
      args.setSessionId(sessionId);
590
      args.setGatewayTxnStatus(gatewayTxnStatus);
591
      args.setDescription(description);
592
      args.setGatewayTxnId(gatewayTxnId);
593
      args.setAuthCode(authCode);
594
      args.setReferenceCode(referenceCode);
595
      args.setErrorCode(errorCode);
596
      args.setStatus(status);
597
      args.setGatewayTxnDate(gatewayTxnDate);
598
      args.setAttributes(attributes);
599
      sendBase("updatePaymentDetails", args);
420 ashish 600
    }
601
 
3430 rajveer 602
    public boolean recv_updatePaymentDetails() throws PaymentException, org.apache.thrift.TException
420 ashish 603
    {
695 rajveer 604
      updatePaymentDetails_result result = new updatePaymentDetails_result();
3430 rajveer 605
      receiveBase(result, "updatePaymentDetails");
695 rajveer 606
      if (result.isSetSuccess()) {
607
        return result.success;
608
      }
420 ashish 609
      if (result.pe != null) {
610
        throw result.pe;
611
      }
3430 rajveer 612
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "updatePaymentDetails failed: unknown result");
420 ashish 613
    }
614
 
3430 rajveer 615
    public List<Double> getSuccessfulPaymentsAmountRange() throws org.apache.thrift.TException
1629 ankur.sing 616
    {
1731 ankur.sing 617
      send_getSuccessfulPaymentsAmountRange();
618
      return recv_getSuccessfulPaymentsAmountRange();
1629 ankur.sing 619
    }
620
 
3430 rajveer 621
    public void send_getSuccessfulPaymentsAmountRange() throws org.apache.thrift.TException
1629 ankur.sing 622
    {
1731 ankur.sing 623
      getSuccessfulPaymentsAmountRange_args args = new getSuccessfulPaymentsAmountRange_args();
3430 rajveer 624
      sendBase("getSuccessfulPaymentsAmountRange", args);
1629 ankur.sing 625
    }
626
 
3430 rajveer 627
    public List<Double> recv_getSuccessfulPaymentsAmountRange() throws org.apache.thrift.TException
1629 ankur.sing 628
    {
1731 ankur.sing 629
      getSuccessfulPaymentsAmountRange_result result = new getSuccessfulPaymentsAmountRange_result();
3430 rajveer 630
      receiveBase(result, "getSuccessfulPaymentsAmountRange");
1629 ankur.sing 631
      if (result.isSetSuccess()) {
632
        return result.success;
633
      }
3430 rajveer 634
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getSuccessfulPaymentsAmountRange failed: unknown result");
1629 ankur.sing 635
    }
636
 
3430 rajveer 637
    public String initializeHdfcPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException
2462 chandransh 638
    {
639
      send_initializeHdfcPayment(merchantPaymentId);
640
      return recv_initializeHdfcPayment();
641
    }
642
 
3430 rajveer 643
    public void send_initializeHdfcPayment(long merchantPaymentId) throws org.apache.thrift.TException
2462 chandransh 644
    {
645
      initializeHdfcPayment_args args = new initializeHdfcPayment_args();
3430 rajveer 646
      args.setMerchantPaymentId(merchantPaymentId);
647
      sendBase("initializeHdfcPayment", args);
2462 chandransh 648
    }
649
 
3430 rajveer 650
    public String recv_initializeHdfcPayment() throws PaymentException, org.apache.thrift.TException
2462 chandransh 651
    {
652
      initializeHdfcPayment_result result = new initializeHdfcPayment_result();
3430 rajveer 653
      receiveBase(result, "initializeHdfcPayment");
2462 chandransh 654
      if (result.isSetSuccess()) {
655
        return result.success;
656
      }
657
      if (result.pe != null) {
658
        throw result.pe;
659
      }
3430 rajveer 660
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "initializeHdfcPayment failed: unknown result");
2462 chandransh 661
    }
662
 
6228 anupam.sin 663
    public String doHdfcPaymentForDigitalOrder(long merchantPaymentId, long rechargeOrderId, String phone) throws PaymentException, org.apache.thrift.TException
6050 anupam.sin 664
    {
6228 anupam.sin 665
      send_doHdfcPaymentForDigitalOrder(merchantPaymentId, rechargeOrderId, phone);
6050 anupam.sin 666
      return recv_doHdfcPaymentForDigitalOrder();
667
    }
668
 
6228 anupam.sin 669
    public void send_doHdfcPaymentForDigitalOrder(long merchantPaymentId, long rechargeOrderId, String phone) throws org.apache.thrift.TException
6050 anupam.sin 670
    {
671
      doHdfcPaymentForDigitalOrder_args args = new doHdfcPaymentForDigitalOrder_args();
672
      args.setMerchantPaymentId(merchantPaymentId);
673
      args.setRechargeOrderId(rechargeOrderId);
6228 anupam.sin 674
      args.setPhone(phone);
6050 anupam.sin 675
      sendBase("doHdfcPaymentForDigitalOrder", args);
676
    }
677
 
678
    public String recv_doHdfcPaymentForDigitalOrder() throws PaymentException, org.apache.thrift.TException
679
    {
680
      doHdfcPaymentForDigitalOrder_result result = new doHdfcPaymentForDigitalOrder_result();
681
      receiveBase(result, "doHdfcPaymentForDigitalOrder");
682
      if (result.isSetSuccess()) {
683
        return result.success;
684
      }
685
      if (result.pe != null) {
686
        throw result.pe;
687
      }
688
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "doHdfcPaymentForDigitalOrder failed: unknown result");
689
    }
690
 
3616 chandransh 691
    public String initializeHdfcEmiPayment(long merchantPaymentId) throws PaymentException, org.apache.thrift.TException
692
    {
693
      send_initializeHdfcEmiPayment(merchantPaymentId);
694
      return recv_initializeHdfcEmiPayment();
695
    }
696
 
697
    public void send_initializeHdfcEmiPayment(long merchantPaymentId) throws org.apache.thrift.TException
698
    {
699
      initializeHdfcEmiPayment_args args = new initializeHdfcEmiPayment_args();
700
      args.setMerchantPaymentId(merchantPaymentId);
701
      sendBase("initializeHdfcEmiPayment", args);
702
    }
703
 
704
    public String recv_initializeHdfcEmiPayment() throws PaymentException, org.apache.thrift.TException
705
    {
706
      initializeHdfcEmiPayment_result result = new initializeHdfcEmiPayment_result();
707
      receiveBase(result, "initializeHdfcEmiPayment");
708
      if (result.isSetSuccess()) {
709
        return result.success;
710
      }
711
      if (result.pe != null) {
712
        throw result.pe;
713
      }
714
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "initializeHdfcEmiPayment failed: unknown result");
715
    }
716
 
3430 rajveer 717
    public long createRefund(long orderId, long merchantTxnId, double amount) throws PaymentException, org.apache.thrift.TException
2690 chandransh 718
    {
719
      send_createRefund(orderId, merchantTxnId, amount);
720
      return recv_createRefund();
721
    }
722
 
3430 rajveer 723
    public void send_createRefund(long orderId, long merchantTxnId, double amount) throws org.apache.thrift.TException
2690 chandransh 724
    {
725
      createRefund_args args = new createRefund_args();
3430 rajveer 726
      args.setOrderId(orderId);
727
      args.setMerchantTxnId(merchantTxnId);
728
      args.setAmount(amount);
729
      sendBase("createRefund", args);
2690 chandransh 730
    }
731
 
3430 rajveer 732
    public long recv_createRefund() throws PaymentException, org.apache.thrift.TException
2690 chandransh 733
    {
734
      createRefund_result result = new createRefund_result();
3430 rajveer 735
      receiveBase(result, "createRefund");
2690 chandransh 736
      if (result.isSetSuccess()) {
737
        return result.success;
738
      }
739
      if (result.pe != null) {
740
        throw result.pe;
741
      }
3430 rajveer 742
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "createRefund failed: unknown result");
2690 chandransh 743
    }
744
 
8618 rajveer 745
    public boolean capturePayment(long merchantTxnId, boolean isDigital) throws PaymentException, org.apache.thrift.TException
3010 chandransh 746
    {
8618 rajveer 747
      send_capturePayment(merchantTxnId, isDigital);
3010 chandransh 748
      return recv_capturePayment();
749
    }
750
 
8618 rajveer 751
    public void send_capturePayment(long merchantTxnId, boolean isDigital) throws org.apache.thrift.TException
3010 chandransh 752
    {
753
      capturePayment_args args = new capturePayment_args();
3430 rajveer 754
      args.setMerchantTxnId(merchantTxnId);
8618 rajveer 755
      args.setIsDigital(isDigital);
3430 rajveer 756
      sendBase("capturePayment", args);
3010 chandransh 757
    }
758
 
3430 rajveer 759
    public boolean recv_capturePayment() throws PaymentException, org.apache.thrift.TException
3010 chandransh 760
    {
761
      capturePayment_result result = new capturePayment_result();
3430 rajveer 762
      receiveBase(result, "capturePayment");
3010 chandransh 763
      if (result.isSetSuccess()) {
764
        return result.success;
765
      }
766
      if (result.pe != null) {
767
        throw result.pe;
768
      }
3430 rajveer 769
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "capturePayment failed: unknown result");
3010 chandransh 770
    }
771
 
6486 rajveer 772
    public boolean refundPayment(long merchantTxnId, double amount, boolean isDigital) throws PaymentException, org.apache.thrift.TException
773
    {
774
      send_refundPayment(merchantTxnId, amount, isDigital);
775
      return recv_refundPayment();
776
    }
777
 
778
    public void send_refundPayment(long merchantTxnId, double amount, boolean isDigital) throws org.apache.thrift.TException
779
    {
780
      refundPayment_args args = new refundPayment_args();
781
      args.setMerchantTxnId(merchantTxnId);
782
      args.setAmount(amount);
783
      args.setIsDigital(isDigital);
784
      sendBase("refundPayment", args);
785
    }
786
 
787
    public boolean recv_refundPayment() throws PaymentException, org.apache.thrift.TException
788
    {
789
      refundPayment_result result = new refundPayment_result();
790
      receiveBase(result, "refundPayment");
791
      if (result.isSetSuccess()) {
792
        return result.success;
793
      }
794
      if (result.pe != null) {
795
        throw result.pe;
796
      }
797
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "refundPayment failed: unknown result");
798
    }
799
 
3956 chandransh 800
    public boolean partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate) throws PaymentException, org.apache.thrift.TException
801
    {
802
      send_partiallyCapturePayment(merchantTxnId, amount, xferBy, xferTxnId, xferDate);
803
      return recv_partiallyCapturePayment();
804
    }
805
 
806
    public void send_partiallyCapturePayment(long merchantTxnId, double amount, String xferBy, String xferTxnId, long xferDate) throws org.apache.thrift.TException
807
    {
808
      partiallyCapturePayment_args args = new partiallyCapturePayment_args();
809
      args.setMerchantTxnId(merchantTxnId);
810
      args.setAmount(amount);
811
      args.setXferBy(xferBy);
812
      args.setXferTxnId(xferTxnId);
813
      args.setXferDate(xferDate);
814
      sendBase("partiallyCapturePayment", args);
815
    }
816
 
817
    public boolean recv_partiallyCapturePayment() throws PaymentException, org.apache.thrift.TException
818
    {
819
      partiallyCapturePayment_result result = new partiallyCapturePayment_result();
820
      receiveBase(result, "partiallyCapturePayment");
821
      if (result.isSetSuccess()) {
822
        return result.success;
823
      }
824
      if (result.pe != null) {
825
        throw result.pe;
826
      }
827
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "partiallyCapturePayment failed: unknown result");
828
    }
829
 
4008 mandeep.dh 830
    public List<Long> getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category) throws org.apache.thrift.TException
831
    {
832
      send_getPaymentsRequiringExtraProcessing(category);
833
      return recv_getPaymentsRequiringExtraProcessing();
834
    }
835
 
836
    public void send_getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category) throws org.apache.thrift.TException
837
    {
838
      getPaymentsRequiringExtraProcessing_args args = new getPaymentsRequiringExtraProcessing_args();
839
      args.setCategory(category);
840
      sendBase("getPaymentsRequiringExtraProcessing", args);
841
    }
842
 
843
    public List<Long> recv_getPaymentsRequiringExtraProcessing() throws org.apache.thrift.TException
844
    {
845
      getPaymentsRequiringExtraProcessing_result result = new getPaymentsRequiringExtraProcessing_result();
846
      receiveBase(result, "getPaymentsRequiringExtraProcessing");
847
      if (result.isSetSuccess()) {
848
        return result.success;
849
      }
850
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getPaymentsRequiringExtraProcessing failed: unknown result");
851
    }
852
 
853
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category) throws org.apache.thrift.TException
854
    {
855
      send_markPaymentAsProcessed(paymentId, category);
856
      recv_markPaymentAsProcessed();
857
    }
858
 
859
    public void send_markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category) throws org.apache.thrift.TException
860
    {
861
      markPaymentAsProcessed_args args = new markPaymentAsProcessed_args();
862
      args.setPaymentId(paymentId);
863
      args.setCategory(category);
864
      sendBase("markPaymentAsProcessed", args);
865
    }
866
 
867
    public void recv_markPaymentAsProcessed() throws org.apache.thrift.TException
868
    {
869
      markPaymentAsProcessed_result result = new markPaymentAsProcessed_result();
870
      receiveBase(result, "markPaymentAsProcessed");
871
      return;
872
    }
873
 
8907 rajveer 874
    public boolean validatePaymentAtGateway(long merchantTxnId, double amount, boolean isDigital) throws PaymentException, org.apache.thrift.TException
875
    {
876
      send_validatePaymentAtGateway(merchantTxnId, amount, isDigital);
877
      return recv_validatePaymentAtGateway();
878
    }
879
 
880
    public void send_validatePaymentAtGateway(long merchantTxnId, double amount, boolean isDigital) throws org.apache.thrift.TException
881
    {
882
      validatePaymentAtGateway_args args = new validatePaymentAtGateway_args();
883
      args.setMerchantTxnId(merchantTxnId);
884
      args.setAmount(amount);
885
      args.setIsDigital(isDigital);
886
      sendBase("validatePaymentAtGateway", args);
887
    }
888
 
889
    public boolean recv_validatePaymentAtGateway() throws PaymentException, org.apache.thrift.TException
890
    {
891
      validatePaymentAtGateway_result result = new validatePaymentAtGateway_result();
892
      receiveBase(result, "validatePaymentAtGateway");
893
      if (result.isSetSuccess()) {
894
        return result.success;
895
      }
896
      if (result.pe != null) {
897
        throw result.pe;
898
      }
899
      throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "validatePaymentAtGateway failed: unknown result");
900
    }
901
 
123 ashish 902
  }
3430 rajveer 903
  public static class AsyncClient extends in.shop2020.generic.GenericService.AsyncClient implements AsyncIface {
904
    public static class Factory implements org.apache.thrift.async.TAsyncClientFactory<AsyncClient> {
905
      private org.apache.thrift.async.TAsyncClientManager clientManager;
906
      private org.apache.thrift.protocol.TProtocolFactory protocolFactory;
907
      public Factory(org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.protocol.TProtocolFactory protocolFactory) {
908
        this.clientManager = clientManager;
909
        this.protocolFactory = protocolFactory;
910
      }
911
      public AsyncClient getAsyncClient(org.apache.thrift.transport.TNonblockingTransport transport) {
912
        return new AsyncClient(protocolFactory, clientManager, transport);
913
      }
123 ashish 914
    }
915
 
3430 rajveer 916
    public AsyncClient(org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.async.TAsyncClientManager clientManager, org.apache.thrift.transport.TNonblockingTransport transport) {
917
      super(protocolFactory, clientManager, transport);
918
    }
123 ashish 919
 
6050 anupam.sin 920
    public void createPayment(long userId, double amount, long gatewayId, long txnId, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<createPayment_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 921
      checkReady();
6050 anupam.sin 922
      createPayment_call method_call = new createPayment_call(userId, amount, gatewayId, txnId, isDigital, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 923
      this.___currentMethod = method_call;
924
      ___manager.call(method_call);
925
    }
926
 
927
    public static class createPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
928
      private long userId;
929
      private double amount;
930
      private long gatewayId;
931
      private long txnId;
6050 anupam.sin 932
      private boolean isDigital;
933
      public createPayment_call(long userId, double amount, long gatewayId, long txnId, boolean isDigital, 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 {
3430 rajveer 934
        super(client, protocolFactory, transport, resultHandler, false);
935
        this.userId = userId;
936
        this.amount = amount;
937
        this.gatewayId = gatewayId;
938
        this.txnId = txnId;
6050 anupam.sin 939
        this.isDigital = isDigital;
123 ashish 940
      }
3430 rajveer 941
 
942
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
943
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
944
        createPayment_args args = new createPayment_args();
945
        args.setUserId(userId);
946
        args.setAmount(amount);
947
        args.setGatewayId(gatewayId);
948
        args.setTxnId(txnId);
6050 anupam.sin 949
        args.setIsDigital(isDigital);
3430 rajveer 950
        args.write(prot);
951
        prot.writeMessageEnd();
952
      }
953
 
954
      public long getResult() throws PaymentException, org.apache.thrift.TException {
955
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
956
          throw new IllegalStateException("Method call not finished!");
957
        }
958
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
959
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
960
        return (new Client(prot)).recv_createPayment();
961
      }
123 ashish 962
    }
963
 
3430 rajveer 964
    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 {
965
      checkReady();
966
      getPaymentsForUser_call method_call = new getPaymentsForUser_call(userId, fromTime, toTime, status, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
967
      this.___currentMethod = method_call;
968
      ___manager.call(method_call);
969
    }
970
 
971
    public static class getPaymentsForUser_call extends org.apache.thrift.async.TAsyncMethodCall {
972
      private long userId;
973
      private long fromTime;
974
      private long toTime;
975
      private PaymentStatus status;
976
      private long gatewayId;
977
      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 {
978
        super(client, protocolFactory, transport, resultHandler, false);
979
        this.userId = userId;
980
        this.fromTime = fromTime;
981
        this.toTime = toTime;
982
        this.status = status;
983
        this.gatewayId = gatewayId;
984
      }
985
 
986
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
987
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentsForUser", org.apache.thrift.protocol.TMessageType.CALL, 0));
988
        getPaymentsForUser_args args = new getPaymentsForUser_args();
989
        args.setUserId(userId);
990
        args.setFromTime(fromTime);
991
        args.setToTime(toTime);
992
        args.setStatus(status);
993
        args.setGatewayId(gatewayId);
994
        args.write(prot);
995
        prot.writeMessageEnd();
996
      }
997
 
998
      public List<Payment> getResult() throws PaymentException, org.apache.thrift.TException {
999
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1000
          throw new IllegalStateException("Method call not finished!");
1001
        }
1002
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1003
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1004
        return (new Client(prot)).recv_getPaymentsForUser();
1005
      }
1006
    }
1007
 
1008
    public void getPayments(long fromTime, long toTime, PaymentStatus status, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<getPayments_call> resultHandler) throws org.apache.thrift.TException {
1009
      checkReady();
1010
      getPayments_call method_call = new getPayments_call(fromTime, toTime, status, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
1011
      this.___currentMethod = method_call;
1012
      ___manager.call(method_call);
1013
    }
1014
 
1015
    public static class getPayments_call extends org.apache.thrift.async.TAsyncMethodCall {
1016
      private long fromTime;
1017
      private long toTime;
1018
      private PaymentStatus status;
1019
      private long gatewayId;
1020
      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 {
1021
        super(client, protocolFactory, transport, resultHandler, false);
1022
        this.fromTime = fromTime;
1023
        this.toTime = toTime;
1024
        this.status = status;
1025
        this.gatewayId = gatewayId;
1026
      }
1027
 
1028
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1029
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPayments", org.apache.thrift.protocol.TMessageType.CALL, 0));
1030
        getPayments_args args = new getPayments_args();
1031
        args.setFromTime(fromTime);
1032
        args.setToTime(toTime);
1033
        args.setStatus(status);
1034
        args.setGatewayId(gatewayId);
1035
        args.write(prot);
1036
        prot.writeMessageEnd();
1037
      }
1038
 
1039
      public List<Payment> getResult() throws PaymentException, org.apache.thrift.TException {
1040
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1041
          throw new IllegalStateException("Method call not finished!");
1042
        }
1043
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1044
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1045
        return (new Client(prot)).recv_getPayments();
1046
      }
1047
    }
1048
 
4141 chandransh 1049
    public void getPaymentsByCapturedDate(long fromTime, long toTime, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<getPaymentsByCapturedDate_call> resultHandler) throws org.apache.thrift.TException {
1050
      checkReady();
1051
      getPaymentsByCapturedDate_call method_call = new getPaymentsByCapturedDate_call(fromTime, toTime, gatewayId, resultHandler, this, ___protocolFactory, ___transport);
1052
      this.___currentMethod = method_call;
1053
      ___manager.call(method_call);
1054
    }
1055
 
1056
    public static class getPaymentsByCapturedDate_call extends org.apache.thrift.async.TAsyncMethodCall {
1057
      private long fromTime;
1058
      private long toTime;
1059
      private long gatewayId;
1060
      public getPaymentsByCapturedDate_call(long fromTime, long toTime, long gatewayId, org.apache.thrift.async.AsyncMethodCallback<getPaymentsByCapturedDate_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 {
1061
        super(client, protocolFactory, transport, resultHandler, false);
1062
        this.fromTime = fromTime;
1063
        this.toTime = toTime;
1064
        this.gatewayId = gatewayId;
1065
      }
1066
 
1067
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1068
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentsByCapturedDate", org.apache.thrift.protocol.TMessageType.CALL, 0));
1069
        getPaymentsByCapturedDate_args args = new getPaymentsByCapturedDate_args();
1070
        args.setFromTime(fromTime);
1071
        args.setToTime(toTime);
1072
        args.setGatewayId(gatewayId);
1073
        args.write(prot);
1074
        prot.writeMessageEnd();
1075
      }
1076
 
1077
      public List<Payment> getResult() throws PaymentException, org.apache.thrift.TException {
1078
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1079
          throw new IllegalStateException("Method call not finished!");
1080
        }
1081
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1082
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1083
        return (new Client(prot)).recv_getPaymentsByCapturedDate();
1084
      }
1085
    }
1086
 
3430 rajveer 1087
    public void getPaymentGateway(long id, org.apache.thrift.async.AsyncMethodCallback<getPaymentGateway_call> resultHandler) throws org.apache.thrift.TException {
1088
      checkReady();
1089
      getPaymentGateway_call method_call = new getPaymentGateway_call(id, resultHandler, this, ___protocolFactory, ___transport);
1090
      this.___currentMethod = method_call;
1091
      ___manager.call(method_call);
1092
    }
1093
 
1094
    public static class getPaymentGateway_call extends org.apache.thrift.async.TAsyncMethodCall {
1095
      private long id;
1096
      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 {
1097
        super(client, protocolFactory, transport, resultHandler, false);
1098
        this.id = id;
1099
      }
1100
 
1101
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1102
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentGateway", org.apache.thrift.protocol.TMessageType.CALL, 0));
1103
        getPaymentGateway_args args = new getPaymentGateway_args();
1104
        args.setId(id);
1105
        args.write(prot);
1106
        prot.writeMessageEnd();
1107
      }
1108
 
1109
      public PaymentGateway getResult() throws PaymentException, org.apache.thrift.TException {
1110
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1111
          throw new IllegalStateException("Method call not finished!");
1112
        }
1113
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1114
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1115
        return (new Client(prot)).recv_getPaymentGateway();
1116
      }
1117
    }
1118
 
4600 varun.gupt 1119
    public void getActivePaymentGateways(org.apache.thrift.async.AsyncMethodCallback<getActivePaymentGateways_call> resultHandler) throws org.apache.thrift.TException {
1120
      checkReady();
1121
      getActivePaymentGateways_call method_call = new getActivePaymentGateways_call(resultHandler, this, ___protocolFactory, ___transport);
1122
      this.___currentMethod = method_call;
1123
      ___manager.call(method_call);
1124
    }
1125
 
1126
    public static class getActivePaymentGateways_call extends org.apache.thrift.async.TAsyncMethodCall {
1127
      public getActivePaymentGateways_call(org.apache.thrift.async.AsyncMethodCallback<getActivePaymentGateways_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 {
1128
        super(client, protocolFactory, transport, resultHandler, false);
1129
      }
1130
 
1131
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1132
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getActivePaymentGateways", org.apache.thrift.protocol.TMessageType.CALL, 0));
1133
        getActivePaymentGateways_args args = new getActivePaymentGateways_args();
1134
        args.write(prot);
1135
        prot.writeMessageEnd();
1136
      }
1137
 
1138
      public List<PaymentGateway> getResult() throws PaymentException, org.apache.thrift.TException {
1139
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1140
          throw new IllegalStateException("Method call not finished!");
1141
        }
1142
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1143
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1144
        return (new Client(prot)).recv_getActivePaymentGateways();
1145
      }
1146
    }
1147
 
3430 rajveer 1148
    public void getPayment(long id, org.apache.thrift.async.AsyncMethodCallback<getPayment_call> resultHandler) throws org.apache.thrift.TException {
1149
      checkReady();
1150
      getPayment_call method_call = new getPayment_call(id, resultHandler, this, ___protocolFactory, ___transport);
1151
      this.___currentMethod = method_call;
1152
      ___manager.call(method_call);
1153
    }
1154
 
1155
    public static class getPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1156
      private long id;
1157
      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 {
1158
        super(client, protocolFactory, transport, resultHandler, false);
1159
        this.id = id;
1160
      }
1161
 
1162
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1163
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1164
        getPayment_args args = new getPayment_args();
1165
        args.setId(id);
1166
        args.write(prot);
1167
        prot.writeMessageEnd();
1168
      }
1169
 
1170
      public Payment getResult() throws PaymentException, org.apache.thrift.TException {
1171
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1172
          throw new IllegalStateException("Method call not finished!");
1173
        }
1174
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1175
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1176
        return (new Client(prot)).recv_getPayment();
1177
      }
1178
    }
1179
 
1180
    public void getPaymentForTxnId(long txnId, org.apache.thrift.async.AsyncMethodCallback<getPaymentForTxnId_call> resultHandler) throws org.apache.thrift.TException {
1181
      checkReady();
1182
      getPaymentForTxnId_call method_call = new getPaymentForTxnId_call(txnId, resultHandler, this, ___protocolFactory, ___transport);
1183
      this.___currentMethod = method_call;
1184
      ___manager.call(method_call);
1185
    }
1186
 
1187
    public static class getPaymentForTxnId_call extends org.apache.thrift.async.TAsyncMethodCall {
1188
      private long txnId;
1189
      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 {
1190
        super(client, protocolFactory, transport, resultHandler, false);
1191
        this.txnId = txnId;
1192
      }
1193
 
1194
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1195
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentForTxnId", org.apache.thrift.protocol.TMessageType.CALL, 0));
1196
        getPaymentForTxnId_args args = new getPaymentForTxnId_args();
1197
        args.setTxnId(txnId);
1198
        args.write(prot);
1199
        prot.writeMessageEnd();
1200
      }
1201
 
1202
      public List<Payment> getResult() throws PaymentException, org.apache.thrift.TException {
1203
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1204
          throw new IllegalStateException("Method call not finished!");
1205
        }
1206
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1207
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1208
        return (new Client(prot)).recv_getPaymentForTxnId();
1209
      }
1210
    }
1211
 
7049 anupam.sin 1212
    public void getPaymentForRechargeTxnId(long txnId, org.apache.thrift.async.AsyncMethodCallback<getPaymentForRechargeTxnId_call> resultHandler) throws org.apache.thrift.TException {
1213
      checkReady();
1214
      getPaymentForRechargeTxnId_call method_call = new getPaymentForRechargeTxnId_call(txnId, resultHandler, this, ___protocolFactory, ___transport);
1215
      this.___currentMethod = method_call;
1216
      ___manager.call(method_call);
1217
    }
1218
 
1219
    public static class getPaymentForRechargeTxnId_call extends org.apache.thrift.async.TAsyncMethodCall {
1220
      private long txnId;
1221
      public getPaymentForRechargeTxnId_call(long txnId, org.apache.thrift.async.AsyncMethodCallback<getPaymentForRechargeTxnId_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 {
1222
        super(client, protocolFactory, transport, resultHandler, false);
1223
        this.txnId = txnId;
1224
      }
1225
 
1226
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1227
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentForRechargeTxnId", org.apache.thrift.protocol.TMessageType.CALL, 0));
1228
        getPaymentForRechargeTxnId_args args = new getPaymentForRechargeTxnId_args();
1229
        args.setTxnId(txnId);
1230
        args.write(prot);
1231
        prot.writeMessageEnd();
1232
      }
1233
 
1234
      public List<Payment> getResult() throws PaymentException, org.apache.thrift.TException {
1235
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1236
          throw new IllegalStateException("Method call not finished!");
1237
        }
1238
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1239
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1240
        return (new Client(prot)).recv_getPaymentForRechargeTxnId();
1241
      }
1242
    }
1243
 
4600 varun.gupt 1244
    public void getSuccessfulPaymentForTxnId(long txnId, org.apache.thrift.async.AsyncMethodCallback<getSuccessfulPaymentForTxnId_call> resultHandler) throws org.apache.thrift.TException {
1245
      checkReady();
1246
      getSuccessfulPaymentForTxnId_call method_call = new getSuccessfulPaymentForTxnId_call(txnId, resultHandler, this, ___protocolFactory, ___transport);
1247
      this.___currentMethod = method_call;
1248
      ___manager.call(method_call);
1249
    }
1250
 
1251
    public static class getSuccessfulPaymentForTxnId_call extends org.apache.thrift.async.TAsyncMethodCall {
1252
      private long txnId;
1253
      public getSuccessfulPaymentForTxnId_call(long txnId, org.apache.thrift.async.AsyncMethodCallback<getSuccessfulPaymentForTxnId_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 {
1254
        super(client, protocolFactory, transport, resultHandler, false);
1255
        this.txnId = txnId;
1256
      }
1257
 
1258
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1259
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuccessfulPaymentForTxnId", org.apache.thrift.protocol.TMessageType.CALL, 0));
1260
        getSuccessfulPaymentForTxnId_args args = new getSuccessfulPaymentForTxnId_args();
1261
        args.setTxnId(txnId);
1262
        args.write(prot);
1263
        prot.writeMessageEnd();
1264
      }
1265
 
1266
      public Payment getResult() throws PaymentException, org.apache.thrift.TException {
1267
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1268
          throw new IllegalStateException("Method call not finished!");
1269
        }
1270
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1271
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1272
        return (new Client(prot)).recv_getSuccessfulPaymentForTxnId();
1273
      }
1274
    }
1275
 
3430 rajveer 1276
    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 {
1277
      checkReady();
1278
      updatePaymentDetails_call method_call = new updatePaymentDetails_call(id, gatewayPaymentId, sessionId, gatewayTxnStatus, description, gatewayTxnId, authCode, referenceCode, errorCode, status, gatewayTxnDate, attributes, resultHandler, this, ___protocolFactory, ___transport);
1279
      this.___currentMethod = method_call;
1280
      ___manager.call(method_call);
1281
    }
1282
 
1283
    public static class updatePaymentDetails_call extends org.apache.thrift.async.TAsyncMethodCall {
1284
      private long id;
1285
      private String gatewayPaymentId;
1286
      private String sessionId;
1287
      private String gatewayTxnStatus;
1288
      private String description;
1289
      private String gatewayTxnId;
1290
      private String authCode;
1291
      private String referenceCode;
1292
      private String errorCode;
1293
      private PaymentStatus status;
1294
      private String gatewayTxnDate;
1295
      private List<Attribute> attributes;
1296
      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 {
1297
        super(client, protocolFactory, transport, resultHandler, false);
1298
        this.id = id;
1299
        this.gatewayPaymentId = gatewayPaymentId;
1300
        this.sessionId = sessionId;
1301
        this.gatewayTxnStatus = gatewayTxnStatus;
1302
        this.description = description;
1303
        this.gatewayTxnId = gatewayTxnId;
1304
        this.authCode = authCode;
1305
        this.referenceCode = referenceCode;
1306
        this.errorCode = errorCode;
1307
        this.status = status;
1308
        this.gatewayTxnDate = gatewayTxnDate;
1309
        this.attributes = attributes;
1310
      }
1311
 
1312
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1313
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("updatePaymentDetails", org.apache.thrift.protocol.TMessageType.CALL, 0));
1314
        updatePaymentDetails_args args = new updatePaymentDetails_args();
1315
        args.setId(id);
1316
        args.setGatewayPaymentId(gatewayPaymentId);
1317
        args.setSessionId(sessionId);
1318
        args.setGatewayTxnStatus(gatewayTxnStatus);
1319
        args.setDescription(description);
1320
        args.setGatewayTxnId(gatewayTxnId);
1321
        args.setAuthCode(authCode);
1322
        args.setReferenceCode(referenceCode);
1323
        args.setErrorCode(errorCode);
1324
        args.setStatus(status);
1325
        args.setGatewayTxnDate(gatewayTxnDate);
1326
        args.setAttributes(attributes);
1327
        args.write(prot);
1328
        prot.writeMessageEnd();
1329
      }
1330
 
1331
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
1332
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1333
          throw new IllegalStateException("Method call not finished!");
1334
        }
1335
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1336
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1337
        return (new Client(prot)).recv_updatePaymentDetails();
1338
      }
1339
    }
1340
 
1341
    public void getSuccessfulPaymentsAmountRange(org.apache.thrift.async.AsyncMethodCallback<getSuccessfulPaymentsAmountRange_call> resultHandler) throws org.apache.thrift.TException {
1342
      checkReady();
1343
      getSuccessfulPaymentsAmountRange_call method_call = new getSuccessfulPaymentsAmountRange_call(resultHandler, this, ___protocolFactory, ___transport);
1344
      this.___currentMethod = method_call;
1345
      ___manager.call(method_call);
1346
    }
1347
 
1348
    public static class getSuccessfulPaymentsAmountRange_call extends org.apache.thrift.async.TAsyncMethodCall {
1349
      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 {
1350
        super(client, protocolFactory, transport, resultHandler, false);
1351
      }
1352
 
1353
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1354
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getSuccessfulPaymentsAmountRange", org.apache.thrift.protocol.TMessageType.CALL, 0));
1355
        getSuccessfulPaymentsAmountRange_args args = new getSuccessfulPaymentsAmountRange_args();
1356
        args.write(prot);
1357
        prot.writeMessageEnd();
1358
      }
1359
 
1360
      public List<Double> getResult() throws org.apache.thrift.TException {
1361
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1362
          throw new IllegalStateException("Method call not finished!");
1363
        }
1364
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1365
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1366
        return (new Client(prot)).recv_getSuccessfulPaymentsAmountRange();
1367
      }
1368
    }
1369
 
1370
    public void initializeHdfcPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<initializeHdfcPayment_call> resultHandler) throws org.apache.thrift.TException {
1371
      checkReady();
1372
      initializeHdfcPayment_call method_call = new initializeHdfcPayment_call(merchantPaymentId, resultHandler, this, ___protocolFactory, ___transport);
1373
      this.___currentMethod = method_call;
1374
      ___manager.call(method_call);
1375
    }
1376
 
1377
    public static class initializeHdfcPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1378
      private long merchantPaymentId;
1379
      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 {
1380
        super(client, protocolFactory, transport, resultHandler, false);
1381
        this.merchantPaymentId = merchantPaymentId;
1382
      }
1383
 
1384
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1385
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("initializeHdfcPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1386
        initializeHdfcPayment_args args = new initializeHdfcPayment_args();
1387
        args.setMerchantPaymentId(merchantPaymentId);
1388
        args.write(prot);
1389
        prot.writeMessageEnd();
1390
      }
1391
 
1392
      public String getResult() throws PaymentException, org.apache.thrift.TException {
1393
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1394
          throw new IllegalStateException("Method call not finished!");
1395
        }
1396
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1397
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1398
        return (new Client(prot)).recv_initializeHdfcPayment();
1399
      }
1400
    }
1401
 
6228 anupam.sin 1402
    public void doHdfcPaymentForDigitalOrder(long merchantPaymentId, long rechargeOrderId, String phone, org.apache.thrift.async.AsyncMethodCallback<doHdfcPaymentForDigitalOrder_call> resultHandler) throws org.apache.thrift.TException {
6050 anupam.sin 1403
      checkReady();
6228 anupam.sin 1404
      doHdfcPaymentForDigitalOrder_call method_call = new doHdfcPaymentForDigitalOrder_call(merchantPaymentId, rechargeOrderId, phone, resultHandler, this, ___protocolFactory, ___transport);
6050 anupam.sin 1405
      this.___currentMethod = method_call;
1406
      ___manager.call(method_call);
1407
    }
1408
 
1409
    public static class doHdfcPaymentForDigitalOrder_call extends org.apache.thrift.async.TAsyncMethodCall {
1410
      private long merchantPaymentId;
1411
      private long rechargeOrderId;
6228 anupam.sin 1412
      private String phone;
1413
      public doHdfcPaymentForDigitalOrder_call(long merchantPaymentId, long rechargeOrderId, String phone, org.apache.thrift.async.AsyncMethodCallback<doHdfcPaymentForDigitalOrder_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 {
6050 anupam.sin 1414
        super(client, protocolFactory, transport, resultHandler, false);
1415
        this.merchantPaymentId = merchantPaymentId;
1416
        this.rechargeOrderId = rechargeOrderId;
6228 anupam.sin 1417
        this.phone = phone;
6050 anupam.sin 1418
      }
1419
 
1420
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1421
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("doHdfcPaymentForDigitalOrder", org.apache.thrift.protocol.TMessageType.CALL, 0));
1422
        doHdfcPaymentForDigitalOrder_args args = new doHdfcPaymentForDigitalOrder_args();
1423
        args.setMerchantPaymentId(merchantPaymentId);
1424
        args.setRechargeOrderId(rechargeOrderId);
6228 anupam.sin 1425
        args.setPhone(phone);
6050 anupam.sin 1426
        args.write(prot);
1427
        prot.writeMessageEnd();
1428
      }
1429
 
1430
      public String getResult() throws PaymentException, org.apache.thrift.TException {
1431
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1432
          throw new IllegalStateException("Method call not finished!");
1433
        }
1434
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1435
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1436
        return (new Client(prot)).recv_doHdfcPaymentForDigitalOrder();
1437
      }
1438
    }
1439
 
3616 chandransh 1440
    public void initializeHdfcEmiPayment(long merchantPaymentId, org.apache.thrift.async.AsyncMethodCallback<initializeHdfcEmiPayment_call> resultHandler) throws org.apache.thrift.TException {
1441
      checkReady();
1442
      initializeHdfcEmiPayment_call method_call = new initializeHdfcEmiPayment_call(merchantPaymentId, resultHandler, this, ___protocolFactory, ___transport);
1443
      this.___currentMethod = method_call;
1444
      ___manager.call(method_call);
1445
    }
1446
 
1447
    public static class initializeHdfcEmiPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1448
      private long merchantPaymentId;
1449
      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 {
1450
        super(client, protocolFactory, transport, resultHandler, false);
1451
        this.merchantPaymentId = merchantPaymentId;
1452
      }
1453
 
1454
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1455
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("initializeHdfcEmiPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1456
        initializeHdfcEmiPayment_args args = new initializeHdfcEmiPayment_args();
1457
        args.setMerchantPaymentId(merchantPaymentId);
1458
        args.write(prot);
1459
        prot.writeMessageEnd();
1460
      }
1461
 
1462
      public String getResult() throws PaymentException, org.apache.thrift.TException {
1463
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1464
          throw new IllegalStateException("Method call not finished!");
1465
        }
1466
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1467
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1468
        return (new Client(prot)).recv_initializeHdfcEmiPayment();
1469
      }
1470
    }
1471
 
3430 rajveer 1472
    public void createRefund(long orderId, long merchantTxnId, double amount, org.apache.thrift.async.AsyncMethodCallback<createRefund_call> resultHandler) throws org.apache.thrift.TException {
1473
      checkReady();
1474
      createRefund_call method_call = new createRefund_call(orderId, merchantTxnId, amount, resultHandler, this, ___protocolFactory, ___transport);
1475
      this.___currentMethod = method_call;
1476
      ___manager.call(method_call);
1477
    }
1478
 
1479
    public static class createRefund_call extends org.apache.thrift.async.TAsyncMethodCall {
1480
      private long orderId;
1481
      private long merchantTxnId;
1482
      private double amount;
1483
      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 {
1484
        super(client, protocolFactory, transport, resultHandler, false);
1485
        this.orderId = orderId;
1486
        this.merchantTxnId = merchantTxnId;
1487
        this.amount = amount;
1488
      }
1489
 
1490
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1491
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("createRefund", org.apache.thrift.protocol.TMessageType.CALL, 0));
1492
        createRefund_args args = new createRefund_args();
1493
        args.setOrderId(orderId);
1494
        args.setMerchantTxnId(merchantTxnId);
1495
        args.setAmount(amount);
1496
        args.write(prot);
1497
        prot.writeMessageEnd();
1498
      }
1499
 
1500
      public long getResult() throws PaymentException, org.apache.thrift.TException {
1501
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1502
          throw new IllegalStateException("Method call not finished!");
1503
        }
1504
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1505
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1506
        return (new Client(prot)).recv_createRefund();
1507
      }
1508
    }
1509
 
8618 rajveer 1510
    public void capturePayment(long merchantTxnId, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<capturePayment_call> resultHandler) throws org.apache.thrift.TException {
3430 rajveer 1511
      checkReady();
8618 rajveer 1512
      capturePayment_call method_call = new capturePayment_call(merchantTxnId, isDigital, resultHandler, this, ___protocolFactory, ___transport);
3430 rajveer 1513
      this.___currentMethod = method_call;
1514
      ___manager.call(method_call);
1515
    }
1516
 
1517
    public static class capturePayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1518
      private long merchantTxnId;
8618 rajveer 1519
      private boolean isDigital;
1520
      public capturePayment_call(long merchantTxnId, boolean isDigital, 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 {
3430 rajveer 1521
        super(client, protocolFactory, transport, resultHandler, false);
1522
        this.merchantTxnId = merchantTxnId;
8618 rajveer 1523
        this.isDigital = isDigital;
3430 rajveer 1524
      }
1525
 
1526
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1527
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("capturePayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1528
        capturePayment_args args = new capturePayment_args();
1529
        args.setMerchantTxnId(merchantTxnId);
8618 rajveer 1530
        args.setIsDigital(isDigital);
3430 rajveer 1531
        args.write(prot);
1532
        prot.writeMessageEnd();
1533
      }
1534
 
1535
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
1536
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1537
          throw new IllegalStateException("Method call not finished!");
1538
        }
1539
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1540
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1541
        return (new Client(prot)).recv_capturePayment();
1542
      }
1543
    }
1544
 
6486 rajveer 1545
    public void refundPayment(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<refundPayment_call> resultHandler) throws org.apache.thrift.TException {
1546
      checkReady();
1547
      refundPayment_call method_call = new refundPayment_call(merchantTxnId, amount, isDigital, resultHandler, this, ___protocolFactory, ___transport);
1548
      this.___currentMethod = method_call;
1549
      ___manager.call(method_call);
1550
    }
1551
 
1552
    public static class refundPayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1553
      private long merchantTxnId;
1554
      private double amount;
1555
      private boolean isDigital;
1556
      public refundPayment_call(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<refundPayment_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 {
1557
        super(client, protocolFactory, transport, resultHandler, false);
1558
        this.merchantTxnId = merchantTxnId;
1559
        this.amount = amount;
1560
        this.isDigital = isDigital;
1561
      }
1562
 
1563
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1564
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("refundPayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1565
        refundPayment_args args = new refundPayment_args();
1566
        args.setMerchantTxnId(merchantTxnId);
1567
        args.setAmount(amount);
1568
        args.setIsDigital(isDigital);
1569
        args.write(prot);
1570
        prot.writeMessageEnd();
1571
      }
1572
 
1573
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
1574
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1575
          throw new IllegalStateException("Method call not finished!");
1576
        }
1577
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1578
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1579
        return (new Client(prot)).recv_refundPayment();
1580
      }
1581
    }
1582
 
3956 chandransh 1583
    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 {
1584
      checkReady();
1585
      partiallyCapturePayment_call method_call = new partiallyCapturePayment_call(merchantTxnId, amount, xferBy, xferTxnId, xferDate, resultHandler, this, ___protocolFactory, ___transport);
1586
      this.___currentMethod = method_call;
1587
      ___manager.call(method_call);
1588
    }
1589
 
1590
    public static class partiallyCapturePayment_call extends org.apache.thrift.async.TAsyncMethodCall {
1591
      private long merchantTxnId;
1592
      private double amount;
1593
      private String xferBy;
1594
      private String xferTxnId;
1595
      private long xferDate;
1596
      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 {
1597
        super(client, protocolFactory, transport, resultHandler, false);
1598
        this.merchantTxnId = merchantTxnId;
1599
        this.amount = amount;
1600
        this.xferBy = xferBy;
1601
        this.xferTxnId = xferTxnId;
1602
        this.xferDate = xferDate;
1603
      }
1604
 
1605
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1606
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("partiallyCapturePayment", org.apache.thrift.protocol.TMessageType.CALL, 0));
1607
        partiallyCapturePayment_args args = new partiallyCapturePayment_args();
1608
        args.setMerchantTxnId(merchantTxnId);
1609
        args.setAmount(amount);
1610
        args.setXferBy(xferBy);
1611
        args.setXferTxnId(xferTxnId);
1612
        args.setXferDate(xferDate);
1613
        args.write(prot);
1614
        prot.writeMessageEnd();
1615
      }
1616
 
1617
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
1618
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1619
          throw new IllegalStateException("Method call not finished!");
1620
        }
1621
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1622
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1623
        return (new Client(prot)).recv_partiallyCapturePayment();
1624
      }
1625
    }
1626
 
4008 mandeep.dh 1627
    public void getPaymentsRequiringExtraProcessing(ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<getPaymentsRequiringExtraProcessing_call> resultHandler) throws org.apache.thrift.TException {
1628
      checkReady();
1629
      getPaymentsRequiringExtraProcessing_call method_call = new getPaymentsRequiringExtraProcessing_call(category, resultHandler, this, ___protocolFactory, ___transport);
1630
      this.___currentMethod = method_call;
1631
      ___manager.call(method_call);
1632
    }
1633
 
1634
    public static class getPaymentsRequiringExtraProcessing_call extends org.apache.thrift.async.TAsyncMethodCall {
1635
      private ExtraPaymentProcessingType category;
1636
      public getPaymentsRequiringExtraProcessing_call(ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<getPaymentsRequiringExtraProcessing_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 {
1637
        super(client, protocolFactory, transport, resultHandler, false);
1638
        this.category = category;
1639
      }
1640
 
1641
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1642
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("getPaymentsRequiringExtraProcessing", org.apache.thrift.protocol.TMessageType.CALL, 0));
1643
        getPaymentsRequiringExtraProcessing_args args = new getPaymentsRequiringExtraProcessing_args();
1644
        args.setCategory(category);
1645
        args.write(prot);
1646
        prot.writeMessageEnd();
1647
      }
1648
 
1649
      public List<Long> getResult() throws org.apache.thrift.TException {
1650
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1651
          throw new IllegalStateException("Method call not finished!");
1652
        }
1653
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1654
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1655
        return (new Client(prot)).recv_getPaymentsRequiringExtraProcessing();
1656
      }
1657
    }
1658
 
1659
    public void markPaymentAsProcessed(long paymentId, ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<markPaymentAsProcessed_call> resultHandler) throws org.apache.thrift.TException {
1660
      checkReady();
1661
      markPaymentAsProcessed_call method_call = new markPaymentAsProcessed_call(paymentId, category, resultHandler, this, ___protocolFactory, ___transport);
1662
      this.___currentMethod = method_call;
1663
      ___manager.call(method_call);
1664
    }
1665
 
1666
    public static class markPaymentAsProcessed_call extends org.apache.thrift.async.TAsyncMethodCall {
1667
      private long paymentId;
1668
      private ExtraPaymentProcessingType category;
1669
      public markPaymentAsProcessed_call(long paymentId, ExtraPaymentProcessingType category, org.apache.thrift.async.AsyncMethodCallback<markPaymentAsProcessed_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 {
1670
        super(client, protocolFactory, transport, resultHandler, false);
1671
        this.paymentId = paymentId;
1672
        this.category = category;
1673
      }
1674
 
1675
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1676
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("markPaymentAsProcessed", org.apache.thrift.protocol.TMessageType.CALL, 0));
1677
        markPaymentAsProcessed_args args = new markPaymentAsProcessed_args();
1678
        args.setPaymentId(paymentId);
1679
        args.setCategory(category);
1680
        args.write(prot);
1681
        prot.writeMessageEnd();
1682
      }
1683
 
1684
      public void getResult() throws org.apache.thrift.TException {
1685
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1686
          throw new IllegalStateException("Method call not finished!");
1687
        }
1688
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1689
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1690
        (new Client(prot)).recv_markPaymentAsProcessed();
1691
      }
1692
    }
1693
 
8907 rajveer 1694
    public void validatePaymentAtGateway(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<validatePaymentAtGateway_call> resultHandler) throws org.apache.thrift.TException {
1695
      checkReady();
1696
      validatePaymentAtGateway_call method_call = new validatePaymentAtGateway_call(merchantTxnId, amount, isDigital, resultHandler, this, ___protocolFactory, ___transport);
1697
      this.___currentMethod = method_call;
1698
      ___manager.call(method_call);
1699
    }
1700
 
1701
    public static class validatePaymentAtGateway_call extends org.apache.thrift.async.TAsyncMethodCall {
1702
      private long merchantTxnId;
1703
      private double amount;
1704
      private boolean isDigital;
1705
      public validatePaymentAtGateway_call(long merchantTxnId, double amount, boolean isDigital, org.apache.thrift.async.AsyncMethodCallback<validatePaymentAtGateway_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 {
1706
        super(client, protocolFactory, transport, resultHandler, false);
1707
        this.merchantTxnId = merchantTxnId;
1708
        this.amount = amount;
1709
        this.isDigital = isDigital;
1710
      }
1711
 
1712
      public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
1713
        prot.writeMessageBegin(new org.apache.thrift.protocol.TMessage("validatePaymentAtGateway", org.apache.thrift.protocol.TMessageType.CALL, 0));
1714
        validatePaymentAtGateway_args args = new validatePaymentAtGateway_args();
1715
        args.setMerchantTxnId(merchantTxnId);
1716
        args.setAmount(amount);
1717
        args.setIsDigital(isDigital);
1718
        args.write(prot);
1719
        prot.writeMessageEnd();
1720
      }
1721
 
1722
      public boolean getResult() throws PaymentException, org.apache.thrift.TException {
1723
        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
1724
          throw new IllegalStateException("Method call not finished!");
1725
        }
1726
        org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
1727
        org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
1728
        return (new Client(prot)).recv_validatePaymentAtGateway();
1729
      }
1730
    }
1731
 
3430 rajveer 1732
  }
1733
 
1734
  public static class Processor<I extends Iface> extends in.shop2020.generic.GenericService.Processor implements org.apache.thrift.TProcessor {
1735
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1736
    public Processor(I iface) {
1737
      super(iface, getProcessMap(new HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
1738
    }
1739
 
1740
    protected Processor(I iface, Map<String,  org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
1741
      super(iface, getProcessMap(processMap));
1742
    }
1743
 
1744
    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) {
1745
      processMap.put("createPayment", new createPayment());
1746
      processMap.put("getPaymentsForUser", new getPaymentsForUser());
1747
      processMap.put("getPayments", new getPayments());
4141 chandransh 1748
      processMap.put("getPaymentsByCapturedDate", new getPaymentsByCapturedDate());
3430 rajveer 1749
      processMap.put("getPaymentGateway", new getPaymentGateway());
4600 varun.gupt 1750
      processMap.put("getActivePaymentGateways", new getActivePaymentGateways());
3430 rajveer 1751
      processMap.put("getPayment", new getPayment());
1752
      processMap.put("getPaymentForTxnId", new getPaymentForTxnId());
7049 anupam.sin 1753
      processMap.put("getPaymentForRechargeTxnId", new getPaymentForRechargeTxnId());
4600 varun.gupt 1754
      processMap.put("getSuccessfulPaymentForTxnId", new getSuccessfulPaymentForTxnId());
3430 rajveer 1755
      processMap.put("updatePaymentDetails", new updatePaymentDetails());
1756
      processMap.put("getSuccessfulPaymentsAmountRange", new getSuccessfulPaymentsAmountRange());
1757
      processMap.put("initializeHdfcPayment", new initializeHdfcPayment());
6050 anupam.sin 1758
      processMap.put("doHdfcPaymentForDigitalOrder", new doHdfcPaymentForDigitalOrder());
3616 chandransh 1759
      processMap.put("initializeHdfcEmiPayment", new initializeHdfcEmiPayment());
3430 rajveer 1760
      processMap.put("createRefund", new createRefund());
1761
      processMap.put("capturePayment", new capturePayment());
6486 rajveer 1762
      processMap.put("refundPayment", new refundPayment());
3956 chandransh 1763
      processMap.put("partiallyCapturePayment", new partiallyCapturePayment());
4008 mandeep.dh 1764
      processMap.put("getPaymentsRequiringExtraProcessing", new getPaymentsRequiringExtraProcessing());
1765
      processMap.put("markPaymentAsProcessed", new markPaymentAsProcessed());
8907 rajveer 1766
      processMap.put("validatePaymentAtGateway", new validatePaymentAtGateway());
3430 rajveer 1767
      return processMap;
1768
    }
1769
 
1770
    private static class createPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createPayment_args> {
1771
      public createPayment() {
1772
        super("createPayment");
1773
      }
1774
 
1775
      protected createPayment_args getEmptyArgsInstance() {
1776
        return new createPayment_args();
1777
      }
1778
 
1779
      protected createPayment_result getResult(I iface, createPayment_args args) throws org.apache.thrift.TException {
123 ashish 1780
        createPayment_result result = new createPayment_result();
1781
        try {
6050 anupam.sin 1782
          result.success = iface.createPayment(args.userId, args.amount, args.gatewayId, args.txnId, args.isDigital);
420 ashish 1783
          result.setSuccessIsSet(true);
123 ashish 1784
        } catch (PaymentException pe) {
1785
          result.pe = pe;
1786
        }
3430 rajveer 1787
        return result;
123 ashish 1788
      }
1789
    }
1790
 
3430 rajveer 1791
    private static class getPaymentsForUser<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentsForUser_args> {
1792
      public getPaymentsForUser() {
1793
        super("getPaymentsForUser");
1794
      }
1795
 
1796
      protected getPaymentsForUser_args getEmptyArgsInstance() {
1797
        return new getPaymentsForUser_args();
1798
      }
1799
 
1800
      protected getPaymentsForUser_result getResult(I iface, getPaymentsForUser_args args) throws org.apache.thrift.TException {
123 ashish 1801
        getPaymentsForUser_result result = new getPaymentsForUser_result();
1802
        try {
3430 rajveer 1803
          result.success = iface.getPaymentsForUser(args.userId, args.fromTime, args.toTime, args.status, args.gatewayId);
123 ashish 1804
        } catch (PaymentException pe) {
1805
          result.pe = pe;
1806
        }
3430 rajveer 1807
        return result;
123 ashish 1808
      }
1809
    }
1810
 
3430 rajveer 1811
    private static class getPayments<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPayments_args> {
1812
      public getPayments() {
1813
        super("getPayments");
1814
      }
1815
 
1816
      protected getPayments_args getEmptyArgsInstance() {
1817
        return new getPayments_args();
1818
      }
1819
 
1820
      protected getPayments_result getResult(I iface, getPayments_args args) throws org.apache.thrift.TException {
123 ashish 1821
        getPayments_result result = new getPayments_result();
1822
        try {
3430 rajveer 1823
          result.success = iface.getPayments(args.fromTime, args.toTime, args.status, args.gatewayId);
123 ashish 1824
        } catch (PaymentException pe) {
1825
          result.pe = pe;
1826
        }
3430 rajveer 1827
        return result;
123 ashish 1828
      }
1829
    }
1830
 
4141 chandransh 1831
    private static class getPaymentsByCapturedDate<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentsByCapturedDate_args> {
1832
      public getPaymentsByCapturedDate() {
1833
        super("getPaymentsByCapturedDate");
1834
      }
1835
 
1836
      protected getPaymentsByCapturedDate_args getEmptyArgsInstance() {
1837
        return new getPaymentsByCapturedDate_args();
1838
      }
1839
 
1840
      protected getPaymentsByCapturedDate_result getResult(I iface, getPaymentsByCapturedDate_args args) throws org.apache.thrift.TException {
1841
        getPaymentsByCapturedDate_result result = new getPaymentsByCapturedDate_result();
1842
        try {
1843
          result.success = iface.getPaymentsByCapturedDate(args.fromTime, args.toTime, args.gatewayId);
1844
        } catch (PaymentException pe) {
1845
          result.pe = pe;
1846
        }
1847
        return result;
1848
      }
1849
    }
1850
 
3430 rajveer 1851
    private static class getPaymentGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentGateway_args> {
1852
      public getPaymentGateway() {
1853
        super("getPaymentGateway");
1854
      }
1855
 
1856
      protected getPaymentGateway_args getEmptyArgsInstance() {
1857
        return new getPaymentGateway_args();
1858
      }
1859
 
1860
      protected getPaymentGateway_result getResult(I iface, getPaymentGateway_args args) throws org.apache.thrift.TException {
420 ashish 1861
        getPaymentGateway_result result = new getPaymentGateway_result();
1862
        try {
3430 rajveer 1863
          result.success = iface.getPaymentGateway(args.id);
420 ashish 1864
        } catch (PaymentException pe) {
1865
          result.pe = pe;
1866
        }
3430 rajveer 1867
        return result;
420 ashish 1868
      }
1869
    }
1870
 
4600 varun.gupt 1871
    private static class getActivePaymentGateways<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getActivePaymentGateways_args> {
1872
      public getActivePaymentGateways() {
1873
        super("getActivePaymentGateways");
1874
      }
1875
 
1876
      protected getActivePaymentGateways_args getEmptyArgsInstance() {
1877
        return new getActivePaymentGateways_args();
1878
      }
1879
 
1880
      protected getActivePaymentGateways_result getResult(I iface, getActivePaymentGateways_args args) throws org.apache.thrift.TException {
1881
        getActivePaymentGateways_result result = new getActivePaymentGateways_result();
1882
        try {
1883
          result.success = iface.getActivePaymentGateways();
1884
        } catch (PaymentException pe) {
1885
          result.pe = pe;
1886
        }
1887
        return result;
1888
      }
1889
    }
1890
 
3430 rajveer 1891
    private static class getPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPayment_args> {
1892
      public getPayment() {
1893
        super("getPayment");
1894
      }
1895
 
1896
      protected getPayment_args getEmptyArgsInstance() {
1897
        return new getPayment_args();
1898
      }
1899
 
1900
      protected getPayment_result getResult(I iface, getPayment_args args) throws org.apache.thrift.TException {
695 rajveer 1901
        getPayment_result result = new getPayment_result();
420 ashish 1902
        try {
3430 rajveer 1903
          result.success = iface.getPayment(args.id);
420 ashish 1904
        } catch (PaymentException pe) {
1905
          result.pe = pe;
1906
        }
3430 rajveer 1907
        return result;
420 ashish 1908
      }
1909
    }
1910
 
3430 rajveer 1911
    private static class getPaymentForTxnId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentForTxnId_args> {
1912
      public getPaymentForTxnId() {
1913
        super("getPaymentForTxnId");
1914
      }
1915
 
1916
      protected getPaymentForTxnId_args getEmptyArgsInstance() {
1917
        return new getPaymentForTxnId_args();
1918
      }
1919
 
1920
      protected getPaymentForTxnId_result getResult(I iface, getPaymentForTxnId_args args) throws org.apache.thrift.TException {
695 rajveer 1921
        getPaymentForTxnId_result result = new getPaymentForTxnId_result();
420 ashish 1922
        try {
3430 rajveer 1923
          result.success = iface.getPaymentForTxnId(args.txnId);
420 ashish 1924
        } catch (PaymentException pe) {
1925
          result.pe = pe;
1926
        }
3430 rajveer 1927
        return result;
420 ashish 1928
      }
1929
    }
1930
 
7049 anupam.sin 1931
    private static class getPaymentForRechargeTxnId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentForRechargeTxnId_args> {
1932
      public getPaymentForRechargeTxnId() {
1933
        super("getPaymentForRechargeTxnId");
1934
      }
1935
 
1936
      protected getPaymentForRechargeTxnId_args getEmptyArgsInstance() {
1937
        return new getPaymentForRechargeTxnId_args();
1938
      }
1939
 
1940
      protected getPaymentForRechargeTxnId_result getResult(I iface, getPaymentForRechargeTxnId_args args) throws org.apache.thrift.TException {
1941
        getPaymentForRechargeTxnId_result result = new getPaymentForRechargeTxnId_result();
1942
        try {
1943
          result.success = iface.getPaymentForRechargeTxnId(args.txnId);
1944
        } catch (PaymentException pe) {
1945
          result.pe = pe;
1946
        }
1947
        return result;
1948
      }
1949
    }
1950
 
4600 varun.gupt 1951
    private static class getSuccessfulPaymentForTxnId<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuccessfulPaymentForTxnId_args> {
1952
      public getSuccessfulPaymentForTxnId() {
1953
        super("getSuccessfulPaymentForTxnId");
1954
      }
1955
 
1956
      protected getSuccessfulPaymentForTxnId_args getEmptyArgsInstance() {
1957
        return new getSuccessfulPaymentForTxnId_args();
1958
      }
1959
 
1960
      protected getSuccessfulPaymentForTxnId_result getResult(I iface, getSuccessfulPaymentForTxnId_args args) throws org.apache.thrift.TException {
1961
        getSuccessfulPaymentForTxnId_result result = new getSuccessfulPaymentForTxnId_result();
1962
        try {
1963
          result.success = iface.getSuccessfulPaymentForTxnId(args.txnId);
1964
        } catch (PaymentException pe) {
1965
          result.pe = pe;
1966
        }
1967
        return result;
1968
      }
1969
    }
1970
 
3430 rajveer 1971
    private static class updatePaymentDetails<I extends Iface> extends org.apache.thrift.ProcessFunction<I, updatePaymentDetails_args> {
1972
      public updatePaymentDetails() {
1973
        super("updatePaymentDetails");
1974
      }
1975
 
1976
      protected updatePaymentDetails_args getEmptyArgsInstance() {
1977
        return new updatePaymentDetails_args();
1978
      }
1979
 
1980
      protected updatePaymentDetails_result getResult(I iface, updatePaymentDetails_args args) throws org.apache.thrift.TException {
695 rajveer 1981
        updatePaymentDetails_result result = new updatePaymentDetails_result();
420 ashish 1982
        try {
3430 rajveer 1983
          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 1984
          result.setSuccessIsSet(true);
420 ashish 1985
        } catch (PaymentException pe) {
1986
          result.pe = pe;
1987
        }
3430 rajveer 1988
        return result;
420 ashish 1989
      }
1990
    }
1991
 
3430 rajveer 1992
    private static class getSuccessfulPaymentsAmountRange<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getSuccessfulPaymentsAmountRange_args> {
1993
      public getSuccessfulPaymentsAmountRange() {
1994
        super("getSuccessfulPaymentsAmountRange");
1995
      }
1996
 
1997
      protected getSuccessfulPaymentsAmountRange_args getEmptyArgsInstance() {
1998
        return new getSuccessfulPaymentsAmountRange_args();
1999
      }
2000
 
2001
      protected getSuccessfulPaymentsAmountRange_result getResult(I iface, getSuccessfulPaymentsAmountRange_args args) throws org.apache.thrift.TException {
1731 ankur.sing 2002
        getSuccessfulPaymentsAmountRange_result result = new getSuccessfulPaymentsAmountRange_result();
3430 rajveer 2003
        result.success = iface.getSuccessfulPaymentsAmountRange();
2004
        return result;
1629 ankur.sing 2005
      }
2006
    }
2007
 
3430 rajveer 2008
    private static class initializeHdfcPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, initializeHdfcPayment_args> {
2009
      public initializeHdfcPayment() {
2010
        super("initializeHdfcPayment");
2011
      }
2012
 
2013
      protected initializeHdfcPayment_args getEmptyArgsInstance() {
2014
        return new initializeHdfcPayment_args();
2015
      }
2016
 
2017
      protected initializeHdfcPayment_result getResult(I iface, initializeHdfcPayment_args args) throws org.apache.thrift.TException {
2462 chandransh 2018
        initializeHdfcPayment_result result = new initializeHdfcPayment_result();
2019
        try {
3430 rajveer 2020
          result.success = iface.initializeHdfcPayment(args.merchantPaymentId);
2462 chandransh 2021
        } catch (PaymentException pe) {
2022
          result.pe = pe;
2023
        }
3430 rajveer 2024
        return result;
2462 chandransh 2025
      }
2026
    }
2027
 
6050 anupam.sin 2028
    private static class doHdfcPaymentForDigitalOrder<I extends Iface> extends org.apache.thrift.ProcessFunction<I, doHdfcPaymentForDigitalOrder_args> {
2029
      public doHdfcPaymentForDigitalOrder() {
2030
        super("doHdfcPaymentForDigitalOrder");
2031
      }
2032
 
2033
      protected doHdfcPaymentForDigitalOrder_args getEmptyArgsInstance() {
2034
        return new doHdfcPaymentForDigitalOrder_args();
2035
      }
2036
 
2037
      protected doHdfcPaymentForDigitalOrder_result getResult(I iface, doHdfcPaymentForDigitalOrder_args args) throws org.apache.thrift.TException {
2038
        doHdfcPaymentForDigitalOrder_result result = new doHdfcPaymentForDigitalOrder_result();
2039
        try {
6228 anupam.sin 2040
          result.success = iface.doHdfcPaymentForDigitalOrder(args.merchantPaymentId, args.rechargeOrderId, args.phone);
6050 anupam.sin 2041
        } catch (PaymentException pe) {
2042
          result.pe = pe;
2043
        }
2044
        return result;
2045
      }
2046
    }
2047
 
3616 chandransh 2048
    private static class initializeHdfcEmiPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, initializeHdfcEmiPayment_args> {
2049
      public initializeHdfcEmiPayment() {
2050
        super("initializeHdfcEmiPayment");
2051
      }
2052
 
2053
      protected initializeHdfcEmiPayment_args getEmptyArgsInstance() {
2054
        return new initializeHdfcEmiPayment_args();
2055
      }
2056
 
2057
      protected initializeHdfcEmiPayment_result getResult(I iface, initializeHdfcEmiPayment_args args) throws org.apache.thrift.TException {
2058
        initializeHdfcEmiPayment_result result = new initializeHdfcEmiPayment_result();
2059
        try {
2060
          result.success = iface.initializeHdfcEmiPayment(args.merchantPaymentId);
2061
        } catch (PaymentException pe) {
2062
          result.pe = pe;
2063
        }
2064
        return result;
2065
      }
2066
    }
2067
 
3430 rajveer 2068
    private static class createRefund<I extends Iface> extends org.apache.thrift.ProcessFunction<I, createRefund_args> {
2069
      public createRefund() {
2070
        super("createRefund");
2071
      }
2072
 
2073
      protected createRefund_args getEmptyArgsInstance() {
2074
        return new createRefund_args();
2075
      }
2076
 
2077
      protected createRefund_result getResult(I iface, createRefund_args args) throws org.apache.thrift.TException {
2690 chandransh 2078
        createRefund_result result = new createRefund_result();
2079
        try {
3430 rajveer 2080
          result.success = iface.createRefund(args.orderId, args.merchantTxnId, args.amount);
2690 chandransh 2081
          result.setSuccessIsSet(true);
2082
        } catch (PaymentException pe) {
2083
          result.pe = pe;
2084
        }
3430 rajveer 2085
        return result;
2690 chandransh 2086
      }
2087
    }
2088
 
3430 rajveer 2089
    private static class capturePayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, capturePayment_args> {
2090
      public capturePayment() {
2091
        super("capturePayment");
2092
      }
2093
 
2094
      protected capturePayment_args getEmptyArgsInstance() {
2095
        return new capturePayment_args();
2096
      }
2097
 
2098
      protected capturePayment_result getResult(I iface, capturePayment_args args) throws org.apache.thrift.TException {
3010 chandransh 2099
        capturePayment_result result = new capturePayment_result();
2100
        try {
8618 rajveer 2101
          result.success = iface.capturePayment(args.merchantTxnId, args.isDigital);
3010 chandransh 2102
          result.setSuccessIsSet(true);
2103
        } catch (PaymentException pe) {
2104
          result.pe = pe;
2105
        }
3430 rajveer 2106
        return result;
3010 chandransh 2107
      }
2108
    }
2109
 
6486 rajveer 2110
    private static class refundPayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, refundPayment_args> {
2111
      public refundPayment() {
2112
        super("refundPayment");
2113
      }
2114
 
2115
      protected refundPayment_args getEmptyArgsInstance() {
2116
        return new refundPayment_args();
2117
      }
2118
 
2119
      protected refundPayment_result getResult(I iface, refundPayment_args args) throws org.apache.thrift.TException {
2120
        refundPayment_result result = new refundPayment_result();
2121
        try {
2122
          result.success = iface.refundPayment(args.merchantTxnId, args.amount, args.isDigital);
2123
          result.setSuccessIsSet(true);
2124
        } catch (PaymentException pe) {
2125
          result.pe = pe;
2126
        }
2127
        return result;
2128
      }
2129
    }
2130
 
3956 chandransh 2131
    private static class partiallyCapturePayment<I extends Iface> extends org.apache.thrift.ProcessFunction<I, partiallyCapturePayment_args> {
2132
      public partiallyCapturePayment() {
2133
        super("partiallyCapturePayment");
2134
      }
2135
 
2136
      protected partiallyCapturePayment_args getEmptyArgsInstance() {
2137
        return new partiallyCapturePayment_args();
2138
      }
2139
 
2140
      protected partiallyCapturePayment_result getResult(I iface, partiallyCapturePayment_args args) throws org.apache.thrift.TException {
2141
        partiallyCapturePayment_result result = new partiallyCapturePayment_result();
2142
        try {
2143
          result.success = iface.partiallyCapturePayment(args.merchantTxnId, args.amount, args.xferBy, args.xferTxnId, args.xferDate);
2144
          result.setSuccessIsSet(true);
2145
        } catch (PaymentException pe) {
2146
          result.pe = pe;
2147
        }
2148
        return result;
2149
      }
2150
    }
2151
 
4008 mandeep.dh 2152
    private static class getPaymentsRequiringExtraProcessing<I extends Iface> extends org.apache.thrift.ProcessFunction<I, getPaymentsRequiringExtraProcessing_args> {
2153
      public getPaymentsRequiringExtraProcessing() {
2154
        super("getPaymentsRequiringExtraProcessing");
2155
      }
2156
 
2157
      protected getPaymentsRequiringExtraProcessing_args getEmptyArgsInstance() {
2158
        return new getPaymentsRequiringExtraProcessing_args();
2159
      }
2160
 
2161
      protected getPaymentsRequiringExtraProcessing_result getResult(I iface, getPaymentsRequiringExtraProcessing_args args) throws org.apache.thrift.TException {
2162
        getPaymentsRequiringExtraProcessing_result result = new getPaymentsRequiringExtraProcessing_result();
2163
        result.success = iface.getPaymentsRequiringExtraProcessing(args.category);
2164
        return result;
2165
      }
2166
    }
2167
 
2168
    private static class markPaymentAsProcessed<I extends Iface> extends org.apache.thrift.ProcessFunction<I, markPaymentAsProcessed_args> {
2169
      public markPaymentAsProcessed() {
2170
        super("markPaymentAsProcessed");
2171
      }
2172
 
2173
      protected markPaymentAsProcessed_args getEmptyArgsInstance() {
2174
        return new markPaymentAsProcessed_args();
2175
      }
2176
 
2177
      protected markPaymentAsProcessed_result getResult(I iface, markPaymentAsProcessed_args args) throws org.apache.thrift.TException {
2178
        markPaymentAsProcessed_result result = new markPaymentAsProcessed_result();
2179
        iface.markPaymentAsProcessed(args.paymentId, args.category);
2180
        return result;
2181
      }
2182
    }
2183
 
8907 rajveer 2184
    private static class validatePaymentAtGateway<I extends Iface> extends org.apache.thrift.ProcessFunction<I, validatePaymentAtGateway_args> {
2185
      public validatePaymentAtGateway() {
2186
        super("validatePaymentAtGateway");
2187
      }
2188
 
2189
      protected validatePaymentAtGateway_args getEmptyArgsInstance() {
2190
        return new validatePaymentAtGateway_args();
2191
      }
2192
 
2193
      protected validatePaymentAtGateway_result getResult(I iface, validatePaymentAtGateway_args args) throws org.apache.thrift.TException {
2194
        validatePaymentAtGateway_result result = new validatePaymentAtGateway_result();
2195
        try {
2196
          result.success = iface.validatePaymentAtGateway(args.merchantTxnId, args.amount, args.isDigital);
2197
          result.setSuccessIsSet(true);
2198
        } catch (PaymentException pe) {
2199
          result.pe = pe;
2200
        }
2201
        return result;
2202
      }
2203
    }
2204
 
123 ashish 2205
  }
2206
 
3430 rajveer 2207
  public static class createPayment_args implements org.apache.thrift.TBase<createPayment_args, createPayment_args._Fields>, java.io.Serializable, Cloneable   {
2208
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPayment_args");
123 ashish 2209
 
3430 rajveer 2210
    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);
2211
    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);
2212
    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);
2213
    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);
6050 anupam.sin 2214
    private static final org.apache.thrift.protocol.TField IS_DIGITAL_FIELD_DESC = new org.apache.thrift.protocol.TField("isDigital", org.apache.thrift.protocol.TType.BOOL, (short)5);
123 ashish 2215
 
3430 rajveer 2216
    private long userId; // required
2217
    private double amount; // required
2218
    private long gatewayId; // required
2219
    private long txnId; // required
6050 anupam.sin 2220
    private boolean isDigital; // required
123 ashish 2221
 
2222
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2223
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 2224
      USER_ID((short)1, "userId"),
2225
      AMOUNT((short)2, "amount"),
2226
      GATEWAY_ID((short)3, "gatewayId"),
6050 anupam.sin 2227
      TXN_ID((short)4, "txnId"),
2228
      IS_DIGITAL((short)5, "isDigital");
123 ashish 2229
 
2230
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2231
 
2232
      static {
2233
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2234
          byName.put(field.getFieldName(), field);
2235
        }
2236
      }
2237
 
2238
      /**
2239
       * Find the _Fields constant that matches fieldId, or null if its not found.
2240
       */
2241
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2242
        switch(fieldId) {
2243
          case 1: // USER_ID
2244
            return USER_ID;
2245
          case 2: // AMOUNT
2246
            return AMOUNT;
2247
          case 3: // GATEWAY_ID
2248
            return GATEWAY_ID;
2249
          case 4: // TXN_ID
2250
            return TXN_ID;
6050 anupam.sin 2251
          case 5: // IS_DIGITAL
2252
            return IS_DIGITAL;
3430 rajveer 2253
          default:
2254
            return null;
2255
        }
123 ashish 2256
      }
2257
 
2258
      /**
2259
       * Find the _Fields constant that matches fieldId, throwing an exception
2260
       * if it is not found.
2261
       */
2262
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2263
        _Fields fields = findByThriftId(fieldId);
2264
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2265
        return fields;
2266
      }
2267
 
2268
      /**
2269
       * Find the _Fields constant that matches name, or null if its not found.
2270
       */
2271
      public static _Fields findByName(String name) {
2272
        return byName.get(name);
2273
      }
2274
 
2275
      private final short _thriftId;
2276
      private final String _fieldName;
2277
 
2278
      _Fields(short thriftId, String fieldName) {
2279
        _thriftId = thriftId;
2280
        _fieldName = fieldName;
2281
      }
2282
 
2283
      public short getThriftFieldId() {
2284
        return _thriftId;
2285
      }
2286
 
2287
      public String getFieldName() {
2288
        return _fieldName;
2289
      }
2290
    }
2291
 
2292
    // isset id assignments
695 rajveer 2293
    private static final int __USERID_ISSET_ID = 0;
2294
    private static final int __AMOUNT_ISSET_ID = 1;
2295
    private static final int __GATEWAYID_ISSET_ID = 2;
2296
    private static final int __TXNID_ISSET_ID = 3;
6050 anupam.sin 2297
    private static final int __ISDIGITAL_ISSET_ID = 4;
2298
    private BitSet __isset_bit_vector = new BitSet(5);
123 ashish 2299
 
3430 rajveer 2300
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 2301
    static {
3430 rajveer 2302
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2303
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2304
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2305
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2306
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
2307
      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2308
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2309
      tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2310
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6050 anupam.sin 2311
      tmpMap.put(_Fields.IS_DIGITAL, new org.apache.thrift.meta_data.FieldMetaData("isDigital", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2312
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
3430 rajveer 2313
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2314
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPayment_args.class, metaDataMap);
123 ashish 2315
    }
2316
 
2317
    public createPayment_args() {
2318
    }
2319
 
2320
    public createPayment_args(
695 rajveer 2321
      long userId,
123 ashish 2322
      double amount,
695 rajveer 2323
      long gatewayId,
6050 anupam.sin 2324
      long txnId,
2325
      boolean isDigital)
123 ashish 2326
    {
2327
      this();
695 rajveer 2328
      this.userId = userId;
2329
      setUserIdIsSet(true);
123 ashish 2330
      this.amount = amount;
2331
      setAmountIsSet(true);
695 rajveer 2332
      this.gatewayId = gatewayId;
2333
      setGatewayIdIsSet(true);
2334
      this.txnId = txnId;
2335
      setTxnIdIsSet(true);
6050 anupam.sin 2336
      this.isDigital = isDigital;
2337
      setIsDigitalIsSet(true);
123 ashish 2338
    }
2339
 
2340
    /**
2341
     * Performs a deep copy on <i>other</i>.
2342
     */
2343
    public createPayment_args(createPayment_args other) {
2344
      __isset_bit_vector.clear();
2345
      __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 2346
      this.userId = other.userId;
123 ashish 2347
      this.amount = other.amount;
695 rajveer 2348
      this.gatewayId = other.gatewayId;
2349
      this.txnId = other.txnId;
6050 anupam.sin 2350
      this.isDigital = other.isDigital;
123 ashish 2351
    }
2352
 
2353
    public createPayment_args deepCopy() {
2354
      return new createPayment_args(this);
2355
    }
2356
 
3430 rajveer 2357
    @Override
2358
    public void clear() {
2359
      setUserIdIsSet(false);
2360
      this.userId = 0;
2361
      setAmountIsSet(false);
2362
      this.amount = 0.0;
2363
      setGatewayIdIsSet(false);
2364
      this.gatewayId = 0;
2365
      setTxnIdIsSet(false);
2366
      this.txnId = 0;
6050 anupam.sin 2367
      setIsDigitalIsSet(false);
2368
      this.isDigital = false;
123 ashish 2369
    }
2370
 
695 rajveer 2371
    public long getUserId() {
2372
      return this.userId;
123 ashish 2373
    }
2374
 
3430 rajveer 2375
    public void setUserId(long userId) {
695 rajveer 2376
      this.userId = userId;
2377
      setUserIdIsSet(true);
123 ashish 2378
    }
2379
 
695 rajveer 2380
    public void unsetUserId() {
2381
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 2382
    }
2383
 
3430 rajveer 2384
    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
695 rajveer 2385
    public boolean isSetUserId() {
2386
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 2387
    }
2388
 
695 rajveer 2389
    public void setUserIdIsSet(boolean value) {
2390
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
123 ashish 2391
    }
2392
 
2393
    public double getAmount() {
2394
      return this.amount;
2395
    }
2396
 
3430 rajveer 2397
    public void setAmount(double amount) {
123 ashish 2398
      this.amount = amount;
2399
      setAmountIsSet(true);
2400
    }
2401
 
2402
    public void unsetAmount() {
2403
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
2404
    }
2405
 
3430 rajveer 2406
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
123 ashish 2407
    public boolean isSetAmount() {
2408
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
2409
    }
2410
 
2411
    public void setAmountIsSet(boolean value) {
2412
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
2413
    }
2414
 
695 rajveer 2415
    public long getGatewayId() {
2416
      return this.gatewayId;
123 ashish 2417
    }
2418
 
3430 rajveer 2419
    public void setGatewayId(long gatewayId) {
695 rajveer 2420
      this.gatewayId = gatewayId;
2421
      setGatewayIdIsSet(true);
123 ashish 2422
    }
2423
 
695 rajveer 2424
    public void unsetGatewayId() {
2425
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 2426
    }
2427
 
3430 rajveer 2428
    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
695 rajveer 2429
    public boolean isSetGatewayId() {
2430
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 2431
    }
2432
 
695 rajveer 2433
    public void setGatewayIdIsSet(boolean value) {
2434
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
123 ashish 2435
    }
2436
 
695 rajveer 2437
    public long getTxnId() {
2438
      return this.txnId;
2439
    }
2440
 
3430 rajveer 2441
    public void setTxnId(long txnId) {
695 rajveer 2442
      this.txnId = txnId;
2443
      setTxnIdIsSet(true);
2444
    }
2445
 
2446
    public void unsetTxnId() {
2447
      __isset_bit_vector.clear(__TXNID_ISSET_ID);
2448
    }
2449
 
3430 rajveer 2450
    /** Returns true if field txnId is set (has been assigned a value) and false otherwise */
695 rajveer 2451
    public boolean isSetTxnId() {
2452
      return __isset_bit_vector.get(__TXNID_ISSET_ID);
2453
    }
2454
 
2455
    public void setTxnIdIsSet(boolean value) {
2456
      __isset_bit_vector.set(__TXNID_ISSET_ID, value);
2457
    }
2458
 
6050 anupam.sin 2459
    public boolean isIsDigital() {
2460
      return this.isDigital;
2461
    }
2462
 
2463
    public void setIsDigital(boolean isDigital) {
2464
      this.isDigital = isDigital;
2465
      setIsDigitalIsSet(true);
2466
    }
2467
 
2468
    public void unsetIsDigital() {
2469
      __isset_bit_vector.clear(__ISDIGITAL_ISSET_ID);
2470
    }
2471
 
2472
    /** Returns true if field isDigital is set (has been assigned a value) and false otherwise */
2473
    public boolean isSetIsDigital() {
2474
      return __isset_bit_vector.get(__ISDIGITAL_ISSET_ID);
2475
    }
2476
 
2477
    public void setIsDigitalIsSet(boolean value) {
2478
      __isset_bit_vector.set(__ISDIGITAL_ISSET_ID, value);
2479
    }
2480
 
123 ashish 2481
    public void setFieldValue(_Fields field, Object value) {
2482
      switch (field) {
2483
      case USER_ID:
2484
        if (value == null) {
695 rajveer 2485
          unsetUserId();
123 ashish 2486
        } else {
695 rajveer 2487
          setUserId((Long)value);
123 ashish 2488
        }
2489
        break;
2490
 
695 rajveer 2491
      case AMOUNT:
123 ashish 2492
        if (value == null) {
695 rajveer 2493
          unsetAmount();
123 ashish 2494
        } else {
695 rajveer 2495
          setAmount((Double)value);
123 ashish 2496
        }
2497
        break;
2498
 
695 rajveer 2499
      case GATEWAY_ID:
123 ashish 2500
        if (value == null) {
695 rajveer 2501
          unsetGatewayId();
123 ashish 2502
        } else {
695 rajveer 2503
          setGatewayId((Long)value);
123 ashish 2504
        }
2505
        break;
2506
 
695 rajveer 2507
      case TXN_ID:
123 ashish 2508
        if (value == null) {
695 rajveer 2509
          unsetTxnId();
123 ashish 2510
        } else {
695 rajveer 2511
          setTxnId((Long)value);
123 ashish 2512
        }
2513
        break;
2514
 
6050 anupam.sin 2515
      case IS_DIGITAL:
2516
        if (value == null) {
2517
          unsetIsDigital();
2518
        } else {
2519
          setIsDigital((Boolean)value);
2520
        }
2521
        break;
2522
 
123 ashish 2523
      }
2524
    }
2525
 
2526
    public Object getFieldValue(_Fields field) {
2527
      switch (field) {
2528
      case USER_ID:
3430 rajveer 2529
        return Long.valueOf(getUserId());
123 ashish 2530
 
2531
      case AMOUNT:
3430 rajveer 2532
        return Double.valueOf(getAmount());
123 ashish 2533
 
420 ashish 2534
      case GATEWAY_ID:
3430 rajveer 2535
        return Long.valueOf(getGatewayId());
123 ashish 2536
 
695 rajveer 2537
      case TXN_ID:
3430 rajveer 2538
        return Long.valueOf(getTxnId());
695 rajveer 2539
 
6050 anupam.sin 2540
      case IS_DIGITAL:
2541
        return Boolean.valueOf(isIsDigital());
2542
 
123 ashish 2543
      }
2544
      throw new IllegalStateException();
2545
    }
2546
 
3430 rajveer 2547
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
2548
    public boolean isSet(_Fields field) {
2549
      if (field == null) {
2550
        throw new IllegalArgumentException();
2551
      }
123 ashish 2552
 
2553
      switch (field) {
2554
      case USER_ID:
695 rajveer 2555
        return isSetUserId();
123 ashish 2556
      case AMOUNT:
2557
        return isSetAmount();
420 ashish 2558
      case GATEWAY_ID:
695 rajveer 2559
        return isSetGatewayId();
2560
      case TXN_ID:
2561
        return isSetTxnId();
6050 anupam.sin 2562
      case IS_DIGITAL:
2563
        return isSetIsDigital();
123 ashish 2564
      }
2565
      throw new IllegalStateException();
2566
    }
2567
 
2568
    @Override
2569
    public boolean equals(Object that) {
2570
      if (that == null)
2571
        return false;
2572
      if (that instanceof createPayment_args)
2573
        return this.equals((createPayment_args)that);
2574
      return false;
2575
    }
2576
 
2577
    public boolean equals(createPayment_args that) {
2578
      if (that == null)
2579
        return false;
2580
 
695 rajveer 2581
      boolean this_present_userId = true;
2582
      boolean that_present_userId = true;
2583
      if (this_present_userId || that_present_userId) {
2584
        if (!(this_present_userId && that_present_userId))
123 ashish 2585
          return false;
695 rajveer 2586
        if (this.userId != that.userId)
123 ashish 2587
          return false;
2588
      }
2589
 
2590
      boolean this_present_amount = true;
2591
      boolean that_present_amount = true;
2592
      if (this_present_amount || that_present_amount) {
2593
        if (!(this_present_amount && that_present_amount))
2594
          return false;
2595
        if (this.amount != that.amount)
2596
          return false;
2597
      }
2598
 
695 rajveer 2599
      boolean this_present_gatewayId = true;
2600
      boolean that_present_gatewayId = true;
2601
      if (this_present_gatewayId || that_present_gatewayId) {
2602
        if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 2603
          return false;
695 rajveer 2604
        if (this.gatewayId != that.gatewayId)
123 ashish 2605
          return false;
2606
      }
2607
 
695 rajveer 2608
      boolean this_present_txnId = true;
2609
      boolean that_present_txnId = true;
2610
      if (this_present_txnId || that_present_txnId) {
2611
        if (!(this_present_txnId && that_present_txnId))
2612
          return false;
2613
        if (this.txnId != that.txnId)
2614
          return false;
2615
      }
2616
 
6050 anupam.sin 2617
      boolean this_present_isDigital = true;
2618
      boolean that_present_isDigital = true;
2619
      if (this_present_isDigital || that_present_isDigital) {
2620
        if (!(this_present_isDigital && that_present_isDigital))
2621
          return false;
2622
        if (this.isDigital != that.isDigital)
2623
          return false;
2624
      }
2625
 
123 ashish 2626
      return true;
2627
    }
2628
 
2629
    @Override
2630
    public int hashCode() {
2631
      return 0;
2632
    }
2633
 
2634
    public int compareTo(createPayment_args other) {
2635
      if (!getClass().equals(other.getClass())) {
2636
        return getClass().getName().compareTo(other.getClass().getName());
2637
      }
2638
 
2639
      int lastComparison = 0;
2640
      createPayment_args typedOther = (createPayment_args)other;
2641
 
3430 rajveer 2642
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
123 ashish 2643
      if (lastComparison != 0) {
2644
        return lastComparison;
2645
      }
3430 rajveer 2646
      if (isSetUserId()) {
2647
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
2648
        if (lastComparison != 0) {
2649
          return lastComparison;
2650
        }
123 ashish 2651
      }
3430 rajveer 2652
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
123 ashish 2653
      if (lastComparison != 0) {
2654
        return lastComparison;
2655
      }
3430 rajveer 2656
      if (isSetAmount()) {
2657
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
2658
        if (lastComparison != 0) {
2659
          return lastComparison;
2660
        }
123 ashish 2661
      }
3430 rajveer 2662
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(typedOther.isSetGatewayId());
123 ashish 2663
      if (lastComparison != 0) {
2664
        return lastComparison;
2665
      }
3430 rajveer 2666
      if (isSetGatewayId()) {
2667
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, typedOther.gatewayId);
2668
        if (lastComparison != 0) {
2669
          return lastComparison;
2670
        }
123 ashish 2671
      }
3430 rajveer 2672
      lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(typedOther.isSetTxnId());
123 ashish 2673
      if (lastComparison != 0) {
2674
        return lastComparison;
2675
      }
3430 rajveer 2676
      if (isSetTxnId()) {
2677
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, typedOther.txnId);
2678
        if (lastComparison != 0) {
2679
          return lastComparison;
2680
        }
123 ashish 2681
      }
6050 anupam.sin 2682
      lastComparison = Boolean.valueOf(isSetIsDigital()).compareTo(typedOther.isSetIsDigital());
2683
      if (lastComparison != 0) {
2684
        return lastComparison;
2685
      }
2686
      if (isSetIsDigital()) {
2687
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDigital, typedOther.isDigital);
2688
        if (lastComparison != 0) {
2689
          return lastComparison;
2690
        }
2691
      }
123 ashish 2692
      return 0;
2693
    }
2694
 
3430 rajveer 2695
    public _Fields fieldForId(int fieldId) {
2696
      return _Fields.findByThriftId(fieldId);
2697
    }
2698
 
2699
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
2700
      org.apache.thrift.protocol.TField field;
123 ashish 2701
      iprot.readStructBegin();
2702
      while (true)
2703
      {
2704
        field = iprot.readFieldBegin();
3430 rajveer 2705
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 2706
          break;
2707
        }
3430 rajveer 2708
        switch (field.id) {
2709
          case 1: // USER_ID
2710
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2711
              this.userId = iprot.readI64();
2712
              setUserIdIsSet(true);
2713
            } else { 
2714
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2715
            }
2716
            break;
2717
          case 2: // AMOUNT
2718
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
2719
              this.amount = iprot.readDouble();
2720
              setAmountIsSet(true);
2721
            } else { 
2722
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2723
            }
2724
            break;
2725
          case 3: // GATEWAY_ID
2726
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2727
              this.gatewayId = iprot.readI64();
2728
              setGatewayIdIsSet(true);
2729
            } else { 
2730
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2731
            }
2732
            break;
2733
          case 4: // TXN_ID
2734
            if (field.type == org.apache.thrift.protocol.TType.I64) {
2735
              this.txnId = iprot.readI64();
2736
              setTxnIdIsSet(true);
2737
            } else { 
2738
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2739
            }
2740
            break;
6050 anupam.sin 2741
          case 5: // IS_DIGITAL
2742
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
2743
              this.isDigital = iprot.readBool();
2744
              setIsDigitalIsSet(true);
2745
            } else { 
2746
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2747
            }
2748
            break;
3430 rajveer 2749
          default:
2750
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 2751
        }
3430 rajveer 2752
        iprot.readFieldEnd();
123 ashish 2753
      }
2754
      iprot.readStructEnd();
2755
      validate();
2756
    }
2757
 
3430 rajveer 2758
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 2759
      validate();
2760
 
2761
      oprot.writeStructBegin(STRUCT_DESC);
2762
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
695 rajveer 2763
      oprot.writeI64(this.userId);
123 ashish 2764
      oprot.writeFieldEnd();
2765
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
2766
      oprot.writeDouble(this.amount);
2767
      oprot.writeFieldEnd();
420 ashish 2768
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
695 rajveer 2769
      oprot.writeI64(this.gatewayId);
420 ashish 2770
      oprot.writeFieldEnd();
695 rajveer 2771
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
2772
      oprot.writeI64(this.txnId);
2773
      oprot.writeFieldEnd();
6050 anupam.sin 2774
      oprot.writeFieldBegin(IS_DIGITAL_FIELD_DESC);
2775
      oprot.writeBool(this.isDigital);
2776
      oprot.writeFieldEnd();
123 ashish 2777
      oprot.writeFieldStop();
2778
      oprot.writeStructEnd();
2779
    }
2780
 
2781
    @Override
2782
    public String toString() {
2783
      StringBuilder sb = new StringBuilder("createPayment_args(");
2784
      boolean first = true;
2785
 
695 rajveer 2786
      sb.append("userId:");
2787
      sb.append(this.userId);
123 ashish 2788
      first = false;
2789
      if (!first) sb.append(", ");
2790
      sb.append("amount:");
2791
      sb.append(this.amount);
2792
      first = false;
2793
      if (!first) sb.append(", ");
695 rajveer 2794
      sb.append("gatewayId:");
2795
      sb.append(this.gatewayId);
123 ashish 2796
      first = false;
695 rajveer 2797
      if (!first) sb.append(", ");
2798
      sb.append("txnId:");
2799
      sb.append(this.txnId);
2800
      first = false;
6050 anupam.sin 2801
      if (!first) sb.append(", ");
2802
      sb.append("isDigital:");
2803
      sb.append(this.isDigital);
2804
      first = false;
123 ashish 2805
      sb.append(")");
2806
      return sb.toString();
2807
    }
2808
 
3430 rajveer 2809
    public void validate() throws org.apache.thrift.TException {
123 ashish 2810
      // check for required fields
2811
    }
2812
 
3430 rajveer 2813
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
2814
      try {
2815
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
2816
      } catch (org.apache.thrift.TException te) {
2817
        throw new java.io.IOException(te);
2818
      }
2819
    }
2820
 
2821
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
2822
      try {
2823
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
2824
      } catch (org.apache.thrift.TException te) {
2825
        throw new java.io.IOException(te);
2826
      }
2827
    }
2828
 
123 ashish 2829
  }
2830
 
3430 rajveer 2831
  public static class createPayment_result implements org.apache.thrift.TBase<createPayment_result, createPayment_result._Fields>, java.io.Serializable, Cloneable   {
2832
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createPayment_result");
123 ashish 2833
 
3430 rajveer 2834
    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);
2835
    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 2836
 
3430 rajveer 2837
    private long success; // required
2838
    private PaymentException pe; // required
123 ashish 2839
 
2840
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 2841
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
123 ashish 2842
      SUCCESS((short)0, "success"),
2843
      PE((short)1, "pe");
2844
 
2845
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2846
 
2847
      static {
2848
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2849
          byName.put(field.getFieldName(), field);
2850
        }
2851
      }
2852
 
2853
      /**
2854
       * Find the _Fields constant that matches fieldId, or null if its not found.
2855
       */
2856
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 2857
        switch(fieldId) {
2858
          case 0: // SUCCESS
2859
            return SUCCESS;
2860
          case 1: // PE
2861
            return PE;
2862
          default:
2863
            return null;
2864
        }
123 ashish 2865
      }
2866
 
2867
      /**
2868
       * Find the _Fields constant that matches fieldId, throwing an exception
2869
       * if it is not found.
2870
       */
2871
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2872
        _Fields fields = findByThriftId(fieldId);
2873
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2874
        return fields;
2875
      }
2876
 
2877
      /**
2878
       * Find the _Fields constant that matches name, or null if its not found.
2879
       */
2880
      public static _Fields findByName(String name) {
2881
        return byName.get(name);
2882
      }
2883
 
2884
      private final short _thriftId;
2885
      private final String _fieldName;
2886
 
2887
      _Fields(short thriftId, String fieldName) {
2888
        _thriftId = thriftId;
2889
        _fieldName = fieldName;
2890
      }
2891
 
2892
      public short getThriftFieldId() {
2893
        return _thriftId;
2894
      }
2895
 
2896
      public String getFieldName() {
2897
        return _fieldName;
2898
      }
2899
    }
2900
 
2901
    // isset id assignments
420 ashish 2902
    private static final int __SUCCESS_ISSET_ID = 0;
2903
    private BitSet __isset_bit_vector = new BitSet(1);
123 ashish 2904
 
3430 rajveer 2905
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 2906
    static {
3430 rajveer 2907
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
2908
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2909
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
2910
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
2911
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
2912
      metaDataMap = Collections.unmodifiableMap(tmpMap);
2913
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createPayment_result.class, metaDataMap);
123 ashish 2914
    }
2915
 
2916
    public createPayment_result() {
2917
    }
2918
 
2919
    public createPayment_result(
420 ashish 2920
      long success,
123 ashish 2921
      PaymentException pe)
2922
    {
2923
      this();
2924
      this.success = success;
420 ashish 2925
      setSuccessIsSet(true);
123 ashish 2926
      this.pe = pe;
2927
    }
2928
 
2929
    /**
2930
     * Performs a deep copy on <i>other</i>.
2931
     */
2932
    public createPayment_result(createPayment_result other) {
420 ashish 2933
      __isset_bit_vector.clear();
2934
      __isset_bit_vector.or(other.__isset_bit_vector);
2935
      this.success = other.success;
123 ashish 2936
      if (other.isSetPe()) {
2937
        this.pe = new PaymentException(other.pe);
2938
      }
2939
    }
2940
 
2941
    public createPayment_result deepCopy() {
2942
      return new createPayment_result(this);
2943
    }
2944
 
3430 rajveer 2945
    @Override
2946
    public void clear() {
2947
      setSuccessIsSet(false);
2948
      this.success = 0;
2949
      this.pe = null;
123 ashish 2950
    }
2951
 
420 ashish 2952
    public long getSuccess() {
123 ashish 2953
      return this.success;
2954
    }
2955
 
3430 rajveer 2956
    public void setSuccess(long success) {
123 ashish 2957
      this.success = success;
420 ashish 2958
      setSuccessIsSet(true);
123 ashish 2959
    }
2960
 
2961
    public void unsetSuccess() {
420 ashish 2962
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 2963
    }
2964
 
3430 rajveer 2965
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
123 ashish 2966
    public boolean isSetSuccess() {
420 ashish 2967
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 2968
    }
2969
 
2970
    public void setSuccessIsSet(boolean value) {
420 ashish 2971
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
123 ashish 2972
    }
2973
 
2974
    public PaymentException getPe() {
2975
      return this.pe;
2976
    }
2977
 
3430 rajveer 2978
    public void setPe(PaymentException pe) {
123 ashish 2979
      this.pe = pe;
2980
    }
2981
 
2982
    public void unsetPe() {
2983
      this.pe = null;
2984
    }
2985
 
3430 rajveer 2986
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
123 ashish 2987
    public boolean isSetPe() {
2988
      return this.pe != null;
2989
    }
2990
 
2991
    public void setPeIsSet(boolean value) {
2992
      if (!value) {
2993
        this.pe = null;
2994
      }
2995
    }
2996
 
2997
    public void setFieldValue(_Fields field, Object value) {
2998
      switch (field) {
2999
      case SUCCESS:
3000
        if (value == null) {
3001
          unsetSuccess();
3002
        } else {
420 ashish 3003
          setSuccess((Long)value);
123 ashish 3004
        }
3005
        break;
3006
 
3007
      case PE:
3008
        if (value == null) {
3009
          unsetPe();
3010
        } else {
3011
          setPe((PaymentException)value);
3012
        }
3013
        break;
3014
 
3015
      }
3016
    }
3017
 
3018
    public Object getFieldValue(_Fields field) {
3019
      switch (field) {
3020
      case SUCCESS:
3430 rajveer 3021
        return Long.valueOf(getSuccess());
123 ashish 3022
 
3023
      case PE:
3024
        return getPe();
3025
 
3026
      }
3027
      throw new IllegalStateException();
3028
    }
3029
 
3430 rajveer 3030
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3031
    public boolean isSet(_Fields field) {
3032
      if (field == null) {
3033
        throw new IllegalArgumentException();
3034
      }
123 ashish 3035
 
3036
      switch (field) {
3037
      case SUCCESS:
3038
        return isSetSuccess();
3039
      case PE:
3040
        return isSetPe();
3041
      }
3042
      throw new IllegalStateException();
3043
    }
3044
 
3045
    @Override
3046
    public boolean equals(Object that) {
3047
      if (that == null)
3048
        return false;
3049
      if (that instanceof createPayment_result)
3050
        return this.equals((createPayment_result)that);
3051
      return false;
3052
    }
3053
 
3054
    public boolean equals(createPayment_result that) {
3055
      if (that == null)
3056
        return false;
3057
 
420 ashish 3058
      boolean this_present_success = true;
3059
      boolean that_present_success = true;
123 ashish 3060
      if (this_present_success || that_present_success) {
3061
        if (!(this_present_success && that_present_success))
3062
          return false;
420 ashish 3063
        if (this.success != that.success)
123 ashish 3064
          return false;
3065
      }
3066
 
3067
      boolean this_present_pe = true && this.isSetPe();
3068
      boolean that_present_pe = true && that.isSetPe();
3069
      if (this_present_pe || that_present_pe) {
3070
        if (!(this_present_pe && that_present_pe))
3071
          return false;
3072
        if (!this.pe.equals(that.pe))
3073
          return false;
3074
      }
3075
 
3076
      return true;
3077
    }
3078
 
3079
    @Override
3080
    public int hashCode() {
3081
      return 0;
3082
    }
3083
 
420 ashish 3084
    public int compareTo(createPayment_result other) {
3085
      if (!getClass().equals(other.getClass())) {
3086
        return getClass().getName().compareTo(other.getClass().getName());
3087
      }
3088
 
3089
      int lastComparison = 0;
3090
      createPayment_result typedOther = (createPayment_result)other;
3091
 
3430 rajveer 3092
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
420 ashish 3093
      if (lastComparison != 0) {
3094
        return lastComparison;
3095
      }
3430 rajveer 3096
      if (isSetSuccess()) {
3097
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
3098
        if (lastComparison != 0) {
3099
          return lastComparison;
3100
        }
420 ashish 3101
      }
3430 rajveer 3102
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
420 ashish 3103
      if (lastComparison != 0) {
3104
        return lastComparison;
3105
      }
3430 rajveer 3106
      if (isSetPe()) {
3107
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
3108
        if (lastComparison != 0) {
3109
          return lastComparison;
3110
        }
420 ashish 3111
      }
3112
      return 0;
3113
    }
3114
 
3430 rajveer 3115
    public _Fields fieldForId(int fieldId) {
3116
      return _Fields.findByThriftId(fieldId);
3117
    }
3118
 
3119
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3120
      org.apache.thrift.protocol.TField field;
123 ashish 3121
      iprot.readStructBegin();
3122
      while (true)
3123
      {
3124
        field = iprot.readFieldBegin();
3430 rajveer 3125
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 3126
          break;
3127
        }
3430 rajveer 3128
        switch (field.id) {
3129
          case 0: // SUCCESS
3130
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3131
              this.success = iprot.readI64();
3132
              setSuccessIsSet(true);
3133
            } else { 
3134
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3135
            }
3136
            break;
3137
          case 1: // PE
3138
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
3139
              this.pe = new PaymentException();
3140
              this.pe.read(iprot);
3141
            } else { 
3142
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3143
            }
3144
            break;
3145
          default:
3146
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 3147
        }
3430 rajveer 3148
        iprot.readFieldEnd();
123 ashish 3149
      }
3150
      iprot.readStructEnd();
3151
      validate();
3152
    }
3153
 
3430 rajveer 3154
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 3155
      oprot.writeStructBegin(STRUCT_DESC);
3156
 
3157
      if (this.isSetSuccess()) {
3158
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
420 ashish 3159
        oprot.writeI64(this.success);
123 ashish 3160
        oprot.writeFieldEnd();
3161
      } else if (this.isSetPe()) {
3162
        oprot.writeFieldBegin(PE_FIELD_DESC);
3163
        this.pe.write(oprot);
3164
        oprot.writeFieldEnd();
3165
      }
3166
      oprot.writeFieldStop();
3167
      oprot.writeStructEnd();
3168
    }
3169
 
3170
    @Override
3171
    public String toString() {
3172
      StringBuilder sb = new StringBuilder("createPayment_result(");
3173
      boolean first = true;
3174
 
3175
      sb.append("success:");
420 ashish 3176
      sb.append(this.success);
123 ashish 3177
      first = false;
3178
      if (!first) sb.append(", ");
3179
      sb.append("pe:");
3180
      if (this.pe == null) {
3181
        sb.append("null");
3182
      } else {
3183
        sb.append(this.pe);
3184
      }
3185
      first = false;
3186
      sb.append(")");
3187
      return sb.toString();
3188
    }
3189
 
3430 rajveer 3190
    public void validate() throws org.apache.thrift.TException {
123 ashish 3191
      // check for required fields
3192
    }
3193
 
3430 rajveer 3194
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3195
      try {
3196
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3197
      } catch (org.apache.thrift.TException te) {
3198
        throw new java.io.IOException(te);
3199
      }
3200
    }
3201
 
3202
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3203
      try {
3204
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3205
      } catch (org.apache.thrift.TException te) {
3206
        throw new java.io.IOException(te);
3207
      }
3208
    }
3209
 
123 ashish 3210
  }
3211
 
3430 rajveer 3212
  public static class getPaymentsForUser_args implements org.apache.thrift.TBase<getPaymentsForUser_args, getPaymentsForUser_args._Fields>, java.io.Serializable, Cloneable   {
3213
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsForUser_args");
123 ashish 3214
 
3430 rajveer 3215
    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);
3216
    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);
3217
    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);
3218
    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);
3219
    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 3220
 
3430 rajveer 3221
    private long userId; // required
3222
    private long fromTime; // required
3223
    private long toTime; // required
3224
    private PaymentStatus status; // required
3225
    private long gatewayId; // required
123 ashish 3226
 
3227
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3228
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
123 ashish 3229
      USER_ID((short)1, "userId"),
695 rajveer 3230
      FROM_TIME((short)2, "fromTime"),
3231
      TO_TIME((short)3, "toTime"),
123 ashish 3232
      /**
3233
       * 
3234
       * @see PaymentStatus
3235
       */
3236
      STATUS((short)4, "status"),
695 rajveer 3237
      GATEWAY_ID((short)5, "gatewayId");
123 ashish 3238
 
3239
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3240
 
3241
      static {
3242
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3243
          byName.put(field.getFieldName(), field);
3244
        }
3245
      }
3246
 
3247
      /**
3248
       * Find the _Fields constant that matches fieldId, or null if its not found.
3249
       */
3250
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3251
        switch(fieldId) {
3252
          case 1: // USER_ID
3253
            return USER_ID;
3254
          case 2: // FROM_TIME
3255
            return FROM_TIME;
3256
          case 3: // TO_TIME
3257
            return TO_TIME;
3258
          case 4: // STATUS
3259
            return STATUS;
3260
          case 5: // GATEWAY_ID
3261
            return GATEWAY_ID;
3262
          default:
3263
            return null;
3264
        }
123 ashish 3265
      }
3266
 
3267
      /**
3268
       * Find the _Fields constant that matches fieldId, throwing an exception
3269
       * if it is not found.
3270
       */
3271
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3272
        _Fields fields = findByThriftId(fieldId);
3273
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3274
        return fields;
3275
      }
3276
 
3277
      /**
3278
       * Find the _Fields constant that matches name, or null if its not found.
3279
       */
3280
      public static _Fields findByName(String name) {
3281
        return byName.get(name);
3282
      }
3283
 
3284
      private final short _thriftId;
3285
      private final String _fieldName;
3286
 
3287
      _Fields(short thriftId, String fieldName) {
3288
        _thriftId = thriftId;
3289
        _fieldName = fieldName;
3290
      }
3291
 
3292
      public short getThriftFieldId() {
3293
        return _thriftId;
3294
      }
3295
 
3296
      public String getFieldName() {
3297
        return _fieldName;
3298
      }
3299
    }
3300
 
3301
    // isset id assignments
3302
    private static final int __USERID_ISSET_ID = 0;
695 rajveer 3303
    private static final int __FROMTIME_ISSET_ID = 1;
3304
    private static final int __TOTIME_ISSET_ID = 2;
3305
    private static final int __GATEWAYID_ISSET_ID = 3;
420 ashish 3306
    private BitSet __isset_bit_vector = new BitSet(4);
123 ashish 3307
 
3430 rajveer 3308
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 3309
    static {
3430 rajveer 3310
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3311
      tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3312
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3313
      tmpMap.put(_Fields.FROM_TIME, new org.apache.thrift.meta_data.FieldMetaData("fromTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3314
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3315
      tmpMap.put(_Fields.TO_TIME, new org.apache.thrift.meta_data.FieldMetaData("toTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3316
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3317
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3318
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PaymentStatus.class)));
3319
      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3320
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
3321
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3322
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsForUser_args.class, metaDataMap);
123 ashish 3323
    }
3324
 
3325
    public getPaymentsForUser_args() {
3326
    }
3327
 
3328
    public getPaymentsForUser_args(
3329
      long userId,
695 rajveer 3330
      long fromTime,
3331
      long toTime,
123 ashish 3332
      PaymentStatus status,
695 rajveer 3333
      long gatewayId)
123 ashish 3334
    {
3335
      this();
3336
      this.userId = userId;
3337
      setUserIdIsSet(true);
695 rajveer 3338
      this.fromTime = fromTime;
3339
      setFromTimeIsSet(true);
3340
      this.toTime = toTime;
3341
      setToTimeIsSet(true);
123 ashish 3342
      this.status = status;
695 rajveer 3343
      this.gatewayId = gatewayId;
3344
      setGatewayIdIsSet(true);
123 ashish 3345
    }
3346
 
3347
    /**
3348
     * Performs a deep copy on <i>other</i>.
3349
     */
3350
    public getPaymentsForUser_args(getPaymentsForUser_args other) {
3351
      __isset_bit_vector.clear();
3352
      __isset_bit_vector.or(other.__isset_bit_vector);
3353
      this.userId = other.userId;
695 rajveer 3354
      this.fromTime = other.fromTime;
3355
      this.toTime = other.toTime;
123 ashish 3356
      if (other.isSetStatus()) {
3357
        this.status = other.status;
3358
      }
695 rajveer 3359
      this.gatewayId = other.gatewayId;
123 ashish 3360
    }
3361
 
3362
    public getPaymentsForUser_args deepCopy() {
3363
      return new getPaymentsForUser_args(this);
3364
    }
3365
 
3430 rajveer 3366
    @Override
3367
    public void clear() {
3368
      setUserIdIsSet(false);
3369
      this.userId = 0;
3370
      setFromTimeIsSet(false);
3371
      this.fromTime = 0;
3372
      setToTimeIsSet(false);
3373
      this.toTime = 0;
3374
      this.status = null;
3375
      setGatewayIdIsSet(false);
3376
      this.gatewayId = 0;
123 ashish 3377
    }
3378
 
3379
    public long getUserId() {
3380
      return this.userId;
3381
    }
3382
 
3430 rajveer 3383
    public void setUserId(long userId) {
123 ashish 3384
      this.userId = userId;
3385
      setUserIdIsSet(true);
3386
    }
3387
 
3388
    public void unsetUserId() {
3389
      __isset_bit_vector.clear(__USERID_ISSET_ID);
3390
    }
3391
 
3430 rajveer 3392
    /** Returns true if field userId is set (has been assigned a value) and false otherwise */
123 ashish 3393
    public boolean isSetUserId() {
3394
      return __isset_bit_vector.get(__USERID_ISSET_ID);
3395
    }
3396
 
3397
    public void setUserIdIsSet(boolean value) {
3398
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
3399
    }
3400
 
695 rajveer 3401
    public long getFromTime() {
3402
      return this.fromTime;
123 ashish 3403
    }
3404
 
3430 rajveer 3405
    public void setFromTime(long fromTime) {
695 rajveer 3406
      this.fromTime = fromTime;
3407
      setFromTimeIsSet(true);
123 ashish 3408
    }
3409
 
695 rajveer 3410
    public void unsetFromTime() {
3411
      __isset_bit_vector.clear(__FROMTIME_ISSET_ID);
123 ashish 3412
    }
3413
 
3430 rajveer 3414
    /** Returns true if field fromTime is set (has been assigned a value) and false otherwise */
695 rajveer 3415
    public boolean isSetFromTime() {
3416
      return __isset_bit_vector.get(__FROMTIME_ISSET_ID);
123 ashish 3417
    }
3418
 
695 rajveer 3419
    public void setFromTimeIsSet(boolean value) {
3420
      __isset_bit_vector.set(__FROMTIME_ISSET_ID, value);
123 ashish 3421
    }
3422
 
695 rajveer 3423
    public long getToTime() {
3424
      return this.toTime;
123 ashish 3425
    }
3426
 
3430 rajveer 3427
    public void setToTime(long toTime) {
695 rajveer 3428
      this.toTime = toTime;
3429
      setToTimeIsSet(true);
123 ashish 3430
    }
3431
 
695 rajveer 3432
    public void unsetToTime() {
3433
      __isset_bit_vector.clear(__TOTIME_ISSET_ID);
123 ashish 3434
    }
3435
 
3430 rajveer 3436
    /** Returns true if field toTime is set (has been assigned a value) and false otherwise */
695 rajveer 3437
    public boolean isSetToTime() {
3438
      return __isset_bit_vector.get(__TOTIME_ISSET_ID);
123 ashish 3439
    }
3440
 
695 rajveer 3441
    public void setToTimeIsSet(boolean value) {
3442
      __isset_bit_vector.set(__TOTIME_ISSET_ID, value);
123 ashish 3443
    }
3444
 
3445
    /**
3446
     * 
3447
     * @see PaymentStatus
3448
     */
3449
    public PaymentStatus getStatus() {
3450
      return this.status;
3451
    }
3452
 
3453
    /**
3454
     * 
3455
     * @see PaymentStatus
3456
     */
3430 rajveer 3457
    public void setStatus(PaymentStatus status) {
123 ashish 3458
      this.status = status;
3459
    }
3460
 
3461
    public void unsetStatus() {
3462
      this.status = null;
3463
    }
3464
 
3430 rajveer 3465
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
123 ashish 3466
    public boolean isSetStatus() {
3467
      return this.status != null;
3468
    }
3469
 
3470
    public void setStatusIsSet(boolean value) {
3471
      if (!value) {
3472
        this.status = null;
3473
      }
3474
    }
3475
 
695 rajveer 3476
    public long getGatewayId() {
3477
      return this.gatewayId;
123 ashish 3478
    }
3479
 
3430 rajveer 3480
    public void setGatewayId(long gatewayId) {
695 rajveer 3481
      this.gatewayId = gatewayId;
3482
      setGatewayIdIsSet(true);
123 ashish 3483
    }
3484
 
695 rajveer 3485
    public void unsetGatewayId() {
3486
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 3487
    }
3488
 
3430 rajveer 3489
    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
695 rajveer 3490
    public boolean isSetGatewayId() {
3491
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 3492
    }
3493
 
695 rajveer 3494
    public void setGatewayIdIsSet(boolean value) {
3495
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
123 ashish 3496
    }
3497
 
3498
    public void setFieldValue(_Fields field, Object value) {
3499
      switch (field) {
3500
      case USER_ID:
3501
        if (value == null) {
3502
          unsetUserId();
3503
        } else {
3504
          setUserId((Long)value);
3505
        }
3506
        break;
3507
 
3508
      case FROM_TIME:
3509
        if (value == null) {
695 rajveer 3510
          unsetFromTime();
123 ashish 3511
        } else {
695 rajveer 3512
          setFromTime((Long)value);
123 ashish 3513
        }
3514
        break;
3515
 
3516
      case TO_TIME:
3517
        if (value == null) {
695 rajveer 3518
          unsetToTime();
123 ashish 3519
        } else {
695 rajveer 3520
          setToTime((Long)value);
123 ashish 3521
        }
3522
        break;
3523
 
3524
      case STATUS:
3525
        if (value == null) {
3526
          unsetStatus();
3527
        } else {
3528
          setStatus((PaymentStatus)value);
3529
        }
3530
        break;
3531
 
420 ashish 3532
      case GATEWAY_ID:
123 ashish 3533
        if (value == null) {
695 rajveer 3534
          unsetGatewayId();
123 ashish 3535
        } else {
695 rajveer 3536
          setGatewayId((Long)value);
123 ashish 3537
        }
3538
        break;
3539
 
3540
      }
3541
    }
3542
 
3543
    public Object getFieldValue(_Fields field) {
3544
      switch (field) {
3545
      case USER_ID:
3430 rajveer 3546
        return Long.valueOf(getUserId());
123 ashish 3547
 
3548
      case FROM_TIME:
3430 rajveer 3549
        return Long.valueOf(getFromTime());
123 ashish 3550
 
3551
      case TO_TIME:
3430 rajveer 3552
        return Long.valueOf(getToTime());
123 ashish 3553
 
3554
      case STATUS:
3555
        return getStatus();
3556
 
420 ashish 3557
      case GATEWAY_ID:
3430 rajveer 3558
        return Long.valueOf(getGatewayId());
123 ashish 3559
 
3560
      }
3561
      throw new IllegalStateException();
3562
    }
3563
 
3430 rajveer 3564
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
3565
    public boolean isSet(_Fields field) {
3566
      if (field == null) {
3567
        throw new IllegalArgumentException();
3568
      }
123 ashish 3569
 
3570
      switch (field) {
3571
      case USER_ID:
3572
        return isSetUserId();
3573
      case FROM_TIME:
695 rajveer 3574
        return isSetFromTime();
123 ashish 3575
      case TO_TIME:
695 rajveer 3576
        return isSetToTime();
123 ashish 3577
      case STATUS:
3578
        return isSetStatus();
420 ashish 3579
      case GATEWAY_ID:
695 rajveer 3580
        return isSetGatewayId();
123 ashish 3581
      }
3582
      throw new IllegalStateException();
3583
    }
3584
 
3585
    @Override
3586
    public boolean equals(Object that) {
3587
      if (that == null)
3588
        return false;
3589
      if (that instanceof getPaymentsForUser_args)
3590
        return this.equals((getPaymentsForUser_args)that);
3591
      return false;
3592
    }
3593
 
3594
    public boolean equals(getPaymentsForUser_args that) {
3595
      if (that == null)
3596
        return false;
3597
 
3598
      boolean this_present_userId = true;
3599
      boolean that_present_userId = true;
3600
      if (this_present_userId || that_present_userId) {
3601
        if (!(this_present_userId && that_present_userId))
3602
          return false;
3603
        if (this.userId != that.userId)
3604
          return false;
3605
      }
3606
 
695 rajveer 3607
      boolean this_present_fromTime = true;
3608
      boolean that_present_fromTime = true;
3609
      if (this_present_fromTime || that_present_fromTime) {
3610
        if (!(this_present_fromTime && that_present_fromTime))
123 ashish 3611
          return false;
695 rajveer 3612
        if (this.fromTime != that.fromTime)
123 ashish 3613
          return false;
3614
      }
3615
 
695 rajveer 3616
      boolean this_present_toTime = true;
3617
      boolean that_present_toTime = true;
3618
      if (this_present_toTime || that_present_toTime) {
3619
        if (!(this_present_toTime && that_present_toTime))
123 ashish 3620
          return false;
695 rajveer 3621
        if (this.toTime != that.toTime)
123 ashish 3622
          return false;
3623
      }
3624
 
3625
      boolean this_present_status = true && this.isSetStatus();
3626
      boolean that_present_status = true && that.isSetStatus();
3627
      if (this_present_status || that_present_status) {
3628
        if (!(this_present_status && that_present_status))
3629
          return false;
3630
        if (!this.status.equals(that.status))
3631
          return false;
3632
      }
3633
 
695 rajveer 3634
      boolean this_present_gatewayId = true;
3635
      boolean that_present_gatewayId = true;
3636
      if (this_present_gatewayId || that_present_gatewayId) {
3637
        if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 3638
          return false;
695 rajveer 3639
        if (this.gatewayId != that.gatewayId)
123 ashish 3640
          return false;
3641
      }
3642
 
3643
      return true;
3644
    }
3645
 
3646
    @Override
3647
    public int hashCode() {
3648
      return 0;
3649
    }
3650
 
3651
    public int compareTo(getPaymentsForUser_args other) {
3652
      if (!getClass().equals(other.getClass())) {
3653
        return getClass().getName().compareTo(other.getClass().getName());
3654
      }
3655
 
3656
      int lastComparison = 0;
3657
      getPaymentsForUser_args typedOther = (getPaymentsForUser_args)other;
3658
 
3430 rajveer 3659
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(typedOther.isSetUserId());
123 ashish 3660
      if (lastComparison != 0) {
3661
        return lastComparison;
3662
      }
3430 rajveer 3663
      if (isSetUserId()) {
3664
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.userId, typedOther.userId);
3665
        if (lastComparison != 0) {
3666
          return lastComparison;
3667
        }
123 ashish 3668
      }
3430 rajveer 3669
      lastComparison = Boolean.valueOf(isSetFromTime()).compareTo(typedOther.isSetFromTime());
123 ashish 3670
      if (lastComparison != 0) {
3671
        return lastComparison;
3672
      }
3430 rajveer 3673
      if (isSetFromTime()) {
3674
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromTime, typedOther.fromTime);
3675
        if (lastComparison != 0) {
3676
          return lastComparison;
3677
        }
123 ashish 3678
      }
3430 rajveer 3679
      lastComparison = Boolean.valueOf(isSetToTime()).compareTo(typedOther.isSetToTime());
123 ashish 3680
      if (lastComparison != 0) {
3681
        return lastComparison;
3682
      }
3430 rajveer 3683
      if (isSetToTime()) {
3684
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toTime, typedOther.toTime);
3685
        if (lastComparison != 0) {
3686
          return lastComparison;
3687
        }
123 ashish 3688
      }
3430 rajveer 3689
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
123 ashish 3690
      if (lastComparison != 0) {
3691
        return lastComparison;
3692
      }
3430 rajveer 3693
      if (isSetStatus()) {
3694
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
3695
        if (lastComparison != 0) {
3696
          return lastComparison;
3697
        }
123 ashish 3698
      }
3430 rajveer 3699
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(typedOther.isSetGatewayId());
123 ashish 3700
      if (lastComparison != 0) {
3701
        return lastComparison;
3702
      }
3430 rajveer 3703
      if (isSetGatewayId()) {
3704
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, typedOther.gatewayId);
3705
        if (lastComparison != 0) {
3706
          return lastComparison;
3707
        }
123 ashish 3708
      }
3709
      return 0;
3710
    }
3711
 
3430 rajveer 3712
    public _Fields fieldForId(int fieldId) {
3713
      return _Fields.findByThriftId(fieldId);
3714
    }
3715
 
3716
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
3717
      org.apache.thrift.protocol.TField field;
123 ashish 3718
      iprot.readStructBegin();
3719
      while (true)
3720
      {
3721
        field = iprot.readFieldBegin();
3430 rajveer 3722
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 3723
          break;
3724
        }
3430 rajveer 3725
        switch (field.id) {
3726
          case 1: // USER_ID
3727
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3728
              this.userId = iprot.readI64();
3729
              setUserIdIsSet(true);
3730
            } else { 
3731
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3732
            }
3733
            break;
3734
          case 2: // FROM_TIME
3735
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3736
              this.fromTime = iprot.readI64();
3737
              setFromTimeIsSet(true);
3738
            } else { 
3739
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3740
            }
3741
            break;
3742
          case 3: // TO_TIME
3743
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3744
              this.toTime = iprot.readI64();
3745
              setToTimeIsSet(true);
3746
            } else { 
3747
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3748
            }
3749
            break;
3750
          case 4: // STATUS
3751
            if (field.type == org.apache.thrift.protocol.TType.I32) {
3752
              this.status = PaymentStatus.findByValue(iprot.readI32());
3753
            } else { 
3754
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3755
            }
3756
            break;
3757
          case 5: // GATEWAY_ID
3758
            if (field.type == org.apache.thrift.protocol.TType.I64) {
3759
              this.gatewayId = iprot.readI64();
3760
              setGatewayIdIsSet(true);
3761
            } else { 
3762
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
3763
            }
3764
            break;
3765
          default:
3766
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 3767
        }
3430 rajveer 3768
        iprot.readFieldEnd();
123 ashish 3769
      }
3770
      iprot.readStructEnd();
3771
      validate();
3772
    }
3773
 
3430 rajveer 3774
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 3775
      validate();
3776
 
3777
      oprot.writeStructBegin(STRUCT_DESC);
3778
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
3779
      oprot.writeI64(this.userId);
3780
      oprot.writeFieldEnd();
3781
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
695 rajveer 3782
      oprot.writeI64(this.fromTime);
123 ashish 3783
      oprot.writeFieldEnd();
3784
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
695 rajveer 3785
      oprot.writeI64(this.toTime);
123 ashish 3786
      oprot.writeFieldEnd();
3787
      if (this.status != null) {
3788
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
3789
        oprot.writeI32(this.status.getValue());
3790
        oprot.writeFieldEnd();
3791
      }
420 ashish 3792
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
695 rajveer 3793
      oprot.writeI64(this.gatewayId);
420 ashish 3794
      oprot.writeFieldEnd();
123 ashish 3795
      oprot.writeFieldStop();
3796
      oprot.writeStructEnd();
3797
    }
3798
 
3799
    @Override
3800
    public String toString() {
3801
      StringBuilder sb = new StringBuilder("getPaymentsForUser_args(");
3802
      boolean first = true;
3803
 
3804
      sb.append("userId:");
3805
      sb.append(this.userId);
3806
      first = false;
3807
      if (!first) sb.append(", ");
695 rajveer 3808
      sb.append("fromTime:");
3809
      sb.append(this.fromTime);
123 ashish 3810
      first = false;
3811
      if (!first) sb.append(", ");
695 rajveer 3812
      sb.append("toTime:");
3813
      sb.append(this.toTime);
123 ashish 3814
      first = false;
3815
      if (!first) sb.append(", ");
3816
      sb.append("status:");
3817
      if (this.status == null) {
3818
        sb.append("null");
3819
      } else {
3820
        sb.append(this.status);
3821
      }
3822
      first = false;
3823
      if (!first) sb.append(", ");
695 rajveer 3824
      sb.append("gatewayId:");
3825
      sb.append(this.gatewayId);
123 ashish 3826
      first = false;
3827
      sb.append(")");
3828
      return sb.toString();
3829
    }
3830
 
3430 rajveer 3831
    public void validate() throws org.apache.thrift.TException {
123 ashish 3832
      // check for required fields
3833
    }
3834
 
3430 rajveer 3835
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
3836
      try {
3837
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
3838
      } catch (org.apache.thrift.TException te) {
3839
        throw new java.io.IOException(te);
3840
      }
3841
    }
3842
 
3843
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
3844
      try {
3845
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
3846
      } catch (org.apache.thrift.TException te) {
3847
        throw new java.io.IOException(te);
3848
      }
3849
    }
3850
 
123 ashish 3851
  }
3852
 
3430 rajveer 3853
  public static class getPaymentsForUser_result implements org.apache.thrift.TBase<getPaymentsForUser_result, getPaymentsForUser_result._Fields>, java.io.Serializable, Cloneable   {
3854
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsForUser_result");
123 ashish 3855
 
3430 rajveer 3856
    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);
3857
    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 3858
 
3430 rajveer 3859
    private List<Payment> success; // required
3860
    private PaymentException pe; // required
123 ashish 3861
 
3862
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 3863
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
123 ashish 3864
      SUCCESS((short)0, "success"),
3865
      PE((short)1, "pe");
3866
 
3867
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3868
 
3869
      static {
3870
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3871
          byName.put(field.getFieldName(), field);
3872
        }
3873
      }
3874
 
3875
      /**
3876
       * Find the _Fields constant that matches fieldId, or null if its not found.
3877
       */
3878
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 3879
        switch(fieldId) {
3880
          case 0: // SUCCESS
3881
            return SUCCESS;
3882
          case 1: // PE
3883
            return PE;
3884
          default:
3885
            return null;
3886
        }
123 ashish 3887
      }
3888
 
3889
      /**
3890
       * Find the _Fields constant that matches fieldId, throwing an exception
3891
       * if it is not found.
3892
       */
3893
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3894
        _Fields fields = findByThriftId(fieldId);
3895
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3896
        return fields;
3897
      }
3898
 
3899
      /**
3900
       * Find the _Fields constant that matches name, or null if its not found.
3901
       */
3902
      public static _Fields findByName(String name) {
3903
        return byName.get(name);
3904
      }
3905
 
3906
      private final short _thriftId;
3907
      private final String _fieldName;
3908
 
3909
      _Fields(short thriftId, String fieldName) {
3910
        _thriftId = thriftId;
3911
        _fieldName = fieldName;
3912
      }
3913
 
3914
      public short getThriftFieldId() {
3915
        return _thriftId;
3916
      }
3917
 
3918
      public String getFieldName() {
3919
        return _fieldName;
3920
      }
3921
    }
3922
 
3923
    // isset id assignments
3924
 
3430 rajveer 3925
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 3926
    static {
3430 rajveer 3927
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
3928
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3929
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
3930
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
3931
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
3932
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
3933
      metaDataMap = Collections.unmodifiableMap(tmpMap);
3934
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsForUser_result.class, metaDataMap);
123 ashish 3935
    }
3936
 
3937
    public getPaymentsForUser_result() {
3938
    }
3939
 
3940
    public getPaymentsForUser_result(
3941
      List<Payment> success,
3942
      PaymentException pe)
3943
    {
3944
      this();
3945
      this.success = success;
3946
      this.pe = pe;
3947
    }
3948
 
3949
    /**
3950
     * Performs a deep copy on <i>other</i>.
3951
     */
3952
    public getPaymentsForUser_result(getPaymentsForUser_result other) {
3953
      if (other.isSetSuccess()) {
3954
        List<Payment> __this__success = new ArrayList<Payment>();
3955
        for (Payment other_element : other.success) {
3956
          __this__success.add(new Payment(other_element));
3957
        }
3958
        this.success = __this__success;
3959
      }
3960
      if (other.isSetPe()) {
3961
        this.pe = new PaymentException(other.pe);
3962
      }
3963
    }
3964
 
3965
    public getPaymentsForUser_result deepCopy() {
3966
      return new getPaymentsForUser_result(this);
3967
    }
3968
 
3430 rajveer 3969
    @Override
3970
    public void clear() {
3971
      this.success = null;
3972
      this.pe = null;
123 ashish 3973
    }
3974
 
3975
    public int getSuccessSize() {
3976
      return (this.success == null) ? 0 : this.success.size();
3977
    }
3978
 
3979
    public java.util.Iterator<Payment> getSuccessIterator() {
3980
      return (this.success == null) ? null : this.success.iterator();
3981
    }
3982
 
3983
    public void addToSuccess(Payment elem) {
3984
      if (this.success == null) {
3985
        this.success = new ArrayList<Payment>();
3986
      }
3987
      this.success.add(elem);
3988
    }
3989
 
3990
    public List<Payment> getSuccess() {
3991
      return this.success;
3992
    }
3993
 
3430 rajveer 3994
    public void setSuccess(List<Payment> success) {
123 ashish 3995
      this.success = success;
3996
    }
3997
 
3998
    public void unsetSuccess() {
3999
      this.success = null;
4000
    }
4001
 
3430 rajveer 4002
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
123 ashish 4003
    public boolean isSetSuccess() {
4004
      return this.success != null;
4005
    }
4006
 
4007
    public void setSuccessIsSet(boolean value) {
4008
      if (!value) {
4009
        this.success = null;
4010
      }
4011
    }
4012
 
4013
    public PaymentException getPe() {
4014
      return this.pe;
4015
    }
4016
 
3430 rajveer 4017
    public void setPe(PaymentException pe) {
123 ashish 4018
      this.pe = pe;
4019
    }
4020
 
4021
    public void unsetPe() {
4022
      this.pe = null;
4023
    }
4024
 
3430 rajveer 4025
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
123 ashish 4026
    public boolean isSetPe() {
4027
      return this.pe != null;
4028
    }
4029
 
4030
    public void setPeIsSet(boolean value) {
4031
      if (!value) {
4032
        this.pe = null;
4033
      }
4034
    }
4035
 
4036
    public void setFieldValue(_Fields field, Object value) {
4037
      switch (field) {
4038
      case SUCCESS:
4039
        if (value == null) {
4040
          unsetSuccess();
4041
        } else {
4042
          setSuccess((List<Payment>)value);
4043
        }
4044
        break;
4045
 
4046
      case PE:
4047
        if (value == null) {
4048
          unsetPe();
4049
        } else {
4050
          setPe((PaymentException)value);
4051
        }
4052
        break;
4053
 
4054
      }
4055
    }
4056
 
4057
    public Object getFieldValue(_Fields field) {
4058
      switch (field) {
4059
      case SUCCESS:
4060
        return getSuccess();
4061
 
4062
      case PE:
4063
        return getPe();
4064
 
4065
      }
4066
      throw new IllegalStateException();
4067
    }
4068
 
3430 rajveer 4069
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4070
    public boolean isSet(_Fields field) {
4071
      if (field == null) {
4072
        throw new IllegalArgumentException();
4073
      }
123 ashish 4074
 
4075
      switch (field) {
4076
      case SUCCESS:
4077
        return isSetSuccess();
4078
      case PE:
4079
        return isSetPe();
4080
      }
4081
      throw new IllegalStateException();
4082
    }
4083
 
4084
    @Override
4085
    public boolean equals(Object that) {
4086
      if (that == null)
4087
        return false;
4088
      if (that instanceof getPaymentsForUser_result)
4089
        return this.equals((getPaymentsForUser_result)that);
4090
      return false;
4091
    }
4092
 
4093
    public boolean equals(getPaymentsForUser_result that) {
4094
      if (that == null)
4095
        return false;
4096
 
4097
      boolean this_present_success = true && this.isSetSuccess();
4098
      boolean that_present_success = true && that.isSetSuccess();
4099
      if (this_present_success || that_present_success) {
4100
        if (!(this_present_success && that_present_success))
4101
          return false;
4102
        if (!this.success.equals(that.success))
4103
          return false;
4104
      }
4105
 
4106
      boolean this_present_pe = true && this.isSetPe();
4107
      boolean that_present_pe = true && that.isSetPe();
4108
      if (this_present_pe || that_present_pe) {
4109
        if (!(this_present_pe && that_present_pe))
4110
          return false;
4111
        if (!this.pe.equals(that.pe))
4112
          return false;
4113
      }
4114
 
4115
      return true;
4116
    }
4117
 
4118
    @Override
4119
    public int hashCode() {
4120
      return 0;
4121
    }
4122
 
695 rajveer 4123
    public int compareTo(getPaymentsForUser_result other) {
123 ashish 4124
      if (!getClass().equals(other.getClass())) {
4125
        return getClass().getName().compareTo(other.getClass().getName());
4126
      }
4127
 
4128
      int lastComparison = 0;
695 rajveer 4129
      getPaymentsForUser_result typedOther = (getPaymentsForUser_result)other;
123 ashish 4130
 
3430 rajveer 4131
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
123 ashish 4132
      if (lastComparison != 0) {
4133
        return lastComparison;
4134
      }
3430 rajveer 4135
      if (isSetSuccess()) {
4136
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
4137
        if (lastComparison != 0) {
4138
          return lastComparison;
4139
        }
123 ashish 4140
      }
3430 rajveer 4141
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
123 ashish 4142
      if (lastComparison != 0) {
4143
        return lastComparison;
4144
      }
3430 rajveer 4145
      if (isSetPe()) {
4146
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
4147
        if (lastComparison != 0) {
4148
          return lastComparison;
4149
        }
123 ashish 4150
      }
4151
      return 0;
4152
    }
4153
 
3430 rajveer 4154
    public _Fields fieldForId(int fieldId) {
4155
      return _Fields.findByThriftId(fieldId);
4156
    }
4157
 
4158
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4159
      org.apache.thrift.protocol.TField field;
123 ashish 4160
      iprot.readStructBegin();
4161
      while (true)
4162
      {
4163
        field = iprot.readFieldBegin();
3430 rajveer 4164
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 4165
          break;
4166
        }
3430 rajveer 4167
        switch (field.id) {
4168
          case 0: // SUCCESS
4169
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
4170
              {
4171
                org.apache.thrift.protocol.TList _list12 = iprot.readListBegin();
4172
                this.success = new ArrayList<Payment>(_list12.size);
4173
                for (int _i13 = 0; _i13 < _list12.size; ++_i13)
123 ashish 4174
                {
3430 rajveer 4175
                  Payment _elem14; // required
4176
                  _elem14 = new Payment();
4177
                  _elem14.read(iprot);
4178
                  this.success.add(_elem14);
123 ashish 4179
                }
3430 rajveer 4180
                iprot.readListEnd();
123 ashish 4181
              }
3430 rajveer 4182
            } else { 
4183
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4184
            }
4185
            break;
4186
          case 1: // PE
4187
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
4188
              this.pe = new PaymentException();
4189
              this.pe.read(iprot);
4190
            } else { 
4191
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4192
            }
4193
            break;
4194
          default:
4195
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 4196
        }
3430 rajveer 4197
        iprot.readFieldEnd();
123 ashish 4198
      }
4199
      iprot.readStructEnd();
4200
      validate();
4201
    }
4202
 
3430 rajveer 4203
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 4204
      oprot.writeStructBegin(STRUCT_DESC);
4205
 
4206
      if (this.isSetSuccess()) {
4207
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4208
        {
3430 rajveer 4209
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
2747 chandransh 4210
          for (Payment _iter15 : this.success)
123 ashish 4211
          {
2747 chandransh 4212
            _iter15.write(oprot);
123 ashish 4213
          }
4214
          oprot.writeListEnd();
4215
        }
4216
        oprot.writeFieldEnd();
4217
      } else if (this.isSetPe()) {
4218
        oprot.writeFieldBegin(PE_FIELD_DESC);
4219
        this.pe.write(oprot);
4220
        oprot.writeFieldEnd();
4221
      }
4222
      oprot.writeFieldStop();
4223
      oprot.writeStructEnd();
4224
    }
4225
 
4226
    @Override
4227
    public String toString() {
695 rajveer 4228
      StringBuilder sb = new StringBuilder("getPaymentsForUser_result(");
123 ashish 4229
      boolean first = true;
4230
 
4231
      sb.append("success:");
4232
      if (this.success == null) {
4233
        sb.append("null");
4234
      } else {
4235
        sb.append(this.success);
4236
      }
4237
      first = false;
4238
      if (!first) sb.append(", ");
4239
      sb.append("pe:");
4240
      if (this.pe == null) {
4241
        sb.append("null");
4242
      } else {
4243
        sb.append(this.pe);
4244
      }
4245
      first = false;
4246
      sb.append(")");
4247
      return sb.toString();
4248
    }
4249
 
3430 rajveer 4250
    public void validate() throws org.apache.thrift.TException {
123 ashish 4251
      // check for required fields
4252
    }
4253
 
3430 rajveer 4254
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4255
      try {
4256
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4257
      } catch (org.apache.thrift.TException te) {
4258
        throw new java.io.IOException(te);
4259
      }
4260
    }
4261
 
4262
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4263
      try {
4264
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4265
      } catch (org.apache.thrift.TException te) {
4266
        throw new java.io.IOException(te);
4267
      }
4268
    }
4269
 
123 ashish 4270
  }
4271
 
3430 rajveer 4272
  public static class getPayments_args implements org.apache.thrift.TBase<getPayments_args, getPayments_args._Fields>, java.io.Serializable, Cloneable   {
4273
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPayments_args");
123 ashish 4274
 
3430 rajveer 4275
    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);
4276
    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);
4277
    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);
4278
    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 4279
 
3430 rajveer 4280
    private long fromTime; // required
4281
    private long toTime; // required
4282
    private PaymentStatus status; // required
4283
    private long gatewayId; // required
123 ashish 4284
 
4285
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4286
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 4287
      FROM_TIME((short)1, "fromTime"),
4288
      TO_TIME((short)2, "toTime"),
123 ashish 4289
      /**
4290
       * 
4291
       * @see PaymentStatus
4292
       */
4293
      STATUS((short)3, "status"),
695 rajveer 4294
      GATEWAY_ID((short)4, "gatewayId");
123 ashish 4295
 
4296
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4297
 
4298
      static {
4299
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4300
          byName.put(field.getFieldName(), field);
4301
        }
4302
      }
4303
 
4304
      /**
4305
       * Find the _Fields constant that matches fieldId, or null if its not found.
4306
       */
4307
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4308
        switch(fieldId) {
4309
          case 1: // FROM_TIME
4310
            return FROM_TIME;
4311
          case 2: // TO_TIME
4312
            return TO_TIME;
4313
          case 3: // STATUS
4314
            return STATUS;
4315
          case 4: // GATEWAY_ID
4316
            return GATEWAY_ID;
4317
          default:
4318
            return null;
4319
        }
123 ashish 4320
      }
4321
 
4322
      /**
4323
       * Find the _Fields constant that matches fieldId, throwing an exception
4324
       * if it is not found.
4325
       */
4326
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4327
        _Fields fields = findByThriftId(fieldId);
4328
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4329
        return fields;
4330
      }
4331
 
4332
      /**
4333
       * Find the _Fields constant that matches name, or null if its not found.
4334
       */
4335
      public static _Fields findByName(String name) {
4336
        return byName.get(name);
4337
      }
4338
 
4339
      private final short _thriftId;
4340
      private final String _fieldName;
4341
 
4342
      _Fields(short thriftId, String fieldName) {
4343
        _thriftId = thriftId;
4344
        _fieldName = fieldName;
4345
      }
4346
 
4347
      public short getThriftFieldId() {
4348
        return _thriftId;
4349
      }
4350
 
4351
      public String getFieldName() {
4352
        return _fieldName;
4353
      }
4354
    }
4355
 
4356
    // isset id assignments
695 rajveer 4357
    private static final int __FROMTIME_ISSET_ID = 0;
4358
    private static final int __TOTIME_ISSET_ID = 1;
4359
    private static final int __GATEWAYID_ISSET_ID = 2;
420 ashish 4360
    private BitSet __isset_bit_vector = new BitSet(3);
123 ashish 4361
 
3430 rajveer 4362
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 4363
    static {
3430 rajveer 4364
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4365
      tmpMap.put(_Fields.FROM_TIME, new org.apache.thrift.meta_data.FieldMetaData("fromTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4366
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4367
      tmpMap.put(_Fields.TO_TIME, new org.apache.thrift.meta_data.FieldMetaData("toTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4368
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4369
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4370
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PaymentStatus.class)));
4371
      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4372
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
4373
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4374
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPayments_args.class, metaDataMap);
123 ashish 4375
    }
4376
 
4377
    public getPayments_args() {
4378
    }
4379
 
4380
    public getPayments_args(
695 rajveer 4381
      long fromTime,
4382
      long toTime,
123 ashish 4383
      PaymentStatus status,
695 rajveer 4384
      long gatewayId)
123 ashish 4385
    {
4386
      this();
695 rajveer 4387
      this.fromTime = fromTime;
4388
      setFromTimeIsSet(true);
4389
      this.toTime = toTime;
4390
      setToTimeIsSet(true);
123 ashish 4391
      this.status = status;
695 rajveer 4392
      this.gatewayId = gatewayId;
4393
      setGatewayIdIsSet(true);
123 ashish 4394
    }
4395
 
4396
    /**
4397
     * Performs a deep copy on <i>other</i>.
4398
     */
4399
    public getPayments_args(getPayments_args other) {
4400
      __isset_bit_vector.clear();
4401
      __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 4402
      this.fromTime = other.fromTime;
4403
      this.toTime = other.toTime;
123 ashish 4404
      if (other.isSetStatus()) {
4405
        this.status = other.status;
4406
      }
695 rajveer 4407
      this.gatewayId = other.gatewayId;
123 ashish 4408
    }
4409
 
4410
    public getPayments_args deepCopy() {
4411
      return new getPayments_args(this);
4412
    }
4413
 
3430 rajveer 4414
    @Override
4415
    public void clear() {
4416
      setFromTimeIsSet(false);
4417
      this.fromTime = 0;
4418
      setToTimeIsSet(false);
4419
      this.toTime = 0;
4420
      this.status = null;
4421
      setGatewayIdIsSet(false);
4422
      this.gatewayId = 0;
123 ashish 4423
    }
4424
 
695 rajveer 4425
    public long getFromTime() {
4426
      return this.fromTime;
123 ashish 4427
    }
4428
 
3430 rajveer 4429
    public void setFromTime(long fromTime) {
695 rajveer 4430
      this.fromTime = fromTime;
4431
      setFromTimeIsSet(true);
123 ashish 4432
    }
4433
 
695 rajveer 4434
    public void unsetFromTime() {
4435
      __isset_bit_vector.clear(__FROMTIME_ISSET_ID);
123 ashish 4436
    }
4437
 
3430 rajveer 4438
    /** Returns true if field fromTime is set (has been assigned a value) and false otherwise */
695 rajveer 4439
    public boolean isSetFromTime() {
4440
      return __isset_bit_vector.get(__FROMTIME_ISSET_ID);
123 ashish 4441
    }
4442
 
695 rajveer 4443
    public void setFromTimeIsSet(boolean value) {
4444
      __isset_bit_vector.set(__FROMTIME_ISSET_ID, value);
123 ashish 4445
    }
4446
 
695 rajveer 4447
    public long getToTime() {
4448
      return this.toTime;
123 ashish 4449
    }
4450
 
3430 rajveer 4451
    public void setToTime(long toTime) {
695 rajveer 4452
      this.toTime = toTime;
4453
      setToTimeIsSet(true);
123 ashish 4454
    }
4455
 
695 rajveer 4456
    public void unsetToTime() {
4457
      __isset_bit_vector.clear(__TOTIME_ISSET_ID);
123 ashish 4458
    }
4459
 
3430 rajveer 4460
    /** Returns true if field toTime is set (has been assigned a value) and false otherwise */
695 rajveer 4461
    public boolean isSetToTime() {
4462
      return __isset_bit_vector.get(__TOTIME_ISSET_ID);
123 ashish 4463
    }
4464
 
695 rajveer 4465
    public void setToTimeIsSet(boolean value) {
4466
      __isset_bit_vector.set(__TOTIME_ISSET_ID, value);
123 ashish 4467
    }
4468
 
4469
    /**
4470
     * 
4471
     * @see PaymentStatus
4472
     */
4473
    public PaymentStatus getStatus() {
4474
      return this.status;
4475
    }
4476
 
4477
    /**
4478
     * 
4479
     * @see PaymentStatus
4480
     */
3430 rajveer 4481
    public void setStatus(PaymentStatus status) {
123 ashish 4482
      this.status = status;
4483
    }
4484
 
4485
    public void unsetStatus() {
4486
      this.status = null;
4487
    }
4488
 
3430 rajveer 4489
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
123 ashish 4490
    public boolean isSetStatus() {
4491
      return this.status != null;
4492
    }
4493
 
4494
    public void setStatusIsSet(boolean value) {
4495
      if (!value) {
4496
        this.status = null;
4497
      }
4498
    }
4499
 
695 rajveer 4500
    public long getGatewayId() {
4501
      return this.gatewayId;
123 ashish 4502
    }
4503
 
3430 rajveer 4504
    public void setGatewayId(long gatewayId) {
695 rajveer 4505
      this.gatewayId = gatewayId;
4506
      setGatewayIdIsSet(true);
123 ashish 4507
    }
4508
 
695 rajveer 4509
    public void unsetGatewayId() {
4510
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
123 ashish 4511
    }
4512
 
3430 rajveer 4513
    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
695 rajveer 4514
    public boolean isSetGatewayId() {
4515
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
123 ashish 4516
    }
4517
 
695 rajveer 4518
    public void setGatewayIdIsSet(boolean value) {
4519
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
123 ashish 4520
    }
4521
 
4522
    public void setFieldValue(_Fields field, Object value) {
4523
      switch (field) {
4524
      case FROM_TIME:
4525
        if (value == null) {
695 rajveer 4526
          unsetFromTime();
123 ashish 4527
        } else {
695 rajveer 4528
          setFromTime((Long)value);
123 ashish 4529
        }
4530
        break;
4531
 
4532
      case TO_TIME:
4533
        if (value == null) {
695 rajveer 4534
          unsetToTime();
123 ashish 4535
        } else {
695 rajveer 4536
          setToTime((Long)value);
123 ashish 4537
        }
4538
        break;
4539
 
4540
      case STATUS:
4541
        if (value == null) {
4542
          unsetStatus();
4543
        } else {
4544
          setStatus((PaymentStatus)value);
4545
        }
4546
        break;
4547
 
420 ashish 4548
      case GATEWAY_ID:
123 ashish 4549
        if (value == null) {
695 rajveer 4550
          unsetGatewayId();
123 ashish 4551
        } else {
695 rajveer 4552
          setGatewayId((Long)value);
123 ashish 4553
        }
4554
        break;
4555
 
4556
      }
4557
    }
4558
 
4559
    public Object getFieldValue(_Fields field) {
4560
      switch (field) {
4561
      case FROM_TIME:
3430 rajveer 4562
        return Long.valueOf(getFromTime());
123 ashish 4563
 
4564
      case TO_TIME:
3430 rajveer 4565
        return Long.valueOf(getToTime());
123 ashish 4566
 
4567
      case STATUS:
4568
        return getStatus();
4569
 
420 ashish 4570
      case GATEWAY_ID:
3430 rajveer 4571
        return Long.valueOf(getGatewayId());
123 ashish 4572
 
4573
      }
4574
      throw new IllegalStateException();
4575
    }
4576
 
3430 rajveer 4577
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
4578
    public boolean isSet(_Fields field) {
4579
      if (field == null) {
4580
        throw new IllegalArgumentException();
4581
      }
123 ashish 4582
 
4583
      switch (field) {
4584
      case FROM_TIME:
695 rajveer 4585
        return isSetFromTime();
123 ashish 4586
      case TO_TIME:
695 rajveer 4587
        return isSetToTime();
123 ashish 4588
      case STATUS:
4589
        return isSetStatus();
420 ashish 4590
      case GATEWAY_ID:
695 rajveer 4591
        return isSetGatewayId();
123 ashish 4592
      }
4593
      throw new IllegalStateException();
4594
    }
4595
 
4596
    @Override
4597
    public boolean equals(Object that) {
4598
      if (that == null)
4599
        return false;
4600
      if (that instanceof getPayments_args)
4601
        return this.equals((getPayments_args)that);
4602
      return false;
4603
    }
4604
 
4605
    public boolean equals(getPayments_args that) {
4606
      if (that == null)
4607
        return false;
4608
 
695 rajveer 4609
      boolean this_present_fromTime = true;
4610
      boolean that_present_fromTime = true;
4611
      if (this_present_fromTime || that_present_fromTime) {
4612
        if (!(this_present_fromTime && that_present_fromTime))
123 ashish 4613
          return false;
695 rajveer 4614
        if (this.fromTime != that.fromTime)
123 ashish 4615
          return false;
4616
      }
4617
 
695 rajveer 4618
      boolean this_present_toTime = true;
4619
      boolean that_present_toTime = true;
4620
      if (this_present_toTime || that_present_toTime) {
4621
        if (!(this_present_toTime && that_present_toTime))
123 ashish 4622
          return false;
695 rajveer 4623
        if (this.toTime != that.toTime)
123 ashish 4624
          return false;
4625
      }
4626
 
4627
      boolean this_present_status = true && this.isSetStatus();
4628
      boolean that_present_status = true && that.isSetStatus();
4629
      if (this_present_status || that_present_status) {
4630
        if (!(this_present_status && that_present_status))
4631
          return false;
4632
        if (!this.status.equals(that.status))
4633
          return false;
4634
      }
4635
 
695 rajveer 4636
      boolean this_present_gatewayId = true;
4637
      boolean that_present_gatewayId = true;
4638
      if (this_present_gatewayId || that_present_gatewayId) {
4639
        if (!(this_present_gatewayId && that_present_gatewayId))
123 ashish 4640
          return false;
695 rajveer 4641
        if (this.gatewayId != that.gatewayId)
123 ashish 4642
          return false;
4643
      }
4644
 
4645
      return true;
4646
    }
4647
 
4648
    @Override
4649
    public int hashCode() {
4650
      return 0;
4651
    }
4652
 
4653
    public int compareTo(getPayments_args other) {
4654
      if (!getClass().equals(other.getClass())) {
4655
        return getClass().getName().compareTo(other.getClass().getName());
4656
      }
4657
 
4658
      int lastComparison = 0;
4659
      getPayments_args typedOther = (getPayments_args)other;
4660
 
3430 rajveer 4661
      lastComparison = Boolean.valueOf(isSetFromTime()).compareTo(typedOther.isSetFromTime());
123 ashish 4662
      if (lastComparison != 0) {
4663
        return lastComparison;
4664
      }
3430 rajveer 4665
      if (isSetFromTime()) {
4666
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromTime, typedOther.fromTime);
4667
        if (lastComparison != 0) {
4668
          return lastComparison;
4669
        }
123 ashish 4670
      }
3430 rajveer 4671
      lastComparison = Boolean.valueOf(isSetToTime()).compareTo(typedOther.isSetToTime());
123 ashish 4672
      if (lastComparison != 0) {
4673
        return lastComparison;
4674
      }
3430 rajveer 4675
      if (isSetToTime()) {
4676
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toTime, typedOther.toTime);
4677
        if (lastComparison != 0) {
4678
          return lastComparison;
4679
        }
123 ashish 4680
      }
3430 rajveer 4681
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
123 ashish 4682
      if (lastComparison != 0) {
4683
        return lastComparison;
4684
      }
3430 rajveer 4685
      if (isSetStatus()) {
4686
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
4687
        if (lastComparison != 0) {
4688
          return lastComparison;
4689
        }
123 ashish 4690
      }
3430 rajveer 4691
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(typedOther.isSetGatewayId());
123 ashish 4692
      if (lastComparison != 0) {
4693
        return lastComparison;
4694
      }
3430 rajveer 4695
      if (isSetGatewayId()) {
4696
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, typedOther.gatewayId);
4697
        if (lastComparison != 0) {
4698
          return lastComparison;
4699
        }
123 ashish 4700
      }
4701
      return 0;
4702
    }
4703
 
3430 rajveer 4704
    public _Fields fieldForId(int fieldId) {
4705
      return _Fields.findByThriftId(fieldId);
4706
    }
4707
 
4708
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
4709
      org.apache.thrift.protocol.TField field;
123 ashish 4710
      iprot.readStructBegin();
4711
      while (true)
4712
      {
4713
        field = iprot.readFieldBegin();
3430 rajveer 4714
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 4715
          break;
4716
        }
3430 rajveer 4717
        switch (field.id) {
4718
          case 1: // FROM_TIME
4719
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4720
              this.fromTime = iprot.readI64();
4721
              setFromTimeIsSet(true);
4722
            } else { 
4723
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4724
            }
4725
            break;
4726
          case 2: // TO_TIME
4727
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4728
              this.toTime = iprot.readI64();
4729
              setToTimeIsSet(true);
4730
            } else { 
4731
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4732
            }
4733
            break;
4734
          case 3: // STATUS
4735
            if (field.type == org.apache.thrift.protocol.TType.I32) {
4736
              this.status = PaymentStatus.findByValue(iprot.readI32());
4737
            } else { 
4738
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4739
            }
4740
            break;
4741
          case 4: // GATEWAY_ID
4742
            if (field.type == org.apache.thrift.protocol.TType.I64) {
4743
              this.gatewayId = iprot.readI64();
4744
              setGatewayIdIsSet(true);
4745
            } else { 
4746
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
4747
            }
4748
            break;
4749
          default:
4750
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 4751
        }
3430 rajveer 4752
        iprot.readFieldEnd();
123 ashish 4753
      }
4754
      iprot.readStructEnd();
4755
      validate();
4756
    }
4757
 
3430 rajveer 4758
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 4759
      validate();
4760
 
4761
      oprot.writeStructBegin(STRUCT_DESC);
4762
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
695 rajveer 4763
      oprot.writeI64(this.fromTime);
123 ashish 4764
      oprot.writeFieldEnd();
4765
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
695 rajveer 4766
      oprot.writeI64(this.toTime);
123 ashish 4767
      oprot.writeFieldEnd();
4768
      if (this.status != null) {
4769
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4770
        oprot.writeI32(this.status.getValue());
4771
        oprot.writeFieldEnd();
4772
      }
420 ashish 4773
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
695 rajveer 4774
      oprot.writeI64(this.gatewayId);
420 ashish 4775
      oprot.writeFieldEnd();
123 ashish 4776
      oprot.writeFieldStop();
4777
      oprot.writeStructEnd();
4778
    }
4779
 
4780
    @Override
4781
    public String toString() {
4782
      StringBuilder sb = new StringBuilder("getPayments_args(");
4783
      boolean first = true;
4784
 
695 rajveer 4785
      sb.append("fromTime:");
4786
      sb.append(this.fromTime);
123 ashish 4787
      first = false;
4788
      if (!first) sb.append(", ");
695 rajveer 4789
      sb.append("toTime:");
4790
      sb.append(this.toTime);
123 ashish 4791
      first = false;
4792
      if (!first) sb.append(", ");
4793
      sb.append("status:");
4794
      if (this.status == null) {
4795
        sb.append("null");
4796
      } else {
4797
        sb.append(this.status);
4798
      }
4799
      first = false;
4800
      if (!first) sb.append(", ");
695 rajveer 4801
      sb.append("gatewayId:");
4802
      sb.append(this.gatewayId);
123 ashish 4803
      first = false;
4804
      sb.append(")");
4805
      return sb.toString();
4806
    }
4807
 
3430 rajveer 4808
    public void validate() throws org.apache.thrift.TException {
123 ashish 4809
      // check for required fields
4810
    }
4811
 
3430 rajveer 4812
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
4813
      try {
4814
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
4815
      } catch (org.apache.thrift.TException te) {
4816
        throw new java.io.IOException(te);
4817
      }
4818
    }
4819
 
4820
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
4821
      try {
4822
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
4823
      } catch (org.apache.thrift.TException te) {
4824
        throw new java.io.IOException(te);
4825
      }
4826
    }
4827
 
123 ashish 4828
  }
4829
 
3430 rajveer 4830
  public static class getPayments_result implements org.apache.thrift.TBase<getPayments_result, getPayments_result._Fields>, java.io.Serializable, Cloneable   {
4831
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPayments_result");
123 ashish 4832
 
3430 rajveer 4833
    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);
4834
    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 4835
 
3430 rajveer 4836
    private List<Payment> success; // required
4837
    private PaymentException pe; // required
123 ashish 4838
 
4839
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 4840
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
123 ashish 4841
      SUCCESS((short)0, "success"),
4842
      PE((short)1, "pe");
4843
 
4844
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4845
 
4846
      static {
4847
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4848
          byName.put(field.getFieldName(), field);
4849
        }
4850
      }
4851
 
4852
      /**
4853
       * Find the _Fields constant that matches fieldId, or null if its not found.
4854
       */
4855
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 4856
        switch(fieldId) {
4857
          case 0: // SUCCESS
4858
            return SUCCESS;
4859
          case 1: // PE
4860
            return PE;
4861
          default:
4862
            return null;
4863
        }
123 ashish 4864
      }
4865
 
4866
      /**
4867
       * Find the _Fields constant that matches fieldId, throwing an exception
4868
       * if it is not found.
4869
       */
4870
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4871
        _Fields fields = findByThriftId(fieldId);
4872
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4873
        return fields;
4874
      }
4875
 
4876
      /**
4877
       * Find the _Fields constant that matches name, or null if its not found.
4878
       */
4879
      public static _Fields findByName(String name) {
4880
        return byName.get(name);
4881
      }
4882
 
4883
      private final short _thriftId;
4884
      private final String _fieldName;
4885
 
4886
      _Fields(short thriftId, String fieldName) {
4887
        _thriftId = thriftId;
4888
        _fieldName = fieldName;
4889
      }
4890
 
4891
      public short getThriftFieldId() {
4892
        return _thriftId;
4893
      }
4894
 
4895
      public String getFieldName() {
4896
        return _fieldName;
4897
      }
4898
    }
4899
 
4900
    // isset id assignments
4901
 
3430 rajveer 4902
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 4903
    static {
3430 rajveer 4904
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
4905
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4906
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
4907
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
4908
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
4909
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
4910
      metaDataMap = Collections.unmodifiableMap(tmpMap);
4911
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPayments_result.class, metaDataMap);
123 ashish 4912
    }
4913
 
4914
    public getPayments_result() {
4915
    }
4916
 
4917
    public getPayments_result(
4918
      List<Payment> success,
4919
      PaymentException pe)
4920
    {
4921
      this();
4922
      this.success = success;
4923
      this.pe = pe;
4924
    }
4925
 
4926
    /**
4927
     * Performs a deep copy on <i>other</i>.
4928
     */
4929
    public getPayments_result(getPayments_result other) {
4930
      if (other.isSetSuccess()) {
4931
        List<Payment> __this__success = new ArrayList<Payment>();
4932
        for (Payment other_element : other.success) {
4933
          __this__success.add(new Payment(other_element));
4934
        }
4935
        this.success = __this__success;
4936
      }
4937
      if (other.isSetPe()) {
4938
        this.pe = new PaymentException(other.pe);
4939
      }
4940
    }
4941
 
4942
    public getPayments_result deepCopy() {
4943
      return new getPayments_result(this);
4944
    }
4945
 
3430 rajveer 4946
    @Override
4947
    public void clear() {
4948
      this.success = null;
4949
      this.pe = null;
123 ashish 4950
    }
4951
 
4952
    public int getSuccessSize() {
4953
      return (this.success == null) ? 0 : this.success.size();
4954
    }
4955
 
4956
    public java.util.Iterator<Payment> getSuccessIterator() {
4957
      return (this.success == null) ? null : this.success.iterator();
4958
    }
4959
 
4960
    public void addToSuccess(Payment elem) {
4961
      if (this.success == null) {
4962
        this.success = new ArrayList<Payment>();
4963
      }
4964
      this.success.add(elem);
4965
    }
4966
 
4967
    public List<Payment> getSuccess() {
4968
      return this.success;
4969
    }
4970
 
3430 rajveer 4971
    public void setSuccess(List<Payment> success) {
123 ashish 4972
      this.success = success;
4973
    }
4974
 
4975
    public void unsetSuccess() {
4976
      this.success = null;
4977
    }
4978
 
3430 rajveer 4979
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
123 ashish 4980
    public boolean isSetSuccess() {
4981
      return this.success != null;
4982
    }
4983
 
4984
    public void setSuccessIsSet(boolean value) {
4985
      if (!value) {
4986
        this.success = null;
4987
      }
4988
    }
4989
 
4990
    public PaymentException getPe() {
4991
      return this.pe;
4992
    }
4993
 
3430 rajveer 4994
    public void setPe(PaymentException pe) {
123 ashish 4995
      this.pe = pe;
4996
    }
4997
 
4998
    public void unsetPe() {
4999
      this.pe = null;
5000
    }
5001
 
3430 rajveer 5002
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
123 ashish 5003
    public boolean isSetPe() {
5004
      return this.pe != null;
5005
    }
5006
 
5007
    public void setPeIsSet(boolean value) {
5008
      if (!value) {
5009
        this.pe = null;
5010
      }
5011
    }
5012
 
5013
    public void setFieldValue(_Fields field, Object value) {
5014
      switch (field) {
5015
      case SUCCESS:
5016
        if (value == null) {
5017
          unsetSuccess();
5018
        } else {
5019
          setSuccess((List<Payment>)value);
5020
        }
5021
        break;
5022
 
5023
      case PE:
5024
        if (value == null) {
5025
          unsetPe();
5026
        } else {
5027
          setPe((PaymentException)value);
5028
        }
5029
        break;
5030
 
5031
      }
5032
    }
5033
 
5034
    public Object getFieldValue(_Fields field) {
5035
      switch (field) {
5036
      case SUCCESS:
5037
        return getSuccess();
5038
 
5039
      case PE:
5040
        return getPe();
5041
 
5042
      }
5043
      throw new IllegalStateException();
5044
    }
5045
 
3430 rajveer 5046
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5047
    public boolean isSet(_Fields field) {
5048
      if (field == null) {
5049
        throw new IllegalArgumentException();
5050
      }
123 ashish 5051
 
5052
      switch (field) {
5053
      case SUCCESS:
5054
        return isSetSuccess();
5055
      case PE:
5056
        return isSetPe();
5057
      }
5058
      throw new IllegalStateException();
5059
    }
5060
 
5061
    @Override
5062
    public boolean equals(Object that) {
5063
      if (that == null)
5064
        return false;
5065
      if (that instanceof getPayments_result)
5066
        return this.equals((getPayments_result)that);
5067
      return false;
5068
    }
5069
 
5070
    public boolean equals(getPayments_result that) {
5071
      if (that == null)
5072
        return false;
5073
 
5074
      boolean this_present_success = true && this.isSetSuccess();
5075
      boolean that_present_success = true && that.isSetSuccess();
5076
      if (this_present_success || that_present_success) {
5077
        if (!(this_present_success && that_present_success))
5078
          return false;
5079
        if (!this.success.equals(that.success))
5080
          return false;
5081
      }
5082
 
5083
      boolean this_present_pe = true && this.isSetPe();
5084
      boolean that_present_pe = true && that.isSetPe();
5085
      if (this_present_pe || that_present_pe) {
5086
        if (!(this_present_pe && that_present_pe))
5087
          return false;
5088
        if (!this.pe.equals(that.pe))
5089
          return false;
5090
      }
5091
 
5092
      return true;
5093
    }
5094
 
5095
    @Override
5096
    public int hashCode() {
5097
      return 0;
5098
    }
5099
 
695 rajveer 5100
    public int compareTo(getPayments_result other) {
123 ashish 5101
      if (!getClass().equals(other.getClass())) {
5102
        return getClass().getName().compareTo(other.getClass().getName());
5103
      }
5104
 
5105
      int lastComparison = 0;
695 rajveer 5106
      getPayments_result typedOther = (getPayments_result)other;
123 ashish 5107
 
3430 rajveer 5108
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
123 ashish 5109
      if (lastComparison != 0) {
5110
        return lastComparison;
5111
      }
3430 rajveer 5112
      if (isSetSuccess()) {
5113
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5114
        if (lastComparison != 0) {
5115
          return lastComparison;
5116
        }
123 ashish 5117
      }
3430 rajveer 5118
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
695 rajveer 5119
      if (lastComparison != 0) {
5120
        return lastComparison;
123 ashish 5121
      }
3430 rajveer 5122
      if (isSetPe()) {
5123
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
5124
        if (lastComparison != 0) {
5125
          return lastComparison;
5126
        }
123 ashish 5127
      }
5128
      return 0;
5129
    }
5130
 
3430 rajveer 5131
    public _Fields fieldForId(int fieldId) {
5132
      return _Fields.findByThriftId(fieldId);
5133
    }
5134
 
5135
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5136
      org.apache.thrift.protocol.TField field;
123 ashish 5137
      iprot.readStructBegin();
5138
      while (true)
5139
      {
5140
        field = iprot.readFieldBegin();
3430 rajveer 5141
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 5142
          break;
5143
        }
3430 rajveer 5144
        switch (field.id) {
5145
          case 0: // SUCCESS
5146
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
5147
              {
5148
                org.apache.thrift.protocol.TList _list16 = iprot.readListBegin();
5149
                this.success = new ArrayList<Payment>(_list16.size);
5150
                for (int _i17 = 0; _i17 < _list16.size; ++_i17)
420 ashish 5151
                {
3430 rajveer 5152
                  Payment _elem18; // required
5153
                  _elem18 = new Payment();
5154
                  _elem18.read(iprot);
5155
                  this.success.add(_elem18);
420 ashish 5156
                }
3430 rajveer 5157
                iprot.readListEnd();
123 ashish 5158
              }
3430 rajveer 5159
            } else { 
5160
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5161
            }
5162
            break;
5163
          case 1: // PE
5164
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
5165
              this.pe = new PaymentException();
5166
              this.pe.read(iprot);
5167
            } else { 
5168
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5169
            }
5170
            break;
5171
          default:
5172
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 5173
        }
3430 rajveer 5174
        iprot.readFieldEnd();
123 ashish 5175
      }
5176
      iprot.readStructEnd();
5177
      validate();
5178
    }
5179
 
3430 rajveer 5180
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 5181
      oprot.writeStructBegin(STRUCT_DESC);
5182
 
5183
      if (this.isSetSuccess()) {
5184
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
420 ashish 5185
        {
3430 rajveer 5186
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
2747 chandransh 5187
          for (Payment _iter19 : this.success)
420 ashish 5188
          {
2747 chandransh 5189
            _iter19.write(oprot);
420 ashish 5190
          }
5191
          oprot.writeListEnd();
5192
        }
123 ashish 5193
        oprot.writeFieldEnd();
5194
      } else if (this.isSetPe()) {
5195
        oprot.writeFieldBegin(PE_FIELD_DESC);
5196
        this.pe.write(oprot);
5197
        oprot.writeFieldEnd();
5198
      }
5199
      oprot.writeFieldStop();
5200
      oprot.writeStructEnd();
5201
    }
5202
 
5203
    @Override
5204
    public String toString() {
695 rajveer 5205
      StringBuilder sb = new StringBuilder("getPayments_result(");
123 ashish 5206
      boolean first = true;
5207
 
5208
      sb.append("success:");
5209
      if (this.success == null) {
5210
        sb.append("null");
5211
      } else {
5212
        sb.append(this.success);
5213
      }
5214
      first = false;
5215
      if (!first) sb.append(", ");
5216
      sb.append("pe:");
5217
      if (this.pe == null) {
5218
        sb.append("null");
5219
      } else {
5220
        sb.append(this.pe);
5221
      }
5222
      first = false;
5223
      sb.append(")");
5224
      return sb.toString();
5225
    }
5226
 
3430 rajveer 5227
    public void validate() throws org.apache.thrift.TException {
123 ashish 5228
      // check for required fields
5229
    }
5230
 
3430 rajveer 5231
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5232
      try {
5233
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5234
      } catch (org.apache.thrift.TException te) {
5235
        throw new java.io.IOException(te);
5236
      }
5237
    }
5238
 
5239
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5240
      try {
5241
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5242
      } catch (org.apache.thrift.TException te) {
5243
        throw new java.io.IOException(te);
5244
      }
5245
    }
5246
 
123 ashish 5247
  }
5248
 
4141 chandransh 5249
  public static class getPaymentsByCapturedDate_args implements org.apache.thrift.TBase<getPaymentsByCapturedDate_args, getPaymentsByCapturedDate_args._Fields>, java.io.Serializable, Cloneable   {
5250
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsByCapturedDate_args");
5251
 
5252
    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);
5253
    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);
5254
    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);
5255
 
5256
    private long fromTime; // required
5257
    private long toTime; // required
5258
    private long gatewayId; // required
5259
 
5260
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5261
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5262
      FROM_TIME((short)1, "fromTime"),
5263
      TO_TIME((short)2, "toTime"),
5264
      GATEWAY_ID((short)3, "gatewayId");
5265
 
5266
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5267
 
5268
      static {
5269
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5270
          byName.put(field.getFieldName(), field);
5271
        }
5272
      }
5273
 
5274
      /**
5275
       * Find the _Fields constant that matches fieldId, or null if its not found.
5276
       */
5277
      public static _Fields findByThriftId(int fieldId) {
5278
        switch(fieldId) {
5279
          case 1: // FROM_TIME
5280
            return FROM_TIME;
5281
          case 2: // TO_TIME
5282
            return TO_TIME;
5283
          case 3: // GATEWAY_ID
5284
            return GATEWAY_ID;
5285
          default:
5286
            return null;
5287
        }
5288
      }
5289
 
5290
      /**
5291
       * Find the _Fields constant that matches fieldId, throwing an exception
5292
       * if it is not found.
5293
       */
5294
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5295
        _Fields fields = findByThriftId(fieldId);
5296
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5297
        return fields;
5298
      }
5299
 
5300
      /**
5301
       * Find the _Fields constant that matches name, or null if its not found.
5302
       */
5303
      public static _Fields findByName(String name) {
5304
        return byName.get(name);
5305
      }
5306
 
5307
      private final short _thriftId;
5308
      private final String _fieldName;
5309
 
5310
      _Fields(short thriftId, String fieldName) {
5311
        _thriftId = thriftId;
5312
        _fieldName = fieldName;
5313
      }
5314
 
5315
      public short getThriftFieldId() {
5316
        return _thriftId;
5317
      }
5318
 
5319
      public String getFieldName() {
5320
        return _fieldName;
5321
      }
5322
    }
5323
 
5324
    // isset id assignments
5325
    private static final int __FROMTIME_ISSET_ID = 0;
5326
    private static final int __TOTIME_ISSET_ID = 1;
5327
    private static final int __GATEWAYID_ISSET_ID = 2;
5328
    private BitSet __isset_bit_vector = new BitSet(3);
5329
 
5330
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5331
    static {
5332
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5333
      tmpMap.put(_Fields.FROM_TIME, new org.apache.thrift.meta_data.FieldMetaData("fromTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5334
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5335
      tmpMap.put(_Fields.TO_TIME, new org.apache.thrift.meta_data.FieldMetaData("toTime", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5336
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5337
      tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5338
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
5339
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5340
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsByCapturedDate_args.class, metaDataMap);
5341
    }
5342
 
5343
    public getPaymentsByCapturedDate_args() {
5344
    }
5345
 
5346
    public getPaymentsByCapturedDate_args(
5347
      long fromTime,
5348
      long toTime,
5349
      long gatewayId)
5350
    {
5351
      this();
5352
      this.fromTime = fromTime;
5353
      setFromTimeIsSet(true);
5354
      this.toTime = toTime;
5355
      setToTimeIsSet(true);
5356
      this.gatewayId = gatewayId;
5357
      setGatewayIdIsSet(true);
5358
    }
5359
 
5360
    /**
5361
     * Performs a deep copy on <i>other</i>.
5362
     */
5363
    public getPaymentsByCapturedDate_args(getPaymentsByCapturedDate_args other) {
5364
      __isset_bit_vector.clear();
5365
      __isset_bit_vector.or(other.__isset_bit_vector);
5366
      this.fromTime = other.fromTime;
5367
      this.toTime = other.toTime;
5368
      this.gatewayId = other.gatewayId;
5369
    }
5370
 
5371
    public getPaymentsByCapturedDate_args deepCopy() {
5372
      return new getPaymentsByCapturedDate_args(this);
5373
    }
5374
 
5375
    @Override
5376
    public void clear() {
5377
      setFromTimeIsSet(false);
5378
      this.fromTime = 0;
5379
      setToTimeIsSet(false);
5380
      this.toTime = 0;
5381
      setGatewayIdIsSet(false);
5382
      this.gatewayId = 0;
5383
    }
5384
 
5385
    public long getFromTime() {
5386
      return this.fromTime;
5387
    }
5388
 
5389
    public void setFromTime(long fromTime) {
5390
      this.fromTime = fromTime;
5391
      setFromTimeIsSet(true);
5392
    }
5393
 
5394
    public void unsetFromTime() {
5395
      __isset_bit_vector.clear(__FROMTIME_ISSET_ID);
5396
    }
5397
 
5398
    /** Returns true if field fromTime is set (has been assigned a value) and false otherwise */
5399
    public boolean isSetFromTime() {
5400
      return __isset_bit_vector.get(__FROMTIME_ISSET_ID);
5401
    }
5402
 
5403
    public void setFromTimeIsSet(boolean value) {
5404
      __isset_bit_vector.set(__FROMTIME_ISSET_ID, value);
5405
    }
5406
 
5407
    public long getToTime() {
5408
      return this.toTime;
5409
    }
5410
 
5411
    public void setToTime(long toTime) {
5412
      this.toTime = toTime;
5413
      setToTimeIsSet(true);
5414
    }
5415
 
5416
    public void unsetToTime() {
5417
      __isset_bit_vector.clear(__TOTIME_ISSET_ID);
5418
    }
5419
 
5420
    /** Returns true if field toTime is set (has been assigned a value) and false otherwise */
5421
    public boolean isSetToTime() {
5422
      return __isset_bit_vector.get(__TOTIME_ISSET_ID);
5423
    }
5424
 
5425
    public void setToTimeIsSet(boolean value) {
5426
      __isset_bit_vector.set(__TOTIME_ISSET_ID, value);
5427
    }
5428
 
5429
    public long getGatewayId() {
5430
      return this.gatewayId;
5431
    }
5432
 
5433
    public void setGatewayId(long gatewayId) {
5434
      this.gatewayId = gatewayId;
5435
      setGatewayIdIsSet(true);
5436
    }
5437
 
5438
    public void unsetGatewayId() {
5439
      __isset_bit_vector.clear(__GATEWAYID_ISSET_ID);
5440
    }
5441
 
5442
    /** Returns true if field gatewayId is set (has been assigned a value) and false otherwise */
5443
    public boolean isSetGatewayId() {
5444
      return __isset_bit_vector.get(__GATEWAYID_ISSET_ID);
5445
    }
5446
 
5447
    public void setGatewayIdIsSet(boolean value) {
5448
      __isset_bit_vector.set(__GATEWAYID_ISSET_ID, value);
5449
    }
5450
 
5451
    public void setFieldValue(_Fields field, Object value) {
5452
      switch (field) {
5453
      case FROM_TIME:
5454
        if (value == null) {
5455
          unsetFromTime();
5456
        } else {
5457
          setFromTime((Long)value);
5458
        }
5459
        break;
5460
 
5461
      case TO_TIME:
5462
        if (value == null) {
5463
          unsetToTime();
5464
        } else {
5465
          setToTime((Long)value);
5466
        }
5467
        break;
5468
 
5469
      case GATEWAY_ID:
5470
        if (value == null) {
5471
          unsetGatewayId();
5472
        } else {
5473
          setGatewayId((Long)value);
5474
        }
5475
        break;
5476
 
5477
      }
5478
    }
5479
 
5480
    public Object getFieldValue(_Fields field) {
5481
      switch (field) {
5482
      case FROM_TIME:
5483
        return Long.valueOf(getFromTime());
5484
 
5485
      case TO_TIME:
5486
        return Long.valueOf(getToTime());
5487
 
5488
      case GATEWAY_ID:
5489
        return Long.valueOf(getGatewayId());
5490
 
5491
      }
5492
      throw new IllegalStateException();
5493
    }
5494
 
5495
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5496
    public boolean isSet(_Fields field) {
5497
      if (field == null) {
5498
        throw new IllegalArgumentException();
5499
      }
5500
 
5501
      switch (field) {
5502
      case FROM_TIME:
5503
        return isSetFromTime();
5504
      case TO_TIME:
5505
        return isSetToTime();
5506
      case GATEWAY_ID:
5507
        return isSetGatewayId();
5508
      }
5509
      throw new IllegalStateException();
5510
    }
5511
 
5512
    @Override
5513
    public boolean equals(Object that) {
5514
      if (that == null)
5515
        return false;
5516
      if (that instanceof getPaymentsByCapturedDate_args)
5517
        return this.equals((getPaymentsByCapturedDate_args)that);
5518
      return false;
5519
    }
5520
 
5521
    public boolean equals(getPaymentsByCapturedDate_args that) {
5522
      if (that == null)
5523
        return false;
5524
 
5525
      boolean this_present_fromTime = true;
5526
      boolean that_present_fromTime = true;
5527
      if (this_present_fromTime || that_present_fromTime) {
5528
        if (!(this_present_fromTime && that_present_fromTime))
5529
          return false;
5530
        if (this.fromTime != that.fromTime)
5531
          return false;
5532
      }
5533
 
5534
      boolean this_present_toTime = true;
5535
      boolean that_present_toTime = true;
5536
      if (this_present_toTime || that_present_toTime) {
5537
        if (!(this_present_toTime && that_present_toTime))
5538
          return false;
5539
        if (this.toTime != that.toTime)
5540
          return false;
5541
      }
5542
 
5543
      boolean this_present_gatewayId = true;
5544
      boolean that_present_gatewayId = true;
5545
      if (this_present_gatewayId || that_present_gatewayId) {
5546
        if (!(this_present_gatewayId && that_present_gatewayId))
5547
          return false;
5548
        if (this.gatewayId != that.gatewayId)
5549
          return false;
5550
      }
5551
 
5552
      return true;
5553
    }
5554
 
5555
    @Override
5556
    public int hashCode() {
5557
      return 0;
5558
    }
5559
 
5560
    public int compareTo(getPaymentsByCapturedDate_args other) {
5561
      if (!getClass().equals(other.getClass())) {
5562
        return getClass().getName().compareTo(other.getClass().getName());
5563
      }
5564
 
5565
      int lastComparison = 0;
5566
      getPaymentsByCapturedDate_args typedOther = (getPaymentsByCapturedDate_args)other;
5567
 
5568
      lastComparison = Boolean.valueOf(isSetFromTime()).compareTo(typedOther.isSetFromTime());
5569
      if (lastComparison != 0) {
5570
        return lastComparison;
5571
      }
5572
      if (isSetFromTime()) {
5573
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fromTime, typedOther.fromTime);
5574
        if (lastComparison != 0) {
5575
          return lastComparison;
5576
        }
5577
      }
5578
      lastComparison = Boolean.valueOf(isSetToTime()).compareTo(typedOther.isSetToTime());
5579
      if (lastComparison != 0) {
5580
        return lastComparison;
5581
      }
5582
      if (isSetToTime()) {
5583
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.toTime, typedOther.toTime);
5584
        if (lastComparison != 0) {
5585
          return lastComparison;
5586
        }
5587
      }
5588
      lastComparison = Boolean.valueOf(isSetGatewayId()).compareTo(typedOther.isSetGatewayId());
5589
      if (lastComparison != 0) {
5590
        return lastComparison;
5591
      }
5592
      if (isSetGatewayId()) {
5593
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayId, typedOther.gatewayId);
5594
        if (lastComparison != 0) {
5595
          return lastComparison;
5596
        }
5597
      }
5598
      return 0;
5599
    }
5600
 
5601
    public _Fields fieldForId(int fieldId) {
5602
      return _Fields.findByThriftId(fieldId);
5603
    }
5604
 
5605
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
5606
      org.apache.thrift.protocol.TField field;
5607
      iprot.readStructBegin();
5608
      while (true)
5609
      {
5610
        field = iprot.readFieldBegin();
5611
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
5612
          break;
5613
        }
5614
        switch (field.id) {
5615
          case 1: // FROM_TIME
5616
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5617
              this.fromTime = iprot.readI64();
5618
              setFromTimeIsSet(true);
5619
            } else { 
5620
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5621
            }
5622
            break;
5623
          case 2: // TO_TIME
5624
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5625
              this.toTime = iprot.readI64();
5626
              setToTimeIsSet(true);
5627
            } else { 
5628
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5629
            }
5630
            break;
5631
          case 3: // GATEWAY_ID
5632
            if (field.type == org.apache.thrift.protocol.TType.I64) {
5633
              this.gatewayId = iprot.readI64();
5634
              setGatewayIdIsSet(true);
5635
            } else { 
5636
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5637
            }
5638
            break;
5639
          default:
5640
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
5641
        }
5642
        iprot.readFieldEnd();
5643
      }
5644
      iprot.readStructEnd();
5645
      validate();
5646
    }
5647
 
5648
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
5649
      validate();
5650
 
5651
      oprot.writeStructBegin(STRUCT_DESC);
5652
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
5653
      oprot.writeI64(this.fromTime);
5654
      oprot.writeFieldEnd();
5655
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
5656
      oprot.writeI64(this.toTime);
5657
      oprot.writeFieldEnd();
5658
      oprot.writeFieldBegin(GATEWAY_ID_FIELD_DESC);
5659
      oprot.writeI64(this.gatewayId);
5660
      oprot.writeFieldEnd();
5661
      oprot.writeFieldStop();
5662
      oprot.writeStructEnd();
5663
    }
5664
 
5665
    @Override
5666
    public String toString() {
5667
      StringBuilder sb = new StringBuilder("getPaymentsByCapturedDate_args(");
5668
      boolean first = true;
5669
 
5670
      sb.append("fromTime:");
5671
      sb.append(this.fromTime);
5672
      first = false;
5673
      if (!first) sb.append(", ");
5674
      sb.append("toTime:");
5675
      sb.append(this.toTime);
5676
      first = false;
5677
      if (!first) sb.append(", ");
5678
      sb.append("gatewayId:");
5679
      sb.append(this.gatewayId);
5680
      first = false;
5681
      sb.append(")");
5682
      return sb.toString();
5683
    }
5684
 
5685
    public void validate() throws org.apache.thrift.TException {
5686
      // check for required fields
5687
    }
5688
 
5689
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
5690
      try {
5691
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
5692
      } catch (org.apache.thrift.TException te) {
5693
        throw new java.io.IOException(te);
5694
      }
5695
    }
5696
 
5697
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
5698
      try {
5699
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
5700
      } catch (org.apache.thrift.TException te) {
5701
        throw new java.io.IOException(te);
5702
      }
5703
    }
5704
 
5705
  }
5706
 
5707
  public static class getPaymentsByCapturedDate_result implements org.apache.thrift.TBase<getPaymentsByCapturedDate_result, getPaymentsByCapturedDate_result._Fields>, java.io.Serializable, Cloneable   {
5708
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsByCapturedDate_result");
5709
 
5710
    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);
5711
    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);
5712
 
5713
    private List<Payment> success; // required
5714
    private PaymentException pe; // required
5715
 
5716
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5717
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
5718
      SUCCESS((short)0, "success"),
5719
      PE((short)1, "pe");
5720
 
5721
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5722
 
5723
      static {
5724
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5725
          byName.put(field.getFieldName(), field);
5726
        }
5727
      }
5728
 
5729
      /**
5730
       * Find the _Fields constant that matches fieldId, or null if its not found.
5731
       */
5732
      public static _Fields findByThriftId(int fieldId) {
5733
        switch(fieldId) {
5734
          case 0: // SUCCESS
5735
            return SUCCESS;
5736
          case 1: // PE
5737
            return PE;
5738
          default:
5739
            return null;
5740
        }
5741
      }
5742
 
5743
      /**
5744
       * Find the _Fields constant that matches fieldId, throwing an exception
5745
       * if it is not found.
5746
       */
5747
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5748
        _Fields fields = findByThriftId(fieldId);
5749
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5750
        return fields;
5751
      }
5752
 
5753
      /**
5754
       * Find the _Fields constant that matches name, or null if its not found.
5755
       */
5756
      public static _Fields findByName(String name) {
5757
        return byName.get(name);
5758
      }
5759
 
5760
      private final short _thriftId;
5761
      private final String _fieldName;
5762
 
5763
      _Fields(short thriftId, String fieldName) {
5764
        _thriftId = thriftId;
5765
        _fieldName = fieldName;
5766
      }
5767
 
5768
      public short getThriftFieldId() {
5769
        return _thriftId;
5770
      }
5771
 
5772
      public String getFieldName() {
5773
        return _fieldName;
5774
      }
5775
    }
5776
 
5777
    // isset id assignments
5778
 
5779
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
5780
    static {
5781
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
5782
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5783
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
5784
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
5785
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
5786
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
5787
      metaDataMap = Collections.unmodifiableMap(tmpMap);
5788
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsByCapturedDate_result.class, metaDataMap);
5789
    }
5790
 
5791
    public getPaymentsByCapturedDate_result() {
5792
    }
5793
 
5794
    public getPaymentsByCapturedDate_result(
5795
      List<Payment> success,
5796
      PaymentException pe)
5797
    {
5798
      this();
5799
      this.success = success;
5800
      this.pe = pe;
5801
    }
5802
 
5803
    /**
5804
     * Performs a deep copy on <i>other</i>.
5805
     */
5806
    public getPaymentsByCapturedDate_result(getPaymentsByCapturedDate_result other) {
5807
      if (other.isSetSuccess()) {
5808
        List<Payment> __this__success = new ArrayList<Payment>();
5809
        for (Payment other_element : other.success) {
5810
          __this__success.add(new Payment(other_element));
5811
        }
5812
        this.success = __this__success;
5813
      }
5814
      if (other.isSetPe()) {
5815
        this.pe = new PaymentException(other.pe);
5816
      }
5817
    }
5818
 
5819
    public getPaymentsByCapturedDate_result deepCopy() {
5820
      return new getPaymentsByCapturedDate_result(this);
5821
    }
5822
 
5823
    @Override
5824
    public void clear() {
5825
      this.success = null;
5826
      this.pe = null;
5827
    }
5828
 
5829
    public int getSuccessSize() {
5830
      return (this.success == null) ? 0 : this.success.size();
5831
    }
5832
 
5833
    public java.util.Iterator<Payment> getSuccessIterator() {
5834
      return (this.success == null) ? null : this.success.iterator();
5835
    }
5836
 
5837
    public void addToSuccess(Payment elem) {
5838
      if (this.success == null) {
5839
        this.success = new ArrayList<Payment>();
5840
      }
5841
      this.success.add(elem);
5842
    }
5843
 
5844
    public List<Payment> getSuccess() {
5845
      return this.success;
5846
    }
5847
 
5848
    public void setSuccess(List<Payment> success) {
5849
      this.success = success;
5850
    }
5851
 
5852
    public void unsetSuccess() {
5853
      this.success = null;
5854
    }
5855
 
5856
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
5857
    public boolean isSetSuccess() {
5858
      return this.success != null;
5859
    }
5860
 
5861
    public void setSuccessIsSet(boolean value) {
5862
      if (!value) {
5863
        this.success = null;
5864
      }
5865
    }
5866
 
5867
    public PaymentException getPe() {
5868
      return this.pe;
5869
    }
5870
 
5871
    public void setPe(PaymentException pe) {
5872
      this.pe = pe;
5873
    }
5874
 
5875
    public void unsetPe() {
5876
      this.pe = null;
5877
    }
5878
 
5879
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
5880
    public boolean isSetPe() {
5881
      return this.pe != null;
5882
    }
5883
 
5884
    public void setPeIsSet(boolean value) {
5885
      if (!value) {
5886
        this.pe = null;
5887
      }
5888
    }
5889
 
5890
    public void setFieldValue(_Fields field, Object value) {
5891
      switch (field) {
5892
      case SUCCESS:
5893
        if (value == null) {
5894
          unsetSuccess();
5895
        } else {
5896
          setSuccess((List<Payment>)value);
5897
        }
5898
        break;
5899
 
5900
      case PE:
5901
        if (value == null) {
5902
          unsetPe();
5903
        } else {
5904
          setPe((PaymentException)value);
5905
        }
5906
        break;
5907
 
5908
      }
5909
    }
5910
 
5911
    public Object getFieldValue(_Fields field) {
5912
      switch (field) {
5913
      case SUCCESS:
5914
        return getSuccess();
5915
 
5916
      case PE:
5917
        return getPe();
5918
 
5919
      }
5920
      throw new IllegalStateException();
5921
    }
5922
 
5923
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
5924
    public boolean isSet(_Fields field) {
5925
      if (field == null) {
5926
        throw new IllegalArgumentException();
5927
      }
5928
 
5929
      switch (field) {
5930
      case SUCCESS:
5931
        return isSetSuccess();
5932
      case PE:
5933
        return isSetPe();
5934
      }
5935
      throw new IllegalStateException();
5936
    }
5937
 
5938
    @Override
5939
    public boolean equals(Object that) {
5940
      if (that == null)
5941
        return false;
5942
      if (that instanceof getPaymentsByCapturedDate_result)
5943
        return this.equals((getPaymentsByCapturedDate_result)that);
5944
      return false;
5945
    }
5946
 
5947
    public boolean equals(getPaymentsByCapturedDate_result that) {
5948
      if (that == null)
5949
        return false;
5950
 
5951
      boolean this_present_success = true && this.isSetSuccess();
5952
      boolean that_present_success = true && that.isSetSuccess();
5953
      if (this_present_success || that_present_success) {
5954
        if (!(this_present_success && that_present_success))
5955
          return false;
5956
        if (!this.success.equals(that.success))
5957
          return false;
5958
      }
5959
 
5960
      boolean this_present_pe = true && this.isSetPe();
5961
      boolean that_present_pe = true && that.isSetPe();
5962
      if (this_present_pe || that_present_pe) {
5963
        if (!(this_present_pe && that_present_pe))
5964
          return false;
5965
        if (!this.pe.equals(that.pe))
5966
          return false;
5967
      }
5968
 
5969
      return true;
5970
    }
5971
 
5972
    @Override
5973
    public int hashCode() {
5974
      return 0;
5975
    }
5976
 
5977
    public int compareTo(getPaymentsByCapturedDate_result other) {
5978
      if (!getClass().equals(other.getClass())) {
5979
        return getClass().getName().compareTo(other.getClass().getName());
5980
      }
5981
 
5982
      int lastComparison = 0;
5983
      getPaymentsByCapturedDate_result typedOther = (getPaymentsByCapturedDate_result)other;
5984
 
5985
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
5986
      if (lastComparison != 0) {
5987
        return lastComparison;
5988
      }
5989
      if (isSetSuccess()) {
5990
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
5991
        if (lastComparison != 0) {
5992
          return lastComparison;
5993
        }
5994
      }
5995
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
5996
      if (lastComparison != 0) {
5997
        return lastComparison;
5998
      }
5999
      if (isSetPe()) {
6000
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
6001
        if (lastComparison != 0) {
6002
          return lastComparison;
6003
        }
6004
      }
6005
      return 0;
6006
    }
6007
 
6008
    public _Fields fieldForId(int fieldId) {
6009
      return _Fields.findByThriftId(fieldId);
6010
    }
6011
 
6012
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6013
      org.apache.thrift.protocol.TField field;
6014
      iprot.readStructBegin();
6015
      while (true)
6016
      {
6017
        field = iprot.readFieldBegin();
6018
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6019
          break;
6020
        }
6021
        switch (field.id) {
6022
          case 0: // SUCCESS
6023
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
6024
              {
6025
                org.apache.thrift.protocol.TList _list20 = iprot.readListBegin();
6026
                this.success = new ArrayList<Payment>(_list20.size);
6027
                for (int _i21 = 0; _i21 < _list20.size; ++_i21)
6028
                {
6029
                  Payment _elem22; // required
6030
                  _elem22 = new Payment();
6031
                  _elem22.read(iprot);
6032
                  this.success.add(_elem22);
6033
                }
6034
                iprot.readListEnd();
6035
              }
6036
            } else { 
6037
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6038
            }
6039
            break;
6040
          case 1: // PE
6041
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6042
              this.pe = new PaymentException();
6043
              this.pe.read(iprot);
6044
            } else { 
6045
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6046
            }
6047
            break;
6048
          default:
6049
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6050
        }
6051
        iprot.readFieldEnd();
6052
      }
6053
      iprot.readStructEnd();
6054
      validate();
6055
    }
6056
 
6057
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6058
      oprot.writeStructBegin(STRUCT_DESC);
6059
 
6060
      if (this.isSetSuccess()) {
6061
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6062
        {
6063
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
6064
          for (Payment _iter23 : this.success)
6065
          {
6066
            _iter23.write(oprot);
6067
          }
6068
          oprot.writeListEnd();
6069
        }
6070
        oprot.writeFieldEnd();
6071
      } else if (this.isSetPe()) {
6072
        oprot.writeFieldBegin(PE_FIELD_DESC);
6073
        this.pe.write(oprot);
6074
        oprot.writeFieldEnd();
6075
      }
6076
      oprot.writeFieldStop();
6077
      oprot.writeStructEnd();
6078
    }
6079
 
6080
    @Override
6081
    public String toString() {
6082
      StringBuilder sb = new StringBuilder("getPaymentsByCapturedDate_result(");
6083
      boolean first = true;
6084
 
6085
      sb.append("success:");
6086
      if (this.success == null) {
6087
        sb.append("null");
6088
      } else {
6089
        sb.append(this.success);
6090
      }
6091
      first = false;
6092
      if (!first) sb.append(", ");
6093
      sb.append("pe:");
6094
      if (this.pe == null) {
6095
        sb.append("null");
6096
      } else {
6097
        sb.append(this.pe);
6098
      }
6099
      first = false;
6100
      sb.append(")");
6101
      return sb.toString();
6102
    }
6103
 
6104
    public void validate() throws org.apache.thrift.TException {
6105
      // check for required fields
6106
    }
6107
 
6108
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6109
      try {
6110
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6111
      } catch (org.apache.thrift.TException te) {
6112
        throw new java.io.IOException(te);
6113
      }
6114
    }
6115
 
6116
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6117
      try {
6118
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6119
      } catch (org.apache.thrift.TException te) {
6120
        throw new java.io.IOException(te);
6121
      }
6122
    }
6123
 
6124
  }
6125
 
3430 rajveer 6126
  public static class getPaymentGateway_args implements org.apache.thrift.TBase<getPaymentGateway_args, getPaymentGateway_args._Fields>, java.io.Serializable, Cloneable   {
6127
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentGateway_args");
123 ashish 6128
 
3430 rajveer 6129
    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 6130
 
3430 rajveer 6131
    private long id; // required
123 ashish 6132
 
6133
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6134
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 6135
      ID((short)1, "id");
123 ashish 6136
 
6137
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6138
 
6139
      static {
6140
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6141
          byName.put(field.getFieldName(), field);
6142
        }
6143
      }
6144
 
6145
      /**
6146
       * Find the _Fields constant that matches fieldId, or null if its not found.
6147
       */
6148
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6149
        switch(fieldId) {
6150
          case 1: // ID
6151
            return ID;
6152
          default:
6153
            return null;
6154
        }
123 ashish 6155
      }
6156
 
6157
      /**
6158
       * Find the _Fields constant that matches fieldId, throwing an exception
6159
       * if it is not found.
6160
       */
6161
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6162
        _Fields fields = findByThriftId(fieldId);
6163
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6164
        return fields;
6165
      }
6166
 
6167
      /**
6168
       * Find the _Fields constant that matches name, or null if its not found.
6169
       */
6170
      public static _Fields findByName(String name) {
6171
        return byName.get(name);
6172
      }
6173
 
6174
      private final short _thriftId;
6175
      private final String _fieldName;
6176
 
6177
      _Fields(short thriftId, String fieldName) {
6178
        _thriftId = thriftId;
6179
        _fieldName = fieldName;
6180
      }
6181
 
6182
      public short getThriftFieldId() {
6183
        return _thriftId;
6184
      }
6185
 
6186
      public String getFieldName() {
6187
        return _fieldName;
6188
      }
6189
    }
6190
 
6191
    // isset id assignments
420 ashish 6192
    private static final int __ID_ISSET_ID = 0;
123 ashish 6193
    private BitSet __isset_bit_vector = new BitSet(1);
6194
 
3430 rajveer 6195
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
123 ashish 6196
    static {
3430 rajveer 6197
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6198
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6199
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6200
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6201
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentGateway_args.class, metaDataMap);
123 ashish 6202
    }
6203
 
695 rajveer 6204
    public getPaymentGateway_args() {
123 ashish 6205
    }
6206
 
695 rajveer 6207
    public getPaymentGateway_args(
6208
      long id)
123 ashish 6209
    {
6210
      this();
420 ashish 6211
      this.id = id;
6212
      setIdIsSet(true);
123 ashish 6213
    }
6214
 
6215
    /**
6216
     * Performs a deep copy on <i>other</i>.
6217
     */
695 rajveer 6218
    public getPaymentGateway_args(getPaymentGateway_args other) {
123 ashish 6219
      __isset_bit_vector.clear();
6220
      __isset_bit_vector.or(other.__isset_bit_vector);
420 ashish 6221
      this.id = other.id;
123 ashish 6222
    }
6223
 
695 rajveer 6224
    public getPaymentGateway_args deepCopy() {
6225
      return new getPaymentGateway_args(this);
123 ashish 6226
    }
6227
 
3430 rajveer 6228
    @Override
6229
    public void clear() {
6230
      setIdIsSet(false);
6231
      this.id = 0;
123 ashish 6232
    }
6233
 
420 ashish 6234
    public long getId() {
6235
      return this.id;
123 ashish 6236
    }
6237
 
3430 rajveer 6238
    public void setId(long id) {
420 ashish 6239
      this.id = id;
6240
      setIdIsSet(true);
123 ashish 6241
    }
6242
 
420 ashish 6243
    public void unsetId() {
6244
      __isset_bit_vector.clear(__ID_ISSET_ID);
123 ashish 6245
    }
6246
 
3430 rajveer 6247
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
420 ashish 6248
    public boolean isSetId() {
6249
      return __isset_bit_vector.get(__ID_ISSET_ID);
123 ashish 6250
    }
6251
 
420 ashish 6252
    public void setIdIsSet(boolean value) {
6253
      __isset_bit_vector.set(__ID_ISSET_ID, value);
123 ashish 6254
    }
6255
 
6256
    public void setFieldValue(_Fields field, Object value) {
6257
      switch (field) {
420 ashish 6258
      case ID:
123 ashish 6259
        if (value == null) {
420 ashish 6260
          unsetId();
123 ashish 6261
        } else {
420 ashish 6262
          setId((Long)value);
123 ashish 6263
        }
6264
        break;
6265
 
6266
      }
6267
    }
6268
 
6269
    public Object getFieldValue(_Fields field) {
6270
      switch (field) {
420 ashish 6271
      case ID:
3430 rajveer 6272
        return Long.valueOf(getId());
123 ashish 6273
 
6274
      }
6275
      throw new IllegalStateException();
6276
    }
6277
 
3430 rajveer 6278
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6279
    public boolean isSet(_Fields field) {
6280
      if (field == null) {
6281
        throw new IllegalArgumentException();
6282
      }
123 ashish 6283
 
6284
      switch (field) {
420 ashish 6285
      case ID:
6286
        return isSetId();
123 ashish 6287
      }
6288
      throw new IllegalStateException();
6289
    }
6290
 
6291
    @Override
6292
    public boolean equals(Object that) {
6293
      if (that == null)
6294
        return false;
695 rajveer 6295
      if (that instanceof getPaymentGateway_args)
6296
        return this.equals((getPaymentGateway_args)that);
123 ashish 6297
      return false;
6298
    }
6299
 
695 rajveer 6300
    public boolean equals(getPaymentGateway_args that) {
123 ashish 6301
      if (that == null)
6302
        return false;
6303
 
420 ashish 6304
      boolean this_present_id = true;
6305
      boolean that_present_id = true;
6306
      if (this_present_id || that_present_id) {
6307
        if (!(this_present_id && that_present_id))
123 ashish 6308
          return false;
420 ashish 6309
        if (this.id != that.id)
123 ashish 6310
          return false;
6311
      }
6312
 
6313
      return true;
6314
    }
6315
 
6316
    @Override
6317
    public int hashCode() {
6318
      return 0;
6319
    }
6320
 
695 rajveer 6321
    public int compareTo(getPaymentGateway_args other) {
123 ashish 6322
      if (!getClass().equals(other.getClass())) {
6323
        return getClass().getName().compareTo(other.getClass().getName());
6324
      }
6325
 
6326
      int lastComparison = 0;
695 rajveer 6327
      getPaymentGateway_args typedOther = (getPaymentGateway_args)other;
123 ashish 6328
 
3430 rajveer 6329
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
123 ashish 6330
      if (lastComparison != 0) {
6331
        return lastComparison;
6332
      }
3430 rajveer 6333
      if (isSetId()) {
6334
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
6335
        if (lastComparison != 0) {
6336
          return lastComparison;
6337
        }
123 ashish 6338
      }
6339
      return 0;
6340
    }
6341
 
3430 rajveer 6342
    public _Fields fieldForId(int fieldId) {
6343
      return _Fields.findByThriftId(fieldId);
6344
    }
6345
 
6346
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6347
      org.apache.thrift.protocol.TField field;
123 ashish 6348
      iprot.readStructBegin();
6349
      while (true)
6350
      {
6351
        field = iprot.readFieldBegin();
3430 rajveer 6352
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
123 ashish 6353
          break;
6354
        }
3430 rajveer 6355
        switch (field.id) {
6356
          case 1: // ID
6357
            if (field.type == org.apache.thrift.protocol.TType.I64) {
6358
              this.id = iprot.readI64();
6359
              setIdIsSet(true);
6360
            } else { 
6361
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6362
            }
6363
            break;
6364
          default:
6365
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
123 ashish 6366
        }
3430 rajveer 6367
        iprot.readFieldEnd();
123 ashish 6368
      }
6369
      iprot.readStructEnd();
6370
      validate();
6371
    }
6372
 
3430 rajveer 6373
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
123 ashish 6374
      validate();
6375
 
6376
      oprot.writeStructBegin(STRUCT_DESC);
420 ashish 6377
      oprot.writeFieldBegin(ID_FIELD_DESC);
6378
      oprot.writeI64(this.id);
123 ashish 6379
      oprot.writeFieldEnd();
6380
      oprot.writeFieldStop();
6381
      oprot.writeStructEnd();
6382
    }
6383
 
6384
    @Override
6385
    public String toString() {
695 rajveer 6386
      StringBuilder sb = new StringBuilder("getPaymentGateway_args(");
123 ashish 6387
      boolean first = true;
6388
 
420 ashish 6389
      sb.append("id:");
6390
      sb.append(this.id);
123 ashish 6391
      first = false;
6392
      sb.append(")");
6393
      return sb.toString();
6394
    }
6395
 
3430 rajveer 6396
    public void validate() throws org.apache.thrift.TException {
123 ashish 6397
      // check for required fields
6398
    }
6399
 
3430 rajveer 6400
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6401
      try {
6402
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6403
      } catch (org.apache.thrift.TException te) {
6404
        throw new java.io.IOException(te);
6405
      }
6406
    }
6407
 
6408
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6409
      try {
6410
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
6411
        __isset_bit_vector = new BitSet(1);
6412
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6413
      } catch (org.apache.thrift.TException te) {
6414
        throw new java.io.IOException(te);
6415
      }
6416
    }
6417
 
123 ashish 6418
  }
6419
 
3430 rajveer 6420
  public static class getPaymentGateway_result implements org.apache.thrift.TBase<getPaymentGateway_result, getPaymentGateway_result._Fields>, java.io.Serializable, Cloneable   {
6421
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentGateway_result");
123 ashish 6422
 
3430 rajveer 6423
    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);
6424
    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 6425
 
3430 rajveer 6426
    private PaymentGateway success; // required
6427
    private PaymentException pe; // required
123 ashish 6428
 
6429
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 6430
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 6431
      SUCCESS((short)0, "success"),
6432
      PE((short)1, "pe");
6433
 
6434
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6435
 
6436
      static {
6437
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6438
          byName.put(field.getFieldName(), field);
6439
        }
6440
      }
6441
 
6442
      /**
6443
       * Find the _Fields constant that matches fieldId, or null if its not found.
6444
       */
6445
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 6446
        switch(fieldId) {
6447
          case 0: // SUCCESS
6448
            return SUCCESS;
6449
          case 1: // PE
6450
            return PE;
6451
          default:
6452
            return null;
6453
        }
420 ashish 6454
      }
6455
 
6456
      /**
6457
       * Find the _Fields constant that matches fieldId, throwing an exception
6458
       * if it is not found.
6459
       */
6460
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6461
        _Fields fields = findByThriftId(fieldId);
6462
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6463
        return fields;
6464
      }
6465
 
6466
      /**
6467
       * Find the _Fields constant that matches name, or null if its not found.
6468
       */
6469
      public static _Fields findByName(String name) {
6470
        return byName.get(name);
6471
      }
6472
 
6473
      private final short _thriftId;
6474
      private final String _fieldName;
6475
 
6476
      _Fields(short thriftId, String fieldName) {
6477
        _thriftId = thriftId;
6478
        _fieldName = fieldName;
6479
      }
6480
 
6481
      public short getThriftFieldId() {
6482
        return _thriftId;
6483
      }
6484
 
6485
      public String getFieldName() {
6486
        return _fieldName;
6487
      }
6488
    }
6489
 
6490
    // isset id assignments
6491
 
3430 rajveer 6492
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 6493
    static {
3430 rajveer 6494
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6495
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6496
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PaymentGateway.class)));
6497
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
6498
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
6499
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6500
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentGateway_result.class, metaDataMap);
420 ashish 6501
    }
6502
 
695 rajveer 6503
    public getPaymentGateway_result() {
420 ashish 6504
    }
6505
 
695 rajveer 6506
    public getPaymentGateway_result(
6507
      PaymentGateway success,
420 ashish 6508
      PaymentException pe)
6509
    {
6510
      this();
6511
      this.success = success;
6512
      this.pe = pe;
6513
    }
6514
 
6515
    /**
6516
     * Performs a deep copy on <i>other</i>.
6517
     */
695 rajveer 6518
    public getPaymentGateway_result(getPaymentGateway_result other) {
420 ashish 6519
      if (other.isSetSuccess()) {
695 rajveer 6520
        this.success = new PaymentGateway(other.success);
420 ashish 6521
      }
6522
      if (other.isSetPe()) {
6523
        this.pe = new PaymentException(other.pe);
6524
      }
6525
    }
6526
 
695 rajveer 6527
    public getPaymentGateway_result deepCopy() {
6528
      return new getPaymentGateway_result(this);
420 ashish 6529
    }
6530
 
3430 rajveer 6531
    @Override
6532
    public void clear() {
6533
      this.success = null;
6534
      this.pe = null;
420 ashish 6535
    }
6536
 
695 rajveer 6537
    public PaymentGateway getSuccess() {
420 ashish 6538
      return this.success;
6539
    }
6540
 
3430 rajveer 6541
    public void setSuccess(PaymentGateway success) {
420 ashish 6542
      this.success = success;
6543
    }
6544
 
6545
    public void unsetSuccess() {
6546
      this.success = null;
6547
    }
6548
 
3430 rajveer 6549
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
420 ashish 6550
    public boolean isSetSuccess() {
6551
      return this.success != null;
6552
    }
6553
 
6554
    public void setSuccessIsSet(boolean value) {
6555
      if (!value) {
6556
        this.success = null;
6557
      }
6558
    }
6559
 
6560
    public PaymentException getPe() {
6561
      return this.pe;
6562
    }
6563
 
3430 rajveer 6564
    public void setPe(PaymentException pe) {
420 ashish 6565
      this.pe = pe;
6566
    }
6567
 
6568
    public void unsetPe() {
6569
      this.pe = null;
6570
    }
6571
 
3430 rajveer 6572
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
420 ashish 6573
    public boolean isSetPe() {
6574
      return this.pe != null;
6575
    }
6576
 
6577
    public void setPeIsSet(boolean value) {
6578
      if (!value) {
6579
        this.pe = null;
6580
      }
6581
    }
6582
 
6583
    public void setFieldValue(_Fields field, Object value) {
6584
      switch (field) {
6585
      case SUCCESS:
6586
        if (value == null) {
6587
          unsetSuccess();
6588
        } else {
695 rajveer 6589
          setSuccess((PaymentGateway)value);
420 ashish 6590
        }
6591
        break;
6592
 
6593
      case PE:
6594
        if (value == null) {
6595
          unsetPe();
6596
        } else {
6597
          setPe((PaymentException)value);
6598
        }
6599
        break;
6600
 
6601
      }
6602
    }
6603
 
6604
    public Object getFieldValue(_Fields field) {
6605
      switch (field) {
6606
      case SUCCESS:
6607
        return getSuccess();
6608
 
6609
      case PE:
6610
        return getPe();
6611
 
6612
      }
6613
      throw new IllegalStateException();
6614
    }
6615
 
3430 rajveer 6616
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6617
    public boolean isSet(_Fields field) {
6618
      if (field == null) {
6619
        throw new IllegalArgumentException();
6620
      }
420 ashish 6621
 
6622
      switch (field) {
6623
      case SUCCESS:
6624
        return isSetSuccess();
6625
      case PE:
6626
        return isSetPe();
6627
      }
6628
      throw new IllegalStateException();
6629
    }
6630
 
6631
    @Override
6632
    public boolean equals(Object that) {
6633
      if (that == null)
6634
        return false;
695 rajveer 6635
      if (that instanceof getPaymentGateway_result)
6636
        return this.equals((getPaymentGateway_result)that);
420 ashish 6637
      return false;
6638
    }
6639
 
695 rajveer 6640
    public boolean equals(getPaymentGateway_result that) {
420 ashish 6641
      if (that == null)
6642
        return false;
6643
 
6644
      boolean this_present_success = true && this.isSetSuccess();
6645
      boolean that_present_success = true && that.isSetSuccess();
6646
      if (this_present_success || that_present_success) {
6647
        if (!(this_present_success && that_present_success))
6648
          return false;
6649
        if (!this.success.equals(that.success))
6650
          return false;
6651
      }
6652
 
6653
      boolean this_present_pe = true && this.isSetPe();
6654
      boolean that_present_pe = true && that.isSetPe();
6655
      if (this_present_pe || that_present_pe) {
6656
        if (!(this_present_pe && that_present_pe))
6657
          return false;
6658
        if (!this.pe.equals(that.pe))
6659
          return false;
6660
      }
6661
 
6662
      return true;
6663
    }
6664
 
6665
    @Override
6666
    public int hashCode() {
6667
      return 0;
6668
    }
6669
 
695 rajveer 6670
    public int compareTo(getPaymentGateway_result other) {
6671
      if (!getClass().equals(other.getClass())) {
6672
        return getClass().getName().compareTo(other.getClass().getName());
6673
      }
6674
 
6675
      int lastComparison = 0;
6676
      getPaymentGateway_result typedOther = (getPaymentGateway_result)other;
6677
 
3430 rajveer 6678
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
695 rajveer 6679
      if (lastComparison != 0) {
6680
        return lastComparison;
6681
      }
3430 rajveer 6682
      if (isSetSuccess()) {
6683
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
6684
        if (lastComparison != 0) {
6685
          return lastComparison;
6686
        }
695 rajveer 6687
      }
3430 rajveer 6688
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
695 rajveer 6689
      if (lastComparison != 0) {
6690
        return lastComparison;
6691
      }
3430 rajveer 6692
      if (isSetPe()) {
6693
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
6694
        if (lastComparison != 0) {
6695
          return lastComparison;
6696
        }
695 rajveer 6697
      }
6698
      return 0;
6699
    }
6700
 
3430 rajveer 6701
    public _Fields fieldForId(int fieldId) {
6702
      return _Fields.findByThriftId(fieldId);
6703
    }
6704
 
6705
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6706
      org.apache.thrift.protocol.TField field;
420 ashish 6707
      iprot.readStructBegin();
6708
      while (true)
6709
      {
6710
        field = iprot.readFieldBegin();
3430 rajveer 6711
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 6712
          break;
6713
        }
3430 rajveer 6714
        switch (field.id) {
6715
          case 0: // SUCCESS
6716
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6717
              this.success = new PaymentGateway();
6718
              this.success.read(iprot);
6719
            } else { 
6720
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6721
            }
6722
            break;
6723
          case 1: // PE
6724
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
6725
              this.pe = new PaymentException();
6726
              this.pe.read(iprot);
6727
            } else { 
6728
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6729
            }
6730
            break;
6731
          default:
6732
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 6733
        }
3430 rajveer 6734
        iprot.readFieldEnd();
420 ashish 6735
      }
6736
      iprot.readStructEnd();
6737
      validate();
6738
    }
6739
 
3430 rajveer 6740
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 6741
      oprot.writeStructBegin(STRUCT_DESC);
6742
 
6743
      if (this.isSetSuccess()) {
6744
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
695 rajveer 6745
        this.success.write(oprot);
420 ashish 6746
        oprot.writeFieldEnd();
6747
      } else if (this.isSetPe()) {
6748
        oprot.writeFieldBegin(PE_FIELD_DESC);
6749
        this.pe.write(oprot);
6750
        oprot.writeFieldEnd();
6751
      }
6752
      oprot.writeFieldStop();
6753
      oprot.writeStructEnd();
6754
    }
6755
 
6756
    @Override
6757
    public String toString() {
695 rajveer 6758
      StringBuilder sb = new StringBuilder("getPaymentGateway_result(");
420 ashish 6759
      boolean first = true;
6760
 
6761
      sb.append("success:");
6762
      if (this.success == null) {
6763
        sb.append("null");
6764
      } else {
6765
        sb.append(this.success);
6766
      }
6767
      first = false;
6768
      if (!first) sb.append(", ");
6769
      sb.append("pe:");
6770
      if (this.pe == null) {
6771
        sb.append("null");
6772
      } else {
6773
        sb.append(this.pe);
6774
      }
6775
      first = false;
6776
      sb.append(")");
6777
      return sb.toString();
6778
    }
6779
 
3430 rajveer 6780
    public void validate() throws org.apache.thrift.TException {
420 ashish 6781
      // check for required fields
6782
    }
6783
 
3430 rajveer 6784
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6785
      try {
6786
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6787
      } catch (org.apache.thrift.TException te) {
6788
        throw new java.io.IOException(te);
6789
      }
6790
    }
6791
 
6792
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6793
      try {
6794
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6795
      } catch (org.apache.thrift.TException te) {
6796
        throw new java.io.IOException(te);
6797
      }
6798
    }
6799
 
420 ashish 6800
  }
6801
 
4600 varun.gupt 6802
  public static class getActivePaymentGateways_args implements org.apache.thrift.TBase<getActivePaymentGateways_args, getActivePaymentGateways_args._Fields>, java.io.Serializable, Cloneable   {
6803
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActivePaymentGateways_args");
6804
 
6805
 
6806
 
6807
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6808
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
6809
;
6810
 
6811
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6812
 
6813
      static {
6814
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6815
          byName.put(field.getFieldName(), field);
6816
        }
6817
      }
6818
 
6819
      /**
6820
       * Find the _Fields constant that matches fieldId, or null if its not found.
6821
       */
6822
      public static _Fields findByThriftId(int fieldId) {
6823
        switch(fieldId) {
6824
          default:
6825
            return null;
6826
        }
6827
      }
6828
 
6829
      /**
6830
       * Find the _Fields constant that matches fieldId, throwing an exception
6831
       * if it is not found.
6832
       */
6833
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6834
        _Fields fields = findByThriftId(fieldId);
6835
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6836
        return fields;
6837
      }
6838
 
6839
      /**
6840
       * Find the _Fields constant that matches name, or null if its not found.
6841
       */
6842
      public static _Fields findByName(String name) {
6843
        return byName.get(name);
6844
      }
6845
 
6846
      private final short _thriftId;
6847
      private final String _fieldName;
6848
 
6849
      _Fields(short thriftId, String fieldName) {
6850
        _thriftId = thriftId;
6851
        _fieldName = fieldName;
6852
      }
6853
 
6854
      public short getThriftFieldId() {
6855
        return _thriftId;
6856
      }
6857
 
6858
      public String getFieldName() {
6859
        return _fieldName;
6860
      }
6861
    }
6862
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
6863
    static {
6864
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
6865
      metaDataMap = Collections.unmodifiableMap(tmpMap);
6866
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getActivePaymentGateways_args.class, metaDataMap);
6867
    }
6868
 
6869
    public getActivePaymentGateways_args() {
6870
    }
6871
 
6872
    /**
6873
     * Performs a deep copy on <i>other</i>.
6874
     */
6875
    public getActivePaymentGateways_args(getActivePaymentGateways_args other) {
6876
    }
6877
 
6878
    public getActivePaymentGateways_args deepCopy() {
6879
      return new getActivePaymentGateways_args(this);
6880
    }
6881
 
6882
    @Override
6883
    public void clear() {
6884
    }
6885
 
6886
    public void setFieldValue(_Fields field, Object value) {
6887
      switch (field) {
6888
      }
6889
    }
6890
 
6891
    public Object getFieldValue(_Fields field) {
6892
      switch (field) {
6893
      }
6894
      throw new IllegalStateException();
6895
    }
6896
 
6897
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
6898
    public boolean isSet(_Fields field) {
6899
      if (field == null) {
6900
        throw new IllegalArgumentException();
6901
      }
6902
 
6903
      switch (field) {
6904
      }
6905
      throw new IllegalStateException();
6906
    }
6907
 
6908
    @Override
6909
    public boolean equals(Object that) {
6910
      if (that == null)
6911
        return false;
6912
      if (that instanceof getActivePaymentGateways_args)
6913
        return this.equals((getActivePaymentGateways_args)that);
6914
      return false;
6915
    }
6916
 
6917
    public boolean equals(getActivePaymentGateways_args that) {
6918
      if (that == null)
6919
        return false;
6920
 
6921
      return true;
6922
    }
6923
 
6924
    @Override
6925
    public int hashCode() {
6926
      return 0;
6927
    }
6928
 
6929
    public int compareTo(getActivePaymentGateways_args other) {
6930
      if (!getClass().equals(other.getClass())) {
6931
        return getClass().getName().compareTo(other.getClass().getName());
6932
      }
6933
 
6934
      int lastComparison = 0;
6935
      getActivePaymentGateways_args typedOther = (getActivePaymentGateways_args)other;
6936
 
6937
      return 0;
6938
    }
6939
 
6940
    public _Fields fieldForId(int fieldId) {
6941
      return _Fields.findByThriftId(fieldId);
6942
    }
6943
 
6944
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
6945
      org.apache.thrift.protocol.TField field;
6946
      iprot.readStructBegin();
6947
      while (true)
6948
      {
6949
        field = iprot.readFieldBegin();
6950
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
6951
          break;
6952
        }
6953
        switch (field.id) {
6954
          default:
6955
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
6956
        }
6957
        iprot.readFieldEnd();
6958
      }
6959
      iprot.readStructEnd();
6960
      validate();
6961
    }
6962
 
6963
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
6964
      validate();
6965
 
6966
      oprot.writeStructBegin(STRUCT_DESC);
6967
      oprot.writeFieldStop();
6968
      oprot.writeStructEnd();
6969
    }
6970
 
6971
    @Override
6972
    public String toString() {
6973
      StringBuilder sb = new StringBuilder("getActivePaymentGateways_args(");
6974
      boolean first = true;
6975
 
6976
      sb.append(")");
6977
      return sb.toString();
6978
    }
6979
 
6980
    public void validate() throws org.apache.thrift.TException {
6981
      // check for required fields
6982
    }
6983
 
6984
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
6985
      try {
6986
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
6987
      } catch (org.apache.thrift.TException te) {
6988
        throw new java.io.IOException(te);
6989
      }
6990
    }
6991
 
6992
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
6993
      try {
6994
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
6995
      } catch (org.apache.thrift.TException te) {
6996
        throw new java.io.IOException(te);
6997
      }
6998
    }
6999
 
7000
  }
7001
 
7002
  public static class getActivePaymentGateways_result implements org.apache.thrift.TBase<getActivePaymentGateways_result, getActivePaymentGateways_result._Fields>, java.io.Serializable, Cloneable   {
7003
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getActivePaymentGateways_result");
7004
 
7005
    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);
7006
    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);
7007
 
7008
    private List<PaymentGateway> success; // required
7009
    private PaymentException pe; // required
7010
 
7011
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7012
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
7013
      SUCCESS((short)0, "success"),
7014
      PE((short)1, "pe");
7015
 
7016
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7017
 
7018
      static {
7019
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7020
          byName.put(field.getFieldName(), field);
7021
        }
7022
      }
7023
 
7024
      /**
7025
       * Find the _Fields constant that matches fieldId, or null if its not found.
7026
       */
7027
      public static _Fields findByThriftId(int fieldId) {
7028
        switch(fieldId) {
7029
          case 0: // SUCCESS
7030
            return SUCCESS;
7031
          case 1: // PE
7032
            return PE;
7033
          default:
7034
            return null;
7035
        }
7036
      }
7037
 
7038
      /**
7039
       * Find the _Fields constant that matches fieldId, throwing an exception
7040
       * if it is not found.
7041
       */
7042
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7043
        _Fields fields = findByThriftId(fieldId);
7044
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7045
        return fields;
7046
      }
7047
 
7048
      /**
7049
       * Find the _Fields constant that matches name, or null if its not found.
7050
       */
7051
      public static _Fields findByName(String name) {
7052
        return byName.get(name);
7053
      }
7054
 
7055
      private final short _thriftId;
7056
      private final String _fieldName;
7057
 
7058
      _Fields(short thriftId, String fieldName) {
7059
        _thriftId = thriftId;
7060
        _fieldName = fieldName;
7061
      }
7062
 
7063
      public short getThriftFieldId() {
7064
        return _thriftId;
7065
      }
7066
 
7067
      public String getFieldName() {
7068
        return _fieldName;
7069
      }
7070
    }
7071
 
7072
    // isset id assignments
7073
 
7074
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
7075
    static {
7076
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7077
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7078
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
7079
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, PaymentGateway.class))));
7080
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7081
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7082
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7083
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getActivePaymentGateways_result.class, metaDataMap);
7084
    }
7085
 
7086
    public getActivePaymentGateways_result() {
7087
    }
7088
 
7089
    public getActivePaymentGateways_result(
7090
      List<PaymentGateway> success,
7091
      PaymentException pe)
7092
    {
7093
      this();
7094
      this.success = success;
7095
      this.pe = pe;
7096
    }
7097
 
7098
    /**
7099
     * Performs a deep copy on <i>other</i>.
7100
     */
7101
    public getActivePaymentGateways_result(getActivePaymentGateways_result other) {
7102
      if (other.isSetSuccess()) {
7103
        List<PaymentGateway> __this__success = new ArrayList<PaymentGateway>();
7104
        for (PaymentGateway other_element : other.success) {
7105
          __this__success.add(new PaymentGateway(other_element));
7106
        }
7107
        this.success = __this__success;
7108
      }
7109
      if (other.isSetPe()) {
7110
        this.pe = new PaymentException(other.pe);
7111
      }
7112
    }
7113
 
7114
    public getActivePaymentGateways_result deepCopy() {
7115
      return new getActivePaymentGateways_result(this);
7116
    }
7117
 
7118
    @Override
7119
    public void clear() {
7120
      this.success = null;
7121
      this.pe = null;
7122
    }
7123
 
7124
    public int getSuccessSize() {
7125
      return (this.success == null) ? 0 : this.success.size();
7126
    }
7127
 
7128
    public java.util.Iterator<PaymentGateway> getSuccessIterator() {
7129
      return (this.success == null) ? null : this.success.iterator();
7130
    }
7131
 
7132
    public void addToSuccess(PaymentGateway elem) {
7133
      if (this.success == null) {
7134
        this.success = new ArrayList<PaymentGateway>();
7135
      }
7136
      this.success.add(elem);
7137
    }
7138
 
7139
    public List<PaymentGateway> getSuccess() {
7140
      return this.success;
7141
    }
7142
 
7143
    public void setSuccess(List<PaymentGateway> success) {
7144
      this.success = success;
7145
    }
7146
 
7147
    public void unsetSuccess() {
7148
      this.success = null;
7149
    }
7150
 
7151
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
7152
    public boolean isSetSuccess() {
7153
      return this.success != null;
7154
    }
7155
 
7156
    public void setSuccessIsSet(boolean value) {
7157
      if (!value) {
7158
        this.success = null;
7159
      }
7160
    }
7161
 
7162
    public PaymentException getPe() {
7163
      return this.pe;
7164
    }
7165
 
7166
    public void setPe(PaymentException pe) {
7167
      this.pe = pe;
7168
    }
7169
 
7170
    public void unsetPe() {
7171
      this.pe = null;
7172
    }
7173
 
7174
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
7175
    public boolean isSetPe() {
7176
      return this.pe != null;
7177
    }
7178
 
7179
    public void setPeIsSet(boolean value) {
7180
      if (!value) {
7181
        this.pe = null;
7182
      }
7183
    }
7184
 
7185
    public void setFieldValue(_Fields field, Object value) {
7186
      switch (field) {
7187
      case SUCCESS:
7188
        if (value == null) {
7189
          unsetSuccess();
7190
        } else {
7191
          setSuccess((List<PaymentGateway>)value);
7192
        }
7193
        break;
7194
 
7195
      case PE:
7196
        if (value == null) {
7197
          unsetPe();
7198
        } else {
7199
          setPe((PaymentException)value);
7200
        }
7201
        break;
7202
 
7203
      }
7204
    }
7205
 
7206
    public Object getFieldValue(_Fields field) {
7207
      switch (field) {
7208
      case SUCCESS:
7209
        return getSuccess();
7210
 
7211
      case PE:
7212
        return getPe();
7213
 
7214
      }
7215
      throw new IllegalStateException();
7216
    }
7217
 
7218
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7219
    public boolean isSet(_Fields field) {
7220
      if (field == null) {
7221
        throw new IllegalArgumentException();
7222
      }
7223
 
7224
      switch (field) {
7225
      case SUCCESS:
7226
        return isSetSuccess();
7227
      case PE:
7228
        return isSetPe();
7229
      }
7230
      throw new IllegalStateException();
7231
    }
7232
 
7233
    @Override
7234
    public boolean equals(Object that) {
7235
      if (that == null)
7236
        return false;
7237
      if (that instanceof getActivePaymentGateways_result)
7238
        return this.equals((getActivePaymentGateways_result)that);
7239
      return false;
7240
    }
7241
 
7242
    public boolean equals(getActivePaymentGateways_result that) {
7243
      if (that == null)
7244
        return false;
7245
 
7246
      boolean this_present_success = true && this.isSetSuccess();
7247
      boolean that_present_success = true && that.isSetSuccess();
7248
      if (this_present_success || that_present_success) {
7249
        if (!(this_present_success && that_present_success))
7250
          return false;
7251
        if (!this.success.equals(that.success))
7252
          return false;
7253
      }
7254
 
7255
      boolean this_present_pe = true && this.isSetPe();
7256
      boolean that_present_pe = true && that.isSetPe();
7257
      if (this_present_pe || that_present_pe) {
7258
        if (!(this_present_pe && that_present_pe))
7259
          return false;
7260
        if (!this.pe.equals(that.pe))
7261
          return false;
7262
      }
7263
 
7264
      return true;
7265
    }
7266
 
7267
    @Override
7268
    public int hashCode() {
7269
      return 0;
7270
    }
7271
 
7272
    public int compareTo(getActivePaymentGateways_result other) {
7273
      if (!getClass().equals(other.getClass())) {
7274
        return getClass().getName().compareTo(other.getClass().getName());
7275
      }
7276
 
7277
      int lastComparison = 0;
7278
      getActivePaymentGateways_result typedOther = (getActivePaymentGateways_result)other;
7279
 
7280
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
7281
      if (lastComparison != 0) {
7282
        return lastComparison;
7283
      }
7284
      if (isSetSuccess()) {
7285
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7286
        if (lastComparison != 0) {
7287
          return lastComparison;
7288
        }
7289
      }
7290
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
7291
      if (lastComparison != 0) {
7292
        return lastComparison;
7293
      }
7294
      if (isSetPe()) {
7295
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
7296
        if (lastComparison != 0) {
7297
          return lastComparison;
7298
        }
7299
      }
7300
      return 0;
7301
    }
7302
 
7303
    public _Fields fieldForId(int fieldId) {
7304
      return _Fields.findByThriftId(fieldId);
7305
    }
7306
 
7307
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7308
      org.apache.thrift.protocol.TField field;
7309
      iprot.readStructBegin();
7310
      while (true)
7311
      {
7312
        field = iprot.readFieldBegin();
7313
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
7314
          break;
7315
        }
7316
        switch (field.id) {
7317
          case 0: // SUCCESS
7318
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
7319
              {
7320
                org.apache.thrift.protocol.TList _list24 = iprot.readListBegin();
7321
                this.success = new ArrayList<PaymentGateway>(_list24.size);
7322
                for (int _i25 = 0; _i25 < _list24.size; ++_i25)
7323
                {
7324
                  PaymentGateway _elem26; // required
7325
                  _elem26 = new PaymentGateway();
7326
                  _elem26.read(iprot);
7327
                  this.success.add(_elem26);
7328
                }
7329
                iprot.readListEnd();
7330
              }
7331
            } else { 
7332
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7333
            }
7334
            break;
7335
          case 1: // PE
7336
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
7337
              this.pe = new PaymentException();
7338
              this.pe.read(iprot);
7339
            } else { 
7340
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7341
            }
7342
            break;
7343
          default:
7344
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7345
        }
7346
        iprot.readFieldEnd();
7347
      }
7348
      iprot.readStructEnd();
7349
      validate();
7350
    }
7351
 
7352
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
7353
      oprot.writeStructBegin(STRUCT_DESC);
7354
 
7355
      if (this.isSetSuccess()) {
7356
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7357
        {
7358
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
7359
          for (PaymentGateway _iter27 : this.success)
7360
          {
7361
            _iter27.write(oprot);
7362
          }
7363
          oprot.writeListEnd();
7364
        }
7365
        oprot.writeFieldEnd();
7366
      } else if (this.isSetPe()) {
7367
        oprot.writeFieldBegin(PE_FIELD_DESC);
7368
        this.pe.write(oprot);
7369
        oprot.writeFieldEnd();
7370
      }
7371
      oprot.writeFieldStop();
7372
      oprot.writeStructEnd();
7373
    }
7374
 
7375
    @Override
7376
    public String toString() {
7377
      StringBuilder sb = new StringBuilder("getActivePaymentGateways_result(");
7378
      boolean first = true;
7379
 
7380
      sb.append("success:");
7381
      if (this.success == null) {
7382
        sb.append("null");
7383
      } else {
7384
        sb.append(this.success);
7385
      }
7386
      first = false;
7387
      if (!first) sb.append(", ");
7388
      sb.append("pe:");
7389
      if (this.pe == null) {
7390
        sb.append("null");
7391
      } else {
7392
        sb.append(this.pe);
7393
      }
7394
      first = false;
7395
      sb.append(")");
7396
      return sb.toString();
7397
    }
7398
 
7399
    public void validate() throws org.apache.thrift.TException {
7400
      // check for required fields
7401
    }
7402
 
7403
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7404
      try {
7405
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7406
      } catch (org.apache.thrift.TException te) {
7407
        throw new java.io.IOException(te);
7408
      }
7409
    }
7410
 
7411
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7412
      try {
7413
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7414
      } catch (org.apache.thrift.TException te) {
7415
        throw new java.io.IOException(te);
7416
      }
7417
    }
7418
 
7419
  }
7420
 
3430 rajveer 7421
  public static class getPayment_args implements org.apache.thrift.TBase<getPayment_args, getPayment_args._Fields>, java.io.Serializable, Cloneable   {
7422
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPayment_args");
420 ashish 7423
 
3430 rajveer 7424
    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 7425
 
3430 rajveer 7426
    private long id; // required
420 ashish 7427
 
7428
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 7429
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 7430
      ID((short)1, "id");
7431
 
7432
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7433
 
7434
      static {
7435
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7436
          byName.put(field.getFieldName(), field);
7437
        }
7438
      }
7439
 
7440
      /**
7441
       * Find the _Fields constant that matches fieldId, or null if its not found.
7442
       */
7443
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 7444
        switch(fieldId) {
7445
          case 1: // ID
7446
            return ID;
7447
          default:
7448
            return null;
7449
        }
420 ashish 7450
      }
7451
 
7452
      /**
7453
       * Find the _Fields constant that matches fieldId, throwing an exception
7454
       * if it is not found.
7455
       */
7456
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7457
        _Fields fields = findByThriftId(fieldId);
7458
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7459
        return fields;
7460
      }
7461
 
7462
      /**
7463
       * Find the _Fields constant that matches name, or null if its not found.
7464
       */
7465
      public static _Fields findByName(String name) {
7466
        return byName.get(name);
7467
      }
7468
 
7469
      private final short _thriftId;
7470
      private final String _fieldName;
7471
 
7472
      _Fields(short thriftId, String fieldName) {
7473
        _thriftId = thriftId;
7474
        _fieldName = fieldName;
7475
      }
7476
 
7477
      public short getThriftFieldId() {
7478
        return _thriftId;
7479
      }
7480
 
7481
      public String getFieldName() {
7482
        return _fieldName;
7483
      }
7484
    }
7485
 
7486
    // isset id assignments
7487
    private static final int __ID_ISSET_ID = 0;
7488
    private BitSet __isset_bit_vector = new BitSet(1);
7489
 
3430 rajveer 7490
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 7491
    static {
3430 rajveer 7492
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7493
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7494
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
7495
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7496
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPayment_args.class, metaDataMap);
420 ashish 7497
    }
7498
 
695 rajveer 7499
    public getPayment_args() {
420 ashish 7500
    }
7501
 
695 rajveer 7502
    public getPayment_args(
420 ashish 7503
      long id)
7504
    {
7505
      this();
7506
      this.id = id;
7507
      setIdIsSet(true);
7508
    }
7509
 
7510
    /**
7511
     * Performs a deep copy on <i>other</i>.
7512
     */
695 rajveer 7513
    public getPayment_args(getPayment_args other) {
420 ashish 7514
      __isset_bit_vector.clear();
7515
      __isset_bit_vector.or(other.__isset_bit_vector);
7516
      this.id = other.id;
7517
    }
7518
 
695 rajveer 7519
    public getPayment_args deepCopy() {
7520
      return new getPayment_args(this);
420 ashish 7521
    }
7522
 
3430 rajveer 7523
    @Override
7524
    public void clear() {
7525
      setIdIsSet(false);
7526
      this.id = 0;
420 ashish 7527
    }
7528
 
7529
    public long getId() {
7530
      return this.id;
7531
    }
7532
 
3430 rajveer 7533
    public void setId(long id) {
420 ashish 7534
      this.id = id;
7535
      setIdIsSet(true);
7536
    }
7537
 
7538
    public void unsetId() {
7539
      __isset_bit_vector.clear(__ID_ISSET_ID);
7540
    }
7541
 
3430 rajveer 7542
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
420 ashish 7543
    public boolean isSetId() {
7544
      return __isset_bit_vector.get(__ID_ISSET_ID);
7545
    }
7546
 
7547
    public void setIdIsSet(boolean value) {
7548
      __isset_bit_vector.set(__ID_ISSET_ID, value);
7549
    }
7550
 
7551
    public void setFieldValue(_Fields field, Object value) {
7552
      switch (field) {
7553
      case ID:
7554
        if (value == null) {
7555
          unsetId();
7556
        } else {
7557
          setId((Long)value);
7558
        }
7559
        break;
7560
 
7561
      }
7562
    }
7563
 
7564
    public Object getFieldValue(_Fields field) {
7565
      switch (field) {
7566
      case ID:
3430 rajveer 7567
        return Long.valueOf(getId());
420 ashish 7568
 
7569
      }
7570
      throw new IllegalStateException();
7571
    }
7572
 
3430 rajveer 7573
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7574
    public boolean isSet(_Fields field) {
7575
      if (field == null) {
7576
        throw new IllegalArgumentException();
7577
      }
420 ashish 7578
 
7579
      switch (field) {
7580
      case ID:
7581
        return isSetId();
7582
      }
7583
      throw new IllegalStateException();
7584
    }
7585
 
7586
    @Override
7587
    public boolean equals(Object that) {
7588
      if (that == null)
7589
        return false;
695 rajveer 7590
      if (that instanceof getPayment_args)
7591
        return this.equals((getPayment_args)that);
420 ashish 7592
      return false;
7593
    }
7594
 
695 rajveer 7595
    public boolean equals(getPayment_args that) {
420 ashish 7596
      if (that == null)
7597
        return false;
7598
 
7599
      boolean this_present_id = true;
7600
      boolean that_present_id = true;
7601
      if (this_present_id || that_present_id) {
7602
        if (!(this_present_id && that_present_id))
7603
          return false;
7604
        if (this.id != that.id)
7605
          return false;
7606
      }
7607
 
7608
      return true;
7609
    }
7610
 
7611
    @Override
7612
    public int hashCode() {
7613
      return 0;
7614
    }
7615
 
695 rajveer 7616
    public int compareTo(getPayment_args other) {
420 ashish 7617
      if (!getClass().equals(other.getClass())) {
7618
        return getClass().getName().compareTo(other.getClass().getName());
7619
      }
7620
 
7621
      int lastComparison = 0;
695 rajveer 7622
      getPayment_args typedOther = (getPayment_args)other;
420 ashish 7623
 
3430 rajveer 7624
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
420 ashish 7625
      if (lastComparison != 0) {
7626
        return lastComparison;
7627
      }
3430 rajveer 7628
      if (isSetId()) {
7629
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
7630
        if (lastComparison != 0) {
7631
          return lastComparison;
7632
        }
420 ashish 7633
      }
7634
      return 0;
7635
    }
7636
 
3430 rajveer 7637
    public _Fields fieldForId(int fieldId) {
7638
      return _Fields.findByThriftId(fieldId);
7639
    }
7640
 
7641
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
7642
      org.apache.thrift.protocol.TField field;
420 ashish 7643
      iprot.readStructBegin();
7644
      while (true)
7645
      {
7646
        field = iprot.readFieldBegin();
3430 rajveer 7647
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 7648
          break;
7649
        }
3430 rajveer 7650
        switch (field.id) {
7651
          case 1: // ID
7652
            if (field.type == org.apache.thrift.protocol.TType.I64) {
7653
              this.id = iprot.readI64();
7654
              setIdIsSet(true);
7655
            } else { 
7656
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
7657
            }
7658
            break;
7659
          default:
7660
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 7661
        }
3430 rajveer 7662
        iprot.readFieldEnd();
420 ashish 7663
      }
7664
      iprot.readStructEnd();
7665
      validate();
7666
    }
7667
 
3430 rajveer 7668
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 7669
      validate();
7670
 
7671
      oprot.writeStructBegin(STRUCT_DESC);
7672
      oprot.writeFieldBegin(ID_FIELD_DESC);
7673
      oprot.writeI64(this.id);
7674
      oprot.writeFieldEnd();
7675
      oprot.writeFieldStop();
7676
      oprot.writeStructEnd();
7677
    }
7678
 
7679
    @Override
7680
    public String toString() {
695 rajveer 7681
      StringBuilder sb = new StringBuilder("getPayment_args(");
420 ashish 7682
      boolean first = true;
7683
 
7684
      sb.append("id:");
7685
      sb.append(this.id);
7686
      first = false;
7687
      sb.append(")");
7688
      return sb.toString();
7689
    }
7690
 
3430 rajveer 7691
    public void validate() throws org.apache.thrift.TException {
420 ashish 7692
      // check for required fields
7693
    }
7694
 
3430 rajveer 7695
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
7696
      try {
7697
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
7698
      } catch (org.apache.thrift.TException te) {
7699
        throw new java.io.IOException(te);
7700
      }
7701
    }
7702
 
7703
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
7704
      try {
7705
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
7706
        __isset_bit_vector = new BitSet(1);
7707
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
7708
      } catch (org.apache.thrift.TException te) {
7709
        throw new java.io.IOException(te);
7710
      }
7711
    }
7712
 
420 ashish 7713
  }
7714
 
3430 rajveer 7715
  public static class getPayment_result implements org.apache.thrift.TBase<getPayment_result, getPayment_result._Fields>, java.io.Serializable, Cloneable   {
7716
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPayment_result");
420 ashish 7717
 
3430 rajveer 7718
    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);
7719
    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 7720
 
3430 rajveer 7721
    private Payment success; // required
7722
    private PaymentException pe; // required
420 ashish 7723
 
7724
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 7725
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 7726
      SUCCESS((short)0, "success"),
7727
      PE((short)1, "pe");
7728
 
7729
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7730
 
7731
      static {
7732
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7733
          byName.put(field.getFieldName(), field);
7734
        }
7735
      }
7736
 
7737
      /**
7738
       * Find the _Fields constant that matches fieldId, or null if its not found.
7739
       */
7740
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 7741
        switch(fieldId) {
7742
          case 0: // SUCCESS
7743
            return SUCCESS;
7744
          case 1: // PE
7745
            return PE;
7746
          default:
7747
            return null;
7748
        }
420 ashish 7749
      }
7750
 
7751
      /**
7752
       * Find the _Fields constant that matches fieldId, throwing an exception
7753
       * if it is not found.
7754
       */
7755
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7756
        _Fields fields = findByThriftId(fieldId);
7757
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7758
        return fields;
7759
      }
7760
 
7761
      /**
7762
       * Find the _Fields constant that matches name, or null if its not found.
7763
       */
7764
      public static _Fields findByName(String name) {
7765
        return byName.get(name);
7766
      }
7767
 
7768
      private final short _thriftId;
7769
      private final String _fieldName;
7770
 
7771
      _Fields(short thriftId, String fieldName) {
7772
        _thriftId = thriftId;
7773
        _fieldName = fieldName;
7774
      }
7775
 
7776
      public short getThriftFieldId() {
7777
        return _thriftId;
7778
      }
7779
 
7780
      public String getFieldName() {
7781
        return _fieldName;
7782
      }
7783
    }
7784
 
7785
    // isset id assignments
7786
 
3430 rajveer 7787
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 7788
    static {
3430 rajveer 7789
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
7790
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7791
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class)));
7792
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
7793
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
7794
      metaDataMap = Collections.unmodifiableMap(tmpMap);
7795
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPayment_result.class, metaDataMap);
420 ashish 7796
    }
7797
 
695 rajveer 7798
    public getPayment_result() {
420 ashish 7799
    }
7800
 
695 rajveer 7801
    public getPayment_result(
7802
      Payment success,
420 ashish 7803
      PaymentException pe)
7804
    {
7805
      this();
7806
      this.success = success;
7807
      this.pe = pe;
7808
    }
7809
 
7810
    /**
7811
     * Performs a deep copy on <i>other</i>.
7812
     */
695 rajveer 7813
    public getPayment_result(getPayment_result other) {
420 ashish 7814
      if (other.isSetSuccess()) {
695 rajveer 7815
        this.success = new Payment(other.success);
420 ashish 7816
      }
7817
      if (other.isSetPe()) {
7818
        this.pe = new PaymentException(other.pe);
7819
      }
7820
    }
7821
 
695 rajveer 7822
    public getPayment_result deepCopy() {
7823
      return new getPayment_result(this);
420 ashish 7824
    }
7825
 
3430 rajveer 7826
    @Override
7827
    public void clear() {
7828
      this.success = null;
7829
      this.pe = null;
420 ashish 7830
    }
7831
 
695 rajveer 7832
    public Payment getSuccess() {
420 ashish 7833
      return this.success;
7834
    }
7835
 
3430 rajveer 7836
    public void setSuccess(Payment success) {
420 ashish 7837
      this.success = success;
7838
    }
7839
 
7840
    public void unsetSuccess() {
7841
      this.success = null;
7842
    }
7843
 
3430 rajveer 7844
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
420 ashish 7845
    public boolean isSetSuccess() {
7846
      return this.success != null;
7847
    }
7848
 
7849
    public void setSuccessIsSet(boolean value) {
7850
      if (!value) {
7851
        this.success = null;
7852
      }
7853
    }
7854
 
7855
    public PaymentException getPe() {
7856
      return this.pe;
7857
    }
7858
 
3430 rajveer 7859
    public void setPe(PaymentException pe) {
420 ashish 7860
      this.pe = pe;
7861
    }
7862
 
7863
    public void unsetPe() {
7864
      this.pe = null;
7865
    }
7866
 
3430 rajveer 7867
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
420 ashish 7868
    public boolean isSetPe() {
7869
      return this.pe != null;
7870
    }
7871
 
7872
    public void setPeIsSet(boolean value) {
7873
      if (!value) {
7874
        this.pe = null;
7875
      }
7876
    }
7877
 
7878
    public void setFieldValue(_Fields field, Object value) {
7879
      switch (field) {
7880
      case SUCCESS:
7881
        if (value == null) {
7882
          unsetSuccess();
7883
        } else {
695 rajveer 7884
          setSuccess((Payment)value);
420 ashish 7885
        }
7886
        break;
7887
 
7888
      case PE:
7889
        if (value == null) {
7890
          unsetPe();
7891
        } else {
7892
          setPe((PaymentException)value);
7893
        }
7894
        break;
7895
 
7896
      }
7897
    }
7898
 
7899
    public Object getFieldValue(_Fields field) {
7900
      switch (field) {
7901
      case SUCCESS:
7902
        return getSuccess();
7903
 
7904
      case PE:
7905
        return getPe();
7906
 
7907
      }
7908
      throw new IllegalStateException();
7909
    }
7910
 
3430 rajveer 7911
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
7912
    public boolean isSet(_Fields field) {
7913
      if (field == null) {
7914
        throw new IllegalArgumentException();
7915
      }
420 ashish 7916
 
7917
      switch (field) {
7918
      case SUCCESS:
7919
        return isSetSuccess();
7920
      case PE:
7921
        return isSetPe();
7922
      }
7923
      throw new IllegalStateException();
7924
    }
7925
 
7926
    @Override
7927
    public boolean equals(Object that) {
7928
      if (that == null)
7929
        return false;
695 rajveer 7930
      if (that instanceof getPayment_result)
7931
        return this.equals((getPayment_result)that);
420 ashish 7932
      return false;
7933
    }
7934
 
695 rajveer 7935
    public boolean equals(getPayment_result that) {
420 ashish 7936
      if (that == null)
7937
        return false;
7938
 
7939
      boolean this_present_success = true && this.isSetSuccess();
7940
      boolean that_present_success = true && that.isSetSuccess();
7941
      if (this_present_success || that_present_success) {
7942
        if (!(this_present_success && that_present_success))
7943
          return false;
7944
        if (!this.success.equals(that.success))
7945
          return false;
7946
      }
7947
 
7948
      boolean this_present_pe = true && this.isSetPe();
7949
      boolean that_present_pe = true && that.isSetPe();
7950
      if (this_present_pe || that_present_pe) {
7951
        if (!(this_present_pe && that_present_pe))
7952
          return false;
7953
        if (!this.pe.equals(that.pe))
7954
          return false;
7955
      }
7956
 
7957
      return true;
7958
    }
7959
 
7960
    @Override
7961
    public int hashCode() {
7962
      return 0;
7963
    }
7964
 
695 rajveer 7965
    public int compareTo(getPayment_result other) {
420 ashish 7966
      if (!getClass().equals(other.getClass())) {
7967
        return getClass().getName().compareTo(other.getClass().getName());
7968
      }
7969
 
7970
      int lastComparison = 0;
695 rajveer 7971
      getPayment_result typedOther = (getPayment_result)other;
420 ashish 7972
 
3430 rajveer 7973
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
420 ashish 7974
      if (lastComparison != 0) {
7975
        return lastComparison;
7976
      }
3430 rajveer 7977
      if (isSetSuccess()) {
7978
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
7979
        if (lastComparison != 0) {
7980
          return lastComparison;
7981
        }
420 ashish 7982
      }
3430 rajveer 7983
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
420 ashish 7984
      if (lastComparison != 0) {
7985
        return lastComparison;
7986
      }
3430 rajveer 7987
      if (isSetPe()) {
7988
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
7989
        if (lastComparison != 0) {
7990
          return lastComparison;
7991
        }
420 ashish 7992
      }
7993
      return 0;
7994
    }
7995
 
3430 rajveer 7996
    public _Fields fieldForId(int fieldId) {
7997
      return _Fields.findByThriftId(fieldId);
7998
    }
7999
 
8000
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8001
      org.apache.thrift.protocol.TField field;
420 ashish 8002
      iprot.readStructBegin();
8003
      while (true)
8004
      {
8005
        field = iprot.readFieldBegin();
3430 rajveer 8006
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 8007
          break;
8008
        }
3430 rajveer 8009
        switch (field.id) {
8010
          case 0: // SUCCESS
8011
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8012
              this.success = new Payment();
8013
              this.success.read(iprot);
8014
            } else { 
8015
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8016
            }
8017
            break;
8018
          case 1: // PE
8019
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8020
              this.pe = new PaymentException();
8021
              this.pe.read(iprot);
8022
            } else { 
8023
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8024
            }
8025
            break;
8026
          default:
8027
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 8028
        }
3430 rajveer 8029
        iprot.readFieldEnd();
420 ashish 8030
      }
8031
      iprot.readStructEnd();
8032
      validate();
8033
    }
8034
 
3430 rajveer 8035
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 8036
      oprot.writeStructBegin(STRUCT_DESC);
8037
 
695 rajveer 8038
      if (this.isSetSuccess()) {
8039
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8040
        this.success.write(oprot);
8041
        oprot.writeFieldEnd();
8042
      } else if (this.isSetPe()) {
420 ashish 8043
        oprot.writeFieldBegin(PE_FIELD_DESC);
8044
        this.pe.write(oprot);
8045
        oprot.writeFieldEnd();
8046
      }
8047
      oprot.writeFieldStop();
8048
      oprot.writeStructEnd();
8049
    }
8050
 
8051
    @Override
8052
    public String toString() {
695 rajveer 8053
      StringBuilder sb = new StringBuilder("getPayment_result(");
420 ashish 8054
      boolean first = true;
8055
 
695 rajveer 8056
      sb.append("success:");
8057
      if (this.success == null) {
8058
        sb.append("null");
8059
      } else {
8060
        sb.append(this.success);
8061
      }
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 getPaymentForTxnId_args implements org.apache.thrift.TBase<getPaymentForTxnId_args, getPaymentForTxnId_args._Fields>, java.io.Serializable, Cloneable   {
8098
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentForTxnId_args");
420 ashish 8099
 
3430 rajveer 8100
    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 8101
 
3430 rajveer 8102
    private long txnId; // required
420 ashish 8103
 
8104
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 8105
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 8106
      TXN_ID((short)1, "txnId");
420 ashish 8107
 
8108
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8109
 
8110
      static {
8111
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8112
          byName.put(field.getFieldName(), field);
8113
        }
8114
      }
8115
 
8116
      /**
8117
       * Find the _Fields constant that matches fieldId, or null if its not found.
8118
       */
8119
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 8120
        switch(fieldId) {
8121
          case 1: // TXN_ID
8122
            return TXN_ID;
8123
          default:
8124
            return null;
8125
        }
420 ashish 8126
      }
8127
 
8128
      /**
8129
       * Find the _Fields constant that matches fieldId, throwing an exception
8130
       * if it is not found.
8131
       */
8132
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8133
        _Fields fields = findByThriftId(fieldId);
8134
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8135
        return fields;
8136
      }
8137
 
8138
      /**
8139
       * Find the _Fields constant that matches name, or null if its not found.
8140
       */
8141
      public static _Fields findByName(String name) {
8142
        return byName.get(name);
8143
      }
8144
 
8145
      private final short _thriftId;
8146
      private final String _fieldName;
8147
 
8148
      _Fields(short thriftId, String fieldName) {
8149
        _thriftId = thriftId;
8150
        _fieldName = fieldName;
8151
      }
8152
 
8153
      public short getThriftFieldId() {
8154
        return _thriftId;
8155
      }
8156
 
8157
      public String getFieldName() {
8158
        return _fieldName;
8159
      }
8160
    }
8161
 
8162
    // isset id assignments
695 rajveer 8163
    private static final int __TXNID_ISSET_ID = 0;
420 ashish 8164
    private BitSet __isset_bit_vector = new BitSet(1);
8165
 
3430 rajveer 8166
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 8167
    static {
3430 rajveer 8168
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8169
      tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8170
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8171
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8172
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentForTxnId_args.class, metaDataMap);
420 ashish 8173
    }
8174
 
695 rajveer 8175
    public getPaymentForTxnId_args() {
420 ashish 8176
    }
8177
 
695 rajveer 8178
    public getPaymentForTxnId_args(
8179
      long txnId)
420 ashish 8180
    {
8181
      this();
695 rajveer 8182
      this.txnId = txnId;
8183
      setTxnIdIsSet(true);
420 ashish 8184
    }
8185
 
8186
    /**
8187
     * Performs a deep copy on <i>other</i>.
8188
     */
695 rajveer 8189
    public getPaymentForTxnId_args(getPaymentForTxnId_args other) {
420 ashish 8190
      __isset_bit_vector.clear();
8191
      __isset_bit_vector.or(other.__isset_bit_vector);
695 rajveer 8192
      this.txnId = other.txnId;
420 ashish 8193
    }
8194
 
695 rajveer 8195
    public getPaymentForTxnId_args deepCopy() {
8196
      return new getPaymentForTxnId_args(this);
420 ashish 8197
    }
8198
 
3430 rajveer 8199
    @Override
8200
    public void clear() {
8201
      setTxnIdIsSet(false);
8202
      this.txnId = 0;
420 ashish 8203
    }
8204
 
695 rajveer 8205
    public long getTxnId() {
8206
      return this.txnId;
420 ashish 8207
    }
8208
 
3430 rajveer 8209
    public void setTxnId(long txnId) {
695 rajveer 8210
      this.txnId = txnId;
8211
      setTxnIdIsSet(true);
420 ashish 8212
    }
8213
 
695 rajveer 8214
    public void unsetTxnId() {
8215
      __isset_bit_vector.clear(__TXNID_ISSET_ID);
420 ashish 8216
    }
8217
 
3430 rajveer 8218
    /** Returns true if field txnId is set (has been assigned a value) and false otherwise */
695 rajveer 8219
    public boolean isSetTxnId() {
8220
      return __isset_bit_vector.get(__TXNID_ISSET_ID);
420 ashish 8221
    }
8222
 
695 rajveer 8223
    public void setTxnIdIsSet(boolean value) {
8224
      __isset_bit_vector.set(__TXNID_ISSET_ID, value);
420 ashish 8225
    }
8226
 
8227
    public void setFieldValue(_Fields field, Object value) {
8228
      switch (field) {
695 rajveer 8229
      case TXN_ID:
420 ashish 8230
        if (value == null) {
695 rajveer 8231
          unsetTxnId();
420 ashish 8232
        } else {
695 rajveer 8233
          setTxnId((Long)value);
420 ashish 8234
        }
8235
        break;
8236
 
8237
      }
8238
    }
8239
 
8240
    public Object getFieldValue(_Fields field) {
8241
      switch (field) {
695 rajveer 8242
      case TXN_ID:
3430 rajveer 8243
        return Long.valueOf(getTxnId());
420 ashish 8244
 
8245
      }
8246
      throw new IllegalStateException();
8247
    }
8248
 
3430 rajveer 8249
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8250
    public boolean isSet(_Fields field) {
8251
      if (field == null) {
8252
        throw new IllegalArgumentException();
8253
      }
420 ashish 8254
 
8255
      switch (field) {
695 rajveer 8256
      case TXN_ID:
8257
        return isSetTxnId();
420 ashish 8258
      }
8259
      throw new IllegalStateException();
8260
    }
8261
 
8262
    @Override
8263
    public boolean equals(Object that) {
8264
      if (that == null)
8265
        return false;
695 rajveer 8266
      if (that instanceof getPaymentForTxnId_args)
8267
        return this.equals((getPaymentForTxnId_args)that);
420 ashish 8268
      return false;
8269
    }
8270
 
695 rajveer 8271
    public boolean equals(getPaymentForTxnId_args that) {
420 ashish 8272
      if (that == null)
8273
        return false;
8274
 
695 rajveer 8275
      boolean this_present_txnId = true;
8276
      boolean that_present_txnId = true;
8277
      if (this_present_txnId || that_present_txnId) {
8278
        if (!(this_present_txnId && that_present_txnId))
420 ashish 8279
          return false;
695 rajveer 8280
        if (this.txnId != that.txnId)
420 ashish 8281
          return false;
8282
      }
8283
 
8284
      return true;
8285
    }
8286
 
8287
    @Override
8288
    public int hashCode() {
8289
      return 0;
8290
    }
8291
 
695 rajveer 8292
    public int compareTo(getPaymentForTxnId_args other) {
420 ashish 8293
      if (!getClass().equals(other.getClass())) {
8294
        return getClass().getName().compareTo(other.getClass().getName());
8295
      }
8296
 
8297
      int lastComparison = 0;
695 rajveer 8298
      getPaymentForTxnId_args typedOther = (getPaymentForTxnId_args)other;
420 ashish 8299
 
3430 rajveer 8300
      lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(typedOther.isSetTxnId());
420 ashish 8301
      if (lastComparison != 0) {
8302
        return lastComparison;
8303
      }
3430 rajveer 8304
      if (isSetTxnId()) {
8305
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, typedOther.txnId);
8306
        if (lastComparison != 0) {
8307
          return lastComparison;
8308
        }
420 ashish 8309
      }
8310
      return 0;
8311
    }
8312
 
3430 rajveer 8313
    public _Fields fieldForId(int fieldId) {
8314
      return _Fields.findByThriftId(fieldId);
8315
    }
8316
 
8317
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8318
      org.apache.thrift.protocol.TField field;
420 ashish 8319
      iprot.readStructBegin();
8320
      while (true)
8321
      {
8322
        field = iprot.readFieldBegin();
3430 rajveer 8323
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 8324
          break;
8325
        }
3430 rajveer 8326
        switch (field.id) {
8327
          case 1: // TXN_ID
8328
            if (field.type == org.apache.thrift.protocol.TType.I64) {
8329
              this.txnId = iprot.readI64();
8330
              setTxnIdIsSet(true);
8331
            } else { 
8332
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8333
            }
8334
            break;
8335
          default:
8336
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 8337
        }
3430 rajveer 8338
        iprot.readFieldEnd();
420 ashish 8339
      }
8340
      iprot.readStructEnd();
8341
      validate();
8342
    }
8343
 
3430 rajveer 8344
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 8345
      validate();
8346
 
8347
      oprot.writeStructBegin(STRUCT_DESC);
695 rajveer 8348
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
8349
      oprot.writeI64(this.txnId);
420 ashish 8350
      oprot.writeFieldEnd();
8351
      oprot.writeFieldStop();
8352
      oprot.writeStructEnd();
8353
    }
8354
 
8355
    @Override
8356
    public String toString() {
695 rajveer 8357
      StringBuilder sb = new StringBuilder("getPaymentForTxnId_args(");
420 ashish 8358
      boolean first = true;
8359
 
695 rajveer 8360
      sb.append("txnId:");
8361
      sb.append(this.txnId);
420 ashish 8362
      first = false;
8363
      sb.append(")");
8364
      return sb.toString();
8365
    }
8366
 
3430 rajveer 8367
    public void validate() throws org.apache.thrift.TException {
420 ashish 8368
      // check for required fields
8369
    }
8370
 
3430 rajveer 8371
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8372
      try {
8373
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8374
      } catch (org.apache.thrift.TException te) {
8375
        throw new java.io.IOException(te);
8376
      }
8377
    }
8378
 
8379
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8380
      try {
8381
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
8382
        __isset_bit_vector = new BitSet(1);
8383
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8384
      } catch (org.apache.thrift.TException te) {
8385
        throw new java.io.IOException(te);
8386
      }
8387
    }
8388
 
420 ashish 8389
  }
8390
 
3430 rajveer 8391
  public static class getPaymentForTxnId_result implements org.apache.thrift.TBase<getPaymentForTxnId_result, getPaymentForTxnId_result._Fields>, java.io.Serializable, Cloneable   {
8392
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentForTxnId_result");
420 ashish 8393
 
3430 rajveer 8394
    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);
8395
    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 8396
 
3430 rajveer 8397
    private List<Payment> success; // required
8398
    private PaymentException pe; // required
420 ashish 8399
 
8400
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 8401
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 8402
      SUCCESS((short)0, "success"),
8403
      PE((short)1, "pe");
8404
 
8405
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8406
 
8407
      static {
8408
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8409
          byName.put(field.getFieldName(), field);
8410
        }
8411
      }
8412
 
8413
      /**
8414
       * Find the _Fields constant that matches fieldId, or null if its not found.
8415
       */
8416
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 8417
        switch(fieldId) {
8418
          case 0: // SUCCESS
8419
            return SUCCESS;
8420
          case 1: // PE
8421
            return PE;
8422
          default:
8423
            return null;
8424
        }
420 ashish 8425
      }
8426
 
8427
      /**
8428
       * Find the _Fields constant that matches fieldId, throwing an exception
8429
       * if it is not found.
8430
       */
8431
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8432
        _Fields fields = findByThriftId(fieldId);
8433
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8434
        return fields;
8435
      }
8436
 
8437
      /**
8438
       * Find the _Fields constant that matches name, or null if its not found.
8439
       */
8440
      public static _Fields findByName(String name) {
8441
        return byName.get(name);
8442
      }
8443
 
8444
      private final short _thriftId;
8445
      private final String _fieldName;
8446
 
8447
      _Fields(short thriftId, String fieldName) {
8448
        _thriftId = thriftId;
8449
        _fieldName = fieldName;
8450
      }
8451
 
8452
      public short getThriftFieldId() {
8453
        return _thriftId;
8454
      }
8455
 
8456
      public String getFieldName() {
8457
        return _fieldName;
8458
      }
8459
    }
8460
 
8461
    // isset id assignments
8462
 
3430 rajveer 8463
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 8464
    static {
3430 rajveer 8465
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8466
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8467
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
8468
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
8469
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8470
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
8471
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8472
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentForTxnId_result.class, metaDataMap);
420 ashish 8473
    }
8474
 
695 rajveer 8475
    public getPaymentForTxnId_result() {
420 ashish 8476
    }
8477
 
695 rajveer 8478
    public getPaymentForTxnId_result(
8479
      List<Payment> success,
420 ashish 8480
      PaymentException pe)
8481
    {
8482
      this();
8483
      this.success = success;
8484
      this.pe = pe;
8485
    }
8486
 
8487
    /**
8488
     * Performs a deep copy on <i>other</i>.
8489
     */
695 rajveer 8490
    public getPaymentForTxnId_result(getPaymentForTxnId_result other) {
420 ashish 8491
      if (other.isSetSuccess()) {
695 rajveer 8492
        List<Payment> __this__success = new ArrayList<Payment>();
8493
        for (Payment other_element : other.success) {
8494
          __this__success.add(new Payment(other_element));
8495
        }
8496
        this.success = __this__success;
420 ashish 8497
      }
8498
      if (other.isSetPe()) {
8499
        this.pe = new PaymentException(other.pe);
8500
      }
8501
    }
8502
 
695 rajveer 8503
    public getPaymentForTxnId_result deepCopy() {
8504
      return new getPaymentForTxnId_result(this);
420 ashish 8505
    }
8506
 
3430 rajveer 8507
    @Override
8508
    public void clear() {
8509
      this.success = null;
8510
      this.pe = null;
420 ashish 8511
    }
8512
 
695 rajveer 8513
    public int getSuccessSize() {
8514
      return (this.success == null) ? 0 : this.success.size();
8515
    }
8516
 
8517
    public java.util.Iterator<Payment> getSuccessIterator() {
8518
      return (this.success == null) ? null : this.success.iterator();
8519
    }
8520
 
8521
    public void addToSuccess(Payment elem) {
8522
      if (this.success == null) {
8523
        this.success = new ArrayList<Payment>();
8524
      }
8525
      this.success.add(elem);
8526
    }
8527
 
8528
    public List<Payment> getSuccess() {
420 ashish 8529
      return this.success;
8530
    }
8531
 
3430 rajveer 8532
    public void setSuccess(List<Payment> success) {
420 ashish 8533
      this.success = success;
8534
    }
8535
 
8536
    public void unsetSuccess() {
8537
      this.success = null;
8538
    }
8539
 
3430 rajveer 8540
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
420 ashish 8541
    public boolean isSetSuccess() {
8542
      return this.success != null;
8543
    }
8544
 
8545
    public void setSuccessIsSet(boolean value) {
8546
      if (!value) {
8547
        this.success = null;
8548
      }
8549
    }
8550
 
8551
    public PaymentException getPe() {
8552
      return this.pe;
8553
    }
8554
 
3430 rajveer 8555
    public void setPe(PaymentException pe) {
420 ashish 8556
      this.pe = pe;
8557
    }
8558
 
8559
    public void unsetPe() {
8560
      this.pe = null;
8561
    }
8562
 
3430 rajveer 8563
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
420 ashish 8564
    public boolean isSetPe() {
8565
      return this.pe != null;
8566
    }
8567
 
8568
    public void setPeIsSet(boolean value) {
8569
      if (!value) {
8570
        this.pe = null;
8571
      }
8572
    }
8573
 
8574
    public void setFieldValue(_Fields field, Object value) {
8575
      switch (field) {
8576
      case SUCCESS:
8577
        if (value == null) {
8578
          unsetSuccess();
8579
        } else {
695 rajveer 8580
          setSuccess((List<Payment>)value);
420 ashish 8581
        }
8582
        break;
8583
 
8584
      case PE:
8585
        if (value == null) {
8586
          unsetPe();
8587
        } else {
8588
          setPe((PaymentException)value);
8589
        }
8590
        break;
8591
 
8592
      }
8593
    }
8594
 
8595
    public Object getFieldValue(_Fields field) {
8596
      switch (field) {
8597
      case SUCCESS:
8598
        return getSuccess();
8599
 
8600
      case PE:
8601
        return getPe();
8602
 
8603
      }
8604
      throw new IllegalStateException();
8605
    }
8606
 
3430 rajveer 8607
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8608
    public boolean isSet(_Fields field) {
8609
      if (field == null) {
8610
        throw new IllegalArgumentException();
8611
      }
420 ashish 8612
 
8613
      switch (field) {
8614
      case SUCCESS:
8615
        return isSetSuccess();
8616
      case PE:
8617
        return isSetPe();
8618
      }
8619
      throw new IllegalStateException();
8620
    }
8621
 
8622
    @Override
8623
    public boolean equals(Object that) {
8624
      if (that == null)
8625
        return false;
695 rajveer 8626
      if (that instanceof getPaymentForTxnId_result)
8627
        return this.equals((getPaymentForTxnId_result)that);
420 ashish 8628
      return false;
8629
    }
8630
 
695 rajveer 8631
    public boolean equals(getPaymentForTxnId_result that) {
420 ashish 8632
      if (that == null)
8633
        return false;
8634
 
8635
      boolean this_present_success = true && this.isSetSuccess();
8636
      boolean that_present_success = true && that.isSetSuccess();
8637
      if (this_present_success || that_present_success) {
8638
        if (!(this_present_success && that_present_success))
8639
          return false;
8640
        if (!this.success.equals(that.success))
8641
          return false;
8642
      }
8643
 
8644
      boolean this_present_pe = true && this.isSetPe();
8645
      boolean that_present_pe = true && that.isSetPe();
8646
      if (this_present_pe || that_present_pe) {
8647
        if (!(this_present_pe && that_present_pe))
8648
          return false;
8649
        if (!this.pe.equals(that.pe))
8650
          return false;
8651
      }
8652
 
8653
      return true;
8654
    }
8655
 
8656
    @Override
8657
    public int hashCode() {
8658
      return 0;
8659
    }
8660
 
695 rajveer 8661
    public int compareTo(getPaymentForTxnId_result other) {
8662
      if (!getClass().equals(other.getClass())) {
8663
        return getClass().getName().compareTo(other.getClass().getName());
8664
      }
8665
 
8666
      int lastComparison = 0;
8667
      getPaymentForTxnId_result typedOther = (getPaymentForTxnId_result)other;
8668
 
3430 rajveer 8669
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
695 rajveer 8670
      if (lastComparison != 0) {
8671
        return lastComparison;
8672
      }
3430 rajveer 8673
      if (isSetSuccess()) {
8674
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
8675
        if (lastComparison != 0) {
8676
          return lastComparison;
8677
        }
695 rajveer 8678
      }
3430 rajveer 8679
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
695 rajveer 8680
      if (lastComparison != 0) {
8681
        return lastComparison;
8682
      }
3430 rajveer 8683
      if (isSetPe()) {
8684
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
8685
        if (lastComparison != 0) {
8686
          return lastComparison;
8687
        }
695 rajveer 8688
      }
8689
      return 0;
8690
    }
8691
 
3430 rajveer 8692
    public _Fields fieldForId(int fieldId) {
8693
      return _Fields.findByThriftId(fieldId);
8694
    }
8695
 
8696
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
8697
      org.apache.thrift.protocol.TField field;
420 ashish 8698
      iprot.readStructBegin();
8699
      while (true)
8700
      {
8701
        field = iprot.readFieldBegin();
3430 rajveer 8702
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 8703
          break;
8704
        }
3430 rajveer 8705
        switch (field.id) {
8706
          case 0: // SUCCESS
8707
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
8708
              {
4600 varun.gupt 8709
                org.apache.thrift.protocol.TList _list28 = iprot.readListBegin();
8710
                this.success = new ArrayList<Payment>(_list28.size);
8711
                for (int _i29 = 0; _i29 < _list28.size; ++_i29)
695 rajveer 8712
                {
4600 varun.gupt 8713
                  Payment _elem30; // required
8714
                  _elem30 = new Payment();
8715
                  _elem30.read(iprot);
8716
                  this.success.add(_elem30);
695 rajveer 8717
                }
3430 rajveer 8718
                iprot.readListEnd();
420 ashish 8719
              }
3430 rajveer 8720
            } else { 
8721
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8722
            }
8723
            break;
8724
          case 1: // PE
8725
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
8726
              this.pe = new PaymentException();
8727
              this.pe.read(iprot);
8728
            } else { 
8729
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
8730
            }
8731
            break;
8732
          default:
8733
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 8734
        }
3430 rajveer 8735
        iprot.readFieldEnd();
420 ashish 8736
      }
8737
      iprot.readStructEnd();
8738
      validate();
8739
    }
8740
 
3430 rajveer 8741
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 8742
      oprot.writeStructBegin(STRUCT_DESC);
8743
 
8744
      if (this.isSetSuccess()) {
8745
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
695 rajveer 8746
        {
3430 rajveer 8747
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
4600 varun.gupt 8748
          for (Payment _iter31 : this.success)
695 rajveer 8749
          {
4600 varun.gupt 8750
            _iter31.write(oprot);
695 rajveer 8751
          }
8752
          oprot.writeListEnd();
8753
        }
420 ashish 8754
        oprot.writeFieldEnd();
8755
      } else if (this.isSetPe()) {
8756
        oprot.writeFieldBegin(PE_FIELD_DESC);
8757
        this.pe.write(oprot);
8758
        oprot.writeFieldEnd();
8759
      }
8760
      oprot.writeFieldStop();
8761
      oprot.writeStructEnd();
8762
    }
8763
 
8764
    @Override
8765
    public String toString() {
695 rajveer 8766
      StringBuilder sb = new StringBuilder("getPaymentForTxnId_result(");
420 ashish 8767
      boolean first = true;
8768
 
8769
      sb.append("success:");
8770
      if (this.success == null) {
8771
        sb.append("null");
8772
      } else {
8773
        sb.append(this.success);
8774
      }
8775
      first = false;
8776
      if (!first) sb.append(", ");
8777
      sb.append("pe:");
8778
      if (this.pe == null) {
8779
        sb.append("null");
8780
      } else {
8781
        sb.append(this.pe);
8782
      }
8783
      first = false;
8784
      sb.append(")");
8785
      return sb.toString();
8786
    }
8787
 
3430 rajveer 8788
    public void validate() throws org.apache.thrift.TException {
420 ashish 8789
      // check for required fields
8790
    }
8791
 
3430 rajveer 8792
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
8793
      try {
8794
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
8795
      } catch (org.apache.thrift.TException te) {
8796
        throw new java.io.IOException(te);
8797
      }
8798
    }
8799
 
8800
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
8801
      try {
8802
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
8803
      } catch (org.apache.thrift.TException te) {
8804
        throw new java.io.IOException(te);
8805
      }
8806
    }
8807
 
420 ashish 8808
  }
8809
 
7049 anupam.sin 8810
  public static class getPaymentForRechargeTxnId_args implements org.apache.thrift.TBase<getPaymentForRechargeTxnId_args, getPaymentForRechargeTxnId_args._Fields>, java.io.Serializable, Cloneable   {
8811
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentForRechargeTxnId_args");
8812
 
8813
    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);
8814
 
8815
    private long txnId; // required
8816
 
8817
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8818
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8819
      TXN_ID((short)1, "txnId");
8820
 
8821
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8822
 
8823
      static {
8824
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8825
          byName.put(field.getFieldName(), field);
8826
        }
8827
      }
8828
 
8829
      /**
8830
       * Find the _Fields constant that matches fieldId, or null if its not found.
8831
       */
8832
      public static _Fields findByThriftId(int fieldId) {
8833
        switch(fieldId) {
8834
          case 1: // TXN_ID
8835
            return TXN_ID;
8836
          default:
8837
            return null;
8838
        }
8839
      }
8840
 
8841
      /**
8842
       * Find the _Fields constant that matches fieldId, throwing an exception
8843
       * if it is not found.
8844
       */
8845
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8846
        _Fields fields = findByThriftId(fieldId);
8847
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8848
        return fields;
8849
      }
8850
 
8851
      /**
8852
       * Find the _Fields constant that matches name, or null if its not found.
8853
       */
8854
      public static _Fields findByName(String name) {
8855
        return byName.get(name);
8856
      }
8857
 
8858
      private final short _thriftId;
8859
      private final String _fieldName;
8860
 
8861
      _Fields(short thriftId, String fieldName) {
8862
        _thriftId = thriftId;
8863
        _fieldName = fieldName;
8864
      }
8865
 
8866
      public short getThriftFieldId() {
8867
        return _thriftId;
8868
      }
8869
 
8870
      public String getFieldName() {
8871
        return _fieldName;
8872
      }
8873
    }
8874
 
8875
    // isset id assignments
8876
    private static final int __TXNID_ISSET_ID = 0;
8877
    private BitSet __isset_bit_vector = new BitSet(1);
8878
 
8879
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
8880
    static {
8881
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
8882
      tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
8883
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8884
      metaDataMap = Collections.unmodifiableMap(tmpMap);
8885
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentForRechargeTxnId_args.class, metaDataMap);
8886
    }
8887
 
8888
    public getPaymentForRechargeTxnId_args() {
8889
    }
8890
 
8891
    public getPaymentForRechargeTxnId_args(
8892
      long txnId)
8893
    {
8894
      this();
8895
      this.txnId = txnId;
8896
      setTxnIdIsSet(true);
8897
    }
8898
 
8899
    /**
8900
     * Performs a deep copy on <i>other</i>.
8901
     */
8902
    public getPaymentForRechargeTxnId_args(getPaymentForRechargeTxnId_args other) {
8903
      __isset_bit_vector.clear();
8904
      __isset_bit_vector.or(other.__isset_bit_vector);
8905
      this.txnId = other.txnId;
8906
    }
8907
 
8908
    public getPaymentForRechargeTxnId_args deepCopy() {
8909
      return new getPaymentForRechargeTxnId_args(this);
8910
    }
8911
 
8912
    @Override
8913
    public void clear() {
8914
      setTxnIdIsSet(false);
8915
      this.txnId = 0;
8916
    }
8917
 
8918
    public long getTxnId() {
8919
      return this.txnId;
8920
    }
8921
 
8922
    public void setTxnId(long txnId) {
8923
      this.txnId = txnId;
8924
      setTxnIdIsSet(true);
8925
    }
8926
 
8927
    public void unsetTxnId() {
8928
      __isset_bit_vector.clear(__TXNID_ISSET_ID);
8929
    }
8930
 
8931
    /** Returns true if field txnId is set (has been assigned a value) and false otherwise */
8932
    public boolean isSetTxnId() {
8933
      return __isset_bit_vector.get(__TXNID_ISSET_ID);
8934
    }
8935
 
8936
    public void setTxnIdIsSet(boolean value) {
8937
      __isset_bit_vector.set(__TXNID_ISSET_ID, value);
8938
    }
8939
 
8940
    public void setFieldValue(_Fields field, Object value) {
8941
      switch (field) {
8942
      case TXN_ID:
8943
        if (value == null) {
8944
          unsetTxnId();
8945
        } else {
8946
          setTxnId((Long)value);
8947
        }
8948
        break;
8949
 
8950
      }
8951
    }
8952
 
8953
    public Object getFieldValue(_Fields field) {
8954
      switch (field) {
8955
      case TXN_ID:
8956
        return Long.valueOf(getTxnId());
8957
 
8958
      }
8959
      throw new IllegalStateException();
8960
    }
8961
 
8962
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
8963
    public boolean isSet(_Fields field) {
8964
      if (field == null) {
8965
        throw new IllegalArgumentException();
8966
      }
8967
 
8968
      switch (field) {
8969
      case TXN_ID:
8970
        return isSetTxnId();
8971
      }
8972
      throw new IllegalStateException();
8973
    }
8974
 
8975
    @Override
8976
    public boolean equals(Object that) {
8977
      if (that == null)
8978
        return false;
8979
      if (that instanceof getPaymentForRechargeTxnId_args)
8980
        return this.equals((getPaymentForRechargeTxnId_args)that);
8981
      return false;
8982
    }
8983
 
8984
    public boolean equals(getPaymentForRechargeTxnId_args that) {
8985
      if (that == null)
8986
        return false;
8987
 
8988
      boolean this_present_txnId = true;
8989
      boolean that_present_txnId = true;
8990
      if (this_present_txnId || that_present_txnId) {
8991
        if (!(this_present_txnId && that_present_txnId))
8992
          return false;
8993
        if (this.txnId != that.txnId)
8994
          return false;
8995
      }
8996
 
8997
      return true;
8998
    }
8999
 
9000
    @Override
9001
    public int hashCode() {
9002
      return 0;
9003
    }
9004
 
9005
    public int compareTo(getPaymentForRechargeTxnId_args other) {
9006
      if (!getClass().equals(other.getClass())) {
9007
        return getClass().getName().compareTo(other.getClass().getName());
9008
      }
9009
 
9010
      int lastComparison = 0;
9011
      getPaymentForRechargeTxnId_args typedOther = (getPaymentForRechargeTxnId_args)other;
9012
 
9013
      lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(typedOther.isSetTxnId());
9014
      if (lastComparison != 0) {
9015
        return lastComparison;
9016
      }
9017
      if (isSetTxnId()) {
9018
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, typedOther.txnId);
9019
        if (lastComparison != 0) {
9020
          return lastComparison;
9021
        }
9022
      }
9023
      return 0;
9024
    }
9025
 
9026
    public _Fields fieldForId(int fieldId) {
9027
      return _Fields.findByThriftId(fieldId);
9028
    }
9029
 
9030
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9031
      org.apache.thrift.protocol.TField field;
9032
      iprot.readStructBegin();
9033
      while (true)
9034
      {
9035
        field = iprot.readFieldBegin();
9036
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9037
          break;
9038
        }
9039
        switch (field.id) {
9040
          case 1: // TXN_ID
9041
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9042
              this.txnId = iprot.readI64();
9043
              setTxnIdIsSet(true);
9044
            } else { 
9045
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9046
            }
9047
            break;
9048
          default:
9049
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9050
        }
9051
        iprot.readFieldEnd();
9052
      }
9053
      iprot.readStructEnd();
9054
      validate();
9055
    }
9056
 
9057
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9058
      validate();
9059
 
9060
      oprot.writeStructBegin(STRUCT_DESC);
9061
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
9062
      oprot.writeI64(this.txnId);
9063
      oprot.writeFieldEnd();
9064
      oprot.writeFieldStop();
9065
      oprot.writeStructEnd();
9066
    }
9067
 
9068
    @Override
9069
    public String toString() {
9070
      StringBuilder sb = new StringBuilder("getPaymentForRechargeTxnId_args(");
9071
      boolean first = true;
9072
 
9073
      sb.append("txnId:");
9074
      sb.append(this.txnId);
9075
      first = false;
9076
      sb.append(")");
9077
      return sb.toString();
9078
    }
9079
 
9080
    public void validate() throws org.apache.thrift.TException {
9081
      // check for required fields
9082
    }
9083
 
9084
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9085
      try {
9086
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9087
      } catch (org.apache.thrift.TException te) {
9088
        throw new java.io.IOException(te);
9089
      }
9090
    }
9091
 
9092
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9093
      try {
9094
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9095
        __isset_bit_vector = new BitSet(1);
9096
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9097
      } catch (org.apache.thrift.TException te) {
9098
        throw new java.io.IOException(te);
9099
      }
9100
    }
9101
 
9102
  }
9103
 
9104
  public static class getPaymentForRechargeTxnId_result implements org.apache.thrift.TBase<getPaymentForRechargeTxnId_result, getPaymentForRechargeTxnId_result._Fields>, java.io.Serializable, Cloneable   {
9105
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentForRechargeTxnId_result");
9106
 
9107
    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);
9108
    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);
9109
 
9110
    private List<Payment> success; // required
9111
    private PaymentException pe; // required
9112
 
9113
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9114
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9115
      SUCCESS((short)0, "success"),
9116
      PE((short)1, "pe");
9117
 
9118
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9119
 
9120
      static {
9121
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9122
          byName.put(field.getFieldName(), field);
9123
        }
9124
      }
9125
 
9126
      /**
9127
       * Find the _Fields constant that matches fieldId, or null if its not found.
9128
       */
9129
      public static _Fields findByThriftId(int fieldId) {
9130
        switch(fieldId) {
9131
          case 0: // SUCCESS
9132
            return SUCCESS;
9133
          case 1: // PE
9134
            return PE;
9135
          default:
9136
            return null;
9137
        }
9138
      }
9139
 
9140
      /**
9141
       * Find the _Fields constant that matches fieldId, throwing an exception
9142
       * if it is not found.
9143
       */
9144
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9145
        _Fields fields = findByThriftId(fieldId);
9146
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9147
        return fields;
9148
      }
9149
 
9150
      /**
9151
       * Find the _Fields constant that matches name, or null if its not found.
9152
       */
9153
      public static _Fields findByName(String name) {
9154
        return byName.get(name);
9155
      }
9156
 
9157
      private final short _thriftId;
9158
      private final String _fieldName;
9159
 
9160
      _Fields(short thriftId, String fieldName) {
9161
        _thriftId = thriftId;
9162
        _fieldName = fieldName;
9163
      }
9164
 
9165
      public short getThriftFieldId() {
9166
        return _thriftId;
9167
      }
9168
 
9169
      public String getFieldName() {
9170
        return _fieldName;
9171
      }
9172
    }
9173
 
9174
    // isset id assignments
9175
 
9176
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9177
    static {
9178
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9179
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9180
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
9181
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class))));
9182
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9183
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9184
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9185
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentForRechargeTxnId_result.class, metaDataMap);
9186
    }
9187
 
9188
    public getPaymentForRechargeTxnId_result() {
9189
    }
9190
 
9191
    public getPaymentForRechargeTxnId_result(
9192
      List<Payment> success,
9193
      PaymentException pe)
9194
    {
9195
      this();
9196
      this.success = success;
9197
      this.pe = pe;
9198
    }
9199
 
9200
    /**
9201
     * Performs a deep copy on <i>other</i>.
9202
     */
9203
    public getPaymentForRechargeTxnId_result(getPaymentForRechargeTxnId_result other) {
9204
      if (other.isSetSuccess()) {
9205
        List<Payment> __this__success = new ArrayList<Payment>();
9206
        for (Payment other_element : other.success) {
9207
          __this__success.add(new Payment(other_element));
9208
        }
9209
        this.success = __this__success;
9210
      }
9211
      if (other.isSetPe()) {
9212
        this.pe = new PaymentException(other.pe);
9213
      }
9214
    }
9215
 
9216
    public getPaymentForRechargeTxnId_result deepCopy() {
9217
      return new getPaymentForRechargeTxnId_result(this);
9218
    }
9219
 
9220
    @Override
9221
    public void clear() {
9222
      this.success = null;
9223
      this.pe = null;
9224
    }
9225
 
9226
    public int getSuccessSize() {
9227
      return (this.success == null) ? 0 : this.success.size();
9228
    }
9229
 
9230
    public java.util.Iterator<Payment> getSuccessIterator() {
9231
      return (this.success == null) ? null : this.success.iterator();
9232
    }
9233
 
9234
    public void addToSuccess(Payment elem) {
9235
      if (this.success == null) {
9236
        this.success = new ArrayList<Payment>();
9237
      }
9238
      this.success.add(elem);
9239
    }
9240
 
9241
    public List<Payment> getSuccess() {
9242
      return this.success;
9243
    }
9244
 
9245
    public void setSuccess(List<Payment> success) {
9246
      this.success = success;
9247
    }
9248
 
9249
    public void unsetSuccess() {
9250
      this.success = null;
9251
    }
9252
 
9253
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9254
    public boolean isSetSuccess() {
9255
      return this.success != null;
9256
    }
9257
 
9258
    public void setSuccessIsSet(boolean value) {
9259
      if (!value) {
9260
        this.success = null;
9261
      }
9262
    }
9263
 
9264
    public PaymentException getPe() {
9265
      return this.pe;
9266
    }
9267
 
9268
    public void setPe(PaymentException pe) {
9269
      this.pe = pe;
9270
    }
9271
 
9272
    public void unsetPe() {
9273
      this.pe = null;
9274
    }
9275
 
9276
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
9277
    public boolean isSetPe() {
9278
      return this.pe != null;
9279
    }
9280
 
9281
    public void setPeIsSet(boolean value) {
9282
      if (!value) {
9283
        this.pe = null;
9284
      }
9285
    }
9286
 
9287
    public void setFieldValue(_Fields field, Object value) {
9288
      switch (field) {
9289
      case SUCCESS:
9290
        if (value == null) {
9291
          unsetSuccess();
9292
        } else {
9293
          setSuccess((List<Payment>)value);
9294
        }
9295
        break;
9296
 
9297
      case PE:
9298
        if (value == null) {
9299
          unsetPe();
9300
        } else {
9301
          setPe((PaymentException)value);
9302
        }
9303
        break;
9304
 
9305
      }
9306
    }
9307
 
9308
    public Object getFieldValue(_Fields field) {
9309
      switch (field) {
9310
      case SUCCESS:
9311
        return getSuccess();
9312
 
9313
      case PE:
9314
        return getPe();
9315
 
9316
      }
9317
      throw new IllegalStateException();
9318
    }
9319
 
9320
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9321
    public boolean isSet(_Fields field) {
9322
      if (field == null) {
9323
        throw new IllegalArgumentException();
9324
      }
9325
 
9326
      switch (field) {
9327
      case SUCCESS:
9328
        return isSetSuccess();
9329
      case PE:
9330
        return isSetPe();
9331
      }
9332
      throw new IllegalStateException();
9333
    }
9334
 
9335
    @Override
9336
    public boolean equals(Object that) {
9337
      if (that == null)
9338
        return false;
9339
      if (that instanceof getPaymentForRechargeTxnId_result)
9340
        return this.equals((getPaymentForRechargeTxnId_result)that);
9341
      return false;
9342
    }
9343
 
9344
    public boolean equals(getPaymentForRechargeTxnId_result that) {
9345
      if (that == null)
9346
        return false;
9347
 
9348
      boolean this_present_success = true && this.isSetSuccess();
9349
      boolean that_present_success = true && that.isSetSuccess();
9350
      if (this_present_success || that_present_success) {
9351
        if (!(this_present_success && that_present_success))
9352
          return false;
9353
        if (!this.success.equals(that.success))
9354
          return false;
9355
      }
9356
 
9357
      boolean this_present_pe = true && this.isSetPe();
9358
      boolean that_present_pe = true && that.isSetPe();
9359
      if (this_present_pe || that_present_pe) {
9360
        if (!(this_present_pe && that_present_pe))
9361
          return false;
9362
        if (!this.pe.equals(that.pe))
9363
          return false;
9364
      }
9365
 
9366
      return true;
9367
    }
9368
 
9369
    @Override
9370
    public int hashCode() {
9371
      return 0;
9372
    }
9373
 
9374
    public int compareTo(getPaymentForRechargeTxnId_result other) {
9375
      if (!getClass().equals(other.getClass())) {
9376
        return getClass().getName().compareTo(other.getClass().getName());
9377
      }
9378
 
9379
      int lastComparison = 0;
9380
      getPaymentForRechargeTxnId_result typedOther = (getPaymentForRechargeTxnId_result)other;
9381
 
9382
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
9383
      if (lastComparison != 0) {
9384
        return lastComparison;
9385
      }
9386
      if (isSetSuccess()) {
9387
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
9388
        if (lastComparison != 0) {
9389
          return lastComparison;
9390
        }
9391
      }
9392
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
9393
      if (lastComparison != 0) {
9394
        return lastComparison;
9395
      }
9396
      if (isSetPe()) {
9397
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
9398
        if (lastComparison != 0) {
9399
          return lastComparison;
9400
        }
9401
      }
9402
      return 0;
9403
    }
9404
 
9405
    public _Fields fieldForId(int fieldId) {
9406
      return _Fields.findByThriftId(fieldId);
9407
    }
9408
 
9409
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9410
      org.apache.thrift.protocol.TField field;
9411
      iprot.readStructBegin();
9412
      while (true)
9413
      {
9414
        field = iprot.readFieldBegin();
9415
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9416
          break;
9417
        }
9418
        switch (field.id) {
9419
          case 0: // SUCCESS
9420
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
9421
              {
9422
                org.apache.thrift.protocol.TList _list32 = iprot.readListBegin();
9423
                this.success = new ArrayList<Payment>(_list32.size);
9424
                for (int _i33 = 0; _i33 < _list32.size; ++_i33)
9425
                {
9426
                  Payment _elem34; // required
9427
                  _elem34 = new Payment();
9428
                  _elem34.read(iprot);
9429
                  this.success.add(_elem34);
9430
                }
9431
                iprot.readListEnd();
9432
              }
9433
            } else { 
9434
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9435
            }
9436
            break;
9437
          case 1: // PE
9438
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
9439
              this.pe = new PaymentException();
9440
              this.pe.read(iprot);
9441
            } else { 
9442
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9443
            }
9444
            break;
9445
          default:
9446
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9447
        }
9448
        iprot.readFieldEnd();
9449
      }
9450
      iprot.readStructEnd();
9451
      validate();
9452
    }
9453
 
9454
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9455
      oprot.writeStructBegin(STRUCT_DESC);
9456
 
9457
      if (this.isSetSuccess()) {
9458
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9459
        {
9460
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.success.size()));
9461
          for (Payment _iter35 : this.success)
9462
          {
9463
            _iter35.write(oprot);
9464
          }
9465
          oprot.writeListEnd();
9466
        }
9467
        oprot.writeFieldEnd();
9468
      } else if (this.isSetPe()) {
9469
        oprot.writeFieldBegin(PE_FIELD_DESC);
9470
        this.pe.write(oprot);
9471
        oprot.writeFieldEnd();
9472
      }
9473
      oprot.writeFieldStop();
9474
      oprot.writeStructEnd();
9475
    }
9476
 
9477
    @Override
9478
    public String toString() {
9479
      StringBuilder sb = new StringBuilder("getPaymentForRechargeTxnId_result(");
9480
      boolean first = true;
9481
 
9482
      sb.append("success:");
9483
      if (this.success == null) {
9484
        sb.append("null");
9485
      } else {
9486
        sb.append(this.success);
9487
      }
9488
      first = false;
9489
      if (!first) sb.append(", ");
9490
      sb.append("pe:");
9491
      if (this.pe == null) {
9492
        sb.append("null");
9493
      } else {
9494
        sb.append(this.pe);
9495
      }
9496
      first = false;
9497
      sb.append(")");
9498
      return sb.toString();
9499
    }
9500
 
9501
    public void validate() throws org.apache.thrift.TException {
9502
      // check for required fields
9503
    }
9504
 
9505
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9506
      try {
9507
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9508
      } catch (org.apache.thrift.TException te) {
9509
        throw new java.io.IOException(te);
9510
      }
9511
    }
9512
 
9513
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9514
      try {
9515
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9516
      } catch (org.apache.thrift.TException te) {
9517
        throw new java.io.IOException(te);
9518
      }
9519
    }
9520
 
9521
  }
9522
 
4600 varun.gupt 9523
  public static class getSuccessfulPaymentForTxnId_args implements org.apache.thrift.TBase<getSuccessfulPaymentForTxnId_args, getSuccessfulPaymentForTxnId_args._Fields>, java.io.Serializable, Cloneable   {
9524
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuccessfulPaymentForTxnId_args");
9525
 
9526
    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);
9527
 
9528
    private long txnId; // required
9529
 
9530
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9531
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9532
      TXN_ID((short)1, "txnId");
9533
 
9534
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9535
 
9536
      static {
9537
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9538
          byName.put(field.getFieldName(), field);
9539
        }
9540
      }
9541
 
9542
      /**
9543
       * Find the _Fields constant that matches fieldId, or null if its not found.
9544
       */
9545
      public static _Fields findByThriftId(int fieldId) {
9546
        switch(fieldId) {
9547
          case 1: // TXN_ID
9548
            return TXN_ID;
9549
          default:
9550
            return null;
9551
        }
9552
      }
9553
 
9554
      /**
9555
       * Find the _Fields constant that matches fieldId, throwing an exception
9556
       * if it is not found.
9557
       */
9558
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9559
        _Fields fields = findByThriftId(fieldId);
9560
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9561
        return fields;
9562
      }
9563
 
9564
      /**
9565
       * Find the _Fields constant that matches name, or null if its not found.
9566
       */
9567
      public static _Fields findByName(String name) {
9568
        return byName.get(name);
9569
      }
9570
 
9571
      private final short _thriftId;
9572
      private final String _fieldName;
9573
 
9574
      _Fields(short thriftId, String fieldName) {
9575
        _thriftId = thriftId;
9576
        _fieldName = fieldName;
9577
      }
9578
 
9579
      public short getThriftFieldId() {
9580
        return _thriftId;
9581
      }
9582
 
9583
      public String getFieldName() {
9584
        return _fieldName;
9585
      }
9586
    }
9587
 
9588
    // isset id assignments
9589
    private static final int __TXNID_ISSET_ID = 0;
9590
    private BitSet __isset_bit_vector = new BitSet(1);
9591
 
9592
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9593
    static {
9594
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9595
      tmpMap.put(_Fields.TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("txnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9596
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
9597
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9598
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentForTxnId_args.class, metaDataMap);
9599
    }
9600
 
9601
    public getSuccessfulPaymentForTxnId_args() {
9602
    }
9603
 
9604
    public getSuccessfulPaymentForTxnId_args(
9605
      long txnId)
9606
    {
9607
      this();
9608
      this.txnId = txnId;
9609
      setTxnIdIsSet(true);
9610
    }
9611
 
9612
    /**
9613
     * Performs a deep copy on <i>other</i>.
9614
     */
9615
    public getSuccessfulPaymentForTxnId_args(getSuccessfulPaymentForTxnId_args other) {
9616
      __isset_bit_vector.clear();
9617
      __isset_bit_vector.or(other.__isset_bit_vector);
9618
      this.txnId = other.txnId;
9619
    }
9620
 
9621
    public getSuccessfulPaymentForTxnId_args deepCopy() {
9622
      return new getSuccessfulPaymentForTxnId_args(this);
9623
    }
9624
 
9625
    @Override
9626
    public void clear() {
9627
      setTxnIdIsSet(false);
9628
      this.txnId = 0;
9629
    }
9630
 
9631
    public long getTxnId() {
9632
      return this.txnId;
9633
    }
9634
 
9635
    public void setTxnId(long txnId) {
9636
      this.txnId = txnId;
9637
      setTxnIdIsSet(true);
9638
    }
9639
 
9640
    public void unsetTxnId() {
9641
      __isset_bit_vector.clear(__TXNID_ISSET_ID);
9642
    }
9643
 
9644
    /** Returns true if field txnId is set (has been assigned a value) and false otherwise */
9645
    public boolean isSetTxnId() {
9646
      return __isset_bit_vector.get(__TXNID_ISSET_ID);
9647
    }
9648
 
9649
    public void setTxnIdIsSet(boolean value) {
9650
      __isset_bit_vector.set(__TXNID_ISSET_ID, value);
9651
    }
9652
 
9653
    public void setFieldValue(_Fields field, Object value) {
9654
      switch (field) {
9655
      case TXN_ID:
9656
        if (value == null) {
9657
          unsetTxnId();
9658
        } else {
9659
          setTxnId((Long)value);
9660
        }
9661
        break;
9662
 
9663
      }
9664
    }
9665
 
9666
    public Object getFieldValue(_Fields field) {
9667
      switch (field) {
9668
      case TXN_ID:
9669
        return Long.valueOf(getTxnId());
9670
 
9671
      }
9672
      throw new IllegalStateException();
9673
    }
9674
 
9675
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
9676
    public boolean isSet(_Fields field) {
9677
      if (field == null) {
9678
        throw new IllegalArgumentException();
9679
      }
9680
 
9681
      switch (field) {
9682
      case TXN_ID:
9683
        return isSetTxnId();
9684
      }
9685
      throw new IllegalStateException();
9686
    }
9687
 
9688
    @Override
9689
    public boolean equals(Object that) {
9690
      if (that == null)
9691
        return false;
9692
      if (that instanceof getSuccessfulPaymentForTxnId_args)
9693
        return this.equals((getSuccessfulPaymentForTxnId_args)that);
9694
      return false;
9695
    }
9696
 
9697
    public boolean equals(getSuccessfulPaymentForTxnId_args that) {
9698
      if (that == null)
9699
        return false;
9700
 
9701
      boolean this_present_txnId = true;
9702
      boolean that_present_txnId = true;
9703
      if (this_present_txnId || that_present_txnId) {
9704
        if (!(this_present_txnId && that_present_txnId))
9705
          return false;
9706
        if (this.txnId != that.txnId)
9707
          return false;
9708
      }
9709
 
9710
      return true;
9711
    }
9712
 
9713
    @Override
9714
    public int hashCode() {
9715
      return 0;
9716
    }
9717
 
9718
    public int compareTo(getSuccessfulPaymentForTxnId_args other) {
9719
      if (!getClass().equals(other.getClass())) {
9720
        return getClass().getName().compareTo(other.getClass().getName());
9721
      }
9722
 
9723
      int lastComparison = 0;
9724
      getSuccessfulPaymentForTxnId_args typedOther = (getSuccessfulPaymentForTxnId_args)other;
9725
 
9726
      lastComparison = Boolean.valueOf(isSetTxnId()).compareTo(typedOther.isSetTxnId());
9727
      if (lastComparison != 0) {
9728
        return lastComparison;
9729
      }
9730
      if (isSetTxnId()) {
9731
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.txnId, typedOther.txnId);
9732
        if (lastComparison != 0) {
9733
          return lastComparison;
9734
        }
9735
      }
9736
      return 0;
9737
    }
9738
 
9739
    public _Fields fieldForId(int fieldId) {
9740
      return _Fields.findByThriftId(fieldId);
9741
    }
9742
 
9743
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
9744
      org.apache.thrift.protocol.TField field;
9745
      iprot.readStructBegin();
9746
      while (true)
9747
      {
9748
        field = iprot.readFieldBegin();
9749
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
9750
          break;
9751
        }
9752
        switch (field.id) {
9753
          case 1: // TXN_ID
9754
            if (field.type == org.apache.thrift.protocol.TType.I64) {
9755
              this.txnId = iprot.readI64();
9756
              setTxnIdIsSet(true);
9757
            } else { 
9758
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9759
            }
9760
            break;
9761
          default:
9762
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
9763
        }
9764
        iprot.readFieldEnd();
9765
      }
9766
      iprot.readStructEnd();
9767
      validate();
9768
    }
9769
 
9770
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
9771
      validate();
9772
 
9773
      oprot.writeStructBegin(STRUCT_DESC);
9774
      oprot.writeFieldBegin(TXN_ID_FIELD_DESC);
9775
      oprot.writeI64(this.txnId);
9776
      oprot.writeFieldEnd();
9777
      oprot.writeFieldStop();
9778
      oprot.writeStructEnd();
9779
    }
9780
 
9781
    @Override
9782
    public String toString() {
9783
      StringBuilder sb = new StringBuilder("getSuccessfulPaymentForTxnId_args(");
9784
      boolean first = true;
9785
 
9786
      sb.append("txnId:");
9787
      sb.append(this.txnId);
9788
      first = false;
9789
      sb.append(")");
9790
      return sb.toString();
9791
    }
9792
 
9793
    public void validate() throws org.apache.thrift.TException {
9794
      // check for required fields
9795
    }
9796
 
9797
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
9798
      try {
9799
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
9800
      } catch (org.apache.thrift.TException te) {
9801
        throw new java.io.IOException(te);
9802
      }
9803
    }
9804
 
9805
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
9806
      try {
9807
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
9808
        __isset_bit_vector = new BitSet(1);
9809
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
9810
      } catch (org.apache.thrift.TException te) {
9811
        throw new java.io.IOException(te);
9812
      }
9813
    }
9814
 
9815
  }
9816
 
9817
  public static class getSuccessfulPaymentForTxnId_result implements org.apache.thrift.TBase<getSuccessfulPaymentForTxnId_result, getSuccessfulPaymentForTxnId_result._Fields>, java.io.Serializable, Cloneable   {
9818
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuccessfulPaymentForTxnId_result");
9819
 
9820
    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);
9821
    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);
9822
 
9823
    private Payment success; // required
9824
    private PaymentException pe; // required
9825
 
9826
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9827
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
9828
      SUCCESS((short)0, "success"),
9829
      PE((short)1, "pe");
9830
 
9831
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9832
 
9833
      static {
9834
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9835
          byName.put(field.getFieldName(), field);
9836
        }
9837
      }
9838
 
9839
      /**
9840
       * Find the _Fields constant that matches fieldId, or null if its not found.
9841
       */
9842
      public static _Fields findByThriftId(int fieldId) {
9843
        switch(fieldId) {
9844
          case 0: // SUCCESS
9845
            return SUCCESS;
9846
          case 1: // PE
9847
            return PE;
9848
          default:
9849
            return null;
9850
        }
9851
      }
9852
 
9853
      /**
9854
       * Find the _Fields constant that matches fieldId, throwing an exception
9855
       * if it is not found.
9856
       */
9857
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9858
        _Fields fields = findByThriftId(fieldId);
9859
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9860
        return fields;
9861
      }
9862
 
9863
      /**
9864
       * Find the _Fields constant that matches name, or null if its not found.
9865
       */
9866
      public static _Fields findByName(String name) {
9867
        return byName.get(name);
9868
      }
9869
 
9870
      private final short _thriftId;
9871
      private final String _fieldName;
9872
 
9873
      _Fields(short thriftId, String fieldName) {
9874
        _thriftId = thriftId;
9875
        _fieldName = fieldName;
9876
      }
9877
 
9878
      public short getThriftFieldId() {
9879
        return _thriftId;
9880
      }
9881
 
9882
      public String getFieldName() {
9883
        return _fieldName;
9884
      }
9885
    }
9886
 
9887
    // isset id assignments
9888
 
9889
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
9890
    static {
9891
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
9892
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9893
          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Payment.class)));
9894
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
9895
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
9896
      metaDataMap = Collections.unmodifiableMap(tmpMap);
9897
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentForTxnId_result.class, metaDataMap);
9898
    }
9899
 
9900
    public getSuccessfulPaymentForTxnId_result() {
9901
    }
9902
 
9903
    public getSuccessfulPaymentForTxnId_result(
9904
      Payment success,
9905
      PaymentException pe)
9906
    {
9907
      this();
9908
      this.success = success;
9909
      this.pe = pe;
9910
    }
9911
 
9912
    /**
9913
     * Performs a deep copy on <i>other</i>.
9914
     */
9915
    public getSuccessfulPaymentForTxnId_result(getSuccessfulPaymentForTxnId_result other) {
9916
      if (other.isSetSuccess()) {
9917
        this.success = new Payment(other.success);
9918
      }
9919
      if (other.isSetPe()) {
9920
        this.pe = new PaymentException(other.pe);
9921
      }
9922
    }
9923
 
9924
    public getSuccessfulPaymentForTxnId_result deepCopy() {
9925
      return new getSuccessfulPaymentForTxnId_result(this);
9926
    }
9927
 
9928
    @Override
9929
    public void clear() {
9930
      this.success = null;
9931
      this.pe = null;
9932
    }
9933
 
9934
    public Payment getSuccess() {
9935
      return this.success;
9936
    }
9937
 
9938
    public void setSuccess(Payment success) {
9939
      this.success = success;
9940
    }
9941
 
9942
    public void unsetSuccess() {
9943
      this.success = null;
9944
    }
9945
 
9946
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
9947
    public boolean isSetSuccess() {
9948
      return this.success != null;
9949
    }
9950
 
9951
    public void setSuccessIsSet(boolean value) {
9952
      if (!value) {
9953
        this.success = null;
9954
      }
9955
    }
9956
 
9957
    public PaymentException getPe() {
9958
      return this.pe;
9959
    }
9960
 
9961
    public void setPe(PaymentException pe) {
9962
      this.pe = pe;
9963
    }
9964
 
9965
    public void unsetPe() {
9966
      this.pe = null;
9967
    }
9968
 
9969
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
9970
    public boolean isSetPe() {
9971
      return this.pe != null;
9972
    }
9973
 
9974
    public void setPeIsSet(boolean value) {
9975
      if (!value) {
9976
        this.pe = null;
9977
      }
9978
    }
9979
 
9980
    public void setFieldValue(_Fields field, Object value) {
9981
      switch (field) {
9982
      case SUCCESS:
9983
        if (value == null) {
9984
          unsetSuccess();
9985
        } else {
9986
          setSuccess((Payment)value);
9987
        }
9988
        break;
9989
 
9990
      case PE:
9991
        if (value == null) {
9992
          unsetPe();
9993
        } else {
9994
          setPe((PaymentException)value);
9995
        }
9996
        break;
9997
 
9998
      }
9999
    }
10000
 
10001
    public Object getFieldValue(_Fields field) {
10002
      switch (field) {
10003
      case SUCCESS:
10004
        return getSuccess();
10005
 
10006
      case PE:
10007
        return getPe();
10008
 
10009
      }
10010
      throw new IllegalStateException();
10011
    }
10012
 
10013
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10014
    public boolean isSet(_Fields field) {
10015
      if (field == null) {
10016
        throw new IllegalArgumentException();
10017
      }
10018
 
10019
      switch (field) {
10020
      case SUCCESS:
10021
        return isSetSuccess();
10022
      case PE:
10023
        return isSetPe();
10024
      }
10025
      throw new IllegalStateException();
10026
    }
10027
 
10028
    @Override
10029
    public boolean equals(Object that) {
10030
      if (that == null)
10031
        return false;
10032
      if (that instanceof getSuccessfulPaymentForTxnId_result)
10033
        return this.equals((getSuccessfulPaymentForTxnId_result)that);
10034
      return false;
10035
    }
10036
 
10037
    public boolean equals(getSuccessfulPaymentForTxnId_result that) {
10038
      if (that == null)
10039
        return false;
10040
 
10041
      boolean this_present_success = true && this.isSetSuccess();
10042
      boolean that_present_success = true && that.isSetSuccess();
10043
      if (this_present_success || that_present_success) {
10044
        if (!(this_present_success && that_present_success))
10045
          return false;
10046
        if (!this.success.equals(that.success))
10047
          return false;
10048
      }
10049
 
10050
      boolean this_present_pe = true && this.isSetPe();
10051
      boolean that_present_pe = true && that.isSetPe();
10052
      if (this_present_pe || that_present_pe) {
10053
        if (!(this_present_pe && that_present_pe))
10054
          return false;
10055
        if (!this.pe.equals(that.pe))
10056
          return false;
10057
      }
10058
 
10059
      return true;
10060
    }
10061
 
10062
    @Override
10063
    public int hashCode() {
10064
      return 0;
10065
    }
10066
 
10067
    public int compareTo(getSuccessfulPaymentForTxnId_result other) {
10068
      if (!getClass().equals(other.getClass())) {
10069
        return getClass().getName().compareTo(other.getClass().getName());
10070
      }
10071
 
10072
      int lastComparison = 0;
10073
      getSuccessfulPaymentForTxnId_result typedOther = (getSuccessfulPaymentForTxnId_result)other;
10074
 
10075
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
10076
      if (lastComparison != 0) {
10077
        return lastComparison;
10078
      }
10079
      if (isSetSuccess()) {
10080
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
10081
        if (lastComparison != 0) {
10082
          return lastComparison;
10083
        }
10084
      }
10085
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
10086
      if (lastComparison != 0) {
10087
        return lastComparison;
10088
      }
10089
      if (isSetPe()) {
10090
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
10091
        if (lastComparison != 0) {
10092
          return lastComparison;
10093
        }
10094
      }
10095
      return 0;
10096
    }
10097
 
10098
    public _Fields fieldForId(int fieldId) {
10099
      return _Fields.findByThriftId(fieldId);
10100
    }
10101
 
10102
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
10103
      org.apache.thrift.protocol.TField field;
10104
      iprot.readStructBegin();
10105
      while (true)
10106
      {
10107
        field = iprot.readFieldBegin();
10108
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
10109
          break;
10110
        }
10111
        switch (field.id) {
10112
          case 0: // SUCCESS
10113
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10114
              this.success = new Payment();
10115
              this.success.read(iprot);
10116
            } else { 
10117
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10118
            }
10119
            break;
10120
          case 1: // PE
10121
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
10122
              this.pe = new PaymentException();
10123
              this.pe.read(iprot);
10124
            } else { 
10125
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10126
            }
10127
            break;
10128
          default:
10129
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
10130
        }
10131
        iprot.readFieldEnd();
10132
      }
10133
      iprot.readStructEnd();
10134
      validate();
10135
    }
10136
 
10137
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
10138
      oprot.writeStructBegin(STRUCT_DESC);
10139
 
10140
      if (this.isSetSuccess()) {
10141
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10142
        this.success.write(oprot);
10143
        oprot.writeFieldEnd();
10144
      } else if (this.isSetPe()) {
10145
        oprot.writeFieldBegin(PE_FIELD_DESC);
10146
        this.pe.write(oprot);
10147
        oprot.writeFieldEnd();
10148
      }
10149
      oprot.writeFieldStop();
10150
      oprot.writeStructEnd();
10151
    }
10152
 
10153
    @Override
10154
    public String toString() {
10155
      StringBuilder sb = new StringBuilder("getSuccessfulPaymentForTxnId_result(");
10156
      boolean first = true;
10157
 
10158
      sb.append("success:");
10159
      if (this.success == null) {
10160
        sb.append("null");
10161
      } else {
10162
        sb.append(this.success);
10163
      }
10164
      first = false;
10165
      if (!first) sb.append(", ");
10166
      sb.append("pe:");
10167
      if (this.pe == null) {
10168
        sb.append("null");
10169
      } else {
10170
        sb.append(this.pe);
10171
      }
10172
      first = false;
10173
      sb.append(")");
10174
      return sb.toString();
10175
    }
10176
 
10177
    public void validate() throws org.apache.thrift.TException {
10178
      // check for required fields
10179
    }
10180
 
10181
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
10182
      try {
10183
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
10184
      } catch (org.apache.thrift.TException te) {
10185
        throw new java.io.IOException(te);
10186
      }
10187
    }
10188
 
10189
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
10190
      try {
10191
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
10192
      } catch (org.apache.thrift.TException te) {
10193
        throw new java.io.IOException(te);
10194
      }
10195
    }
10196
 
10197
  }
10198
 
3430 rajveer 10199
  public static class updatePaymentDetails_args implements org.apache.thrift.TBase<updatePaymentDetails_args, updatePaymentDetails_args._Fields>, java.io.Serializable, Cloneable   {
10200
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePaymentDetails_args");
420 ashish 10201
 
3430 rajveer 10202
    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);
10203
    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);
10204
    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);
10205
    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);
10206
    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);
10207
    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);
10208
    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);
10209
    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);
10210
    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);
10211
    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);
10212
    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);
10213
    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 10214
 
3430 rajveer 10215
    private long id; // required
10216
    private String gatewayPaymentId; // required
10217
    private String sessionId; // required
10218
    private String gatewayTxnStatus; // required
10219
    private String description; // required
10220
    private String gatewayTxnId; // required
10221
    private String authCode; // required
10222
    private String referenceCode; // required
10223
    private String errorCode; // required
10224
    private PaymentStatus status; // required
10225
    private String gatewayTxnDate; // required
10226
    private List<Attribute> attributes; // required
420 ashish 10227
 
10228
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 10229
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
420 ashish 10230
      ID((short)1, "id"),
695 rajveer 10231
      GATEWAY_PAYMENT_ID((short)2, "gatewayPaymentId"),
10232
      SESSION_ID((short)3, "sessionId"),
10233
      GATEWAY_TXN_STATUS((short)4, "gatewayTxnStatus"),
10234
      DESCRIPTION((short)5, "description"),
10235
      GATEWAY_TXN_ID((short)6, "gatewayTxnId"),
10236
      AUTH_CODE((short)7, "authCode"),
10237
      REFERENCE_CODE((short)8, "referenceCode"),
10238
      ERROR_CODE((short)9, "errorCode"),
10239
      /**
10240
       * 
10241
       * @see PaymentStatus
10242
       */
10243
      STATUS((short)10, "status"),
1119 rajveer 10244
      GATEWAY_TXN_DATE((short)11, "gatewayTxnDate"),
10245
      ATTRIBUTES((short)12, "attributes");
420 ashish 10246
 
10247
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10248
 
10249
      static {
10250
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10251
          byName.put(field.getFieldName(), field);
10252
        }
10253
      }
10254
 
10255
      /**
10256
       * Find the _Fields constant that matches fieldId, or null if its not found.
10257
       */
10258
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 10259
        switch(fieldId) {
10260
          case 1: // ID
10261
            return ID;
10262
          case 2: // GATEWAY_PAYMENT_ID
10263
            return GATEWAY_PAYMENT_ID;
10264
          case 3: // SESSION_ID
10265
            return SESSION_ID;
10266
          case 4: // GATEWAY_TXN_STATUS
10267
            return GATEWAY_TXN_STATUS;
10268
          case 5: // DESCRIPTION
10269
            return DESCRIPTION;
10270
          case 6: // GATEWAY_TXN_ID
10271
            return GATEWAY_TXN_ID;
10272
          case 7: // AUTH_CODE
10273
            return AUTH_CODE;
10274
          case 8: // REFERENCE_CODE
10275
            return REFERENCE_CODE;
10276
          case 9: // ERROR_CODE
10277
            return ERROR_CODE;
10278
          case 10: // STATUS
10279
            return STATUS;
10280
          case 11: // GATEWAY_TXN_DATE
10281
            return GATEWAY_TXN_DATE;
10282
          case 12: // ATTRIBUTES
10283
            return ATTRIBUTES;
10284
          default:
10285
            return null;
10286
        }
420 ashish 10287
      }
10288
 
10289
      /**
10290
       * Find the _Fields constant that matches fieldId, throwing an exception
10291
       * if it is not found.
10292
       */
10293
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10294
        _Fields fields = findByThriftId(fieldId);
10295
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10296
        return fields;
10297
      }
10298
 
10299
      /**
10300
       * Find the _Fields constant that matches name, or null if its not found.
10301
       */
10302
      public static _Fields findByName(String name) {
10303
        return byName.get(name);
10304
      }
10305
 
10306
      private final short _thriftId;
10307
      private final String _fieldName;
10308
 
10309
      _Fields(short thriftId, String fieldName) {
10310
        _thriftId = thriftId;
10311
        _fieldName = fieldName;
10312
      }
10313
 
10314
      public short getThriftFieldId() {
10315
        return _thriftId;
10316
      }
10317
 
10318
      public String getFieldName() {
10319
        return _fieldName;
10320
      }
10321
    }
10322
 
10323
    // isset id assignments
10324
    private static final int __ID_ISSET_ID = 0;
10325
    private BitSet __isset_bit_vector = new BitSet(1);
10326
 
3430 rajveer 10327
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 10328
    static {
3430 rajveer 10329
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
10330
      tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10331
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
10332
      tmpMap.put(_Fields.GATEWAY_PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayPaymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10333
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10334
      tmpMap.put(_Fields.SESSION_ID, new org.apache.thrift.meta_data.FieldMetaData("sessionId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10335
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10336
      tmpMap.put(_Fields.GATEWAY_TXN_STATUS, new org.apache.thrift.meta_data.FieldMetaData("gatewayTxnStatus", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10337
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10338
      tmpMap.put(_Fields.DESCRIPTION, new org.apache.thrift.meta_data.FieldMetaData("description", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10339
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10340
      tmpMap.put(_Fields.GATEWAY_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10341
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10342
      tmpMap.put(_Fields.AUTH_CODE, new org.apache.thrift.meta_data.FieldMetaData("authCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10343
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10344
      tmpMap.put(_Fields.REFERENCE_CODE, new org.apache.thrift.meta_data.FieldMetaData("referenceCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10345
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10346
      tmpMap.put(_Fields.ERROR_CODE, new org.apache.thrift.meta_data.FieldMetaData("errorCode", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10347
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10348
      tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10349
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, PaymentStatus.class)));
10350
      tmpMap.put(_Fields.GATEWAY_TXN_DATE, new org.apache.thrift.meta_data.FieldMetaData("gatewayTxnDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10351
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
10352
      tmpMap.put(_Fields.ATTRIBUTES, new org.apache.thrift.meta_data.FieldMetaData("attributes", org.apache.thrift.TFieldRequirementType.DEFAULT, 
10353
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
10354
              new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Attribute.class))));
10355
      metaDataMap = Collections.unmodifiableMap(tmpMap);
10356
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePaymentDetails_args.class, metaDataMap);
420 ashish 10357
    }
10358
 
695 rajveer 10359
    public updatePaymentDetails_args() {
420 ashish 10360
    }
10361
 
695 rajveer 10362
    public updatePaymentDetails_args(
420 ashish 10363
      long id,
695 rajveer 10364
      String gatewayPaymentId,
10365
      String sessionId,
10366
      String gatewayTxnStatus,
10367
      String description,
10368
      String gatewayTxnId,
10369
      String authCode,
10370
      String referenceCode,
10371
      String errorCode,
10372
      PaymentStatus status,
1119 rajveer 10373
      String gatewayTxnDate,
695 rajveer 10374
      List<Attribute> attributes)
420 ashish 10375
    {
10376
      this();
10377
      this.id = id;
10378
      setIdIsSet(true);
695 rajveer 10379
      this.gatewayPaymentId = gatewayPaymentId;
10380
      this.sessionId = sessionId;
10381
      this.gatewayTxnStatus = gatewayTxnStatus;
10382
      this.description = description;
10383
      this.gatewayTxnId = gatewayTxnId;
10384
      this.authCode = authCode;
10385
      this.referenceCode = referenceCode;
10386
      this.errorCode = errorCode;
10387
      this.status = status;
1119 rajveer 10388
      this.gatewayTxnDate = gatewayTxnDate;
695 rajveer 10389
      this.attributes = attributes;
420 ashish 10390
    }
10391
 
10392
    /**
10393
     * Performs a deep copy on <i>other</i>.
10394
     */
695 rajveer 10395
    public updatePaymentDetails_args(updatePaymentDetails_args other) {
420 ashish 10396
      __isset_bit_vector.clear();
10397
      __isset_bit_vector.or(other.__isset_bit_vector);
10398
      this.id = other.id;
695 rajveer 10399
      if (other.isSetGatewayPaymentId()) {
10400
        this.gatewayPaymentId = other.gatewayPaymentId;
420 ashish 10401
      }
695 rajveer 10402
      if (other.isSetSessionId()) {
10403
        this.sessionId = other.sessionId;
420 ashish 10404
      }
695 rajveer 10405
      if (other.isSetGatewayTxnStatus()) {
10406
        this.gatewayTxnStatus = other.gatewayTxnStatus;
420 ashish 10407
      }
695 rajveer 10408
      if (other.isSetDescription()) {
10409
        this.description = other.description;
420 ashish 10410
      }
695 rajveer 10411
      if (other.isSetGatewayTxnId()) {
10412
        this.gatewayTxnId = other.gatewayTxnId;
420 ashish 10413
      }
695 rajveer 10414
      if (other.isSetAuthCode()) {
10415
        this.authCode = other.authCode;
420 ashish 10416
      }
695 rajveer 10417
      if (other.isSetReferenceCode()) {
10418
        this.referenceCode = other.referenceCode;
420 ashish 10419
      }
695 rajveer 10420
      if (other.isSetErrorCode()) {
10421
        this.errorCode = other.errorCode;
10422
      }
10423
      if (other.isSetStatus()) {
10424
        this.status = other.status;
10425
      }
1119 rajveer 10426
      if (other.isSetGatewayTxnDate()) {
10427
        this.gatewayTxnDate = other.gatewayTxnDate;
10428
      }
695 rajveer 10429
      if (other.isSetAttributes()) {
10430
        List<Attribute> __this__attributes = new ArrayList<Attribute>();
10431
        for (Attribute other_element : other.attributes) {
10432
          __this__attributes.add(new Attribute(other_element));
10433
        }
10434
        this.attributes = __this__attributes;
10435
      }
420 ashish 10436
    }
10437
 
695 rajveer 10438
    public updatePaymentDetails_args deepCopy() {
10439
      return new updatePaymentDetails_args(this);
420 ashish 10440
    }
10441
 
3430 rajveer 10442
    @Override
10443
    public void clear() {
10444
      setIdIsSet(false);
10445
      this.id = 0;
10446
      this.gatewayPaymentId = null;
10447
      this.sessionId = null;
10448
      this.gatewayTxnStatus = null;
10449
      this.description = null;
10450
      this.gatewayTxnId = null;
10451
      this.authCode = null;
10452
      this.referenceCode = null;
10453
      this.errorCode = null;
10454
      this.status = null;
10455
      this.gatewayTxnDate = null;
10456
      this.attributes = null;
420 ashish 10457
    }
10458
 
10459
    public long getId() {
10460
      return this.id;
10461
    }
10462
 
3430 rajveer 10463
    public void setId(long id) {
420 ashish 10464
      this.id = id;
10465
      setIdIsSet(true);
10466
    }
10467
 
10468
    public void unsetId() {
10469
      __isset_bit_vector.clear(__ID_ISSET_ID);
10470
    }
10471
 
3430 rajveer 10472
    /** Returns true if field id is set (has been assigned a value) and false otherwise */
420 ashish 10473
    public boolean isSetId() {
10474
      return __isset_bit_vector.get(__ID_ISSET_ID);
10475
    }
10476
 
10477
    public void setIdIsSet(boolean value) {
10478
      __isset_bit_vector.set(__ID_ISSET_ID, value);
10479
    }
10480
 
695 rajveer 10481
    public String getGatewayPaymentId() {
10482
      return this.gatewayPaymentId;
420 ashish 10483
    }
10484
 
3430 rajveer 10485
    public void setGatewayPaymentId(String gatewayPaymentId) {
695 rajveer 10486
      this.gatewayPaymentId = gatewayPaymentId;
420 ashish 10487
    }
10488
 
695 rajveer 10489
    public void unsetGatewayPaymentId() {
10490
      this.gatewayPaymentId = null;
420 ashish 10491
    }
10492
 
3430 rajveer 10493
    /** Returns true if field gatewayPaymentId is set (has been assigned a value) and false otherwise */
695 rajveer 10494
    public boolean isSetGatewayPaymentId() {
10495
      return this.gatewayPaymentId != null;
420 ashish 10496
    }
10497
 
695 rajveer 10498
    public void setGatewayPaymentIdIsSet(boolean value) {
420 ashish 10499
      if (!value) {
695 rajveer 10500
        this.gatewayPaymentId = null;
420 ashish 10501
      }
10502
    }
10503
 
695 rajveer 10504
    public String getSessionId() {
10505
      return this.sessionId;
420 ashish 10506
    }
10507
 
3430 rajveer 10508
    public void setSessionId(String sessionId) {
695 rajveer 10509
      this.sessionId = sessionId;
420 ashish 10510
    }
10511
 
695 rajveer 10512
    public void unsetSessionId() {
10513
      this.sessionId = null;
420 ashish 10514
    }
10515
 
3430 rajveer 10516
    /** Returns true if field sessionId is set (has been assigned a value) and false otherwise */
695 rajveer 10517
    public boolean isSetSessionId() {
10518
      return this.sessionId != null;
420 ashish 10519
    }
10520
 
695 rajveer 10521
    public void setSessionIdIsSet(boolean value) {
420 ashish 10522
      if (!value) {
695 rajveer 10523
        this.sessionId = null;
420 ashish 10524
      }
10525
    }
10526
 
695 rajveer 10527
    public String getGatewayTxnStatus() {
10528
      return this.gatewayTxnStatus;
420 ashish 10529
    }
10530
 
3430 rajveer 10531
    public void setGatewayTxnStatus(String gatewayTxnStatus) {
695 rajveer 10532
      this.gatewayTxnStatus = gatewayTxnStatus;
420 ashish 10533
    }
10534
 
695 rajveer 10535
    public void unsetGatewayTxnStatus() {
10536
      this.gatewayTxnStatus = null;
420 ashish 10537
    }
10538
 
3430 rajveer 10539
    /** Returns true if field gatewayTxnStatus is set (has been assigned a value) and false otherwise */
695 rajveer 10540
    public boolean isSetGatewayTxnStatus() {
10541
      return this.gatewayTxnStatus != null;
420 ashish 10542
    }
10543
 
695 rajveer 10544
    public void setGatewayTxnStatusIsSet(boolean value) {
420 ashish 10545
      if (!value) {
695 rajveer 10546
        this.gatewayTxnStatus = null;
420 ashish 10547
      }
10548
    }
10549
 
695 rajveer 10550
    public String getDescription() {
10551
      return this.description;
420 ashish 10552
    }
10553
 
3430 rajveer 10554
    public void setDescription(String description) {
695 rajveer 10555
      this.description = description;
420 ashish 10556
    }
10557
 
695 rajveer 10558
    public void unsetDescription() {
10559
      this.description = null;
420 ashish 10560
    }
10561
 
3430 rajveer 10562
    /** Returns true if field description is set (has been assigned a value) and false otherwise */
695 rajveer 10563
    public boolean isSetDescription() {
10564
      return this.description != null;
420 ashish 10565
    }
10566
 
695 rajveer 10567
    public void setDescriptionIsSet(boolean value) {
420 ashish 10568
      if (!value) {
695 rajveer 10569
        this.description = null;
420 ashish 10570
      }
10571
    }
10572
 
695 rajveer 10573
    public String getGatewayTxnId() {
10574
      return this.gatewayTxnId;
420 ashish 10575
    }
10576
 
3430 rajveer 10577
    public void setGatewayTxnId(String gatewayTxnId) {
695 rajveer 10578
      this.gatewayTxnId = gatewayTxnId;
420 ashish 10579
    }
10580
 
695 rajveer 10581
    public void unsetGatewayTxnId() {
10582
      this.gatewayTxnId = null;
420 ashish 10583
    }
10584
 
3430 rajveer 10585
    /** Returns true if field gatewayTxnId is set (has been assigned a value) and false otherwise */
695 rajveer 10586
    public boolean isSetGatewayTxnId() {
10587
      return this.gatewayTxnId != null;
420 ashish 10588
    }
10589
 
695 rajveer 10590
    public void setGatewayTxnIdIsSet(boolean value) {
420 ashish 10591
      if (!value) {
695 rajveer 10592
        this.gatewayTxnId = null;
420 ashish 10593
      }
10594
    }
10595
 
695 rajveer 10596
    public String getAuthCode() {
10597
      return this.authCode;
420 ashish 10598
    }
10599
 
3430 rajveer 10600
    public void setAuthCode(String authCode) {
695 rajveer 10601
      this.authCode = authCode;
420 ashish 10602
    }
10603
 
695 rajveer 10604
    public void unsetAuthCode() {
10605
      this.authCode = null;
420 ashish 10606
    }
10607
 
3430 rajveer 10608
    /** Returns true if field authCode is set (has been assigned a value) and false otherwise */
695 rajveer 10609
    public boolean isSetAuthCode() {
10610
      return this.authCode != null;
420 ashish 10611
    }
10612
 
695 rajveer 10613
    public void setAuthCodeIsSet(boolean value) {
420 ashish 10614
      if (!value) {
695 rajveer 10615
        this.authCode = null;
420 ashish 10616
      }
10617
    }
10618
 
695 rajveer 10619
    public String getReferenceCode() {
10620
      return this.referenceCode;
420 ashish 10621
    }
10622
 
3430 rajveer 10623
    public void setReferenceCode(String referenceCode) {
695 rajveer 10624
      this.referenceCode = referenceCode;
420 ashish 10625
    }
10626
 
695 rajveer 10627
    public void unsetReferenceCode() {
10628
      this.referenceCode = null;
420 ashish 10629
    }
10630
 
3430 rajveer 10631
    /** Returns true if field referenceCode is set (has been assigned a value) and false otherwise */
695 rajveer 10632
    public boolean isSetReferenceCode() {
10633
      return this.referenceCode != null;
420 ashish 10634
    }
10635
 
695 rajveer 10636
    public void setReferenceCodeIsSet(boolean value) {
420 ashish 10637
      if (!value) {
695 rajveer 10638
        this.referenceCode = null;
420 ashish 10639
      }
10640
    }
10641
 
695 rajveer 10642
    public String getErrorCode() {
10643
      return this.errorCode;
10644
    }
10645
 
3430 rajveer 10646
    public void setErrorCode(String errorCode) {
695 rajveer 10647
      this.errorCode = errorCode;
10648
    }
10649
 
10650
    public void unsetErrorCode() {
10651
      this.errorCode = null;
10652
    }
10653
 
3430 rajveer 10654
    /** Returns true if field errorCode is set (has been assigned a value) and false otherwise */
695 rajveer 10655
    public boolean isSetErrorCode() {
10656
      return this.errorCode != null;
10657
    }
10658
 
10659
    public void setErrorCodeIsSet(boolean value) {
10660
      if (!value) {
10661
        this.errorCode = null;
10662
      }
10663
    }
10664
 
10665
    /**
10666
     * 
10667
     * @see PaymentStatus
10668
     */
10669
    public PaymentStatus getStatus() {
10670
      return this.status;
10671
    }
10672
 
10673
    /**
10674
     * 
10675
     * @see PaymentStatus
10676
     */
3430 rajveer 10677
    public void setStatus(PaymentStatus status) {
695 rajveer 10678
      this.status = status;
10679
    }
10680
 
10681
    public void unsetStatus() {
10682
      this.status = null;
10683
    }
10684
 
3430 rajveer 10685
    /** Returns true if field status is set (has been assigned a value) and false otherwise */
695 rajveer 10686
    public boolean isSetStatus() {
10687
      return this.status != null;
10688
    }
10689
 
10690
    public void setStatusIsSet(boolean value) {
10691
      if (!value) {
10692
        this.status = null;
10693
      }
10694
    }
10695
 
1119 rajveer 10696
    public String getGatewayTxnDate() {
10697
      return this.gatewayTxnDate;
10698
    }
10699
 
3430 rajveer 10700
    public void setGatewayTxnDate(String gatewayTxnDate) {
1119 rajveer 10701
      this.gatewayTxnDate = gatewayTxnDate;
10702
    }
10703
 
10704
    public void unsetGatewayTxnDate() {
10705
      this.gatewayTxnDate = null;
10706
    }
10707
 
3430 rajveer 10708
    /** Returns true if field gatewayTxnDate is set (has been assigned a value) and false otherwise */
1119 rajveer 10709
    public boolean isSetGatewayTxnDate() {
10710
      return this.gatewayTxnDate != null;
10711
    }
10712
 
10713
    public void setGatewayTxnDateIsSet(boolean value) {
10714
      if (!value) {
10715
        this.gatewayTxnDate = null;
10716
      }
10717
    }
10718
 
695 rajveer 10719
    public int getAttributesSize() {
10720
      return (this.attributes == null) ? 0 : this.attributes.size();
10721
    }
10722
 
10723
    public java.util.Iterator<Attribute> getAttributesIterator() {
10724
      return (this.attributes == null) ? null : this.attributes.iterator();
10725
    }
10726
 
10727
    public void addToAttributes(Attribute elem) {
10728
      if (this.attributes == null) {
10729
        this.attributes = new ArrayList<Attribute>();
10730
      }
10731
      this.attributes.add(elem);
10732
    }
10733
 
10734
    public List<Attribute> getAttributes() {
10735
      return this.attributes;
10736
    }
10737
 
3430 rajveer 10738
    public void setAttributes(List<Attribute> attributes) {
695 rajveer 10739
      this.attributes = attributes;
10740
    }
10741
 
10742
    public void unsetAttributes() {
10743
      this.attributes = null;
10744
    }
10745
 
3430 rajveer 10746
    /** Returns true if field attributes is set (has been assigned a value) and false otherwise */
695 rajveer 10747
    public boolean isSetAttributes() {
10748
      return this.attributes != null;
10749
    }
10750
 
10751
    public void setAttributesIsSet(boolean value) {
10752
      if (!value) {
10753
        this.attributes = null;
10754
      }
10755
    }
10756
 
420 ashish 10757
    public void setFieldValue(_Fields field, Object value) {
10758
      switch (field) {
10759
      case ID:
10760
        if (value == null) {
10761
          unsetId();
10762
        } else {
10763
          setId((Long)value);
10764
        }
10765
        break;
10766
 
695 rajveer 10767
      case GATEWAY_PAYMENT_ID:
420 ashish 10768
        if (value == null) {
695 rajveer 10769
          unsetGatewayPaymentId();
420 ashish 10770
        } else {
695 rajveer 10771
          setGatewayPaymentId((String)value);
420 ashish 10772
        }
10773
        break;
10774
 
695 rajveer 10775
      case SESSION_ID:
420 ashish 10776
        if (value == null) {
695 rajveer 10777
          unsetSessionId();
420 ashish 10778
        } else {
695 rajveer 10779
          setSessionId((String)value);
420 ashish 10780
        }
10781
        break;
10782
 
695 rajveer 10783
      case GATEWAY_TXN_STATUS:
420 ashish 10784
        if (value == null) {
695 rajveer 10785
          unsetGatewayTxnStatus();
420 ashish 10786
        } else {
695 rajveer 10787
          setGatewayTxnStatus((String)value);
420 ashish 10788
        }
10789
        break;
10790
 
695 rajveer 10791
      case DESCRIPTION:
420 ashish 10792
        if (value == null) {
695 rajveer 10793
          unsetDescription();
420 ashish 10794
        } else {
695 rajveer 10795
          setDescription((String)value);
420 ashish 10796
        }
10797
        break;
10798
 
695 rajveer 10799
      case GATEWAY_TXN_ID:
420 ashish 10800
        if (value == null) {
695 rajveer 10801
          unsetGatewayTxnId();
420 ashish 10802
        } else {
695 rajveer 10803
          setGatewayTxnId((String)value);
420 ashish 10804
        }
10805
        break;
10806
 
10807
      case AUTH_CODE:
10808
        if (value == null) {
695 rajveer 10809
          unsetAuthCode();
420 ashish 10810
        } else {
695 rajveer 10811
          setAuthCode((String)value);
420 ashish 10812
        }
10813
        break;
10814
 
695 rajveer 10815
      case REFERENCE_CODE:
420 ashish 10816
        if (value == null) {
695 rajveer 10817
          unsetReferenceCode();
420 ashish 10818
        } else {
695 rajveer 10819
          setReferenceCode((String)value);
420 ashish 10820
        }
10821
        break;
10822
 
695 rajveer 10823
      case ERROR_CODE:
10824
        if (value == null) {
10825
          unsetErrorCode();
10826
        } else {
10827
          setErrorCode((String)value);
10828
        }
10829
        break;
10830
 
10831
      case STATUS:
10832
        if (value == null) {
10833
          unsetStatus();
10834
        } else {
10835
          setStatus((PaymentStatus)value);
10836
        }
10837
        break;
10838
 
1119 rajveer 10839
      case GATEWAY_TXN_DATE:
10840
        if (value == null) {
10841
          unsetGatewayTxnDate();
10842
        } else {
10843
          setGatewayTxnDate((String)value);
10844
        }
10845
        break;
10846
 
695 rajveer 10847
      case ATTRIBUTES:
10848
        if (value == null) {
10849
          unsetAttributes();
10850
        } else {
10851
          setAttributes((List<Attribute>)value);
10852
        }
10853
        break;
10854
 
420 ashish 10855
      }
10856
    }
10857
 
10858
    public Object getFieldValue(_Fields field) {
10859
      switch (field) {
10860
      case ID:
3430 rajveer 10861
        return Long.valueOf(getId());
420 ashish 10862
 
695 rajveer 10863
      case GATEWAY_PAYMENT_ID:
10864
        return getGatewayPaymentId();
420 ashish 10865
 
695 rajveer 10866
      case SESSION_ID:
10867
        return getSessionId();
420 ashish 10868
 
695 rajveer 10869
      case GATEWAY_TXN_STATUS:
10870
        return getGatewayTxnStatus();
420 ashish 10871
 
695 rajveer 10872
      case DESCRIPTION:
10873
        return getDescription();
420 ashish 10874
 
695 rajveer 10875
      case GATEWAY_TXN_ID:
10876
        return getGatewayTxnId();
420 ashish 10877
 
10878
      case AUTH_CODE:
695 rajveer 10879
        return getAuthCode();
420 ashish 10880
 
695 rajveer 10881
      case REFERENCE_CODE:
10882
        return getReferenceCode();
420 ashish 10883
 
695 rajveer 10884
      case ERROR_CODE:
10885
        return getErrorCode();
10886
 
10887
      case STATUS:
10888
        return getStatus();
10889
 
1119 rajveer 10890
      case GATEWAY_TXN_DATE:
10891
        return getGatewayTxnDate();
10892
 
695 rajveer 10893
      case ATTRIBUTES:
10894
        return getAttributes();
10895
 
420 ashish 10896
      }
10897
      throw new IllegalStateException();
10898
    }
10899
 
3430 rajveer 10900
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
10901
    public boolean isSet(_Fields field) {
10902
      if (field == null) {
10903
        throw new IllegalArgumentException();
10904
      }
420 ashish 10905
 
10906
      switch (field) {
10907
      case ID:
10908
        return isSetId();
695 rajveer 10909
      case GATEWAY_PAYMENT_ID:
10910
        return isSetGatewayPaymentId();
420 ashish 10911
      case SESSION_ID:
695 rajveer 10912
        return isSetSessionId();
10913
      case GATEWAY_TXN_STATUS:
10914
        return isSetGatewayTxnStatus();
10915
      case DESCRIPTION:
10916
        return isSetDescription();
10917
      case GATEWAY_TXN_ID:
10918
        return isSetGatewayTxnId();
420 ashish 10919
      case AUTH_CODE:
695 rajveer 10920
        return isSetAuthCode();
10921
      case REFERENCE_CODE:
10922
        return isSetReferenceCode();
10923
      case ERROR_CODE:
10924
        return isSetErrorCode();
10925
      case STATUS:
10926
        return isSetStatus();
1119 rajveer 10927
      case GATEWAY_TXN_DATE:
10928
        return isSetGatewayTxnDate();
695 rajveer 10929
      case ATTRIBUTES:
10930
        return isSetAttributes();
420 ashish 10931
      }
10932
      throw new IllegalStateException();
10933
    }
10934
 
10935
    @Override
10936
    public boolean equals(Object that) {
10937
      if (that == null)
10938
        return false;
695 rajveer 10939
      if (that instanceof updatePaymentDetails_args)
10940
        return this.equals((updatePaymentDetails_args)that);
420 ashish 10941
      return false;
10942
    }
10943
 
695 rajveer 10944
    public boolean equals(updatePaymentDetails_args that) {
420 ashish 10945
      if (that == null)
10946
        return false;
10947
 
10948
      boolean this_present_id = true;
10949
      boolean that_present_id = true;
10950
      if (this_present_id || that_present_id) {
10951
        if (!(this_present_id && that_present_id))
10952
          return false;
10953
        if (this.id != that.id)
10954
          return false;
10955
      }
10956
 
695 rajveer 10957
      boolean this_present_gatewayPaymentId = true && this.isSetGatewayPaymentId();
10958
      boolean that_present_gatewayPaymentId = true && that.isSetGatewayPaymentId();
10959
      if (this_present_gatewayPaymentId || that_present_gatewayPaymentId) {
10960
        if (!(this_present_gatewayPaymentId && that_present_gatewayPaymentId))
420 ashish 10961
          return false;
695 rajveer 10962
        if (!this.gatewayPaymentId.equals(that.gatewayPaymentId))
420 ashish 10963
          return false;
10964
      }
10965
 
695 rajveer 10966
      boolean this_present_sessionId = true && this.isSetSessionId();
10967
      boolean that_present_sessionId = true && that.isSetSessionId();
10968
      if (this_present_sessionId || that_present_sessionId) {
10969
        if (!(this_present_sessionId && that_present_sessionId))
420 ashish 10970
          return false;
695 rajveer 10971
        if (!this.sessionId.equals(that.sessionId))
420 ashish 10972
          return false;
10973
      }
10974
 
695 rajveer 10975
      boolean this_present_gatewayTxnStatus = true && this.isSetGatewayTxnStatus();
10976
      boolean that_present_gatewayTxnStatus = true && that.isSetGatewayTxnStatus();
10977
      if (this_present_gatewayTxnStatus || that_present_gatewayTxnStatus) {
10978
        if (!(this_present_gatewayTxnStatus && that_present_gatewayTxnStatus))
420 ashish 10979
          return false;
695 rajveer 10980
        if (!this.gatewayTxnStatus.equals(that.gatewayTxnStatus))
420 ashish 10981
          return false;
10982
      }
10983
 
695 rajveer 10984
      boolean this_present_description = true && this.isSetDescription();
10985
      boolean that_present_description = true && that.isSetDescription();
10986
      if (this_present_description || that_present_description) {
10987
        if (!(this_present_description && that_present_description))
420 ashish 10988
          return false;
695 rajveer 10989
        if (!this.description.equals(that.description))
420 ashish 10990
          return false;
10991
      }
10992
 
695 rajveer 10993
      boolean this_present_gatewayTxnId = true && this.isSetGatewayTxnId();
10994
      boolean that_present_gatewayTxnId = true && that.isSetGatewayTxnId();
10995
      if (this_present_gatewayTxnId || that_present_gatewayTxnId) {
10996
        if (!(this_present_gatewayTxnId && that_present_gatewayTxnId))
420 ashish 10997
          return false;
695 rajveer 10998
        if (!this.gatewayTxnId.equals(that.gatewayTxnId))
420 ashish 10999
          return false;
11000
      }
11001
 
695 rajveer 11002
      boolean this_present_authCode = true && this.isSetAuthCode();
11003
      boolean that_present_authCode = true && that.isSetAuthCode();
11004
      if (this_present_authCode || that_present_authCode) {
11005
        if (!(this_present_authCode && that_present_authCode))
420 ashish 11006
          return false;
695 rajveer 11007
        if (!this.authCode.equals(that.authCode))
420 ashish 11008
          return false;
11009
      }
11010
 
695 rajveer 11011
      boolean this_present_referenceCode = true && this.isSetReferenceCode();
11012
      boolean that_present_referenceCode = true && that.isSetReferenceCode();
11013
      if (this_present_referenceCode || that_present_referenceCode) {
11014
        if (!(this_present_referenceCode && that_present_referenceCode))
420 ashish 11015
          return false;
695 rajveer 11016
        if (!this.referenceCode.equals(that.referenceCode))
420 ashish 11017
          return false;
11018
      }
11019
 
695 rajveer 11020
      boolean this_present_errorCode = true && this.isSetErrorCode();
11021
      boolean that_present_errorCode = true && that.isSetErrorCode();
11022
      if (this_present_errorCode || that_present_errorCode) {
11023
        if (!(this_present_errorCode && that_present_errorCode))
11024
          return false;
11025
        if (!this.errorCode.equals(that.errorCode))
11026
          return false;
11027
      }
11028
 
11029
      boolean this_present_status = true && this.isSetStatus();
11030
      boolean that_present_status = true && that.isSetStatus();
11031
      if (this_present_status || that_present_status) {
11032
        if (!(this_present_status && that_present_status))
11033
          return false;
11034
        if (!this.status.equals(that.status))
11035
          return false;
11036
      }
11037
 
1119 rajveer 11038
      boolean this_present_gatewayTxnDate = true && this.isSetGatewayTxnDate();
11039
      boolean that_present_gatewayTxnDate = true && that.isSetGatewayTxnDate();
11040
      if (this_present_gatewayTxnDate || that_present_gatewayTxnDate) {
11041
        if (!(this_present_gatewayTxnDate && that_present_gatewayTxnDate))
11042
          return false;
11043
        if (!this.gatewayTxnDate.equals(that.gatewayTxnDate))
11044
          return false;
11045
      }
11046
 
695 rajveer 11047
      boolean this_present_attributes = true && this.isSetAttributes();
11048
      boolean that_present_attributes = true && that.isSetAttributes();
11049
      if (this_present_attributes || that_present_attributes) {
11050
        if (!(this_present_attributes && that_present_attributes))
11051
          return false;
11052
        if (!this.attributes.equals(that.attributes))
11053
          return false;
11054
      }
11055
 
420 ashish 11056
      return true;
11057
    }
11058
 
11059
    @Override
11060
    public int hashCode() {
11061
      return 0;
11062
    }
11063
 
695 rajveer 11064
    public int compareTo(updatePaymentDetails_args other) {
420 ashish 11065
      if (!getClass().equals(other.getClass())) {
11066
        return getClass().getName().compareTo(other.getClass().getName());
11067
      }
11068
 
11069
      int lastComparison = 0;
695 rajveer 11070
      updatePaymentDetails_args typedOther = (updatePaymentDetails_args)other;
420 ashish 11071
 
3430 rajveer 11072
      lastComparison = Boolean.valueOf(isSetId()).compareTo(typedOther.isSetId());
420 ashish 11073
      if (lastComparison != 0) {
11074
        return lastComparison;
11075
      }
3430 rajveer 11076
      if (isSetId()) {
11077
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, typedOther.id);
11078
        if (lastComparison != 0) {
11079
          return lastComparison;
11080
        }
420 ashish 11081
      }
3430 rajveer 11082
      lastComparison = Boolean.valueOf(isSetGatewayPaymentId()).compareTo(typedOther.isSetGatewayPaymentId());
420 ashish 11083
      if (lastComparison != 0) {
11084
        return lastComparison;
11085
      }
3430 rajveer 11086
      if (isSetGatewayPaymentId()) {
11087
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayPaymentId, typedOther.gatewayPaymentId);
11088
        if (lastComparison != 0) {
11089
          return lastComparison;
11090
        }
420 ashish 11091
      }
3430 rajveer 11092
      lastComparison = Boolean.valueOf(isSetSessionId()).compareTo(typedOther.isSetSessionId());
420 ashish 11093
      if (lastComparison != 0) {
11094
        return lastComparison;
11095
      }
3430 rajveer 11096
      if (isSetSessionId()) {
11097
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.sessionId, typedOther.sessionId);
11098
        if (lastComparison != 0) {
11099
          return lastComparison;
11100
        }
420 ashish 11101
      }
3430 rajveer 11102
      lastComparison = Boolean.valueOf(isSetGatewayTxnStatus()).compareTo(typedOther.isSetGatewayTxnStatus());
420 ashish 11103
      if (lastComparison != 0) {
11104
        return lastComparison;
11105
      }
3430 rajveer 11106
      if (isSetGatewayTxnStatus()) {
11107
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayTxnStatus, typedOther.gatewayTxnStatus);
11108
        if (lastComparison != 0) {
11109
          return lastComparison;
11110
        }
420 ashish 11111
      }
3430 rajveer 11112
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(typedOther.isSetDescription());
420 ashish 11113
      if (lastComparison != 0) {
11114
        return lastComparison;
11115
      }
3430 rajveer 11116
      if (isSetDescription()) {
11117
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.description, typedOther.description);
11118
        if (lastComparison != 0) {
11119
          return lastComparison;
11120
        }
420 ashish 11121
      }
3430 rajveer 11122
      lastComparison = Boolean.valueOf(isSetGatewayTxnId()).compareTo(typedOther.isSetGatewayTxnId());
420 ashish 11123
      if (lastComparison != 0) {
11124
        return lastComparison;
11125
      }
3430 rajveer 11126
      if (isSetGatewayTxnId()) {
11127
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayTxnId, typedOther.gatewayTxnId);
11128
        if (lastComparison != 0) {
11129
          return lastComparison;
11130
        }
420 ashish 11131
      }
3430 rajveer 11132
      lastComparison = Boolean.valueOf(isSetAuthCode()).compareTo(typedOther.isSetAuthCode());
420 ashish 11133
      if (lastComparison != 0) {
11134
        return lastComparison;
11135
      }
3430 rajveer 11136
      if (isSetAuthCode()) {
11137
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.authCode, typedOther.authCode);
11138
        if (lastComparison != 0) {
11139
          return lastComparison;
11140
        }
420 ashish 11141
      }
3430 rajveer 11142
      lastComparison = Boolean.valueOf(isSetReferenceCode()).compareTo(typedOther.isSetReferenceCode());
420 ashish 11143
      if (lastComparison != 0) {
11144
        return lastComparison;
11145
      }
3430 rajveer 11146
      if (isSetReferenceCode()) {
11147
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.referenceCode, typedOther.referenceCode);
11148
        if (lastComparison != 0) {
11149
          return lastComparison;
11150
        }
420 ashish 11151
      }
3430 rajveer 11152
      lastComparison = Boolean.valueOf(isSetErrorCode()).compareTo(typedOther.isSetErrorCode());
695 rajveer 11153
      if (lastComparison != 0) {
11154
        return lastComparison;
11155
      }
3430 rajveer 11156
      if (isSetErrorCode()) {
11157
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorCode, typedOther.errorCode);
11158
        if (lastComparison != 0) {
11159
          return lastComparison;
11160
        }
695 rajveer 11161
      }
3430 rajveer 11162
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(typedOther.isSetStatus());
695 rajveer 11163
      if (lastComparison != 0) {
11164
        return lastComparison;
11165
      }
3430 rajveer 11166
      if (isSetStatus()) {
11167
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, typedOther.status);
11168
        if (lastComparison != 0) {
11169
          return lastComparison;
11170
        }
695 rajveer 11171
      }
3430 rajveer 11172
      lastComparison = Boolean.valueOf(isSetGatewayTxnDate()).compareTo(typedOther.isSetGatewayTxnDate());
1119 rajveer 11173
      if (lastComparison != 0) {
11174
        return lastComparison;
11175
      }
3430 rajveer 11176
      if (isSetGatewayTxnDate()) {
11177
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.gatewayTxnDate, typedOther.gatewayTxnDate);
11178
        if (lastComparison != 0) {
11179
          return lastComparison;
11180
        }
1119 rajveer 11181
      }
3430 rajveer 11182
      lastComparison = Boolean.valueOf(isSetAttributes()).compareTo(typedOther.isSetAttributes());
695 rajveer 11183
      if (lastComparison != 0) {
11184
        return lastComparison;
11185
      }
3430 rajveer 11186
      if (isSetAttributes()) {
11187
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.attributes, typedOther.attributes);
11188
        if (lastComparison != 0) {
11189
          return lastComparison;
11190
        }
695 rajveer 11191
      }
420 ashish 11192
      return 0;
11193
    }
11194
 
3430 rajveer 11195
    public _Fields fieldForId(int fieldId) {
11196
      return _Fields.findByThriftId(fieldId);
11197
    }
11198
 
11199
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11200
      org.apache.thrift.protocol.TField field;
420 ashish 11201
      iprot.readStructBegin();
11202
      while (true)
11203
      {
11204
        field = iprot.readFieldBegin();
3430 rajveer 11205
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 11206
          break;
11207
        }
3430 rajveer 11208
        switch (field.id) {
11209
          case 1: // ID
11210
            if (field.type == org.apache.thrift.protocol.TType.I64) {
11211
              this.id = iprot.readI64();
11212
              setIdIsSet(true);
11213
            } else { 
11214
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11215
            }
11216
            break;
11217
          case 2: // GATEWAY_PAYMENT_ID
11218
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11219
              this.gatewayPaymentId = iprot.readString();
11220
            } else { 
11221
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11222
            }
11223
            break;
11224
          case 3: // SESSION_ID
11225
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11226
              this.sessionId = iprot.readString();
11227
            } else { 
11228
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11229
            }
11230
            break;
11231
          case 4: // GATEWAY_TXN_STATUS
11232
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11233
              this.gatewayTxnStatus = iprot.readString();
11234
            } else { 
11235
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11236
            }
11237
            break;
11238
          case 5: // DESCRIPTION
11239
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11240
              this.description = iprot.readString();
11241
            } else { 
11242
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11243
            }
11244
            break;
11245
          case 6: // GATEWAY_TXN_ID
11246
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11247
              this.gatewayTxnId = iprot.readString();
11248
            } else { 
11249
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11250
            }
11251
            break;
11252
          case 7: // AUTH_CODE
11253
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11254
              this.authCode = iprot.readString();
11255
            } else { 
11256
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11257
            }
11258
            break;
11259
          case 8: // REFERENCE_CODE
11260
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11261
              this.referenceCode = iprot.readString();
11262
            } else { 
11263
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11264
            }
11265
            break;
11266
          case 9: // ERROR_CODE
11267
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11268
              this.errorCode = iprot.readString();
11269
            } else { 
11270
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11271
            }
11272
            break;
11273
          case 10: // STATUS
11274
            if (field.type == org.apache.thrift.protocol.TType.I32) {
11275
              this.status = PaymentStatus.findByValue(iprot.readI32());
11276
            } else { 
11277
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11278
            }
11279
            break;
11280
          case 11: // GATEWAY_TXN_DATE
11281
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
11282
              this.gatewayTxnDate = iprot.readString();
11283
            } else { 
11284
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11285
            }
11286
            break;
11287
          case 12: // ATTRIBUTES
11288
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
11289
              {
7049 anupam.sin 11290
                org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
11291
                this.attributes = new ArrayList<Attribute>(_list36.size);
11292
                for (int _i37 = 0; _i37 < _list36.size; ++_i37)
695 rajveer 11293
                {
7049 anupam.sin 11294
                  Attribute _elem38; // required
11295
                  _elem38 = new Attribute();
11296
                  _elem38.read(iprot);
11297
                  this.attributes.add(_elem38);
695 rajveer 11298
                }
3430 rajveer 11299
                iprot.readListEnd();
695 rajveer 11300
              }
3430 rajveer 11301
            } else { 
11302
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11303
            }
11304
            break;
11305
          default:
11306
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 11307
        }
3430 rajveer 11308
        iprot.readFieldEnd();
420 ashish 11309
      }
11310
      iprot.readStructEnd();
11311
      validate();
11312
    }
11313
 
3430 rajveer 11314
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 11315
      validate();
11316
 
11317
      oprot.writeStructBegin(STRUCT_DESC);
11318
      oprot.writeFieldBegin(ID_FIELD_DESC);
11319
      oprot.writeI64(this.id);
11320
      oprot.writeFieldEnd();
695 rajveer 11321
      if (this.gatewayPaymentId != null) {
11322
        oprot.writeFieldBegin(GATEWAY_PAYMENT_ID_FIELD_DESC);
11323
        oprot.writeString(this.gatewayPaymentId);
420 ashish 11324
        oprot.writeFieldEnd();
11325
      }
695 rajveer 11326
      if (this.sessionId != null) {
11327
        oprot.writeFieldBegin(SESSION_ID_FIELD_DESC);
11328
        oprot.writeString(this.sessionId);
420 ashish 11329
        oprot.writeFieldEnd();
11330
      }
695 rajveer 11331
      if (this.gatewayTxnStatus != null) {
11332
        oprot.writeFieldBegin(GATEWAY_TXN_STATUS_FIELD_DESC);
11333
        oprot.writeString(this.gatewayTxnStatus);
420 ashish 11334
        oprot.writeFieldEnd();
11335
      }
695 rajveer 11336
      if (this.description != null) {
11337
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
11338
        oprot.writeString(this.description);
420 ashish 11339
        oprot.writeFieldEnd();
11340
      }
695 rajveer 11341
      if (this.gatewayTxnId != null) {
11342
        oprot.writeFieldBegin(GATEWAY_TXN_ID_FIELD_DESC);
11343
        oprot.writeString(this.gatewayTxnId);
420 ashish 11344
        oprot.writeFieldEnd();
11345
      }
695 rajveer 11346
      if (this.authCode != null) {
420 ashish 11347
        oprot.writeFieldBegin(AUTH_CODE_FIELD_DESC);
695 rajveer 11348
        oprot.writeString(this.authCode);
420 ashish 11349
        oprot.writeFieldEnd();
11350
      }
695 rajveer 11351
      if (this.referenceCode != null) {
11352
        oprot.writeFieldBegin(REFERENCE_CODE_FIELD_DESC);
11353
        oprot.writeString(this.referenceCode);
420 ashish 11354
        oprot.writeFieldEnd();
11355
      }
695 rajveer 11356
      if (this.errorCode != null) {
11357
        oprot.writeFieldBegin(ERROR_CODE_FIELD_DESC);
11358
        oprot.writeString(this.errorCode);
11359
        oprot.writeFieldEnd();
11360
      }
11361
      if (this.status != null) {
11362
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
11363
        oprot.writeI32(this.status.getValue());
11364
        oprot.writeFieldEnd();
11365
      }
1119 rajveer 11366
      if (this.gatewayTxnDate != null) {
11367
        oprot.writeFieldBegin(GATEWAY_TXN_DATE_FIELD_DESC);
11368
        oprot.writeString(this.gatewayTxnDate);
11369
        oprot.writeFieldEnd();
11370
      }
695 rajveer 11371
      if (this.attributes != null) {
11372
        oprot.writeFieldBegin(ATTRIBUTES_FIELD_DESC);
11373
        {
3430 rajveer 11374
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, this.attributes.size()));
7049 anupam.sin 11375
          for (Attribute _iter39 : this.attributes)
695 rajveer 11376
          {
7049 anupam.sin 11377
            _iter39.write(oprot);
695 rajveer 11378
          }
11379
          oprot.writeListEnd();
11380
        }
11381
        oprot.writeFieldEnd();
11382
      }
420 ashish 11383
      oprot.writeFieldStop();
11384
      oprot.writeStructEnd();
11385
    }
11386
 
11387
    @Override
11388
    public String toString() {
695 rajveer 11389
      StringBuilder sb = new StringBuilder("updatePaymentDetails_args(");
420 ashish 11390
      boolean first = true;
11391
 
11392
      sb.append("id:");
11393
      sb.append(this.id);
11394
      first = false;
11395
      if (!first) sb.append(", ");
695 rajveer 11396
      sb.append("gatewayPaymentId:");
11397
      if (this.gatewayPaymentId == null) {
420 ashish 11398
        sb.append("null");
11399
      } else {
695 rajveer 11400
        sb.append(this.gatewayPaymentId);
420 ashish 11401
      }
11402
      first = false;
11403
      if (!first) sb.append(", ");
695 rajveer 11404
      sb.append("sessionId:");
11405
      if (this.sessionId == null) {
420 ashish 11406
        sb.append("null");
11407
      } else {
695 rajveer 11408
        sb.append(this.sessionId);
420 ashish 11409
      }
11410
      first = false;
11411
      if (!first) sb.append(", ");
695 rajveer 11412
      sb.append("gatewayTxnStatus:");
11413
      if (this.gatewayTxnStatus == null) {
420 ashish 11414
        sb.append("null");
11415
      } else {
695 rajveer 11416
        sb.append(this.gatewayTxnStatus);
420 ashish 11417
      }
11418
      first = false;
11419
      if (!first) sb.append(", ");
695 rajveer 11420
      sb.append("description:");
11421
      if (this.description == null) {
420 ashish 11422
        sb.append("null");
11423
      } else {
695 rajveer 11424
        sb.append(this.description);
420 ashish 11425
      }
11426
      first = false;
11427
      if (!first) sb.append(", ");
695 rajveer 11428
      sb.append("gatewayTxnId:");
11429
      if (this.gatewayTxnId == null) {
420 ashish 11430
        sb.append("null");
11431
      } else {
695 rajveer 11432
        sb.append(this.gatewayTxnId);
420 ashish 11433
      }
11434
      first = false;
11435
      if (!first) sb.append(", ");
695 rajveer 11436
      sb.append("authCode:");
11437
      if (this.authCode == null) {
420 ashish 11438
        sb.append("null");
11439
      } else {
695 rajveer 11440
        sb.append(this.authCode);
420 ashish 11441
      }
11442
      first = false;
11443
      if (!first) sb.append(", ");
695 rajveer 11444
      sb.append("referenceCode:");
11445
      if (this.referenceCode == null) {
420 ashish 11446
        sb.append("null");
11447
      } else {
695 rajveer 11448
        sb.append(this.referenceCode);
420 ashish 11449
      }
11450
      first = false;
695 rajveer 11451
      if (!first) sb.append(", ");
11452
      sb.append("errorCode:");
11453
      if (this.errorCode == null) {
11454
        sb.append("null");
11455
      } else {
11456
        sb.append(this.errorCode);
11457
      }
11458
      first = false;
11459
      if (!first) sb.append(", ");
11460
      sb.append("status:");
11461
      if (this.status == null) {
11462
        sb.append("null");
11463
      } else {
11464
        sb.append(this.status);
11465
      }
11466
      first = false;
11467
      if (!first) sb.append(", ");
1119 rajveer 11468
      sb.append("gatewayTxnDate:");
11469
      if (this.gatewayTxnDate == null) {
11470
        sb.append("null");
11471
      } else {
11472
        sb.append(this.gatewayTxnDate);
11473
      }
11474
      first = false;
11475
      if (!first) sb.append(", ");
695 rajveer 11476
      sb.append("attributes:");
11477
      if (this.attributes == null) {
11478
        sb.append("null");
11479
      } else {
11480
        sb.append(this.attributes);
11481
      }
11482
      first = false;
420 ashish 11483
      sb.append(")");
11484
      return sb.toString();
11485
    }
11486
 
3430 rajveer 11487
    public void validate() throws org.apache.thrift.TException {
420 ashish 11488
      // check for required fields
11489
    }
11490
 
3430 rajveer 11491
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11492
      try {
11493
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11494
      } catch (org.apache.thrift.TException te) {
11495
        throw new java.io.IOException(te);
11496
      }
11497
    }
11498
 
11499
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11500
      try {
11501
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
11502
        __isset_bit_vector = new BitSet(1);
11503
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11504
      } catch (org.apache.thrift.TException te) {
11505
        throw new java.io.IOException(te);
11506
      }
11507
    }
11508
 
420 ashish 11509
  }
11510
 
3430 rajveer 11511
  public static class updatePaymentDetails_result implements org.apache.thrift.TBase<updatePaymentDetails_result, updatePaymentDetails_result._Fields>, java.io.Serializable, Cloneable   {
11512
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("updatePaymentDetails_result");
420 ashish 11513
 
3430 rajveer 11514
    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);
11515
    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 11516
 
3430 rajveer 11517
    private boolean success; // required
11518
    private PaymentException pe; // required
420 ashish 11519
 
11520
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 11521
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
695 rajveer 11522
      SUCCESS((short)0, "success"),
420 ashish 11523
      PE((short)1, "pe");
11524
 
11525
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11526
 
11527
      static {
11528
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11529
          byName.put(field.getFieldName(), field);
11530
        }
11531
      }
11532
 
11533
      /**
11534
       * Find the _Fields constant that matches fieldId, or null if its not found.
11535
       */
11536
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 11537
        switch(fieldId) {
11538
          case 0: // SUCCESS
11539
            return SUCCESS;
11540
          case 1: // PE
11541
            return PE;
11542
          default:
11543
            return null;
11544
        }
420 ashish 11545
      }
11546
 
11547
      /**
11548
       * Find the _Fields constant that matches fieldId, throwing an exception
11549
       * if it is not found.
11550
       */
11551
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11552
        _Fields fields = findByThriftId(fieldId);
11553
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11554
        return fields;
11555
      }
11556
 
11557
      /**
11558
       * Find the _Fields constant that matches name, or null if its not found.
11559
       */
11560
      public static _Fields findByName(String name) {
11561
        return byName.get(name);
11562
      }
11563
 
11564
      private final short _thriftId;
11565
      private final String _fieldName;
11566
 
11567
      _Fields(short thriftId, String fieldName) {
11568
        _thriftId = thriftId;
11569
        _fieldName = fieldName;
11570
      }
11571
 
11572
      public short getThriftFieldId() {
11573
        return _thriftId;
11574
      }
11575
 
11576
      public String getFieldName() {
11577
        return _fieldName;
11578
      }
11579
    }
11580
 
11581
    // isset id assignments
695 rajveer 11582
    private static final int __SUCCESS_ISSET_ID = 0;
11583
    private BitSet __isset_bit_vector = new BitSet(1);
420 ashish 11584
 
3430 rajveer 11585
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
420 ashish 11586
    static {
3430 rajveer 11587
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11588
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11589
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
11590
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
11591
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
11592
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11593
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(updatePaymentDetails_result.class, metaDataMap);
420 ashish 11594
    }
11595
 
695 rajveer 11596
    public updatePaymentDetails_result() {
420 ashish 11597
    }
11598
 
695 rajveer 11599
    public updatePaymentDetails_result(
11600
      boolean success,
420 ashish 11601
      PaymentException pe)
11602
    {
11603
      this();
695 rajveer 11604
      this.success = success;
11605
      setSuccessIsSet(true);
420 ashish 11606
      this.pe = pe;
11607
    }
11608
 
11609
    /**
11610
     * Performs a deep copy on <i>other</i>.
11611
     */
695 rajveer 11612
    public updatePaymentDetails_result(updatePaymentDetails_result other) {
11613
      __isset_bit_vector.clear();
11614
      __isset_bit_vector.or(other.__isset_bit_vector);
11615
      this.success = other.success;
420 ashish 11616
      if (other.isSetPe()) {
11617
        this.pe = new PaymentException(other.pe);
11618
      }
11619
    }
11620
 
695 rajveer 11621
    public updatePaymentDetails_result deepCopy() {
11622
      return new updatePaymentDetails_result(this);
420 ashish 11623
    }
11624
 
3430 rajveer 11625
    @Override
11626
    public void clear() {
11627
      setSuccessIsSet(false);
11628
      this.success = false;
11629
      this.pe = null;
420 ashish 11630
    }
11631
 
695 rajveer 11632
    public boolean isSuccess() {
11633
      return this.success;
11634
    }
11635
 
3430 rajveer 11636
    public void setSuccess(boolean success) {
695 rajveer 11637
      this.success = success;
11638
      setSuccessIsSet(true);
11639
    }
11640
 
11641
    public void unsetSuccess() {
11642
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11643
    }
11644
 
3430 rajveer 11645
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
695 rajveer 11646
    public boolean isSetSuccess() {
11647
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11648
    }
11649
 
11650
    public void setSuccessIsSet(boolean value) {
11651
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11652
    }
11653
 
420 ashish 11654
    public PaymentException getPe() {
11655
      return this.pe;
11656
    }
11657
 
3430 rajveer 11658
    public void setPe(PaymentException pe) {
420 ashish 11659
      this.pe = pe;
11660
    }
11661
 
11662
    public void unsetPe() {
11663
      this.pe = null;
11664
    }
11665
 
3430 rajveer 11666
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
420 ashish 11667
    public boolean isSetPe() {
11668
      return this.pe != null;
11669
    }
11670
 
11671
    public void setPeIsSet(boolean value) {
11672
      if (!value) {
11673
        this.pe = null;
11674
      }
11675
    }
11676
 
11677
    public void setFieldValue(_Fields field, Object value) {
11678
      switch (field) {
695 rajveer 11679
      case SUCCESS:
11680
        if (value == null) {
11681
          unsetSuccess();
11682
        } else {
11683
          setSuccess((Boolean)value);
11684
        }
11685
        break;
11686
 
420 ashish 11687
      case PE:
11688
        if (value == null) {
11689
          unsetPe();
11690
        } else {
11691
          setPe((PaymentException)value);
11692
        }
11693
        break;
11694
 
11695
      }
11696
    }
11697
 
11698
    public Object getFieldValue(_Fields field) {
11699
      switch (field) {
695 rajveer 11700
      case SUCCESS:
3430 rajveer 11701
        return Boolean.valueOf(isSuccess());
695 rajveer 11702
 
420 ashish 11703
      case PE:
11704
        return getPe();
11705
 
11706
      }
11707
      throw new IllegalStateException();
11708
    }
11709
 
3430 rajveer 11710
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11711
    public boolean isSet(_Fields field) {
11712
      if (field == null) {
11713
        throw new IllegalArgumentException();
11714
      }
420 ashish 11715
 
11716
      switch (field) {
695 rajveer 11717
      case SUCCESS:
11718
        return isSetSuccess();
420 ashish 11719
      case PE:
11720
        return isSetPe();
11721
      }
11722
      throw new IllegalStateException();
11723
    }
11724
 
11725
    @Override
11726
    public boolean equals(Object that) {
11727
      if (that == null)
11728
        return false;
695 rajveer 11729
      if (that instanceof updatePaymentDetails_result)
11730
        return this.equals((updatePaymentDetails_result)that);
420 ashish 11731
      return false;
11732
    }
11733
 
695 rajveer 11734
    public boolean equals(updatePaymentDetails_result that) {
420 ashish 11735
      if (that == null)
11736
        return false;
11737
 
695 rajveer 11738
      boolean this_present_success = true;
11739
      boolean that_present_success = true;
11740
      if (this_present_success || that_present_success) {
11741
        if (!(this_present_success && that_present_success))
11742
          return false;
11743
        if (this.success != that.success)
11744
          return false;
11745
      }
11746
 
420 ashish 11747
      boolean this_present_pe = true && this.isSetPe();
11748
      boolean that_present_pe = true && that.isSetPe();
11749
      if (this_present_pe || that_present_pe) {
11750
        if (!(this_present_pe && that_present_pe))
11751
          return false;
11752
        if (!this.pe.equals(that.pe))
11753
          return false;
11754
      }
11755
 
11756
      return true;
11757
    }
11758
 
11759
    @Override
11760
    public int hashCode() {
11761
      return 0;
11762
    }
11763
 
695 rajveer 11764
    public int compareTo(updatePaymentDetails_result other) {
420 ashish 11765
      if (!getClass().equals(other.getClass())) {
11766
        return getClass().getName().compareTo(other.getClass().getName());
11767
      }
11768
 
11769
      int lastComparison = 0;
695 rajveer 11770
      updatePaymentDetails_result typedOther = (updatePaymentDetails_result)other;
420 ashish 11771
 
3430 rajveer 11772
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
695 rajveer 11773
      if (lastComparison != 0) {
11774
        return lastComparison;
11775
      }
3430 rajveer 11776
      if (isSetSuccess()) {
11777
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
11778
        if (lastComparison != 0) {
11779
          return lastComparison;
11780
        }
695 rajveer 11781
      }
3430 rajveer 11782
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
420 ashish 11783
      if (lastComparison != 0) {
11784
        return lastComparison;
11785
      }
3430 rajveer 11786
      if (isSetPe()) {
11787
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
11788
        if (lastComparison != 0) {
11789
          return lastComparison;
11790
        }
420 ashish 11791
      }
11792
      return 0;
11793
    }
11794
 
3430 rajveer 11795
    public _Fields fieldForId(int fieldId) {
11796
      return _Fields.findByThriftId(fieldId);
11797
    }
11798
 
11799
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
11800
      org.apache.thrift.protocol.TField field;
420 ashish 11801
      iprot.readStructBegin();
11802
      while (true)
11803
      {
11804
        field = iprot.readFieldBegin();
3430 rajveer 11805
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
420 ashish 11806
          break;
11807
        }
3430 rajveer 11808
        switch (field.id) {
11809
          case 0: // SUCCESS
11810
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
11811
              this.success = iprot.readBool();
11812
              setSuccessIsSet(true);
11813
            } else { 
11814
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11815
            }
11816
            break;
11817
          case 1: // PE
11818
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
11819
              this.pe = new PaymentException();
11820
              this.pe.read(iprot);
11821
            } else { 
11822
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
11823
            }
11824
            break;
11825
          default:
11826
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
420 ashish 11827
        }
3430 rajveer 11828
        iprot.readFieldEnd();
420 ashish 11829
      }
11830
      iprot.readStructEnd();
11831
      validate();
11832
    }
11833
 
3430 rajveer 11834
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
420 ashish 11835
      oprot.writeStructBegin(STRUCT_DESC);
11836
 
695 rajveer 11837
      if (this.isSetSuccess()) {
11838
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11839
        oprot.writeBool(this.success);
11840
        oprot.writeFieldEnd();
11841
      } else if (this.isSetPe()) {
420 ashish 11842
        oprot.writeFieldBegin(PE_FIELD_DESC);
11843
        this.pe.write(oprot);
11844
        oprot.writeFieldEnd();
11845
      }
11846
      oprot.writeFieldStop();
11847
      oprot.writeStructEnd();
11848
    }
11849
 
11850
    @Override
11851
    public String toString() {
695 rajveer 11852
      StringBuilder sb = new StringBuilder("updatePaymentDetails_result(");
420 ashish 11853
      boolean first = true;
11854
 
695 rajveer 11855
      sb.append("success:");
11856
      sb.append(this.success);
11857
      first = false;
11858
      if (!first) sb.append(", ");
420 ashish 11859
      sb.append("pe:");
11860
      if (this.pe == null) {
11861
        sb.append("null");
11862
      } else {
11863
        sb.append(this.pe);
11864
      }
11865
      first = false;
11866
      sb.append(")");
11867
      return sb.toString();
11868
    }
11869
 
3430 rajveer 11870
    public void validate() throws org.apache.thrift.TException {
420 ashish 11871
      // check for required fields
11872
    }
11873
 
3430 rajveer 11874
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
11875
      try {
11876
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
11877
      } catch (org.apache.thrift.TException te) {
11878
        throw new java.io.IOException(te);
11879
      }
11880
    }
11881
 
11882
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
11883
      try {
11884
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
11885
      } catch (org.apache.thrift.TException te) {
11886
        throw new java.io.IOException(te);
11887
      }
11888
    }
11889
 
420 ashish 11890
  }
11891
 
3430 rajveer 11892
  public static class getSuccessfulPaymentsAmountRange_args implements org.apache.thrift.TBase<getSuccessfulPaymentsAmountRange_args, getSuccessfulPaymentsAmountRange_args._Fields>, java.io.Serializable, Cloneable   {
11893
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuccessfulPaymentsAmountRange_args");
1629 ankur.sing 11894
 
11895
 
11896
 
11897
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 11898
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1629 ankur.sing 11899
;
11900
 
11901
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11902
 
11903
      static {
11904
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11905
          byName.put(field.getFieldName(), field);
11906
        }
11907
      }
11908
 
11909
      /**
11910
       * Find the _Fields constant that matches fieldId, or null if its not found.
11911
       */
11912
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 11913
        switch(fieldId) {
11914
          default:
11915
            return null;
11916
        }
1629 ankur.sing 11917
      }
11918
 
11919
      /**
11920
       * Find the _Fields constant that matches fieldId, throwing an exception
11921
       * if it is not found.
11922
       */
11923
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11924
        _Fields fields = findByThriftId(fieldId);
11925
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11926
        return fields;
11927
      }
11928
 
11929
      /**
11930
       * Find the _Fields constant that matches name, or null if its not found.
11931
       */
11932
      public static _Fields findByName(String name) {
11933
        return byName.get(name);
11934
      }
11935
 
11936
      private final short _thriftId;
11937
      private final String _fieldName;
11938
 
11939
      _Fields(short thriftId, String fieldName) {
11940
        _thriftId = thriftId;
11941
        _fieldName = fieldName;
11942
      }
11943
 
11944
      public short getThriftFieldId() {
11945
        return _thriftId;
11946
      }
11947
 
11948
      public String getFieldName() {
11949
        return _fieldName;
11950
      }
11951
    }
3430 rajveer 11952
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1629 ankur.sing 11953
    static {
3430 rajveer 11954
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
11955
      metaDataMap = Collections.unmodifiableMap(tmpMap);
11956
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentsAmountRange_args.class, metaDataMap);
1629 ankur.sing 11957
    }
11958
 
1731 ankur.sing 11959
    public getSuccessfulPaymentsAmountRange_args() {
1629 ankur.sing 11960
    }
11961
 
11962
    /**
11963
     * Performs a deep copy on <i>other</i>.
11964
     */
1731 ankur.sing 11965
    public getSuccessfulPaymentsAmountRange_args(getSuccessfulPaymentsAmountRange_args other) {
1629 ankur.sing 11966
    }
11967
 
1731 ankur.sing 11968
    public getSuccessfulPaymentsAmountRange_args deepCopy() {
11969
      return new getSuccessfulPaymentsAmountRange_args(this);
1629 ankur.sing 11970
    }
11971
 
3430 rajveer 11972
    @Override
11973
    public void clear() {
1629 ankur.sing 11974
    }
11975
 
11976
    public void setFieldValue(_Fields field, Object value) {
11977
      switch (field) {
11978
      }
11979
    }
11980
 
11981
    public Object getFieldValue(_Fields field) {
11982
      switch (field) {
11983
      }
11984
      throw new IllegalStateException();
11985
    }
11986
 
3430 rajveer 11987
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
11988
    public boolean isSet(_Fields field) {
11989
      if (field == null) {
11990
        throw new IllegalArgumentException();
11991
      }
1629 ankur.sing 11992
 
11993
      switch (field) {
11994
      }
11995
      throw new IllegalStateException();
11996
    }
11997
 
11998
    @Override
11999
    public boolean equals(Object that) {
12000
      if (that == null)
12001
        return false;
1731 ankur.sing 12002
      if (that instanceof getSuccessfulPaymentsAmountRange_args)
12003
        return this.equals((getSuccessfulPaymentsAmountRange_args)that);
1629 ankur.sing 12004
      return false;
12005
    }
12006
 
1731 ankur.sing 12007
    public boolean equals(getSuccessfulPaymentsAmountRange_args that) {
1629 ankur.sing 12008
      if (that == null)
12009
        return false;
12010
 
12011
      return true;
12012
    }
12013
 
12014
    @Override
12015
    public int hashCode() {
12016
      return 0;
12017
    }
12018
 
1731 ankur.sing 12019
    public int compareTo(getSuccessfulPaymentsAmountRange_args other) {
1629 ankur.sing 12020
      if (!getClass().equals(other.getClass())) {
12021
        return getClass().getName().compareTo(other.getClass().getName());
12022
      }
12023
 
12024
      int lastComparison = 0;
1731 ankur.sing 12025
      getSuccessfulPaymentsAmountRange_args typedOther = (getSuccessfulPaymentsAmountRange_args)other;
1629 ankur.sing 12026
 
12027
      return 0;
12028
    }
12029
 
3430 rajveer 12030
    public _Fields fieldForId(int fieldId) {
12031
      return _Fields.findByThriftId(fieldId);
12032
    }
12033
 
12034
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12035
      org.apache.thrift.protocol.TField field;
1629 ankur.sing 12036
      iprot.readStructBegin();
12037
      while (true)
12038
      {
12039
        field = iprot.readFieldBegin();
3430 rajveer 12040
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1629 ankur.sing 12041
          break;
12042
        }
3430 rajveer 12043
        switch (field.id) {
12044
          default:
12045
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1629 ankur.sing 12046
        }
3430 rajveer 12047
        iprot.readFieldEnd();
1629 ankur.sing 12048
      }
12049
      iprot.readStructEnd();
12050
      validate();
12051
    }
12052
 
3430 rajveer 12053
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1629 ankur.sing 12054
      validate();
12055
 
12056
      oprot.writeStructBegin(STRUCT_DESC);
12057
      oprot.writeFieldStop();
12058
      oprot.writeStructEnd();
12059
    }
12060
 
12061
    @Override
12062
    public String toString() {
1731 ankur.sing 12063
      StringBuilder sb = new StringBuilder("getSuccessfulPaymentsAmountRange_args(");
1629 ankur.sing 12064
      boolean first = true;
12065
 
12066
      sb.append(")");
12067
      return sb.toString();
12068
    }
12069
 
3430 rajveer 12070
    public void validate() throws org.apache.thrift.TException {
1629 ankur.sing 12071
      // check for required fields
12072
    }
12073
 
3430 rajveer 12074
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12075
      try {
12076
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12077
      } catch (org.apache.thrift.TException te) {
12078
        throw new java.io.IOException(te);
12079
      }
12080
    }
12081
 
12082
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12083
      try {
12084
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12085
      } catch (org.apache.thrift.TException te) {
12086
        throw new java.io.IOException(te);
12087
      }
12088
    }
12089
 
1629 ankur.sing 12090
  }
12091
 
3430 rajveer 12092
  public static class getSuccessfulPaymentsAmountRange_result implements org.apache.thrift.TBase<getSuccessfulPaymentsAmountRange_result, getSuccessfulPaymentsAmountRange_result._Fields>, java.io.Serializable, Cloneable   {
12093
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getSuccessfulPaymentsAmountRange_result");
1629 ankur.sing 12094
 
3430 rajveer 12095
    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 12096
 
3430 rajveer 12097
    private List<Double> success; // required
1629 ankur.sing 12098
 
12099
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 12100
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
1629 ankur.sing 12101
      SUCCESS((short)0, "success");
12102
 
12103
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12104
 
12105
      static {
12106
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12107
          byName.put(field.getFieldName(), field);
12108
        }
12109
      }
12110
 
12111
      /**
12112
       * Find the _Fields constant that matches fieldId, or null if its not found.
12113
       */
12114
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 12115
        switch(fieldId) {
12116
          case 0: // SUCCESS
12117
            return SUCCESS;
12118
          default:
12119
            return null;
12120
        }
1629 ankur.sing 12121
      }
12122
 
12123
      /**
12124
       * Find the _Fields constant that matches fieldId, throwing an exception
12125
       * if it is not found.
12126
       */
12127
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12128
        _Fields fields = findByThriftId(fieldId);
12129
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12130
        return fields;
12131
      }
12132
 
12133
      /**
12134
       * Find the _Fields constant that matches name, or null if its not found.
12135
       */
12136
      public static _Fields findByName(String name) {
12137
        return byName.get(name);
12138
      }
12139
 
12140
      private final short _thriftId;
12141
      private final String _fieldName;
12142
 
12143
      _Fields(short thriftId, String fieldName) {
12144
        _thriftId = thriftId;
12145
        _fieldName = fieldName;
12146
      }
12147
 
12148
      public short getThriftFieldId() {
12149
        return _thriftId;
12150
      }
12151
 
12152
      public String getFieldName() {
12153
        return _fieldName;
12154
      }
12155
    }
12156
 
12157
    // isset id assignments
12158
 
3430 rajveer 12159
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
1629 ankur.sing 12160
    static {
3430 rajveer 12161
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12162
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12163
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
12164
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))));
12165
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12166
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getSuccessfulPaymentsAmountRange_result.class, metaDataMap);
1629 ankur.sing 12167
    }
12168
 
1731 ankur.sing 12169
    public getSuccessfulPaymentsAmountRange_result() {
1629 ankur.sing 12170
    }
12171
 
1731 ankur.sing 12172
    public getSuccessfulPaymentsAmountRange_result(
12173
      List<Double> success)
1629 ankur.sing 12174
    {
12175
      this();
12176
      this.success = success;
12177
    }
12178
 
12179
    /**
12180
     * Performs a deep copy on <i>other</i>.
12181
     */
1731 ankur.sing 12182
    public getSuccessfulPaymentsAmountRange_result(getSuccessfulPaymentsAmountRange_result other) {
12183
      if (other.isSetSuccess()) {
12184
        List<Double> __this__success = new ArrayList<Double>();
12185
        for (Double other_element : other.success) {
12186
          __this__success.add(other_element);
1629 ankur.sing 12187
        }
1731 ankur.sing 12188
        this.success = __this__success;
1629 ankur.sing 12189
      }
12190
    }
12191
 
1731 ankur.sing 12192
    public getSuccessfulPaymentsAmountRange_result deepCopy() {
12193
      return new getSuccessfulPaymentsAmountRange_result(this);
1629 ankur.sing 12194
    }
12195
 
3430 rajveer 12196
    @Override
12197
    public void clear() {
12198
      this.success = null;
1629 ankur.sing 12199
    }
12200
 
1731 ankur.sing 12201
    public int getSuccessSize() {
12202
      return (this.success == null) ? 0 : this.success.size();
1629 ankur.sing 12203
    }
12204
 
1731 ankur.sing 12205
    public java.util.Iterator<Double> getSuccessIterator() {
12206
      return (this.success == null) ? null : this.success.iterator();
1629 ankur.sing 12207
    }
12208
 
1731 ankur.sing 12209
    public void addToSuccess(double elem) {
12210
      if (this.success == null) {
12211
        this.success = new ArrayList<Double>();
1629 ankur.sing 12212
      }
1731 ankur.sing 12213
      this.success.add(elem);
1629 ankur.sing 12214
    }
12215
 
1731 ankur.sing 12216
    public List<Double> getSuccess() {
1629 ankur.sing 12217
      return this.success;
12218
    }
12219
 
3430 rajveer 12220
    public void setSuccess(List<Double> success) {
1629 ankur.sing 12221
      this.success = success;
12222
    }
12223
 
12224
    public void unsetSuccess() {
1731 ankur.sing 12225
      this.success = null;
1629 ankur.sing 12226
    }
12227
 
3430 rajveer 12228
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
1629 ankur.sing 12229
    public boolean isSetSuccess() {
1731 ankur.sing 12230
      return this.success != null;
1629 ankur.sing 12231
    }
12232
 
12233
    public void setSuccessIsSet(boolean value) {
1731 ankur.sing 12234
      if (!value) {
12235
        this.success = null;
12236
      }
1629 ankur.sing 12237
    }
12238
 
12239
    public void setFieldValue(_Fields field, Object value) {
12240
      switch (field) {
12241
      case SUCCESS:
12242
        if (value == null) {
12243
          unsetSuccess();
12244
        } else {
1731 ankur.sing 12245
          setSuccess((List<Double>)value);
1629 ankur.sing 12246
        }
12247
        break;
12248
 
12249
      }
12250
    }
12251
 
12252
    public Object getFieldValue(_Fields field) {
12253
      switch (field) {
12254
      case SUCCESS:
1731 ankur.sing 12255
        return getSuccess();
1629 ankur.sing 12256
 
12257
      }
12258
      throw new IllegalStateException();
12259
    }
12260
 
3430 rajveer 12261
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12262
    public boolean isSet(_Fields field) {
12263
      if (field == null) {
12264
        throw new IllegalArgumentException();
12265
      }
1629 ankur.sing 12266
 
12267
      switch (field) {
12268
      case SUCCESS:
12269
        return isSetSuccess();
12270
      }
12271
      throw new IllegalStateException();
12272
    }
12273
 
12274
    @Override
12275
    public boolean equals(Object that) {
12276
      if (that == null)
12277
        return false;
1731 ankur.sing 12278
      if (that instanceof getSuccessfulPaymentsAmountRange_result)
12279
        return this.equals((getSuccessfulPaymentsAmountRange_result)that);
1629 ankur.sing 12280
      return false;
12281
    }
12282
 
1731 ankur.sing 12283
    public boolean equals(getSuccessfulPaymentsAmountRange_result that) {
1629 ankur.sing 12284
      if (that == null)
12285
        return false;
12286
 
1731 ankur.sing 12287
      boolean this_present_success = true && this.isSetSuccess();
12288
      boolean that_present_success = true && that.isSetSuccess();
1629 ankur.sing 12289
      if (this_present_success || that_present_success) {
12290
        if (!(this_present_success && that_present_success))
12291
          return false;
1731 ankur.sing 12292
        if (!this.success.equals(that.success))
1629 ankur.sing 12293
          return false;
12294
      }
12295
 
12296
      return true;
12297
    }
12298
 
12299
    @Override
12300
    public int hashCode() {
12301
      return 0;
12302
    }
12303
 
1731 ankur.sing 12304
    public int compareTo(getSuccessfulPaymentsAmountRange_result other) {
1629 ankur.sing 12305
      if (!getClass().equals(other.getClass())) {
12306
        return getClass().getName().compareTo(other.getClass().getName());
12307
      }
12308
 
12309
      int lastComparison = 0;
1731 ankur.sing 12310
      getSuccessfulPaymentsAmountRange_result typedOther = (getSuccessfulPaymentsAmountRange_result)other;
1629 ankur.sing 12311
 
3430 rajveer 12312
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
1629 ankur.sing 12313
      if (lastComparison != 0) {
12314
        return lastComparison;
12315
      }
3430 rajveer 12316
      if (isSetSuccess()) {
12317
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12318
        if (lastComparison != 0) {
12319
          return lastComparison;
12320
        }
1629 ankur.sing 12321
      }
12322
      return 0;
12323
    }
12324
 
3430 rajveer 12325
    public _Fields fieldForId(int fieldId) {
12326
      return _Fields.findByThriftId(fieldId);
12327
    }
12328
 
12329
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12330
      org.apache.thrift.protocol.TField field;
1629 ankur.sing 12331
      iprot.readStructBegin();
12332
      while (true)
12333
      {
12334
        field = iprot.readFieldBegin();
3430 rajveer 12335
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
1629 ankur.sing 12336
          break;
12337
        }
3430 rajveer 12338
        switch (field.id) {
12339
          case 0: // SUCCESS
12340
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
12341
              {
7049 anupam.sin 12342
                org.apache.thrift.protocol.TList _list40 = iprot.readListBegin();
12343
                this.success = new ArrayList<Double>(_list40.size);
12344
                for (int _i41 = 0; _i41 < _list40.size; ++_i41)
1731 ankur.sing 12345
                {
7049 anupam.sin 12346
                  double _elem42; // required
12347
                  _elem42 = iprot.readDouble();
12348
                  this.success.add(_elem42);
1731 ankur.sing 12349
                }
3430 rajveer 12350
                iprot.readListEnd();
1629 ankur.sing 12351
              }
3430 rajveer 12352
            } else { 
12353
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12354
            }
12355
            break;
12356
          default:
12357
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
1629 ankur.sing 12358
        }
3430 rajveer 12359
        iprot.readFieldEnd();
1629 ankur.sing 12360
      }
12361
      iprot.readStructEnd();
12362
      validate();
12363
    }
12364
 
3430 rajveer 12365
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
1629 ankur.sing 12366
      oprot.writeStructBegin(STRUCT_DESC);
12367
 
12368
      if (this.isSetSuccess()) {
12369
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1731 ankur.sing 12370
        {
3430 rajveer 12371
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, this.success.size()));
7049 anupam.sin 12372
          for (double _iter43 : this.success)
1731 ankur.sing 12373
          {
7049 anupam.sin 12374
            oprot.writeDouble(_iter43);
1731 ankur.sing 12375
          }
12376
          oprot.writeListEnd();
12377
        }
1629 ankur.sing 12378
        oprot.writeFieldEnd();
12379
      }
12380
      oprot.writeFieldStop();
12381
      oprot.writeStructEnd();
12382
    }
12383
 
12384
    @Override
12385
    public String toString() {
1731 ankur.sing 12386
      StringBuilder sb = new StringBuilder("getSuccessfulPaymentsAmountRange_result(");
1629 ankur.sing 12387
      boolean first = true;
12388
 
12389
      sb.append("success:");
1731 ankur.sing 12390
      if (this.success == null) {
12391
        sb.append("null");
12392
      } else {
12393
        sb.append(this.success);
12394
      }
1629 ankur.sing 12395
      first = false;
12396
      sb.append(")");
12397
      return sb.toString();
12398
    }
12399
 
3430 rajveer 12400
    public void validate() throws org.apache.thrift.TException {
1629 ankur.sing 12401
      // check for required fields
12402
    }
12403
 
3430 rajveer 12404
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12405
      try {
12406
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12407
      } catch (org.apache.thrift.TException te) {
12408
        throw new java.io.IOException(te);
12409
      }
12410
    }
12411
 
12412
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12413
      try {
12414
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12415
      } catch (org.apache.thrift.TException te) {
12416
        throw new java.io.IOException(te);
12417
      }
12418
    }
12419
 
1629 ankur.sing 12420
  }
12421
 
3430 rajveer 12422
  public static class initializeHdfcPayment_args implements org.apache.thrift.TBase<initializeHdfcPayment_args, initializeHdfcPayment_args._Fields>, java.io.Serializable, Cloneable   {
12423
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeHdfcPayment_args");
2462 chandransh 12424
 
3430 rajveer 12425
    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 12426
 
3430 rajveer 12427
    private long merchantPaymentId; // required
2462 chandransh 12428
 
12429
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 12430
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2462 chandransh 12431
      MERCHANT_PAYMENT_ID((short)1, "merchantPaymentId");
12432
 
12433
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12434
 
12435
      static {
12436
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12437
          byName.put(field.getFieldName(), field);
12438
        }
12439
      }
12440
 
12441
      /**
12442
       * Find the _Fields constant that matches fieldId, or null if its not found.
12443
       */
12444
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 12445
        switch(fieldId) {
12446
          case 1: // MERCHANT_PAYMENT_ID
12447
            return MERCHANT_PAYMENT_ID;
12448
          default:
12449
            return null;
12450
        }
2462 chandransh 12451
      }
12452
 
12453
      /**
12454
       * Find the _Fields constant that matches fieldId, throwing an exception
12455
       * if it is not found.
12456
       */
12457
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12458
        _Fields fields = findByThriftId(fieldId);
12459
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12460
        return fields;
12461
      }
12462
 
12463
      /**
12464
       * Find the _Fields constant that matches name, or null if its not found.
12465
       */
12466
      public static _Fields findByName(String name) {
12467
        return byName.get(name);
12468
      }
12469
 
12470
      private final short _thriftId;
12471
      private final String _fieldName;
12472
 
12473
      _Fields(short thriftId, String fieldName) {
12474
        _thriftId = thriftId;
12475
        _fieldName = fieldName;
12476
      }
12477
 
12478
      public short getThriftFieldId() {
12479
        return _thriftId;
12480
      }
12481
 
12482
      public String getFieldName() {
12483
        return _fieldName;
12484
      }
12485
    }
12486
 
12487
    // isset id assignments
12488
    private static final int __MERCHANTPAYMENTID_ISSET_ID = 0;
12489
    private BitSet __isset_bit_vector = new BitSet(1);
12490
 
3430 rajveer 12491
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2462 chandransh 12492
    static {
3430 rajveer 12493
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12494
      tmpMap.put(_Fields.MERCHANT_PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantPaymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12495
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
12496
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12497
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeHdfcPayment_args.class, metaDataMap);
2462 chandransh 12498
    }
12499
 
3010 chandransh 12500
    public initializeHdfcPayment_args() {
2462 chandransh 12501
    }
12502
 
3010 chandransh 12503
    public initializeHdfcPayment_args(
2462 chandransh 12504
      long merchantPaymentId)
12505
    {
12506
      this();
12507
      this.merchantPaymentId = merchantPaymentId;
12508
      setMerchantPaymentIdIsSet(true);
12509
    }
12510
 
12511
    /**
12512
     * Performs a deep copy on <i>other</i>.
12513
     */
3010 chandransh 12514
    public initializeHdfcPayment_args(initializeHdfcPayment_args other) {
2462 chandransh 12515
      __isset_bit_vector.clear();
12516
      __isset_bit_vector.or(other.__isset_bit_vector);
12517
      this.merchantPaymentId = other.merchantPaymentId;
12518
    }
12519
 
3010 chandransh 12520
    public initializeHdfcPayment_args deepCopy() {
12521
      return new initializeHdfcPayment_args(this);
2462 chandransh 12522
    }
12523
 
3430 rajveer 12524
    @Override
12525
    public void clear() {
12526
      setMerchantPaymentIdIsSet(false);
12527
      this.merchantPaymentId = 0;
2462 chandransh 12528
    }
12529
 
12530
    public long getMerchantPaymentId() {
12531
      return this.merchantPaymentId;
12532
    }
12533
 
3430 rajveer 12534
    public void setMerchantPaymentId(long merchantPaymentId) {
2462 chandransh 12535
      this.merchantPaymentId = merchantPaymentId;
12536
      setMerchantPaymentIdIsSet(true);
12537
    }
12538
 
12539
    public void unsetMerchantPaymentId() {
12540
      __isset_bit_vector.clear(__MERCHANTPAYMENTID_ISSET_ID);
12541
    }
12542
 
3430 rajveer 12543
    /** Returns true if field merchantPaymentId is set (has been assigned a value) and false otherwise */
2462 chandransh 12544
    public boolean isSetMerchantPaymentId() {
12545
      return __isset_bit_vector.get(__MERCHANTPAYMENTID_ISSET_ID);
12546
    }
12547
 
12548
    public void setMerchantPaymentIdIsSet(boolean value) {
12549
      __isset_bit_vector.set(__MERCHANTPAYMENTID_ISSET_ID, value);
12550
    }
12551
 
12552
    public void setFieldValue(_Fields field, Object value) {
12553
      switch (field) {
12554
      case MERCHANT_PAYMENT_ID:
12555
        if (value == null) {
12556
          unsetMerchantPaymentId();
12557
        } else {
12558
          setMerchantPaymentId((Long)value);
12559
        }
12560
        break;
12561
 
12562
      }
12563
    }
12564
 
12565
    public Object getFieldValue(_Fields field) {
12566
      switch (field) {
12567
      case MERCHANT_PAYMENT_ID:
3430 rajveer 12568
        return Long.valueOf(getMerchantPaymentId());
2462 chandransh 12569
 
12570
      }
12571
      throw new IllegalStateException();
12572
    }
12573
 
3430 rajveer 12574
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12575
    public boolean isSet(_Fields field) {
12576
      if (field == null) {
12577
        throw new IllegalArgumentException();
12578
      }
2462 chandransh 12579
 
12580
      switch (field) {
12581
      case MERCHANT_PAYMENT_ID:
12582
        return isSetMerchantPaymentId();
12583
      }
12584
      throw new IllegalStateException();
12585
    }
12586
 
12587
    @Override
12588
    public boolean equals(Object that) {
12589
      if (that == null)
12590
        return false;
3010 chandransh 12591
      if (that instanceof initializeHdfcPayment_args)
12592
        return this.equals((initializeHdfcPayment_args)that);
2462 chandransh 12593
      return false;
12594
    }
12595
 
3010 chandransh 12596
    public boolean equals(initializeHdfcPayment_args that) {
2462 chandransh 12597
      if (that == null)
12598
        return false;
12599
 
12600
      boolean this_present_merchantPaymentId = true;
12601
      boolean that_present_merchantPaymentId = true;
12602
      if (this_present_merchantPaymentId || that_present_merchantPaymentId) {
12603
        if (!(this_present_merchantPaymentId && that_present_merchantPaymentId))
12604
          return false;
12605
        if (this.merchantPaymentId != that.merchantPaymentId)
12606
          return false;
12607
      }
12608
 
12609
      return true;
12610
    }
12611
 
12612
    @Override
12613
    public int hashCode() {
12614
      return 0;
12615
    }
12616
 
3010 chandransh 12617
    public int compareTo(initializeHdfcPayment_args other) {
2462 chandransh 12618
      if (!getClass().equals(other.getClass())) {
12619
        return getClass().getName().compareTo(other.getClass().getName());
12620
      }
12621
 
12622
      int lastComparison = 0;
3010 chandransh 12623
      initializeHdfcPayment_args typedOther = (initializeHdfcPayment_args)other;
2462 chandransh 12624
 
3430 rajveer 12625
      lastComparison = Boolean.valueOf(isSetMerchantPaymentId()).compareTo(typedOther.isSetMerchantPaymentId());
2462 chandransh 12626
      if (lastComparison != 0) {
12627
        return lastComparison;
12628
      }
3430 rajveer 12629
      if (isSetMerchantPaymentId()) {
12630
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantPaymentId, typedOther.merchantPaymentId);
12631
        if (lastComparison != 0) {
12632
          return lastComparison;
12633
        }
2462 chandransh 12634
      }
12635
      return 0;
12636
    }
12637
 
3430 rajveer 12638
    public _Fields fieldForId(int fieldId) {
12639
      return _Fields.findByThriftId(fieldId);
12640
    }
12641
 
12642
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
12643
      org.apache.thrift.protocol.TField field;
2462 chandransh 12644
      iprot.readStructBegin();
12645
      while (true)
12646
      {
12647
        field = iprot.readFieldBegin();
3430 rajveer 12648
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2462 chandransh 12649
          break;
12650
        }
3430 rajveer 12651
        switch (field.id) {
12652
          case 1: // MERCHANT_PAYMENT_ID
12653
            if (field.type == org.apache.thrift.protocol.TType.I64) {
12654
              this.merchantPaymentId = iprot.readI64();
12655
              setMerchantPaymentIdIsSet(true);
12656
            } else { 
12657
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
12658
            }
12659
            break;
12660
          default:
12661
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2462 chandransh 12662
        }
3430 rajveer 12663
        iprot.readFieldEnd();
2462 chandransh 12664
      }
12665
      iprot.readStructEnd();
12666
      validate();
12667
    }
12668
 
3430 rajveer 12669
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2462 chandransh 12670
      validate();
12671
 
12672
      oprot.writeStructBegin(STRUCT_DESC);
12673
      oprot.writeFieldBegin(MERCHANT_PAYMENT_ID_FIELD_DESC);
12674
      oprot.writeI64(this.merchantPaymentId);
12675
      oprot.writeFieldEnd();
12676
      oprot.writeFieldStop();
12677
      oprot.writeStructEnd();
12678
    }
12679
 
12680
    @Override
12681
    public String toString() {
3010 chandransh 12682
      StringBuilder sb = new StringBuilder("initializeHdfcPayment_args(");
2462 chandransh 12683
      boolean first = true;
12684
 
12685
      sb.append("merchantPaymentId:");
12686
      sb.append(this.merchantPaymentId);
12687
      first = false;
12688
      sb.append(")");
12689
      return sb.toString();
12690
    }
12691
 
3430 rajveer 12692
    public void validate() throws org.apache.thrift.TException {
2462 chandransh 12693
      // check for required fields
12694
    }
12695
 
3430 rajveer 12696
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
12697
      try {
12698
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
12699
      } catch (org.apache.thrift.TException te) {
12700
        throw new java.io.IOException(te);
12701
      }
12702
    }
12703
 
12704
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
12705
      try {
12706
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
12707
      } catch (org.apache.thrift.TException te) {
12708
        throw new java.io.IOException(te);
12709
      }
12710
    }
12711
 
2462 chandransh 12712
  }
12713
 
3430 rajveer 12714
  public static class initializeHdfcPayment_result implements org.apache.thrift.TBase<initializeHdfcPayment_result, initializeHdfcPayment_result._Fields>, java.io.Serializable, Cloneable   {
12715
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeHdfcPayment_result");
2462 chandransh 12716
 
3430 rajveer 12717
    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);
12718
    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 12719
 
3430 rajveer 12720
    private String success; // required
12721
    private PaymentException pe; // required
2462 chandransh 12722
 
12723
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 12724
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2462 chandransh 12725
      SUCCESS((short)0, "success"),
12726
      PE((short)1, "pe");
12727
 
12728
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12729
 
12730
      static {
12731
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12732
          byName.put(field.getFieldName(), field);
12733
        }
12734
      }
12735
 
12736
      /**
12737
       * Find the _Fields constant that matches fieldId, or null if its not found.
12738
       */
12739
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 12740
        switch(fieldId) {
12741
          case 0: // SUCCESS
12742
            return SUCCESS;
12743
          case 1: // PE
12744
            return PE;
12745
          default:
12746
            return null;
12747
        }
2462 chandransh 12748
      }
12749
 
12750
      /**
12751
       * Find the _Fields constant that matches fieldId, throwing an exception
12752
       * if it is not found.
12753
       */
12754
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12755
        _Fields fields = findByThriftId(fieldId);
12756
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12757
        return fields;
12758
      }
12759
 
12760
      /**
12761
       * Find the _Fields constant that matches name, or null if its not found.
12762
       */
12763
      public static _Fields findByName(String name) {
12764
        return byName.get(name);
12765
      }
12766
 
12767
      private final short _thriftId;
12768
      private final String _fieldName;
12769
 
12770
      _Fields(short thriftId, String fieldName) {
12771
        _thriftId = thriftId;
12772
        _fieldName = fieldName;
12773
      }
12774
 
12775
      public short getThriftFieldId() {
12776
        return _thriftId;
12777
      }
12778
 
12779
      public String getFieldName() {
12780
        return _fieldName;
12781
      }
12782
    }
12783
 
12784
    // isset id assignments
12785
 
3430 rajveer 12786
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2462 chandransh 12787
    static {
3430 rajveer 12788
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
12789
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12790
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
12791
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
12792
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
12793
      metaDataMap = Collections.unmodifiableMap(tmpMap);
12794
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeHdfcPayment_result.class, metaDataMap);
2462 chandransh 12795
    }
12796
 
3010 chandransh 12797
    public initializeHdfcPayment_result() {
2462 chandransh 12798
    }
12799
 
3010 chandransh 12800
    public initializeHdfcPayment_result(
12801
      String success,
2462 chandransh 12802
      PaymentException pe)
12803
    {
12804
      this();
12805
      this.success = success;
12806
      this.pe = pe;
12807
    }
12808
 
12809
    /**
12810
     * Performs a deep copy on <i>other</i>.
12811
     */
3010 chandransh 12812
    public initializeHdfcPayment_result(initializeHdfcPayment_result other) {
2462 chandransh 12813
      if (other.isSetSuccess()) {
3010 chandransh 12814
        this.success = other.success;
2462 chandransh 12815
      }
12816
      if (other.isSetPe()) {
12817
        this.pe = new PaymentException(other.pe);
12818
      }
12819
    }
12820
 
3010 chandransh 12821
    public initializeHdfcPayment_result deepCopy() {
12822
      return new initializeHdfcPayment_result(this);
2462 chandransh 12823
    }
12824
 
3430 rajveer 12825
    @Override
12826
    public void clear() {
12827
      this.success = null;
12828
      this.pe = null;
2462 chandransh 12829
    }
12830
 
3010 chandransh 12831
    public String getSuccess() {
2462 chandransh 12832
      return this.success;
12833
    }
12834
 
3430 rajveer 12835
    public void setSuccess(String success) {
2462 chandransh 12836
      this.success = success;
12837
    }
12838
 
12839
    public void unsetSuccess() {
12840
      this.success = null;
12841
    }
12842
 
3430 rajveer 12843
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2462 chandransh 12844
    public boolean isSetSuccess() {
12845
      return this.success != null;
12846
    }
12847
 
12848
    public void setSuccessIsSet(boolean value) {
12849
      if (!value) {
12850
        this.success = null;
12851
      }
12852
    }
12853
 
12854
    public PaymentException getPe() {
12855
      return this.pe;
12856
    }
12857
 
3430 rajveer 12858
    public void setPe(PaymentException pe) {
2462 chandransh 12859
      this.pe = pe;
12860
    }
12861
 
12862
    public void unsetPe() {
12863
      this.pe = null;
12864
    }
12865
 
3430 rajveer 12866
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
2462 chandransh 12867
    public boolean isSetPe() {
12868
      return this.pe != null;
12869
    }
12870
 
12871
    public void setPeIsSet(boolean value) {
12872
      if (!value) {
12873
        this.pe = null;
12874
      }
12875
    }
12876
 
12877
    public void setFieldValue(_Fields field, Object value) {
12878
      switch (field) {
12879
      case SUCCESS:
12880
        if (value == null) {
12881
          unsetSuccess();
12882
        } else {
3010 chandransh 12883
          setSuccess((String)value);
2462 chandransh 12884
        }
12885
        break;
12886
 
12887
      case PE:
12888
        if (value == null) {
12889
          unsetPe();
12890
        } else {
12891
          setPe((PaymentException)value);
12892
        }
12893
        break;
12894
 
12895
      }
12896
    }
12897
 
12898
    public Object getFieldValue(_Fields field) {
12899
      switch (field) {
12900
      case SUCCESS:
12901
        return getSuccess();
12902
 
12903
      case PE:
12904
        return getPe();
12905
 
12906
      }
12907
      throw new IllegalStateException();
12908
    }
12909
 
3430 rajveer 12910
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
12911
    public boolean isSet(_Fields field) {
12912
      if (field == null) {
12913
        throw new IllegalArgumentException();
12914
      }
2462 chandransh 12915
 
12916
      switch (field) {
12917
      case SUCCESS:
12918
        return isSetSuccess();
12919
      case PE:
12920
        return isSetPe();
12921
      }
12922
      throw new IllegalStateException();
12923
    }
12924
 
12925
    @Override
12926
    public boolean equals(Object that) {
12927
      if (that == null)
12928
        return false;
3010 chandransh 12929
      if (that instanceof initializeHdfcPayment_result)
12930
        return this.equals((initializeHdfcPayment_result)that);
2462 chandransh 12931
      return false;
12932
    }
12933
 
3010 chandransh 12934
    public boolean equals(initializeHdfcPayment_result that) {
2462 chandransh 12935
      if (that == null)
12936
        return false;
12937
 
12938
      boolean this_present_success = true && this.isSetSuccess();
12939
      boolean that_present_success = true && that.isSetSuccess();
12940
      if (this_present_success || that_present_success) {
12941
        if (!(this_present_success && that_present_success))
12942
          return false;
12943
        if (!this.success.equals(that.success))
12944
          return false;
12945
      }
12946
 
12947
      boolean this_present_pe = true && this.isSetPe();
12948
      boolean that_present_pe = true && that.isSetPe();
12949
      if (this_present_pe || that_present_pe) {
12950
        if (!(this_present_pe && that_present_pe))
12951
          return false;
12952
        if (!this.pe.equals(that.pe))
12953
          return false;
12954
      }
12955
 
12956
      return true;
12957
    }
12958
 
12959
    @Override
12960
    public int hashCode() {
12961
      return 0;
12962
    }
12963
 
3010 chandransh 12964
    public int compareTo(initializeHdfcPayment_result other) {
12965
      if (!getClass().equals(other.getClass())) {
12966
        return getClass().getName().compareTo(other.getClass().getName());
12967
      }
12968
 
12969
      int lastComparison = 0;
12970
      initializeHdfcPayment_result typedOther = (initializeHdfcPayment_result)other;
12971
 
3430 rajveer 12972
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
3010 chandransh 12973
      if (lastComparison != 0) {
12974
        return lastComparison;
12975
      }
3430 rajveer 12976
      if (isSetSuccess()) {
12977
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
12978
        if (lastComparison != 0) {
12979
          return lastComparison;
12980
        }
3010 chandransh 12981
      }
3430 rajveer 12982
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
3010 chandransh 12983
      if (lastComparison != 0) {
12984
        return lastComparison;
12985
      }
3430 rajveer 12986
      if (isSetPe()) {
12987
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
12988
        if (lastComparison != 0) {
12989
          return lastComparison;
12990
        }
3010 chandransh 12991
      }
12992
      return 0;
12993
    }
12994
 
3430 rajveer 12995
    public _Fields fieldForId(int fieldId) {
12996
      return _Fields.findByThriftId(fieldId);
12997
    }
12998
 
12999
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13000
      org.apache.thrift.protocol.TField field;
2462 chandransh 13001
      iprot.readStructBegin();
13002
      while (true)
13003
      {
13004
        field = iprot.readFieldBegin();
3430 rajveer 13005
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2462 chandransh 13006
          break;
13007
        }
3430 rajveer 13008
        switch (field.id) {
13009
          case 0: // SUCCESS
13010
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
13011
              this.success = iprot.readString();
13012
            } else { 
13013
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13014
            }
13015
            break;
13016
          case 1: // PE
13017
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13018
              this.pe = new PaymentException();
13019
              this.pe.read(iprot);
13020
            } else { 
13021
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13022
            }
13023
            break;
13024
          default:
13025
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2462 chandransh 13026
        }
3430 rajveer 13027
        iprot.readFieldEnd();
2462 chandransh 13028
      }
13029
      iprot.readStructEnd();
13030
      validate();
13031
    }
13032
 
3430 rajveer 13033
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2462 chandransh 13034
      oprot.writeStructBegin(STRUCT_DESC);
13035
 
13036
      if (this.isSetSuccess()) {
13037
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3010 chandransh 13038
        oprot.writeString(this.success);
2462 chandransh 13039
        oprot.writeFieldEnd();
13040
      } else if (this.isSetPe()) {
13041
        oprot.writeFieldBegin(PE_FIELD_DESC);
13042
        this.pe.write(oprot);
13043
        oprot.writeFieldEnd();
13044
      }
13045
      oprot.writeFieldStop();
13046
      oprot.writeStructEnd();
13047
    }
13048
 
13049
    @Override
13050
    public String toString() {
3010 chandransh 13051
      StringBuilder sb = new StringBuilder("initializeHdfcPayment_result(");
2462 chandransh 13052
      boolean first = true;
13053
 
13054
      sb.append("success:");
13055
      if (this.success == null) {
13056
        sb.append("null");
13057
      } else {
13058
        sb.append(this.success);
13059
      }
13060
      first = false;
13061
      if (!first) sb.append(", ");
13062
      sb.append("pe:");
13063
      if (this.pe == null) {
13064
        sb.append("null");
13065
      } else {
13066
        sb.append(this.pe);
13067
      }
13068
      first = false;
13069
      sb.append(")");
13070
      return sb.toString();
13071
    }
13072
 
3430 rajveer 13073
    public void validate() throws org.apache.thrift.TException {
2462 chandransh 13074
      // check for required fields
13075
    }
13076
 
3430 rajveer 13077
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13078
      try {
13079
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13080
      } catch (org.apache.thrift.TException te) {
13081
        throw new java.io.IOException(te);
13082
      }
13083
    }
13084
 
13085
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13086
      try {
13087
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13088
      } catch (org.apache.thrift.TException te) {
13089
        throw new java.io.IOException(te);
13090
      }
13091
    }
13092
 
2462 chandransh 13093
  }
13094
 
6050 anupam.sin 13095
  public static class doHdfcPaymentForDigitalOrder_args implements org.apache.thrift.TBase<doHdfcPaymentForDigitalOrder_args, doHdfcPaymentForDigitalOrder_args._Fields>, java.io.Serializable, Cloneable   {
13096
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("doHdfcPaymentForDigitalOrder_args");
13097
 
13098
    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);
13099
    private static final org.apache.thrift.protocol.TField RECHARGE_ORDER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("rechargeOrderId", org.apache.thrift.protocol.TType.I64, (short)2);
6228 anupam.sin 13100
    private static final org.apache.thrift.protocol.TField PHONE_FIELD_DESC = new org.apache.thrift.protocol.TField("phone", org.apache.thrift.protocol.TType.STRING, (short)-1);
6050 anupam.sin 13101
 
13102
    private long merchantPaymentId; // required
13103
    private long rechargeOrderId; // required
6228 anupam.sin 13104
    private String phone; // required
6050 anupam.sin 13105
 
13106
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13107
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13108
      MERCHANT_PAYMENT_ID((short)1, "merchantPaymentId"),
6228 anupam.sin 13109
      RECHARGE_ORDER_ID((short)2, "rechargeOrderId"),
13110
      PHONE((short)-1, "phone");
6050 anupam.sin 13111
 
13112
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13113
 
13114
      static {
13115
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13116
          byName.put(field.getFieldName(), field);
13117
        }
13118
      }
13119
 
13120
      /**
13121
       * Find the _Fields constant that matches fieldId, or null if its not found.
13122
       */
13123
      public static _Fields findByThriftId(int fieldId) {
13124
        switch(fieldId) {
13125
          case 1: // MERCHANT_PAYMENT_ID
13126
            return MERCHANT_PAYMENT_ID;
13127
          case 2: // RECHARGE_ORDER_ID
13128
            return RECHARGE_ORDER_ID;
6228 anupam.sin 13129
          case -1: // PHONE
13130
            return PHONE;
6050 anupam.sin 13131
          default:
13132
            return null;
13133
        }
13134
      }
13135
 
13136
      /**
13137
       * Find the _Fields constant that matches fieldId, throwing an exception
13138
       * if it is not found.
13139
       */
13140
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13141
        _Fields fields = findByThriftId(fieldId);
13142
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13143
        return fields;
13144
      }
13145
 
13146
      /**
13147
       * Find the _Fields constant that matches name, or null if its not found.
13148
       */
13149
      public static _Fields findByName(String name) {
13150
        return byName.get(name);
13151
      }
13152
 
13153
      private final short _thriftId;
13154
      private final String _fieldName;
13155
 
13156
      _Fields(short thriftId, String fieldName) {
13157
        _thriftId = thriftId;
13158
        _fieldName = fieldName;
13159
      }
13160
 
13161
      public short getThriftFieldId() {
13162
        return _thriftId;
13163
      }
13164
 
13165
      public String getFieldName() {
13166
        return _fieldName;
13167
      }
13168
    }
13169
 
13170
    // isset id assignments
13171
    private static final int __MERCHANTPAYMENTID_ISSET_ID = 0;
13172
    private static final int __RECHARGEORDERID_ISSET_ID = 1;
13173
    private BitSet __isset_bit_vector = new BitSet(2);
13174
 
13175
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13176
    static {
13177
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13178
      tmpMap.put(_Fields.MERCHANT_PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantPaymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13179
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
13180
      tmpMap.put(_Fields.RECHARGE_ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("rechargeOrderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13181
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
6228 anupam.sin 13182
      tmpMap.put(_Fields.PHONE, new org.apache.thrift.meta_data.FieldMetaData("phone", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13183
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
6050 anupam.sin 13184
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13185
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(doHdfcPaymentForDigitalOrder_args.class, metaDataMap);
13186
    }
13187
 
13188
    public doHdfcPaymentForDigitalOrder_args() {
13189
    }
13190
 
13191
    public doHdfcPaymentForDigitalOrder_args(
13192
      long merchantPaymentId,
6228 anupam.sin 13193
      long rechargeOrderId,
13194
      String phone)
6050 anupam.sin 13195
    {
13196
      this();
13197
      this.merchantPaymentId = merchantPaymentId;
13198
      setMerchantPaymentIdIsSet(true);
13199
      this.rechargeOrderId = rechargeOrderId;
13200
      setRechargeOrderIdIsSet(true);
6228 anupam.sin 13201
      this.phone = phone;
6050 anupam.sin 13202
    }
13203
 
13204
    /**
13205
     * Performs a deep copy on <i>other</i>.
13206
     */
13207
    public doHdfcPaymentForDigitalOrder_args(doHdfcPaymentForDigitalOrder_args other) {
13208
      __isset_bit_vector.clear();
13209
      __isset_bit_vector.or(other.__isset_bit_vector);
13210
      this.merchantPaymentId = other.merchantPaymentId;
13211
      this.rechargeOrderId = other.rechargeOrderId;
6228 anupam.sin 13212
      if (other.isSetPhone()) {
13213
        this.phone = other.phone;
13214
      }
6050 anupam.sin 13215
    }
13216
 
13217
    public doHdfcPaymentForDigitalOrder_args deepCopy() {
13218
      return new doHdfcPaymentForDigitalOrder_args(this);
13219
    }
13220
 
13221
    @Override
13222
    public void clear() {
13223
      setMerchantPaymentIdIsSet(false);
13224
      this.merchantPaymentId = 0;
13225
      setRechargeOrderIdIsSet(false);
13226
      this.rechargeOrderId = 0;
6228 anupam.sin 13227
      this.phone = null;
6050 anupam.sin 13228
    }
13229
 
13230
    public long getMerchantPaymentId() {
13231
      return this.merchantPaymentId;
13232
    }
13233
 
13234
    public void setMerchantPaymentId(long merchantPaymentId) {
13235
      this.merchantPaymentId = merchantPaymentId;
13236
      setMerchantPaymentIdIsSet(true);
13237
    }
13238
 
13239
    public void unsetMerchantPaymentId() {
13240
      __isset_bit_vector.clear(__MERCHANTPAYMENTID_ISSET_ID);
13241
    }
13242
 
13243
    /** Returns true if field merchantPaymentId is set (has been assigned a value) and false otherwise */
13244
    public boolean isSetMerchantPaymentId() {
13245
      return __isset_bit_vector.get(__MERCHANTPAYMENTID_ISSET_ID);
13246
    }
13247
 
13248
    public void setMerchantPaymentIdIsSet(boolean value) {
13249
      __isset_bit_vector.set(__MERCHANTPAYMENTID_ISSET_ID, value);
13250
    }
13251
 
13252
    public long getRechargeOrderId() {
13253
      return this.rechargeOrderId;
13254
    }
13255
 
13256
    public void setRechargeOrderId(long rechargeOrderId) {
13257
      this.rechargeOrderId = rechargeOrderId;
13258
      setRechargeOrderIdIsSet(true);
13259
    }
13260
 
13261
    public void unsetRechargeOrderId() {
13262
      __isset_bit_vector.clear(__RECHARGEORDERID_ISSET_ID);
13263
    }
13264
 
13265
    /** Returns true if field rechargeOrderId is set (has been assigned a value) and false otherwise */
13266
    public boolean isSetRechargeOrderId() {
13267
      return __isset_bit_vector.get(__RECHARGEORDERID_ISSET_ID);
13268
    }
13269
 
13270
    public void setRechargeOrderIdIsSet(boolean value) {
13271
      __isset_bit_vector.set(__RECHARGEORDERID_ISSET_ID, value);
13272
    }
13273
 
6228 anupam.sin 13274
    public String getPhone() {
13275
      return this.phone;
13276
    }
13277
 
13278
    public void setPhone(String phone) {
13279
      this.phone = phone;
13280
    }
13281
 
13282
    public void unsetPhone() {
13283
      this.phone = null;
13284
    }
13285
 
13286
    /** Returns true if field phone is set (has been assigned a value) and false otherwise */
13287
    public boolean isSetPhone() {
13288
      return this.phone != null;
13289
    }
13290
 
13291
    public void setPhoneIsSet(boolean value) {
13292
      if (!value) {
13293
        this.phone = null;
13294
      }
13295
    }
13296
 
6050 anupam.sin 13297
    public void setFieldValue(_Fields field, Object value) {
13298
      switch (field) {
13299
      case MERCHANT_PAYMENT_ID:
13300
        if (value == null) {
13301
          unsetMerchantPaymentId();
13302
        } else {
13303
          setMerchantPaymentId((Long)value);
13304
        }
13305
        break;
13306
 
13307
      case RECHARGE_ORDER_ID:
13308
        if (value == null) {
13309
          unsetRechargeOrderId();
13310
        } else {
13311
          setRechargeOrderId((Long)value);
13312
        }
13313
        break;
13314
 
6228 anupam.sin 13315
      case PHONE:
13316
        if (value == null) {
13317
          unsetPhone();
13318
        } else {
13319
          setPhone((String)value);
13320
        }
13321
        break;
13322
 
6050 anupam.sin 13323
      }
13324
    }
13325
 
13326
    public Object getFieldValue(_Fields field) {
13327
      switch (field) {
13328
      case MERCHANT_PAYMENT_ID:
13329
        return Long.valueOf(getMerchantPaymentId());
13330
 
13331
      case RECHARGE_ORDER_ID:
13332
        return Long.valueOf(getRechargeOrderId());
13333
 
6228 anupam.sin 13334
      case PHONE:
13335
        return getPhone();
13336
 
6050 anupam.sin 13337
      }
13338
      throw new IllegalStateException();
13339
    }
13340
 
13341
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13342
    public boolean isSet(_Fields field) {
13343
      if (field == null) {
13344
        throw new IllegalArgumentException();
13345
      }
13346
 
13347
      switch (field) {
13348
      case MERCHANT_PAYMENT_ID:
13349
        return isSetMerchantPaymentId();
13350
      case RECHARGE_ORDER_ID:
13351
        return isSetRechargeOrderId();
6228 anupam.sin 13352
      case PHONE:
13353
        return isSetPhone();
6050 anupam.sin 13354
      }
13355
      throw new IllegalStateException();
13356
    }
13357
 
13358
    @Override
13359
    public boolean equals(Object that) {
13360
      if (that == null)
13361
        return false;
13362
      if (that instanceof doHdfcPaymentForDigitalOrder_args)
13363
        return this.equals((doHdfcPaymentForDigitalOrder_args)that);
13364
      return false;
13365
    }
13366
 
13367
    public boolean equals(doHdfcPaymentForDigitalOrder_args that) {
13368
      if (that == null)
13369
        return false;
13370
 
13371
      boolean this_present_merchantPaymentId = true;
13372
      boolean that_present_merchantPaymentId = true;
13373
      if (this_present_merchantPaymentId || that_present_merchantPaymentId) {
13374
        if (!(this_present_merchantPaymentId && that_present_merchantPaymentId))
13375
          return false;
13376
        if (this.merchantPaymentId != that.merchantPaymentId)
13377
          return false;
13378
      }
13379
 
13380
      boolean this_present_rechargeOrderId = true;
13381
      boolean that_present_rechargeOrderId = true;
13382
      if (this_present_rechargeOrderId || that_present_rechargeOrderId) {
13383
        if (!(this_present_rechargeOrderId && that_present_rechargeOrderId))
13384
          return false;
13385
        if (this.rechargeOrderId != that.rechargeOrderId)
13386
          return false;
13387
      }
13388
 
6228 anupam.sin 13389
      boolean this_present_phone = true && this.isSetPhone();
13390
      boolean that_present_phone = true && that.isSetPhone();
13391
      if (this_present_phone || that_present_phone) {
13392
        if (!(this_present_phone && that_present_phone))
13393
          return false;
13394
        if (!this.phone.equals(that.phone))
13395
          return false;
13396
      }
13397
 
6050 anupam.sin 13398
      return true;
13399
    }
13400
 
13401
    @Override
13402
    public int hashCode() {
13403
      return 0;
13404
    }
13405
 
13406
    public int compareTo(doHdfcPaymentForDigitalOrder_args other) {
13407
      if (!getClass().equals(other.getClass())) {
13408
        return getClass().getName().compareTo(other.getClass().getName());
13409
      }
13410
 
13411
      int lastComparison = 0;
13412
      doHdfcPaymentForDigitalOrder_args typedOther = (doHdfcPaymentForDigitalOrder_args)other;
13413
 
13414
      lastComparison = Boolean.valueOf(isSetMerchantPaymentId()).compareTo(typedOther.isSetMerchantPaymentId());
13415
      if (lastComparison != 0) {
13416
        return lastComparison;
13417
      }
13418
      if (isSetMerchantPaymentId()) {
13419
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantPaymentId, typedOther.merchantPaymentId);
13420
        if (lastComparison != 0) {
13421
          return lastComparison;
13422
        }
13423
      }
13424
      lastComparison = Boolean.valueOf(isSetRechargeOrderId()).compareTo(typedOther.isSetRechargeOrderId());
13425
      if (lastComparison != 0) {
13426
        return lastComparison;
13427
      }
13428
      if (isSetRechargeOrderId()) {
13429
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.rechargeOrderId, typedOther.rechargeOrderId);
13430
        if (lastComparison != 0) {
13431
          return lastComparison;
13432
        }
13433
      }
6228 anupam.sin 13434
      lastComparison = Boolean.valueOf(isSetPhone()).compareTo(typedOther.isSetPhone());
13435
      if (lastComparison != 0) {
13436
        return lastComparison;
13437
      }
13438
      if (isSetPhone()) {
13439
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.phone, typedOther.phone);
13440
        if (lastComparison != 0) {
13441
          return lastComparison;
13442
        }
13443
      }
6050 anupam.sin 13444
      return 0;
13445
    }
13446
 
13447
    public _Fields fieldForId(int fieldId) {
13448
      return _Fields.findByThriftId(fieldId);
13449
    }
13450
 
13451
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13452
      org.apache.thrift.protocol.TField field;
13453
      iprot.readStructBegin();
13454
      while (true)
13455
      {
13456
        field = iprot.readFieldBegin();
13457
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13458
          break;
13459
        }
13460
        switch (field.id) {
13461
          case 1: // MERCHANT_PAYMENT_ID
13462
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13463
              this.merchantPaymentId = iprot.readI64();
13464
              setMerchantPaymentIdIsSet(true);
13465
            } else { 
13466
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13467
            }
13468
            break;
13469
          case 2: // RECHARGE_ORDER_ID
13470
            if (field.type == org.apache.thrift.protocol.TType.I64) {
13471
              this.rechargeOrderId = iprot.readI64();
13472
              setRechargeOrderIdIsSet(true);
13473
            } else { 
13474
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13475
            }
13476
            break;
6228 anupam.sin 13477
          case -1: // PHONE
13478
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
13479
              this.phone = iprot.readString();
13480
            } else { 
13481
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13482
            }
13483
            break;
6050 anupam.sin 13484
          default:
13485
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13486
        }
13487
        iprot.readFieldEnd();
13488
      }
13489
      iprot.readStructEnd();
13490
      validate();
13491
    }
13492
 
13493
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13494
      validate();
13495
 
13496
      oprot.writeStructBegin(STRUCT_DESC);
6228 anupam.sin 13497
      if (this.phone != null) {
13498
        oprot.writeFieldBegin(PHONE_FIELD_DESC);
13499
        oprot.writeString(this.phone);
13500
        oprot.writeFieldEnd();
13501
      }
6050 anupam.sin 13502
      oprot.writeFieldBegin(MERCHANT_PAYMENT_ID_FIELD_DESC);
13503
      oprot.writeI64(this.merchantPaymentId);
13504
      oprot.writeFieldEnd();
13505
      oprot.writeFieldBegin(RECHARGE_ORDER_ID_FIELD_DESC);
13506
      oprot.writeI64(this.rechargeOrderId);
13507
      oprot.writeFieldEnd();
13508
      oprot.writeFieldStop();
13509
      oprot.writeStructEnd();
13510
    }
13511
 
13512
    @Override
13513
    public String toString() {
13514
      StringBuilder sb = new StringBuilder("doHdfcPaymentForDigitalOrder_args(");
13515
      boolean first = true;
13516
 
13517
      sb.append("merchantPaymentId:");
13518
      sb.append(this.merchantPaymentId);
13519
      first = false;
13520
      if (!first) sb.append(", ");
13521
      sb.append("rechargeOrderId:");
13522
      sb.append(this.rechargeOrderId);
13523
      first = false;
6228 anupam.sin 13524
      if (!first) sb.append(", ");
13525
      sb.append("phone:");
13526
      if (this.phone == null) {
13527
        sb.append("null");
13528
      } else {
13529
        sb.append(this.phone);
13530
      }
13531
      first = false;
6050 anupam.sin 13532
      sb.append(")");
13533
      return sb.toString();
13534
    }
13535
 
13536
    public void validate() throws org.apache.thrift.TException {
13537
      // check for required fields
13538
    }
13539
 
13540
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13541
      try {
13542
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13543
      } catch (org.apache.thrift.TException te) {
13544
        throw new java.io.IOException(te);
13545
      }
13546
    }
13547
 
13548
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13549
      try {
13550
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13551
      } catch (org.apache.thrift.TException te) {
13552
        throw new java.io.IOException(te);
13553
      }
13554
    }
13555
 
13556
  }
13557
 
13558
  public static class doHdfcPaymentForDigitalOrder_result implements org.apache.thrift.TBase<doHdfcPaymentForDigitalOrder_result, doHdfcPaymentForDigitalOrder_result._Fields>, java.io.Serializable, Cloneable   {
13559
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("doHdfcPaymentForDigitalOrder_result");
13560
 
13561
    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);
13562
    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);
13563
 
13564
    private String success; // required
13565
    private PaymentException pe; // required
13566
 
13567
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13568
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13569
      SUCCESS((short)0, "success"),
13570
      PE((short)1, "pe");
13571
 
13572
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13573
 
13574
      static {
13575
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13576
          byName.put(field.getFieldName(), field);
13577
        }
13578
      }
13579
 
13580
      /**
13581
       * Find the _Fields constant that matches fieldId, or null if its not found.
13582
       */
13583
      public static _Fields findByThriftId(int fieldId) {
13584
        switch(fieldId) {
13585
          case 0: // SUCCESS
13586
            return SUCCESS;
13587
          case 1: // PE
13588
            return PE;
13589
          default:
13590
            return null;
13591
        }
13592
      }
13593
 
13594
      /**
13595
       * Find the _Fields constant that matches fieldId, throwing an exception
13596
       * if it is not found.
13597
       */
13598
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13599
        _Fields fields = findByThriftId(fieldId);
13600
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13601
        return fields;
13602
      }
13603
 
13604
      /**
13605
       * Find the _Fields constant that matches name, or null if its not found.
13606
       */
13607
      public static _Fields findByName(String name) {
13608
        return byName.get(name);
13609
      }
13610
 
13611
      private final short _thriftId;
13612
      private final String _fieldName;
13613
 
13614
      _Fields(short thriftId, String fieldName) {
13615
        _thriftId = thriftId;
13616
        _fieldName = fieldName;
13617
      }
13618
 
13619
      public short getThriftFieldId() {
13620
        return _thriftId;
13621
      }
13622
 
13623
      public String getFieldName() {
13624
        return _fieldName;
13625
      }
13626
    }
13627
 
13628
    // isset id assignments
13629
 
13630
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
13631
    static {
13632
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
13633
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13634
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
13635
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
13636
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
13637
      metaDataMap = Collections.unmodifiableMap(tmpMap);
13638
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(doHdfcPaymentForDigitalOrder_result.class, metaDataMap);
13639
    }
13640
 
13641
    public doHdfcPaymentForDigitalOrder_result() {
13642
    }
13643
 
13644
    public doHdfcPaymentForDigitalOrder_result(
13645
      String success,
13646
      PaymentException pe)
13647
    {
13648
      this();
13649
      this.success = success;
13650
      this.pe = pe;
13651
    }
13652
 
13653
    /**
13654
     * Performs a deep copy on <i>other</i>.
13655
     */
13656
    public doHdfcPaymentForDigitalOrder_result(doHdfcPaymentForDigitalOrder_result other) {
13657
      if (other.isSetSuccess()) {
13658
        this.success = other.success;
13659
      }
13660
      if (other.isSetPe()) {
13661
        this.pe = new PaymentException(other.pe);
13662
      }
13663
    }
13664
 
13665
    public doHdfcPaymentForDigitalOrder_result deepCopy() {
13666
      return new doHdfcPaymentForDigitalOrder_result(this);
13667
    }
13668
 
13669
    @Override
13670
    public void clear() {
13671
      this.success = null;
13672
      this.pe = null;
13673
    }
13674
 
13675
    public String getSuccess() {
13676
      return this.success;
13677
    }
13678
 
13679
    public void setSuccess(String success) {
13680
      this.success = success;
13681
    }
13682
 
13683
    public void unsetSuccess() {
13684
      this.success = null;
13685
    }
13686
 
13687
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
13688
    public boolean isSetSuccess() {
13689
      return this.success != null;
13690
    }
13691
 
13692
    public void setSuccessIsSet(boolean value) {
13693
      if (!value) {
13694
        this.success = null;
13695
      }
13696
    }
13697
 
13698
    public PaymentException getPe() {
13699
      return this.pe;
13700
    }
13701
 
13702
    public void setPe(PaymentException pe) {
13703
      this.pe = pe;
13704
    }
13705
 
13706
    public void unsetPe() {
13707
      this.pe = null;
13708
    }
13709
 
13710
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
13711
    public boolean isSetPe() {
13712
      return this.pe != null;
13713
    }
13714
 
13715
    public void setPeIsSet(boolean value) {
13716
      if (!value) {
13717
        this.pe = null;
13718
      }
13719
    }
13720
 
13721
    public void setFieldValue(_Fields field, Object value) {
13722
      switch (field) {
13723
      case SUCCESS:
13724
        if (value == null) {
13725
          unsetSuccess();
13726
        } else {
13727
          setSuccess((String)value);
13728
        }
13729
        break;
13730
 
13731
      case PE:
13732
        if (value == null) {
13733
          unsetPe();
13734
        } else {
13735
          setPe((PaymentException)value);
13736
        }
13737
        break;
13738
 
13739
      }
13740
    }
13741
 
13742
    public Object getFieldValue(_Fields field) {
13743
      switch (field) {
13744
      case SUCCESS:
13745
        return getSuccess();
13746
 
13747
      case PE:
13748
        return getPe();
13749
 
13750
      }
13751
      throw new IllegalStateException();
13752
    }
13753
 
13754
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
13755
    public boolean isSet(_Fields field) {
13756
      if (field == null) {
13757
        throw new IllegalArgumentException();
13758
      }
13759
 
13760
      switch (field) {
13761
      case SUCCESS:
13762
        return isSetSuccess();
13763
      case PE:
13764
        return isSetPe();
13765
      }
13766
      throw new IllegalStateException();
13767
    }
13768
 
13769
    @Override
13770
    public boolean equals(Object that) {
13771
      if (that == null)
13772
        return false;
13773
      if (that instanceof doHdfcPaymentForDigitalOrder_result)
13774
        return this.equals((doHdfcPaymentForDigitalOrder_result)that);
13775
      return false;
13776
    }
13777
 
13778
    public boolean equals(doHdfcPaymentForDigitalOrder_result that) {
13779
      if (that == null)
13780
        return false;
13781
 
13782
      boolean this_present_success = true && this.isSetSuccess();
13783
      boolean that_present_success = true && that.isSetSuccess();
13784
      if (this_present_success || that_present_success) {
13785
        if (!(this_present_success && that_present_success))
13786
          return false;
13787
        if (!this.success.equals(that.success))
13788
          return false;
13789
      }
13790
 
13791
      boolean this_present_pe = true && this.isSetPe();
13792
      boolean that_present_pe = true && that.isSetPe();
13793
      if (this_present_pe || that_present_pe) {
13794
        if (!(this_present_pe && that_present_pe))
13795
          return false;
13796
        if (!this.pe.equals(that.pe))
13797
          return false;
13798
      }
13799
 
13800
      return true;
13801
    }
13802
 
13803
    @Override
13804
    public int hashCode() {
13805
      return 0;
13806
    }
13807
 
13808
    public int compareTo(doHdfcPaymentForDigitalOrder_result other) {
13809
      if (!getClass().equals(other.getClass())) {
13810
        return getClass().getName().compareTo(other.getClass().getName());
13811
      }
13812
 
13813
      int lastComparison = 0;
13814
      doHdfcPaymentForDigitalOrder_result typedOther = (doHdfcPaymentForDigitalOrder_result)other;
13815
 
13816
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
13817
      if (lastComparison != 0) {
13818
        return lastComparison;
13819
      }
13820
      if (isSetSuccess()) {
13821
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
13822
        if (lastComparison != 0) {
13823
          return lastComparison;
13824
        }
13825
      }
13826
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
13827
      if (lastComparison != 0) {
13828
        return lastComparison;
13829
      }
13830
      if (isSetPe()) {
13831
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
13832
        if (lastComparison != 0) {
13833
          return lastComparison;
13834
        }
13835
      }
13836
      return 0;
13837
    }
13838
 
13839
    public _Fields fieldForId(int fieldId) {
13840
      return _Fields.findByThriftId(fieldId);
13841
    }
13842
 
13843
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
13844
      org.apache.thrift.protocol.TField field;
13845
      iprot.readStructBegin();
13846
      while (true)
13847
      {
13848
        field = iprot.readFieldBegin();
13849
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
13850
          break;
13851
        }
13852
        switch (field.id) {
13853
          case 0: // SUCCESS
13854
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
13855
              this.success = iprot.readString();
13856
            } else { 
13857
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13858
            }
13859
            break;
13860
          case 1: // PE
13861
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
13862
              this.pe = new PaymentException();
13863
              this.pe.read(iprot);
13864
            } else { 
13865
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13866
            }
13867
            break;
13868
          default:
13869
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
13870
        }
13871
        iprot.readFieldEnd();
13872
      }
13873
      iprot.readStructEnd();
13874
      validate();
13875
    }
13876
 
13877
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
13878
      oprot.writeStructBegin(STRUCT_DESC);
13879
 
13880
      if (this.isSetSuccess()) {
13881
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13882
        oprot.writeString(this.success);
13883
        oprot.writeFieldEnd();
13884
      } else if (this.isSetPe()) {
13885
        oprot.writeFieldBegin(PE_FIELD_DESC);
13886
        this.pe.write(oprot);
13887
        oprot.writeFieldEnd();
13888
      }
13889
      oprot.writeFieldStop();
13890
      oprot.writeStructEnd();
13891
    }
13892
 
13893
    @Override
13894
    public String toString() {
13895
      StringBuilder sb = new StringBuilder("doHdfcPaymentForDigitalOrder_result(");
13896
      boolean first = true;
13897
 
13898
      sb.append("success:");
13899
      if (this.success == null) {
13900
        sb.append("null");
13901
      } else {
13902
        sb.append(this.success);
13903
      }
13904
      first = false;
13905
      if (!first) sb.append(", ");
13906
      sb.append("pe:");
13907
      if (this.pe == null) {
13908
        sb.append("null");
13909
      } else {
13910
        sb.append(this.pe);
13911
      }
13912
      first = false;
13913
      sb.append(")");
13914
      return sb.toString();
13915
    }
13916
 
13917
    public void validate() throws org.apache.thrift.TException {
13918
      // check for required fields
13919
    }
13920
 
13921
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
13922
      try {
13923
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
13924
      } catch (org.apache.thrift.TException te) {
13925
        throw new java.io.IOException(te);
13926
      }
13927
    }
13928
 
13929
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
13930
      try {
13931
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
13932
      } catch (org.apache.thrift.TException te) {
13933
        throw new java.io.IOException(te);
13934
      }
13935
    }
13936
 
13937
  }
13938
 
3616 chandransh 13939
  public static class initializeHdfcEmiPayment_args implements org.apache.thrift.TBase<initializeHdfcEmiPayment_args, initializeHdfcEmiPayment_args._Fields>, java.io.Serializable, Cloneable   {
13940
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeHdfcEmiPayment_args");
13941
 
13942
    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);
13943
 
13944
    private long merchantPaymentId; // required
13945
 
13946
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13947
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
13948
      MERCHANT_PAYMENT_ID((short)1, "merchantPaymentId");
13949
 
13950
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13951
 
13952
      static {
13953
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13954
          byName.put(field.getFieldName(), field);
13955
        }
13956
      }
13957
 
13958
      /**
13959
       * Find the _Fields constant that matches fieldId, or null if its not found.
13960
       */
13961
      public static _Fields findByThriftId(int fieldId) {
13962
        switch(fieldId) {
13963
          case 1: // MERCHANT_PAYMENT_ID
13964
            return MERCHANT_PAYMENT_ID;
13965
          default:
13966
            return null;
13967
        }
13968
      }
13969
 
13970
      /**
13971
       * Find the _Fields constant that matches fieldId, throwing an exception
13972
       * if it is not found.
13973
       */
13974
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13975
        _Fields fields = findByThriftId(fieldId);
13976
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13977
        return fields;
13978
      }
13979
 
13980
      /**
13981
       * Find the _Fields constant that matches name, or null if its not found.
13982
       */
13983
      public static _Fields findByName(String name) {
13984
        return byName.get(name);
13985
      }
13986
 
13987
      private final short _thriftId;
13988
      private final String _fieldName;
13989
 
13990
      _Fields(short thriftId, String fieldName) {
13991
        _thriftId = thriftId;
13992
        _fieldName = fieldName;
13993
      }
13994
 
13995
      public short getThriftFieldId() {
13996
        return _thriftId;
13997
      }
13998
 
13999
      public String getFieldName() {
14000
        return _fieldName;
14001
      }
14002
    }
14003
 
14004
    // isset id assignments
14005
    private static final int __MERCHANTPAYMENTID_ISSET_ID = 0;
14006
    private BitSet __isset_bit_vector = new BitSet(1);
14007
 
14008
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14009
    static {
14010
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14011
      tmpMap.put(_Fields.MERCHANT_PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantPaymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14012
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14013
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14014
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeHdfcEmiPayment_args.class, metaDataMap);
14015
    }
14016
 
14017
    public initializeHdfcEmiPayment_args() {
14018
    }
14019
 
14020
    public initializeHdfcEmiPayment_args(
14021
      long merchantPaymentId)
14022
    {
14023
      this();
14024
      this.merchantPaymentId = merchantPaymentId;
14025
      setMerchantPaymentIdIsSet(true);
14026
    }
14027
 
14028
    /**
14029
     * Performs a deep copy on <i>other</i>.
14030
     */
14031
    public initializeHdfcEmiPayment_args(initializeHdfcEmiPayment_args other) {
14032
      __isset_bit_vector.clear();
14033
      __isset_bit_vector.or(other.__isset_bit_vector);
14034
      this.merchantPaymentId = other.merchantPaymentId;
14035
    }
14036
 
14037
    public initializeHdfcEmiPayment_args deepCopy() {
14038
      return new initializeHdfcEmiPayment_args(this);
14039
    }
14040
 
14041
    @Override
14042
    public void clear() {
14043
      setMerchantPaymentIdIsSet(false);
14044
      this.merchantPaymentId = 0;
14045
    }
14046
 
14047
    public long getMerchantPaymentId() {
14048
      return this.merchantPaymentId;
14049
    }
14050
 
14051
    public void setMerchantPaymentId(long merchantPaymentId) {
14052
      this.merchantPaymentId = merchantPaymentId;
14053
      setMerchantPaymentIdIsSet(true);
14054
    }
14055
 
14056
    public void unsetMerchantPaymentId() {
14057
      __isset_bit_vector.clear(__MERCHANTPAYMENTID_ISSET_ID);
14058
    }
14059
 
14060
    /** Returns true if field merchantPaymentId is set (has been assigned a value) and false otherwise */
14061
    public boolean isSetMerchantPaymentId() {
14062
      return __isset_bit_vector.get(__MERCHANTPAYMENTID_ISSET_ID);
14063
    }
14064
 
14065
    public void setMerchantPaymentIdIsSet(boolean value) {
14066
      __isset_bit_vector.set(__MERCHANTPAYMENTID_ISSET_ID, value);
14067
    }
14068
 
14069
    public void setFieldValue(_Fields field, Object value) {
14070
      switch (field) {
14071
      case MERCHANT_PAYMENT_ID:
14072
        if (value == null) {
14073
          unsetMerchantPaymentId();
14074
        } else {
14075
          setMerchantPaymentId((Long)value);
14076
        }
14077
        break;
14078
 
14079
      }
14080
    }
14081
 
14082
    public Object getFieldValue(_Fields field) {
14083
      switch (field) {
14084
      case MERCHANT_PAYMENT_ID:
14085
        return Long.valueOf(getMerchantPaymentId());
14086
 
14087
      }
14088
      throw new IllegalStateException();
14089
    }
14090
 
14091
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14092
    public boolean isSet(_Fields field) {
14093
      if (field == null) {
14094
        throw new IllegalArgumentException();
14095
      }
14096
 
14097
      switch (field) {
14098
      case MERCHANT_PAYMENT_ID:
14099
        return isSetMerchantPaymentId();
14100
      }
14101
      throw new IllegalStateException();
14102
    }
14103
 
14104
    @Override
14105
    public boolean equals(Object that) {
14106
      if (that == null)
14107
        return false;
14108
      if (that instanceof initializeHdfcEmiPayment_args)
14109
        return this.equals((initializeHdfcEmiPayment_args)that);
14110
      return false;
14111
    }
14112
 
14113
    public boolean equals(initializeHdfcEmiPayment_args that) {
14114
      if (that == null)
14115
        return false;
14116
 
14117
      boolean this_present_merchantPaymentId = true;
14118
      boolean that_present_merchantPaymentId = true;
14119
      if (this_present_merchantPaymentId || that_present_merchantPaymentId) {
14120
        if (!(this_present_merchantPaymentId && that_present_merchantPaymentId))
14121
          return false;
14122
        if (this.merchantPaymentId != that.merchantPaymentId)
14123
          return false;
14124
      }
14125
 
14126
      return true;
14127
    }
14128
 
14129
    @Override
14130
    public int hashCode() {
14131
      return 0;
14132
    }
14133
 
14134
    public int compareTo(initializeHdfcEmiPayment_args other) {
14135
      if (!getClass().equals(other.getClass())) {
14136
        return getClass().getName().compareTo(other.getClass().getName());
14137
      }
14138
 
14139
      int lastComparison = 0;
14140
      initializeHdfcEmiPayment_args typedOther = (initializeHdfcEmiPayment_args)other;
14141
 
14142
      lastComparison = Boolean.valueOf(isSetMerchantPaymentId()).compareTo(typedOther.isSetMerchantPaymentId());
14143
      if (lastComparison != 0) {
14144
        return lastComparison;
14145
      }
14146
      if (isSetMerchantPaymentId()) {
14147
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantPaymentId, typedOther.merchantPaymentId);
14148
        if (lastComparison != 0) {
14149
          return lastComparison;
14150
        }
14151
      }
14152
      return 0;
14153
    }
14154
 
14155
    public _Fields fieldForId(int fieldId) {
14156
      return _Fields.findByThriftId(fieldId);
14157
    }
14158
 
14159
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14160
      org.apache.thrift.protocol.TField field;
14161
      iprot.readStructBegin();
14162
      while (true)
14163
      {
14164
        field = iprot.readFieldBegin();
14165
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14166
          break;
14167
        }
14168
        switch (field.id) {
14169
          case 1: // MERCHANT_PAYMENT_ID
14170
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14171
              this.merchantPaymentId = iprot.readI64();
14172
              setMerchantPaymentIdIsSet(true);
14173
            } else { 
14174
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14175
            }
14176
            break;
14177
          default:
14178
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14179
        }
14180
        iprot.readFieldEnd();
14181
      }
14182
      iprot.readStructEnd();
14183
      validate();
14184
    }
14185
 
14186
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14187
      validate();
14188
 
14189
      oprot.writeStructBegin(STRUCT_DESC);
14190
      oprot.writeFieldBegin(MERCHANT_PAYMENT_ID_FIELD_DESC);
14191
      oprot.writeI64(this.merchantPaymentId);
14192
      oprot.writeFieldEnd();
14193
      oprot.writeFieldStop();
14194
      oprot.writeStructEnd();
14195
    }
14196
 
14197
    @Override
14198
    public String toString() {
14199
      StringBuilder sb = new StringBuilder("initializeHdfcEmiPayment_args(");
14200
      boolean first = true;
14201
 
14202
      sb.append("merchantPaymentId:");
14203
      sb.append(this.merchantPaymentId);
14204
      first = false;
14205
      sb.append(")");
14206
      return sb.toString();
14207
    }
14208
 
14209
    public void validate() throws org.apache.thrift.TException {
14210
      // check for required fields
14211
    }
14212
 
14213
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14214
      try {
14215
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14216
      } catch (org.apache.thrift.TException te) {
14217
        throw new java.io.IOException(te);
14218
      }
14219
    }
14220
 
14221
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14222
      try {
14223
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14224
      } catch (org.apache.thrift.TException te) {
14225
        throw new java.io.IOException(te);
14226
      }
14227
    }
14228
 
14229
  }
14230
 
14231
  public static class initializeHdfcEmiPayment_result implements org.apache.thrift.TBase<initializeHdfcEmiPayment_result, initializeHdfcEmiPayment_result._Fields>, java.io.Serializable, Cloneable   {
14232
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("initializeHdfcEmiPayment_result");
14233
 
14234
    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);
14235
    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);
14236
 
14237
    private String success; // required
14238
    private PaymentException pe; // required
14239
 
14240
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14241
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
14242
      SUCCESS((short)0, "success"),
14243
      PE((short)1, "pe");
14244
 
14245
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14246
 
14247
      static {
14248
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14249
          byName.put(field.getFieldName(), field);
14250
        }
14251
      }
14252
 
14253
      /**
14254
       * Find the _Fields constant that matches fieldId, or null if its not found.
14255
       */
14256
      public static _Fields findByThriftId(int fieldId) {
14257
        switch(fieldId) {
14258
          case 0: // SUCCESS
14259
            return SUCCESS;
14260
          case 1: // PE
14261
            return PE;
14262
          default:
14263
            return null;
14264
        }
14265
      }
14266
 
14267
      /**
14268
       * Find the _Fields constant that matches fieldId, throwing an exception
14269
       * if it is not found.
14270
       */
14271
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14272
        _Fields fields = findByThriftId(fieldId);
14273
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14274
        return fields;
14275
      }
14276
 
14277
      /**
14278
       * Find the _Fields constant that matches name, or null if its not found.
14279
       */
14280
      public static _Fields findByName(String name) {
14281
        return byName.get(name);
14282
      }
14283
 
14284
      private final short _thriftId;
14285
      private final String _fieldName;
14286
 
14287
      _Fields(short thriftId, String fieldName) {
14288
        _thriftId = thriftId;
14289
        _fieldName = fieldName;
14290
      }
14291
 
14292
      public short getThriftFieldId() {
14293
        return _thriftId;
14294
      }
14295
 
14296
      public String getFieldName() {
14297
        return _fieldName;
14298
      }
14299
    }
14300
 
14301
    // isset id assignments
14302
 
14303
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
14304
    static {
14305
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14306
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14307
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
14308
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14309
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
14310
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14311
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(initializeHdfcEmiPayment_result.class, metaDataMap);
14312
    }
14313
 
14314
    public initializeHdfcEmiPayment_result() {
14315
    }
14316
 
14317
    public initializeHdfcEmiPayment_result(
14318
      String success,
14319
      PaymentException pe)
14320
    {
14321
      this();
14322
      this.success = success;
14323
      this.pe = pe;
14324
    }
14325
 
14326
    /**
14327
     * Performs a deep copy on <i>other</i>.
14328
     */
14329
    public initializeHdfcEmiPayment_result(initializeHdfcEmiPayment_result other) {
14330
      if (other.isSetSuccess()) {
14331
        this.success = other.success;
14332
      }
14333
      if (other.isSetPe()) {
14334
        this.pe = new PaymentException(other.pe);
14335
      }
14336
    }
14337
 
14338
    public initializeHdfcEmiPayment_result deepCopy() {
14339
      return new initializeHdfcEmiPayment_result(this);
14340
    }
14341
 
14342
    @Override
14343
    public void clear() {
14344
      this.success = null;
14345
      this.pe = null;
14346
    }
14347
 
14348
    public String getSuccess() {
14349
      return this.success;
14350
    }
14351
 
14352
    public void setSuccess(String success) {
14353
      this.success = success;
14354
    }
14355
 
14356
    public void unsetSuccess() {
14357
      this.success = null;
14358
    }
14359
 
14360
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
14361
    public boolean isSetSuccess() {
14362
      return this.success != null;
14363
    }
14364
 
14365
    public void setSuccessIsSet(boolean value) {
14366
      if (!value) {
14367
        this.success = null;
14368
      }
14369
    }
14370
 
14371
    public PaymentException getPe() {
14372
      return this.pe;
14373
    }
14374
 
14375
    public void setPe(PaymentException pe) {
14376
      this.pe = pe;
14377
    }
14378
 
14379
    public void unsetPe() {
14380
      this.pe = null;
14381
    }
14382
 
14383
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
14384
    public boolean isSetPe() {
14385
      return this.pe != null;
14386
    }
14387
 
14388
    public void setPeIsSet(boolean value) {
14389
      if (!value) {
14390
        this.pe = null;
14391
      }
14392
    }
14393
 
14394
    public void setFieldValue(_Fields field, Object value) {
14395
      switch (field) {
14396
      case SUCCESS:
14397
        if (value == null) {
14398
          unsetSuccess();
14399
        } else {
14400
          setSuccess((String)value);
14401
        }
14402
        break;
14403
 
14404
      case PE:
14405
        if (value == null) {
14406
          unsetPe();
14407
        } else {
14408
          setPe((PaymentException)value);
14409
        }
14410
        break;
14411
 
14412
      }
14413
    }
14414
 
14415
    public Object getFieldValue(_Fields field) {
14416
      switch (field) {
14417
      case SUCCESS:
14418
        return getSuccess();
14419
 
14420
      case PE:
14421
        return getPe();
14422
 
14423
      }
14424
      throw new IllegalStateException();
14425
    }
14426
 
14427
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14428
    public boolean isSet(_Fields field) {
14429
      if (field == null) {
14430
        throw new IllegalArgumentException();
14431
      }
14432
 
14433
      switch (field) {
14434
      case SUCCESS:
14435
        return isSetSuccess();
14436
      case PE:
14437
        return isSetPe();
14438
      }
14439
      throw new IllegalStateException();
14440
    }
14441
 
14442
    @Override
14443
    public boolean equals(Object that) {
14444
      if (that == null)
14445
        return false;
14446
      if (that instanceof initializeHdfcEmiPayment_result)
14447
        return this.equals((initializeHdfcEmiPayment_result)that);
14448
      return false;
14449
    }
14450
 
14451
    public boolean equals(initializeHdfcEmiPayment_result that) {
14452
      if (that == null)
14453
        return false;
14454
 
14455
      boolean this_present_success = true && this.isSetSuccess();
14456
      boolean that_present_success = true && that.isSetSuccess();
14457
      if (this_present_success || that_present_success) {
14458
        if (!(this_present_success && that_present_success))
14459
          return false;
14460
        if (!this.success.equals(that.success))
14461
          return false;
14462
      }
14463
 
14464
      boolean this_present_pe = true && this.isSetPe();
14465
      boolean that_present_pe = true && that.isSetPe();
14466
      if (this_present_pe || that_present_pe) {
14467
        if (!(this_present_pe && that_present_pe))
14468
          return false;
14469
        if (!this.pe.equals(that.pe))
14470
          return false;
14471
      }
14472
 
14473
      return true;
14474
    }
14475
 
14476
    @Override
14477
    public int hashCode() {
14478
      return 0;
14479
    }
14480
 
14481
    public int compareTo(initializeHdfcEmiPayment_result other) {
14482
      if (!getClass().equals(other.getClass())) {
14483
        return getClass().getName().compareTo(other.getClass().getName());
14484
      }
14485
 
14486
      int lastComparison = 0;
14487
      initializeHdfcEmiPayment_result typedOther = (initializeHdfcEmiPayment_result)other;
14488
 
14489
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
14490
      if (lastComparison != 0) {
14491
        return lastComparison;
14492
      }
14493
      if (isSetSuccess()) {
14494
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
14495
        if (lastComparison != 0) {
14496
          return lastComparison;
14497
        }
14498
      }
14499
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
14500
      if (lastComparison != 0) {
14501
        return lastComparison;
14502
      }
14503
      if (isSetPe()) {
14504
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
14505
        if (lastComparison != 0) {
14506
          return lastComparison;
14507
        }
14508
      }
14509
      return 0;
14510
    }
14511
 
14512
    public _Fields fieldForId(int fieldId) {
14513
      return _Fields.findByThriftId(fieldId);
14514
    }
14515
 
14516
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14517
      org.apache.thrift.protocol.TField field;
14518
      iprot.readStructBegin();
14519
      while (true)
14520
      {
14521
        field = iprot.readFieldBegin();
14522
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
14523
          break;
14524
        }
14525
        switch (field.id) {
14526
          case 0: // SUCCESS
14527
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
14528
              this.success = iprot.readString();
14529
            } else { 
14530
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14531
            }
14532
            break;
14533
          case 1: // PE
14534
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
14535
              this.pe = new PaymentException();
14536
              this.pe.read(iprot);
14537
            } else { 
14538
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14539
            }
14540
            break;
14541
          default:
14542
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14543
        }
14544
        iprot.readFieldEnd();
14545
      }
14546
      iprot.readStructEnd();
14547
      validate();
14548
    }
14549
 
14550
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
14551
      oprot.writeStructBegin(STRUCT_DESC);
14552
 
14553
      if (this.isSetSuccess()) {
14554
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14555
        oprot.writeString(this.success);
14556
        oprot.writeFieldEnd();
14557
      } else if (this.isSetPe()) {
14558
        oprot.writeFieldBegin(PE_FIELD_DESC);
14559
        this.pe.write(oprot);
14560
        oprot.writeFieldEnd();
14561
      }
14562
      oprot.writeFieldStop();
14563
      oprot.writeStructEnd();
14564
    }
14565
 
14566
    @Override
14567
    public String toString() {
14568
      StringBuilder sb = new StringBuilder("initializeHdfcEmiPayment_result(");
14569
      boolean first = true;
14570
 
14571
      sb.append("success:");
14572
      if (this.success == null) {
14573
        sb.append("null");
14574
      } else {
14575
        sb.append(this.success);
14576
      }
14577
      first = false;
14578
      if (!first) sb.append(", ");
14579
      sb.append("pe:");
14580
      if (this.pe == null) {
14581
        sb.append("null");
14582
      } else {
14583
        sb.append(this.pe);
14584
      }
14585
      first = false;
14586
      sb.append(")");
14587
      return sb.toString();
14588
    }
14589
 
14590
    public void validate() throws org.apache.thrift.TException {
14591
      // check for required fields
14592
    }
14593
 
14594
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
14595
      try {
14596
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
14597
      } catch (org.apache.thrift.TException te) {
14598
        throw new java.io.IOException(te);
14599
      }
14600
    }
14601
 
14602
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
14603
      try {
14604
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
14605
      } catch (org.apache.thrift.TException te) {
14606
        throw new java.io.IOException(te);
14607
      }
14608
    }
14609
 
14610
  }
14611
 
3430 rajveer 14612
  public static class createRefund_args implements org.apache.thrift.TBase<createRefund_args, createRefund_args._Fields>, java.io.Serializable, Cloneable   {
14613
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createRefund_args");
2462 chandransh 14614
 
3430 rajveer 14615
    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);
14616
    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);
14617
    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 14618
 
3430 rajveer 14619
    private long orderId; // required
14620
    private long merchantTxnId; // required
14621
    private double amount; // required
2462 chandransh 14622
 
14623
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 14624
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
3010 chandransh 14625
      ORDER_ID((short)1, "orderId"),
14626
      MERCHANT_TXN_ID((short)2, "merchantTxnId"),
14627
      AMOUNT((short)3, "amount");
2462 chandransh 14628
 
14629
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14630
 
14631
      static {
14632
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14633
          byName.put(field.getFieldName(), field);
14634
        }
14635
      }
14636
 
14637
      /**
14638
       * Find the _Fields constant that matches fieldId, or null if its not found.
14639
       */
14640
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 14641
        switch(fieldId) {
14642
          case 1: // ORDER_ID
14643
            return ORDER_ID;
14644
          case 2: // MERCHANT_TXN_ID
14645
            return MERCHANT_TXN_ID;
14646
          case 3: // AMOUNT
14647
            return AMOUNT;
14648
          default:
14649
            return null;
14650
        }
2462 chandransh 14651
      }
14652
 
14653
      /**
14654
       * Find the _Fields constant that matches fieldId, throwing an exception
14655
       * if it is not found.
14656
       */
14657
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14658
        _Fields fields = findByThriftId(fieldId);
14659
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14660
        return fields;
14661
      }
14662
 
14663
      /**
14664
       * Find the _Fields constant that matches name, or null if its not found.
14665
       */
14666
      public static _Fields findByName(String name) {
14667
        return byName.get(name);
14668
      }
14669
 
14670
      private final short _thriftId;
14671
      private final String _fieldName;
14672
 
14673
      _Fields(short thriftId, String fieldName) {
14674
        _thriftId = thriftId;
14675
        _fieldName = fieldName;
14676
      }
14677
 
14678
      public short getThriftFieldId() {
14679
        return _thriftId;
14680
      }
14681
 
14682
      public String getFieldName() {
14683
        return _fieldName;
14684
      }
14685
    }
14686
 
14687
    // isset id assignments
3010 chandransh 14688
    private static final int __ORDERID_ISSET_ID = 0;
14689
    private static final int __MERCHANTTXNID_ISSET_ID = 1;
14690
    private static final int __AMOUNT_ISSET_ID = 2;
14691
    private BitSet __isset_bit_vector = new BitSet(3);
2462 chandransh 14692
 
3430 rajveer 14693
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2462 chandransh 14694
    static {
3430 rajveer 14695
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
14696
      tmpMap.put(_Fields.ORDER_ID, new org.apache.thrift.meta_data.FieldMetaData("orderId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14697
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14698
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14699
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
14700
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
14701
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
14702
      metaDataMap = Collections.unmodifiableMap(tmpMap);
14703
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createRefund_args.class, metaDataMap);
2462 chandransh 14704
    }
14705
 
3010 chandransh 14706
    public createRefund_args() {
2462 chandransh 14707
    }
14708
 
3010 chandransh 14709
    public createRefund_args(
14710
      long orderId,
14711
      long merchantTxnId,
14712
      double amount)
2462 chandransh 14713
    {
14714
      this();
3010 chandransh 14715
      this.orderId = orderId;
14716
      setOrderIdIsSet(true);
14717
      this.merchantTxnId = merchantTxnId;
14718
      setMerchantTxnIdIsSet(true);
14719
      this.amount = amount;
14720
      setAmountIsSet(true);
2462 chandransh 14721
    }
14722
 
14723
    /**
14724
     * Performs a deep copy on <i>other</i>.
14725
     */
3010 chandransh 14726
    public createRefund_args(createRefund_args other) {
2462 chandransh 14727
      __isset_bit_vector.clear();
14728
      __isset_bit_vector.or(other.__isset_bit_vector);
3010 chandransh 14729
      this.orderId = other.orderId;
14730
      this.merchantTxnId = other.merchantTxnId;
14731
      this.amount = other.amount;
2462 chandransh 14732
    }
14733
 
3010 chandransh 14734
    public createRefund_args deepCopy() {
14735
      return new createRefund_args(this);
2462 chandransh 14736
    }
14737
 
3430 rajveer 14738
    @Override
14739
    public void clear() {
14740
      setOrderIdIsSet(false);
14741
      this.orderId = 0;
14742
      setMerchantTxnIdIsSet(false);
14743
      this.merchantTxnId = 0;
14744
      setAmountIsSet(false);
14745
      this.amount = 0.0;
2462 chandransh 14746
    }
14747
 
3010 chandransh 14748
    public long getOrderId() {
14749
      return this.orderId;
2462 chandransh 14750
    }
14751
 
3430 rajveer 14752
    public void setOrderId(long orderId) {
3010 chandransh 14753
      this.orderId = orderId;
14754
      setOrderIdIsSet(true);
2462 chandransh 14755
    }
14756
 
3010 chandransh 14757
    public void unsetOrderId() {
14758
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
2462 chandransh 14759
    }
14760
 
3430 rajveer 14761
    /** Returns true if field orderId is set (has been assigned a value) and false otherwise */
3010 chandransh 14762
    public boolean isSetOrderId() {
14763
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
2462 chandransh 14764
    }
14765
 
3010 chandransh 14766
    public void setOrderIdIsSet(boolean value) {
14767
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
2462 chandransh 14768
    }
14769
 
3010 chandransh 14770
    public long getMerchantTxnId() {
14771
      return this.merchantTxnId;
14772
    }
14773
 
3430 rajveer 14774
    public void setMerchantTxnId(long merchantTxnId) {
3010 chandransh 14775
      this.merchantTxnId = merchantTxnId;
14776
      setMerchantTxnIdIsSet(true);
14777
    }
14778
 
14779
    public void unsetMerchantTxnId() {
14780
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
14781
    }
14782
 
3430 rajveer 14783
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
3010 chandransh 14784
    public boolean isSetMerchantTxnId() {
14785
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
14786
    }
14787
 
14788
    public void setMerchantTxnIdIsSet(boolean value) {
14789
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
14790
    }
14791
 
14792
    public double getAmount() {
14793
      return this.amount;
14794
    }
14795
 
3430 rajveer 14796
    public void setAmount(double amount) {
3010 chandransh 14797
      this.amount = amount;
14798
      setAmountIsSet(true);
14799
    }
14800
 
14801
    public void unsetAmount() {
14802
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
14803
    }
14804
 
3430 rajveer 14805
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
3010 chandransh 14806
    public boolean isSetAmount() {
14807
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
14808
    }
14809
 
14810
    public void setAmountIsSet(boolean value) {
14811
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
14812
    }
14813
 
2462 chandransh 14814
    public void setFieldValue(_Fields field, Object value) {
14815
      switch (field) {
3010 chandransh 14816
      case ORDER_ID:
2462 chandransh 14817
        if (value == null) {
3010 chandransh 14818
          unsetOrderId();
2462 chandransh 14819
        } else {
3010 chandransh 14820
          setOrderId((Long)value);
2462 chandransh 14821
        }
14822
        break;
14823
 
3010 chandransh 14824
      case MERCHANT_TXN_ID:
14825
        if (value == null) {
14826
          unsetMerchantTxnId();
14827
        } else {
14828
          setMerchantTxnId((Long)value);
14829
        }
14830
        break;
14831
 
14832
      case AMOUNT:
14833
        if (value == null) {
14834
          unsetAmount();
14835
        } else {
14836
          setAmount((Double)value);
14837
        }
14838
        break;
14839
 
2462 chandransh 14840
      }
14841
    }
14842
 
14843
    public Object getFieldValue(_Fields field) {
14844
      switch (field) {
3010 chandransh 14845
      case ORDER_ID:
3430 rajveer 14846
        return Long.valueOf(getOrderId());
2462 chandransh 14847
 
3010 chandransh 14848
      case MERCHANT_TXN_ID:
3430 rajveer 14849
        return Long.valueOf(getMerchantTxnId());
3010 chandransh 14850
 
14851
      case AMOUNT:
3430 rajveer 14852
        return Double.valueOf(getAmount());
3010 chandransh 14853
 
2462 chandransh 14854
      }
14855
      throw new IllegalStateException();
14856
    }
14857
 
3430 rajveer 14858
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
14859
    public boolean isSet(_Fields field) {
14860
      if (field == null) {
14861
        throw new IllegalArgumentException();
14862
      }
2462 chandransh 14863
 
14864
      switch (field) {
3010 chandransh 14865
      case ORDER_ID:
14866
        return isSetOrderId();
14867
      case MERCHANT_TXN_ID:
14868
        return isSetMerchantTxnId();
14869
      case AMOUNT:
14870
        return isSetAmount();
2462 chandransh 14871
      }
14872
      throw new IllegalStateException();
14873
    }
14874
 
14875
    @Override
14876
    public boolean equals(Object that) {
14877
      if (that == null)
14878
        return false;
3010 chandransh 14879
      if (that instanceof createRefund_args)
14880
        return this.equals((createRefund_args)that);
2462 chandransh 14881
      return false;
14882
    }
14883
 
3010 chandransh 14884
    public boolean equals(createRefund_args that) {
2462 chandransh 14885
      if (that == null)
14886
        return false;
14887
 
3010 chandransh 14888
      boolean this_present_orderId = true;
14889
      boolean that_present_orderId = true;
14890
      if (this_present_orderId || that_present_orderId) {
14891
        if (!(this_present_orderId && that_present_orderId))
2462 chandransh 14892
          return false;
3010 chandransh 14893
        if (this.orderId != that.orderId)
2462 chandransh 14894
          return false;
14895
      }
14896
 
3010 chandransh 14897
      boolean this_present_merchantTxnId = true;
14898
      boolean that_present_merchantTxnId = true;
14899
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
14900
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
14901
          return false;
14902
        if (this.merchantTxnId != that.merchantTxnId)
14903
          return false;
14904
      }
14905
 
14906
      boolean this_present_amount = true;
14907
      boolean that_present_amount = true;
14908
      if (this_present_amount || that_present_amount) {
14909
        if (!(this_present_amount && that_present_amount))
14910
          return false;
14911
        if (this.amount != that.amount)
14912
          return false;
14913
      }
14914
 
2462 chandransh 14915
      return true;
14916
    }
14917
 
14918
    @Override
14919
    public int hashCode() {
14920
      return 0;
14921
    }
14922
 
3010 chandransh 14923
    public int compareTo(createRefund_args other) {
2462 chandransh 14924
      if (!getClass().equals(other.getClass())) {
14925
        return getClass().getName().compareTo(other.getClass().getName());
14926
      }
14927
 
14928
      int lastComparison = 0;
3010 chandransh 14929
      createRefund_args typedOther = (createRefund_args)other;
2462 chandransh 14930
 
3430 rajveer 14931
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(typedOther.isSetOrderId());
2462 chandransh 14932
      if (lastComparison != 0) {
14933
        return lastComparison;
14934
      }
3430 rajveer 14935
      if (isSetOrderId()) {
14936
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderId, typedOther.orderId);
14937
        if (lastComparison != 0) {
14938
          return lastComparison;
14939
        }
2462 chandransh 14940
      }
3430 rajveer 14941
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
3010 chandransh 14942
      if (lastComparison != 0) {
14943
        return lastComparison;
14944
      }
3430 rajveer 14945
      if (isSetMerchantTxnId()) {
14946
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
14947
        if (lastComparison != 0) {
14948
          return lastComparison;
14949
        }
3010 chandransh 14950
      }
3430 rajveer 14951
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
3010 chandransh 14952
      if (lastComparison != 0) {
14953
        return lastComparison;
14954
      }
3430 rajveer 14955
      if (isSetAmount()) {
14956
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
14957
        if (lastComparison != 0) {
14958
          return lastComparison;
14959
        }
3010 chandransh 14960
      }
2462 chandransh 14961
      return 0;
14962
    }
14963
 
3430 rajveer 14964
    public _Fields fieldForId(int fieldId) {
14965
      return _Fields.findByThriftId(fieldId);
14966
    }
14967
 
14968
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
14969
      org.apache.thrift.protocol.TField field;
2462 chandransh 14970
      iprot.readStructBegin();
14971
      while (true)
14972
      {
14973
        field = iprot.readFieldBegin();
3430 rajveer 14974
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2462 chandransh 14975
          break;
14976
        }
3430 rajveer 14977
        switch (field.id) {
14978
          case 1: // ORDER_ID
14979
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14980
              this.orderId = iprot.readI64();
14981
              setOrderIdIsSet(true);
14982
            } else { 
14983
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14984
            }
14985
            break;
14986
          case 2: // MERCHANT_TXN_ID
14987
            if (field.type == org.apache.thrift.protocol.TType.I64) {
14988
              this.merchantTxnId = iprot.readI64();
14989
              setMerchantTxnIdIsSet(true);
14990
            } else { 
14991
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
14992
            }
14993
            break;
14994
          case 3: // AMOUNT
14995
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
14996
              this.amount = iprot.readDouble();
14997
              setAmountIsSet(true);
14998
            } else { 
14999
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15000
            }
15001
            break;
15002
          default:
15003
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2462 chandransh 15004
        }
3430 rajveer 15005
        iprot.readFieldEnd();
2462 chandransh 15006
      }
15007
      iprot.readStructEnd();
15008
      validate();
15009
    }
15010
 
3430 rajveer 15011
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2462 chandransh 15012
      validate();
15013
 
15014
      oprot.writeStructBegin(STRUCT_DESC);
3010 chandransh 15015
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
15016
      oprot.writeI64(this.orderId);
2462 chandransh 15017
      oprot.writeFieldEnd();
3010 chandransh 15018
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
15019
      oprot.writeI64(this.merchantTxnId);
15020
      oprot.writeFieldEnd();
15021
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
15022
      oprot.writeDouble(this.amount);
15023
      oprot.writeFieldEnd();
2462 chandransh 15024
      oprot.writeFieldStop();
15025
      oprot.writeStructEnd();
15026
    }
15027
 
15028
    @Override
15029
    public String toString() {
3010 chandransh 15030
      StringBuilder sb = new StringBuilder("createRefund_args(");
2462 chandransh 15031
      boolean first = true;
15032
 
3010 chandransh 15033
      sb.append("orderId:");
15034
      sb.append(this.orderId);
2462 chandransh 15035
      first = false;
3010 chandransh 15036
      if (!first) sb.append(", ");
15037
      sb.append("merchantTxnId:");
15038
      sb.append(this.merchantTxnId);
15039
      first = false;
15040
      if (!first) sb.append(", ");
15041
      sb.append("amount:");
15042
      sb.append(this.amount);
15043
      first = false;
2462 chandransh 15044
      sb.append(")");
15045
      return sb.toString();
15046
    }
15047
 
3430 rajveer 15048
    public void validate() throws org.apache.thrift.TException {
2462 chandransh 15049
      // check for required fields
15050
    }
15051
 
3430 rajveer 15052
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15053
      try {
15054
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15055
      } catch (org.apache.thrift.TException te) {
15056
        throw new java.io.IOException(te);
15057
      }
15058
    }
15059
 
15060
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15061
      try {
15062
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15063
      } catch (org.apache.thrift.TException te) {
15064
        throw new java.io.IOException(te);
15065
      }
15066
    }
15067
 
2462 chandransh 15068
  }
15069
 
3430 rajveer 15070
  public static class createRefund_result implements org.apache.thrift.TBase<createRefund_result, createRefund_result._Fields>, java.io.Serializable, Cloneable   {
15071
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("createRefund_result");
2462 chandransh 15072
 
3430 rajveer 15073
    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);
15074
    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 15075
 
3430 rajveer 15076
    private long success; // required
15077
    private PaymentException pe; // required
2462 chandransh 15078
 
15079
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 15080
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2462 chandransh 15081
      SUCCESS((short)0, "success"),
15082
      PE((short)1, "pe");
15083
 
15084
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15085
 
15086
      static {
15087
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15088
          byName.put(field.getFieldName(), field);
15089
        }
15090
      }
15091
 
15092
      /**
15093
       * Find the _Fields constant that matches fieldId, or null if its not found.
15094
       */
15095
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 15096
        switch(fieldId) {
15097
          case 0: // SUCCESS
15098
            return SUCCESS;
15099
          case 1: // PE
15100
            return PE;
15101
          default:
15102
            return null;
15103
        }
2462 chandransh 15104
      }
15105
 
15106
      /**
15107
       * Find the _Fields constant that matches fieldId, throwing an exception
15108
       * if it is not found.
15109
       */
15110
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15111
        _Fields fields = findByThriftId(fieldId);
15112
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15113
        return fields;
15114
      }
15115
 
15116
      /**
15117
       * Find the _Fields constant that matches name, or null if its not found.
15118
       */
15119
      public static _Fields findByName(String name) {
15120
        return byName.get(name);
15121
      }
15122
 
15123
      private final short _thriftId;
15124
      private final String _fieldName;
15125
 
15126
      _Fields(short thriftId, String fieldName) {
15127
        _thriftId = thriftId;
15128
        _fieldName = fieldName;
15129
      }
15130
 
15131
      public short getThriftFieldId() {
15132
        return _thriftId;
15133
      }
15134
 
15135
      public String getFieldName() {
15136
        return _fieldName;
15137
      }
15138
    }
15139
 
15140
    // isset id assignments
3010 chandransh 15141
    private static final int __SUCCESS_ISSET_ID = 0;
15142
    private BitSet __isset_bit_vector = new BitSet(1);
2462 chandransh 15143
 
3430 rajveer 15144
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2462 chandransh 15145
    static {
3430 rajveer 15146
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15147
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15148
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
15149
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15150
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
15151
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15152
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(createRefund_result.class, metaDataMap);
2462 chandransh 15153
    }
15154
 
3010 chandransh 15155
    public createRefund_result() {
2462 chandransh 15156
    }
15157
 
3010 chandransh 15158
    public createRefund_result(
15159
      long success,
2462 chandransh 15160
      PaymentException pe)
15161
    {
15162
      this();
15163
      this.success = success;
3010 chandransh 15164
      setSuccessIsSet(true);
2462 chandransh 15165
      this.pe = pe;
15166
    }
15167
 
15168
    /**
15169
     * Performs a deep copy on <i>other</i>.
15170
     */
3010 chandransh 15171
    public createRefund_result(createRefund_result other) {
15172
      __isset_bit_vector.clear();
15173
      __isset_bit_vector.or(other.__isset_bit_vector);
15174
      this.success = other.success;
2462 chandransh 15175
      if (other.isSetPe()) {
15176
        this.pe = new PaymentException(other.pe);
15177
      }
15178
    }
15179
 
3010 chandransh 15180
    public createRefund_result deepCopy() {
15181
      return new createRefund_result(this);
2462 chandransh 15182
    }
15183
 
3430 rajveer 15184
    @Override
15185
    public void clear() {
15186
      setSuccessIsSet(false);
15187
      this.success = 0;
15188
      this.pe = null;
2462 chandransh 15189
    }
15190
 
3010 chandransh 15191
    public long getSuccess() {
2462 chandransh 15192
      return this.success;
15193
    }
15194
 
3430 rajveer 15195
    public void setSuccess(long success) {
2462 chandransh 15196
      this.success = success;
3010 chandransh 15197
      setSuccessIsSet(true);
2462 chandransh 15198
    }
15199
 
15200
    public void unsetSuccess() {
3010 chandransh 15201
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
2462 chandransh 15202
    }
15203
 
3430 rajveer 15204
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2462 chandransh 15205
    public boolean isSetSuccess() {
3010 chandransh 15206
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
2462 chandransh 15207
    }
15208
 
15209
    public void setSuccessIsSet(boolean value) {
3010 chandransh 15210
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
2462 chandransh 15211
    }
15212
 
15213
    public PaymentException getPe() {
15214
      return this.pe;
15215
    }
15216
 
3430 rajveer 15217
    public void setPe(PaymentException pe) {
2462 chandransh 15218
      this.pe = pe;
15219
    }
15220
 
15221
    public void unsetPe() {
15222
      this.pe = null;
15223
    }
15224
 
3430 rajveer 15225
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
2462 chandransh 15226
    public boolean isSetPe() {
15227
      return this.pe != null;
15228
    }
15229
 
15230
    public void setPeIsSet(boolean value) {
15231
      if (!value) {
15232
        this.pe = null;
15233
      }
15234
    }
15235
 
15236
    public void setFieldValue(_Fields field, Object value) {
15237
      switch (field) {
15238
      case SUCCESS:
15239
        if (value == null) {
15240
          unsetSuccess();
15241
        } else {
3010 chandransh 15242
          setSuccess((Long)value);
2462 chandransh 15243
        }
15244
        break;
15245
 
15246
      case PE:
15247
        if (value == null) {
15248
          unsetPe();
15249
        } else {
15250
          setPe((PaymentException)value);
15251
        }
15252
        break;
15253
 
15254
      }
15255
    }
15256
 
15257
    public Object getFieldValue(_Fields field) {
15258
      switch (field) {
15259
      case SUCCESS:
3430 rajveer 15260
        return Long.valueOf(getSuccess());
2462 chandransh 15261
 
15262
      case PE:
15263
        return getPe();
15264
 
15265
      }
15266
      throw new IllegalStateException();
15267
    }
15268
 
3430 rajveer 15269
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15270
    public boolean isSet(_Fields field) {
15271
      if (field == null) {
15272
        throw new IllegalArgumentException();
15273
      }
2462 chandransh 15274
 
15275
      switch (field) {
15276
      case SUCCESS:
15277
        return isSetSuccess();
15278
      case PE:
15279
        return isSetPe();
15280
      }
15281
      throw new IllegalStateException();
15282
    }
15283
 
15284
    @Override
15285
    public boolean equals(Object that) {
15286
      if (that == null)
15287
        return false;
3010 chandransh 15288
      if (that instanceof createRefund_result)
15289
        return this.equals((createRefund_result)that);
2462 chandransh 15290
      return false;
15291
    }
15292
 
3010 chandransh 15293
    public boolean equals(createRefund_result that) {
2462 chandransh 15294
      if (that == null)
15295
        return false;
15296
 
3010 chandransh 15297
      boolean this_present_success = true;
15298
      boolean that_present_success = true;
2462 chandransh 15299
      if (this_present_success || that_present_success) {
15300
        if (!(this_present_success && that_present_success))
15301
          return false;
3010 chandransh 15302
        if (this.success != that.success)
2462 chandransh 15303
          return false;
15304
      }
15305
 
15306
      boolean this_present_pe = true && this.isSetPe();
15307
      boolean that_present_pe = true && that.isSetPe();
15308
      if (this_present_pe || that_present_pe) {
15309
        if (!(this_present_pe && that_present_pe))
15310
          return false;
15311
        if (!this.pe.equals(that.pe))
15312
          return false;
15313
      }
15314
 
15315
      return true;
15316
    }
15317
 
15318
    @Override
15319
    public int hashCode() {
15320
      return 0;
15321
    }
15322
 
3010 chandransh 15323
    public int compareTo(createRefund_result other) {
2462 chandransh 15324
      if (!getClass().equals(other.getClass())) {
15325
        return getClass().getName().compareTo(other.getClass().getName());
15326
      }
15327
 
15328
      int lastComparison = 0;
3010 chandransh 15329
      createRefund_result typedOther = (createRefund_result)other;
2462 chandransh 15330
 
3430 rajveer 15331
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2462 chandransh 15332
      if (lastComparison != 0) {
15333
        return lastComparison;
15334
      }
3430 rajveer 15335
      if (isSetSuccess()) {
15336
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
15337
        if (lastComparison != 0) {
15338
          return lastComparison;
15339
        }
2462 chandransh 15340
      }
3430 rajveer 15341
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
2462 chandransh 15342
      if (lastComparison != 0) {
15343
        return lastComparison;
15344
      }
3430 rajveer 15345
      if (isSetPe()) {
15346
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
15347
        if (lastComparison != 0) {
15348
          return lastComparison;
15349
        }
2462 chandransh 15350
      }
15351
      return 0;
15352
    }
15353
 
3430 rajveer 15354
    public _Fields fieldForId(int fieldId) {
15355
      return _Fields.findByThriftId(fieldId);
15356
    }
15357
 
15358
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15359
      org.apache.thrift.protocol.TField field;
2462 chandransh 15360
      iprot.readStructBegin();
15361
      while (true)
15362
      {
15363
        field = iprot.readFieldBegin();
3430 rajveer 15364
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2462 chandransh 15365
          break;
15366
        }
3430 rajveer 15367
        switch (field.id) {
15368
          case 0: // SUCCESS
15369
            if (field.type == org.apache.thrift.protocol.TType.I64) {
15370
              this.success = iprot.readI64();
15371
              setSuccessIsSet(true);
15372
            } else { 
15373
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15374
            }
15375
            break;
15376
          case 1: // PE
15377
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
15378
              this.pe = new PaymentException();
15379
              this.pe.read(iprot);
15380
            } else { 
15381
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15382
            }
15383
            break;
15384
          default:
15385
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2462 chandransh 15386
        }
3430 rajveer 15387
        iprot.readFieldEnd();
2462 chandransh 15388
      }
15389
      iprot.readStructEnd();
15390
      validate();
15391
    }
15392
 
3430 rajveer 15393
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2462 chandransh 15394
      oprot.writeStructBegin(STRUCT_DESC);
15395
 
15396
      if (this.isSetSuccess()) {
15397
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3010 chandransh 15398
        oprot.writeI64(this.success);
2462 chandransh 15399
        oprot.writeFieldEnd();
15400
      } else if (this.isSetPe()) {
15401
        oprot.writeFieldBegin(PE_FIELD_DESC);
15402
        this.pe.write(oprot);
15403
        oprot.writeFieldEnd();
15404
      }
15405
      oprot.writeFieldStop();
15406
      oprot.writeStructEnd();
15407
    }
15408
 
15409
    @Override
15410
    public String toString() {
3010 chandransh 15411
      StringBuilder sb = new StringBuilder("createRefund_result(");
2462 chandransh 15412
      boolean first = true;
15413
 
15414
      sb.append("success:");
3010 chandransh 15415
      sb.append(this.success);
2462 chandransh 15416
      first = false;
15417
      if (!first) sb.append(", ");
15418
      sb.append("pe:");
15419
      if (this.pe == null) {
15420
        sb.append("null");
15421
      } else {
15422
        sb.append(this.pe);
15423
      }
15424
      first = false;
15425
      sb.append(")");
15426
      return sb.toString();
15427
    }
15428
 
3430 rajveer 15429
    public void validate() throws org.apache.thrift.TException {
2462 chandransh 15430
      // check for required fields
15431
    }
15432
 
3430 rajveer 15433
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15434
      try {
15435
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15436
      } catch (org.apache.thrift.TException te) {
15437
        throw new java.io.IOException(te);
15438
      }
15439
    }
15440
 
15441
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15442
      try {
15443
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15444
      } catch (org.apache.thrift.TException te) {
15445
        throw new java.io.IOException(te);
15446
      }
15447
    }
15448
 
2462 chandransh 15449
  }
15450
 
3430 rajveer 15451
  public static class capturePayment_args implements org.apache.thrift.TBase<capturePayment_args, capturePayment_args._Fields>, java.io.Serializable, Cloneable   {
15452
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("capturePayment_args");
2690 chandransh 15453
 
3430 rajveer 15454
    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);
8618 rajveer 15455
    private static final org.apache.thrift.protocol.TField IS_DIGITAL_FIELD_DESC = new org.apache.thrift.protocol.TField("isDigital", org.apache.thrift.protocol.TType.BOOL, (short)2);
2690 chandransh 15456
 
3430 rajveer 15457
    private long merchantTxnId; // required
8618 rajveer 15458
    private boolean isDigital; // required
2690 chandransh 15459
 
15460
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 15461
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
8618 rajveer 15462
      MERCHANT_TXN_ID((short)1, "merchantTxnId"),
15463
      IS_DIGITAL((short)2, "isDigital");
2690 chandransh 15464
 
15465
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15466
 
15467
      static {
15468
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15469
          byName.put(field.getFieldName(), field);
15470
        }
15471
      }
15472
 
15473
      /**
15474
       * Find the _Fields constant that matches fieldId, or null if its not found.
15475
       */
15476
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 15477
        switch(fieldId) {
15478
          case 1: // MERCHANT_TXN_ID
15479
            return MERCHANT_TXN_ID;
8618 rajveer 15480
          case 2: // IS_DIGITAL
15481
            return IS_DIGITAL;
3430 rajveer 15482
          default:
15483
            return null;
15484
        }
2690 chandransh 15485
      }
15486
 
15487
      /**
15488
       * Find the _Fields constant that matches fieldId, throwing an exception
15489
       * if it is not found.
15490
       */
15491
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15492
        _Fields fields = findByThriftId(fieldId);
15493
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15494
        return fields;
15495
      }
15496
 
15497
      /**
15498
       * Find the _Fields constant that matches name, or null if its not found.
15499
       */
15500
      public static _Fields findByName(String name) {
15501
        return byName.get(name);
15502
      }
15503
 
15504
      private final short _thriftId;
15505
      private final String _fieldName;
15506
 
15507
      _Fields(short thriftId, String fieldName) {
15508
        _thriftId = thriftId;
15509
        _fieldName = fieldName;
15510
      }
15511
 
15512
      public short getThriftFieldId() {
15513
        return _thriftId;
15514
      }
15515
 
15516
      public String getFieldName() {
15517
        return _fieldName;
15518
      }
15519
    }
15520
 
15521
    // isset id assignments
3010 chandransh 15522
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
8618 rajveer 15523
    private static final int __ISDIGITAL_ISSET_ID = 1;
15524
    private BitSet __isset_bit_vector = new BitSet(2);
2690 chandransh 15525
 
3430 rajveer 15526
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2690 chandransh 15527
    static {
3430 rajveer 15528
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15529
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15530
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
8618 rajveer 15531
      tmpMap.put(_Fields.IS_DIGITAL, new org.apache.thrift.meta_data.FieldMetaData("isDigital", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15532
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
3430 rajveer 15533
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15534
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(capturePayment_args.class, metaDataMap);
2690 chandransh 15535
    }
15536
 
3010 chandransh 15537
    public capturePayment_args() {
2690 chandransh 15538
    }
15539
 
3010 chandransh 15540
    public capturePayment_args(
8618 rajveer 15541
      long merchantTxnId,
15542
      boolean isDigital)
2690 chandransh 15543
    {
15544
      this();
15545
      this.merchantTxnId = merchantTxnId;
15546
      setMerchantTxnIdIsSet(true);
8618 rajveer 15547
      this.isDigital = isDigital;
15548
      setIsDigitalIsSet(true);
2690 chandransh 15549
    }
15550
 
15551
    /**
15552
     * Performs a deep copy on <i>other</i>.
15553
     */
3010 chandransh 15554
    public capturePayment_args(capturePayment_args other) {
2690 chandransh 15555
      __isset_bit_vector.clear();
15556
      __isset_bit_vector.or(other.__isset_bit_vector);
15557
      this.merchantTxnId = other.merchantTxnId;
8618 rajveer 15558
      this.isDigital = other.isDigital;
2690 chandransh 15559
    }
15560
 
3010 chandransh 15561
    public capturePayment_args deepCopy() {
15562
      return new capturePayment_args(this);
2690 chandransh 15563
    }
15564
 
3430 rajveer 15565
    @Override
15566
    public void clear() {
15567
      setMerchantTxnIdIsSet(false);
15568
      this.merchantTxnId = 0;
8618 rajveer 15569
      setIsDigitalIsSet(false);
15570
      this.isDigital = false;
2690 chandransh 15571
    }
15572
 
15573
    public long getMerchantTxnId() {
15574
      return this.merchantTxnId;
15575
    }
15576
 
3430 rajveer 15577
    public void setMerchantTxnId(long merchantTxnId) {
2690 chandransh 15578
      this.merchantTxnId = merchantTxnId;
15579
      setMerchantTxnIdIsSet(true);
15580
    }
15581
 
15582
    public void unsetMerchantTxnId() {
15583
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
15584
    }
15585
 
3430 rajveer 15586
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
2690 chandransh 15587
    public boolean isSetMerchantTxnId() {
15588
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
15589
    }
15590
 
15591
    public void setMerchantTxnIdIsSet(boolean value) {
15592
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
15593
    }
15594
 
8618 rajveer 15595
    public boolean isIsDigital() {
15596
      return this.isDigital;
15597
    }
15598
 
15599
    public void setIsDigital(boolean isDigital) {
15600
      this.isDigital = isDigital;
15601
      setIsDigitalIsSet(true);
15602
    }
15603
 
15604
    public void unsetIsDigital() {
15605
      __isset_bit_vector.clear(__ISDIGITAL_ISSET_ID);
15606
    }
15607
 
15608
    /** Returns true if field isDigital is set (has been assigned a value) and false otherwise */
15609
    public boolean isSetIsDigital() {
15610
      return __isset_bit_vector.get(__ISDIGITAL_ISSET_ID);
15611
    }
15612
 
15613
    public void setIsDigitalIsSet(boolean value) {
15614
      __isset_bit_vector.set(__ISDIGITAL_ISSET_ID, value);
15615
    }
15616
 
2690 chandransh 15617
    public void setFieldValue(_Fields field, Object value) {
15618
      switch (field) {
15619
      case MERCHANT_TXN_ID:
15620
        if (value == null) {
15621
          unsetMerchantTxnId();
15622
        } else {
15623
          setMerchantTxnId((Long)value);
15624
        }
15625
        break;
15626
 
8618 rajveer 15627
      case IS_DIGITAL:
15628
        if (value == null) {
15629
          unsetIsDigital();
15630
        } else {
15631
          setIsDigital((Boolean)value);
15632
        }
15633
        break;
15634
 
2690 chandransh 15635
      }
15636
    }
15637
 
15638
    public Object getFieldValue(_Fields field) {
15639
      switch (field) {
15640
      case MERCHANT_TXN_ID:
3430 rajveer 15641
        return Long.valueOf(getMerchantTxnId());
2690 chandransh 15642
 
8618 rajveer 15643
      case IS_DIGITAL:
15644
        return Boolean.valueOf(isIsDigital());
15645
 
2690 chandransh 15646
      }
15647
      throw new IllegalStateException();
15648
    }
15649
 
3430 rajveer 15650
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
15651
    public boolean isSet(_Fields field) {
15652
      if (field == null) {
15653
        throw new IllegalArgumentException();
15654
      }
2690 chandransh 15655
 
15656
      switch (field) {
15657
      case MERCHANT_TXN_ID:
15658
        return isSetMerchantTxnId();
8618 rajveer 15659
      case IS_DIGITAL:
15660
        return isSetIsDigital();
2690 chandransh 15661
      }
15662
      throw new IllegalStateException();
15663
    }
15664
 
15665
    @Override
15666
    public boolean equals(Object that) {
15667
      if (that == null)
15668
        return false;
3010 chandransh 15669
      if (that instanceof capturePayment_args)
15670
        return this.equals((capturePayment_args)that);
2690 chandransh 15671
      return false;
15672
    }
15673
 
3010 chandransh 15674
    public boolean equals(capturePayment_args that) {
2690 chandransh 15675
      if (that == null)
15676
        return false;
15677
 
15678
      boolean this_present_merchantTxnId = true;
15679
      boolean that_present_merchantTxnId = true;
15680
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
15681
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
15682
          return false;
15683
        if (this.merchantTxnId != that.merchantTxnId)
15684
          return false;
15685
      }
15686
 
8618 rajveer 15687
      boolean this_present_isDigital = true;
15688
      boolean that_present_isDigital = true;
15689
      if (this_present_isDigital || that_present_isDigital) {
15690
        if (!(this_present_isDigital && that_present_isDigital))
15691
          return false;
15692
        if (this.isDigital != that.isDigital)
15693
          return false;
15694
      }
15695
 
2690 chandransh 15696
      return true;
15697
    }
15698
 
15699
    @Override
15700
    public int hashCode() {
15701
      return 0;
15702
    }
15703
 
3010 chandransh 15704
    public int compareTo(capturePayment_args other) {
2690 chandransh 15705
      if (!getClass().equals(other.getClass())) {
15706
        return getClass().getName().compareTo(other.getClass().getName());
15707
      }
15708
 
15709
      int lastComparison = 0;
3010 chandransh 15710
      capturePayment_args typedOther = (capturePayment_args)other;
2690 chandransh 15711
 
3430 rajveer 15712
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
2690 chandransh 15713
      if (lastComparison != 0) {
15714
        return lastComparison;
15715
      }
3430 rajveer 15716
      if (isSetMerchantTxnId()) {
15717
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
15718
        if (lastComparison != 0) {
15719
          return lastComparison;
15720
        }
2690 chandransh 15721
      }
8618 rajveer 15722
      lastComparison = Boolean.valueOf(isSetIsDigital()).compareTo(typedOther.isSetIsDigital());
15723
      if (lastComparison != 0) {
15724
        return lastComparison;
15725
      }
15726
      if (isSetIsDigital()) {
15727
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDigital, typedOther.isDigital);
15728
        if (lastComparison != 0) {
15729
          return lastComparison;
15730
        }
15731
      }
2690 chandransh 15732
      return 0;
15733
    }
15734
 
3430 rajveer 15735
    public _Fields fieldForId(int fieldId) {
15736
      return _Fields.findByThriftId(fieldId);
15737
    }
15738
 
15739
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
15740
      org.apache.thrift.protocol.TField field;
2690 chandransh 15741
      iprot.readStructBegin();
15742
      while (true)
15743
      {
15744
        field = iprot.readFieldBegin();
3430 rajveer 15745
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2690 chandransh 15746
          break;
15747
        }
3430 rajveer 15748
        switch (field.id) {
15749
          case 1: // MERCHANT_TXN_ID
15750
            if (field.type == org.apache.thrift.protocol.TType.I64) {
15751
              this.merchantTxnId = iprot.readI64();
15752
              setMerchantTxnIdIsSet(true);
15753
            } else { 
15754
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15755
            }
15756
            break;
8618 rajveer 15757
          case 2: // IS_DIGITAL
15758
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
15759
              this.isDigital = iprot.readBool();
15760
              setIsDigitalIsSet(true);
15761
            } else { 
15762
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
15763
            }
15764
            break;
3430 rajveer 15765
          default:
15766
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2690 chandransh 15767
        }
3430 rajveer 15768
        iprot.readFieldEnd();
2690 chandransh 15769
      }
15770
      iprot.readStructEnd();
15771
      validate();
15772
    }
15773
 
3430 rajveer 15774
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2690 chandransh 15775
      validate();
15776
 
15777
      oprot.writeStructBegin(STRUCT_DESC);
15778
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
15779
      oprot.writeI64(this.merchantTxnId);
15780
      oprot.writeFieldEnd();
8618 rajveer 15781
      oprot.writeFieldBegin(IS_DIGITAL_FIELD_DESC);
15782
      oprot.writeBool(this.isDigital);
15783
      oprot.writeFieldEnd();
2690 chandransh 15784
      oprot.writeFieldStop();
15785
      oprot.writeStructEnd();
15786
    }
15787
 
15788
    @Override
15789
    public String toString() {
3010 chandransh 15790
      StringBuilder sb = new StringBuilder("capturePayment_args(");
2690 chandransh 15791
      boolean first = true;
15792
 
15793
      sb.append("merchantTxnId:");
15794
      sb.append(this.merchantTxnId);
15795
      first = false;
8618 rajveer 15796
      if (!first) sb.append(", ");
15797
      sb.append("isDigital:");
15798
      sb.append(this.isDigital);
15799
      first = false;
2690 chandransh 15800
      sb.append(")");
15801
      return sb.toString();
15802
    }
15803
 
3430 rajveer 15804
    public void validate() throws org.apache.thrift.TException {
2690 chandransh 15805
      // check for required fields
15806
    }
15807
 
3430 rajveer 15808
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
15809
      try {
15810
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
15811
      } catch (org.apache.thrift.TException te) {
15812
        throw new java.io.IOException(te);
15813
      }
15814
    }
15815
 
15816
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
15817
      try {
15818
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
15819
      } catch (org.apache.thrift.TException te) {
15820
        throw new java.io.IOException(te);
15821
      }
15822
    }
15823
 
2690 chandransh 15824
  }
15825
 
3430 rajveer 15826
  public static class capturePayment_result implements org.apache.thrift.TBase<capturePayment_result, capturePayment_result._Fields>, java.io.Serializable, Cloneable   {
15827
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("capturePayment_result");
2690 chandransh 15828
 
3430 rajveer 15829
    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);
15830
    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 15831
 
3430 rajveer 15832
    private boolean success; // required
15833
    private PaymentException pe; // required
2690 chandransh 15834
 
15835
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3430 rajveer 15836
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
2690 chandransh 15837
      SUCCESS((short)0, "success"),
15838
      PE((short)1, "pe");
15839
 
15840
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15841
 
15842
      static {
15843
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15844
          byName.put(field.getFieldName(), field);
15845
        }
15846
      }
15847
 
15848
      /**
15849
       * Find the _Fields constant that matches fieldId, or null if its not found.
15850
       */
15851
      public static _Fields findByThriftId(int fieldId) {
3430 rajveer 15852
        switch(fieldId) {
15853
          case 0: // SUCCESS
15854
            return SUCCESS;
15855
          case 1: // PE
15856
            return PE;
15857
          default:
15858
            return null;
15859
        }
2690 chandransh 15860
      }
15861
 
15862
      /**
15863
       * Find the _Fields constant that matches fieldId, throwing an exception
15864
       * if it is not found.
15865
       */
15866
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15867
        _Fields fields = findByThriftId(fieldId);
15868
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15869
        return fields;
15870
      }
15871
 
15872
      /**
15873
       * Find the _Fields constant that matches name, or null if its not found.
15874
       */
15875
      public static _Fields findByName(String name) {
15876
        return byName.get(name);
15877
      }
15878
 
15879
      private final short _thriftId;
15880
      private final String _fieldName;
15881
 
15882
      _Fields(short thriftId, String fieldName) {
15883
        _thriftId = thriftId;
15884
        _fieldName = fieldName;
15885
      }
15886
 
15887
      public short getThriftFieldId() {
15888
        return _thriftId;
15889
      }
15890
 
15891
      public String getFieldName() {
15892
        return _fieldName;
15893
      }
15894
    }
15895
 
15896
    // isset id assignments
15897
    private static final int __SUCCESS_ISSET_ID = 0;
15898
    private BitSet __isset_bit_vector = new BitSet(1);
15899
 
3430 rajveer 15900
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
2690 chandransh 15901
    static {
3430 rajveer 15902
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
15903
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15904
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
15905
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
15906
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
15907
      metaDataMap = Collections.unmodifiableMap(tmpMap);
15908
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(capturePayment_result.class, metaDataMap);
2690 chandransh 15909
    }
15910
 
3010 chandransh 15911
    public capturePayment_result() {
2690 chandransh 15912
    }
15913
 
3010 chandransh 15914
    public capturePayment_result(
15915
      boolean success,
2690 chandransh 15916
      PaymentException pe)
15917
    {
15918
      this();
15919
      this.success = success;
15920
      setSuccessIsSet(true);
15921
      this.pe = pe;
15922
    }
15923
 
15924
    /**
15925
     * Performs a deep copy on <i>other</i>.
15926
     */
3010 chandransh 15927
    public capturePayment_result(capturePayment_result other) {
2690 chandransh 15928
      __isset_bit_vector.clear();
15929
      __isset_bit_vector.or(other.__isset_bit_vector);
15930
      this.success = other.success;
15931
      if (other.isSetPe()) {
15932
        this.pe = new PaymentException(other.pe);
15933
      }
15934
    }
15935
 
3010 chandransh 15936
    public capturePayment_result deepCopy() {
15937
      return new capturePayment_result(this);
2690 chandransh 15938
    }
15939
 
3430 rajveer 15940
    @Override
15941
    public void clear() {
15942
      setSuccessIsSet(false);
15943
      this.success = false;
15944
      this.pe = null;
2690 chandransh 15945
    }
15946
 
3010 chandransh 15947
    public boolean isSuccess() {
2690 chandransh 15948
      return this.success;
15949
    }
15950
 
3430 rajveer 15951
    public void setSuccess(boolean success) {
2690 chandransh 15952
      this.success = success;
15953
      setSuccessIsSet(true);
15954
    }
15955
 
15956
    public void unsetSuccess() {
15957
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15958
    }
15959
 
3430 rajveer 15960
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
2690 chandransh 15961
    public boolean isSetSuccess() {
15962
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15963
    }
15964
 
15965
    public void setSuccessIsSet(boolean value) {
15966
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15967
    }
15968
 
15969
    public PaymentException getPe() {
15970
      return this.pe;
15971
    }
15972
 
3430 rajveer 15973
    public void setPe(PaymentException pe) {
2690 chandransh 15974
      this.pe = pe;
15975
    }
15976
 
15977
    public void unsetPe() {
15978
      this.pe = null;
15979
    }
15980
 
3430 rajveer 15981
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
2690 chandransh 15982
    public boolean isSetPe() {
15983
      return this.pe != null;
15984
    }
15985
 
15986
    public void setPeIsSet(boolean value) {
15987
      if (!value) {
15988
        this.pe = null;
15989
      }
15990
    }
15991
 
15992
    public void setFieldValue(_Fields field, Object value) {
15993
      switch (field) {
15994
      case SUCCESS:
15995
        if (value == null) {
15996
          unsetSuccess();
15997
        } else {
3010 chandransh 15998
          setSuccess((Boolean)value);
2690 chandransh 15999
        }
16000
        break;
16001
 
16002
      case PE:
16003
        if (value == null) {
16004
          unsetPe();
16005
        } else {
16006
          setPe((PaymentException)value);
16007
        }
16008
        break;
16009
 
16010
      }
16011
    }
16012
 
16013
    public Object getFieldValue(_Fields field) {
16014
      switch (field) {
16015
      case SUCCESS:
3430 rajveer 16016
        return Boolean.valueOf(isSuccess());
2690 chandransh 16017
 
16018
      case PE:
16019
        return getPe();
16020
 
16021
      }
16022
      throw new IllegalStateException();
16023
    }
16024
 
3430 rajveer 16025
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16026
    public boolean isSet(_Fields field) {
16027
      if (field == null) {
16028
        throw new IllegalArgumentException();
16029
      }
2690 chandransh 16030
 
16031
      switch (field) {
16032
      case SUCCESS:
16033
        return isSetSuccess();
16034
      case PE:
16035
        return isSetPe();
16036
      }
16037
      throw new IllegalStateException();
16038
    }
16039
 
16040
    @Override
16041
    public boolean equals(Object that) {
16042
      if (that == null)
16043
        return false;
3010 chandransh 16044
      if (that instanceof capturePayment_result)
16045
        return this.equals((capturePayment_result)that);
2690 chandransh 16046
      return false;
16047
    }
16048
 
3010 chandransh 16049
    public boolean equals(capturePayment_result that) {
2690 chandransh 16050
      if (that == null)
16051
        return false;
16052
 
16053
      boolean this_present_success = true;
16054
      boolean that_present_success = true;
16055
      if (this_present_success || that_present_success) {
16056
        if (!(this_present_success && that_present_success))
16057
          return false;
16058
        if (this.success != that.success)
16059
          return false;
16060
      }
16061
 
16062
      boolean this_present_pe = true && this.isSetPe();
16063
      boolean that_present_pe = true && that.isSetPe();
16064
      if (this_present_pe || that_present_pe) {
16065
        if (!(this_present_pe && that_present_pe))
16066
          return false;
16067
        if (!this.pe.equals(that.pe))
16068
          return false;
16069
      }
16070
 
16071
      return true;
16072
    }
16073
 
16074
    @Override
16075
    public int hashCode() {
16076
      return 0;
16077
    }
16078
 
3010 chandransh 16079
    public int compareTo(capturePayment_result other) {
2690 chandransh 16080
      if (!getClass().equals(other.getClass())) {
16081
        return getClass().getName().compareTo(other.getClass().getName());
16082
      }
16083
 
16084
      int lastComparison = 0;
3010 chandransh 16085
      capturePayment_result typedOther = (capturePayment_result)other;
2690 chandransh 16086
 
3430 rajveer 16087
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
2690 chandransh 16088
      if (lastComparison != 0) {
16089
        return lastComparison;
16090
      }
3430 rajveer 16091
      if (isSetSuccess()) {
16092
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16093
        if (lastComparison != 0) {
16094
          return lastComparison;
16095
        }
2690 chandransh 16096
      }
3430 rajveer 16097
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
2690 chandransh 16098
      if (lastComparison != 0) {
16099
        return lastComparison;
16100
      }
3430 rajveer 16101
      if (isSetPe()) {
16102
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
16103
        if (lastComparison != 0) {
16104
          return lastComparison;
16105
        }
2690 chandransh 16106
      }
16107
      return 0;
16108
    }
16109
 
3430 rajveer 16110
    public _Fields fieldForId(int fieldId) {
16111
      return _Fields.findByThriftId(fieldId);
16112
    }
16113
 
16114
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16115
      org.apache.thrift.protocol.TField field;
2690 chandransh 16116
      iprot.readStructBegin();
16117
      while (true)
16118
      {
16119
        field = iprot.readFieldBegin();
3430 rajveer 16120
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
2690 chandransh 16121
          break;
16122
        }
3430 rajveer 16123
        switch (field.id) {
16124
          case 0: // SUCCESS
16125
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
16126
              this.success = iprot.readBool();
16127
              setSuccessIsSet(true);
16128
            } else { 
16129
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16130
            }
16131
            break;
16132
          case 1: // PE
16133
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
16134
              this.pe = new PaymentException();
16135
              this.pe.read(iprot);
16136
            } else { 
16137
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16138
            }
16139
            break;
16140
          default:
16141
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
2690 chandransh 16142
        }
3430 rajveer 16143
        iprot.readFieldEnd();
2690 chandransh 16144
      }
16145
      iprot.readStructEnd();
16146
      validate();
16147
    }
16148
 
3430 rajveer 16149
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
2690 chandransh 16150
      oprot.writeStructBegin(STRUCT_DESC);
16151
 
16152
      if (this.isSetSuccess()) {
16153
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3010 chandransh 16154
        oprot.writeBool(this.success);
2690 chandransh 16155
        oprot.writeFieldEnd();
16156
      } else if (this.isSetPe()) {
16157
        oprot.writeFieldBegin(PE_FIELD_DESC);
16158
        this.pe.write(oprot);
16159
        oprot.writeFieldEnd();
16160
      }
16161
      oprot.writeFieldStop();
16162
      oprot.writeStructEnd();
16163
    }
16164
 
16165
    @Override
16166
    public String toString() {
3010 chandransh 16167
      StringBuilder sb = new StringBuilder("capturePayment_result(");
2690 chandransh 16168
      boolean first = true;
16169
 
16170
      sb.append("success:");
16171
      sb.append(this.success);
16172
      first = false;
16173
      if (!first) sb.append(", ");
16174
      sb.append("pe:");
16175
      if (this.pe == null) {
16176
        sb.append("null");
16177
      } else {
16178
        sb.append(this.pe);
16179
      }
16180
      first = false;
16181
      sb.append(")");
16182
      return sb.toString();
16183
    }
16184
 
3430 rajveer 16185
    public void validate() throws org.apache.thrift.TException {
2690 chandransh 16186
      // check for required fields
16187
    }
16188
 
3430 rajveer 16189
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16190
      try {
16191
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16192
      } catch (org.apache.thrift.TException te) {
16193
        throw new java.io.IOException(te);
16194
      }
16195
    }
16196
 
16197
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16198
      try {
16199
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16200
      } catch (org.apache.thrift.TException te) {
16201
        throw new java.io.IOException(te);
16202
      }
16203
    }
16204
 
2690 chandransh 16205
  }
16206
 
6486 rajveer 16207
  public static class refundPayment_args implements org.apache.thrift.TBase<refundPayment_args, refundPayment_args._Fields>, java.io.Serializable, Cloneable   {
16208
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("refundPayment_args");
16209
 
16210
    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);
16211
    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);
16212
    private static final org.apache.thrift.protocol.TField IS_DIGITAL_FIELD_DESC = new org.apache.thrift.protocol.TField("isDigital", org.apache.thrift.protocol.TType.BOOL, (short)3);
16213
 
16214
    private long merchantTxnId; // required
16215
    private double amount; // required
16216
    private boolean isDigital; // required
16217
 
16218
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16219
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16220
      MERCHANT_TXN_ID((short)1, "merchantTxnId"),
16221
      AMOUNT((short)2, "amount"),
16222
      IS_DIGITAL((short)3, "isDigital");
16223
 
16224
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16225
 
16226
      static {
16227
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16228
          byName.put(field.getFieldName(), field);
16229
        }
16230
      }
16231
 
16232
      /**
16233
       * Find the _Fields constant that matches fieldId, or null if its not found.
16234
       */
16235
      public static _Fields findByThriftId(int fieldId) {
16236
        switch(fieldId) {
16237
          case 1: // MERCHANT_TXN_ID
16238
            return MERCHANT_TXN_ID;
16239
          case 2: // AMOUNT
16240
            return AMOUNT;
16241
          case 3: // IS_DIGITAL
16242
            return IS_DIGITAL;
16243
          default:
16244
            return null;
16245
        }
16246
      }
16247
 
16248
      /**
16249
       * Find the _Fields constant that matches fieldId, throwing an exception
16250
       * if it is not found.
16251
       */
16252
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16253
        _Fields fields = findByThriftId(fieldId);
16254
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16255
        return fields;
16256
      }
16257
 
16258
      /**
16259
       * Find the _Fields constant that matches name, or null if its not found.
16260
       */
16261
      public static _Fields findByName(String name) {
16262
        return byName.get(name);
16263
      }
16264
 
16265
      private final short _thriftId;
16266
      private final String _fieldName;
16267
 
16268
      _Fields(short thriftId, String fieldName) {
16269
        _thriftId = thriftId;
16270
        _fieldName = fieldName;
16271
      }
16272
 
16273
      public short getThriftFieldId() {
16274
        return _thriftId;
16275
      }
16276
 
16277
      public String getFieldName() {
16278
        return _fieldName;
16279
      }
16280
    }
16281
 
16282
    // isset id assignments
16283
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
16284
    private static final int __AMOUNT_ISSET_ID = 1;
16285
    private static final int __ISDIGITAL_ISSET_ID = 2;
16286
    private BitSet __isset_bit_vector = new BitSet(3);
16287
 
16288
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16289
    static {
16290
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16291
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16292
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
16293
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16294
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
16295
      tmpMap.put(_Fields.IS_DIGITAL, new org.apache.thrift.meta_data.FieldMetaData("isDigital", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16296
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
16297
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16298
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(refundPayment_args.class, metaDataMap);
16299
    }
16300
 
16301
    public refundPayment_args() {
16302
    }
16303
 
16304
    public refundPayment_args(
16305
      long merchantTxnId,
16306
      double amount,
16307
      boolean isDigital)
16308
    {
16309
      this();
16310
      this.merchantTxnId = merchantTxnId;
16311
      setMerchantTxnIdIsSet(true);
16312
      this.amount = amount;
16313
      setAmountIsSet(true);
16314
      this.isDigital = isDigital;
16315
      setIsDigitalIsSet(true);
16316
    }
16317
 
16318
    /**
16319
     * Performs a deep copy on <i>other</i>.
16320
     */
16321
    public refundPayment_args(refundPayment_args other) {
16322
      __isset_bit_vector.clear();
16323
      __isset_bit_vector.or(other.__isset_bit_vector);
16324
      this.merchantTxnId = other.merchantTxnId;
16325
      this.amount = other.amount;
16326
      this.isDigital = other.isDigital;
16327
    }
16328
 
16329
    public refundPayment_args deepCopy() {
16330
      return new refundPayment_args(this);
16331
    }
16332
 
16333
    @Override
16334
    public void clear() {
16335
      setMerchantTxnIdIsSet(false);
16336
      this.merchantTxnId = 0;
16337
      setAmountIsSet(false);
16338
      this.amount = 0.0;
16339
      setIsDigitalIsSet(false);
16340
      this.isDigital = false;
16341
    }
16342
 
16343
    public long getMerchantTxnId() {
16344
      return this.merchantTxnId;
16345
    }
16346
 
16347
    public void setMerchantTxnId(long merchantTxnId) {
16348
      this.merchantTxnId = merchantTxnId;
16349
      setMerchantTxnIdIsSet(true);
16350
    }
16351
 
16352
    public void unsetMerchantTxnId() {
16353
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
16354
    }
16355
 
16356
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
16357
    public boolean isSetMerchantTxnId() {
16358
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
16359
    }
16360
 
16361
    public void setMerchantTxnIdIsSet(boolean value) {
16362
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
16363
    }
16364
 
16365
    public double getAmount() {
16366
      return this.amount;
16367
    }
16368
 
16369
    public void setAmount(double amount) {
16370
      this.amount = amount;
16371
      setAmountIsSet(true);
16372
    }
16373
 
16374
    public void unsetAmount() {
16375
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
16376
    }
16377
 
16378
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
16379
    public boolean isSetAmount() {
16380
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
16381
    }
16382
 
16383
    public void setAmountIsSet(boolean value) {
16384
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
16385
    }
16386
 
16387
    public boolean isIsDigital() {
16388
      return this.isDigital;
16389
    }
16390
 
16391
    public void setIsDigital(boolean isDigital) {
16392
      this.isDigital = isDigital;
16393
      setIsDigitalIsSet(true);
16394
    }
16395
 
16396
    public void unsetIsDigital() {
16397
      __isset_bit_vector.clear(__ISDIGITAL_ISSET_ID);
16398
    }
16399
 
16400
    /** Returns true if field isDigital is set (has been assigned a value) and false otherwise */
16401
    public boolean isSetIsDigital() {
16402
      return __isset_bit_vector.get(__ISDIGITAL_ISSET_ID);
16403
    }
16404
 
16405
    public void setIsDigitalIsSet(boolean value) {
16406
      __isset_bit_vector.set(__ISDIGITAL_ISSET_ID, value);
16407
    }
16408
 
16409
    public void setFieldValue(_Fields field, Object value) {
16410
      switch (field) {
16411
      case MERCHANT_TXN_ID:
16412
        if (value == null) {
16413
          unsetMerchantTxnId();
16414
        } else {
16415
          setMerchantTxnId((Long)value);
16416
        }
16417
        break;
16418
 
16419
      case AMOUNT:
16420
        if (value == null) {
16421
          unsetAmount();
16422
        } else {
16423
          setAmount((Double)value);
16424
        }
16425
        break;
16426
 
16427
      case IS_DIGITAL:
16428
        if (value == null) {
16429
          unsetIsDigital();
16430
        } else {
16431
          setIsDigital((Boolean)value);
16432
        }
16433
        break;
16434
 
16435
      }
16436
    }
16437
 
16438
    public Object getFieldValue(_Fields field) {
16439
      switch (field) {
16440
      case MERCHANT_TXN_ID:
16441
        return Long.valueOf(getMerchantTxnId());
16442
 
16443
      case AMOUNT:
16444
        return Double.valueOf(getAmount());
16445
 
16446
      case IS_DIGITAL:
16447
        return Boolean.valueOf(isIsDigital());
16448
 
16449
      }
16450
      throw new IllegalStateException();
16451
    }
16452
 
16453
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16454
    public boolean isSet(_Fields field) {
16455
      if (field == null) {
16456
        throw new IllegalArgumentException();
16457
      }
16458
 
16459
      switch (field) {
16460
      case MERCHANT_TXN_ID:
16461
        return isSetMerchantTxnId();
16462
      case AMOUNT:
16463
        return isSetAmount();
16464
      case IS_DIGITAL:
16465
        return isSetIsDigital();
16466
      }
16467
      throw new IllegalStateException();
16468
    }
16469
 
16470
    @Override
16471
    public boolean equals(Object that) {
16472
      if (that == null)
16473
        return false;
16474
      if (that instanceof refundPayment_args)
16475
        return this.equals((refundPayment_args)that);
16476
      return false;
16477
    }
16478
 
16479
    public boolean equals(refundPayment_args that) {
16480
      if (that == null)
16481
        return false;
16482
 
16483
      boolean this_present_merchantTxnId = true;
16484
      boolean that_present_merchantTxnId = true;
16485
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
16486
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
16487
          return false;
16488
        if (this.merchantTxnId != that.merchantTxnId)
16489
          return false;
16490
      }
16491
 
16492
      boolean this_present_amount = true;
16493
      boolean that_present_amount = true;
16494
      if (this_present_amount || that_present_amount) {
16495
        if (!(this_present_amount && that_present_amount))
16496
          return false;
16497
        if (this.amount != that.amount)
16498
          return false;
16499
      }
16500
 
16501
      boolean this_present_isDigital = true;
16502
      boolean that_present_isDigital = true;
16503
      if (this_present_isDigital || that_present_isDigital) {
16504
        if (!(this_present_isDigital && that_present_isDigital))
16505
          return false;
16506
        if (this.isDigital != that.isDigital)
16507
          return false;
16508
      }
16509
 
16510
      return true;
16511
    }
16512
 
16513
    @Override
16514
    public int hashCode() {
16515
      return 0;
16516
    }
16517
 
16518
    public int compareTo(refundPayment_args other) {
16519
      if (!getClass().equals(other.getClass())) {
16520
        return getClass().getName().compareTo(other.getClass().getName());
16521
      }
16522
 
16523
      int lastComparison = 0;
16524
      refundPayment_args typedOther = (refundPayment_args)other;
16525
 
16526
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
16527
      if (lastComparison != 0) {
16528
        return lastComparison;
16529
      }
16530
      if (isSetMerchantTxnId()) {
16531
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
16532
        if (lastComparison != 0) {
16533
          return lastComparison;
16534
        }
16535
      }
16536
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
16537
      if (lastComparison != 0) {
16538
        return lastComparison;
16539
      }
16540
      if (isSetAmount()) {
16541
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
16542
        if (lastComparison != 0) {
16543
          return lastComparison;
16544
        }
16545
      }
16546
      lastComparison = Boolean.valueOf(isSetIsDigital()).compareTo(typedOther.isSetIsDigital());
16547
      if (lastComparison != 0) {
16548
        return lastComparison;
16549
      }
16550
      if (isSetIsDigital()) {
16551
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDigital, typedOther.isDigital);
16552
        if (lastComparison != 0) {
16553
          return lastComparison;
16554
        }
16555
      }
16556
      return 0;
16557
    }
16558
 
16559
    public _Fields fieldForId(int fieldId) {
16560
      return _Fields.findByThriftId(fieldId);
16561
    }
16562
 
16563
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16564
      org.apache.thrift.protocol.TField field;
16565
      iprot.readStructBegin();
16566
      while (true)
16567
      {
16568
        field = iprot.readFieldBegin();
16569
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16570
          break;
16571
        }
16572
        switch (field.id) {
16573
          case 1: // MERCHANT_TXN_ID
16574
            if (field.type == org.apache.thrift.protocol.TType.I64) {
16575
              this.merchantTxnId = iprot.readI64();
16576
              setMerchantTxnIdIsSet(true);
16577
            } else { 
16578
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16579
            }
16580
            break;
16581
          case 2: // AMOUNT
16582
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
16583
              this.amount = iprot.readDouble();
16584
              setAmountIsSet(true);
16585
            } else { 
16586
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16587
            }
16588
            break;
16589
          case 3: // IS_DIGITAL
16590
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
16591
              this.isDigital = iprot.readBool();
16592
              setIsDigitalIsSet(true);
16593
            } else { 
16594
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16595
            }
16596
            break;
16597
          default:
16598
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16599
        }
16600
        iprot.readFieldEnd();
16601
      }
16602
      iprot.readStructEnd();
16603
      validate();
16604
    }
16605
 
16606
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16607
      validate();
16608
 
16609
      oprot.writeStructBegin(STRUCT_DESC);
16610
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
16611
      oprot.writeI64(this.merchantTxnId);
16612
      oprot.writeFieldEnd();
16613
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
16614
      oprot.writeDouble(this.amount);
16615
      oprot.writeFieldEnd();
16616
      oprot.writeFieldBegin(IS_DIGITAL_FIELD_DESC);
16617
      oprot.writeBool(this.isDigital);
16618
      oprot.writeFieldEnd();
16619
      oprot.writeFieldStop();
16620
      oprot.writeStructEnd();
16621
    }
16622
 
16623
    @Override
16624
    public String toString() {
16625
      StringBuilder sb = new StringBuilder("refundPayment_args(");
16626
      boolean first = true;
16627
 
16628
      sb.append("merchantTxnId:");
16629
      sb.append(this.merchantTxnId);
16630
      first = false;
16631
      if (!first) sb.append(", ");
16632
      sb.append("amount:");
16633
      sb.append(this.amount);
16634
      first = false;
16635
      if (!first) sb.append(", ");
16636
      sb.append("isDigital:");
16637
      sb.append(this.isDigital);
16638
      first = false;
16639
      sb.append(")");
16640
      return sb.toString();
16641
    }
16642
 
16643
    public void validate() throws org.apache.thrift.TException {
16644
      // check for required fields
16645
    }
16646
 
16647
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
16648
      try {
16649
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
16650
      } catch (org.apache.thrift.TException te) {
16651
        throw new java.io.IOException(te);
16652
      }
16653
    }
16654
 
16655
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
16656
      try {
16657
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
16658
      } catch (org.apache.thrift.TException te) {
16659
        throw new java.io.IOException(te);
16660
      }
16661
    }
16662
 
16663
  }
16664
 
16665
  public static class refundPayment_result implements org.apache.thrift.TBase<refundPayment_result, refundPayment_result._Fields>, java.io.Serializable, Cloneable   {
16666
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("refundPayment_result");
16667
 
16668
    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);
16669
    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);
16670
 
16671
    private boolean success; // required
16672
    private PaymentException pe; // required
16673
 
16674
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16675
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
16676
      SUCCESS((short)0, "success"),
16677
      PE((short)1, "pe");
16678
 
16679
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16680
 
16681
      static {
16682
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16683
          byName.put(field.getFieldName(), field);
16684
        }
16685
      }
16686
 
16687
      /**
16688
       * Find the _Fields constant that matches fieldId, or null if its not found.
16689
       */
16690
      public static _Fields findByThriftId(int fieldId) {
16691
        switch(fieldId) {
16692
          case 0: // SUCCESS
16693
            return SUCCESS;
16694
          case 1: // PE
16695
            return PE;
16696
          default:
16697
            return null;
16698
        }
16699
      }
16700
 
16701
      /**
16702
       * Find the _Fields constant that matches fieldId, throwing an exception
16703
       * if it is not found.
16704
       */
16705
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16706
        _Fields fields = findByThriftId(fieldId);
16707
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16708
        return fields;
16709
      }
16710
 
16711
      /**
16712
       * Find the _Fields constant that matches name, or null if its not found.
16713
       */
16714
      public static _Fields findByName(String name) {
16715
        return byName.get(name);
16716
      }
16717
 
16718
      private final short _thriftId;
16719
      private final String _fieldName;
16720
 
16721
      _Fields(short thriftId, String fieldName) {
16722
        _thriftId = thriftId;
16723
        _fieldName = fieldName;
16724
      }
16725
 
16726
      public short getThriftFieldId() {
16727
        return _thriftId;
16728
      }
16729
 
16730
      public String getFieldName() {
16731
        return _fieldName;
16732
      }
16733
    }
16734
 
16735
    // isset id assignments
16736
    private static final int __SUCCESS_ISSET_ID = 0;
16737
    private BitSet __isset_bit_vector = new BitSet(1);
16738
 
16739
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
16740
    static {
16741
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
16742
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16743
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
16744
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
16745
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
16746
      metaDataMap = Collections.unmodifiableMap(tmpMap);
16747
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(refundPayment_result.class, metaDataMap);
16748
    }
16749
 
16750
    public refundPayment_result() {
16751
    }
16752
 
16753
    public refundPayment_result(
16754
      boolean success,
16755
      PaymentException pe)
16756
    {
16757
      this();
16758
      this.success = success;
16759
      setSuccessIsSet(true);
16760
      this.pe = pe;
16761
    }
16762
 
16763
    /**
16764
     * Performs a deep copy on <i>other</i>.
16765
     */
16766
    public refundPayment_result(refundPayment_result other) {
16767
      __isset_bit_vector.clear();
16768
      __isset_bit_vector.or(other.__isset_bit_vector);
16769
      this.success = other.success;
16770
      if (other.isSetPe()) {
16771
        this.pe = new PaymentException(other.pe);
16772
      }
16773
    }
16774
 
16775
    public refundPayment_result deepCopy() {
16776
      return new refundPayment_result(this);
16777
    }
16778
 
16779
    @Override
16780
    public void clear() {
16781
      setSuccessIsSet(false);
16782
      this.success = false;
16783
      this.pe = null;
16784
    }
16785
 
16786
    public boolean isSuccess() {
16787
      return this.success;
16788
    }
16789
 
16790
    public void setSuccess(boolean success) {
16791
      this.success = success;
16792
      setSuccessIsSet(true);
16793
    }
16794
 
16795
    public void unsetSuccess() {
16796
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16797
    }
16798
 
16799
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
16800
    public boolean isSetSuccess() {
16801
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16802
    }
16803
 
16804
    public void setSuccessIsSet(boolean value) {
16805
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16806
    }
16807
 
16808
    public PaymentException getPe() {
16809
      return this.pe;
16810
    }
16811
 
16812
    public void setPe(PaymentException pe) {
16813
      this.pe = pe;
16814
    }
16815
 
16816
    public void unsetPe() {
16817
      this.pe = null;
16818
    }
16819
 
16820
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
16821
    public boolean isSetPe() {
16822
      return this.pe != null;
16823
    }
16824
 
16825
    public void setPeIsSet(boolean value) {
16826
      if (!value) {
16827
        this.pe = null;
16828
      }
16829
    }
16830
 
16831
    public void setFieldValue(_Fields field, Object value) {
16832
      switch (field) {
16833
      case SUCCESS:
16834
        if (value == null) {
16835
          unsetSuccess();
16836
        } else {
16837
          setSuccess((Boolean)value);
16838
        }
16839
        break;
16840
 
16841
      case PE:
16842
        if (value == null) {
16843
          unsetPe();
16844
        } else {
16845
          setPe((PaymentException)value);
16846
        }
16847
        break;
16848
 
16849
      }
16850
    }
16851
 
16852
    public Object getFieldValue(_Fields field) {
16853
      switch (field) {
16854
      case SUCCESS:
16855
        return Boolean.valueOf(isSuccess());
16856
 
16857
      case PE:
16858
        return getPe();
16859
 
16860
      }
16861
      throw new IllegalStateException();
16862
    }
16863
 
16864
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
16865
    public boolean isSet(_Fields field) {
16866
      if (field == null) {
16867
        throw new IllegalArgumentException();
16868
      }
16869
 
16870
      switch (field) {
16871
      case SUCCESS:
16872
        return isSetSuccess();
16873
      case PE:
16874
        return isSetPe();
16875
      }
16876
      throw new IllegalStateException();
16877
    }
16878
 
16879
    @Override
16880
    public boolean equals(Object that) {
16881
      if (that == null)
16882
        return false;
16883
      if (that instanceof refundPayment_result)
16884
        return this.equals((refundPayment_result)that);
16885
      return false;
16886
    }
16887
 
16888
    public boolean equals(refundPayment_result that) {
16889
      if (that == null)
16890
        return false;
16891
 
16892
      boolean this_present_success = true;
16893
      boolean that_present_success = true;
16894
      if (this_present_success || that_present_success) {
16895
        if (!(this_present_success && that_present_success))
16896
          return false;
16897
        if (this.success != that.success)
16898
          return false;
16899
      }
16900
 
16901
      boolean this_present_pe = true && this.isSetPe();
16902
      boolean that_present_pe = true && that.isSetPe();
16903
      if (this_present_pe || that_present_pe) {
16904
        if (!(this_present_pe && that_present_pe))
16905
          return false;
16906
        if (!this.pe.equals(that.pe))
16907
          return false;
16908
      }
16909
 
16910
      return true;
16911
    }
16912
 
16913
    @Override
16914
    public int hashCode() {
16915
      return 0;
16916
    }
16917
 
16918
    public int compareTo(refundPayment_result other) {
16919
      if (!getClass().equals(other.getClass())) {
16920
        return getClass().getName().compareTo(other.getClass().getName());
16921
      }
16922
 
16923
      int lastComparison = 0;
16924
      refundPayment_result typedOther = (refundPayment_result)other;
16925
 
16926
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
16927
      if (lastComparison != 0) {
16928
        return lastComparison;
16929
      }
16930
      if (isSetSuccess()) {
16931
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
16932
        if (lastComparison != 0) {
16933
          return lastComparison;
16934
        }
16935
      }
16936
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
16937
      if (lastComparison != 0) {
16938
        return lastComparison;
16939
      }
16940
      if (isSetPe()) {
16941
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
16942
        if (lastComparison != 0) {
16943
          return lastComparison;
16944
        }
16945
      }
16946
      return 0;
16947
    }
16948
 
16949
    public _Fields fieldForId(int fieldId) {
16950
      return _Fields.findByThriftId(fieldId);
16951
    }
16952
 
16953
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
16954
      org.apache.thrift.protocol.TField field;
16955
      iprot.readStructBegin();
16956
      while (true)
16957
      {
16958
        field = iprot.readFieldBegin();
16959
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
16960
          break;
16961
        }
16962
        switch (field.id) {
16963
          case 0: // SUCCESS
16964
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
16965
              this.success = iprot.readBool();
16966
              setSuccessIsSet(true);
16967
            } else { 
16968
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16969
            }
16970
            break;
16971
          case 1: // PE
16972
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
16973
              this.pe = new PaymentException();
16974
              this.pe.read(iprot);
16975
            } else { 
16976
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16977
            }
16978
            break;
16979
          default:
16980
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
16981
        }
16982
        iprot.readFieldEnd();
16983
      }
16984
      iprot.readStructEnd();
16985
      validate();
16986
    }
16987
 
16988
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
16989
      oprot.writeStructBegin(STRUCT_DESC);
16990
 
16991
      if (this.isSetSuccess()) {
16992
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16993
        oprot.writeBool(this.success);
16994
        oprot.writeFieldEnd();
16995
      } else if (this.isSetPe()) {
16996
        oprot.writeFieldBegin(PE_FIELD_DESC);
16997
        this.pe.write(oprot);
16998
        oprot.writeFieldEnd();
16999
      }
17000
      oprot.writeFieldStop();
17001
      oprot.writeStructEnd();
17002
    }
17003
 
17004
    @Override
17005
    public String toString() {
17006
      StringBuilder sb = new StringBuilder("refundPayment_result(");
17007
      boolean first = true;
17008
 
17009
      sb.append("success:");
17010
      sb.append(this.success);
17011
      first = false;
17012
      if (!first) sb.append(", ");
17013
      sb.append("pe:");
17014
      if (this.pe == null) {
17015
        sb.append("null");
17016
      } else {
17017
        sb.append(this.pe);
17018
      }
17019
      first = false;
17020
      sb.append(")");
17021
      return sb.toString();
17022
    }
17023
 
17024
    public void validate() throws org.apache.thrift.TException {
17025
      // check for required fields
17026
    }
17027
 
17028
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17029
      try {
17030
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17031
      } catch (org.apache.thrift.TException te) {
17032
        throw new java.io.IOException(te);
17033
      }
17034
    }
17035
 
17036
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17037
      try {
17038
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17039
      } catch (org.apache.thrift.TException te) {
17040
        throw new java.io.IOException(te);
17041
      }
17042
    }
17043
 
17044
  }
17045
 
3956 chandransh 17046
  public static class partiallyCapturePayment_args implements org.apache.thrift.TBase<partiallyCapturePayment_args, partiallyCapturePayment_args._Fields>, java.io.Serializable, Cloneable   {
17047
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partiallyCapturePayment_args");
17048
 
17049
    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);
17050
    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);
17051
    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);
17052
    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);
17053
    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);
17054
 
17055
    private long merchantTxnId; // required
17056
    private double amount; // required
17057
    private String xferBy; // required
17058
    private String xferTxnId; // required
17059
    private long xferDate; // required
17060
 
17061
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17062
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17063
      MERCHANT_TXN_ID((short)1, "merchantTxnId"),
17064
      AMOUNT((short)2, "amount"),
17065
      XFER_BY((short)3, "xferBy"),
17066
      XFER_TXN_ID((short)4, "xferTxnId"),
17067
      XFER_DATE((short)5, "xferDate");
17068
 
17069
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17070
 
17071
      static {
17072
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17073
          byName.put(field.getFieldName(), field);
17074
        }
17075
      }
17076
 
17077
      /**
17078
       * Find the _Fields constant that matches fieldId, or null if its not found.
17079
       */
17080
      public static _Fields findByThriftId(int fieldId) {
17081
        switch(fieldId) {
17082
          case 1: // MERCHANT_TXN_ID
17083
            return MERCHANT_TXN_ID;
17084
          case 2: // AMOUNT
17085
            return AMOUNT;
17086
          case 3: // XFER_BY
17087
            return XFER_BY;
17088
          case 4: // XFER_TXN_ID
17089
            return XFER_TXN_ID;
17090
          case 5: // XFER_DATE
17091
            return XFER_DATE;
17092
          default:
17093
            return null;
17094
        }
17095
      }
17096
 
17097
      /**
17098
       * Find the _Fields constant that matches fieldId, throwing an exception
17099
       * if it is not found.
17100
       */
17101
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17102
        _Fields fields = findByThriftId(fieldId);
17103
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17104
        return fields;
17105
      }
17106
 
17107
      /**
17108
       * Find the _Fields constant that matches name, or null if its not found.
17109
       */
17110
      public static _Fields findByName(String name) {
17111
        return byName.get(name);
17112
      }
17113
 
17114
      private final short _thriftId;
17115
      private final String _fieldName;
17116
 
17117
      _Fields(short thriftId, String fieldName) {
17118
        _thriftId = thriftId;
17119
        _fieldName = fieldName;
17120
      }
17121
 
17122
      public short getThriftFieldId() {
17123
        return _thriftId;
17124
      }
17125
 
17126
      public String getFieldName() {
17127
        return _fieldName;
17128
      }
17129
    }
17130
 
17131
    // isset id assignments
17132
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
17133
    private static final int __AMOUNT_ISSET_ID = 1;
17134
    private static final int __XFERDATE_ISSET_ID = 2;
17135
    private BitSet __isset_bit_vector = new BitSet(3);
17136
 
17137
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17138
    static {
17139
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17140
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17141
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17142
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17143
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
17144
      tmpMap.put(_Fields.XFER_BY, new org.apache.thrift.meta_data.FieldMetaData("xferBy", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17145
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
17146
      tmpMap.put(_Fields.XFER_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("xferTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17147
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
17148
      tmpMap.put(_Fields.XFER_DATE, new org.apache.thrift.meta_data.FieldMetaData("xferDate", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17149
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
17150
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17151
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partiallyCapturePayment_args.class, metaDataMap);
17152
    }
17153
 
17154
    public partiallyCapturePayment_args() {
17155
    }
17156
 
17157
    public partiallyCapturePayment_args(
17158
      long merchantTxnId,
17159
      double amount,
17160
      String xferBy,
17161
      String xferTxnId,
17162
      long xferDate)
17163
    {
17164
      this();
17165
      this.merchantTxnId = merchantTxnId;
17166
      setMerchantTxnIdIsSet(true);
17167
      this.amount = amount;
17168
      setAmountIsSet(true);
17169
      this.xferBy = xferBy;
17170
      this.xferTxnId = xferTxnId;
17171
      this.xferDate = xferDate;
17172
      setXferDateIsSet(true);
17173
    }
17174
 
17175
    /**
17176
     * Performs a deep copy on <i>other</i>.
17177
     */
17178
    public partiallyCapturePayment_args(partiallyCapturePayment_args other) {
17179
      __isset_bit_vector.clear();
17180
      __isset_bit_vector.or(other.__isset_bit_vector);
17181
      this.merchantTxnId = other.merchantTxnId;
17182
      this.amount = other.amount;
17183
      if (other.isSetXferBy()) {
17184
        this.xferBy = other.xferBy;
17185
      }
17186
      if (other.isSetXferTxnId()) {
17187
        this.xferTxnId = other.xferTxnId;
17188
      }
17189
      this.xferDate = other.xferDate;
17190
    }
17191
 
17192
    public partiallyCapturePayment_args deepCopy() {
17193
      return new partiallyCapturePayment_args(this);
17194
    }
17195
 
17196
    @Override
17197
    public void clear() {
17198
      setMerchantTxnIdIsSet(false);
17199
      this.merchantTxnId = 0;
17200
      setAmountIsSet(false);
17201
      this.amount = 0.0;
17202
      this.xferBy = null;
17203
      this.xferTxnId = null;
17204
      setXferDateIsSet(false);
17205
      this.xferDate = 0;
17206
    }
17207
 
17208
    public long getMerchantTxnId() {
17209
      return this.merchantTxnId;
17210
    }
17211
 
17212
    public void setMerchantTxnId(long merchantTxnId) {
17213
      this.merchantTxnId = merchantTxnId;
17214
      setMerchantTxnIdIsSet(true);
17215
    }
17216
 
17217
    public void unsetMerchantTxnId() {
17218
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
17219
    }
17220
 
17221
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
17222
    public boolean isSetMerchantTxnId() {
17223
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
17224
    }
17225
 
17226
    public void setMerchantTxnIdIsSet(boolean value) {
17227
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
17228
    }
17229
 
17230
    public double getAmount() {
17231
      return this.amount;
17232
    }
17233
 
17234
    public void setAmount(double amount) {
17235
      this.amount = amount;
17236
      setAmountIsSet(true);
17237
    }
17238
 
17239
    public void unsetAmount() {
17240
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
17241
    }
17242
 
17243
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
17244
    public boolean isSetAmount() {
17245
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
17246
    }
17247
 
17248
    public void setAmountIsSet(boolean value) {
17249
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
17250
    }
17251
 
17252
    public String getXferBy() {
17253
      return this.xferBy;
17254
    }
17255
 
17256
    public void setXferBy(String xferBy) {
17257
      this.xferBy = xferBy;
17258
    }
17259
 
17260
    public void unsetXferBy() {
17261
      this.xferBy = null;
17262
    }
17263
 
17264
    /** Returns true if field xferBy is set (has been assigned a value) and false otherwise */
17265
    public boolean isSetXferBy() {
17266
      return this.xferBy != null;
17267
    }
17268
 
17269
    public void setXferByIsSet(boolean value) {
17270
      if (!value) {
17271
        this.xferBy = null;
17272
      }
17273
    }
17274
 
17275
    public String getXferTxnId() {
17276
      return this.xferTxnId;
17277
    }
17278
 
17279
    public void setXferTxnId(String xferTxnId) {
17280
      this.xferTxnId = xferTxnId;
17281
    }
17282
 
17283
    public void unsetXferTxnId() {
17284
      this.xferTxnId = null;
17285
    }
17286
 
17287
    /** Returns true if field xferTxnId is set (has been assigned a value) and false otherwise */
17288
    public boolean isSetXferTxnId() {
17289
      return this.xferTxnId != null;
17290
    }
17291
 
17292
    public void setXferTxnIdIsSet(boolean value) {
17293
      if (!value) {
17294
        this.xferTxnId = null;
17295
      }
17296
    }
17297
 
17298
    public long getXferDate() {
17299
      return this.xferDate;
17300
    }
17301
 
17302
    public void setXferDate(long xferDate) {
17303
      this.xferDate = xferDate;
17304
      setXferDateIsSet(true);
17305
    }
17306
 
17307
    public void unsetXferDate() {
17308
      __isset_bit_vector.clear(__XFERDATE_ISSET_ID);
17309
    }
17310
 
17311
    /** Returns true if field xferDate is set (has been assigned a value) and false otherwise */
17312
    public boolean isSetXferDate() {
17313
      return __isset_bit_vector.get(__XFERDATE_ISSET_ID);
17314
    }
17315
 
17316
    public void setXferDateIsSet(boolean value) {
17317
      __isset_bit_vector.set(__XFERDATE_ISSET_ID, value);
17318
    }
17319
 
17320
    public void setFieldValue(_Fields field, Object value) {
17321
      switch (field) {
17322
      case MERCHANT_TXN_ID:
17323
        if (value == null) {
17324
          unsetMerchantTxnId();
17325
        } else {
17326
          setMerchantTxnId((Long)value);
17327
        }
17328
        break;
17329
 
17330
      case AMOUNT:
17331
        if (value == null) {
17332
          unsetAmount();
17333
        } else {
17334
          setAmount((Double)value);
17335
        }
17336
        break;
17337
 
17338
      case XFER_BY:
17339
        if (value == null) {
17340
          unsetXferBy();
17341
        } else {
17342
          setXferBy((String)value);
17343
        }
17344
        break;
17345
 
17346
      case XFER_TXN_ID:
17347
        if (value == null) {
17348
          unsetXferTxnId();
17349
        } else {
17350
          setXferTxnId((String)value);
17351
        }
17352
        break;
17353
 
17354
      case XFER_DATE:
17355
        if (value == null) {
17356
          unsetXferDate();
17357
        } else {
17358
          setXferDate((Long)value);
17359
        }
17360
        break;
17361
 
17362
      }
17363
    }
17364
 
17365
    public Object getFieldValue(_Fields field) {
17366
      switch (field) {
17367
      case MERCHANT_TXN_ID:
17368
        return Long.valueOf(getMerchantTxnId());
17369
 
17370
      case AMOUNT:
17371
        return Double.valueOf(getAmount());
17372
 
17373
      case XFER_BY:
17374
        return getXferBy();
17375
 
17376
      case XFER_TXN_ID:
17377
        return getXferTxnId();
17378
 
17379
      case XFER_DATE:
17380
        return Long.valueOf(getXferDate());
17381
 
17382
      }
17383
      throw new IllegalStateException();
17384
    }
17385
 
17386
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17387
    public boolean isSet(_Fields field) {
17388
      if (field == null) {
17389
        throw new IllegalArgumentException();
17390
      }
17391
 
17392
      switch (field) {
17393
      case MERCHANT_TXN_ID:
17394
        return isSetMerchantTxnId();
17395
      case AMOUNT:
17396
        return isSetAmount();
17397
      case XFER_BY:
17398
        return isSetXferBy();
17399
      case XFER_TXN_ID:
17400
        return isSetXferTxnId();
17401
      case XFER_DATE:
17402
        return isSetXferDate();
17403
      }
17404
      throw new IllegalStateException();
17405
    }
17406
 
17407
    @Override
17408
    public boolean equals(Object that) {
17409
      if (that == null)
17410
        return false;
17411
      if (that instanceof partiallyCapturePayment_args)
17412
        return this.equals((partiallyCapturePayment_args)that);
17413
      return false;
17414
    }
17415
 
17416
    public boolean equals(partiallyCapturePayment_args that) {
17417
      if (that == null)
17418
        return false;
17419
 
17420
      boolean this_present_merchantTxnId = true;
17421
      boolean that_present_merchantTxnId = true;
17422
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
17423
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
17424
          return false;
17425
        if (this.merchantTxnId != that.merchantTxnId)
17426
          return false;
17427
      }
17428
 
17429
      boolean this_present_amount = true;
17430
      boolean that_present_amount = true;
17431
      if (this_present_amount || that_present_amount) {
17432
        if (!(this_present_amount && that_present_amount))
17433
          return false;
17434
        if (this.amount != that.amount)
17435
          return false;
17436
      }
17437
 
17438
      boolean this_present_xferBy = true && this.isSetXferBy();
17439
      boolean that_present_xferBy = true && that.isSetXferBy();
17440
      if (this_present_xferBy || that_present_xferBy) {
17441
        if (!(this_present_xferBy && that_present_xferBy))
17442
          return false;
17443
        if (!this.xferBy.equals(that.xferBy))
17444
          return false;
17445
      }
17446
 
17447
      boolean this_present_xferTxnId = true && this.isSetXferTxnId();
17448
      boolean that_present_xferTxnId = true && that.isSetXferTxnId();
17449
      if (this_present_xferTxnId || that_present_xferTxnId) {
17450
        if (!(this_present_xferTxnId && that_present_xferTxnId))
17451
          return false;
17452
        if (!this.xferTxnId.equals(that.xferTxnId))
17453
          return false;
17454
      }
17455
 
17456
      boolean this_present_xferDate = true;
17457
      boolean that_present_xferDate = true;
17458
      if (this_present_xferDate || that_present_xferDate) {
17459
        if (!(this_present_xferDate && that_present_xferDate))
17460
          return false;
17461
        if (this.xferDate != that.xferDate)
17462
          return false;
17463
      }
17464
 
17465
      return true;
17466
    }
17467
 
17468
    @Override
17469
    public int hashCode() {
17470
      return 0;
17471
    }
17472
 
17473
    public int compareTo(partiallyCapturePayment_args other) {
17474
      if (!getClass().equals(other.getClass())) {
17475
        return getClass().getName().compareTo(other.getClass().getName());
17476
      }
17477
 
17478
      int lastComparison = 0;
17479
      partiallyCapturePayment_args typedOther = (partiallyCapturePayment_args)other;
17480
 
17481
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
17482
      if (lastComparison != 0) {
17483
        return lastComparison;
17484
      }
17485
      if (isSetMerchantTxnId()) {
17486
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
17487
        if (lastComparison != 0) {
17488
          return lastComparison;
17489
        }
17490
      }
17491
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
17492
      if (lastComparison != 0) {
17493
        return lastComparison;
17494
      }
17495
      if (isSetAmount()) {
17496
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
17497
        if (lastComparison != 0) {
17498
          return lastComparison;
17499
        }
17500
      }
17501
      lastComparison = Boolean.valueOf(isSetXferBy()).compareTo(typedOther.isSetXferBy());
17502
      if (lastComparison != 0) {
17503
        return lastComparison;
17504
      }
17505
      if (isSetXferBy()) {
17506
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.xferBy, typedOther.xferBy);
17507
        if (lastComparison != 0) {
17508
          return lastComparison;
17509
        }
17510
      }
17511
      lastComparison = Boolean.valueOf(isSetXferTxnId()).compareTo(typedOther.isSetXferTxnId());
17512
      if (lastComparison != 0) {
17513
        return lastComparison;
17514
      }
17515
      if (isSetXferTxnId()) {
17516
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.xferTxnId, typedOther.xferTxnId);
17517
        if (lastComparison != 0) {
17518
          return lastComparison;
17519
        }
17520
      }
17521
      lastComparison = Boolean.valueOf(isSetXferDate()).compareTo(typedOther.isSetXferDate());
17522
      if (lastComparison != 0) {
17523
        return lastComparison;
17524
      }
17525
      if (isSetXferDate()) {
17526
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.xferDate, typedOther.xferDate);
17527
        if (lastComparison != 0) {
17528
          return lastComparison;
17529
        }
17530
      }
17531
      return 0;
17532
    }
17533
 
17534
    public _Fields fieldForId(int fieldId) {
17535
      return _Fields.findByThriftId(fieldId);
17536
    }
17537
 
17538
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17539
      org.apache.thrift.protocol.TField field;
17540
      iprot.readStructBegin();
17541
      while (true)
17542
      {
17543
        field = iprot.readFieldBegin();
17544
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17545
          break;
17546
        }
17547
        switch (field.id) {
17548
          case 1: // MERCHANT_TXN_ID
17549
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17550
              this.merchantTxnId = iprot.readI64();
17551
              setMerchantTxnIdIsSet(true);
17552
            } else { 
17553
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17554
            }
17555
            break;
17556
          case 2: // AMOUNT
17557
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
17558
              this.amount = iprot.readDouble();
17559
              setAmountIsSet(true);
17560
            } else { 
17561
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17562
            }
17563
            break;
17564
          case 3: // XFER_BY
17565
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
17566
              this.xferBy = iprot.readString();
17567
            } else { 
17568
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17569
            }
17570
            break;
17571
          case 4: // XFER_TXN_ID
17572
            if (field.type == org.apache.thrift.protocol.TType.STRING) {
17573
              this.xferTxnId = iprot.readString();
17574
            } else { 
17575
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17576
            }
17577
            break;
17578
          case 5: // XFER_DATE
17579
            if (field.type == org.apache.thrift.protocol.TType.I64) {
17580
              this.xferDate = iprot.readI64();
17581
              setXferDateIsSet(true);
17582
            } else { 
17583
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17584
            }
17585
            break;
17586
          default:
17587
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17588
        }
17589
        iprot.readFieldEnd();
17590
      }
17591
      iprot.readStructEnd();
17592
      validate();
17593
    }
17594
 
17595
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
17596
      validate();
17597
 
17598
      oprot.writeStructBegin(STRUCT_DESC);
17599
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
17600
      oprot.writeI64(this.merchantTxnId);
17601
      oprot.writeFieldEnd();
17602
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
17603
      oprot.writeDouble(this.amount);
17604
      oprot.writeFieldEnd();
17605
      if (this.xferBy != null) {
17606
        oprot.writeFieldBegin(XFER_BY_FIELD_DESC);
17607
        oprot.writeString(this.xferBy);
17608
        oprot.writeFieldEnd();
17609
      }
17610
      if (this.xferTxnId != null) {
17611
        oprot.writeFieldBegin(XFER_TXN_ID_FIELD_DESC);
17612
        oprot.writeString(this.xferTxnId);
17613
        oprot.writeFieldEnd();
17614
      }
17615
      oprot.writeFieldBegin(XFER_DATE_FIELD_DESC);
17616
      oprot.writeI64(this.xferDate);
17617
      oprot.writeFieldEnd();
17618
      oprot.writeFieldStop();
17619
      oprot.writeStructEnd();
17620
    }
17621
 
17622
    @Override
17623
    public String toString() {
17624
      StringBuilder sb = new StringBuilder("partiallyCapturePayment_args(");
17625
      boolean first = true;
17626
 
17627
      sb.append("merchantTxnId:");
17628
      sb.append(this.merchantTxnId);
17629
      first = false;
17630
      if (!first) sb.append(", ");
17631
      sb.append("amount:");
17632
      sb.append(this.amount);
17633
      first = false;
17634
      if (!first) sb.append(", ");
17635
      sb.append("xferBy:");
17636
      if (this.xferBy == null) {
17637
        sb.append("null");
17638
      } else {
17639
        sb.append(this.xferBy);
17640
      }
17641
      first = false;
17642
      if (!first) sb.append(", ");
17643
      sb.append("xferTxnId:");
17644
      if (this.xferTxnId == null) {
17645
        sb.append("null");
17646
      } else {
17647
        sb.append(this.xferTxnId);
17648
      }
17649
      first = false;
17650
      if (!first) sb.append(", ");
17651
      sb.append("xferDate:");
17652
      sb.append(this.xferDate);
17653
      first = false;
17654
      sb.append(")");
17655
      return sb.toString();
17656
    }
17657
 
17658
    public void validate() throws org.apache.thrift.TException {
17659
      // check for required fields
17660
    }
17661
 
17662
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
17663
      try {
17664
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
17665
      } catch (org.apache.thrift.TException te) {
17666
        throw new java.io.IOException(te);
17667
      }
17668
    }
17669
 
17670
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
17671
      try {
17672
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
17673
      } catch (org.apache.thrift.TException te) {
17674
        throw new java.io.IOException(te);
17675
      }
17676
    }
17677
 
17678
  }
17679
 
17680
  public static class partiallyCapturePayment_result implements org.apache.thrift.TBase<partiallyCapturePayment_result, partiallyCapturePayment_result._Fields>, java.io.Serializable, Cloneable   {
17681
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("partiallyCapturePayment_result");
17682
 
17683
    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);
17684
    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);
17685
 
17686
    private boolean success; // required
17687
    private PaymentException pe; // required
17688
 
17689
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17690
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
17691
      SUCCESS((short)0, "success"),
17692
      PE((short)1, "pe");
17693
 
17694
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17695
 
17696
      static {
17697
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17698
          byName.put(field.getFieldName(), field);
17699
        }
17700
      }
17701
 
17702
      /**
17703
       * Find the _Fields constant that matches fieldId, or null if its not found.
17704
       */
17705
      public static _Fields findByThriftId(int fieldId) {
17706
        switch(fieldId) {
17707
          case 0: // SUCCESS
17708
            return SUCCESS;
17709
          case 1: // PE
17710
            return PE;
17711
          default:
17712
            return null;
17713
        }
17714
      }
17715
 
17716
      /**
17717
       * Find the _Fields constant that matches fieldId, throwing an exception
17718
       * if it is not found.
17719
       */
17720
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17721
        _Fields fields = findByThriftId(fieldId);
17722
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17723
        return fields;
17724
      }
17725
 
17726
      /**
17727
       * Find the _Fields constant that matches name, or null if its not found.
17728
       */
17729
      public static _Fields findByName(String name) {
17730
        return byName.get(name);
17731
      }
17732
 
17733
      private final short _thriftId;
17734
      private final String _fieldName;
17735
 
17736
      _Fields(short thriftId, String fieldName) {
17737
        _thriftId = thriftId;
17738
        _fieldName = fieldName;
17739
      }
17740
 
17741
      public short getThriftFieldId() {
17742
        return _thriftId;
17743
      }
17744
 
17745
      public String getFieldName() {
17746
        return _fieldName;
17747
      }
17748
    }
17749
 
17750
    // isset id assignments
17751
    private static final int __SUCCESS_ISSET_ID = 0;
17752
    private BitSet __isset_bit_vector = new BitSet(1);
17753
 
17754
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
17755
    static {
17756
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
17757
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17758
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
17759
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
17760
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
17761
      metaDataMap = Collections.unmodifiableMap(tmpMap);
17762
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(partiallyCapturePayment_result.class, metaDataMap);
17763
    }
17764
 
17765
    public partiallyCapturePayment_result() {
17766
    }
17767
 
17768
    public partiallyCapturePayment_result(
17769
      boolean success,
17770
      PaymentException pe)
17771
    {
17772
      this();
17773
      this.success = success;
17774
      setSuccessIsSet(true);
17775
      this.pe = pe;
17776
    }
17777
 
17778
    /**
17779
     * Performs a deep copy on <i>other</i>.
17780
     */
17781
    public partiallyCapturePayment_result(partiallyCapturePayment_result other) {
17782
      __isset_bit_vector.clear();
17783
      __isset_bit_vector.or(other.__isset_bit_vector);
17784
      this.success = other.success;
17785
      if (other.isSetPe()) {
17786
        this.pe = new PaymentException(other.pe);
17787
      }
17788
    }
17789
 
17790
    public partiallyCapturePayment_result deepCopy() {
17791
      return new partiallyCapturePayment_result(this);
17792
    }
17793
 
17794
    @Override
17795
    public void clear() {
17796
      setSuccessIsSet(false);
17797
      this.success = false;
17798
      this.pe = null;
17799
    }
17800
 
17801
    public boolean isSuccess() {
17802
      return this.success;
17803
    }
17804
 
17805
    public void setSuccess(boolean success) {
17806
      this.success = success;
17807
      setSuccessIsSet(true);
17808
    }
17809
 
17810
    public void unsetSuccess() {
17811
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17812
    }
17813
 
17814
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
17815
    public boolean isSetSuccess() {
17816
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17817
    }
17818
 
17819
    public void setSuccessIsSet(boolean value) {
17820
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17821
    }
17822
 
17823
    public PaymentException getPe() {
17824
      return this.pe;
17825
    }
17826
 
17827
    public void setPe(PaymentException pe) {
17828
      this.pe = pe;
17829
    }
17830
 
17831
    public void unsetPe() {
17832
      this.pe = null;
17833
    }
17834
 
17835
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
17836
    public boolean isSetPe() {
17837
      return this.pe != null;
17838
    }
17839
 
17840
    public void setPeIsSet(boolean value) {
17841
      if (!value) {
17842
        this.pe = null;
17843
      }
17844
    }
17845
 
17846
    public void setFieldValue(_Fields field, Object value) {
17847
      switch (field) {
17848
      case SUCCESS:
17849
        if (value == null) {
17850
          unsetSuccess();
17851
        } else {
17852
          setSuccess((Boolean)value);
17853
        }
17854
        break;
17855
 
17856
      case PE:
17857
        if (value == null) {
17858
          unsetPe();
17859
        } else {
17860
          setPe((PaymentException)value);
17861
        }
17862
        break;
17863
 
17864
      }
17865
    }
17866
 
17867
    public Object getFieldValue(_Fields field) {
17868
      switch (field) {
17869
      case SUCCESS:
17870
        return Boolean.valueOf(isSuccess());
17871
 
17872
      case PE:
17873
        return getPe();
17874
 
17875
      }
17876
      throw new IllegalStateException();
17877
    }
17878
 
17879
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
17880
    public boolean isSet(_Fields field) {
17881
      if (field == null) {
17882
        throw new IllegalArgumentException();
17883
      }
17884
 
17885
      switch (field) {
17886
      case SUCCESS:
17887
        return isSetSuccess();
17888
      case PE:
17889
        return isSetPe();
17890
      }
17891
      throw new IllegalStateException();
17892
    }
17893
 
17894
    @Override
17895
    public boolean equals(Object that) {
17896
      if (that == null)
17897
        return false;
17898
      if (that instanceof partiallyCapturePayment_result)
17899
        return this.equals((partiallyCapturePayment_result)that);
17900
      return false;
17901
    }
17902
 
17903
    public boolean equals(partiallyCapturePayment_result that) {
17904
      if (that == null)
17905
        return false;
17906
 
17907
      boolean this_present_success = true;
17908
      boolean that_present_success = true;
17909
      if (this_present_success || that_present_success) {
17910
        if (!(this_present_success && that_present_success))
17911
          return false;
17912
        if (this.success != that.success)
17913
          return false;
17914
      }
17915
 
17916
      boolean this_present_pe = true && this.isSetPe();
17917
      boolean that_present_pe = true && that.isSetPe();
17918
      if (this_present_pe || that_present_pe) {
17919
        if (!(this_present_pe && that_present_pe))
17920
          return false;
17921
        if (!this.pe.equals(that.pe))
17922
          return false;
17923
      }
17924
 
17925
      return true;
17926
    }
17927
 
17928
    @Override
17929
    public int hashCode() {
17930
      return 0;
17931
    }
17932
 
17933
    public int compareTo(partiallyCapturePayment_result other) {
17934
      if (!getClass().equals(other.getClass())) {
17935
        return getClass().getName().compareTo(other.getClass().getName());
17936
      }
17937
 
17938
      int lastComparison = 0;
17939
      partiallyCapturePayment_result typedOther = (partiallyCapturePayment_result)other;
17940
 
17941
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
17942
      if (lastComparison != 0) {
17943
        return lastComparison;
17944
      }
17945
      if (isSetSuccess()) {
17946
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
17947
        if (lastComparison != 0) {
17948
          return lastComparison;
17949
        }
17950
      }
17951
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
17952
      if (lastComparison != 0) {
17953
        return lastComparison;
17954
      }
17955
      if (isSetPe()) {
17956
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
17957
        if (lastComparison != 0) {
17958
          return lastComparison;
17959
        }
17960
      }
17961
      return 0;
17962
    }
17963
 
17964
    public _Fields fieldForId(int fieldId) {
17965
      return _Fields.findByThriftId(fieldId);
17966
    }
17967
 
17968
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
17969
      org.apache.thrift.protocol.TField field;
17970
      iprot.readStructBegin();
17971
      while (true)
17972
      {
17973
        field = iprot.readFieldBegin();
17974
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
17975
          break;
17976
        }
17977
        switch (field.id) {
17978
          case 0: // SUCCESS
17979
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
17980
              this.success = iprot.readBool();
17981
              setSuccessIsSet(true);
17982
            } else { 
17983
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17984
            }
17985
            break;
17986
          case 1: // PE
17987
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
17988
              this.pe = new PaymentException();
17989
              this.pe.read(iprot);
17990
            } else { 
17991
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17992
            }
17993
            break;
17994
          default:
17995
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
17996
        }
17997
        iprot.readFieldEnd();
17998
      }
17999
      iprot.readStructEnd();
18000
      validate();
18001
    }
18002
 
18003
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18004
      oprot.writeStructBegin(STRUCT_DESC);
18005
 
18006
      if (this.isSetSuccess()) {
18007
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18008
        oprot.writeBool(this.success);
18009
        oprot.writeFieldEnd();
18010
      } else if (this.isSetPe()) {
18011
        oprot.writeFieldBegin(PE_FIELD_DESC);
18012
        this.pe.write(oprot);
18013
        oprot.writeFieldEnd();
18014
      }
18015
      oprot.writeFieldStop();
18016
      oprot.writeStructEnd();
18017
    }
18018
 
18019
    @Override
18020
    public String toString() {
18021
      StringBuilder sb = new StringBuilder("partiallyCapturePayment_result(");
18022
      boolean first = true;
18023
 
18024
      sb.append("success:");
18025
      sb.append(this.success);
18026
      first = false;
18027
      if (!first) sb.append(", ");
18028
      sb.append("pe:");
18029
      if (this.pe == null) {
18030
        sb.append("null");
18031
      } else {
18032
        sb.append(this.pe);
18033
      }
18034
      first = false;
18035
      sb.append(")");
18036
      return sb.toString();
18037
    }
18038
 
18039
    public void validate() throws org.apache.thrift.TException {
18040
      // check for required fields
18041
    }
18042
 
18043
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18044
      try {
18045
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18046
      } catch (org.apache.thrift.TException te) {
18047
        throw new java.io.IOException(te);
18048
      }
18049
    }
18050
 
18051
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18052
      try {
18053
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18054
      } catch (org.apache.thrift.TException te) {
18055
        throw new java.io.IOException(te);
18056
      }
18057
    }
18058
 
18059
  }
18060
 
4008 mandeep.dh 18061
  public static class getPaymentsRequiringExtraProcessing_args implements org.apache.thrift.TBase<getPaymentsRequiringExtraProcessing_args, getPaymentsRequiringExtraProcessing_args._Fields>, java.io.Serializable, Cloneable   {
18062
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsRequiringExtraProcessing_args");
18063
 
18064
    private static final org.apache.thrift.protocol.TField CATEGORY_FIELD_DESC = new org.apache.thrift.protocol.TField("category", org.apache.thrift.protocol.TType.I32, (short)1);
18065
 
18066
    private ExtraPaymentProcessingType category; // required
18067
 
18068
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18069
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18070
      /**
18071
       * 
18072
       * @see ExtraPaymentProcessingType
18073
       */
18074
      CATEGORY((short)1, "category");
18075
 
18076
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18077
 
18078
      static {
18079
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18080
          byName.put(field.getFieldName(), field);
18081
        }
18082
      }
18083
 
18084
      /**
18085
       * Find the _Fields constant that matches fieldId, or null if its not found.
18086
       */
18087
      public static _Fields findByThriftId(int fieldId) {
18088
        switch(fieldId) {
18089
          case 1: // CATEGORY
18090
            return CATEGORY;
18091
          default:
18092
            return null;
18093
        }
18094
      }
18095
 
18096
      /**
18097
       * Find the _Fields constant that matches fieldId, throwing an exception
18098
       * if it is not found.
18099
       */
18100
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18101
        _Fields fields = findByThriftId(fieldId);
18102
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18103
        return fields;
18104
      }
18105
 
18106
      /**
18107
       * Find the _Fields constant that matches name, or null if its not found.
18108
       */
18109
      public static _Fields findByName(String name) {
18110
        return byName.get(name);
18111
      }
18112
 
18113
      private final short _thriftId;
18114
      private final String _fieldName;
18115
 
18116
      _Fields(short thriftId, String fieldName) {
18117
        _thriftId = thriftId;
18118
        _fieldName = fieldName;
18119
      }
18120
 
18121
      public short getThriftFieldId() {
18122
        return _thriftId;
18123
      }
18124
 
18125
      public String getFieldName() {
18126
        return _fieldName;
18127
      }
18128
    }
18129
 
18130
    // isset id assignments
18131
 
18132
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18133
    static {
18134
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18135
      tmpMap.put(_Fields.CATEGORY, new org.apache.thrift.meta_data.FieldMetaData("category", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18136
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ExtraPaymentProcessingType.class)));
18137
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18138
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsRequiringExtraProcessing_args.class, metaDataMap);
18139
    }
18140
 
18141
    public getPaymentsRequiringExtraProcessing_args() {
18142
    }
18143
 
18144
    public getPaymentsRequiringExtraProcessing_args(
18145
      ExtraPaymentProcessingType category)
18146
    {
18147
      this();
18148
      this.category = category;
18149
    }
18150
 
18151
    /**
18152
     * Performs a deep copy on <i>other</i>.
18153
     */
18154
    public getPaymentsRequiringExtraProcessing_args(getPaymentsRequiringExtraProcessing_args other) {
18155
      if (other.isSetCategory()) {
18156
        this.category = other.category;
18157
      }
18158
    }
18159
 
18160
    public getPaymentsRequiringExtraProcessing_args deepCopy() {
18161
      return new getPaymentsRequiringExtraProcessing_args(this);
18162
    }
18163
 
18164
    @Override
18165
    public void clear() {
18166
      this.category = null;
18167
    }
18168
 
18169
    /**
18170
     * 
18171
     * @see ExtraPaymentProcessingType
18172
     */
18173
    public ExtraPaymentProcessingType getCategory() {
18174
      return this.category;
18175
    }
18176
 
18177
    /**
18178
     * 
18179
     * @see ExtraPaymentProcessingType
18180
     */
18181
    public void setCategory(ExtraPaymentProcessingType category) {
18182
      this.category = category;
18183
    }
18184
 
18185
    public void unsetCategory() {
18186
      this.category = null;
18187
    }
18188
 
18189
    /** Returns true if field category is set (has been assigned a value) and false otherwise */
18190
    public boolean isSetCategory() {
18191
      return this.category != null;
18192
    }
18193
 
18194
    public void setCategoryIsSet(boolean value) {
18195
      if (!value) {
18196
        this.category = null;
18197
      }
18198
    }
18199
 
18200
    public void setFieldValue(_Fields field, Object value) {
18201
      switch (field) {
18202
      case CATEGORY:
18203
        if (value == null) {
18204
          unsetCategory();
18205
        } else {
18206
          setCategory((ExtraPaymentProcessingType)value);
18207
        }
18208
        break;
18209
 
18210
      }
18211
    }
18212
 
18213
    public Object getFieldValue(_Fields field) {
18214
      switch (field) {
18215
      case CATEGORY:
18216
        return getCategory();
18217
 
18218
      }
18219
      throw new IllegalStateException();
18220
    }
18221
 
18222
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18223
    public boolean isSet(_Fields field) {
18224
      if (field == null) {
18225
        throw new IllegalArgumentException();
18226
      }
18227
 
18228
      switch (field) {
18229
      case CATEGORY:
18230
        return isSetCategory();
18231
      }
18232
      throw new IllegalStateException();
18233
    }
18234
 
18235
    @Override
18236
    public boolean equals(Object that) {
18237
      if (that == null)
18238
        return false;
18239
      if (that instanceof getPaymentsRequiringExtraProcessing_args)
18240
        return this.equals((getPaymentsRequiringExtraProcessing_args)that);
18241
      return false;
18242
    }
18243
 
18244
    public boolean equals(getPaymentsRequiringExtraProcessing_args that) {
18245
      if (that == null)
18246
        return false;
18247
 
18248
      boolean this_present_category = true && this.isSetCategory();
18249
      boolean that_present_category = true && that.isSetCategory();
18250
      if (this_present_category || that_present_category) {
18251
        if (!(this_present_category && that_present_category))
18252
          return false;
18253
        if (!this.category.equals(that.category))
18254
          return false;
18255
      }
18256
 
18257
      return true;
18258
    }
18259
 
18260
    @Override
18261
    public int hashCode() {
18262
      return 0;
18263
    }
18264
 
18265
    public int compareTo(getPaymentsRequiringExtraProcessing_args other) {
18266
      if (!getClass().equals(other.getClass())) {
18267
        return getClass().getName().compareTo(other.getClass().getName());
18268
      }
18269
 
18270
      int lastComparison = 0;
18271
      getPaymentsRequiringExtraProcessing_args typedOther = (getPaymentsRequiringExtraProcessing_args)other;
18272
 
18273
      lastComparison = Boolean.valueOf(isSetCategory()).compareTo(typedOther.isSetCategory());
18274
      if (lastComparison != 0) {
18275
        return lastComparison;
18276
      }
18277
      if (isSetCategory()) {
18278
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.category, typedOther.category);
18279
        if (lastComparison != 0) {
18280
          return lastComparison;
18281
        }
18282
      }
18283
      return 0;
18284
    }
18285
 
18286
    public _Fields fieldForId(int fieldId) {
18287
      return _Fields.findByThriftId(fieldId);
18288
    }
18289
 
18290
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18291
      org.apache.thrift.protocol.TField field;
18292
      iprot.readStructBegin();
18293
      while (true)
18294
      {
18295
        field = iprot.readFieldBegin();
18296
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18297
          break;
18298
        }
18299
        switch (field.id) {
18300
          case 1: // CATEGORY
18301
            if (field.type == org.apache.thrift.protocol.TType.I32) {
18302
              this.category = ExtraPaymentProcessingType.findByValue(iprot.readI32());
18303
            } else { 
18304
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18305
            }
18306
            break;
18307
          default:
18308
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18309
        }
18310
        iprot.readFieldEnd();
18311
      }
18312
      iprot.readStructEnd();
18313
      validate();
18314
    }
18315
 
18316
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18317
      validate();
18318
 
18319
      oprot.writeStructBegin(STRUCT_DESC);
18320
      if (this.category != null) {
18321
        oprot.writeFieldBegin(CATEGORY_FIELD_DESC);
18322
        oprot.writeI32(this.category.getValue());
18323
        oprot.writeFieldEnd();
18324
      }
18325
      oprot.writeFieldStop();
18326
      oprot.writeStructEnd();
18327
    }
18328
 
18329
    @Override
18330
    public String toString() {
18331
      StringBuilder sb = new StringBuilder("getPaymentsRequiringExtraProcessing_args(");
18332
      boolean first = true;
18333
 
18334
      sb.append("category:");
18335
      if (this.category == null) {
18336
        sb.append("null");
18337
      } else {
18338
        sb.append(this.category);
18339
      }
18340
      first = false;
18341
      sb.append(")");
18342
      return sb.toString();
18343
    }
18344
 
18345
    public void validate() throws org.apache.thrift.TException {
18346
      // check for required fields
18347
    }
18348
 
18349
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18350
      try {
18351
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18352
      } catch (org.apache.thrift.TException te) {
18353
        throw new java.io.IOException(te);
18354
      }
18355
    }
18356
 
18357
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18358
      try {
18359
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18360
      } catch (org.apache.thrift.TException te) {
18361
        throw new java.io.IOException(te);
18362
      }
18363
    }
18364
 
18365
  }
18366
 
18367
  public static class getPaymentsRequiringExtraProcessing_result implements org.apache.thrift.TBase<getPaymentsRequiringExtraProcessing_result, getPaymentsRequiringExtraProcessing_result._Fields>, java.io.Serializable, Cloneable   {
18368
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("getPaymentsRequiringExtraProcessing_result");
18369
 
18370
    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);
18371
 
18372
    private List<Long> success; // required
18373
 
18374
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18375
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18376
      SUCCESS((short)0, "success");
18377
 
18378
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18379
 
18380
      static {
18381
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18382
          byName.put(field.getFieldName(), field);
18383
        }
18384
      }
18385
 
18386
      /**
18387
       * Find the _Fields constant that matches fieldId, or null if its not found.
18388
       */
18389
      public static _Fields findByThriftId(int fieldId) {
18390
        switch(fieldId) {
18391
          case 0: // SUCCESS
18392
            return SUCCESS;
18393
          default:
18394
            return null;
18395
        }
18396
      }
18397
 
18398
      /**
18399
       * Find the _Fields constant that matches fieldId, throwing an exception
18400
       * if it is not found.
18401
       */
18402
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18403
        _Fields fields = findByThriftId(fieldId);
18404
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18405
        return fields;
18406
      }
18407
 
18408
      /**
18409
       * Find the _Fields constant that matches name, or null if its not found.
18410
       */
18411
      public static _Fields findByName(String name) {
18412
        return byName.get(name);
18413
      }
18414
 
18415
      private final short _thriftId;
18416
      private final String _fieldName;
18417
 
18418
      _Fields(short thriftId, String fieldName) {
18419
        _thriftId = thriftId;
18420
        _fieldName = fieldName;
18421
      }
18422
 
18423
      public short getThriftFieldId() {
18424
        return _thriftId;
18425
      }
18426
 
18427
      public String getFieldName() {
18428
        return _fieldName;
18429
      }
18430
    }
18431
 
18432
    // isset id assignments
18433
 
18434
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18435
    static {
18436
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18437
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18438
          new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, 
18439
              new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64))));
18440
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18441
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getPaymentsRequiringExtraProcessing_result.class, metaDataMap);
18442
    }
18443
 
18444
    public getPaymentsRequiringExtraProcessing_result() {
18445
    }
18446
 
18447
    public getPaymentsRequiringExtraProcessing_result(
18448
      List<Long> success)
18449
    {
18450
      this();
18451
      this.success = success;
18452
    }
18453
 
18454
    /**
18455
     * Performs a deep copy on <i>other</i>.
18456
     */
18457
    public getPaymentsRequiringExtraProcessing_result(getPaymentsRequiringExtraProcessing_result other) {
18458
      if (other.isSetSuccess()) {
18459
        List<Long> __this__success = new ArrayList<Long>();
18460
        for (Long other_element : other.success) {
18461
          __this__success.add(other_element);
18462
        }
18463
        this.success = __this__success;
18464
      }
18465
    }
18466
 
18467
    public getPaymentsRequiringExtraProcessing_result deepCopy() {
18468
      return new getPaymentsRequiringExtraProcessing_result(this);
18469
    }
18470
 
18471
    @Override
18472
    public void clear() {
18473
      this.success = null;
18474
    }
18475
 
18476
    public int getSuccessSize() {
18477
      return (this.success == null) ? 0 : this.success.size();
18478
    }
18479
 
18480
    public java.util.Iterator<Long> getSuccessIterator() {
18481
      return (this.success == null) ? null : this.success.iterator();
18482
    }
18483
 
18484
    public void addToSuccess(long elem) {
18485
      if (this.success == null) {
18486
        this.success = new ArrayList<Long>();
18487
      }
18488
      this.success.add(elem);
18489
    }
18490
 
18491
    public List<Long> getSuccess() {
18492
      return this.success;
18493
    }
18494
 
18495
    public void setSuccess(List<Long> success) {
18496
      this.success = success;
18497
    }
18498
 
18499
    public void unsetSuccess() {
18500
      this.success = null;
18501
    }
18502
 
18503
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
18504
    public boolean isSetSuccess() {
18505
      return this.success != null;
18506
    }
18507
 
18508
    public void setSuccessIsSet(boolean value) {
18509
      if (!value) {
18510
        this.success = null;
18511
      }
18512
    }
18513
 
18514
    public void setFieldValue(_Fields field, Object value) {
18515
      switch (field) {
18516
      case SUCCESS:
18517
        if (value == null) {
18518
          unsetSuccess();
18519
        } else {
18520
          setSuccess((List<Long>)value);
18521
        }
18522
        break;
18523
 
18524
      }
18525
    }
18526
 
18527
    public Object getFieldValue(_Fields field) {
18528
      switch (field) {
18529
      case SUCCESS:
18530
        return getSuccess();
18531
 
18532
      }
18533
      throw new IllegalStateException();
18534
    }
18535
 
18536
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18537
    public boolean isSet(_Fields field) {
18538
      if (field == null) {
18539
        throw new IllegalArgumentException();
18540
      }
18541
 
18542
      switch (field) {
18543
      case SUCCESS:
18544
        return isSetSuccess();
18545
      }
18546
      throw new IllegalStateException();
18547
    }
18548
 
18549
    @Override
18550
    public boolean equals(Object that) {
18551
      if (that == null)
18552
        return false;
18553
      if (that instanceof getPaymentsRequiringExtraProcessing_result)
18554
        return this.equals((getPaymentsRequiringExtraProcessing_result)that);
18555
      return false;
18556
    }
18557
 
18558
    public boolean equals(getPaymentsRequiringExtraProcessing_result that) {
18559
      if (that == null)
18560
        return false;
18561
 
18562
      boolean this_present_success = true && this.isSetSuccess();
18563
      boolean that_present_success = true && that.isSetSuccess();
18564
      if (this_present_success || that_present_success) {
18565
        if (!(this_present_success && that_present_success))
18566
          return false;
18567
        if (!this.success.equals(that.success))
18568
          return false;
18569
      }
18570
 
18571
      return true;
18572
    }
18573
 
18574
    @Override
18575
    public int hashCode() {
18576
      return 0;
18577
    }
18578
 
18579
    public int compareTo(getPaymentsRequiringExtraProcessing_result other) {
18580
      if (!getClass().equals(other.getClass())) {
18581
        return getClass().getName().compareTo(other.getClass().getName());
18582
      }
18583
 
18584
      int lastComparison = 0;
18585
      getPaymentsRequiringExtraProcessing_result typedOther = (getPaymentsRequiringExtraProcessing_result)other;
18586
 
18587
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
18588
      if (lastComparison != 0) {
18589
        return lastComparison;
18590
      }
18591
      if (isSetSuccess()) {
18592
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
18593
        if (lastComparison != 0) {
18594
          return lastComparison;
18595
        }
18596
      }
18597
      return 0;
18598
    }
18599
 
18600
    public _Fields fieldForId(int fieldId) {
18601
      return _Fields.findByThriftId(fieldId);
18602
    }
18603
 
18604
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18605
      org.apache.thrift.protocol.TField field;
18606
      iprot.readStructBegin();
18607
      while (true)
18608
      {
18609
        field = iprot.readFieldBegin();
18610
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
18611
          break;
18612
        }
18613
        switch (field.id) {
18614
          case 0: // SUCCESS
18615
            if (field.type == org.apache.thrift.protocol.TType.LIST) {
18616
              {
7049 anupam.sin 18617
                org.apache.thrift.protocol.TList _list44 = iprot.readListBegin();
18618
                this.success = new ArrayList<Long>(_list44.size);
18619
                for (int _i45 = 0; _i45 < _list44.size; ++_i45)
4008 mandeep.dh 18620
                {
7049 anupam.sin 18621
                  long _elem46; // required
18622
                  _elem46 = iprot.readI64();
18623
                  this.success.add(_elem46);
4008 mandeep.dh 18624
                }
18625
                iprot.readListEnd();
18626
              }
18627
            } else { 
18628
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18629
            }
18630
            break;
18631
          default:
18632
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
18633
        }
18634
        iprot.readFieldEnd();
18635
      }
18636
      iprot.readStructEnd();
18637
      validate();
18638
    }
18639
 
18640
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
18641
      oprot.writeStructBegin(STRUCT_DESC);
18642
 
18643
      if (this.isSetSuccess()) {
18644
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18645
        {
18646
          oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, this.success.size()));
7049 anupam.sin 18647
          for (long _iter47 : this.success)
4008 mandeep.dh 18648
          {
7049 anupam.sin 18649
            oprot.writeI64(_iter47);
4008 mandeep.dh 18650
          }
18651
          oprot.writeListEnd();
18652
        }
18653
        oprot.writeFieldEnd();
18654
      }
18655
      oprot.writeFieldStop();
18656
      oprot.writeStructEnd();
18657
    }
18658
 
18659
    @Override
18660
    public String toString() {
18661
      StringBuilder sb = new StringBuilder("getPaymentsRequiringExtraProcessing_result(");
18662
      boolean first = true;
18663
 
18664
      sb.append("success:");
18665
      if (this.success == null) {
18666
        sb.append("null");
18667
      } else {
18668
        sb.append(this.success);
18669
      }
18670
      first = false;
18671
      sb.append(")");
18672
      return sb.toString();
18673
    }
18674
 
18675
    public void validate() throws org.apache.thrift.TException {
18676
      // check for required fields
18677
    }
18678
 
18679
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
18680
      try {
18681
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
18682
      } catch (org.apache.thrift.TException te) {
18683
        throw new java.io.IOException(te);
18684
      }
18685
    }
18686
 
18687
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
18688
      try {
18689
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
18690
      } catch (org.apache.thrift.TException te) {
18691
        throw new java.io.IOException(te);
18692
      }
18693
    }
18694
 
18695
  }
18696
 
18697
  public static class markPaymentAsProcessed_args implements org.apache.thrift.TBase<markPaymentAsProcessed_args, markPaymentAsProcessed_args._Fields>, java.io.Serializable, Cloneable   {
18698
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPaymentAsProcessed_args");
18699
 
18700
    private static final org.apache.thrift.protocol.TField PAYMENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("paymentId", org.apache.thrift.protocol.TType.I64, (short)1);
18701
    private static final org.apache.thrift.protocol.TField CATEGORY_FIELD_DESC = new org.apache.thrift.protocol.TField("category", org.apache.thrift.protocol.TType.I32, (short)2);
18702
 
18703
    private long paymentId; // required
18704
    private ExtraPaymentProcessingType category; // required
18705
 
18706
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18707
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
18708
      PAYMENT_ID((short)1, "paymentId"),
18709
      /**
18710
       * 
18711
       * @see ExtraPaymentProcessingType
18712
       */
18713
      CATEGORY((short)2, "category");
18714
 
18715
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18716
 
18717
      static {
18718
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18719
          byName.put(field.getFieldName(), field);
18720
        }
18721
      }
18722
 
18723
      /**
18724
       * Find the _Fields constant that matches fieldId, or null if its not found.
18725
       */
18726
      public static _Fields findByThriftId(int fieldId) {
18727
        switch(fieldId) {
18728
          case 1: // PAYMENT_ID
18729
            return PAYMENT_ID;
18730
          case 2: // CATEGORY
18731
            return CATEGORY;
18732
          default:
18733
            return null;
18734
        }
18735
      }
18736
 
18737
      /**
18738
       * Find the _Fields constant that matches fieldId, throwing an exception
18739
       * if it is not found.
18740
       */
18741
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18742
        _Fields fields = findByThriftId(fieldId);
18743
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18744
        return fields;
18745
      }
18746
 
18747
      /**
18748
       * Find the _Fields constant that matches name, or null if its not found.
18749
       */
18750
      public static _Fields findByName(String name) {
18751
        return byName.get(name);
18752
      }
18753
 
18754
      private final short _thriftId;
18755
      private final String _fieldName;
18756
 
18757
      _Fields(short thriftId, String fieldName) {
18758
        _thriftId = thriftId;
18759
        _fieldName = fieldName;
18760
      }
18761
 
18762
      public short getThriftFieldId() {
18763
        return _thriftId;
18764
      }
18765
 
18766
      public String getFieldName() {
18767
        return _fieldName;
18768
      }
18769
    }
18770
 
18771
    // isset id assignments
18772
    private static final int __PAYMENTID_ISSET_ID = 0;
18773
    private BitSet __isset_bit_vector = new BitSet(1);
18774
 
18775
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
18776
    static {
18777
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
18778
      tmpMap.put(_Fields.PAYMENT_ID, new org.apache.thrift.meta_data.FieldMetaData("paymentId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18779
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
18780
      tmpMap.put(_Fields.CATEGORY, new org.apache.thrift.meta_data.FieldMetaData("category", org.apache.thrift.TFieldRequirementType.DEFAULT, 
18781
          new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ExtraPaymentProcessingType.class)));
18782
      metaDataMap = Collections.unmodifiableMap(tmpMap);
18783
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPaymentAsProcessed_args.class, metaDataMap);
18784
    }
18785
 
18786
    public markPaymentAsProcessed_args() {
18787
    }
18788
 
18789
    public markPaymentAsProcessed_args(
18790
      long paymentId,
18791
      ExtraPaymentProcessingType category)
18792
    {
18793
      this();
18794
      this.paymentId = paymentId;
18795
      setPaymentIdIsSet(true);
18796
      this.category = category;
18797
    }
18798
 
18799
    /**
18800
     * Performs a deep copy on <i>other</i>.
18801
     */
18802
    public markPaymentAsProcessed_args(markPaymentAsProcessed_args other) {
18803
      __isset_bit_vector.clear();
18804
      __isset_bit_vector.or(other.__isset_bit_vector);
18805
      this.paymentId = other.paymentId;
18806
      if (other.isSetCategory()) {
18807
        this.category = other.category;
18808
      }
18809
    }
18810
 
18811
    public markPaymentAsProcessed_args deepCopy() {
18812
      return new markPaymentAsProcessed_args(this);
18813
    }
18814
 
18815
    @Override
18816
    public void clear() {
18817
      setPaymentIdIsSet(false);
18818
      this.paymentId = 0;
18819
      this.category = null;
18820
    }
18821
 
18822
    public long getPaymentId() {
18823
      return this.paymentId;
18824
    }
18825
 
18826
    public void setPaymentId(long paymentId) {
18827
      this.paymentId = paymentId;
18828
      setPaymentIdIsSet(true);
18829
    }
18830
 
18831
    public void unsetPaymentId() {
18832
      __isset_bit_vector.clear(__PAYMENTID_ISSET_ID);
18833
    }
18834
 
18835
    /** Returns true if field paymentId is set (has been assigned a value) and false otherwise */
18836
    public boolean isSetPaymentId() {
18837
      return __isset_bit_vector.get(__PAYMENTID_ISSET_ID);
18838
    }
18839
 
18840
    public void setPaymentIdIsSet(boolean value) {
18841
      __isset_bit_vector.set(__PAYMENTID_ISSET_ID, value);
18842
    }
18843
 
18844
    /**
18845
     * 
18846
     * @see ExtraPaymentProcessingType
18847
     */
18848
    public ExtraPaymentProcessingType getCategory() {
18849
      return this.category;
18850
    }
18851
 
18852
    /**
18853
     * 
18854
     * @see ExtraPaymentProcessingType
18855
     */
18856
    public void setCategory(ExtraPaymentProcessingType category) {
18857
      this.category = category;
18858
    }
18859
 
18860
    public void unsetCategory() {
18861
      this.category = null;
18862
    }
18863
 
18864
    /** Returns true if field category is set (has been assigned a value) and false otherwise */
18865
    public boolean isSetCategory() {
18866
      return this.category != null;
18867
    }
18868
 
18869
    public void setCategoryIsSet(boolean value) {
18870
      if (!value) {
18871
        this.category = null;
18872
      }
18873
    }
18874
 
18875
    public void setFieldValue(_Fields field, Object value) {
18876
      switch (field) {
18877
      case PAYMENT_ID:
18878
        if (value == null) {
18879
          unsetPaymentId();
18880
        } else {
18881
          setPaymentId((Long)value);
18882
        }
18883
        break;
18884
 
18885
      case CATEGORY:
18886
        if (value == null) {
18887
          unsetCategory();
18888
        } else {
18889
          setCategory((ExtraPaymentProcessingType)value);
18890
        }
18891
        break;
18892
 
18893
      }
18894
    }
18895
 
18896
    public Object getFieldValue(_Fields field) {
18897
      switch (field) {
18898
      case PAYMENT_ID:
18899
        return Long.valueOf(getPaymentId());
18900
 
18901
      case CATEGORY:
18902
        return getCategory();
18903
 
18904
      }
18905
      throw new IllegalStateException();
18906
    }
18907
 
18908
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
18909
    public boolean isSet(_Fields field) {
18910
      if (field == null) {
18911
        throw new IllegalArgumentException();
18912
      }
18913
 
18914
      switch (field) {
18915
      case PAYMENT_ID:
18916
        return isSetPaymentId();
18917
      case CATEGORY:
18918
        return isSetCategory();
18919
      }
18920
      throw new IllegalStateException();
18921
    }
18922
 
18923
    @Override
18924
    public boolean equals(Object that) {
18925
      if (that == null)
18926
        return false;
18927
      if (that instanceof markPaymentAsProcessed_args)
18928
        return this.equals((markPaymentAsProcessed_args)that);
18929
      return false;
18930
    }
18931
 
18932
    public boolean equals(markPaymentAsProcessed_args that) {
18933
      if (that == null)
18934
        return false;
18935
 
18936
      boolean this_present_paymentId = true;
18937
      boolean that_present_paymentId = true;
18938
      if (this_present_paymentId || that_present_paymentId) {
18939
        if (!(this_present_paymentId && that_present_paymentId))
18940
          return false;
18941
        if (this.paymentId != that.paymentId)
18942
          return false;
18943
      }
18944
 
18945
      boolean this_present_category = true && this.isSetCategory();
18946
      boolean that_present_category = true && that.isSetCategory();
18947
      if (this_present_category || that_present_category) {
18948
        if (!(this_present_category && that_present_category))
18949
          return false;
18950
        if (!this.category.equals(that.category))
18951
          return false;
18952
      }
18953
 
18954
      return true;
18955
    }
18956
 
18957
    @Override
18958
    public int hashCode() {
18959
      return 0;
18960
    }
18961
 
18962
    public int compareTo(markPaymentAsProcessed_args other) {
18963
      if (!getClass().equals(other.getClass())) {
18964
        return getClass().getName().compareTo(other.getClass().getName());
18965
      }
18966
 
18967
      int lastComparison = 0;
18968
      markPaymentAsProcessed_args typedOther = (markPaymentAsProcessed_args)other;
18969
 
18970
      lastComparison = Boolean.valueOf(isSetPaymentId()).compareTo(typedOther.isSetPaymentId());
18971
      if (lastComparison != 0) {
18972
        return lastComparison;
18973
      }
18974
      if (isSetPaymentId()) {
18975
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.paymentId, typedOther.paymentId);
18976
        if (lastComparison != 0) {
18977
          return lastComparison;
18978
        }
18979
      }
18980
      lastComparison = Boolean.valueOf(isSetCategory()).compareTo(typedOther.isSetCategory());
18981
      if (lastComparison != 0) {
18982
        return lastComparison;
18983
      }
18984
      if (isSetCategory()) {
18985
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.category, typedOther.category);
18986
        if (lastComparison != 0) {
18987
          return lastComparison;
18988
        }
18989
      }
18990
      return 0;
18991
    }
18992
 
18993
    public _Fields fieldForId(int fieldId) {
18994
      return _Fields.findByThriftId(fieldId);
18995
    }
18996
 
18997
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
18998
      org.apache.thrift.protocol.TField field;
18999
      iprot.readStructBegin();
19000
      while (true)
19001
      {
19002
        field = iprot.readFieldBegin();
19003
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19004
          break;
19005
        }
19006
        switch (field.id) {
19007
          case 1: // PAYMENT_ID
19008
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19009
              this.paymentId = iprot.readI64();
19010
              setPaymentIdIsSet(true);
19011
            } else { 
19012
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19013
            }
19014
            break;
19015
          case 2: // CATEGORY
19016
            if (field.type == org.apache.thrift.protocol.TType.I32) {
19017
              this.category = ExtraPaymentProcessingType.findByValue(iprot.readI32());
19018
            } else { 
19019
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19020
            }
19021
            break;
19022
          default:
19023
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19024
        }
19025
        iprot.readFieldEnd();
19026
      }
19027
      iprot.readStructEnd();
19028
      validate();
19029
    }
19030
 
19031
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19032
      validate();
19033
 
19034
      oprot.writeStructBegin(STRUCT_DESC);
19035
      oprot.writeFieldBegin(PAYMENT_ID_FIELD_DESC);
19036
      oprot.writeI64(this.paymentId);
19037
      oprot.writeFieldEnd();
19038
      if (this.category != null) {
19039
        oprot.writeFieldBegin(CATEGORY_FIELD_DESC);
19040
        oprot.writeI32(this.category.getValue());
19041
        oprot.writeFieldEnd();
19042
      }
19043
      oprot.writeFieldStop();
19044
      oprot.writeStructEnd();
19045
    }
19046
 
19047
    @Override
19048
    public String toString() {
19049
      StringBuilder sb = new StringBuilder("markPaymentAsProcessed_args(");
19050
      boolean first = true;
19051
 
19052
      sb.append("paymentId:");
19053
      sb.append(this.paymentId);
19054
      first = false;
19055
      if (!first) sb.append(", ");
19056
      sb.append("category:");
19057
      if (this.category == null) {
19058
        sb.append("null");
19059
      } else {
19060
        sb.append(this.category);
19061
      }
19062
      first = false;
19063
      sb.append(")");
19064
      return sb.toString();
19065
    }
19066
 
19067
    public void validate() throws org.apache.thrift.TException {
19068
      // check for required fields
19069
    }
19070
 
19071
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19072
      try {
19073
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19074
      } catch (org.apache.thrift.TException te) {
19075
        throw new java.io.IOException(te);
19076
      }
19077
    }
19078
 
19079
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19080
      try {
19081
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19082
      } catch (org.apache.thrift.TException te) {
19083
        throw new java.io.IOException(te);
19084
      }
19085
    }
19086
 
19087
  }
19088
 
19089
  public static class markPaymentAsProcessed_result implements org.apache.thrift.TBase<markPaymentAsProcessed_result, markPaymentAsProcessed_result._Fields>, java.io.Serializable, Cloneable   {
19090
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("markPaymentAsProcessed_result");
19091
 
19092
 
19093
 
19094
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19095
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19096
;
19097
 
19098
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19099
 
19100
      static {
19101
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19102
          byName.put(field.getFieldName(), field);
19103
        }
19104
      }
19105
 
19106
      /**
19107
       * Find the _Fields constant that matches fieldId, or null if its not found.
19108
       */
19109
      public static _Fields findByThriftId(int fieldId) {
19110
        switch(fieldId) {
19111
          default:
19112
            return null;
19113
        }
19114
      }
19115
 
19116
      /**
19117
       * Find the _Fields constant that matches fieldId, throwing an exception
19118
       * if it is not found.
19119
       */
19120
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19121
        _Fields fields = findByThriftId(fieldId);
19122
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19123
        return fields;
19124
      }
19125
 
19126
      /**
19127
       * Find the _Fields constant that matches name, or null if its not found.
19128
       */
19129
      public static _Fields findByName(String name) {
19130
        return byName.get(name);
19131
      }
19132
 
19133
      private final short _thriftId;
19134
      private final String _fieldName;
19135
 
19136
      _Fields(short thriftId, String fieldName) {
19137
        _thriftId = thriftId;
19138
        _fieldName = fieldName;
19139
      }
19140
 
19141
      public short getThriftFieldId() {
19142
        return _thriftId;
19143
      }
19144
 
19145
      public String getFieldName() {
19146
        return _fieldName;
19147
      }
19148
    }
19149
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19150
    static {
19151
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19152
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19153
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(markPaymentAsProcessed_result.class, metaDataMap);
19154
    }
19155
 
19156
    public markPaymentAsProcessed_result() {
19157
    }
19158
 
19159
    /**
19160
     * Performs a deep copy on <i>other</i>.
19161
     */
19162
    public markPaymentAsProcessed_result(markPaymentAsProcessed_result other) {
19163
    }
19164
 
19165
    public markPaymentAsProcessed_result deepCopy() {
19166
      return new markPaymentAsProcessed_result(this);
19167
    }
19168
 
19169
    @Override
19170
    public void clear() {
19171
    }
19172
 
19173
    public void setFieldValue(_Fields field, Object value) {
19174
      switch (field) {
19175
      }
19176
    }
19177
 
19178
    public Object getFieldValue(_Fields field) {
19179
      switch (field) {
19180
      }
19181
      throw new IllegalStateException();
19182
    }
19183
 
19184
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19185
    public boolean isSet(_Fields field) {
19186
      if (field == null) {
19187
        throw new IllegalArgumentException();
19188
      }
19189
 
19190
      switch (field) {
19191
      }
19192
      throw new IllegalStateException();
19193
    }
19194
 
19195
    @Override
19196
    public boolean equals(Object that) {
19197
      if (that == null)
19198
        return false;
19199
      if (that instanceof markPaymentAsProcessed_result)
19200
        return this.equals((markPaymentAsProcessed_result)that);
19201
      return false;
19202
    }
19203
 
19204
    public boolean equals(markPaymentAsProcessed_result that) {
19205
      if (that == null)
19206
        return false;
19207
 
19208
      return true;
19209
    }
19210
 
19211
    @Override
19212
    public int hashCode() {
19213
      return 0;
19214
    }
19215
 
19216
    public int compareTo(markPaymentAsProcessed_result other) {
19217
      if (!getClass().equals(other.getClass())) {
19218
        return getClass().getName().compareTo(other.getClass().getName());
19219
      }
19220
 
19221
      int lastComparison = 0;
19222
      markPaymentAsProcessed_result typedOther = (markPaymentAsProcessed_result)other;
19223
 
19224
      return 0;
19225
    }
19226
 
19227
    public _Fields fieldForId(int fieldId) {
19228
      return _Fields.findByThriftId(fieldId);
19229
    }
19230
 
19231
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19232
      org.apache.thrift.protocol.TField field;
19233
      iprot.readStructBegin();
19234
      while (true)
19235
      {
19236
        field = iprot.readFieldBegin();
19237
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19238
          break;
19239
        }
19240
        switch (field.id) {
19241
          default:
19242
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19243
        }
19244
        iprot.readFieldEnd();
19245
      }
19246
      iprot.readStructEnd();
19247
      validate();
19248
    }
19249
 
19250
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19251
      oprot.writeStructBegin(STRUCT_DESC);
19252
 
19253
      oprot.writeFieldStop();
19254
      oprot.writeStructEnd();
19255
    }
19256
 
19257
    @Override
19258
    public String toString() {
19259
      StringBuilder sb = new StringBuilder("markPaymentAsProcessed_result(");
19260
      boolean first = true;
19261
 
19262
      sb.append(")");
19263
      return sb.toString();
19264
    }
19265
 
19266
    public void validate() throws org.apache.thrift.TException {
19267
      // check for required fields
19268
    }
19269
 
19270
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19271
      try {
19272
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19273
      } catch (org.apache.thrift.TException te) {
19274
        throw new java.io.IOException(te);
19275
      }
19276
    }
19277
 
19278
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19279
      try {
19280
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19281
      } catch (org.apache.thrift.TException te) {
19282
        throw new java.io.IOException(te);
19283
      }
19284
    }
19285
 
19286
  }
19287
 
8907 rajveer 19288
  public static class validatePaymentAtGateway_args implements org.apache.thrift.TBase<validatePaymentAtGateway_args, validatePaymentAtGateway_args._Fields>, java.io.Serializable, Cloneable   {
19289
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validatePaymentAtGateway_args");
19290
 
19291
    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);
19292
    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);
19293
    private static final org.apache.thrift.protocol.TField IS_DIGITAL_FIELD_DESC = new org.apache.thrift.protocol.TField("isDigital", org.apache.thrift.protocol.TType.BOOL, (short)3);
19294
 
19295
    private long merchantTxnId; // required
19296
    private double amount; // required
19297
    private boolean isDigital; // required
19298
 
19299
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19300
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19301
      MERCHANT_TXN_ID((short)1, "merchantTxnId"),
19302
      AMOUNT((short)2, "amount"),
19303
      IS_DIGITAL((short)3, "isDigital");
19304
 
19305
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19306
 
19307
      static {
19308
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19309
          byName.put(field.getFieldName(), field);
19310
        }
19311
      }
19312
 
19313
      /**
19314
       * Find the _Fields constant that matches fieldId, or null if its not found.
19315
       */
19316
      public static _Fields findByThriftId(int fieldId) {
19317
        switch(fieldId) {
19318
          case 1: // MERCHANT_TXN_ID
19319
            return MERCHANT_TXN_ID;
19320
          case 2: // AMOUNT
19321
            return AMOUNT;
19322
          case 3: // IS_DIGITAL
19323
            return IS_DIGITAL;
19324
          default:
19325
            return null;
19326
        }
19327
      }
19328
 
19329
      /**
19330
       * Find the _Fields constant that matches fieldId, throwing an exception
19331
       * if it is not found.
19332
       */
19333
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19334
        _Fields fields = findByThriftId(fieldId);
19335
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19336
        return fields;
19337
      }
19338
 
19339
      /**
19340
       * Find the _Fields constant that matches name, or null if its not found.
19341
       */
19342
      public static _Fields findByName(String name) {
19343
        return byName.get(name);
19344
      }
19345
 
19346
      private final short _thriftId;
19347
      private final String _fieldName;
19348
 
19349
      _Fields(short thriftId, String fieldName) {
19350
        _thriftId = thriftId;
19351
        _fieldName = fieldName;
19352
      }
19353
 
19354
      public short getThriftFieldId() {
19355
        return _thriftId;
19356
      }
19357
 
19358
      public String getFieldName() {
19359
        return _fieldName;
19360
      }
19361
    }
19362
 
19363
    // isset id assignments
19364
    private static final int __MERCHANTTXNID_ISSET_ID = 0;
19365
    private static final int __AMOUNT_ISSET_ID = 1;
19366
    private static final int __ISDIGITAL_ISSET_ID = 2;
19367
    private BitSet __isset_bit_vector = new BitSet(3);
19368
 
19369
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19370
    static {
19371
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19372
      tmpMap.put(_Fields.MERCHANT_TXN_ID, new org.apache.thrift.meta_data.FieldMetaData("merchantTxnId", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19373
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
19374
      tmpMap.put(_Fields.AMOUNT, new org.apache.thrift.meta_data.FieldMetaData("amount", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19375
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
19376
      tmpMap.put(_Fields.IS_DIGITAL, new org.apache.thrift.meta_data.FieldMetaData("isDigital", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19377
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
19378
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19379
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validatePaymentAtGateway_args.class, metaDataMap);
19380
    }
19381
 
19382
    public validatePaymentAtGateway_args() {
19383
    }
19384
 
19385
    public validatePaymentAtGateway_args(
19386
      long merchantTxnId,
19387
      double amount,
19388
      boolean isDigital)
19389
    {
19390
      this();
19391
      this.merchantTxnId = merchantTxnId;
19392
      setMerchantTxnIdIsSet(true);
19393
      this.amount = amount;
19394
      setAmountIsSet(true);
19395
      this.isDigital = isDigital;
19396
      setIsDigitalIsSet(true);
19397
    }
19398
 
19399
    /**
19400
     * Performs a deep copy on <i>other</i>.
19401
     */
19402
    public validatePaymentAtGateway_args(validatePaymentAtGateway_args other) {
19403
      __isset_bit_vector.clear();
19404
      __isset_bit_vector.or(other.__isset_bit_vector);
19405
      this.merchantTxnId = other.merchantTxnId;
19406
      this.amount = other.amount;
19407
      this.isDigital = other.isDigital;
19408
    }
19409
 
19410
    public validatePaymentAtGateway_args deepCopy() {
19411
      return new validatePaymentAtGateway_args(this);
19412
    }
19413
 
19414
    @Override
19415
    public void clear() {
19416
      setMerchantTxnIdIsSet(false);
19417
      this.merchantTxnId = 0;
19418
      setAmountIsSet(false);
19419
      this.amount = 0.0;
19420
      setIsDigitalIsSet(false);
19421
      this.isDigital = false;
19422
    }
19423
 
19424
    public long getMerchantTxnId() {
19425
      return this.merchantTxnId;
19426
    }
19427
 
19428
    public void setMerchantTxnId(long merchantTxnId) {
19429
      this.merchantTxnId = merchantTxnId;
19430
      setMerchantTxnIdIsSet(true);
19431
    }
19432
 
19433
    public void unsetMerchantTxnId() {
19434
      __isset_bit_vector.clear(__MERCHANTTXNID_ISSET_ID);
19435
    }
19436
 
19437
    /** Returns true if field merchantTxnId is set (has been assigned a value) and false otherwise */
19438
    public boolean isSetMerchantTxnId() {
19439
      return __isset_bit_vector.get(__MERCHANTTXNID_ISSET_ID);
19440
    }
19441
 
19442
    public void setMerchantTxnIdIsSet(boolean value) {
19443
      __isset_bit_vector.set(__MERCHANTTXNID_ISSET_ID, value);
19444
    }
19445
 
19446
    public double getAmount() {
19447
      return this.amount;
19448
    }
19449
 
19450
    public void setAmount(double amount) {
19451
      this.amount = amount;
19452
      setAmountIsSet(true);
19453
    }
19454
 
19455
    public void unsetAmount() {
19456
      __isset_bit_vector.clear(__AMOUNT_ISSET_ID);
19457
    }
19458
 
19459
    /** Returns true if field amount is set (has been assigned a value) and false otherwise */
19460
    public boolean isSetAmount() {
19461
      return __isset_bit_vector.get(__AMOUNT_ISSET_ID);
19462
    }
19463
 
19464
    public void setAmountIsSet(boolean value) {
19465
      __isset_bit_vector.set(__AMOUNT_ISSET_ID, value);
19466
    }
19467
 
19468
    public boolean isIsDigital() {
19469
      return this.isDigital;
19470
    }
19471
 
19472
    public void setIsDigital(boolean isDigital) {
19473
      this.isDigital = isDigital;
19474
      setIsDigitalIsSet(true);
19475
    }
19476
 
19477
    public void unsetIsDigital() {
19478
      __isset_bit_vector.clear(__ISDIGITAL_ISSET_ID);
19479
    }
19480
 
19481
    /** Returns true if field isDigital is set (has been assigned a value) and false otherwise */
19482
    public boolean isSetIsDigital() {
19483
      return __isset_bit_vector.get(__ISDIGITAL_ISSET_ID);
19484
    }
19485
 
19486
    public void setIsDigitalIsSet(boolean value) {
19487
      __isset_bit_vector.set(__ISDIGITAL_ISSET_ID, value);
19488
    }
19489
 
19490
    public void setFieldValue(_Fields field, Object value) {
19491
      switch (field) {
19492
      case MERCHANT_TXN_ID:
19493
        if (value == null) {
19494
          unsetMerchantTxnId();
19495
        } else {
19496
          setMerchantTxnId((Long)value);
19497
        }
19498
        break;
19499
 
19500
      case AMOUNT:
19501
        if (value == null) {
19502
          unsetAmount();
19503
        } else {
19504
          setAmount((Double)value);
19505
        }
19506
        break;
19507
 
19508
      case IS_DIGITAL:
19509
        if (value == null) {
19510
          unsetIsDigital();
19511
        } else {
19512
          setIsDigital((Boolean)value);
19513
        }
19514
        break;
19515
 
19516
      }
19517
    }
19518
 
19519
    public Object getFieldValue(_Fields field) {
19520
      switch (field) {
19521
      case MERCHANT_TXN_ID:
19522
        return Long.valueOf(getMerchantTxnId());
19523
 
19524
      case AMOUNT:
19525
        return Double.valueOf(getAmount());
19526
 
19527
      case IS_DIGITAL:
19528
        return Boolean.valueOf(isIsDigital());
19529
 
19530
      }
19531
      throw new IllegalStateException();
19532
    }
19533
 
19534
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19535
    public boolean isSet(_Fields field) {
19536
      if (field == null) {
19537
        throw new IllegalArgumentException();
19538
      }
19539
 
19540
      switch (field) {
19541
      case MERCHANT_TXN_ID:
19542
        return isSetMerchantTxnId();
19543
      case AMOUNT:
19544
        return isSetAmount();
19545
      case IS_DIGITAL:
19546
        return isSetIsDigital();
19547
      }
19548
      throw new IllegalStateException();
19549
    }
19550
 
19551
    @Override
19552
    public boolean equals(Object that) {
19553
      if (that == null)
19554
        return false;
19555
      if (that instanceof validatePaymentAtGateway_args)
19556
        return this.equals((validatePaymentAtGateway_args)that);
19557
      return false;
19558
    }
19559
 
19560
    public boolean equals(validatePaymentAtGateway_args that) {
19561
      if (that == null)
19562
        return false;
19563
 
19564
      boolean this_present_merchantTxnId = true;
19565
      boolean that_present_merchantTxnId = true;
19566
      if (this_present_merchantTxnId || that_present_merchantTxnId) {
19567
        if (!(this_present_merchantTxnId && that_present_merchantTxnId))
19568
          return false;
19569
        if (this.merchantTxnId != that.merchantTxnId)
19570
          return false;
19571
      }
19572
 
19573
      boolean this_present_amount = true;
19574
      boolean that_present_amount = true;
19575
      if (this_present_amount || that_present_amount) {
19576
        if (!(this_present_amount && that_present_amount))
19577
          return false;
19578
        if (this.amount != that.amount)
19579
          return false;
19580
      }
19581
 
19582
      boolean this_present_isDigital = true;
19583
      boolean that_present_isDigital = true;
19584
      if (this_present_isDigital || that_present_isDigital) {
19585
        if (!(this_present_isDigital && that_present_isDigital))
19586
          return false;
19587
        if (this.isDigital != that.isDigital)
19588
          return false;
19589
      }
19590
 
19591
      return true;
19592
    }
19593
 
19594
    @Override
19595
    public int hashCode() {
19596
      return 0;
19597
    }
19598
 
19599
    public int compareTo(validatePaymentAtGateway_args other) {
19600
      if (!getClass().equals(other.getClass())) {
19601
        return getClass().getName().compareTo(other.getClass().getName());
19602
      }
19603
 
19604
      int lastComparison = 0;
19605
      validatePaymentAtGateway_args typedOther = (validatePaymentAtGateway_args)other;
19606
 
19607
      lastComparison = Boolean.valueOf(isSetMerchantTxnId()).compareTo(typedOther.isSetMerchantTxnId());
19608
      if (lastComparison != 0) {
19609
        return lastComparison;
19610
      }
19611
      if (isSetMerchantTxnId()) {
19612
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.merchantTxnId, typedOther.merchantTxnId);
19613
        if (lastComparison != 0) {
19614
          return lastComparison;
19615
        }
19616
      }
19617
      lastComparison = Boolean.valueOf(isSetAmount()).compareTo(typedOther.isSetAmount());
19618
      if (lastComparison != 0) {
19619
        return lastComparison;
19620
      }
19621
      if (isSetAmount()) {
19622
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.amount, typedOther.amount);
19623
        if (lastComparison != 0) {
19624
          return lastComparison;
19625
        }
19626
      }
19627
      lastComparison = Boolean.valueOf(isSetIsDigital()).compareTo(typedOther.isSetIsDigital());
19628
      if (lastComparison != 0) {
19629
        return lastComparison;
19630
      }
19631
      if (isSetIsDigital()) {
19632
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isDigital, typedOther.isDigital);
19633
        if (lastComparison != 0) {
19634
          return lastComparison;
19635
        }
19636
      }
19637
      return 0;
19638
    }
19639
 
19640
    public _Fields fieldForId(int fieldId) {
19641
      return _Fields.findByThriftId(fieldId);
19642
    }
19643
 
19644
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
19645
      org.apache.thrift.protocol.TField field;
19646
      iprot.readStructBegin();
19647
      while (true)
19648
      {
19649
        field = iprot.readFieldBegin();
19650
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
19651
          break;
19652
        }
19653
        switch (field.id) {
19654
          case 1: // MERCHANT_TXN_ID
19655
            if (field.type == org.apache.thrift.protocol.TType.I64) {
19656
              this.merchantTxnId = iprot.readI64();
19657
              setMerchantTxnIdIsSet(true);
19658
            } else { 
19659
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19660
            }
19661
            break;
19662
          case 2: // AMOUNT
19663
            if (field.type == org.apache.thrift.protocol.TType.DOUBLE) {
19664
              this.amount = iprot.readDouble();
19665
              setAmountIsSet(true);
19666
            } else { 
19667
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19668
            }
19669
            break;
19670
          case 3: // IS_DIGITAL
19671
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
19672
              this.isDigital = iprot.readBool();
19673
              setIsDigitalIsSet(true);
19674
            } else { 
19675
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19676
            }
19677
            break;
19678
          default:
19679
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
19680
        }
19681
        iprot.readFieldEnd();
19682
      }
19683
      iprot.readStructEnd();
19684
      validate();
19685
    }
19686
 
19687
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
19688
      validate();
19689
 
19690
      oprot.writeStructBegin(STRUCT_DESC);
19691
      oprot.writeFieldBegin(MERCHANT_TXN_ID_FIELD_DESC);
19692
      oprot.writeI64(this.merchantTxnId);
19693
      oprot.writeFieldEnd();
19694
      oprot.writeFieldBegin(AMOUNT_FIELD_DESC);
19695
      oprot.writeDouble(this.amount);
19696
      oprot.writeFieldEnd();
19697
      oprot.writeFieldBegin(IS_DIGITAL_FIELD_DESC);
19698
      oprot.writeBool(this.isDigital);
19699
      oprot.writeFieldEnd();
19700
      oprot.writeFieldStop();
19701
      oprot.writeStructEnd();
19702
    }
19703
 
19704
    @Override
19705
    public String toString() {
19706
      StringBuilder sb = new StringBuilder("validatePaymentAtGateway_args(");
19707
      boolean first = true;
19708
 
19709
      sb.append("merchantTxnId:");
19710
      sb.append(this.merchantTxnId);
19711
      first = false;
19712
      if (!first) sb.append(", ");
19713
      sb.append("amount:");
19714
      sb.append(this.amount);
19715
      first = false;
19716
      if (!first) sb.append(", ");
19717
      sb.append("isDigital:");
19718
      sb.append(this.isDigital);
19719
      first = false;
19720
      sb.append(")");
19721
      return sb.toString();
19722
    }
19723
 
19724
    public void validate() throws org.apache.thrift.TException {
19725
      // check for required fields
19726
    }
19727
 
19728
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
19729
      try {
19730
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
19731
      } catch (org.apache.thrift.TException te) {
19732
        throw new java.io.IOException(te);
19733
      }
19734
    }
19735
 
19736
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
19737
      try {
19738
        // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
19739
        __isset_bit_vector = new BitSet(1);
19740
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
19741
      } catch (org.apache.thrift.TException te) {
19742
        throw new java.io.IOException(te);
19743
      }
19744
    }
19745
 
19746
  }
19747
 
19748
  public static class validatePaymentAtGateway_result implements org.apache.thrift.TBase<validatePaymentAtGateway_result, validatePaymentAtGateway_result._Fields>, java.io.Serializable, Cloneable   {
19749
    private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("validatePaymentAtGateway_result");
19750
 
19751
    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);
19752
    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);
19753
 
19754
    private boolean success; // required
19755
    private PaymentException pe; // required
19756
 
19757
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19758
    public enum _Fields implements org.apache.thrift.TFieldIdEnum {
19759
      SUCCESS((short)0, "success"),
19760
      PE((short)1, "pe");
19761
 
19762
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19763
 
19764
      static {
19765
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19766
          byName.put(field.getFieldName(), field);
19767
        }
19768
      }
19769
 
19770
      /**
19771
       * Find the _Fields constant that matches fieldId, or null if its not found.
19772
       */
19773
      public static _Fields findByThriftId(int fieldId) {
19774
        switch(fieldId) {
19775
          case 0: // SUCCESS
19776
            return SUCCESS;
19777
          case 1: // PE
19778
            return PE;
19779
          default:
19780
            return null;
19781
        }
19782
      }
19783
 
19784
      /**
19785
       * Find the _Fields constant that matches fieldId, throwing an exception
19786
       * if it is not found.
19787
       */
19788
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19789
        _Fields fields = findByThriftId(fieldId);
19790
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19791
        return fields;
19792
      }
19793
 
19794
      /**
19795
       * Find the _Fields constant that matches name, or null if its not found.
19796
       */
19797
      public static _Fields findByName(String name) {
19798
        return byName.get(name);
19799
      }
19800
 
19801
      private final short _thriftId;
19802
      private final String _fieldName;
19803
 
19804
      _Fields(short thriftId, String fieldName) {
19805
        _thriftId = thriftId;
19806
        _fieldName = fieldName;
19807
      }
19808
 
19809
      public short getThriftFieldId() {
19810
        return _thriftId;
19811
      }
19812
 
19813
      public String getFieldName() {
19814
        return _fieldName;
19815
      }
19816
    }
19817
 
19818
    // isset id assignments
19819
    private static final int __SUCCESS_ISSET_ID = 0;
19820
    private BitSet __isset_bit_vector = new BitSet(1);
19821
 
19822
    public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
19823
    static {
19824
      Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
19825
      tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19826
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
19827
      tmpMap.put(_Fields.PE, new org.apache.thrift.meta_data.FieldMetaData("pe", org.apache.thrift.TFieldRequirementType.DEFAULT, 
19828
          new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT)));
19829
      metaDataMap = Collections.unmodifiableMap(tmpMap);
19830
      org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(validatePaymentAtGateway_result.class, metaDataMap);
19831
    }
19832
 
19833
    public validatePaymentAtGateway_result() {
19834
    }
19835
 
19836
    public validatePaymentAtGateway_result(
19837
      boolean success,
19838
      PaymentException pe)
19839
    {
19840
      this();
19841
      this.success = success;
19842
      setSuccessIsSet(true);
19843
      this.pe = pe;
19844
    }
19845
 
19846
    /**
19847
     * Performs a deep copy on <i>other</i>.
19848
     */
19849
    public validatePaymentAtGateway_result(validatePaymentAtGateway_result other) {
19850
      __isset_bit_vector.clear();
19851
      __isset_bit_vector.or(other.__isset_bit_vector);
19852
      this.success = other.success;
19853
      if (other.isSetPe()) {
19854
        this.pe = new PaymentException(other.pe);
19855
      }
19856
    }
19857
 
19858
    public validatePaymentAtGateway_result deepCopy() {
19859
      return new validatePaymentAtGateway_result(this);
19860
    }
19861
 
19862
    @Override
19863
    public void clear() {
19864
      setSuccessIsSet(false);
19865
      this.success = false;
19866
      this.pe = null;
19867
    }
19868
 
19869
    public boolean isSuccess() {
19870
      return this.success;
19871
    }
19872
 
19873
    public void setSuccess(boolean success) {
19874
      this.success = success;
19875
      setSuccessIsSet(true);
19876
    }
19877
 
19878
    public void unsetSuccess() {
19879
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
19880
    }
19881
 
19882
    /** Returns true if field success is set (has been assigned a value) and false otherwise */
19883
    public boolean isSetSuccess() {
19884
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
19885
    }
19886
 
19887
    public void setSuccessIsSet(boolean value) {
19888
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
19889
    }
19890
 
19891
    public PaymentException getPe() {
19892
      return this.pe;
19893
    }
19894
 
19895
    public void setPe(PaymentException pe) {
19896
      this.pe = pe;
19897
    }
19898
 
19899
    public void unsetPe() {
19900
      this.pe = null;
19901
    }
19902
 
19903
    /** Returns true if field pe is set (has been assigned a value) and false otherwise */
19904
    public boolean isSetPe() {
19905
      return this.pe != null;
19906
    }
19907
 
19908
    public void setPeIsSet(boolean value) {
19909
      if (!value) {
19910
        this.pe = null;
19911
      }
19912
    }
19913
 
19914
    public void setFieldValue(_Fields field, Object value) {
19915
      switch (field) {
19916
      case SUCCESS:
19917
        if (value == null) {
19918
          unsetSuccess();
19919
        } else {
19920
          setSuccess((Boolean)value);
19921
        }
19922
        break;
19923
 
19924
      case PE:
19925
        if (value == null) {
19926
          unsetPe();
19927
        } else {
19928
          setPe((PaymentException)value);
19929
        }
19930
        break;
19931
 
19932
      }
19933
    }
19934
 
19935
    public Object getFieldValue(_Fields field) {
19936
      switch (field) {
19937
      case SUCCESS:
19938
        return Boolean.valueOf(isSuccess());
19939
 
19940
      case PE:
19941
        return getPe();
19942
 
19943
      }
19944
      throw new IllegalStateException();
19945
    }
19946
 
19947
    /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
19948
    public boolean isSet(_Fields field) {
19949
      if (field == null) {
19950
        throw new IllegalArgumentException();
19951
      }
19952
 
19953
      switch (field) {
19954
      case SUCCESS:
19955
        return isSetSuccess();
19956
      case PE:
19957
        return isSetPe();
19958
      }
19959
      throw new IllegalStateException();
19960
    }
19961
 
19962
    @Override
19963
    public boolean equals(Object that) {
19964
      if (that == null)
19965
        return false;
19966
      if (that instanceof validatePaymentAtGateway_result)
19967
        return this.equals((validatePaymentAtGateway_result)that);
19968
      return false;
19969
    }
19970
 
19971
    public boolean equals(validatePaymentAtGateway_result that) {
19972
      if (that == null)
19973
        return false;
19974
 
19975
      boolean this_present_success = true;
19976
      boolean that_present_success = true;
19977
      if (this_present_success || that_present_success) {
19978
        if (!(this_present_success && that_present_success))
19979
          return false;
19980
        if (this.success != that.success)
19981
          return false;
19982
      }
19983
 
19984
      boolean this_present_pe = true && this.isSetPe();
19985
      boolean that_present_pe = true && that.isSetPe();
19986
      if (this_present_pe || that_present_pe) {
19987
        if (!(this_present_pe && that_present_pe))
19988
          return false;
19989
        if (!this.pe.equals(that.pe))
19990
          return false;
19991
      }
19992
 
19993
      return true;
19994
    }
19995
 
19996
    @Override
19997
    public int hashCode() {
19998
      return 0;
19999
    }
20000
 
20001
    public int compareTo(validatePaymentAtGateway_result other) {
20002
      if (!getClass().equals(other.getClass())) {
20003
        return getClass().getName().compareTo(other.getClass().getName());
20004
      }
20005
 
20006
      int lastComparison = 0;
20007
      validatePaymentAtGateway_result typedOther = (validatePaymentAtGateway_result)other;
20008
 
20009
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(typedOther.isSetSuccess());
20010
      if (lastComparison != 0) {
20011
        return lastComparison;
20012
      }
20013
      if (isSetSuccess()) {
20014
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.success, typedOther.success);
20015
        if (lastComparison != 0) {
20016
          return lastComparison;
20017
        }
20018
      }
20019
      lastComparison = Boolean.valueOf(isSetPe()).compareTo(typedOther.isSetPe());
20020
      if (lastComparison != 0) {
20021
        return lastComparison;
20022
      }
20023
      if (isSetPe()) {
20024
        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.pe, typedOther.pe);
20025
        if (lastComparison != 0) {
20026
          return lastComparison;
20027
        }
20028
      }
20029
      return 0;
20030
    }
20031
 
20032
    public _Fields fieldForId(int fieldId) {
20033
      return _Fields.findByThriftId(fieldId);
20034
    }
20035
 
20036
    public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
20037
      org.apache.thrift.protocol.TField field;
20038
      iprot.readStructBegin();
20039
      while (true)
20040
      {
20041
        field = iprot.readFieldBegin();
20042
        if (field.type == org.apache.thrift.protocol.TType.STOP) { 
20043
          break;
20044
        }
20045
        switch (field.id) {
20046
          case 0: // SUCCESS
20047
            if (field.type == org.apache.thrift.protocol.TType.BOOL) {
20048
              this.success = iprot.readBool();
20049
              setSuccessIsSet(true);
20050
            } else { 
20051
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20052
            }
20053
            break;
20054
          case 1: // PE
20055
            if (field.type == org.apache.thrift.protocol.TType.STRUCT) {
20056
              this.pe = new PaymentException();
20057
              this.pe.read(iprot);
20058
            } else { 
20059
              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20060
            }
20061
            break;
20062
          default:
20063
            org.apache.thrift.protocol.TProtocolUtil.skip(iprot, field.type);
20064
        }
20065
        iprot.readFieldEnd();
20066
      }
20067
      iprot.readStructEnd();
20068
      validate();
20069
    }
20070
 
20071
    public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
20072
      oprot.writeStructBegin(STRUCT_DESC);
20073
 
20074
      if (this.isSetSuccess()) {
20075
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20076
        oprot.writeBool(this.success);
20077
        oprot.writeFieldEnd();
20078
      } else if (this.isSetPe()) {
20079
        oprot.writeFieldBegin(PE_FIELD_DESC);
20080
        this.pe.write(oprot);
20081
        oprot.writeFieldEnd();
20082
      }
20083
      oprot.writeFieldStop();
20084
      oprot.writeStructEnd();
20085
    }
20086
 
20087
    @Override
20088
    public String toString() {
20089
      StringBuilder sb = new StringBuilder("validatePaymentAtGateway_result(");
20090
      boolean first = true;
20091
 
20092
      sb.append("success:");
20093
      sb.append(this.success);
20094
      first = false;
20095
      if (!first) sb.append(", ");
20096
      sb.append("pe:");
20097
      if (this.pe == null) {
20098
        sb.append("null");
20099
      } else {
20100
        sb.append(this.pe);
20101
      }
20102
      first = false;
20103
      sb.append(")");
20104
      return sb.toString();
20105
    }
20106
 
20107
    public void validate() throws org.apache.thrift.TException {
20108
      // check for required fields
20109
    }
20110
 
20111
    private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
20112
      try {
20113
        write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
20114
      } catch (org.apache.thrift.TException te) {
20115
        throw new java.io.IOException(te);
20116
      }
20117
    }
20118
 
20119
    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
20120
      try {
20121
        read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
20122
      } catch (org.apache.thrift.TException te) {
20123
        throw new java.io.IOException(te);
20124
      }
20125
    }
20126
 
20127
  }
20128
 
123 ashish 20129
}